configure revision 1.1.1.19 1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20230114.
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=XXXX 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 catgories 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-tty-group=XXX use XXX for the tty-group
726 --with-x use the X Window System
727 --with-pkg-config{=path} enable/disable use of pkg-config
728 --with-xpm=DIR use Xpm library for colored icon, may specify path
729 --without-xinerama do not use Xinerama extension for multiscreen support
730 --with-Xaw3d link with Xaw 3d library
731 --with-Xaw3dxft link with Xaw 3d xft library
732 --with-neXtaw link with neXT Athena library
733 --with-XawPlus link with Athena-Plus library
734 --disable-xcursor disable cursorTheme resource
735 --enable-narrowproto enable narrow prototypes for X libraries
736 --disable-imake disable use of imake for definitions
737 --with-man2html=XXX use XXX rather than groff
738 Terminal Configuration:
739 --with-terminal-id=V set default decTerminalID (default: vt420)
740 --with-terminal-type=T set default $TERM (default: xterm)
741 --enable-backarrow-key set default backarrowKey resource (default: true)
742 --enable-backarrow-is-erase set default backarrowKeyIsErase resource (default: false)
743 --enable-delete-is-del set default deleteIsDEL resource (default: maybe)
744 --enable-pty-erase set default ptyInitialErase resource (default: maybe)
745 --enable-alt-sends-esc set default altSendsEscape resource (default: no)
746 --enable-meta-sends-esc set default metaSendsEscape resource (default: no)
747 --with-own-terminfo=P set default $TERMINFO (default: from environment)
748 --enable-env-terminfo setenv $TERMINFO if --with-own-terminfo gives value
749 Optional Features:
750 --disable-active-icon disable X11R6.3 active-icon feature
751 --disable-ansi-color disable ANSI color
752 --disable-16-color disable 16-color support
753 --disable-256-color disable 256-color support
754 --disable-direct-color disable direct-color support
755 --disable-88-color disable 88-color support
756 --disable-blink-cursor disable support for blinking cursor
757 --enable-broken-osc allow broken Linux OSC-strings
758 --disable-broken-st disallow broken string-terminators
759 --enable-builtin-xpms compile-in icon data
760 --disable-c1-print disallow -k8 option for printable 128-159
761 --disable-bold-color disable PC-style mapping of bold colors
762 --disable-color-class disable separate color class resources
763 --disable-color-mode disable default colorMode resource
764 --disable-highlighting disable support for color highlighting
765 --disable-doublechars disable support for double-size chars
766 --disable-boxchars disable fallback-support for box chars
767 --disable-exec-selection disable "exec-formatted" and "exec-selection" actions
768 --enable-exec-xterm enable "spawn-new-terminal" action
769 --enable-double-buffer enable double-buffering in default resources
770 --disable-freetype disable freetype library-support
771 --with-freetype-config configure script to use for FreeType
772 --with-freetype-cflags -D/-I options for compiling with FreeType
773 --with-freetype-libs -L/-l options to link FreeType
774 --enable-hp-fkeys enable support for HP-style function keys
775 --enable-sco-fkeys enable support for SCO-style function keys
776 --disable-sun-fkeys disable support for Sun-style function keys
777 --disable-fifo-lines disable FIFO-storage for saved-lines
778 --disable-i18n disable internationalization
779 --disable-initial-erase disable setup for stty erase
780 --disable-input-method disable input-method
781 --enable-load-vt-fonts enable load-vt-fonts() action
782 --enable-logging enable logging
783 --enable-logfile-exec enable exec'd logfile filter
784 --disable-maximize disable actions for iconify/deiconify/maximize/restore
785 --disable-num-lock disable NumLock keypad support
786 --disable-paste64 disable get/set base64 selection data
787 --disable-pty-handshake disable pty-handshake support
788 --disable-readline-mouse disable support for mouse in readline applications
789 --disable-regex disable regular-expression selections
790 --with-pcre2 use PCRE2 for regular-expressions
791 --with-pcre use PCRE for regular-expressions
792 --disable-rightbar disable right-scrollbar support
793 --disable-samename disable check for redundant name-change
794 --disable-selection-ops disable selection-action operations
795 --disable-session-mgt disable support for session management
796 --enable-status-line enable support for status-line
797 --disable-tcap-fkeys disable termcap function-keys support
798 --disable-tcap-query disable compiled-in termcap-query support
799 --disable-tek4014 disable tek4014 emulation
800 --enable-toolbar compile-in toolbar for pulldown menus
801 --disable-vt52 disable VT52 emulation
802 --disable-wide-attrs disable wide-attribute support
803 --disable-wide-chars disable wide-character support
804 --enable-16bit-chars enable 16-bit character support
805 --enable-mini-luit enable mini-luit (built-in Latin9 support)
806 --disable-luit enable luit filter (Unicode translation)
807 --enable-dabbrev enable dynamic-abbreviation support
808 --enable-dec-locator enable DECterm Locator support
809 --disable-screen-dumps disable XHTML and SVG screen dumps
810 --enable-regis-graphics enable ReGIS graphics support
811 --disable-sixel-graphics disable sixel graphics support
812 --disable-print-graphics disable screen dump to sixel support
813 --disable-rectangles disable VT420 rectangle support
814 --disable-ziconbeep disable -ziconbeep option
815 Testing/development Options:
816 --enable-trace test: set to enable debugging traces
817 --with-dmalloc test: use Gray Watson's dmalloc library
818 --with-dbmalloc test: use Conor Cahill's dbmalloc library
819 --with-valgrind test: use valgrind
820 --disable-leaks test: free permanent memory, analyze leaks
821 --disable-echo do not display "compiling" commands
822 --enable-xmc-glitch test: enable xmc magic-cookie emulation
823 --enable-warnings test: turn on gcc compiler warnings
824 --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics
825 --disable-rpath-hack don't add rpath options for additional libraries
826
827 Some influential environment variables:
828 CC C compiler command
829 CFLAGS C compiler flags
830 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
831 nonstandard directory <lib dir>
832 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
833 headers in a nonstandard directory <include dir>
834 CPP C preprocessor
835
836 Use these variables to override the choices made by `configure' or to help
837 it to find libraries and programs with nonstandard names/locations.
838
839 EOF
840 fi
841
842 if test "$ac_init_help" = "recursive"; then
843 # If there are subdirs, report their specific --help.
844 ac_popdir=`pwd`
845 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
846 cd "$ac_subdir"
847 # A "../" for each directory in /$ac_subdir.
848 ac_dots=`echo "$ac_subdir" |
849 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
850
851 case "$srcdir" in
852 .) # No --srcdir option. We are building in place.
853 ac_sub_srcdir="$srcdir" ;;
854 [\\/]* | ?:[\\/]* ) # Absolute path.
855 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
856 *) # Relative path.
857 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
858 esac
859
860 # Check for guested configure; otherwise get Cygnus style configure.
861 if test -f "$ac_sub_srcdir/configure.gnu"; then
862 echo
863 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
864 elif test -f "$ac_sub_srcdir/configure"; then
865 echo
866 $SHELL "$ac_sub_srcdir/configure" --help=recursive
867 elif test -f "$ac_sub_srcdir/configure.ac" ||
868 test -f "$ac_sub_srcdir/configure.in"; then
869 echo
870 "$ac_configure" --help
871 else
872 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
873 fi
874 cd "$ac_popdir"
875 done
876 fi
877
878 test -n "$ac_init_help" && exit 0
879 if "$ac_init_version"; then
880 cat <<\EOF
881
882 Copyright 2003-2022,2023 Thomas E. Dickey
883 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
884 Free Software Foundation, Inc.
885 This configure script is free software; the Free Software Foundation
886 gives unlimited permission to copy, distribute and modify it.
887 EOF
888 exit 0
889 fi
890 exec 5>config.log
891 cat >&5 <<EOF
892 This file contains any messages produced by compilers while
893 running configure, to aid debugging if configure makes a mistake.
894
895 It was created by $as_me, which was
896 generated by GNU Autoconf 2.52.20230114. Invocation command line was
897
898 $ $0 $@
899
900 EOF
901 {
902 cat <<_ASUNAME
903 ## ---------- ##
904 ## Platform. ##
905 ## ---------- ##
906
907 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
908 uname -m = `(uname -m) 2>/dev/null || echo unknown`
909 uname -r = `(uname -r) 2>/dev/null || echo unknown`
910 uname -s = `(uname -s) 2>/dev/null || echo unknown`
911 uname -v = `(uname -v) 2>/dev/null || echo unknown`
912
913 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
914 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
915
916 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
917 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
918 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
919 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
920 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
921 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
922 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
923
924 PATH = $PATH
925
926 _ASUNAME
927 } >&5
928
929 cat >&5 <<EOF
930 ## ------------ ##
931 ## Core tests. ##
932 ## ------------ ##
933
934 EOF
935
936 # Keep a trace of the command line.
937 # Strip out --no-create and --no-recursion so they do not pile up.
938 # Also quote any args containing shell meta-characters.
939 ac_configure_args=
940 ac_sep=
941 for ac_arg
942 do
943 case "$ac_arg" in
944 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
945 | --no-cr | --no-c) ;;
946 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
947 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
948 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
949 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
950 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
951 ac_sep=" " ;;
952 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
953 ac_sep=" " ;;
954 esac
955 # Get rid of the leading space.
956 done
957
958 # When interrupted or exit'd, cleanup temporary files, and complete
959 # config.log. We remove comments because anyway the quotes in there
960 # would cause problems or look ugly.
961 trap 'exit_status=$?
962 # Save into config.log some information that might help in debugging.
963 echo >&5
964 echo "## ----------------- ##" >&5
965 echo "## Cache variables. ##" >&5
966 echo "## ----------------- ##" >&5
967 echo >&5
968 # The following way of writing the cache mishandles newlines in values,
969 {
970 (set) 2>&1 |
971 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
972 *ac_space=\ *)
973 sed -n \
974 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
975 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
976 ;;
977 *)
978 sed -n \
979 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
980 ;;
981 esac;
982 } >&5
983 sed "/^$/d" confdefs.h >conftest.log
984 if test -s conftest.log; then
985 echo >&5
986 echo "## ------------ ##" >&5
987 echo "## confdefs.h. ##" >&5
988 echo "## ------------ ##" >&5
989 echo >&5
990 cat conftest.log >&5
991 fi
992 (echo; echo) >&5
993 test "$ac_signal" != 0 &&
994 echo "$as_me: caught signal $ac_signal" >&5
995 echo "$as_me: exit $exit_status" >&5
996 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
997 exit $exit_status
998 ' 0
999 for ac_signal in 1 2 13 15; do
1000 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1001 done
1002 ac_signal=0
1003
1004 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1005 rm -rf conftest* confdefs.h
1006 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1007 echo >confdefs.h
1008
1009 # Let the site file select an alternate cache file if it wants to.
1010 # Prefer explicitly selected file to automatically selected ones.
1011 if test -z "$CONFIG_SITE"; then
1012 if test "x$prefix" != xNONE; then
1013 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1014 else
1015 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1016 fi
1017 fi
1018 for ac_site_file in $CONFIG_SITE; do
1019 if test -r "$ac_site_file"; then
1020 { echo "$as_me:1020: loading site script $ac_site_file" >&5
1021 echo "$as_me: loading site script $ac_site_file" >&6;}
1022 cat "$ac_site_file" >&5
1023 . "$ac_site_file"
1024 fi
1025 done
1026
1027 if test -r "$cache_file"; then
1028 # Some versions of bash will fail to source /dev/null (special
1029 # files actually), so we avoid doing that.
1030 if test -f "$cache_file"; then
1031 { echo "$as_me:1031: loading cache $cache_file" >&5
1032 echo "$as_me: loading cache $cache_file" >&6;}
1033 case $cache_file in
1034 [\\/]* | ?:[\\/]* ) . $cache_file;;
1035 *) . ./$cache_file;;
1036 esac
1037 fi
1038 else
1039 { echo "$as_me:1039: creating cache $cache_file" >&5
1040 echo "$as_me: creating cache $cache_file" >&6;}
1041 >$cache_file
1042 fi
1043
1044 # Check that the precious variables saved in the cache have kept the same
1045 # value.
1046 ac_cache_corrupted=false
1047 for ac_var in `(set) 2>&1 |
1048 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1049 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1050 eval ac_new_set=\$ac_env_${ac_var}_set
1051 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1052 eval ac_new_val="\$ac_env_${ac_var}_value"
1053 case "$ac_old_set,$ac_new_set" in
1054 set,)
1055 { echo "$as_me:1055: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1056 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1057 ac_cache_corrupted=: ;;
1058 ,set)
1059 { echo "$as_me:1059: error: \`$ac_var' was not set in the previous run" >&5
1060 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1061 ac_cache_corrupted=: ;;
1062 ,);;
1063 *)
1064 if test "x$ac_old_val" != "x$ac_new_val"; then
1065 { echo "$as_me:1065: error: \`$ac_var' has changed since the previous run:" >&5
1066 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1067 { echo "$as_me:1067: former value: $ac_old_val" >&5
1068 echo "$as_me: former value: $ac_old_val" >&2;}
1069 { echo "$as_me:1069: current value: $ac_new_val" >&5
1070 echo "$as_me: current value: $ac_new_val" >&2;}
1071 ac_cache_corrupted=:
1072 fi;;
1073 esac
1074 # Pass precious variables to config.status. It doesn't matter if
1075 # we pass some twice (in addition to the command line arguments).
1076 if test "$ac_new_set" = set; then
1077 case "$ac_new_val" in
1078 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1079 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1080 ac_configure_args="$ac_configure_args '$ac_arg'"
1081 ;;
1082 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1083 ;;
1084 esac
1085 fi
1086 done
1087 if "$ac_cache_corrupted"; then
1088 { echo "$as_me:1088: error: changes in the environment can compromise the build" >&5
1089 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1090 { { echo "$as_me:1090: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1091 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1092 { (exit 1); exit 1; }; }
1093 fi
1094
1095 ac_ext=c
1096 ac_cpp='$CPP $CPPFLAGS'
1097 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1098 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1099 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1100 ac_main_return="return"
1101
1102 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1103 *c*,-n*) ECHO_N=
1104 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1105 ECHO_T=' '
1106 ;;
1107 *c*,* ) ECHO_N=-n
1108 ECHO_C=
1109 ECHO_T=
1110 ;;
1111 *) ECHO_N=
1112 ECHO_C='\c'
1113 ECHO_T=
1114 ;;
1115 esac
1116 echo "#! $SHELL" >conftest.sh
1117 echo "exit 0" >>conftest.sh
1118 chmod +x conftest.sh
1119 if { (echo "$as_me:1119: PATH=\".;.\"; conftest.sh") >&5
1120 (PATH=".;."; conftest.sh) 2>&5
1121 ac_status=$?
1122 echo "$as_me:1122: \$? = $ac_status" >&5
1123 (exit "$ac_status"); }; then
1124 ac_path_separator=';'
1125 else
1126 ac_path_separator=:
1127 fi
1128 PATH_SEPARATOR="$ac_path_separator"
1129 rm -f conftest.sh
1130
1131 ac_config_headers="$ac_config_headers xtermcfg.h:xtermcfg.hin"
1132
1133 ac_aux_dir=
1134 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1135 if test -f "$ac_dir/install-sh"; then
1136 ac_aux_dir=$ac_dir
1137 ac_install_sh="$ac_aux_dir/install-sh -c"
1138 break
1139 elif test -f "$ac_dir/install.sh"; then
1140 ac_aux_dir=$ac_dir
1141 ac_install_sh="$ac_aux_dir/install.sh -c"
1142 break
1143 elif test -f "$ac_dir/shtool"; then
1144 ac_aux_dir=$ac_dir
1145 ac_install_sh="$ac_aux_dir/shtool install -c"
1146 break
1147 fi
1148 done
1149 if test -z "$ac_aux_dir"; then
1150 { { echo "$as_me:1150: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1151 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1152 { (exit 1); exit 1; }; }
1153 fi
1154 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1155 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1156 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1157
1158 # Make sure we can run config.sub.
1159 $ac_config_sub sun4 >/dev/null 2>&1 ||
1160 { { echo "$as_me:1160: error: cannot run $ac_config_sub" >&5
1161 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1162 { (exit 1); exit 1; }; }
1163
1164 echo "$as_me:1164: checking build system type" >&5
1165 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1166 if test "${ac_cv_build+set}" = set; then
1167 echo $ECHO_N "(cached) $ECHO_C" >&6
1168 else
1169 ac_cv_build_alias=$build_alias
1170 test -z "$ac_cv_build_alias" &&
1171 ac_cv_build_alias=`$ac_config_guess`
1172 test -z "$ac_cv_build_alias" &&
1173 { { echo "$as_me:1173: error: cannot guess build type; you must specify one" >&5
1174 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1175 { (exit 1); exit 1; }; }
1176 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1177 { { echo "$as_me:1177: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1178 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1179 { (exit 1); exit 1; }; }
1180
1181 fi
1182 echo "$as_me:1182: result: $ac_cv_build" >&5
1183 echo "${ECHO_T}$ac_cv_build" >&6
1184 build=$ac_cv_build
1185 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1186 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1187 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1188
1189 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1190 echo "$as_me:1190: checking host system type" >&5
1191 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1192 if test "${ac_cv_host+set}" = set; then
1193 echo $ECHO_N "(cached) $ECHO_C" >&6
1194 else
1195 ac_cv_host_alias=$host_alias
1196 test -z "$ac_cv_host_alias" &&
1197 ac_cv_host_alias=$ac_cv_build_alias
1198 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1199 { { echo "$as_me:1199: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1200 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1201 { (exit 1); exit 1; }; }
1202
1203 fi
1204 echo "$as_me:1204: result: $ac_cv_host" >&5
1205 echo "${ECHO_T}$ac_cv_host" >&6
1206 host=$ac_cv_host
1207 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1208 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1209 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1210
1211 system_name="$host_os"
1212 else
1213 system_name="`(uname -s -r) 2>/dev/null`"
1214 if test -z "$system_name" ; then
1215 system_name="`(hostname) 2>/dev/null`"
1216 fi
1217 fi
1218 test -n "$system_name" &&
1219 cat >>confdefs.h <<EOF
1220 #define SYSTEM_NAME "$system_name"
1221 EOF
1222
1223 if test "${cf_cv_system_name+set}" = set; then
1224 echo $ECHO_N "(cached) $ECHO_C" >&6
1225 else
1226 cf_cv_system_name="$system_name"
1227 fi
1228
1229 test -z "$system_name" && system_name="$cf_cv_system_name"
1230 test -n "$cf_cv_system_name" && echo "$as_me:1230: result: Configuring for $cf_cv_system_name" >&5
1231 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1232
1233 if test ".$system_name" != ".$cf_cv_system_name" ; then
1234 echo "$as_me:1234: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1235 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1236 { { echo "$as_me:1236: error: \"Please remove config.cache and try again.\"" >&5
1237 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1238 { (exit 1); exit 1; }; }
1239 fi
1240
1241 ### checks for alternative programs
1242
1243 case "$host_os" in
1244 (openedition) : "${CFLAGS=\"-O2 -Wc,dll -Wl,EDIT=NO\"}"
1245 : "${CPPFLAGS=\"-D_ALL_SOURCE\"}"
1246 : "${LIBS=\"/usr/lib/Xaw.x /usr/lib/SM.x /usr/lib/ICE.x /usr/lib/X11.x\"}"
1247 : "${CC=c89}";;
1248 (darwin*)
1249 : "${LDFLAGS}=\"${LDFLAGS} -Wl,-bind_at_load\"";;
1250 esac
1251
1252 ac_ext=c
1253 ac_cpp='$CPP $CPPFLAGS'
1254 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1255 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1256 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1257 ac_main_return="return"
1258 if test -n "$ac_tool_prefix"; then
1259 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1260 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1261 echo "$as_me:1261: checking for $ac_word" >&5
1262 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1263 if test "${ac_cv_prog_CC+set}" = set; then
1264 echo $ECHO_N "(cached) $ECHO_C" >&6
1265 else
1266 if test -n "$CC"; then
1267 ac_cv_prog_CC="$CC" # Let the user override the test.
1268 else
1269 ac_save_IFS=$IFS; IFS=$ac_path_separator
1270 ac_dummy="$PATH"
1271 for ac_dir in $ac_dummy; do
1272 IFS=$ac_save_IFS
1273 test -z "$ac_dir" && ac_dir=.
1274 $as_executable_p "$ac_dir/$ac_word" || continue
1275 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1276 echo "$as_me:1276: found $ac_dir/$ac_word" >&5
1277 break
1278 done
1279
1280 fi
1281 fi
1282 CC=$ac_cv_prog_CC
1283 if test -n "$CC"; then
1284 echo "$as_me:1284: result: $CC" >&5
1285 echo "${ECHO_T}$CC" >&6
1286 else
1287 echo "$as_me:1287: result: no" >&5
1288 echo "${ECHO_T}no" >&6
1289 fi
1290
1291 fi
1292 if test -z "$ac_cv_prog_CC"; then
1293 ac_ct_CC=$CC
1294 # Extract the first word of "gcc", so it can be a program name with args.
1295 set dummy gcc; ac_word=$2
1296 echo "$as_me:1296: checking for $ac_word" >&5
1297 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1298 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1299 echo $ECHO_N "(cached) $ECHO_C" >&6
1300 else
1301 if test -n "$ac_ct_CC"; then
1302 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1303 else
1304 ac_save_IFS=$IFS; IFS=$ac_path_separator
1305 ac_dummy="$PATH"
1306 for ac_dir in $ac_dummy; do
1307 IFS=$ac_save_IFS
1308 test -z "$ac_dir" && ac_dir=.
1309 $as_executable_p "$ac_dir/$ac_word" || continue
1310 ac_cv_prog_ac_ct_CC="gcc"
1311 echo "$as_me:1311: found $ac_dir/$ac_word" >&5
1312 break
1313 done
1314
1315 fi
1316 fi
1317 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1318 if test -n "$ac_ct_CC"; then
1319 echo "$as_me:1319: result: $ac_ct_CC" >&5
1320 echo "${ECHO_T}$ac_ct_CC" >&6
1321 else
1322 echo "$as_me:1322: result: no" >&5
1323 echo "${ECHO_T}no" >&6
1324 fi
1325
1326 CC=$ac_ct_CC
1327 else
1328 CC="$ac_cv_prog_CC"
1329 fi
1330
1331 if test -z "$CC"; then
1332 if test -n "$ac_tool_prefix"; then
1333 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1334 set dummy ${ac_tool_prefix}cc; ac_word=$2
1335 echo "$as_me:1335: checking for $ac_word" >&5
1336 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1337 if test "${ac_cv_prog_CC+set}" = set; then
1338 echo $ECHO_N "(cached) $ECHO_C" >&6
1339 else
1340 if test -n "$CC"; then
1341 ac_cv_prog_CC="$CC" # Let the user override the test.
1342 else
1343 ac_save_IFS=$IFS; IFS=$ac_path_separator
1344 ac_dummy="$PATH"
1345 for ac_dir in $ac_dummy; do
1346 IFS=$ac_save_IFS
1347 test -z "$ac_dir" && ac_dir=.
1348 $as_executable_p "$ac_dir/$ac_word" || continue
1349 ac_cv_prog_CC="${ac_tool_prefix}cc"
1350 echo "$as_me:1350: found $ac_dir/$ac_word" >&5
1351 break
1352 done
1353
1354 fi
1355 fi
1356 CC=$ac_cv_prog_CC
1357 if test -n "$CC"; then
1358 echo "$as_me:1358: result: $CC" >&5
1359 echo "${ECHO_T}$CC" >&6
1360 else
1361 echo "$as_me:1361: result: no" >&5
1362 echo "${ECHO_T}no" >&6
1363 fi
1364
1365 fi
1366 if test -z "$ac_cv_prog_CC"; then
1367 ac_ct_CC=$CC
1368 # Extract the first word of "cc", so it can be a program name with args.
1369 set dummy cc; ac_word=$2
1370 echo "$as_me:1370: checking for $ac_word" >&5
1371 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1372 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1373 echo $ECHO_N "(cached) $ECHO_C" >&6
1374 else
1375 if test -n "$ac_ct_CC"; then
1376 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1377 else
1378 ac_save_IFS=$IFS; IFS=$ac_path_separator
1379 ac_dummy="$PATH"
1380 for ac_dir in $ac_dummy; do
1381 IFS=$ac_save_IFS
1382 test -z "$ac_dir" && ac_dir=.
1383 $as_executable_p "$ac_dir/$ac_word" || continue
1384 ac_cv_prog_ac_ct_CC="cc"
1385 echo "$as_me:1385: found $ac_dir/$ac_word" >&5
1386 break
1387 done
1388
1389 fi
1390 fi
1391 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1392 if test -n "$ac_ct_CC"; then
1393 echo "$as_me:1393: result: $ac_ct_CC" >&5
1394 echo "${ECHO_T}$ac_ct_CC" >&6
1395 else
1396 echo "$as_me:1396: result: no" >&5
1397 echo "${ECHO_T}no" >&6
1398 fi
1399
1400 CC=$ac_ct_CC
1401 else
1402 CC="$ac_cv_prog_CC"
1403 fi
1404
1405 fi
1406 if test -z "$CC"; then
1407 # Extract the first word of "cc", so it can be a program name with args.
1408 set dummy cc; ac_word=$2
1409 echo "$as_me:1409: checking for $ac_word" >&5
1410 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1411 if test "${ac_cv_prog_CC+set}" = set; then
1412 echo $ECHO_N "(cached) $ECHO_C" >&6
1413 else
1414 if test -n "$CC"; then
1415 ac_cv_prog_CC="$CC" # Let the user override the test.
1416 else
1417 ac_prog_rejected=no
1418 ac_save_IFS=$IFS; IFS=$ac_path_separator
1419 ac_dummy="$PATH"
1420 for ac_dir in $ac_dummy; do
1421 IFS=$ac_save_IFS
1422 test -z "$ac_dir" && ac_dir=.
1423 $as_executable_p "$ac_dir/$ac_word" || continue
1424 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1425 ac_prog_rejected=yes
1426 continue
1427 fi
1428 ac_cv_prog_CC="cc"
1429 echo "$as_me:1429: found $ac_dir/$ac_word" >&5
1430 break
1431 done
1432
1433 if test "$ac_prog_rejected" = yes; then
1434 # We found a bogon in the path, so make sure we never use it.
1435 set dummy $ac_cv_prog_CC
1436 shift
1437 if test $# != 0; then
1438 # We chose a different compiler from the bogus one.
1439 # However, it has the same basename, so the bogon will be chosen
1440 # first if we set CC to just the basename; use the full file name.
1441 shift
1442 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1443 shift
1444 ac_cv_prog_CC="$@"
1445 fi
1446 fi
1447 fi
1448 fi
1449 CC=$ac_cv_prog_CC
1450 if test -n "$CC"; then
1451 echo "$as_me:1451: result: $CC" >&5
1452 echo "${ECHO_T}$CC" >&6
1453 else
1454 echo "$as_me:1454: result: no" >&5
1455 echo "${ECHO_T}no" >&6
1456 fi
1457
1458 fi
1459 if test -z "$CC"; then
1460 if test -n "$ac_tool_prefix"; then
1461 for ac_prog in cl
1462 do
1463 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1464 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1465 echo "$as_me:1465: checking for $ac_word" >&5
1466 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1467 if test "${ac_cv_prog_CC+set}" = set; then
1468 echo $ECHO_N "(cached) $ECHO_C" >&6
1469 else
1470 if test -n "$CC"; then
1471 ac_cv_prog_CC="$CC" # Let the user override the test.
1472 else
1473 ac_save_IFS=$IFS; IFS=$ac_path_separator
1474 ac_dummy="$PATH"
1475 for ac_dir in $ac_dummy; do
1476 IFS=$ac_save_IFS
1477 test -z "$ac_dir" && ac_dir=.
1478 $as_executable_p "$ac_dir/$ac_word" || continue
1479 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1480 echo "$as_me:1480: found $ac_dir/$ac_word" >&5
1481 break
1482 done
1483
1484 fi
1485 fi
1486 CC=$ac_cv_prog_CC
1487 if test -n "$CC"; then
1488 echo "$as_me:1488: result: $CC" >&5
1489 echo "${ECHO_T}$CC" >&6
1490 else
1491 echo "$as_me:1491: result: no" >&5
1492 echo "${ECHO_T}no" >&6
1493 fi
1494
1495 test -n "$CC" && break
1496 done
1497 fi
1498 if test -z "$CC"; then
1499 ac_ct_CC=$CC
1500 for ac_prog in cl
1501 do
1502 # Extract the first word of "$ac_prog", so it can be a program name with args.
1503 set dummy $ac_prog; ac_word=$2
1504 echo "$as_me:1504: checking for $ac_word" >&5
1505 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1506 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1507 echo $ECHO_N "(cached) $ECHO_C" >&6
1508 else
1509 if test -n "$ac_ct_CC"; then
1510 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1511 else
1512 ac_save_IFS=$IFS; IFS=$ac_path_separator
1513 ac_dummy="$PATH"
1514 for ac_dir in $ac_dummy; do
1515 IFS=$ac_save_IFS
1516 test -z "$ac_dir" && ac_dir=.
1517 $as_executable_p "$ac_dir/$ac_word" || continue
1518 ac_cv_prog_ac_ct_CC="$ac_prog"
1519 echo "$as_me:1519: found $ac_dir/$ac_word" >&5
1520 break
1521 done
1522
1523 fi
1524 fi
1525 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1526 if test -n "$ac_ct_CC"; then
1527 echo "$as_me:1527: result: $ac_ct_CC" >&5
1528 echo "${ECHO_T}$ac_ct_CC" >&6
1529 else
1530 echo "$as_me:1530: result: no" >&5
1531 echo "${ECHO_T}no" >&6
1532 fi
1533
1534 test -n "$ac_ct_CC" && break
1535 done
1536
1537 CC=$ac_ct_CC
1538 fi
1539
1540 fi
1541
1542 test -z "$CC" && { { echo "$as_me:1542: error: no acceptable cc found in \$PATH" >&5
1543 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1544 { (exit 1); exit 1; }; }
1545
1546 # Provide some information about the compiler.
1547 echo "$as_me:1547:" \
1548 "checking for C compiler version" >&5
1549 ac_compiler=`set X $ac_compile; echo "$2"`
1550 { (eval echo "$as_me:1550: \"$ac_compiler --version </dev/null >&5\"") >&5
1551 (eval $ac_compiler --version </dev/null >&5) 2>&5
1552 ac_status=$?
1553 echo "$as_me:1553: \$? = $ac_status" >&5
1554 (exit "$ac_status"); }
1555 { (eval echo "$as_me:1555: \"$ac_compiler -v </dev/null >&5\"") >&5
1556 (eval $ac_compiler -v </dev/null >&5) 2>&5
1557 ac_status=$?
1558 echo "$as_me:1558: \$? = $ac_status" >&5
1559 (exit "$ac_status"); }
1560 { (eval echo "$as_me:1560: \"$ac_compiler -V </dev/null >&5\"") >&5
1561 (eval $ac_compiler -V </dev/null >&5) 2>&5
1562 ac_status=$?
1563 echo "$as_me:1563: \$? = $ac_status" >&5
1564 (exit "$ac_status"); }
1565
1566 cat >"conftest.$ac_ext" <<_ACEOF
1567 #line 1567 "configure"
1568 #include "confdefs.h"
1569
1570 int
1571 main (void)
1572 {
1573
1574 ;
1575 return 0;
1576 }
1577 _ACEOF
1578 ac_clean_files_save=$ac_clean_files
1579 ac_clean_files="$ac_clean_files a.out a.exe"
1580 # Try to create an executable without -o first, disregard a.out.
1581 # It will help us diagnose broken compilers, and finding out an intuition
1582 # of exeext.
1583 echo "$as_me:1583: checking for C compiler default output" >&5
1584 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1585 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1586 if { (eval echo "$as_me:1586: \"$ac_link_default\"") >&5
1587 (eval $ac_link_default) 2>&5
1588 ac_status=$?
1589 echo "$as_me:1589: \$? = $ac_status" >&5
1590 (exit "$ac_status"); }; then
1591 # Find the output, starting from the most likely. This scheme is
1592 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1593 # resort.
1594 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1595 ls a.out conftest 2>/dev/null;
1596 ls a.* conftest.* 2>/dev/null`; do
1597 case $ac_file in
1598 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1599 a.out ) # We found the default executable, but exeext='' is most
1600 # certainly right.
1601 break;;
1602 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1603 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1604 export ac_cv_exeext
1605 break;;
1606 * ) break;;
1607 esac
1608 done
1609 else
1610 echo "$as_me: failed program was:" >&5
1611 cat "conftest.$ac_ext" >&5
1612 { { echo "$as_me:1612: error: C compiler cannot create executables" >&5
1613 echo "$as_me: error: C compiler cannot create executables" >&2;}
1614 { (exit 77); exit 77; }; }
1615 fi
1616
1617 ac_exeext=$ac_cv_exeext
1618 echo "$as_me:1618: result: $ac_file" >&5
1619 echo "${ECHO_T}$ac_file" >&6
1620
1621 # Check the compiler produces executables we can run. If not, either
1622 # the compiler is broken, or we cross compile.
1623 echo "$as_me:1623: checking whether the C compiler works" >&5
1624 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1625 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1626 # If not cross compiling, check that we can run a simple program.
1627 if test "$cross_compiling" != yes; then
1628 if { ac_try='./$ac_file'
1629 { (eval echo "$as_me:1629: \"$ac_try\"") >&5
1630 (eval $ac_try) 2>&5
1631 ac_status=$?
1632 echo "$as_me:1632: \$? = $ac_status" >&5
1633 (exit "$ac_status"); }; }; then
1634 cross_compiling=no
1635 else
1636 if test "$cross_compiling" = maybe; then
1637 cross_compiling=yes
1638 else
1639 { { echo "$as_me:1639: error: cannot run C compiled programs.
1640 If you meant to cross compile, use \`--host'." >&5
1641 echo "$as_me: error: cannot run C compiled programs.
1642 If you meant to cross compile, use \`--host'." >&2;}
1643 { (exit 1); exit 1; }; }
1644 fi
1645 fi
1646 fi
1647 echo "$as_me:1647: result: yes" >&5
1648 echo "${ECHO_T}yes" >&6
1649
1650 rm -f a.out a.exe "conftest$ac_cv_exeext"
1651 ac_clean_files=$ac_clean_files_save
1652 # Check the compiler produces executables we can run. If not, either
1653 # the compiler is broken, or we cross compile.
1654 echo "$as_me:1654: checking whether we are cross compiling" >&5
1655 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1656 echo "$as_me:1656: result: $cross_compiling" >&5
1657 echo "${ECHO_T}$cross_compiling" >&6
1658
1659 echo "$as_me:1659: checking for executable suffix" >&5
1660 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1661 if { (eval echo "$as_me:1661: \"$ac_link\"") >&5
1662 (eval $ac_link) 2>&5
1663 ac_status=$?
1664 echo "$as_me:1664: \$? = $ac_status" >&5
1665 (exit "$ac_status"); }; then
1666 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1667 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1668 # work properly (i.e., refer to `conftest.exe'), while it won't with
1669 # `rm'.
1670 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1671 case $ac_file in
1672 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1673 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1674 export ac_cv_exeext
1675 break;;
1676 * ) break;;
1677 esac
1678 done
1679 else
1680 { { echo "$as_me:1680: error: cannot compute EXEEXT: cannot compile and link" >&5
1681 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1682 { (exit 1); exit 1; }; }
1683 fi
1684
1685 rm -f "conftest$ac_cv_exeext"
1686 echo "$as_me:1686: result: $ac_cv_exeext" >&5
1687 echo "${ECHO_T}$ac_cv_exeext" >&6
1688
1689 rm -f "conftest.$ac_ext"
1690 EXEEXT=$ac_cv_exeext
1691 ac_exeext=$EXEEXT
1692 echo "$as_me:1692: checking for object suffix" >&5
1693 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1694 if test "${ac_cv_objext+set}" = set; then
1695 echo $ECHO_N "(cached) $ECHO_C" >&6
1696 else
1697 cat >"conftest.$ac_ext" <<_ACEOF
1698 #line 1698 "configure"
1699 #include "confdefs.h"
1700
1701 int
1702 main (void)
1703 {
1704
1705 ;
1706 return 0;
1707 }
1708 _ACEOF
1709 rm -f conftest.o conftest.obj
1710 if { (eval echo "$as_me:1710: \"$ac_compile\"") >&5
1711 (eval $ac_compile) 2>&5
1712 ac_status=$?
1713 echo "$as_me:1713: \$? = $ac_status" >&5
1714 (exit "$ac_status"); }; then
1715 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1716 case $ac_file in
1717 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1718 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1719 break;;
1720 esac
1721 done
1722 else
1723 echo "$as_me: failed program was:" >&5
1724 cat "conftest.$ac_ext" >&5
1725 { { echo "$as_me:1725: error: cannot compute OBJEXT: cannot compile" >&5
1726 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1727 { (exit 1); exit 1; }; }
1728 fi
1729
1730 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1731 fi
1732 echo "$as_me:1732: result: $ac_cv_objext" >&5
1733 echo "${ECHO_T}$ac_cv_objext" >&6
1734 OBJEXT=$ac_cv_objext
1735 ac_objext=$OBJEXT
1736 echo "$as_me:1736: checking whether we are using the GNU C compiler" >&5
1737 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1738 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1739 echo $ECHO_N "(cached) $ECHO_C" >&6
1740 else
1741 cat >"conftest.$ac_ext" <<_ACEOF
1742 #line 1742 "configure"
1743 #include "confdefs.h"
1744
1745 int
1746 main (void)
1747 {
1748 #ifndef __GNUC__
1749 choke me
1750 #endif
1751
1752 ;
1753 return 0;
1754 }
1755 _ACEOF
1756 rm -f "conftest.$ac_objext"
1757 if { (eval echo "$as_me:1757: \"$ac_compile\"") >&5
1758 (eval $ac_compile) 2>&5
1759 ac_status=$?
1760 echo "$as_me:1760: \$? = $ac_status" >&5
1761 (exit "$ac_status"); } &&
1762 { ac_try='test -s "conftest.$ac_objext"'
1763 { (eval echo "$as_me:1763: \"$ac_try\"") >&5
1764 (eval $ac_try) 2>&5
1765 ac_status=$?
1766 echo "$as_me:1766: \$? = $ac_status" >&5
1767 (exit "$ac_status"); }; }; then
1768 ac_compiler_gnu=yes
1769 else
1770 echo "$as_me: failed program was:" >&5
1771 cat "conftest.$ac_ext" >&5
1772 ac_compiler_gnu=no
1773 fi
1774 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1775 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1776
1777 fi
1778 echo "$as_me:1778: result: $ac_cv_c_compiler_gnu" >&5
1779 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1780 GCC=`test $ac_compiler_gnu = yes && echo yes`
1781 ac_test_CFLAGS=${CFLAGS+set}
1782 ac_save_CFLAGS=$CFLAGS
1783 CFLAGS="-g"
1784 echo "$as_me:1784: checking whether $CC accepts -g" >&5
1785 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1786 if test "${ac_cv_prog_cc_g+set}" = set; then
1787 echo $ECHO_N "(cached) $ECHO_C" >&6
1788 else
1789 cat >"conftest.$ac_ext" <<_ACEOF
1790 #line 1790 "configure"
1791 #include "confdefs.h"
1792
1793 int
1794 main (void)
1795 {
1796
1797 ;
1798 return 0;
1799 }
1800 _ACEOF
1801 rm -f "conftest.$ac_objext"
1802 if { (eval echo "$as_me:1802: \"$ac_compile\"") >&5
1803 (eval $ac_compile) 2>&5
1804 ac_status=$?
1805 echo "$as_me:1805: \$? = $ac_status" >&5
1806 (exit "$ac_status"); } &&
1807 { ac_try='test -s "conftest.$ac_objext"'
1808 { (eval echo "$as_me:1808: \"$ac_try\"") >&5
1809 (eval $ac_try) 2>&5
1810 ac_status=$?
1811 echo "$as_me:1811: \$? = $ac_status" >&5
1812 (exit "$ac_status"); }; }; then
1813 ac_cv_prog_cc_g=yes
1814 else
1815 echo "$as_me: failed program was:" >&5
1816 cat "conftest.$ac_ext" >&5
1817 ac_cv_prog_cc_g=no
1818 fi
1819 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1820 fi
1821 echo "$as_me:1821: result: $ac_cv_prog_cc_g" >&5
1822 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1823 if test "$ac_test_CFLAGS" = set; then
1824 CFLAGS=$ac_save_CFLAGS
1825 elif test $ac_cv_prog_cc_g = yes; then
1826 if test "$GCC" = yes; then
1827 CFLAGS="-g -O2"
1828 else
1829 CFLAGS="-g"
1830 fi
1831 else
1832 if test "$GCC" = yes; then
1833 CFLAGS="-O2"
1834 else
1835 CFLAGS=
1836 fi
1837 fi
1838 # Some people use a C++ compiler to compile C. Since we use `exit',
1839 # in C++ we need to declare it. In case someone uses the same compiler
1840 # for both compiling C and C++ we need to have the C++ compiler decide
1841 # the declaration of exit, since it's the most demanding environment.
1842 cat >"conftest.$ac_ext" <<_ACEOF
1843 #ifndef __cplusplus
1844 choke me
1845 #endif
1846 _ACEOF
1847 rm -f "conftest.$ac_objext"
1848 if { (eval echo "$as_me:1848: \"$ac_compile\"") >&5
1849 (eval $ac_compile) 2>&5
1850 ac_status=$?
1851 echo "$as_me:1851: \$? = $ac_status" >&5
1852 (exit "$ac_status"); } &&
1853 { ac_try='test -s "conftest.$ac_objext"'
1854 { (eval echo "$as_me:1854: \"$ac_try\"") >&5
1855 (eval $ac_try) 2>&5
1856 ac_status=$?
1857 echo "$as_me:1857: \$? = $ac_status" >&5
1858 (exit "$ac_status"); }; }; then
1859 for ac_declaration in \
1860 ''\
1861 '#include <stdlib.h>' \
1862 'extern "C" void std::exit (int) throw (); using std::exit;' \
1863 'extern "C" void std::exit (int); using std::exit;' \
1864 'extern "C" void exit (int) throw ();' \
1865 'extern "C" void exit (int);' \
1866 'void exit (int);'
1867 do
1868 cat >"conftest.$ac_ext" <<_ACEOF
1869 #line 1869 "configure"
1870 #include "confdefs.h"
1871 #include <stdlib.h>
1872 $ac_declaration
1873 int
1874 main (void)
1875 {
1876 exit (42);
1877 ;
1878 return 0;
1879 }
1880 _ACEOF
1881 rm -f "conftest.$ac_objext"
1882 if { (eval echo "$as_me:1882: \"$ac_compile\"") >&5
1883 (eval $ac_compile) 2>&5
1884 ac_status=$?
1885 echo "$as_me:1885: \$? = $ac_status" >&5
1886 (exit "$ac_status"); } &&
1887 { ac_try='test -s "conftest.$ac_objext"'
1888 { (eval echo "$as_me:1888: \"$ac_try\"") >&5
1889 (eval $ac_try) 2>&5
1890 ac_status=$?
1891 echo "$as_me:1891: \$? = $ac_status" >&5
1892 (exit "$ac_status"); }; }; then
1893 :
1894 else
1895 echo "$as_me: failed program was:" >&5
1896 cat "conftest.$ac_ext" >&5
1897 continue
1898 fi
1899 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1900 cat >"conftest.$ac_ext" <<_ACEOF
1901 #line 1901 "configure"
1902 #include "confdefs.h"
1903 $ac_declaration
1904 int
1905 main (void)
1906 {
1907 exit (42);
1908 ;
1909 return 0;
1910 }
1911 _ACEOF
1912 rm -f "conftest.$ac_objext"
1913 if { (eval echo "$as_me:1913: \"$ac_compile\"") >&5
1914 (eval $ac_compile) 2>&5
1915 ac_status=$?
1916 echo "$as_me:1916: \$? = $ac_status" >&5
1917 (exit "$ac_status"); } &&
1918 { ac_try='test -s "conftest.$ac_objext"'
1919 { (eval echo "$as_me:1919: \"$ac_try\"") >&5
1920 (eval $ac_try) 2>&5
1921 ac_status=$?
1922 echo "$as_me:1922: \$? = $ac_status" >&5
1923 (exit "$ac_status"); }; }; then
1924 break
1925 else
1926 echo "$as_me: failed program was:" >&5
1927 cat "conftest.$ac_ext" >&5
1928 fi
1929 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1930 done
1931 rm -rf conftest*
1932 if test -n "$ac_declaration"; then
1933 echo '#ifdef __cplusplus' >>confdefs.h
1934 echo "$ac_declaration" >>confdefs.h
1935 echo '#endif' >>confdefs.h
1936 fi
1937
1938 else
1939 echo "$as_me: failed program was:" >&5
1940 cat "conftest.$ac_ext" >&5
1941 fi
1942 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1943 ac_ext=c
1944 ac_cpp='$CPP $CPPFLAGS'
1945 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1946 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1947 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1948 ac_main_return="return"
1949
1950 GCC_VERSION=none
1951 if test "$GCC" = yes ; then
1952 echo "$as_me:1952: checking version of $CC" >&5
1953 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1954 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1955 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1956 echo "$as_me:1956: result: $GCC_VERSION" >&5
1957 echo "${ECHO_T}$GCC_VERSION" >&6
1958 fi
1959
1960 INTEL_COMPILER=no
1961
1962 if test "$GCC" = yes ; then
1963 case "$host_os" in
1964 (linux*|gnu*)
1965 echo "$as_me:1965: checking if this is really Intel C compiler" >&5
1966 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1967 cf_save_CFLAGS="$CFLAGS"
1968 CFLAGS="$CFLAGS -no-gcc"
1969 cat >"conftest.$ac_ext" <<_ACEOF
1970 #line 1970 "configure"
1971 #include "confdefs.h"
1972
1973 int
1974 main (void)
1975 {
1976
1977 #ifdef __INTEL_COMPILER
1978 #else
1979 #error __INTEL_COMPILER is not defined
1980 #endif
1981
1982 ;
1983 return 0;
1984 }
1985 _ACEOF
1986 rm -f "conftest.$ac_objext"
1987 if { (eval echo "$as_me:1987: \"$ac_compile\"") >&5
1988 (eval $ac_compile) 2>&5
1989 ac_status=$?
1990 echo "$as_me:1990: \$? = $ac_status" >&5
1991 (exit "$ac_status"); } &&
1992 { ac_try='test -s "conftest.$ac_objext"'
1993 { (eval echo "$as_me:1993: \"$ac_try\"") >&5
1994 (eval $ac_try) 2>&5
1995 ac_status=$?
1996 echo "$as_me:1996: \$? = $ac_status" >&5
1997 (exit "$ac_status"); }; }; then
1998 INTEL_COMPILER=yes
1999 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2000
2001 else
2002 echo "$as_me: failed program was:" >&5
2003 cat "conftest.$ac_ext" >&5
2004 fi
2005 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2006 CFLAGS="$cf_save_CFLAGS"
2007 echo "$as_me:2007: result: $INTEL_COMPILER" >&5
2008 echo "${ECHO_T}$INTEL_COMPILER" >&6
2009 ;;
2010 esac
2011 fi
2012
2013 CLANG_COMPILER=no
2014
2015 if test "$GCC" = yes ; then
2016 echo "$as_me:2016: checking if this is really Clang C compiler" >&5
2017 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2018 cf_save_CFLAGS="$CFLAGS"
2019 cat >"conftest.$ac_ext" <<_ACEOF
2020 #line 2020 "configure"
2021 #include "confdefs.h"
2022
2023 int
2024 main (void)
2025 {
2026
2027 #ifdef __clang__
2028 #else
2029 #error __clang__ is not defined
2030 #endif
2031
2032 ;
2033 return 0;
2034 }
2035 _ACEOF
2036 rm -f "conftest.$ac_objext"
2037 if { (eval echo "$as_me:2037: \"$ac_compile\"") >&5
2038 (eval $ac_compile) 2>&5
2039 ac_status=$?
2040 echo "$as_me:2040: \$? = $ac_status" >&5
2041 (exit "$ac_status"); } &&
2042 { ac_try='test -s "conftest.$ac_objext"'
2043 { (eval echo "$as_me:2043: \"$ac_try\"") >&5
2044 (eval $ac_try) 2>&5
2045 ac_status=$?
2046 echo "$as_me:2046: \$? = $ac_status" >&5
2047 (exit "$ac_status"); }; }; then
2048 CLANG_COMPILER=yes
2049
2050 else
2051 echo "$as_me: failed program was:" >&5
2052 cat "conftest.$ac_ext" >&5
2053 fi
2054 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2055 CFLAGS="$cf_save_CFLAGS"
2056 echo "$as_me:2056: result: $CLANG_COMPILER" >&5
2057 echo "${ECHO_T}$CLANG_COMPILER" >&6
2058 fi
2059
2060 CLANG_VERSION=none
2061
2062 if test "x$CLANG_COMPILER" = "xyes" ; then
2063 case "$CC" in
2064 (c[1-9][0-9]|*/c[1-9][0-9])
2065 { echo "$as_me:2065: WARNING: replacing broken compiler alias $CC" >&5
2066 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2067 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2068 CC=clang
2069 ;;
2070 esac
2071
2072 echo "$as_me:2072: checking version of $CC" >&5
2073 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2074 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.].*//'`"
2075 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2076 echo "$as_me:2076: result: $CLANG_VERSION" >&5
2077 echo "${ECHO_T}$CLANG_VERSION" >&6
2078
2079 for cf_clang_opt in \
2080 -Qunused-arguments \
2081 -Wno-error=implicit-function-declaration
2082 do
2083 echo "$as_me:2083: checking if option $cf_clang_opt works" >&5
2084 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2085 cf_save_CFLAGS="$CFLAGS"
2086 CFLAGS="$CFLAGS $cf_clang_opt"
2087 cat >"conftest.$ac_ext" <<_ACEOF
2088 #line 2088 "configure"
2089 #include "confdefs.h"
2090
2091 #include <stdio.h>
2092 int
2093 main (void)
2094 {
2095
2096 printf("hello!\\n");
2097 ;
2098 return 0;
2099 }
2100 _ACEOF
2101 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2102 if { (eval echo "$as_me:2102: \"$ac_link\"") >&5
2103 (eval $ac_link) 2>&5
2104 ac_status=$?
2105 echo "$as_me:2105: \$? = $ac_status" >&5
2106 (exit "$ac_status"); } &&
2107 { ac_try='test -s "conftest$ac_exeext"'
2108 { (eval echo "$as_me:2108: \"$ac_try\"") >&5
2109 (eval $ac_try) 2>&5
2110 ac_status=$?
2111 echo "$as_me:2111: \$? = $ac_status" >&5
2112 (exit "$ac_status"); }; }; then
2113
2114 cf_clang_optok=yes
2115 else
2116 echo "$as_me: failed program was:" >&5
2117 cat "conftest.$ac_ext" >&5
2118
2119 cf_clang_optok=no
2120 fi
2121 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2122 echo "$as_me:2122: result: $cf_clang_optok" >&5
2123 echo "${ECHO_T}$cf_clang_optok" >&6
2124 CFLAGS="$cf_save_CFLAGS"
2125 if test "$cf_clang_optok" = yes; then
2126 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2127
2128 echo "${as_me:-configure}:2128: testing adding option $cf_clang_opt ..." 1>&5
2129
2130 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2131 CFLAGS="${CFLAGS}$cf_clang_opt"
2132
2133 fi
2134 done
2135 fi
2136
2137 echo "$as_me:2137: checking for $CC option to accept ANSI C" >&5
2138 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2139 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2140 echo $ECHO_N "(cached) $ECHO_C" >&6
2141 else
2142 ac_cv_prog_cc_stdc=no
2143 ac_save_CC=$CC
2144 cat >"conftest.$ac_ext" <<_ACEOF
2145 #line 2145 "configure"
2146 #include "confdefs.h"
2147 #include <stdarg.h>
2148 #include <stdio.h>
2149 #include <sys/types.h>
2150 #include <sys/stat.h>
2151 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2152 struct buf { int x; };
2153 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2154 static char *e (char **p, int i)
2155 {
2156 return p[i];
2157 }
2158 static char *f (char * (*g) (char **, int), char **p, ...)
2159 {
2160 char *s;
2161 va_list v;
2162 va_start (v,p);
2163 s = g (p, va_arg (v,int));
2164 va_end (v);
2165 return s;
2166 }
2167 int test (int i, double x);
2168 struct s1 {int (*f) (int a);};
2169 struct s2 {int (*f) (double a);};
2170 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2171 int argc;
2172 char **argv;
2173 int
2174 main (void)
2175 {
2176 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2177 ;
2178 return 0;
2179 }
2180 _ACEOF
2181 # Don't try gcc -ansi; that turns off useful extensions and
2182 # breaks some systems' header files.
2183 # AIX -qlanglvl=ansi
2184 # Ultrix and OSF/1 -std1
2185 # HP-UX 10.20 and later -Ae
2186 # HP-UX older versions -Aa -D_HPUX_SOURCE
2187 # SVR4 -Xc -D__EXTENSIONS__
2188 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2189 do
2190 CC="$ac_save_CC $ac_arg"
2191 rm -f "conftest.$ac_objext"
2192 if { (eval echo "$as_me:2192: \"$ac_compile\"") >&5
2193 (eval $ac_compile) 2>&5
2194 ac_status=$?
2195 echo "$as_me:2195: \$? = $ac_status" >&5
2196 (exit "$ac_status"); } &&
2197 { ac_try='test -s "conftest.$ac_objext"'
2198 { (eval echo "$as_me:2198: \"$ac_try\"") >&5
2199 (eval $ac_try) 2>&5
2200 ac_status=$?
2201 echo "$as_me:2201: \$? = $ac_status" >&5
2202 (exit "$ac_status"); }; }; then
2203 ac_cv_prog_cc_stdc=$ac_arg
2204 break
2205 else
2206 echo "$as_me: failed program was:" >&5
2207 cat "conftest.$ac_ext" >&5
2208 fi
2209 rm -f "conftest.$ac_objext"
2210 done
2211 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2212 CC=$ac_save_CC
2213
2214 fi
2215
2216 case "x$ac_cv_prog_cc_stdc" in
2217 x|xno)
2218 echo "$as_me:2218: result: none needed" >&5
2219 echo "${ECHO_T}none needed" >&6 ;;
2220 *)
2221 echo "$as_me:2221: result: $ac_cv_prog_cc_stdc" >&5
2222 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2223 CC="$CC $ac_cv_prog_cc_stdc" ;;
2224 esac
2225
2226 # This should have been defined by AC_PROG_CC
2227 : "${CC:=cc}"
2228
2229 echo "$as_me:2229: checking \$CFLAGS variable" >&5
2230 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2231 case "x$CFLAGS" in
2232 (*-[IUD]*)
2233 echo "$as_me:2233: result: broken" >&5
2234 echo "${ECHO_T}broken" >&6
2235 { echo "$as_me:2235: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2236 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2237 cf_flags="$CFLAGS"
2238 CFLAGS=
2239 for cf_arg in $cf_flags
2240 do
2241
2242 cf_fix_cppflags=no
2243 cf_new_cflags=
2244 cf_new_cppflags=
2245 cf_new_extra_cppflags=
2246
2247 for cf_add_cflags in $cf_arg
2248 do
2249 case "$cf_fix_cppflags" in
2250 (no)
2251 case "$cf_add_cflags" in
2252 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2253 case "$cf_add_cflags" in
2254 (-D*)
2255 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2256
2257 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2258 && test -z "${cf_tst_cflags}" \
2259 && cf_fix_cppflags=yes
2260
2261 if test "$cf_fix_cppflags" = yes ; then
2262
2263 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2264 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2265
2266 continue
2267 elif test "${cf_tst_cflags}" = "\"'" ; then
2268
2269 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2270 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2271
2272 continue
2273 fi
2274 ;;
2275 esac
2276 case "$CPPFLAGS" in
2277 (*$cf_add_cflags)
2278 ;;
2279 (*)
2280 case "$cf_add_cflags" in
2281 (-D*)
2282 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2283
2284 CPPFLAGS=`echo "$CPPFLAGS" | \
2285 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2286 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2287
2288 ;;
2289 esac
2290
2291 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2292 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2293
2294 ;;
2295 esac
2296 ;;
2297 (*)
2298
2299 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2300 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2301
2302 ;;
2303 esac
2304 ;;
2305 (yes)
2306
2307 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2308 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2309
2310 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2311
2312 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2313 && test -z "${cf_tst_cflags}" \
2314 && cf_fix_cppflags=no
2315 ;;
2316 esac
2317 done
2318
2319 if test -n "$cf_new_cflags" ; then
2320
2321 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2322 CFLAGS="${CFLAGS}$cf_new_cflags"
2323
2324 fi
2325
2326 if test -n "$cf_new_cppflags" ; then
2327
2328 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2329 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2330
2331 fi
2332
2333 if test -n "$cf_new_extra_cppflags" ; then
2334
2335 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2336 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2337
2338 fi
2339
2340 done
2341 ;;
2342 (*)
2343 echo "$as_me:2343: result: ok" >&5
2344 echo "${ECHO_T}ok" >&6
2345 ;;
2346 esac
2347
2348 echo "$as_me:2348: checking \$CC variable" >&5
2349 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2350 case "$CC" in
2351 (*[\ \ ]-*)
2352 echo "$as_me:2352: result: broken" >&5
2353 echo "${ECHO_T}broken" >&6
2354 { echo "$as_me:2354: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2355 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2356 # humor him...
2357 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2358 cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
2359 CC="$cf_prog"
2360 for cf_arg in $cf_flags
2361 do
2362 case "x$cf_arg" in
2363 (x-[IUDfgOW]*)
2364
2365 cf_fix_cppflags=no
2366 cf_new_cflags=
2367 cf_new_cppflags=
2368 cf_new_extra_cppflags=
2369
2370 for cf_add_cflags in $cf_arg
2371 do
2372 case "$cf_fix_cppflags" in
2373 (no)
2374 case "$cf_add_cflags" in
2375 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2376 case "$cf_add_cflags" in
2377 (-D*)
2378 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2379
2380 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2381 && test -z "${cf_tst_cflags}" \
2382 && cf_fix_cppflags=yes
2383
2384 if test "$cf_fix_cppflags" = yes ; then
2385
2386 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2387 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2388
2389 continue
2390 elif test "${cf_tst_cflags}" = "\"'" ; then
2391
2392 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2393 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2394
2395 continue
2396 fi
2397 ;;
2398 esac
2399 case "$CPPFLAGS" in
2400 (*$cf_add_cflags)
2401 ;;
2402 (*)
2403 case "$cf_add_cflags" in
2404 (-D*)
2405 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2406
2407 CPPFLAGS=`echo "$CPPFLAGS" | \
2408 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2409 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2410
2411 ;;
2412 esac
2413
2414 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2415 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2416
2417 ;;
2418 esac
2419 ;;
2420 (*)
2421
2422 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2423 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2424
2425 ;;
2426 esac
2427 ;;
2428 (yes)
2429
2430 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2431 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2432
2433 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2434
2435 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2436 && test -z "${cf_tst_cflags}" \
2437 && cf_fix_cppflags=no
2438 ;;
2439 esac
2440 done
2441
2442 if test -n "$cf_new_cflags" ; then
2443
2444 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2445 CFLAGS="${CFLAGS}$cf_new_cflags"
2446
2447 fi
2448
2449 if test -n "$cf_new_cppflags" ; then
2450
2451 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2452 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2453
2454 fi
2455
2456 if test -n "$cf_new_extra_cppflags" ; then
2457
2458 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2459 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2460
2461 fi
2462
2463 ;;
2464 (*)
2465 CC="$CC $cf_arg"
2466 ;;
2467 esac
2468 done
2469 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2470
2471 echo "${as_me:-configure}:2471: testing resulting CC: '$CC' ..." 1>&5
2472
2473 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2474
2475 echo "${as_me:-configure}:2475: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2476
2477 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2478
2479 echo "${as_me:-configure}:2479: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2480
2481 ;;
2482 (*)
2483 echo "$as_me:2483: result: ok" >&5
2484 echo "${ECHO_T}ok" >&6
2485 ;;
2486 esac
2487
2488 for ac_prog in ggrep grep
2489 do
2490 # Extract the first word of "$ac_prog", so it can be a program name with args.
2491 set dummy $ac_prog; ac_word=$2
2492 echo "$as_me:2492: checking for $ac_word" >&5
2493 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2494 if test "${ac_cv_prog_GREP+set}" = set; then
2495 echo $ECHO_N "(cached) $ECHO_C" >&6
2496 else
2497 if test -n "$GREP"; then
2498 ac_cv_prog_GREP="$GREP" # Let the user override the test.
2499 else
2500 ac_save_IFS=$IFS; IFS=$ac_path_separator
2501 ac_dummy="$PATH"
2502 for ac_dir in $ac_dummy; do
2503 IFS=$ac_save_IFS
2504 test -z "$ac_dir" && ac_dir=.
2505 $as_executable_p "$ac_dir/$ac_word" || continue
2506 ac_cv_prog_GREP="$ac_prog"
2507 echo "$as_me:2507: found $ac_dir/$ac_word" >&5
2508 break
2509 done
2510
2511 fi
2512 fi
2513 GREP=$ac_cv_prog_GREP
2514 if test -n "$GREP"; then
2515 echo "$as_me:2515: result: $GREP" >&5
2516 echo "${ECHO_T}$GREP" >&6
2517 else
2518 echo "$as_me:2518: result: no" >&5
2519 echo "${ECHO_T}no" >&6
2520 fi
2521
2522 test -n "$GREP" && break
2523 done
2524 test -n "$GREP" || GREP=": "
2525
2526 echo "$as_me:2526: checking for egrep" >&5
2527 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2528 if test "${ac_cv_path_EGREP+set}" = set; then
2529 echo $ECHO_N "(cached) $ECHO_C" >&6
2530 else
2531 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2532 then ac_cv_path_EGREP="$GREP -E"
2533 else
2534 for ac_prog in gegrep egrep
2535 do
2536 # Extract the first word of "$ac_prog", so it can be a program name with args.
2537 set dummy $ac_prog; ac_word=$2
2538 echo "$as_me:2538: checking for $ac_word" >&5
2539 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2540 if test "${ac_cv_path_EGREP+set}" = set; then
2541 echo $ECHO_N "(cached) $ECHO_C" >&6
2542 else
2543 case $EGREP in
2544 [\\/]* | ?:[\\/]*)
2545 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2546 ;;
2547 *)
2548 ac_save_IFS=$IFS; IFS=$ac_path_separator
2549 ac_dummy="$PATH"
2550 for ac_dir in $ac_dummy; do
2551 IFS=$ac_save_IFS
2552 test -z "$ac_dir" && ac_dir=.
2553 if $as_executable_p "$ac_dir/$ac_word"; then
2554 ac_cv_path_EGREP="$ac_dir/$ac_word"
2555 echo "$as_me:2555: found $ac_dir/$ac_word" >&5
2556 break
2557 fi
2558 done
2559
2560 ;;
2561 esac
2562 fi
2563 EGREP=$ac_cv_path_EGREP
2564
2565 if test -n "$EGREP"; then
2566 echo "$as_me:2566: result: $EGREP" >&5
2567 echo "${ECHO_T}$EGREP" >&6
2568 else
2569 echo "$as_me:2569: result: no" >&5
2570 echo "${ECHO_T}no" >&6
2571 fi
2572
2573 test -n "$EGREP" && break
2574 done
2575 test -n "$EGREP" || EGREP=": "
2576
2577 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2577: error: cannot find workable egrep" >&5
2578 echo "$as_me: error: cannot find workable egrep" >&2;}
2579 { (exit 1); exit 1; }; }
2580 fi
2581 fi
2582 echo "$as_me:2582: result: $ac_cv_path_EGREP" >&5
2583 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2584 EGREP="$ac_cv_path_EGREP"
2585
2586 ac_ext=c
2587 ac_cpp='$CPP $CPPFLAGS'
2588 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2589 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2590 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2591 ac_main_return="return"
2592 echo "$as_me:2592: checking how to run the C preprocessor" >&5
2593 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2594 # On Suns, sometimes $CPP names a directory.
2595 if test -n "$CPP" && test -d "$CPP"; then
2596 CPP=
2597 fi
2598 if test -z "$CPP"; then
2599 if test "${ac_cv_prog_CPP+set}" = set; then
2600 echo $ECHO_N "(cached) $ECHO_C" >&6
2601 else
2602 # Double quotes because CPP needs to be expanded
2603 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2604 do
2605 ac_preproc_ok=false
2606 for ac_c_preproc_warn_flag in '' yes
2607 do
2608 # Use a header file that comes with gcc, so configuring glibc
2609 # with a fresh cross-compiler works.
2610 # On the NeXT, cc -E runs the code through the compiler's parser,
2611 # not just through cpp. "Syntax error" is here to catch this case.
2612 cat >"conftest.$ac_ext" <<_ACEOF
2613 #line 2613 "configure"
2614 #include "confdefs.h"
2615 #include <assert.h>
2616 Syntax error
2617 _ACEOF
2618 if { (eval echo "$as_me:2618: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2619 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2620 ac_status=$?
2621 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2622 rm -f conftest.er1
2623 cat conftest.err >&5
2624 echo "$as_me:2624: \$? = $ac_status" >&5
2625 (exit "$ac_status"); } >/dev/null; then
2626 if test -s conftest.err; then
2627 ac_cpp_err=$ac_c_preproc_warn_flag
2628 else
2629 ac_cpp_err=
2630 fi
2631 else
2632 ac_cpp_err=yes
2633 fi
2634 if test -z "$ac_cpp_err"; then
2635 :
2636 else
2637 echo "$as_me: failed program was:" >&5
2638 cat "conftest.$ac_ext" >&5
2639 # Broken: fails on valid input.
2640 continue
2641 fi
2642 rm -f conftest.err "conftest.$ac_ext"
2643
2644 # OK, works on sane cases. Now check whether non-existent headers
2645 # can be detected and how.
2646 cat >"conftest.$ac_ext" <<_ACEOF
2647 #line 2647 "configure"
2648 #include "confdefs.h"
2649 #include <ac_nonexistent.h>
2650 _ACEOF
2651 if { (eval echo "$as_me:2651: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2652 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2653 ac_status=$?
2654 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2655 rm -f conftest.er1
2656 cat conftest.err >&5
2657 echo "$as_me:2657: \$? = $ac_status" >&5
2658 (exit "$ac_status"); } >/dev/null; then
2659 if test -s conftest.err; then
2660 ac_cpp_err=$ac_c_preproc_warn_flag
2661 else
2662 ac_cpp_err=
2663 fi
2664 else
2665 ac_cpp_err=yes
2666 fi
2667 if test -z "$ac_cpp_err"; then
2668 # Broken: success on invalid input.
2669 continue
2670 else
2671 echo "$as_me: failed program was:" >&5
2672 cat "conftest.$ac_ext" >&5
2673 # Passes both tests.
2674 ac_preproc_ok=:
2675 break
2676 fi
2677 rm -f conftest.err "conftest.$ac_ext"
2678
2679 done
2680 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2681 rm -f conftest.err "conftest.$ac_ext"
2682 if $ac_preproc_ok; then
2683 break
2684 fi
2685
2686 done
2687 ac_cv_prog_CPP=$CPP
2688
2689 fi
2690 CPP=$ac_cv_prog_CPP
2691 else
2692 ac_cv_prog_CPP=$CPP
2693 fi
2694 echo "$as_me:2694: result: $CPP" >&5
2695 echo "${ECHO_T}$CPP" >&6
2696 ac_preproc_ok=false
2697 for ac_c_preproc_warn_flag in '' yes
2698 do
2699 # Use a header file that comes with gcc, so configuring glibc
2700 # with a fresh cross-compiler works.
2701 # On the NeXT, cc -E runs the code through the compiler's parser,
2702 # not just through cpp. "Syntax error" is here to catch this case.
2703 cat >"conftest.$ac_ext" <<_ACEOF
2704 #line 2704 "configure"
2705 #include "confdefs.h"
2706 #include <assert.h>
2707 Syntax error
2708 _ACEOF
2709 if { (eval echo "$as_me:2709: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2710 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2711 ac_status=$?
2712 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2713 rm -f conftest.er1
2714 cat conftest.err >&5
2715 echo "$as_me:2715: \$? = $ac_status" >&5
2716 (exit "$ac_status"); } >/dev/null; then
2717 if test -s conftest.err; then
2718 ac_cpp_err=$ac_c_preproc_warn_flag
2719 else
2720 ac_cpp_err=
2721 fi
2722 else
2723 ac_cpp_err=yes
2724 fi
2725 if test -z "$ac_cpp_err"; then
2726 :
2727 else
2728 echo "$as_me: failed program was:" >&5
2729 cat "conftest.$ac_ext" >&5
2730 # Broken: fails on valid input.
2731 continue
2732 fi
2733 rm -f conftest.err "conftest.$ac_ext"
2734
2735 # OK, works on sane cases. Now check whether non-existent headers
2736 # can be detected and how.
2737 cat >"conftest.$ac_ext" <<_ACEOF
2738 #line 2738 "configure"
2739 #include "confdefs.h"
2740 #include <ac_nonexistent.h>
2741 _ACEOF
2742 if { (eval echo "$as_me:2742: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2743 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2744 ac_status=$?
2745 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2746 rm -f conftest.er1
2747 cat conftest.err >&5
2748 echo "$as_me:2748: \$? = $ac_status" >&5
2749 (exit "$ac_status"); } >/dev/null; then
2750 if test -s conftest.err; then
2751 ac_cpp_err=$ac_c_preproc_warn_flag
2752 else
2753 ac_cpp_err=
2754 fi
2755 else
2756 ac_cpp_err=yes
2757 fi
2758 if test -z "$ac_cpp_err"; then
2759 # Broken: success on invalid input.
2760 continue
2761 else
2762 echo "$as_me: failed program was:" >&5
2763 cat "conftest.$ac_ext" >&5
2764 # Passes both tests.
2765 ac_preproc_ok=:
2766 break
2767 fi
2768 rm -f conftest.err "conftest.$ac_ext"
2769
2770 done
2771 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2772 rm -f conftest.err "conftest.$ac_ext"
2773 if $ac_preproc_ok; then
2774 :
2775 else
2776 { { echo "$as_me:2776: error: C preprocessor \"$CPP\" fails sanity check" >&5
2777 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2778 { (exit 1); exit 1; }; }
2779 fi
2780
2781 ac_ext=c
2782 ac_cpp='$CPP $CPPFLAGS'
2783 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2784 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2785 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2786 ac_main_return="return"
2787
2788 for ac_prog in mawk gawk nawk awk
2789 do
2790 # Extract the first word of "$ac_prog", so it can be a program name with args.
2791 set dummy $ac_prog; ac_word=$2
2792 echo "$as_me:2792: checking for $ac_word" >&5
2793 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2794 if test "${ac_cv_prog_AWK+set}" = set; then
2795 echo $ECHO_N "(cached) $ECHO_C" >&6
2796 else
2797 if test -n "$AWK"; then
2798 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2799 else
2800 ac_save_IFS=$IFS; IFS=$ac_path_separator
2801 ac_dummy="$PATH"
2802 for ac_dir in $ac_dummy; do
2803 IFS=$ac_save_IFS
2804 test -z "$ac_dir" && ac_dir=.
2805 $as_executable_p "$ac_dir/$ac_word" || continue
2806 ac_cv_prog_AWK="$ac_prog"
2807 echo "$as_me:2807: found $ac_dir/$ac_word" >&5
2808 break
2809 done
2810
2811 fi
2812 fi
2813 AWK=$ac_cv_prog_AWK
2814 if test -n "$AWK"; then
2815 echo "$as_me:2815: result: $AWK" >&5
2816 echo "${ECHO_T}$AWK" >&6
2817 else
2818 echo "$as_me:2818: result: no" >&5
2819 echo "${ECHO_T}no" >&6
2820 fi
2821
2822 test -n "$AWK" && break
2823 done
2824
2825 # Find a good install program. We prefer a C program (faster),
2826 # so one script is as good as another. But avoid the broken or
2827 # incompatible versions:
2828 # SysV /etc/install, /usr/sbin/install
2829 # SunOS /usr/etc/install
2830 # IRIX /sbin/install
2831 # AIX /bin/install
2832 # AmigaOS /C/install, which installs bootblocks on floppy discs
2833 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2834 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2835 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2836 # ./install, which can be erroneously created by make from ./install.sh.
2837 echo "$as_me:2837: checking for a BSD compatible install" >&5
2838 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2839 if test -z "$INSTALL"; then
2840 if test "${ac_cv_path_install+set}" = set; then
2841 echo $ECHO_N "(cached) $ECHO_C" >&6
2842 else
2843 ac_save_IFS=$IFS; IFS=$ac_path_separator
2844 for ac_dir in $PATH; do
2845 IFS=$ac_save_IFS
2846 # Account for people who put trailing slashes in PATH elements.
2847 case $ac_dir/ in
2848 / | ./ | .// | /cC/* \
2849 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2850 | /usr/ucb/* ) ;;
2851 *)
2852 # OSF1 and SCO ODT 3.0 have their own names for install.
2853 # Don't use installbsd from OSF since it installs stuff as root
2854 # by default.
2855 for ac_prog in ginstall scoinst install; do
2856 if $as_executable_p "$ac_dir/$ac_prog"; then
2857 if test $ac_prog = install &&
2858 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2859 # AIX install. It has an incompatible calling convention.
2860 :
2861 elif test $ac_prog = install &&
2862 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2863 # program-specific install script used by HP pwplus--don't use.
2864 :
2865 else
2866 ac_cv_path_install="$ac_dir/$ac_prog -c"
2867 break 2
2868 fi
2869 fi
2870 done
2871 ;;
2872 esac
2873 done
2874
2875 fi
2876 if test "${ac_cv_path_install+set}" = set; then
2877 INSTALL=$ac_cv_path_install
2878 else
2879 # As a last resort, use the slow shell script. We don't cache a
2880 # path for INSTALL within a source directory, because that will
2881 # break other packages using the cache if that directory is
2882 # removed, or if the path is relative.
2883 INSTALL=$ac_install_sh
2884 fi
2885 fi
2886 echo "$as_me:2886: result: $INSTALL" >&5
2887 echo "${ECHO_T}$INSTALL" >&6
2888
2889 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2890 # It thinks the first close brace ends the variable substitution.
2891 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2892
2893 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2894
2895 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2896
2897 echo "$as_me:2897: checking whether ln -s works" >&5
2898 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2899 LN_S=$as_ln_s
2900 if test "$LN_S" = "ln -s"; then
2901 echo "$as_me:2901: result: yes" >&5
2902 echo "${ECHO_T}yes" >&6
2903 else
2904 echo "$as_me:2904: result: no, using $LN_S" >&5
2905 echo "${ECHO_T}no, using $LN_S" >&6
2906 fi
2907
2908 test "$program_prefix" != NONE &&
2909 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2910 # Use a double $ so make ignores it.
2911 test "$program_suffix" != NONE &&
2912 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2913 # Double any \ or $. echo might interpret backslashes.
2914 # By default was `s,x,x', remove it if useless.
2915 cat <<\_ACEOF >conftest.sed
2916 s/[\\$]/&&/g;s/;s,x,x,$//
2917 _ACEOF
2918 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2919 rm conftest.sed
2920
2921 for ac_prog in lint cppcheck splint
2922 do
2923 # Extract the first word of "$ac_prog", so it can be a program name with args.
2924 set dummy $ac_prog; ac_word=$2
2925 echo "$as_me:2925: checking for $ac_word" >&5
2926 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2927 if test "${ac_cv_prog_LINT+set}" = set; then
2928 echo $ECHO_N "(cached) $ECHO_C" >&6
2929 else
2930 if test -n "$LINT"; then
2931 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2932 else
2933 ac_save_IFS=$IFS; IFS=$ac_path_separator
2934 ac_dummy="$PATH"
2935 for ac_dir in $ac_dummy; do
2936 IFS=$ac_save_IFS
2937 test -z "$ac_dir" && ac_dir=.
2938 $as_executable_p "$ac_dir/$ac_word" || continue
2939 ac_cv_prog_LINT="$ac_prog"
2940 echo "$as_me:2940: found $ac_dir/$ac_word" >&5
2941 break
2942 done
2943
2944 fi
2945 fi
2946 LINT=$ac_cv_prog_LINT
2947 if test -n "$LINT"; then
2948 echo "$as_me:2948: result: $LINT" >&5
2949 echo "${ECHO_T}$LINT" >&6
2950 else
2951 echo "$as_me:2951: result: no" >&5
2952 echo "${ECHO_T}no" >&6
2953 fi
2954
2955 test -n "$LINT" && break
2956 done
2957
2958 case "x$LINT" in
2959 (xcppcheck|x*/cppcheck)
2960 test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
2961 ;;
2962 esac
2963
2964 ### checks for compiler characteristics
2965
2966 echo "$as_me:2966: checking if the POSIX test-macros are already defined" >&5
2967 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
2968 if test "${cf_cv_posix_visible+set}" = set; then
2969 echo $ECHO_N "(cached) $ECHO_C" >&6
2970 else
2971
2972 cat >"conftest.$ac_ext" <<_ACEOF
2973 #line 2973 "configure"
2974 #include "confdefs.h"
2975 #include <stdio.h>
2976 int
2977 main (void)
2978 {
2979
2980 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
2981 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
2982 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
2983 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
2984 #error conflicting symbols found
2985 #endif
2986
2987 ;
2988 return 0;
2989 }
2990 _ACEOF
2991 rm -f "conftest.$ac_objext"
2992 if { (eval echo "$as_me:2992: \"$ac_compile\"") >&5
2993 (eval $ac_compile) 2>&5
2994 ac_status=$?
2995 echo "$as_me:2995: \$? = $ac_status" >&5
2996 (exit "$ac_status"); } &&
2997 { ac_try='test -s "conftest.$ac_objext"'
2998 { (eval echo "$as_me:2998: \"$ac_try\"") >&5
2999 (eval $ac_try) 2>&5
3000 ac_status=$?
3001 echo "$as_me:3001: \$? = $ac_status" >&5
3002 (exit "$ac_status"); }; }; then
3003 cf_cv_posix_visible=no
3004 else
3005 echo "$as_me: failed program was:" >&5
3006 cat "conftest.$ac_ext" >&5
3007 cf_cv_posix_visible=yes
3008 fi
3009 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3010
3011 fi
3012 echo "$as_me:3012: result: $cf_cv_posix_visible" >&5
3013 echo "${ECHO_T}$cf_cv_posix_visible" >&6
3014
3015 if test "$cf_cv_posix_visible" = no; then
3016
3017 cf_XOPEN_SOURCE=700
3018 cf_POSIX_C_SOURCE=199506L
3019 cf_xopen_source=
3020
3021 case "$host_os" in
3022 (aix[4-7]*)
3023 cf_xopen_source="-D_ALL_SOURCE"
3024 ;;
3025 (darwin[0-8].*)
3026 cf_xopen_source="-D_APPLE_C_SOURCE"
3027 ;;
3028 (darwin*)
3029 cf_xopen_source="-D_DARWIN_C_SOURCE"
3030 cf_XOPEN_SOURCE=
3031 ;;
3032 (freebsd*|dragonfly*|midnightbsd*)
3033 # 5.x headers associate
3034 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3035 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3036 cf_POSIX_C_SOURCE=200112L
3037 cf_XOPEN_SOURCE=600
3038 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3039 ;;
3040 (hpux11*)
3041 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3042 ;;
3043 (hpux*)
3044 cf_xopen_source="-D_HPUX_SOURCE"
3045 ;;
3046 (irix[56].*)
3047 cf_xopen_source="-D_SGI_SOURCE"
3048 cf_XOPEN_SOURCE=
3049 ;;
3050 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys)
3051
3052 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3053
3054 echo "$as_me:3054: checking if this is the GNU C library" >&5
3055 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3056 if test "${cf_cv_gnu_library+set}" = set; then
3057 echo $ECHO_N "(cached) $ECHO_C" >&6
3058 else
3059
3060 cat >"conftest.$ac_ext" <<_ACEOF
3061 #line 3061 "configure"
3062 #include "confdefs.h"
3063 #include <sys/types.h>
3064 int
3065 main (void)
3066 {
3067
3068 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3069 return 0;
3070 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
3071 return 0;
3072 #else
3073 # error not GNU C library
3074 #endif
3075 ;
3076 return 0;
3077 }
3078 _ACEOF
3079 rm -f "conftest.$ac_objext"
3080 if { (eval echo "$as_me:3080: \"$ac_compile\"") >&5
3081 (eval $ac_compile) 2>&5
3082 ac_status=$?
3083 echo "$as_me:3083: \$? = $ac_status" >&5
3084 (exit "$ac_status"); } &&
3085 { ac_try='test -s "conftest.$ac_objext"'
3086 { (eval echo "$as_me:3086: \"$ac_try\"") >&5
3087 (eval $ac_try) 2>&5
3088 ac_status=$?
3089 echo "$as_me:3089: \$? = $ac_status" >&5
3090 (exit "$ac_status"); }; }; then
3091 cf_cv_gnu_library=yes
3092 else
3093 echo "$as_me: failed program was:" >&5
3094 cat "conftest.$ac_ext" >&5
3095 cf_cv_gnu_library=no
3096 fi
3097 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3098
3099 fi
3100 echo "$as_me:3100: result: $cf_cv_gnu_library" >&5
3101 echo "${ECHO_T}$cf_cv_gnu_library" >&6
3102
3103 if test x$cf_cv_gnu_library = xyes; then
3104
3105 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3106 # was changed to help a little. newlib incorporated the change about 4
3107 # years later.
3108 echo "$as_me:3108: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3109 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3110 if test "${cf_cv_gnu_library_219+set}" = set; then
3111 echo $ECHO_N "(cached) $ECHO_C" >&6
3112 else
3113
3114 cf_save="$CPPFLAGS"
3115
3116 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3117 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3118
3119 cat >"conftest.$ac_ext" <<_ACEOF
3120 #line 3120 "configure"
3121 #include "confdefs.h"
3122 #include <sys/types.h>
3123 int
3124 main (void)
3125 {
3126
3127 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3128 return 0;
3129 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
3130 return 0;
3131 #else
3132 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
3133 #endif
3134 ;
3135 return 0;
3136 }
3137 _ACEOF
3138 rm -f "conftest.$ac_objext"
3139 if { (eval echo "$as_me:3139: \"$ac_compile\"") >&5
3140 (eval $ac_compile) 2>&5
3141 ac_status=$?
3142 echo "$as_me:3142: \$? = $ac_status" >&5
3143 (exit "$ac_status"); } &&
3144 { ac_try='test -s "conftest.$ac_objext"'
3145 { (eval echo "$as_me:3145: \"$ac_try\"") >&5
3146 (eval $ac_try) 2>&5
3147 ac_status=$?
3148 echo "$as_me:3148: \$? = $ac_status" >&5
3149 (exit "$ac_status"); }; }; then
3150 cf_cv_gnu_library_219=yes
3151 else
3152 echo "$as_me: failed program was:" >&5
3153 cat "conftest.$ac_ext" >&5
3154 cf_cv_gnu_library_219=no
3155 fi
3156 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3157 CPPFLAGS="$cf_save"
3158
3159 fi
3160 echo "$as_me:3160: result: $cf_cv_gnu_library_219" >&5
3161 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
3162
3163 if test "x$cf_cv_gnu_library_219" = xyes; then
3164 cf_save="$CPPFLAGS"
3165 echo "$as_me:3165: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
3166 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
3167 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
3168 echo $ECHO_N "(cached) $ECHO_C" >&6
3169 else
3170
3171 cf_fix_cppflags=no
3172 cf_new_cflags=
3173 cf_new_cppflags=
3174 cf_new_extra_cppflags=
3175
3176 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
3177 do
3178 case "$cf_fix_cppflags" in
3179 (no)
3180 case "$cf_add_cflags" in
3181 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3182 case "$cf_add_cflags" in
3183 (-D*)
3184 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3185
3186 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3187 && test -z "${cf_tst_cflags}" \
3188 && cf_fix_cppflags=yes
3189
3190 if test "$cf_fix_cppflags" = yes ; then
3191
3192 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3193 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3194
3195 continue
3196 elif test "${cf_tst_cflags}" = "\"'" ; then
3197
3198 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3199 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3200
3201 continue
3202 fi
3203 ;;
3204 esac
3205 case "$CPPFLAGS" in
3206 (*$cf_add_cflags)
3207 ;;
3208 (*)
3209 case "$cf_add_cflags" in
3210 (-D*)
3211 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3212
3213 CPPFLAGS=`echo "$CPPFLAGS" | \
3214 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3215 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3216
3217 ;;
3218 esac
3219
3220 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3221 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3222
3223 ;;
3224 esac
3225 ;;
3226 (*)
3227
3228 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3229 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3230
3231 ;;
3232 esac
3233 ;;
3234 (yes)
3235
3236 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3237 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3238
3239 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
3240
3241 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3242 && test -z "${cf_tst_cflags}" \
3243 && cf_fix_cppflags=no
3244 ;;
3245 esac
3246 done
3247
3248 if test -n "$cf_new_cflags" ; then
3249
3250 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3251 CFLAGS="${CFLAGS}$cf_new_cflags"
3252
3253 fi
3254
3255 if test -n "$cf_new_cppflags" ; then
3256
3257 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3258 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3259
3260 fi
3261
3262 if test -n "$cf_new_extra_cppflags" ; then
3263
3264 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3265 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3266
3267 fi
3268
3269 cat >"conftest.$ac_ext" <<_ACEOF
3270 #line 3270 "configure"
3271 #include "confdefs.h"
3272
3273 #include <limits.h>
3274 #include <sys/types.h>
3275
3276 int
3277 main (void)
3278 {
3279
3280 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
3281 return 0;
3282 #else
3283 # error GNU C library is too old
3284 #endif
3285 ;
3286 return 0;
3287 }
3288 _ACEOF
3289 rm -f "conftest.$ac_objext"
3290 if { (eval echo "$as_me:3290: \"$ac_compile\"") >&5
3291 (eval $ac_compile) 2>&5
3292 ac_status=$?
3293 echo "$as_me:3293: \$? = $ac_status" >&5
3294 (exit "$ac_status"); } &&
3295 { ac_try='test -s "conftest.$ac_objext"'
3296 { (eval echo "$as_me:3296: \"$ac_try\"") >&5
3297 (eval $ac_try) 2>&5
3298 ac_status=$?
3299 echo "$as_me:3299: \$? = $ac_status" >&5
3300 (exit "$ac_status"); }; }; then
3301 cf_cv_gnu_dftsrc_219=yes
3302 else
3303 echo "$as_me: failed program was:" >&5
3304 cat "conftest.$ac_ext" >&5
3305 cf_cv_gnu_dftsrc_219=no
3306 fi
3307 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3308
3309 fi
3310 echo "$as_me:3310: result: $cf_cv_gnu_dftsrc_219" >&5
3311 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
3312 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
3313 else
3314 cf_cv_gnu_dftsrc_219=maybe
3315 fi
3316
3317 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
3318
3319 echo "$as_me:3319: checking if we must define _GNU_SOURCE" >&5
3320 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3321 if test "${cf_cv_gnu_source+set}" = set; then
3322 echo $ECHO_N "(cached) $ECHO_C" >&6
3323 else
3324
3325 cat >"conftest.$ac_ext" <<_ACEOF
3326 #line 3326 "configure"
3327 #include "confdefs.h"
3328 #include <sys/types.h>
3329 int
3330 main (void)
3331 {
3332
3333 #ifndef _XOPEN_SOURCE
3334 #error expected _XOPEN_SOURCE to be defined
3335 #endif
3336 ;
3337 return 0;
3338 }
3339 _ACEOF
3340 rm -f "conftest.$ac_objext"
3341 if { (eval echo "$as_me:3341: \"$ac_compile\"") >&5
3342 (eval $ac_compile) 2>&5
3343 ac_status=$?
3344 echo "$as_me:3344: \$? = $ac_status" >&5
3345 (exit "$ac_status"); } &&
3346 { ac_try='test -s "conftest.$ac_objext"'
3347 { (eval echo "$as_me:3347: \"$ac_try\"") >&5
3348 (eval $ac_try) 2>&5
3349 ac_status=$?
3350 echo "$as_me:3350: \$? = $ac_status" >&5
3351 (exit "$ac_status"); }; }; then
3352 cf_cv_gnu_source=no
3353 else
3354 echo "$as_me: failed program was:" >&5
3355 cat "conftest.$ac_ext" >&5
3356 cf_save="$CPPFLAGS"
3357
3358 cf_fix_cppflags=no
3359 cf_new_cflags=
3360 cf_new_cppflags=
3361 cf_new_extra_cppflags=
3362
3363 for cf_add_cflags in -D_GNU_SOURCE
3364 do
3365 case "$cf_fix_cppflags" in
3366 (no)
3367 case "$cf_add_cflags" in
3368 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3369 case "$cf_add_cflags" in
3370 (-D*)
3371 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3372
3373 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3374 && test -z "${cf_tst_cflags}" \
3375 && cf_fix_cppflags=yes
3376
3377 if test "$cf_fix_cppflags" = yes ; then
3378
3379 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3380 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3381
3382 continue
3383 elif test "${cf_tst_cflags}" = "\"'" ; then
3384
3385 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3386 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3387
3388 continue
3389 fi
3390 ;;
3391 esac
3392 case "$CPPFLAGS" in
3393 (*$cf_add_cflags)
3394 ;;
3395 (*)
3396 case "$cf_add_cflags" in
3397 (-D*)
3398 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3399
3400 CPPFLAGS=`echo "$CPPFLAGS" | \
3401 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3402 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3403
3404 ;;
3405 esac
3406
3407 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3408 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3409
3410 ;;
3411 esac
3412 ;;
3413 (*)
3414
3415 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3416 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3417
3418 ;;
3419 esac
3420 ;;
3421 (yes)
3422
3423 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3424 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3425
3426 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
3427
3428 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3429 && test -z "${cf_tst_cflags}" \
3430 && cf_fix_cppflags=no
3431 ;;
3432 esac
3433 done
3434
3435 if test -n "$cf_new_cflags" ; then
3436
3437 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3438 CFLAGS="${CFLAGS}$cf_new_cflags"
3439
3440 fi
3441
3442 if test -n "$cf_new_cppflags" ; then
3443
3444 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3445 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3446
3447 fi
3448
3449 if test -n "$cf_new_extra_cppflags" ; then
3450
3451 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3452 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3453
3454 fi
3455
3456 cat >"conftest.$ac_ext" <<_ACEOF
3457 #line 3457 "configure"
3458 #include "confdefs.h"
3459 #include <sys/types.h>
3460 int
3461 main (void)
3462 {
3463
3464 #ifdef _XOPEN_SOURCE
3465 #error expected _XOPEN_SOURCE to be undefined
3466 #endif
3467 ;
3468 return 0;
3469 }
3470 _ACEOF
3471 rm -f "conftest.$ac_objext"
3472 if { (eval echo "$as_me:3472: \"$ac_compile\"") >&5
3473 (eval $ac_compile) 2>&5
3474 ac_status=$?
3475 echo "$as_me:3475: \$? = $ac_status" >&5
3476 (exit "$ac_status"); } &&
3477 { ac_try='test -s "conftest.$ac_objext"'
3478 { (eval echo "$as_me:3478: \"$ac_try\"") >&5
3479 (eval $ac_try) 2>&5
3480 ac_status=$?
3481 echo "$as_me:3481: \$? = $ac_status" >&5
3482 (exit "$ac_status"); }; }; then
3483 cf_cv_gnu_source=no
3484 else
3485 echo "$as_me: failed program was:" >&5
3486 cat "conftest.$ac_ext" >&5
3487 cf_cv_gnu_source=yes
3488 fi
3489 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3490 CPPFLAGS="$cf_save"
3491
3492 fi
3493 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3494
3495 fi
3496 echo "$as_me:3496: result: $cf_cv_gnu_source" >&5
3497 echo "${ECHO_T}$cf_cv_gnu_source" >&6
3498
3499 if test "$cf_cv_gnu_source" = yes
3500 then
3501 echo "$as_me:3501: checking if we should also define _DEFAULT_SOURCE" >&5
3502 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
3503 if test "${cf_cv_default_source+set}" = set; then
3504 echo $ECHO_N "(cached) $ECHO_C" >&6
3505 else
3506
3507 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3508 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
3509
3510 cat >"conftest.$ac_ext" <<_ACEOF
3511 #line 3511 "configure"
3512 #include "confdefs.h"
3513 #include <sys/types.h>
3514 int
3515 main (void)
3516 {
3517
3518 #ifdef _DEFAULT_SOURCE
3519 #error expected _DEFAULT_SOURCE to be undefined
3520 #endif
3521 ;
3522 return 0;
3523 }
3524 _ACEOF
3525 rm -f "conftest.$ac_objext"
3526 if { (eval echo "$as_me:3526: \"$ac_compile\"") >&5
3527 (eval $ac_compile) 2>&5
3528 ac_status=$?
3529 echo "$as_me:3529: \$? = $ac_status" >&5
3530 (exit "$ac_status"); } &&
3531 { ac_try='test -s "conftest.$ac_objext"'
3532 { (eval echo "$as_me:3532: \"$ac_try\"") >&5
3533 (eval $ac_try) 2>&5
3534 ac_status=$?
3535 echo "$as_me:3535: \$? = $ac_status" >&5
3536 (exit "$ac_status"); }; }; then
3537 cf_cv_default_source=no
3538 else
3539 echo "$as_me: failed program was:" >&5
3540 cat "conftest.$ac_ext" >&5
3541 cf_cv_default_source=yes
3542 fi
3543 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3544
3545 fi
3546 echo "$as_me:3546: result: $cf_cv_default_source" >&5
3547 echo "${ECHO_T}$cf_cv_default_source" >&6
3548 if test "$cf_cv_default_source" = yes
3549 then
3550
3551 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3552 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3553
3554 fi
3555 fi
3556 fi
3557
3558 fi
3559
3560 ;;
3561 (minix*)
3562 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
3563 ;;
3564 (mirbsd*)
3565 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
3566 cf_XOPEN_SOURCE=
3567
3568 if test "$cf_cv_posix_visible" = no; then
3569
3570 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3571
3572 cf_save_CFLAGS="$CFLAGS"
3573 cf_save_CPPFLAGS="$CPPFLAGS"
3574
3575 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3576 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3577 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3578
3579 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3580 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3581 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3582
3583 echo "$as_me:3583: checking if we should define _POSIX_C_SOURCE" >&5
3584 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3585 if test "${cf_cv_posix_c_source+set}" = set; then
3586 echo $ECHO_N "(cached) $ECHO_C" >&6
3587 else
3588
3589 echo "${as_me:-configure}:3589: testing if the symbol is already defined go no further ..." 1>&5
3590
3591 cat >"conftest.$ac_ext" <<_ACEOF
3592 #line 3592 "configure"
3593 #include "confdefs.h"
3594 #include <sys/types.h>
3595 int
3596 main (void)
3597 {
3598
3599 #ifndef _POSIX_C_SOURCE
3600 #error _POSIX_C_SOURCE is not defined
3601 #endif
3602 ;
3603 return 0;
3604 }
3605 _ACEOF
3606 rm -f "conftest.$ac_objext"
3607 if { (eval echo "$as_me:3607: \"$ac_compile\"") >&5
3608 (eval $ac_compile) 2>&5
3609 ac_status=$?
3610 echo "$as_me:3610: \$? = $ac_status" >&5
3611 (exit "$ac_status"); } &&
3612 { ac_try='test -s "conftest.$ac_objext"'
3613 { (eval echo "$as_me:3613: \"$ac_try\"") >&5
3614 (eval $ac_try) 2>&5
3615 ac_status=$?
3616 echo "$as_me:3616: \$? = $ac_status" >&5
3617 (exit "$ac_status"); }; }; then
3618 cf_cv_posix_c_source=no
3619 else
3620 echo "$as_me: failed program was:" >&5
3621 cat "conftest.$ac_ext" >&5
3622 cf_want_posix_source=no
3623 case .$cf_POSIX_C_SOURCE in
3624 (.[12]??*)
3625 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3626 ;;
3627 (.2)
3628 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3629 cf_want_posix_source=yes
3630 ;;
3631 (.*)
3632 cf_want_posix_source=yes
3633 ;;
3634 esac
3635 if test "$cf_want_posix_source" = yes ; then
3636 cat >"conftest.$ac_ext" <<_ACEOF
3637 #line 3637 "configure"
3638 #include "confdefs.h"
3639 #include <sys/types.h>
3640 int
3641 main (void)
3642 {
3643
3644 #ifdef _POSIX_SOURCE
3645 #error _POSIX_SOURCE is defined
3646 #endif
3647 ;
3648 return 0;
3649 }
3650 _ACEOF
3651 rm -f "conftest.$ac_objext"
3652 if { (eval echo "$as_me:3652: \"$ac_compile\"") >&5
3653 (eval $ac_compile) 2>&5
3654 ac_status=$?
3655 echo "$as_me:3655: \$? = $ac_status" >&5
3656 (exit "$ac_status"); } &&
3657 { ac_try='test -s "conftest.$ac_objext"'
3658 { (eval echo "$as_me:3658: \"$ac_try\"") >&5
3659 (eval $ac_try) 2>&5
3660 ac_status=$?
3661 echo "$as_me:3661: \$? = $ac_status" >&5
3662 (exit "$ac_status"); }; }; then
3663 :
3664 else
3665 echo "$as_me: failed program was:" >&5
3666 cat "conftest.$ac_ext" >&5
3667 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3668 fi
3669 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3670 fi
3671
3672 echo "${as_me:-configure}:3672: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3673
3674 CFLAGS="$cf_trim_CFLAGS"
3675 CPPFLAGS="$cf_trim_CPPFLAGS"
3676
3677 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3678 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
3679
3680 echo "${as_me:-configure}:3680: testing if the second compile does not leave our definition intact error ..." 1>&5
3681
3682 cat >"conftest.$ac_ext" <<_ACEOF
3683 #line 3683 "configure"
3684 #include "confdefs.h"
3685 #include <sys/types.h>
3686 int
3687 main (void)
3688 {
3689
3690 #ifndef _POSIX_C_SOURCE
3691 #error _POSIX_C_SOURCE is not defined
3692 #endif
3693 ;
3694 return 0;
3695 }
3696 _ACEOF
3697 rm -f "conftest.$ac_objext"
3698 if { (eval echo "$as_me:3698: \"$ac_compile\"") >&5
3699 (eval $ac_compile) 2>&5
3700 ac_status=$?
3701 echo "$as_me:3701: \$? = $ac_status" >&5
3702 (exit "$ac_status"); } &&
3703 { ac_try='test -s "conftest.$ac_objext"'
3704 { (eval echo "$as_me:3704: \"$ac_try\"") >&5
3705 (eval $ac_try) 2>&5
3706 ac_status=$?
3707 echo "$as_me:3707: \$? = $ac_status" >&5
3708 (exit "$ac_status"); }; }; then
3709 :
3710 else
3711 echo "$as_me: failed program was:" >&5
3712 cat "conftest.$ac_ext" >&5
3713 cf_cv_posix_c_source=no
3714 fi
3715 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3716 CFLAGS="$cf_save_CFLAGS"
3717 CPPFLAGS="$cf_save_CPPFLAGS"
3718
3719 fi
3720 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3721
3722 fi
3723 echo "$as_me:3723: result: $cf_cv_posix_c_source" >&5
3724 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3725
3726 if test "$cf_cv_posix_c_source" != no ; then
3727 CFLAGS="$cf_trim_CFLAGS"
3728 CPPFLAGS="$cf_trim_CPPFLAGS"
3729
3730 cf_fix_cppflags=no
3731 cf_new_cflags=
3732 cf_new_cppflags=
3733 cf_new_extra_cppflags=
3734
3735 for cf_add_cflags in $cf_cv_posix_c_source
3736 do
3737 case "$cf_fix_cppflags" in
3738 (no)
3739 case "$cf_add_cflags" in
3740 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3741 case "$cf_add_cflags" in
3742 (-D*)
3743 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3744
3745 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3746 && test -z "${cf_tst_cflags}" \
3747 && cf_fix_cppflags=yes
3748
3749 if test "$cf_fix_cppflags" = yes ; then
3750
3751 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3752 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3753
3754 continue
3755 elif test "${cf_tst_cflags}" = "\"'" ; then
3756
3757 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3758 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3759
3760 continue
3761 fi
3762 ;;
3763 esac
3764 case "$CPPFLAGS" in
3765 (*$cf_add_cflags)
3766 ;;
3767 (*)
3768 case "$cf_add_cflags" in
3769 (-D*)
3770 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3771
3772 CPPFLAGS=`echo "$CPPFLAGS" | \
3773 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3774 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3775
3776 ;;
3777 esac
3778
3779 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3780 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3781
3782 ;;
3783 esac
3784 ;;
3785 (*)
3786
3787 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3788 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3789
3790 ;;
3791 esac
3792 ;;
3793 (yes)
3794
3795 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3796 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3797
3798 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
3799
3800 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3801 && test -z "${cf_tst_cflags}" \
3802 && cf_fix_cppflags=no
3803 ;;
3804 esac
3805 done
3806
3807 if test -n "$cf_new_cflags" ; then
3808
3809 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3810 CFLAGS="${CFLAGS}$cf_new_cflags"
3811
3812 fi
3813
3814 if test -n "$cf_new_cppflags" ; then
3815
3816 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3817 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3818
3819 fi
3820
3821 if test -n "$cf_new_extra_cppflags" ; then
3822
3823 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3824 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3825
3826 fi
3827
3828 fi
3829
3830 fi # cf_cv_posix_visible
3831
3832 ;;
3833 (netbsd*)
3834 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3835 ;;
3836 (openbsd[6-9]*)
3837 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
3838 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
3839 # Abusing the conformance level is a workaround.
3840 { echo "$as_me:3840: WARNING: this system does not provide usable locale support" >&5
3841 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
3842 cf_xopen_source="-D_BSD_SOURCE"
3843 cf_XOPEN_SOURCE=700
3844 ;;
3845 (openbsd[4-5]*)
3846 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3847 cf_xopen_source="-D_BSD_SOURCE"
3848 cf_XOPEN_SOURCE=600
3849 ;;
3850 (openbsd*)
3851 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3852 ;;
3853 (osf[45]*)
3854 cf_xopen_source="-D_OSF_SOURCE"
3855 ;;
3856 (nto-qnx*)
3857 cf_xopen_source="-D_QNX_SOURCE"
3858 ;;
3859 (sco*)
3860 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3861 ;;
3862 (solaris2.*)
3863 cf_xopen_source="-D__EXTENSIONS__"
3864 cf_cv_xopen_source=broken
3865 ;;
3866 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
3867 cf_XOPEN_SOURCE=
3868 cf_POSIX_C_SOURCE=
3869 ;;
3870 (*)
3871
3872 echo "$as_me:3872: checking if we should define _XOPEN_SOURCE" >&5
3873 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3874 if test "${cf_cv_xopen_source+set}" = set; then
3875 echo $ECHO_N "(cached) $ECHO_C" >&6
3876 else
3877
3878 cat >"conftest.$ac_ext" <<_ACEOF
3879 #line 3879 "configure"
3880 #include "confdefs.h"
3881
3882 $ac_includes_default
3883
3884 int
3885 main (void)
3886 {
3887
3888 #ifndef _XOPEN_SOURCE
3889 #error _XOPEN_SOURCE is not defined
3890 #endif
3891
3892 ;
3893 return 0;
3894 }
3895 _ACEOF
3896 rm -f "conftest.$ac_objext"
3897 if { (eval echo "$as_me:3897: \"$ac_compile\"") >&5
3898 (eval $ac_compile) 2>&5
3899 ac_status=$?
3900 echo "$as_me:3900: \$? = $ac_status" >&5
3901 (exit "$ac_status"); } &&
3902 { ac_try='test -s "conftest.$ac_objext"'
3903 { (eval echo "$as_me:3903: \"$ac_try\"") >&5
3904 (eval $ac_try) 2>&5
3905 ac_status=$?
3906 echo "$as_me:3906: \$? = $ac_status" >&5
3907 (exit "$ac_status"); }; }; then
3908 cf_cv_xopen_source=no
3909 else
3910 echo "$as_me: failed program was:" >&5
3911 cat "conftest.$ac_ext" >&5
3912 cf_save="$CPPFLAGS"
3913
3914 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3915 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3916
3917 cat >"conftest.$ac_ext" <<_ACEOF
3918 #line 3918 "configure"
3919 #include "confdefs.h"
3920
3921 $ac_includes_default
3922
3923 int
3924 main (void)
3925 {
3926
3927 #ifndef _XOPEN_SOURCE
3928 #error _XOPEN_SOURCE is not defined
3929 #endif
3930
3931 ;
3932 return 0;
3933 }
3934 _ACEOF
3935 rm -f "conftest.$ac_objext"
3936 if { (eval echo "$as_me:3936: \"$ac_compile\"") >&5
3937 (eval $ac_compile) 2>&5
3938 ac_status=$?
3939 echo "$as_me:3939: \$? = $ac_status" >&5
3940 (exit "$ac_status"); } &&
3941 { ac_try='test -s "conftest.$ac_objext"'
3942 { (eval echo "$as_me:3942: \"$ac_try\"") >&5
3943 (eval $ac_try) 2>&5
3944 ac_status=$?
3945 echo "$as_me:3945: \$? = $ac_status" >&5
3946 (exit "$ac_status"); }; }; then
3947 cf_cv_xopen_source=no
3948 else
3949 echo "$as_me: failed program was:" >&5
3950 cat "conftest.$ac_ext" >&5
3951 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3952 fi
3953 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3954 CPPFLAGS="$cf_save"
3955
3956 fi
3957 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3958
3959 fi
3960 echo "$as_me:3960: result: $cf_cv_xopen_source" >&5
3961 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3962
3963 if test "$cf_cv_xopen_source" != no ; then
3964
3965 CFLAGS=`echo "$CFLAGS" | \
3966 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3967 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3968
3969 CPPFLAGS=`echo "$CPPFLAGS" | \
3970 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3971 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3972
3973 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3974
3975 for cf_add_cflags in $cf_temp_xopen_source
3976 do
3977 case "x$cf_add_cflags" in
3978 (x-[DU]*)
3979
3980 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
3981 while true
3982 do
3983 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'`
3984 test "$CFLAGS" != "$cf_old_cflag" || break
3985
3986 CFLAGS="$cf_old_cflag"
3987 done
3988
3989 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
3990 while true
3991 do
3992 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'`
3993 test "$CPPFLAGS" != "$cf_old_cflag" || break
3994
3995 CPPFLAGS="$cf_old_cflag"
3996 done
3997
3998 ;;
3999 esac
4000
4001 cf_fix_cppflags=no
4002 cf_new_cflags=
4003 cf_new_cppflags=
4004 cf_new_extra_cppflags=
4005
4006 for cf_add_cflags in $cf_add_cflags
4007 do
4008 case "$cf_fix_cppflags" in
4009 (no)
4010 case "$cf_add_cflags" in
4011 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4012 case "$cf_add_cflags" in
4013 (-D*)
4014 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4015
4016 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4017 && test -z "${cf_tst_cflags}" \
4018 && cf_fix_cppflags=yes
4019
4020 if test "$cf_fix_cppflags" = yes ; then
4021
4022 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4023 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4024
4025 continue
4026 elif test "${cf_tst_cflags}" = "\"'" ; then
4027
4028 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4029 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4030
4031 continue
4032 fi
4033 ;;
4034 esac
4035 case "$CPPFLAGS" in
4036 (*$cf_add_cflags)
4037 ;;
4038 (*)
4039 case "$cf_add_cflags" in
4040 (-D*)
4041 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4042
4043 CPPFLAGS=`echo "$CPPFLAGS" | \
4044 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4045 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4046
4047 ;;
4048 esac
4049
4050 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4051 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4052
4053 ;;
4054 esac
4055 ;;
4056 (*)
4057
4058 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4059 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4060
4061 ;;
4062 esac
4063 ;;
4064 (yes)
4065
4066 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4067 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4068
4069 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4070
4071 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4072 && test -z "${cf_tst_cflags}" \
4073 && cf_fix_cppflags=no
4074 ;;
4075 esac
4076 done
4077
4078 if test -n "$cf_new_cflags" ; then
4079
4080 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4081 CFLAGS="${CFLAGS}$cf_new_cflags"
4082
4083 fi
4084
4085 if test -n "$cf_new_cppflags" ; then
4086
4087 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4088 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4089
4090 fi
4091
4092 if test -n "$cf_new_extra_cppflags" ; then
4093
4094 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4095 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4096
4097 fi
4098
4099 done
4100
4101 fi
4102
4103 cf_save_xopen_cppflags="$CPPFLAGS"
4104
4105 if test "$cf_cv_posix_visible" = no; then
4106
4107 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4108
4109 cf_save_CFLAGS="$CFLAGS"
4110 cf_save_CPPFLAGS="$CPPFLAGS"
4111
4112 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4113 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4114 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4115
4116 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4117 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4118 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4119
4120 echo "$as_me:4120: checking if we should define _POSIX_C_SOURCE" >&5
4121 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4122 if test "${cf_cv_posix_c_source+set}" = set; then
4123 echo $ECHO_N "(cached) $ECHO_C" >&6
4124 else
4125
4126 echo "${as_me:-configure}:4126: testing if the symbol is already defined go no further ..." 1>&5
4127
4128 cat >"conftest.$ac_ext" <<_ACEOF
4129 #line 4129 "configure"
4130 #include "confdefs.h"
4131 #include <sys/types.h>
4132 int
4133 main (void)
4134 {
4135
4136 #ifndef _POSIX_C_SOURCE
4137 #error _POSIX_C_SOURCE is not defined
4138 #endif
4139 ;
4140 return 0;
4141 }
4142 _ACEOF
4143 rm -f "conftest.$ac_objext"
4144 if { (eval echo "$as_me:4144: \"$ac_compile\"") >&5
4145 (eval $ac_compile) 2>&5
4146 ac_status=$?
4147 echo "$as_me:4147: \$? = $ac_status" >&5
4148 (exit "$ac_status"); } &&
4149 { ac_try='test -s "conftest.$ac_objext"'
4150 { (eval echo "$as_me:4150: \"$ac_try\"") >&5
4151 (eval $ac_try) 2>&5
4152 ac_status=$?
4153 echo "$as_me:4153: \$? = $ac_status" >&5
4154 (exit "$ac_status"); }; }; then
4155 cf_cv_posix_c_source=no
4156 else
4157 echo "$as_me: failed program was:" >&5
4158 cat "conftest.$ac_ext" >&5
4159 cf_want_posix_source=no
4160 case .$cf_POSIX_C_SOURCE in
4161 (.[12]??*)
4162 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4163 ;;
4164 (.2)
4165 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4166 cf_want_posix_source=yes
4167 ;;
4168 (.*)
4169 cf_want_posix_source=yes
4170 ;;
4171 esac
4172 if test "$cf_want_posix_source" = yes ; then
4173 cat >"conftest.$ac_ext" <<_ACEOF
4174 #line 4174 "configure"
4175 #include "confdefs.h"
4176 #include <sys/types.h>
4177 int
4178 main (void)
4179 {
4180
4181 #ifdef _POSIX_SOURCE
4182 #error _POSIX_SOURCE is defined
4183 #endif
4184 ;
4185 return 0;
4186 }
4187 _ACEOF
4188 rm -f "conftest.$ac_objext"
4189 if { (eval echo "$as_me:4189: \"$ac_compile\"") >&5
4190 (eval $ac_compile) 2>&5
4191 ac_status=$?
4192 echo "$as_me:4192: \$? = $ac_status" >&5
4193 (exit "$ac_status"); } &&
4194 { ac_try='test -s "conftest.$ac_objext"'
4195 { (eval echo "$as_me:4195: \"$ac_try\"") >&5
4196 (eval $ac_try) 2>&5
4197 ac_status=$?
4198 echo "$as_me:4198: \$? = $ac_status" >&5
4199 (exit "$ac_status"); }; }; then
4200 :
4201 else
4202 echo "$as_me: failed program was:" >&5
4203 cat "conftest.$ac_ext" >&5
4204 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4205 fi
4206 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4207 fi
4208
4209 echo "${as_me:-configure}:4209: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4210
4211 CFLAGS="$cf_trim_CFLAGS"
4212 CPPFLAGS="$cf_trim_CPPFLAGS"
4213
4214 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4215 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4216
4217 echo "${as_me:-configure}:4217: testing if the second compile does not leave our definition intact error ..." 1>&5
4218
4219 cat >"conftest.$ac_ext" <<_ACEOF
4220 #line 4220 "configure"
4221 #include "confdefs.h"
4222 #include <sys/types.h>
4223 int
4224 main (void)
4225 {
4226
4227 #ifndef _POSIX_C_SOURCE
4228 #error _POSIX_C_SOURCE is not defined
4229 #endif
4230 ;
4231 return 0;
4232 }
4233 _ACEOF
4234 rm -f "conftest.$ac_objext"
4235 if { (eval echo "$as_me:4235: \"$ac_compile\"") >&5
4236 (eval $ac_compile) 2>&5
4237 ac_status=$?
4238 echo "$as_me:4238: \$? = $ac_status" >&5
4239 (exit "$ac_status"); } &&
4240 { ac_try='test -s "conftest.$ac_objext"'
4241 { (eval echo "$as_me:4241: \"$ac_try\"") >&5
4242 (eval $ac_try) 2>&5
4243 ac_status=$?
4244 echo "$as_me:4244: \$? = $ac_status" >&5
4245 (exit "$ac_status"); }; }; then
4246 :
4247 else
4248 echo "$as_me: failed program was:" >&5
4249 cat "conftest.$ac_ext" >&5
4250 cf_cv_posix_c_source=no
4251 fi
4252 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4253 CFLAGS="$cf_save_CFLAGS"
4254 CPPFLAGS="$cf_save_CPPFLAGS"
4255
4256 fi
4257 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4258
4259 fi
4260 echo "$as_me:4260: result: $cf_cv_posix_c_source" >&5
4261 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4262
4263 if test "$cf_cv_posix_c_source" != no ; then
4264 CFLAGS="$cf_trim_CFLAGS"
4265 CPPFLAGS="$cf_trim_CPPFLAGS"
4266
4267 cf_fix_cppflags=no
4268 cf_new_cflags=
4269 cf_new_cppflags=
4270 cf_new_extra_cppflags=
4271
4272 for cf_add_cflags in $cf_cv_posix_c_source
4273 do
4274 case "$cf_fix_cppflags" in
4275 (no)
4276 case "$cf_add_cflags" in
4277 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4278 case "$cf_add_cflags" in
4279 (-D*)
4280 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4281
4282 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4283 && test -z "${cf_tst_cflags}" \
4284 && cf_fix_cppflags=yes
4285
4286 if test "$cf_fix_cppflags" = yes ; then
4287
4288 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4289 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4290
4291 continue
4292 elif test "${cf_tst_cflags}" = "\"'" ; then
4293
4294 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4295 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4296
4297 continue
4298 fi
4299 ;;
4300 esac
4301 case "$CPPFLAGS" in
4302 (*$cf_add_cflags)
4303 ;;
4304 (*)
4305 case "$cf_add_cflags" in
4306 (-D*)
4307 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4308
4309 CPPFLAGS=`echo "$CPPFLAGS" | \
4310 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4311 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4312
4313 ;;
4314 esac
4315
4316 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4317 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4318
4319 ;;
4320 esac
4321 ;;
4322 (*)
4323
4324 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4325 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4326
4327 ;;
4328 esac
4329 ;;
4330 (yes)
4331
4332 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4333 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4334
4335 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4336
4337 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4338 && test -z "${cf_tst_cflags}" \
4339 && cf_fix_cppflags=no
4340 ;;
4341 esac
4342 done
4343
4344 if test -n "$cf_new_cflags" ; then
4345
4346 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4347 CFLAGS="${CFLAGS}$cf_new_cflags"
4348
4349 fi
4350
4351 if test -n "$cf_new_cppflags" ; then
4352
4353 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4354 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4355
4356 fi
4357
4358 if test -n "$cf_new_extra_cppflags" ; then
4359
4360 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4361 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4362
4363 fi
4364
4365 fi
4366
4367 fi # cf_cv_posix_visible
4368
4369 # Some of these niche implementations use copy/paste, double-check...
4370 if test "$cf_cv_xopen_source" != no ; then
4371 test -n "$verbose" && echo " checking if _POSIX_C_SOURCE inteferes" 1>&6
4372
4373 echo "${as_me:-configure}:4373: testing checking if _POSIX_C_SOURCE inteferes ..." 1>&5
4374
4375 cat >"conftest.$ac_ext" <<_ACEOF
4376 #line 4376 "configure"
4377 #include "confdefs.h"
4378
4379 $ac_includes_default
4380
4381 int
4382 main (void)
4383 {
4384
4385 #ifndef _XOPEN_SOURCE
4386 #error _XOPEN_SOURCE is not defined
4387 #endif
4388
4389 ;
4390 return 0;
4391 }
4392 _ACEOF
4393 rm -f "conftest.$ac_objext"
4394 if { (eval echo "$as_me:4394: \"$ac_compile\"") >&5
4395 (eval $ac_compile) 2>&5
4396 ac_status=$?
4397 echo "$as_me:4397: \$? = $ac_status" >&5
4398 (exit "$ac_status"); } &&
4399 { ac_try='test -s "conftest.$ac_objext"'
4400 { (eval echo "$as_me:4400: \"$ac_try\"") >&5
4401 (eval $ac_try) 2>&5
4402 ac_status=$?
4403 echo "$as_me:4403: \$? = $ac_status" >&5
4404 (exit "$ac_status"); }; }; then
4405 :
4406 else
4407 echo "$as_me: failed program was:" >&5
4408 cat "conftest.$ac_ext" >&5
4409
4410 { echo "$as_me:4410: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
4411 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
4412 CPPFLAGS="$cf_save_xopen_cppflags"
4413 fi
4414 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4415 fi
4416 ;;
4417 esac
4418
4419 if test -n "$cf_xopen_source" ; then
4420
4421 for cf_add_cflags in $cf_xopen_source
4422 do
4423 case "x$cf_add_cflags" in
4424 (x-[DU]*)
4425
4426 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4427 while true
4428 do
4429 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'`
4430 test "$CFLAGS" != "$cf_old_cflag" || break
4431 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
4432
4433 echo "${as_me:-configure}:4433: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
4434
4435 CFLAGS="$cf_old_cflag"
4436 done
4437
4438 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4439 while true
4440 do
4441 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'`
4442 test "$CPPFLAGS" != "$cf_old_cflag" || break
4443 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
4444
4445 echo "${as_me:-configure}:4445: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
4446
4447 CPPFLAGS="$cf_old_cflag"
4448 done
4449
4450 ;;
4451 esac
4452
4453 cf_fix_cppflags=no
4454 cf_new_cflags=
4455 cf_new_cppflags=
4456 cf_new_extra_cppflags=
4457
4458 for cf_add_cflags in $cf_add_cflags
4459 do
4460 case "$cf_fix_cppflags" in
4461 (no)
4462 case "$cf_add_cflags" in
4463 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4464 case "$cf_add_cflags" in
4465 (-D*)
4466 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4467
4468 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4469 && test -z "${cf_tst_cflags}" \
4470 && cf_fix_cppflags=yes
4471
4472 if test "$cf_fix_cppflags" = yes ; then
4473
4474 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4475 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4476
4477 continue
4478 elif test "${cf_tst_cflags}" = "\"'" ; then
4479
4480 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4481 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4482
4483 continue
4484 fi
4485 ;;
4486 esac
4487 case "$CPPFLAGS" in
4488 (*$cf_add_cflags)
4489 ;;
4490 (*)
4491 case "$cf_add_cflags" in
4492 (-D*)
4493 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4494
4495 CPPFLAGS=`echo "$CPPFLAGS" | \
4496 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4497 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4498
4499 ;;
4500 esac
4501
4502 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4503 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4504
4505 ;;
4506 esac
4507 ;;
4508 (*)
4509
4510 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4511 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4512
4513 ;;
4514 esac
4515 ;;
4516 (yes)
4517
4518 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4519 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4520
4521 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4522
4523 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4524 && test -z "${cf_tst_cflags}" \
4525 && cf_fix_cppflags=no
4526 ;;
4527 esac
4528 done
4529
4530 if test -n "$cf_new_cflags" ; then
4531 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
4532
4533 echo "${as_me:-configure}:4533: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
4534
4535 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4536 CFLAGS="${CFLAGS}$cf_new_cflags"
4537
4538 fi
4539
4540 if test -n "$cf_new_cppflags" ; then
4541 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
4542
4543 echo "${as_me:-configure}:4543: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
4544
4545 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4546 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4547
4548 fi
4549
4550 if test -n "$cf_new_extra_cppflags" ; then
4551 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
4552
4553 echo "${as_me:-configure}:4553: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
4554
4555 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4556 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4557
4558 fi
4559
4560 done
4561
4562 fi
4563
4564 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
4565 echo "$as_me:4565: checking if _XOPEN_SOURCE really is set" >&5
4566 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
4567 cat >"conftest.$ac_ext" <<_ACEOF
4568 #line 4568 "configure"
4569 #include "confdefs.h"
4570 #include <stdlib.h>
4571 int
4572 main (void)
4573 {
4574
4575 #ifndef _XOPEN_SOURCE
4576 #error _XOPEN_SOURCE is not defined
4577 #endif
4578 ;
4579 return 0;
4580 }
4581 _ACEOF
4582 rm -f "conftest.$ac_objext"
4583 if { (eval echo "$as_me:4583: \"$ac_compile\"") >&5
4584 (eval $ac_compile) 2>&5
4585 ac_status=$?
4586 echo "$as_me:4586: \$? = $ac_status" >&5
4587 (exit "$ac_status"); } &&
4588 { ac_try='test -s "conftest.$ac_objext"'
4589 { (eval echo "$as_me:4589: \"$ac_try\"") >&5
4590 (eval $ac_try) 2>&5
4591 ac_status=$?
4592 echo "$as_me:4592: \$? = $ac_status" >&5
4593 (exit "$ac_status"); }; }; then
4594 cf_XOPEN_SOURCE_set=yes
4595 else
4596 echo "$as_me: failed program was:" >&5
4597 cat "conftest.$ac_ext" >&5
4598 cf_XOPEN_SOURCE_set=no
4599 fi
4600 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4601 echo "$as_me:4601: result: $cf_XOPEN_SOURCE_set" >&5
4602 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
4603 if test "$cf_XOPEN_SOURCE_set" = yes
4604 then
4605 cat >"conftest.$ac_ext" <<_ACEOF
4606 #line 4606 "configure"
4607 #include "confdefs.h"
4608 #include <stdlib.h>
4609 int
4610 main (void)
4611 {
4612
4613 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
4614 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
4615 #endif
4616 ;
4617 return 0;
4618 }
4619 _ACEOF
4620 rm -f "conftest.$ac_objext"
4621 if { (eval echo "$as_me:4621: \"$ac_compile\"") >&5
4622 (eval $ac_compile) 2>&5
4623 ac_status=$?
4624 echo "$as_me:4624: \$? = $ac_status" >&5
4625 (exit "$ac_status"); } &&
4626 { ac_try='test -s "conftest.$ac_objext"'
4627 { (eval echo "$as_me:4627: \"$ac_try\"") >&5
4628 (eval $ac_try) 2>&5
4629 ac_status=$?
4630 echo "$as_me:4630: \$? = $ac_status" >&5
4631 (exit "$ac_status"); }; }; then
4632 cf_XOPEN_SOURCE_set_ok=yes
4633 else
4634 echo "$as_me: failed program was:" >&5
4635 cat "conftest.$ac_ext" >&5
4636 cf_XOPEN_SOURCE_set_ok=no
4637 fi
4638 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4639 if test "$cf_XOPEN_SOURCE_set_ok" = no
4640 then
4641 { echo "$as_me:4641: WARNING: _XOPEN_SOURCE is lower than requested" >&5
4642 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
4643 fi
4644 else
4645
4646 echo "$as_me:4646: checking if we should define _XOPEN_SOURCE" >&5
4647 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4648 if test "${cf_cv_xopen_source+set}" = set; then
4649 echo $ECHO_N "(cached) $ECHO_C" >&6
4650 else
4651
4652 cat >"conftest.$ac_ext" <<_ACEOF
4653 #line 4653 "configure"
4654 #include "confdefs.h"
4655
4656 $ac_includes_default
4657
4658 int
4659 main (void)
4660 {
4661
4662 #ifndef _XOPEN_SOURCE
4663 #error _XOPEN_SOURCE is not defined
4664 #endif
4665
4666 ;
4667 return 0;
4668 }
4669 _ACEOF
4670 rm -f "conftest.$ac_objext"
4671 if { (eval echo "$as_me:4671: \"$ac_compile\"") >&5
4672 (eval $ac_compile) 2>&5
4673 ac_status=$?
4674 echo "$as_me:4674: \$? = $ac_status" >&5
4675 (exit "$ac_status"); } &&
4676 { ac_try='test -s "conftest.$ac_objext"'
4677 { (eval echo "$as_me:4677: \"$ac_try\"") >&5
4678 (eval $ac_try) 2>&5
4679 ac_status=$?
4680 echo "$as_me:4680: \$? = $ac_status" >&5
4681 (exit "$ac_status"); }; }; then
4682 cf_cv_xopen_source=no
4683 else
4684 echo "$as_me: failed program was:" >&5
4685 cat "conftest.$ac_ext" >&5
4686 cf_save="$CPPFLAGS"
4687
4688 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4689 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4690
4691 cat >"conftest.$ac_ext" <<_ACEOF
4692 #line 4692 "configure"
4693 #include "confdefs.h"
4694
4695 $ac_includes_default
4696
4697 int
4698 main (void)
4699 {
4700
4701 #ifndef _XOPEN_SOURCE
4702 #error _XOPEN_SOURCE is not defined
4703 #endif
4704
4705 ;
4706 return 0;
4707 }
4708 _ACEOF
4709 rm -f "conftest.$ac_objext"
4710 if { (eval echo "$as_me:4710: \"$ac_compile\"") >&5
4711 (eval $ac_compile) 2>&5
4712 ac_status=$?
4713 echo "$as_me:4713: \$? = $ac_status" >&5
4714 (exit "$ac_status"); } &&
4715 { ac_try='test -s "conftest.$ac_objext"'
4716 { (eval echo "$as_me:4716: \"$ac_try\"") >&5
4717 (eval $ac_try) 2>&5
4718 ac_status=$?
4719 echo "$as_me:4719: \$? = $ac_status" >&5
4720 (exit "$ac_status"); }; }; then
4721 cf_cv_xopen_source=no
4722 else
4723 echo "$as_me: failed program was:" >&5
4724 cat "conftest.$ac_ext" >&5
4725 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4726 fi
4727 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4728 CPPFLAGS="$cf_save"
4729
4730 fi
4731 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4732
4733 fi
4734 echo "$as_me:4734: result: $cf_cv_xopen_source" >&5
4735 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4736
4737 if test "$cf_cv_xopen_source" != no ; then
4738
4739 CFLAGS=`echo "$CFLAGS" | \
4740 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4741 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4742
4743 CPPFLAGS=`echo "$CPPFLAGS" | \
4744 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4745 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4746
4747 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4748
4749 for cf_add_cflags in $cf_temp_xopen_source
4750 do
4751 case "x$cf_add_cflags" in
4752 (x-[DU]*)
4753
4754 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4755 while true
4756 do
4757 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'`
4758 test "$CFLAGS" != "$cf_old_cflag" || break
4759
4760 CFLAGS="$cf_old_cflag"
4761 done
4762
4763 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4764 while true
4765 do
4766 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'`
4767 test "$CPPFLAGS" != "$cf_old_cflag" || break
4768
4769 CPPFLAGS="$cf_old_cflag"
4770 done
4771
4772 ;;
4773 esac
4774
4775 cf_fix_cppflags=no
4776 cf_new_cflags=
4777 cf_new_cppflags=
4778 cf_new_extra_cppflags=
4779
4780 for cf_add_cflags in $cf_add_cflags
4781 do
4782 case "$cf_fix_cppflags" in
4783 (no)
4784 case "$cf_add_cflags" in
4785 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4786 case "$cf_add_cflags" in
4787 (-D*)
4788 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4789
4790 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4791 && test -z "${cf_tst_cflags}" \
4792 && cf_fix_cppflags=yes
4793
4794 if test "$cf_fix_cppflags" = yes ; then
4795
4796 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4797 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4798
4799 continue
4800 elif test "${cf_tst_cflags}" = "\"'" ; then
4801
4802 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4803 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4804
4805 continue
4806 fi
4807 ;;
4808 esac
4809 case "$CPPFLAGS" in
4810 (*$cf_add_cflags)
4811 ;;
4812 (*)
4813 case "$cf_add_cflags" in
4814 (-D*)
4815 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4816
4817 CPPFLAGS=`echo "$CPPFLAGS" | \
4818 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4819 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4820
4821 ;;
4822 esac
4823
4824 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4825 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4826
4827 ;;
4828 esac
4829 ;;
4830 (*)
4831
4832 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4833 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4834
4835 ;;
4836 esac
4837 ;;
4838 (yes)
4839
4840 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4841 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4842
4843 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4844
4845 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4846 && test -z "${cf_tst_cflags}" \
4847 && cf_fix_cppflags=no
4848 ;;
4849 esac
4850 done
4851
4852 if test -n "$cf_new_cflags" ; then
4853
4854 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4855 CFLAGS="${CFLAGS}$cf_new_cflags"
4856
4857 fi
4858
4859 if test -n "$cf_new_cppflags" ; then
4860
4861 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4862 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4863
4864 fi
4865
4866 if test -n "$cf_new_extra_cppflags" ; then
4867
4868 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4869 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4870
4871 fi
4872
4873 done
4874
4875 fi
4876
4877 fi
4878 fi
4879 fi # cf_cv_posix_visible
4880
4881 echo "$as_me:4881: checking if SIGWINCH is defined" >&5
4882 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
4883 if test "${cf_cv_define_sigwinch+set}" = set; then
4884 echo $ECHO_N "(cached) $ECHO_C" >&6
4885 else
4886
4887 cat >"conftest.$ac_ext" <<_ACEOF
4888 #line 4888 "configure"
4889 #include "confdefs.h"
4890
4891 #include <sys/types.h>
4892 #include <sys/signal.h>
4893
4894 int
4895 main (void)
4896 {
4897 int x = SIGWINCH; (void)x
4898 ;
4899 return 0;
4900 }
4901 _ACEOF
4902 rm -f "conftest.$ac_objext"
4903 if { (eval echo "$as_me:4903: \"$ac_compile\"") >&5
4904 (eval $ac_compile) 2>&5
4905 ac_status=$?
4906 echo "$as_me:4906: \$? = $ac_status" >&5
4907 (exit "$ac_status"); } &&
4908 { ac_try='test -s "conftest.$ac_objext"'
4909 { (eval echo "$as_me:4909: \"$ac_try\"") >&5
4910 (eval $ac_try) 2>&5
4911 ac_status=$?
4912 echo "$as_me:4912: \$? = $ac_status" >&5
4913 (exit "$ac_status"); }; }; then
4914 cf_cv_define_sigwinch=yes
4915 else
4916 echo "$as_me: failed program was:" >&5
4917 cat "conftest.$ac_ext" >&5
4918 cat >"conftest.$ac_ext" <<_ACEOF
4919 #line 4919 "configure"
4920 #include "confdefs.h"
4921
4922 #undef _XOPEN_SOURCE
4923 #undef _POSIX_SOURCE
4924 #undef _POSIX_C_SOURCE
4925 #include <sys/types.h>
4926 #include <sys/signal.h>
4927
4928 int
4929 main (void)
4930 {
4931 int x = SIGWINCH; (void)x
4932 ;
4933 return 0;
4934 }
4935 _ACEOF
4936 rm -f "conftest.$ac_objext"
4937 if { (eval echo "$as_me:4937: \"$ac_compile\"") >&5
4938 (eval $ac_compile) 2>&5
4939 ac_status=$?
4940 echo "$as_me:4940: \$? = $ac_status" >&5
4941 (exit "$ac_status"); } &&
4942 { ac_try='test -s "conftest.$ac_objext"'
4943 { (eval echo "$as_me:4943: \"$ac_try\"") >&5
4944 (eval $ac_try) 2>&5
4945 ac_status=$?
4946 echo "$as_me:4946: \$? = $ac_status" >&5
4947 (exit "$ac_status"); }; }; then
4948 cf_cv_define_sigwinch=maybe
4949 else
4950 echo "$as_me: failed program was:" >&5
4951 cat "conftest.$ac_ext" >&5
4952 cf_cv_define_sigwinch=no
4953 fi
4954 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4955
4956 fi
4957 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4958
4959 fi
4960 echo "$as_me:4960: result: $cf_cv_define_sigwinch" >&5
4961 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
4962
4963 if test "$cf_cv_define_sigwinch" = maybe ; then
4964 echo "$as_me:4964: checking for actual SIGWINCH definition" >&5
4965 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
4966 if test "${cf_cv_fixup_sigwinch+set}" = set; then
4967 echo $ECHO_N "(cached) $ECHO_C" >&6
4968 else
4969
4970 cf_cv_fixup_sigwinch=unknown
4971 cf_sigwinch=32
4972 while test "$cf_sigwinch" != 1
4973 do
4974 cat >"conftest.$ac_ext" <<_ACEOF
4975 #line 4975 "configure"
4976 #include "confdefs.h"
4977
4978 #undef _XOPEN_SOURCE
4979 #undef _POSIX_SOURCE
4980 #undef _POSIX_C_SOURCE
4981 #include <sys/types.h>
4982 #include <sys/signal.h>
4983
4984 int
4985 main (void)
4986 {
4987
4988 #if SIGWINCH != $cf_sigwinch
4989 #error SIGWINCH is not $cf_sigwinch
4990 #endif
4991 int x = SIGWINCH; (void)x
4992 ;
4993 return 0;
4994 }
4995 _ACEOF
4996 rm -f "conftest.$ac_objext"
4997 if { (eval echo "$as_me:4997: \"$ac_compile\"") >&5
4998 (eval $ac_compile) 2>&5
4999 ac_status=$?
5000 echo "$as_me:5000: \$? = $ac_status" >&5
5001 (exit "$ac_status"); } &&
5002 { ac_try='test -s "conftest.$ac_objext"'
5003 { (eval echo "$as_me:5003: \"$ac_try\"") >&5
5004 (eval $ac_try) 2>&5
5005 ac_status=$?
5006 echo "$as_me:5006: \$? = $ac_status" >&5
5007 (exit "$ac_status"); }; }; then
5008 cf_cv_fixup_sigwinch=$cf_sigwinch
5009 break
5010 else
5011 echo "$as_me: failed program was:" >&5
5012 cat "conftest.$ac_ext" >&5
5013 fi
5014 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5015
5016 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
5017 done
5018
5019 fi
5020 echo "$as_me:5020: result: $cf_cv_fixup_sigwinch" >&5
5021 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
5022
5023 if test "$cf_cv_fixup_sigwinch" != unknown ; then
5024 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
5025 fi
5026 fi
5027
5028 ### checks for header files
5029
5030 echo "$as_me:5030: checking for ANSI C header files" >&5
5031 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5032 if test "${ac_cv_header_stdc+set}" = set; then
5033 echo $ECHO_N "(cached) $ECHO_C" >&6
5034 else
5035 cat >"conftest.$ac_ext" <<_ACEOF
5036 #line 5036 "configure"
5037 #include "confdefs.h"
5038 #include <stdlib.h>
5039 #include <stdarg.h>
5040 #include <string.h>
5041 #include <float.h>
5042
5043 _ACEOF
5044 if { (eval echo "$as_me:5044: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5045 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5046 ac_status=$?
5047 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5048 rm -f conftest.er1
5049 cat conftest.err >&5
5050 echo "$as_me:5050: \$? = $ac_status" >&5
5051 (exit "$ac_status"); } >/dev/null; then
5052 if test -s conftest.err; then
5053 ac_cpp_err=$ac_c_preproc_warn_flag
5054 else
5055 ac_cpp_err=
5056 fi
5057 else
5058 ac_cpp_err=yes
5059 fi
5060 if test -z "$ac_cpp_err"; then
5061 ac_cv_header_stdc=yes
5062 else
5063 echo "$as_me: failed program was:" >&5
5064 cat "conftest.$ac_ext" >&5
5065 ac_cv_header_stdc=no
5066 fi
5067 rm -f conftest.err "conftest.$ac_ext"
5068
5069 if test $ac_cv_header_stdc = yes; then
5070 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5071 cat >"conftest.$ac_ext" <<_ACEOF
5072 #line 5072 "configure"
5073 #include "confdefs.h"
5074 #include <string.h>
5075
5076 _ACEOF
5077 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5078 $EGREP "memchr" >/dev/null 2>&1; then
5079 :
5080 else
5081 ac_cv_header_stdc=no
5082 fi
5083 rm -rf conftest*
5084
5085 fi
5086
5087 if test $ac_cv_header_stdc = yes; then
5088 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5089 cat >"conftest.$ac_ext" <<_ACEOF
5090 #line 5090 "configure"
5091 #include "confdefs.h"
5092 #include <stdlib.h>
5093
5094 _ACEOF
5095 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5096 $EGREP "free" >/dev/null 2>&1; then
5097 :
5098 else
5099 ac_cv_header_stdc=no
5100 fi
5101 rm -rf conftest*
5102
5103 fi
5104
5105 if test $ac_cv_header_stdc = yes; then
5106 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5107 if test "$cross_compiling" = yes; then
5108 :
5109 else
5110 cat >"conftest.$ac_ext" <<_ACEOF
5111 #line 5111 "configure"
5112 #include "confdefs.h"
5113 #include <ctype.h>
5114 #if ((' ' & 0x0FF) == 0x020)
5115 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5116 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5117 #else
5118 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
5119 || ('j' <= (c) && (c) <= 'r') \
5120 || ('s' <= (c) && (c) <= 'z'))
5121 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5122 #endif
5123
5124 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5125 int
5126 main (void)
5127 {
5128 int i;
5129 for (i = 0; i < 256; i++)
5130 if (XOR (islower (i), ISLOWER (i))
5131 || toupper (i) != TOUPPER (i))
5132 $ac_main_return(2);
5133 $ac_main_return (0);
5134 }
5135 _ACEOF
5136 rm -f "conftest$ac_exeext"
5137 if { (eval echo "$as_me:5137: \"$ac_link\"") >&5
5138 (eval $ac_link) 2>&5
5139 ac_status=$?
5140 echo "$as_me:5140: \$? = $ac_status" >&5
5141 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5142 { (eval echo "$as_me:5142: \"$ac_try\"") >&5
5143 (eval $ac_try) 2>&5
5144 ac_status=$?
5145 echo "$as_me:5145: \$? = $ac_status" >&5
5146 (exit "$ac_status"); }; }; then
5147 :
5148 else
5149 echo "$as_me: program exited with status $ac_status" >&5
5150 echo "$as_me: failed program was:" >&5
5151 cat "conftest.$ac_ext" >&5
5152 ac_cv_header_stdc=no
5153 fi
5154 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5155 fi
5156 fi
5157 fi
5158 echo "$as_me:5158: result: $ac_cv_header_stdc" >&5
5159 echo "${ECHO_T}$ac_cv_header_stdc" >&6
5160 if test $ac_cv_header_stdc = yes; then
5161
5162 cat >>confdefs.h <<\EOF
5163 #define STDC_HEADERS 1
5164 EOF
5165
5166 fi
5167
5168 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5169
5170 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5171 inttypes.h stdint.h unistd.h
5172 do
5173 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5174 echo "$as_me:5174: checking for $ac_header" >&5
5175 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5176 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5177 echo $ECHO_N "(cached) $ECHO_C" >&6
5178 else
5179 cat >"conftest.$ac_ext" <<_ACEOF
5180 #line 5180 "configure"
5181 #include "confdefs.h"
5182 $ac_includes_default
5183 #include <$ac_header>
5184 _ACEOF
5185 rm -f "conftest.$ac_objext"
5186 if { (eval echo "$as_me:5186: \"$ac_compile\"") >&5
5187 (eval $ac_compile) 2>&5
5188 ac_status=$?
5189 echo "$as_me:5189: \$? = $ac_status" >&5
5190 (exit "$ac_status"); } &&
5191 { ac_try='test -s "conftest.$ac_objext"'
5192 { (eval echo "$as_me:5192: \"$ac_try\"") >&5
5193 (eval $ac_try) 2>&5
5194 ac_status=$?
5195 echo "$as_me:5195: \$? = $ac_status" >&5
5196 (exit "$ac_status"); }; }; then
5197 eval "$as_ac_Header=yes"
5198 else
5199 echo "$as_me: failed program was:" >&5
5200 cat "conftest.$ac_ext" >&5
5201 eval "$as_ac_Header=no"
5202 fi
5203 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5204 fi
5205 echo "$as_me:5205: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5206 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5207 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5208 cat >>confdefs.h <<EOF
5209 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5210 EOF
5211
5212 fi
5213 done
5214
5215 echo "$as_me:5215: checking whether exit is declared" >&5
5216 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
5217 if test "${ac_cv_have_decl_exit+set}" = set; then
5218 echo $ECHO_N "(cached) $ECHO_C" >&6
5219 else
5220 cat >"conftest.$ac_ext" <<_ACEOF
5221 #line 5221 "configure"
5222 #include "confdefs.h"
5223 $ac_includes_default
5224 int
5225 main (void)
5226 {
5227 #ifndef exit
5228 char *p = (char *) exit; (void) p;
5229 #endif
5230
5231 ;
5232 return 0;
5233 }
5234 _ACEOF
5235 rm -f "conftest.$ac_objext"
5236 if { (eval echo "$as_me:5236: \"$ac_compile\"") >&5
5237 (eval $ac_compile) 2>&5
5238 ac_status=$?
5239 echo "$as_me:5239: \$? = $ac_status" >&5
5240 (exit "$ac_status"); } &&
5241 { ac_try='test -s "conftest.$ac_objext"'
5242 { (eval echo "$as_me:5242: \"$ac_try\"") >&5
5243 (eval $ac_try) 2>&5
5244 ac_status=$?
5245 echo "$as_me:5245: \$? = $ac_status" >&5
5246 (exit "$ac_status"); }; }; then
5247 ac_cv_have_decl_exit=yes
5248 else
5249 echo "$as_me: failed program was:" >&5
5250 cat "conftest.$ac_ext" >&5
5251 ac_cv_have_decl_exit=no
5252 fi
5253 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5254 fi
5255 echo "$as_me:5255: result: $ac_cv_have_decl_exit" >&5
5256 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
5257
5258 for ac_header in \
5259 ncurses/curses.h \
5260 ncurses/term.h \
5261 sys/ptem.h \
5262 sys/ttydefaults.h \
5263 term.h \
5264 termios.h \
5265 wchar.h \
5266
5267 do
5268 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5269 echo "$as_me:5269: checking for $ac_header" >&5
5270 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5271 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5272 echo $ECHO_N "(cached) $ECHO_C" >&6
5273 else
5274 cat >"conftest.$ac_ext" <<_ACEOF
5275 #line 5275 "configure"
5276 #include "confdefs.h"
5277 #include <$ac_header>
5278 _ACEOF
5279 if { (eval echo "$as_me:5279: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5280 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5281 ac_status=$?
5282 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5283 rm -f conftest.er1
5284 cat conftest.err >&5
5285 echo "$as_me:5285: \$? = $ac_status" >&5
5286 (exit "$ac_status"); } >/dev/null; then
5287 if test -s conftest.err; then
5288 ac_cpp_err=$ac_c_preproc_warn_flag
5289 else
5290 ac_cpp_err=
5291 fi
5292 else
5293 ac_cpp_err=yes
5294 fi
5295 if test -z "$ac_cpp_err"; then
5296 eval "$as_ac_Header=yes"
5297 else
5298 echo "$as_me: failed program was:" >&5
5299 cat "conftest.$ac_ext" >&5
5300 eval "$as_ac_Header=no"
5301 fi
5302 rm -f conftest.err "conftest.$ac_ext"
5303 fi
5304 echo "$as_me:5304: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5305 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5306 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5307 cat >>confdefs.h <<EOF
5308 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5309 EOF
5310
5311 fi
5312 done
5313
5314 echo "$as_me:5314: checking whether time.h and sys/time.h may both be included" >&5
5315 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
5316 if test "${ac_cv_header_time+set}" = set; then
5317 echo $ECHO_N "(cached) $ECHO_C" >&6
5318 else
5319 cat >"conftest.$ac_ext" <<_ACEOF
5320 #line 5320 "configure"
5321 #include "confdefs.h"
5322 #include <sys/types.h>
5323 #include <sys/time.h>
5324 #include <time.h>
5325
5326 int
5327 main (void)
5328 {
5329 if ((struct tm *) 0)
5330 return 0;
5331 ;
5332 return 0;
5333 }
5334 _ACEOF
5335 rm -f "conftest.$ac_objext"
5336 if { (eval echo "$as_me:5336: \"$ac_compile\"") >&5
5337 (eval $ac_compile) 2>&5
5338 ac_status=$?
5339 echo "$as_me:5339: \$? = $ac_status" >&5
5340 (exit "$ac_status"); } &&
5341 { ac_try='test -s "conftest.$ac_objext"'
5342 { (eval echo "$as_me:5342: \"$ac_try\"") >&5
5343 (eval $ac_try) 2>&5
5344 ac_status=$?
5345 echo "$as_me:5345: \$? = $ac_status" >&5
5346 (exit "$ac_status"); }; }; then
5347 ac_cv_header_time=yes
5348 else
5349 echo "$as_me: failed program was:" >&5
5350 cat "conftest.$ac_ext" >&5
5351 ac_cv_header_time=no
5352 fi
5353 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5354 fi
5355 echo "$as_me:5355: result: $ac_cv_header_time" >&5
5356 echo "${ECHO_T}$ac_cv_header_time" >&6
5357 if test $ac_cv_header_time = yes; then
5358
5359 cat >>confdefs.h <<\EOF
5360 #define TIME_WITH_SYS_TIME 1
5361 EOF
5362
5363 fi
5364
5365 echo "$as_me:5365: checking for nl_langinfo and CODESET" >&5
5366 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
5367 if test "${am_cv_langinfo_codeset+set}" = set; then
5368 echo $ECHO_N "(cached) $ECHO_C" >&6
5369 else
5370 cat >"conftest.$ac_ext" <<_ACEOF
5371 #line 5371 "configure"
5372 #include "confdefs.h"
5373
5374 $ac_includes_default
5375 #include <langinfo.h>
5376 int
5377 main (void)
5378 {
5379 char* cs = nl_langinfo(CODESET); (void)cs
5380 ;
5381 return 0;
5382 }
5383 _ACEOF
5384 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5385 if { (eval echo "$as_me:5385: \"$ac_link\"") >&5
5386 (eval $ac_link) 2>&5
5387 ac_status=$?
5388 echo "$as_me:5388: \$? = $ac_status" >&5
5389 (exit "$ac_status"); } &&
5390 { ac_try='test -s "conftest$ac_exeext"'
5391 { (eval echo "$as_me:5391: \"$ac_try\"") >&5
5392 (eval $ac_try) 2>&5
5393 ac_status=$?
5394 echo "$as_me:5394: \$? = $ac_status" >&5
5395 (exit "$ac_status"); }; }; then
5396 am_cv_langinfo_codeset=yes
5397 else
5398 echo "$as_me: failed program was:" >&5
5399 cat "conftest.$ac_ext" >&5
5400 am_cv_langinfo_codeset=no
5401 fi
5402 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5403
5404 fi
5405 echo "$as_me:5405: result: $am_cv_langinfo_codeset" >&5
5406 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
5407 if test "$am_cv_langinfo_codeset" = yes; then
5408
5409 cat >>confdefs.h <<\EOF
5410 #define HAVE_LANGINFO_CODESET 1
5411 EOF
5412
5413 fi
5414
5415 ### checks for typedefs
5416
5417 echo "$as_me:5417: checking for signal global datatype" >&5
5418 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
5419 if test "${cf_cv_sig_atomic_t+set}" = set; then
5420 echo $ECHO_N "(cached) $ECHO_C" >&6
5421 else
5422
5423 for cf_type in \
5424 "volatile sig_atomic_t" \
5425 "sig_atomic_t" \
5426 "int"
5427 do
5428 cat >"conftest.$ac_ext" <<_ACEOF
5429 #line 5429 "configure"
5430 #include "confdefs.h"
5431
5432 #include <sys/types.h>
5433 #include <signal.h>
5434 #include <stdio.h>
5435
5436 extern $cf_type x;
5437 $cf_type x;
5438 static void handler(int sig)
5439 {
5440 (void)sig;
5441 x = 5;
5442 }
5443 int
5444 main (void)
5445 {
5446 signal(SIGINT, handler);
5447 x = 1
5448 ;
5449 return 0;
5450 }
5451 _ACEOF
5452 rm -f "conftest.$ac_objext"
5453 if { (eval echo "$as_me:5453: \"$ac_compile\"") >&5
5454 (eval $ac_compile) 2>&5
5455 ac_status=$?
5456 echo "$as_me:5456: \$? = $ac_status" >&5
5457 (exit "$ac_status"); } &&
5458 { ac_try='test -s "conftest.$ac_objext"'
5459 { (eval echo "$as_me:5459: \"$ac_try\"") >&5
5460 (eval $ac_try) 2>&5
5461 ac_status=$?
5462 echo "$as_me:5462: \$? = $ac_status" >&5
5463 (exit "$ac_status"); }; }; then
5464 cf_cv_sig_atomic_t=$cf_type
5465 else
5466 echo "$as_me: failed program was:" >&5
5467 cat "conftest.$ac_ext" >&5
5468 cf_cv_sig_atomic_t=no
5469 fi
5470 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5471 test "$cf_cv_sig_atomic_t" != no && break
5472 done
5473
5474 fi
5475
5476 echo "$as_me:5476: result: $cf_cv_sig_atomic_t" >&5
5477 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
5478 test "$cf_cv_sig_atomic_t" != no &&
5479 cat >>confdefs.h <<EOF
5480 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
5481 EOF
5482
5483 echo "$as_me:5483: checking for time_t" >&5
5484 echo $ECHO_N "checking for time_t... $ECHO_C" >&6
5485 if test "${ac_cv_type_time_t+set}" = set; then
5486 echo $ECHO_N "(cached) $ECHO_C" >&6
5487 else
5488 cat >"conftest.$ac_ext" <<_ACEOF
5489 #line 5489 "configure"
5490 #include "confdefs.h"
5491 $ac_includes_default
5492 int
5493 main (void)
5494 {
5495 if ((time_t *) 0)
5496 return 0;
5497 if (sizeof (time_t))
5498 return 0;
5499 ;
5500 return 0;
5501 }
5502 _ACEOF
5503 rm -f "conftest.$ac_objext"
5504 if { (eval echo "$as_me:5504: \"$ac_compile\"") >&5
5505 (eval $ac_compile) 2>&5
5506 ac_status=$?
5507 echo "$as_me:5507: \$? = $ac_status" >&5
5508 (exit "$ac_status"); } &&
5509 { ac_try='test -s "conftest.$ac_objext"'
5510 { (eval echo "$as_me:5510: \"$ac_try\"") >&5
5511 (eval $ac_try) 2>&5
5512 ac_status=$?
5513 echo "$as_me:5513: \$? = $ac_status" >&5
5514 (exit "$ac_status"); }; }; then
5515 ac_cv_type_time_t=yes
5516 else
5517 echo "$as_me: failed program was:" >&5
5518 cat "conftest.$ac_ext" >&5
5519 ac_cv_type_time_t=no
5520 fi
5521 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5522 fi
5523 echo "$as_me:5523: result: $ac_cv_type_time_t" >&5
5524 echo "${ECHO_T}$ac_cv_type_time_t" >&6
5525 if test "$ac_cv_type_time_t" = yes; then
5526 :
5527 else
5528
5529 cat >>confdefs.h <<EOF
5530 #define time_t long
5531 EOF
5532
5533 fi
5534
5535 echo "$as_me:5535: checking for cc_t in <termios.h> or <termio.h>" >&5
5536 echo $ECHO_N "checking for cc_t in <termios.h> or <termio.h>... $ECHO_C" >&6
5537 if test "${cf_cv_type_cc_t+set}" = set; then
5538 echo $ECHO_N "(cached) $ECHO_C" >&6
5539 else
5540
5541 cat >"conftest.$ac_ext" <<_ACEOF
5542 #line 5542 "configure"
5543 #include "confdefs.h"
5544
5545 #include <sys/types.h>
5546 #if defined(HAVE_TERMIOS_H)
5547 #include <termios.h>
5548 #else
5549 #include <termio.h>
5550 #include <sys/ioctl.h>
5551 #endif
5552
5553 int
5554 main (void)
5555 {
5556 cc_t x; (void)x
5557 ;
5558 return 0;
5559 }
5560 _ACEOF
5561 rm -f "conftest.$ac_objext"
5562 if { (eval echo "$as_me:5562: \"$ac_compile\"") >&5
5563 (eval $ac_compile) 2>&5
5564 ac_status=$?
5565 echo "$as_me:5565: \$? = $ac_status" >&5
5566 (exit "$ac_status"); } &&
5567 { ac_try='test -s "conftest.$ac_objext"'
5568 { (eval echo "$as_me:5568: \"$ac_try\"") >&5
5569 (eval $ac_try) 2>&5
5570 ac_status=$?
5571 echo "$as_me:5571: \$? = $ac_status" >&5
5572 (exit "$ac_status"); }; }; then
5573 cf_cv_type_cc_t=yes
5574 else
5575 echo "$as_me: failed program was:" >&5
5576 cat "conftest.$ac_ext" >&5
5577 cf_cv_type_cc_t=no
5578 fi
5579 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5580
5581 fi
5582
5583 echo "$as_me:5583: result: $cf_cv_type_cc_t" >&5
5584 echo "${ECHO_T}$cf_cv_type_cc_t" >&6
5585 test $cf_cv_type_cc_t = no &&
5586 cat >>confdefs.h <<\EOF
5587 #define cc_t unsigned char
5588 EOF
5589
5590 echo "$as_me:5590: checking for nfds_t in <poll.h>" >&5
5591 echo $ECHO_N "checking for nfds_t in <poll.h>... $ECHO_C" >&6
5592 if test "${cf_cv_type_nfds_t+set}" = set; then
5593 echo $ECHO_N "(cached) $ECHO_C" >&6
5594 else
5595
5596 cat >"conftest.$ac_ext" <<_ACEOF
5597 #line 5597 "configure"
5598 #include "confdefs.h"
5599
5600 $ac_includes_default
5601 #include <poll.h>
5602
5603 int
5604 main (void)
5605 {
5606 nfds_t x; (void)x
5607 ;
5608 return 0;
5609 }
5610 _ACEOF
5611 rm -f "conftest.$ac_objext"
5612 if { (eval echo "$as_me:5612: \"$ac_compile\"") >&5
5613 (eval $ac_compile) 2>&5
5614 ac_status=$?
5615 echo "$as_me:5615: \$? = $ac_status" >&5
5616 (exit "$ac_status"); } &&
5617 { ac_try='test -s "conftest.$ac_objext"'
5618 { (eval echo "$as_me:5618: \"$ac_try\"") >&5
5619 (eval $ac_try) 2>&5
5620 ac_status=$?
5621 echo "$as_me:5621: \$? = $ac_status" >&5
5622 (exit "$ac_status"); }; }; then
5623 cf_cv_type_nfds_t=yes
5624 else
5625 echo "$as_me: failed program was:" >&5
5626 cat "conftest.$ac_ext" >&5
5627 cf_cv_type_nfds_t=no
5628 fi
5629 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5630
5631 fi
5632
5633 echo "$as_me:5633: result: $cf_cv_type_nfds_t" >&5
5634 echo "${ECHO_T}$cf_cv_type_nfds_t" >&6
5635 test $cf_cv_type_nfds_t = no &&
5636 cat >>confdefs.h <<\EOF
5637 #define nfds_t unsigned
5638 EOF
5639
5640 echo "$as_me:5640: checking for mode_t" >&5
5641 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5642 if test "${ac_cv_type_mode_t+set}" = set; then
5643 echo $ECHO_N "(cached) $ECHO_C" >&6
5644 else
5645 cat >"conftest.$ac_ext" <<_ACEOF
5646 #line 5646 "configure"
5647 #include "confdefs.h"
5648 $ac_includes_default
5649 int
5650 main (void)
5651 {
5652 if ((mode_t *) 0)
5653 return 0;
5654 if (sizeof (mode_t))
5655 return 0;
5656 ;
5657 return 0;
5658 }
5659 _ACEOF
5660 rm -f "conftest.$ac_objext"
5661 if { (eval echo "$as_me:5661: \"$ac_compile\"") >&5
5662 (eval $ac_compile) 2>&5
5663 ac_status=$?
5664 echo "$as_me:5664: \$? = $ac_status" >&5
5665 (exit "$ac_status"); } &&
5666 { ac_try='test -s "conftest.$ac_objext"'
5667 { (eval echo "$as_me:5667: \"$ac_try\"") >&5
5668 (eval $ac_try) 2>&5
5669 ac_status=$?
5670 echo "$as_me:5670: \$? = $ac_status" >&5
5671 (exit "$ac_status"); }; }; then
5672 ac_cv_type_mode_t=yes
5673 else
5674 echo "$as_me: failed program was:" >&5
5675 cat "conftest.$ac_ext" >&5
5676 ac_cv_type_mode_t=no
5677 fi
5678 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5679 fi
5680 echo "$as_me:5680: result: $ac_cv_type_mode_t" >&5
5681 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5682 if test "$ac_cv_type_mode_t" = yes; then
5683 :
5684 else
5685
5686 cat >>confdefs.h <<EOF
5687 #define mode_t int
5688 EOF
5689
5690 fi
5691
5692 echo "$as_me:5692: checking for pid_t" >&5
5693 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5694 if test "${ac_cv_type_pid_t+set}" = set; then
5695 echo $ECHO_N "(cached) $ECHO_C" >&6
5696 else
5697 cat >"conftest.$ac_ext" <<_ACEOF
5698 #line 5698 "configure"
5699 #include "confdefs.h"
5700 $ac_includes_default
5701 int
5702 main (void)
5703 {
5704 if ((pid_t *) 0)
5705 return 0;
5706 if (sizeof (pid_t))
5707 return 0;
5708 ;
5709 return 0;
5710 }
5711 _ACEOF
5712 rm -f "conftest.$ac_objext"
5713 if { (eval echo "$as_me:5713: \"$ac_compile\"") >&5
5714 (eval $ac_compile) 2>&5
5715 ac_status=$?
5716 echo "$as_me:5716: \$? = $ac_status" >&5
5717 (exit "$ac_status"); } &&
5718 { ac_try='test -s "conftest.$ac_objext"'
5719 { (eval echo "$as_me:5719: \"$ac_try\"") >&5
5720 (eval $ac_try) 2>&5
5721 ac_status=$?
5722 echo "$as_me:5722: \$? = $ac_status" >&5
5723 (exit "$ac_status"); }; }; then
5724 ac_cv_type_pid_t=yes
5725 else
5726 echo "$as_me: failed program was:" >&5
5727 cat "conftest.$ac_ext" >&5
5728 ac_cv_type_pid_t=no
5729 fi
5730 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5731 fi
5732 echo "$as_me:5732: result: $ac_cv_type_pid_t" >&5
5733 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5734 if test "$ac_cv_type_pid_t" = yes; then
5735 :
5736 else
5737
5738 cat >>confdefs.h <<EOF
5739 #define pid_t int
5740 EOF
5741
5742 fi
5743
5744 echo "$as_me:5744: checking for uid_t in sys/types.h" >&5
5745 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5746 if test "${ac_cv_type_uid_t+set}" = set; then
5747 echo $ECHO_N "(cached) $ECHO_C" >&6
5748 else
5749 cat >"conftest.$ac_ext" <<_ACEOF
5750 #line 5750 "configure"
5751 #include "confdefs.h"
5752 #include <sys/types.h>
5753
5754 _ACEOF
5755 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5756 $EGREP "uid_t" >/dev/null 2>&1; then
5757 ac_cv_type_uid_t=yes
5758 else
5759 ac_cv_type_uid_t=no
5760 fi
5761 rm -rf conftest*
5762
5763 fi
5764 echo "$as_me:5764: result: $ac_cv_type_uid_t" >&5
5765 echo "${ECHO_T}$ac_cv_type_uid_t" >&6
5766 if test $ac_cv_type_uid_t = no; then
5767
5768 cat >>confdefs.h <<\EOF
5769 #define uid_t int
5770 EOF
5771
5772 cat >>confdefs.h <<\EOF
5773 #define gid_t int
5774 EOF
5775
5776 fi
5777
5778 echo "$as_me:5778: checking for off_t" >&5
5779 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5780 if test "${ac_cv_type_off_t+set}" = set; then
5781 echo $ECHO_N "(cached) $ECHO_C" >&6
5782 else
5783 cat >"conftest.$ac_ext" <<_ACEOF
5784 #line 5784 "configure"
5785 #include "confdefs.h"
5786 $ac_includes_default
5787 int
5788 main (void)
5789 {
5790 if ((off_t *) 0)
5791 return 0;
5792 if (sizeof (off_t))
5793 return 0;
5794 ;
5795 return 0;
5796 }
5797 _ACEOF
5798 rm -f "conftest.$ac_objext"
5799 if { (eval echo "$as_me:5799: \"$ac_compile\"") >&5
5800 (eval $ac_compile) 2>&5
5801 ac_status=$?
5802 echo "$as_me:5802: \$? = $ac_status" >&5
5803 (exit "$ac_status"); } &&
5804 { ac_try='test -s "conftest.$ac_objext"'
5805 { (eval echo "$as_me:5805: \"$ac_try\"") >&5
5806 (eval $ac_try) 2>&5
5807 ac_status=$?
5808 echo "$as_me:5808: \$? = $ac_status" >&5
5809 (exit "$ac_status"); }; }; then
5810 ac_cv_type_off_t=yes
5811 else
5812 echo "$as_me: failed program was:" >&5
5813 cat "conftest.$ac_ext" >&5
5814 ac_cv_type_off_t=no
5815 fi
5816 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5817 fi
5818 echo "$as_me:5818: result: $ac_cv_type_off_t" >&5
5819 echo "${ECHO_T}$ac_cv_type_off_t" >&6
5820 if test "$ac_cv_type_off_t" = yes; then
5821 :
5822 else
5823
5824 cat >>confdefs.h <<EOF
5825 #define off_t long
5826 EOF
5827
5828 fi
5829
5830 ### checks for library functions
5831
5832 for ac_func in \
5833 gethostname \
5834 getusershell \
5835 endusershell \
5836 getlogin \
5837 initgroups \
5838 mkdtemp \
5839 putenv \
5840 unsetenv \
5841 sched_yield \
5842 setpgid \
5843 strftime \
5844 tcgetattr \
5845 waitpid \
5846 wcswidth \
5847 wcwidth
5848 do
5849 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5850 echo "$as_me:5850: checking for $ac_func" >&5
5851 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5852 if eval "test \"\${$as_ac_var+set}\" = set"; then
5853 echo $ECHO_N "(cached) $ECHO_C" >&6
5854 else
5855 cat >"conftest.$ac_ext" <<_ACEOF
5856 #line 5856 "configure"
5857 #include "confdefs.h"
5858 #define $ac_func autoconf_temporary
5859 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
5860 #undef $ac_func
5861
5862 #ifdef __cplusplus
5863 extern "C"
5864 #endif
5865
5866 /* We use char because int might match the return type of a gcc2
5867 builtin and then its argument prototype would still apply. */
5868 char $ac_func (void);
5869
5870 int
5871 main (void)
5872 {
5873
5874 /* The GNU C library defines stubs for functions which it implements
5875 to always fail with ENOSYS. Some functions are actually named
5876 something starting with __ and the normal name is an alias. */
5877 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5878 #error found stub for $ac_func
5879 #endif
5880
5881 return $ac_func ();
5882 ;
5883 return 0;
5884 }
5885 _ACEOF
5886 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5887 if { (eval echo "$as_me:5887: \"$ac_link\"") >&5
5888 (eval $ac_link) 2>&5
5889 ac_status=$?
5890 echo "$as_me:5890: \$? = $ac_status" >&5
5891 (exit "$ac_status"); } &&
5892 { ac_try='test -s "conftest$ac_exeext"'
5893 { (eval echo "$as_me:5893: \"$ac_try\"") >&5
5894 (eval $ac_try) 2>&5
5895 ac_status=$?
5896 echo "$as_me:5896: \$? = $ac_status" >&5
5897 (exit "$ac_status"); }; }; then
5898 eval "$as_ac_var=yes"
5899 else
5900 echo "$as_me: failed program was:" >&5
5901 cat "conftest.$ac_ext" >&5
5902 eval "$as_ac_var=no"
5903 fi
5904 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5905 fi
5906 echo "$as_me:5906: result: `eval echo '${'"$as_ac_var"'}'`" >&5
5907 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
5908 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
5909 cat >>confdefs.h <<EOF
5910 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5911 EOF
5912
5913 fi
5914 done
5915
5916 for ac_header in \
5917 unistd.h \
5918
5919 do
5920 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5921 echo "$as_me:5921: checking for $ac_header" >&5
5922 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5923 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5924 echo $ECHO_N "(cached) $ECHO_C" >&6
5925 else
5926 cat >"conftest.$ac_ext" <<_ACEOF
5927 #line 5927 "configure"
5928 #include "confdefs.h"
5929 #include <$ac_header>
5930 _ACEOF
5931 if { (eval echo "$as_me:5931: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5932 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5933 ac_status=$?
5934 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5935 rm -f conftest.er1
5936 cat conftest.err >&5
5937 echo "$as_me:5937: \$? = $ac_status" >&5
5938 (exit "$ac_status"); } >/dev/null; then
5939 if test -s conftest.err; then
5940 ac_cpp_err=$ac_c_preproc_warn_flag
5941 else
5942 ac_cpp_err=
5943 fi
5944 else
5945 ac_cpp_err=yes
5946 fi
5947 if test -z "$ac_cpp_err"; then
5948 eval "$as_ac_Header=yes"
5949 else
5950 echo "$as_me: failed program was:" >&5
5951 cat "conftest.$ac_ext" >&5
5952 eval "$as_ac_Header=no"
5953 fi
5954 rm -f conftest.err "conftest.$ac_ext"
5955 fi
5956 echo "$as_me:5956: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5957 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5958 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5959 cat >>confdefs.h <<EOF
5960 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5961 EOF
5962
5963 fi
5964 done
5965
5966 echo "$as_me:5966: checking for working mkstemp" >&5
5967 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
5968 if test "${cf_cv_func_mkstemp+set}" = set; then
5969 echo $ECHO_N "(cached) $ECHO_C" >&6
5970 else
5971
5972 rm -rf ./conftest*
5973 if test "$cross_compiling" = yes; then
5974 cf_cv_func_mkstemp=maybe
5975 else
5976 cat >"conftest.$ac_ext" <<_ACEOF
5977 #line 5977 "configure"
5978 #include "confdefs.h"
5979
5980 $ac_includes_default
5981
5982 int main(void)
5983 {
5984 char *tmpl = "conftestXXXXXX";
5985 char name[2][80];
5986 int n;
5987 int result = 0;
5988 int fd;
5989 struct stat sb;
5990
5991 umask(077);
5992 for (n = 0; n < 2; ++n) {
5993 strcpy(name[n], tmpl);
5994 if ((fd = mkstemp(name[n])) >= 0) {
5995 if (!strcmp(name[n], tmpl)
5996 || stat(name[n], &sb) != 0
5997 || (sb.st_mode & S_IFMT) != S_IFREG
5998 || (sb.st_mode & 077) != 0) {
5999 result = 1;
6000 }
6001 close(fd);
6002 }
6003 }
6004 if (result == 0
6005 && !strcmp(name[0], name[1]))
6006 result = 1;
6007 ${cf_cv_main_return:-return}(result);
6008 }
6009
6010 _ACEOF
6011 rm -f "conftest$ac_exeext"
6012 if { (eval echo "$as_me:6012: \"$ac_link\"") >&5
6013 (eval $ac_link) 2>&5
6014 ac_status=$?
6015 echo "$as_me:6015: \$? = $ac_status" >&5
6016 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6017 { (eval echo "$as_me:6017: \"$ac_try\"") >&5
6018 (eval $ac_try) 2>&5
6019 ac_status=$?
6020 echo "$as_me:6020: \$? = $ac_status" >&5
6021 (exit "$ac_status"); }; }; then
6022 cf_cv_func_mkstemp=yes
6023
6024 else
6025 echo "$as_me: program exited with status $ac_status" >&5
6026 echo "$as_me: failed program was:" >&5
6027 cat "conftest.$ac_ext" >&5
6028 cf_cv_func_mkstemp=no
6029
6030 fi
6031 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6032 fi
6033
6034 fi
6035 echo "$as_me:6035: result: $cf_cv_func_mkstemp" >&5
6036 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
6037 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
6038 echo "$as_me:6038: checking for mkstemp" >&5
6039 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
6040 if test "${ac_cv_func_mkstemp+set}" = set; then
6041 echo $ECHO_N "(cached) $ECHO_C" >&6
6042 else
6043 cat >"conftest.$ac_ext" <<_ACEOF
6044 #line 6044 "configure"
6045 #include "confdefs.h"
6046 #define mkstemp autoconf_temporary
6047 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6048 #undef mkstemp
6049
6050 #ifdef __cplusplus
6051 extern "C"
6052 #endif
6053
6054 /* We use char because int might match the return type of a gcc2
6055 builtin and then its argument prototype would still apply. */
6056 char mkstemp (void);
6057
6058 int
6059 main (void)
6060 {
6061
6062 /* The GNU C library defines stubs for functions which it implements
6063 to always fail with ENOSYS. Some functions are actually named
6064 something starting with __ and the normal name is an alias. */
6065 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
6066 #error found stub for mkstemp
6067 #endif
6068
6069 return mkstemp ();
6070 ;
6071 return 0;
6072 }
6073 _ACEOF
6074 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6075 if { (eval echo "$as_me:6075: \"$ac_link\"") >&5
6076 (eval $ac_link) 2>&5
6077 ac_status=$?
6078 echo "$as_me:6078: \$? = $ac_status" >&5
6079 (exit "$ac_status"); } &&
6080 { ac_try='test -s "conftest$ac_exeext"'
6081 { (eval echo "$as_me:6081: \"$ac_try\"") >&5
6082 (eval $ac_try) 2>&5
6083 ac_status=$?
6084 echo "$as_me:6084: \$? = $ac_status" >&5
6085 (exit "$ac_status"); }; }; then
6086 ac_cv_func_mkstemp=yes
6087 else
6088 echo "$as_me: failed program was:" >&5
6089 cat "conftest.$ac_ext" >&5
6090 ac_cv_func_mkstemp=no
6091 fi
6092 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6093 fi
6094 echo "$as_me:6094: result: $ac_cv_func_mkstemp" >&5
6095 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
6096
6097 fi
6098 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
6099
6100 cat >>confdefs.h <<\EOF
6101 #define HAVE_MKSTEMP 1
6102 EOF
6103
6104 fi
6105
6106 echo "$as_me:6106: checking if setitimer is available" >&5
6107 echo $ECHO_N "checking if setitimer is available... $ECHO_C" >&6
6108 if test "${cf_cv_func_setitimer+set}" = set; then
6109 echo $ECHO_N "(cached) $ECHO_C" >&6
6110 else
6111
6112 cat >"conftest.$ac_ext" <<_ACEOF
6113 #line 6113 "configure"
6114 #include "confdefs.h"
6115
6116 $ac_includes_default
6117 #include <sys/time.h>
6118
6119 int
6120 main (void)
6121 {
6122
6123 struct itimerval it;
6124 memset(&it, 0, sizeof(struct itimerval));
6125 it.it_value.tv_sec = 1;
6126 setitimer(ITIMER_REAL, &it, NULL);
6127
6128 ;
6129 return 0;
6130 }
6131 _ACEOF
6132 rm -f "conftest.$ac_objext"
6133 if { (eval echo "$as_me:6133: \"$ac_compile\"") >&5
6134 (eval $ac_compile) 2>&5
6135 ac_status=$?
6136 echo "$as_me:6136: \$? = $ac_status" >&5
6137 (exit "$ac_status"); } &&
6138 { ac_try='test -s "conftest.$ac_objext"'
6139 { (eval echo "$as_me:6139: \"$ac_try\"") >&5
6140 (eval $ac_try) 2>&5
6141 ac_status=$?
6142 echo "$as_me:6142: \$? = $ac_status" >&5
6143 (exit "$ac_status"); }; }; then
6144 cf_cv_func_setitimer=yes
6145 else
6146 echo "$as_me: failed program was:" >&5
6147 cat "conftest.$ac_ext" >&5
6148 cf_cv_func_setitimer=no
6149 fi
6150 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6151
6152 fi
6153 echo "$as_me:6153: result: $cf_cv_func_setitimer" >&5
6154 echo "${ECHO_T}$cf_cv_func_setitimer" >&6
6155 test "$cf_cv_func_setitimer" != no &&
6156 cat >>confdefs.h <<\EOF
6157 #define HAVE_SETITIMER 1
6158 EOF
6159
6160 for ac_header in lastlog.h paths.h
6161 do
6162 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6163 echo "$as_me:6163: checking for $ac_header" >&5
6164 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6165 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6166 echo $ECHO_N "(cached) $ECHO_C" >&6
6167 else
6168 cat >"conftest.$ac_ext" <<_ACEOF
6169 #line 6169 "configure"
6170 #include "confdefs.h"
6171 #include <$ac_header>
6172 _ACEOF
6173 if { (eval echo "$as_me:6173: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6174 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6175 ac_status=$?
6176 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6177 rm -f conftest.er1
6178 cat conftest.err >&5
6179 echo "$as_me:6179: \$? = $ac_status" >&5
6180 (exit "$ac_status"); } >/dev/null; then
6181 if test -s conftest.err; then
6182 ac_cpp_err=$ac_c_preproc_warn_flag
6183 else
6184 ac_cpp_err=
6185 fi
6186 else
6187 ac_cpp_err=yes
6188 fi
6189 if test -z "$ac_cpp_err"; then
6190 eval "$as_ac_Header=yes"
6191 else
6192 echo "$as_me: failed program was:" >&5
6193 cat "conftest.$ac_ext" >&5
6194 eval "$as_ac_Header=no"
6195 fi
6196 rm -f conftest.err "conftest.$ac_ext"
6197 fi
6198 echo "$as_me:6198: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6199 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6200 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6201 cat >>confdefs.h <<EOF
6202 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6203 EOF
6204
6205 fi
6206 done
6207
6208 echo "$as_me:6208: checking for lastlog path" >&5
6209 echo $ECHO_N "checking for lastlog path... $ECHO_C" >&6
6210 if test "${cf_cv_path_lastlog+set}" = set; then
6211 echo $ECHO_N "(cached) $ECHO_C" >&6
6212 else
6213
6214 cat >"conftest.$ac_ext" <<_ACEOF
6215 #line 6215 "configure"
6216 #include "confdefs.h"
6217
6218 #include <sys/types.h>
6219 #ifdef HAVE_LASTLOG_H
6220 #include <lastlog.h>
6221 #else
6222 #ifdef HAVE_PATHS_H
6223 #include <paths.h>
6224 #endif
6225 #endif
6226 int
6227 main (void)
6228 {
6229 char *path = _PATH_LASTLOG; (void)path
6230 ;
6231 return 0;
6232 }
6233 _ACEOF
6234 rm -f "conftest.$ac_objext"
6235 if { (eval echo "$as_me:6235: \"$ac_compile\"") >&5
6236 (eval $ac_compile) 2>&5
6237 ac_status=$?
6238 echo "$as_me:6238: \$? = $ac_status" >&5
6239 (exit "$ac_status"); } &&
6240 { ac_try='test -s "conftest.$ac_objext"'
6241 { (eval echo "$as_me:6241: \"$ac_try\"") >&5
6242 (eval $ac_try) 2>&5
6243 ac_status=$?
6244 echo "$as_me:6244: \$? = $ac_status" >&5
6245 (exit "$ac_status"); }; }; then
6246 cf_cv_path_lastlog="_PATH_LASTLOG"
6247 else
6248 echo "$as_me: failed program was:" >&5
6249 cat "conftest.$ac_ext" >&5
6250 if test -f /usr/adm/lastlog ; then
6251 cf_cv_path_lastlog=/usr/adm/lastlog
6252 else
6253 cf_cv_path_lastlog=no
6254 fi
6255 fi
6256 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6257
6258 fi
6259 echo "$as_me:6259: result: $cf_cv_path_lastlog" >&5
6260 echo "${ECHO_T}$cf_cv_path_lastlog" >&6
6261 test "$cf_cv_path_lastlog" != no &&
6262 cat >>confdefs.h <<\EOF
6263 #define USE_LASTLOG 1
6264 EOF
6265
6266 echo "$as_me:6266: checking for utmp implementation" >&5
6267 echo $ECHO_N "checking for utmp implementation... $ECHO_C" >&6
6268 if test "${cf_cv_have_utmp+set}" = set; then
6269 echo $ECHO_N "(cached) $ECHO_C" >&6
6270 else
6271
6272 cf_cv_have_utmp=no
6273 for cf_header in utmpx utmp ; do
6274 cf_utmp_includes="
6275 #include <sys/types.h>
6276 #include <${cf_header}.h>
6277 #define getutent getutxent
6278 #ifdef USE_LASTLOG
6279 #include <lastlog.h> /* may conflict with utmpx.h on Linux */
6280 #endif
6281 "
6282 cat >"conftest.$ac_ext" <<_ACEOF
6283 #line 6283 "configure"
6284 #include "confdefs.h"
6285 $cf_utmp_includes
6286 int
6287 main (void)
6288 {
6289 struct $cf_header x;
6290 char *name = x.ut_name; /* utmp.h and compatible definitions */
6291 (void)x;
6292 (void)name;
6293
6294 ;
6295 return 0;
6296 }
6297 _ACEOF
6298 rm -f "conftest.$ac_objext"
6299 if { (eval echo "$as_me:6299: \"$ac_compile\"") >&5
6300 (eval $ac_compile) 2>&5
6301 ac_status=$?
6302 echo "$as_me:6302: \$? = $ac_status" >&5
6303 (exit "$ac_status"); } &&
6304 { ac_try='test -s "conftest.$ac_objext"'
6305 { (eval echo "$as_me:6305: \"$ac_try\"") >&5
6306 (eval $ac_try) 2>&5
6307 ac_status=$?
6308 echo "$as_me:6308: \$? = $ac_status" >&5
6309 (exit "$ac_status"); }; }; then
6310 cf_cv_have_utmp=$cf_header
6311 break
6312 else
6313 echo "$as_me: failed program was:" >&5
6314 cat "conftest.$ac_ext" >&5
6315
6316 cat >"conftest.$ac_ext" <<_ACEOF
6317 #line 6317 "configure"
6318 #include "confdefs.h"
6319 $cf_utmp_includes
6320 int
6321 main (void)
6322 {
6323 struct $cf_header x;
6324 char *name = x.ut_user; /* utmpx.h must declare this */
6325 (void)x;
6326 (void)name;
6327
6328 ;
6329 return 0;
6330 }
6331 _ACEOF
6332 rm -f "conftest.$ac_objext"
6333 if { (eval echo "$as_me:6333: \"$ac_compile\"") >&5
6334 (eval $ac_compile) 2>&5
6335 ac_status=$?
6336 echo "$as_me:6336: \$? = $ac_status" >&5
6337 (exit "$ac_status"); } &&
6338 { ac_try='test -s "conftest.$ac_objext"'
6339 { (eval echo "$as_me:6339: \"$ac_try\"") >&5
6340 (eval $ac_try) 2>&5
6341 ac_status=$?
6342 echo "$as_me:6342: \$? = $ac_status" >&5
6343 (exit "$ac_status"); }; }; then
6344 cf_cv_have_utmp=$cf_header
6345 break
6346
6347 else
6348 echo "$as_me: failed program was:" >&5
6349 cat "conftest.$ac_ext" >&5
6350 fi
6351 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6352 fi
6353 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6354 done
6355
6356 fi
6357 echo "$as_me:6357: result: $cf_cv_have_utmp" >&5
6358 echo "${ECHO_T}$cf_cv_have_utmp" >&6
6359
6360 if test "$cf_cv_have_utmp" != no ; then
6361
6362 cat >>confdefs.h <<\EOF
6363 #define HAVE_UTMP 1
6364 EOF
6365
6366 test "$cf_cv_have_utmp" = utmpx &&
6367 cat >>confdefs.h <<\EOF
6368 #define UTMPX_FOR_UTMP 1
6369 EOF
6370
6371 if test "$cf_cv_have_utmp" != no ; then
6372 echo "$as_me:6372: checking if ${cf_cv_have_utmp}.ut_host is declared" >&5
6373 echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_host is declared... $ECHO_C" >&6
6374 if test "${cf_cv_have_utmp_ut_host+set}" = set; then
6375 echo $ECHO_N "(cached) $ECHO_C" >&6
6376 else
6377
6378 cat >"conftest.$ac_ext" <<_ACEOF
6379 #line 6379 "configure"
6380 #include "confdefs.h"
6381
6382 #include <sys/types.h>
6383 #include <${cf_cv_have_utmp}.h>
6384 int
6385 main (void)
6386 {
6387 struct $cf_cv_have_utmp x;
6388 char *y = &x.ut_host[0];
6389 (void)x;
6390 (void)y
6391 ;
6392 return 0;
6393 }
6394 _ACEOF
6395 rm -f "conftest.$ac_objext"
6396 if { (eval echo "$as_me:6396: \"$ac_compile\"") >&5
6397 (eval $ac_compile) 2>&5
6398 ac_status=$?
6399 echo "$as_me:6399: \$? = $ac_status" >&5
6400 (exit "$ac_status"); } &&
6401 { ac_try='test -s "conftest.$ac_objext"'
6402 { (eval echo "$as_me:6402: \"$ac_try\"") >&5
6403 (eval $ac_try) 2>&5
6404 ac_status=$?
6405 echo "$as_me:6405: \$? = $ac_status" >&5
6406 (exit "$ac_status"); }; }; then
6407 cf_cv_have_utmp_ut_host=yes
6408 else
6409 echo "$as_me: failed program was:" >&5
6410 cat "conftest.$ac_ext" >&5
6411 cf_cv_have_utmp_ut_host=no
6412 fi
6413 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6414
6415 fi
6416
6417 echo "$as_me:6417: result: $cf_cv_have_utmp_ut_host" >&5
6418 echo "${ECHO_T}$cf_cv_have_utmp_ut_host" >&6
6419 test "$cf_cv_have_utmp_ut_host" != no &&
6420 cat >>confdefs.h <<\EOF
6421 #define HAVE_UTMP_UT_HOST 1
6422 EOF
6423
6424 fi
6425
6426 if test "$cf_cv_have_utmp" != no ; then
6427 echo "$as_me:6427: checking if ${cf_cv_have_utmp}.ut_syslen is declared" >&5
6428 echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_syslen is declared... $ECHO_C" >&6
6429 if test "${cf_cv_have_utmp_ut_syslen+set}" = set; then
6430 echo $ECHO_N "(cached) $ECHO_C" >&6
6431 else
6432
6433 cat >"conftest.$ac_ext" <<_ACEOF
6434 #line 6434 "configure"
6435 #include "confdefs.h"
6436
6437 #include <sys/types.h>
6438 #include <${cf_cv_have_utmp}.h>
6439 int
6440 main (void)
6441 {
6442 struct $cf_cv_have_utmp x;
6443 int y = x.ut_syslen;
6444 (void)x;
6445 (void)y
6446 ;
6447 return 0;
6448 }
6449 _ACEOF
6450 rm -f "conftest.$ac_objext"
6451 if { (eval echo "$as_me:6451: \"$ac_compile\"") >&5
6452 (eval $ac_compile) 2>&5
6453 ac_status=$?
6454 echo "$as_me:6454: \$? = $ac_status" >&5
6455 (exit "$ac_status"); } &&
6456 { ac_try='test -s "conftest.$ac_objext"'
6457 { (eval echo "$as_me:6457: \"$ac_try\"") >&5
6458 (eval $ac_try) 2>&5
6459 ac_status=$?
6460 echo "$as_me:6460: \$? = $ac_status" >&5
6461 (exit "$ac_status"); }; }; then
6462 cf_cv_have_utmp_ut_syslen=yes
6463 else
6464 echo "$as_me: failed program was:" >&5
6465 cat "conftest.$ac_ext" >&5
6466 cf_cv_have_utmp_ut_syslen=no
6467 fi
6468 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6469
6470 fi
6471
6472 echo "$as_me:6472: result: $cf_cv_have_utmp_ut_syslen" >&5
6473 echo "${ECHO_T}$cf_cv_have_utmp_ut_syslen" >&6
6474 test "$cf_cv_have_utmp_ut_syslen" != no &&
6475 cat >>confdefs.h <<\EOF
6476 #define HAVE_UTMP_UT_SYSLEN 1
6477 EOF
6478
6479 fi
6480
6481 if test "$cf_cv_have_utmp" != no ; then
6482 echo "$as_me:6482: checking if ${cf_cv_have_utmp}.ut_name is declared" >&5
6483 echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_name is declared... $ECHO_C" >&6
6484 if test "${cf_cv_have_utmp_ut_name+set}" = set; then
6485 echo $ECHO_N "(cached) $ECHO_C" >&6
6486 else
6487
6488 cf_cv_have_utmp_ut_name=no
6489 cf_utmp_includes="
6490 #include <sys/types.h>
6491 #include <${cf_cv_have_utmp}.h>
6492 #define getutent getutxent
6493 #ifdef USE_LASTLOG
6494 #include <lastlog.h> /* may conflict with utmpx.h on Linux */
6495 #endif
6496 "
6497 for cf_header in ut_name ut_user ; do
6498 cat >"conftest.$ac_ext" <<_ACEOF
6499 #line 6499 "configure"
6500 #include "confdefs.h"
6501 $cf_utmp_includes
6502 int
6503 main (void)
6504 {
6505 struct $cf_cv_have_utmp x;
6506 char *name = x.$cf_header;
6507 (void)x;
6508 (void)name;
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_have_utmp_ut_name=$cf_header
6527 break
6528 else
6529 echo "$as_me: failed program was:" >&5
6530 cat "conftest.$ac_ext" >&5
6531 fi
6532 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6533 done
6534
6535 fi
6536 echo "$as_me:6536: result: $cf_cv_have_utmp_ut_name" >&5
6537 echo "${ECHO_T}$cf_cv_have_utmp_ut_name" >&6
6538
6539 case "$cf_cv_have_utmp_ut_name" in
6540 (no)
6541 { { echo "$as_me:6541: error: Cannot find declaration for ut.ut_name" >&5
6542 echo "$as_me: error: Cannot find declaration for ut.ut_name" >&2;}
6543 { (exit 1); exit 1; }; }
6544 ;;
6545 (ut_user)
6546
6547 cat >>confdefs.h <<\EOF
6548 #define ut_name ut_user
6549 EOF
6550
6551 ;;
6552 esac
6553 fi
6554
6555 if test "$cf_cv_have_utmp" != no ; then
6556 echo "$as_me:6556: checking for exit-status in $cf_cv_have_utmp" >&5
6557 echo $ECHO_N "checking for exit-status in $cf_cv_have_utmp... $ECHO_C" >&6
6558 if test "${cf_cv_have_utmp_ut_xstatus+set}" = set; then
6559 echo $ECHO_N "(cached) $ECHO_C" >&6
6560 else
6561
6562 for cf_result in \
6563 ut_exit.__e_exit \
6564 ut_exit.e_exit \
6565 ut_exit.ut_e_exit \
6566 ut_exit.ut_exit
6567 do
6568 cat >"conftest.$ac_ext" <<_ACEOF
6569 #line 6569 "configure"
6570 #include "confdefs.h"
6571
6572 #include <sys/types.h>
6573 #include <${cf_cv_have_utmp}.h>
6574 int
6575 main (void)
6576 {
6577 struct $cf_cv_have_utmp x;
6578 long y = x.$cf_result = 0;
6579 (void)x;
6580 (void)y
6581 ;
6582 return 0;
6583 }
6584 _ACEOF
6585 rm -f "conftest.$ac_objext"
6586 if { (eval echo "$as_me:6586: \"$ac_compile\"") >&5
6587 (eval $ac_compile) 2>&5
6588 ac_status=$?
6589 echo "$as_me:6589: \$? = $ac_status" >&5
6590 (exit "$ac_status"); } &&
6591 { ac_try='test -s "conftest.$ac_objext"'
6592 { (eval echo "$as_me:6592: \"$ac_try\"") >&5
6593 (eval $ac_try) 2>&5
6594 ac_status=$?
6595 echo "$as_me:6595: \$? = $ac_status" >&5
6596 (exit "$ac_status"); }; }; then
6597 cf_cv_have_utmp_ut_xstatus=$cf_result
6598 break
6599 else
6600 echo "$as_me: failed program was:" >&5
6601 cat "conftest.$ac_ext" >&5
6602 cf_cv_have_utmp_ut_xstatus=no
6603 fi
6604 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6605 done
6606
6607 fi
6608 echo "$as_me:6608: result: $cf_cv_have_utmp_ut_xstatus" >&5
6609 echo "${ECHO_T}$cf_cv_have_utmp_ut_xstatus" >&6
6610 if test "$cf_cv_have_utmp_ut_xstatus" != no ; then
6611
6612 cat >>confdefs.h <<\EOF
6613 #define HAVE_UTMP_UT_XSTATUS 1
6614 EOF
6615
6616 cat >>confdefs.h <<EOF
6617 #define ut_xstatus $cf_cv_have_utmp_ut_xstatus
6618 EOF
6619
6620 fi
6621 fi
6622
6623 if test "$cf_cv_have_utmp" != no ; then
6624 echo "$as_me:6624: checking if ${cf_cv_have_utmp}.ut_xtime is declared" >&5
6625 echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_xtime is declared... $ECHO_C" >&6
6626 if test "${cf_cv_have_utmp_ut_xtime+set}" = set; then
6627 echo $ECHO_N "(cached) $ECHO_C" >&6
6628 else
6629
6630 cat >"conftest.$ac_ext" <<_ACEOF
6631 #line 6631 "configure"
6632 #include "confdefs.h"
6633
6634 #include <sys/types.h>
6635 #include <${cf_cv_have_utmp}.h>
6636 int
6637 main (void)
6638 {
6639 struct $cf_cv_have_utmp x;
6640 long y = x.ut_xtime = 0;
6641 (void)x;
6642 (void)y
6643 ;
6644 return 0;
6645 }
6646 _ACEOF
6647 rm -f "conftest.$ac_objext"
6648 if { (eval echo "$as_me:6648: \"$ac_compile\"") >&5
6649 (eval $ac_compile) 2>&5
6650 ac_status=$?
6651 echo "$as_me:6651: \$? = $ac_status" >&5
6652 (exit "$ac_status"); } &&
6653 { ac_try='test -s "conftest.$ac_objext"'
6654 { (eval echo "$as_me:6654: \"$ac_try\"") >&5
6655 (eval $ac_try) 2>&5
6656 ac_status=$?
6657 echo "$as_me:6657: \$? = $ac_status" >&5
6658 (exit "$ac_status"); }; }; then
6659 cf_cv_have_utmp_ut_xtime=yes
6660 else
6661 echo "$as_me: failed program was:" >&5
6662 cat "conftest.$ac_ext" >&5
6663 cat >"conftest.$ac_ext" <<_ACEOF
6664 #line 6664 "configure"
6665 #include "confdefs.h"
6666
6667 #include <sys/types.h>
6668 #include <${cf_cv_have_utmp}.h>
6669 int
6670 main (void)
6671 {
6672 struct $cf_cv_have_utmp x;
6673 long y = x.ut_tv.tv_sec;
6674 (void)x;
6675 (void)y
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_ut_xtime=define
6693 else
6694 echo "$as_me: failed program was:" >&5
6695 cat "conftest.$ac_ext" >&5
6696 cf_cv_have_utmp_ut_xtime=no
6697 fi
6698 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6699
6700 fi
6701 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6702
6703 fi
6704 echo "$as_me:6704: result: $cf_cv_have_utmp_ut_xtime" >&5
6705 echo "${ECHO_T}$cf_cv_have_utmp_ut_xtime" >&6
6706 if test "$cf_cv_have_utmp_ut_xtime" != no ; then
6707
6708 cat >>confdefs.h <<\EOF
6709 #define HAVE_UTMP_UT_XTIME 1
6710 EOF
6711
6712 if test "$cf_cv_have_utmp_ut_xtime" = define ; then
6713
6714 cat >>confdefs.h <<\EOF
6715 #define ut_xtime ut_tv.tv_sec
6716 EOF
6717
6718 fi
6719 fi
6720 fi
6721
6722 if test "$cf_cv_have_utmp" != no ; then
6723 echo "$as_me:6723: checking if ${cf_cv_have_utmp}.ut_session is declared" >&5
6724 echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_session is declared... $ECHO_C" >&6
6725 if test "${cf_cv_have_utmp_ut_session+set}" = set; then
6726 echo $ECHO_N "(cached) $ECHO_C" >&6
6727 else
6728
6729 cat >"conftest.$ac_ext" <<_ACEOF
6730 #line 6730 "configure"
6731 #include "confdefs.h"
6732
6733 #include <sys/types.h>
6734 #include <${cf_cv_have_utmp}.h>
6735 int
6736 main (void)
6737 {
6738 static struct $cf_cv_have_utmp x;
6739 long y = x.ut_session;
6740 (void)x;
6741 (void)y
6742 ;
6743 return 0;
6744 }
6745 _ACEOF
6746 rm -f "conftest.$ac_objext"
6747 if { (eval echo "$as_me:6747: \"$ac_compile\"") >&5
6748 (eval $ac_compile) 2>&5
6749 ac_status=$?
6750 echo "$as_me:6750: \$? = $ac_status" >&5
6751 (exit "$ac_status"); } &&
6752 { ac_try='test -s "conftest.$ac_objext"'
6753 { (eval echo "$as_me:6753: \"$ac_try\"") >&5
6754 (eval $ac_try) 2>&5
6755 ac_status=$?
6756 echo "$as_me:6756: \$? = $ac_status" >&5
6757 (exit "$ac_status"); }; }; then
6758 cf_cv_have_utmp_ut_session=yes
6759 else
6760 echo "$as_me: failed program was:" >&5
6761 cat "conftest.$ac_ext" >&5
6762 cf_cv_have_utmp_ut_session=no
6763 fi
6764 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6765
6766 fi
6767 echo "$as_me:6767: result: $cf_cv_have_utmp_ut_session" >&5
6768 echo "${ECHO_T}$cf_cv_have_utmp_ut_session" >&6
6769 if test "$cf_cv_have_utmp_ut_session" != no ; then
6770
6771 cat >>confdefs.h <<\EOF
6772 #define HAVE_UTMP_UT_SESSION 1
6773 EOF
6774
6775 fi
6776 fi
6777
6778 echo "$as_me:6778: checking if $cf_cv_have_utmp is SYSV flavor" >&5
6779 echo $ECHO_N "checking if $cf_cv_have_utmp is SYSV flavor... $ECHO_C" >&6
6780 if test "${cf_cv_sysv_utmp+set}" = set; then
6781 echo $ECHO_N "(cached) $ECHO_C" >&6
6782 else
6783
6784 test "$cf_cv_have_utmp" = "utmp" && cf_prefix="ut" || cf_prefix="utx"
6785 cat >"conftest.$ac_ext" <<_ACEOF
6786 #line 6786 "configure"
6787 #include "confdefs.h"
6788
6789 #include <sys/types.h>
6790 #include <${cf_cv_have_utmp}.h>
6791 int
6792 main (void)
6793 {
6794
6795 struct $cf_cv_have_utmp x;
6796 set${cf_prefix}ent ();
6797 get${cf_prefix}id(&x);
6798 put${cf_prefix}line(&x);
6799 end${cf_prefix}ent();
6800 ;
6801 return 0;
6802 }
6803 _ACEOF
6804 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6805 if { (eval echo "$as_me:6805: \"$ac_link\"") >&5
6806 (eval $ac_link) 2>&5
6807 ac_status=$?
6808 echo "$as_me:6808: \$? = $ac_status" >&5
6809 (exit "$ac_status"); } &&
6810 { ac_try='test -s "conftest$ac_exeext"'
6811 { (eval echo "$as_me:6811: \"$ac_try\"") >&5
6812 (eval $ac_try) 2>&5
6813 ac_status=$?
6814 echo "$as_me:6814: \$? = $ac_status" >&5
6815 (exit "$ac_status"); }; }; then
6816 cf_cv_sysv_utmp=yes
6817 else
6818 echo "$as_me: failed program was:" >&5
6819 cat "conftest.$ac_ext" >&5
6820 cf_cv_sysv_utmp=no
6821 fi
6822 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6823
6824 fi
6825 echo "$as_me:6825: result: $cf_cv_sysv_utmp" >&5
6826 echo "${ECHO_T}$cf_cv_sysv_utmp" >&6
6827 test "$cf_cv_sysv_utmp" = yes &&
6828 cat >>confdefs.h <<\EOF
6829 #define USE_SYSV_UTMP 1
6830 EOF
6831
6832 fi
6833
6834 for ac_header in lastlog.h
6835 do
6836 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6837 echo "$as_me:6837: checking for $ac_header" >&5
6838 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6839 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6840 echo $ECHO_N "(cached) $ECHO_C" >&6
6841 else
6842 cat >"conftest.$ac_ext" <<_ACEOF
6843 #line 6843 "configure"
6844 #include "confdefs.h"
6845 #include <$ac_header>
6846 _ACEOF
6847 if { (eval echo "$as_me:6847: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6848 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6849 ac_status=$?
6850 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6851 rm -f conftest.er1
6852 cat conftest.err >&5
6853 echo "$as_me:6853: \$? = $ac_status" >&5
6854 (exit "$ac_status"); } >/dev/null; then
6855 if test -s conftest.err; then
6856 ac_cpp_err=$ac_c_preproc_warn_flag
6857 else
6858 ac_cpp_err=
6859 fi
6860 else
6861 ac_cpp_err=yes
6862 fi
6863 if test -z "$ac_cpp_err"; then
6864 eval "$as_ac_Header=yes"
6865 else
6866 echo "$as_me: failed program was:" >&5
6867 cat "conftest.$ac_ext" >&5
6868 eval "$as_ac_Header=no"
6869 fi
6870 rm -f conftest.err "conftest.$ac_ext"
6871 fi
6872 echo "$as_me:6872: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6873 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6874 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6875 cat >>confdefs.h <<EOF
6876 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6877 EOF
6878
6879 fi
6880 done
6881
6882 echo "$as_me:6882: checking for struct lastlog" >&5
6883 echo $ECHO_N "checking for struct lastlog... $ECHO_C" >&6
6884 if test "${cf_cv_struct_lastlog+set}" = set; then
6885 echo $ECHO_N "(cached) $ECHO_C" >&6
6886 else
6887
6888 if test "$cross_compiling" = yes; then
6889
6890 cf_cv_struct_lastlog=unknown
6891 else
6892 cat >"conftest.$ac_ext" <<_ACEOF
6893 #line 6893 "configure"
6894 #include "confdefs.h"
6895
6896 $ac_includes_default
6897
6898 #include <time.h>
6899 #include <lastlog.h>
6900
6901 int main(void)
6902 {
6903 struct lastlog data;
6904 return (sizeof(data.ll_time) != sizeof(time_t));
6905 }
6906 _ACEOF
6907 rm -f "conftest$ac_exeext"
6908 if { (eval echo "$as_me:6908: \"$ac_link\"") >&5
6909 (eval $ac_link) 2>&5
6910 ac_status=$?
6911 echo "$as_me:6911: \$? = $ac_status" >&5
6912 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6913 { (eval echo "$as_me:6913: \"$ac_try\"") >&5
6914 (eval $ac_try) 2>&5
6915 ac_status=$?
6916 echo "$as_me:6916: \$? = $ac_status" >&5
6917 (exit "$ac_status"); }; }; then
6918
6919 cf_cv_struct_lastlog=yes
6920 else
6921 echo "$as_me: program exited with status $ac_status" >&5
6922 echo "$as_me: failed program was:" >&5
6923 cat "conftest.$ac_ext" >&5
6924
6925 cf_cv_struct_lastlog=no
6926 fi
6927 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6928 fi
6929 fi
6930 echo "$as_me:6930: result: $cf_cv_struct_lastlog" >&5
6931 echo "${ECHO_T}$cf_cv_struct_lastlog" >&6
6932
6933 test $cf_cv_struct_lastlog != no &&
6934 cat >>confdefs.h <<\EOF
6935 #define USE_STRUCT_LASTLOG 1
6936 EOF
6937
6938 for ac_header in \
6939 sys/param.h \
6940
6941 do
6942 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6943 echo "$as_me:6943: checking for $ac_header" >&5
6944 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6945 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6946 echo $ECHO_N "(cached) $ECHO_C" >&6
6947 else
6948 cat >"conftest.$ac_ext" <<_ACEOF
6949 #line 6949 "configure"
6950 #include "confdefs.h"
6951 #include <$ac_header>
6952 _ACEOF
6953 if { (eval echo "$as_me:6953: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6954 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6955 ac_status=$?
6956 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6957 rm -f conftest.er1
6958 cat conftest.err >&5
6959 echo "$as_me:6959: \$? = $ac_status" >&5
6960 (exit "$ac_status"); } >/dev/null; then
6961 if test -s conftest.err; then
6962 ac_cpp_err=$ac_c_preproc_warn_flag
6963 else
6964 ac_cpp_err=
6965 fi
6966 else
6967 ac_cpp_err=yes
6968 fi
6969 if test -z "$ac_cpp_err"; then
6970 eval "$as_ac_Header=yes"
6971 else
6972 echo "$as_me: failed program was:" >&5
6973 cat "conftest.$ac_ext" >&5
6974 eval "$as_ac_Header=no"
6975 fi
6976 rm -f conftest.err "conftest.$ac_ext"
6977 fi
6978 echo "$as_me:6978: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6979 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6980 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6981 cat >>confdefs.h <<EOF
6982 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6983 EOF
6984
6985 fi
6986 done
6987
6988 echo "$as_me:6988: checking if POSIX saved-ids are supported" >&5
6989 echo $ECHO_N "checking if POSIX saved-ids are supported... $ECHO_C" >&6
6990 if test "${cf_cv_posix_saved_ids+set}" = set; then
6991 echo $ECHO_N "(cached) $ECHO_C" >&6
6992 else
6993
6994 cat >"conftest.$ac_ext" <<_ACEOF
6995 #line 6995 "configure"
6996 #include "confdefs.h"
6997
6998 #include <unistd.h>
6999 #ifdef HAVE_SYS_PARAM_H
7000 #include <sys/param.h> /* this may define "BSD" */
7001 #endif
7002
7003 int
7004 main (void)
7005 {
7006
7007 #if defined(_POSIX_SAVED_IDS) && (_POSIX_SAVED_IDS > 0)
7008 void *p = (void *) seteuid;
7009 int x = seteuid(geteuid());
7010 (void)p;
7011 (void)x;
7012 #elif defined(BSD) && (BSD >= 199103)
7013 /* The BSD's may implement the runtime check - and it fails.
7014 * However, saved-ids work almost like POSIX (close enough for most uses).
7015 */
7016 #else
7017 make an error
7018 #endif
7019
7020 ;
7021 return 0;
7022 }
7023 _ACEOF
7024 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7025 if { (eval echo "$as_me:7025: \"$ac_link\"") >&5
7026 (eval $ac_link) 2>&5
7027 ac_status=$?
7028 echo "$as_me:7028: \$? = $ac_status" >&5
7029 (exit "$ac_status"); } &&
7030 { ac_try='test -s "conftest$ac_exeext"'
7031 { (eval echo "$as_me:7031: \"$ac_try\"") >&5
7032 (eval $ac_try) 2>&5
7033 ac_status=$?
7034 echo "$as_me:7034: \$? = $ac_status" >&5
7035 (exit "$ac_status"); }; }; then
7036 cf_cv_posix_saved_ids=yes
7037
7038 else
7039 echo "$as_me: failed program was:" >&5
7040 cat "conftest.$ac_ext" >&5
7041
7042 if test "$cross_compiling" = yes; then
7043 cf_cv_posix_saved_ids=unknown
7044 else
7045 cat >"conftest.$ac_ext" <<_ACEOF
7046 #line 7046 "configure"
7047 #include "confdefs.h"
7048
7049 $ac_includes_default
7050
7051 int main(void)
7052 {
7053 void *p = (void *) seteuid;
7054 long code = sysconf(_SC_SAVED_IDS);
7055 (void)p;
7056 ${cf_cv_main_return:-return} ((code > 0) ? 0 : 1);
7057 }
7058 _ACEOF
7059 rm -f "conftest$ac_exeext"
7060 if { (eval echo "$as_me:7060: \"$ac_link\"") >&5
7061 (eval $ac_link) 2>&5
7062 ac_status=$?
7063 echo "$as_me:7063: \$? = $ac_status" >&5
7064 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7065 { (eval echo "$as_me:7065: \"$ac_try\"") >&5
7066 (eval $ac_try) 2>&5
7067 ac_status=$?
7068 echo "$as_me:7068: \$? = $ac_status" >&5
7069 (exit "$ac_status"); }; }; then
7070 cf_cv_posix_saved_ids=yes
7071 else
7072 echo "$as_me: program exited with status $ac_status" >&5
7073 echo "$as_me: failed program was:" >&5
7074 cat "conftest.$ac_ext" >&5
7075 cf_cv_posix_saved_ids=no
7076 fi
7077 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7078 fi
7079
7080 fi
7081 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7082
7083 fi
7084 echo "$as_me:7084: result: $cf_cv_posix_saved_ids" >&5
7085 echo "${ECHO_T}$cf_cv_posix_saved_ids" >&6
7086
7087 test "$cf_cv_posix_saved_ids" = yes &&
7088 cat >>confdefs.h <<\EOF
7089 #define HAVE_POSIX_SAVED_IDS 1
7090 EOF
7091
7092 # compute a reasonable value for $TERM to give tgetent(), since we may be
7093 # running in 'screen', which sets $TERMCAP to a specific entry that is not
7094 # necessarily in /etc/termcap - unsetenv is not portable, so we cannot simply
7095 # discard $TERMCAP.
7096 cf_TERMVAR=vt100
7097 if test -n "$TERMCAP"
7098 then
7099 cf_TERMCAP=`echo "$TERMCAP" | tr '\n' ' ' | sed -e 's/^..|//' -e 's/|.*//'`
7100 case "$cf_TERMCAP" in
7101 (screen*.*)
7102 ;;
7103 (*)
7104 cf_TERMVAR="$cf_TERMCAP"
7105 ;;
7106 esac
7107 fi
7108 test -z "$cf_TERMVAR" && cf_TERMVAR=vt100
7109
7110 # BSD termcap used no header file
7111 # SVr4 provided termcap prototypes as a legacy feature in term.h
7112 # GNU termcap provided termcap prototypes in termcap.h
7113 # ncurses provides termcap prototypes in both term.h and termcap.h
7114 #
7115 # The terminfo-based termcap interfaces do not provide a full tgetent (i.e., do
7116 # not return the text of the termcap entry in the buffer), but as a special
7117 # case, FreeBSD provides ncurses' termcap.h with a modified termcap reader that
7118 # returns the termcap text.
7119
7120 for ac_header in termcap.h
7121 do
7122 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7123 echo "$as_me:7123: checking for $ac_header" >&5
7124 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7125 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7126 echo $ECHO_N "(cached) $ECHO_C" >&6
7127 else
7128 cat >"conftest.$ac_ext" <<_ACEOF
7129 #line 7129 "configure"
7130 #include "confdefs.h"
7131 #include <$ac_header>
7132 _ACEOF
7133 if { (eval echo "$as_me:7133: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7134 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7135 ac_status=$?
7136 $EGREP -v '^ *\+' conftest.er1 >conftest.err
7137 rm -f conftest.er1
7138 cat conftest.err >&5
7139 echo "$as_me:7139: \$? = $ac_status" >&5
7140 (exit "$ac_status"); } >/dev/null; then
7141 if test -s conftest.err; then
7142 ac_cpp_err=$ac_c_preproc_warn_flag
7143 else
7144 ac_cpp_err=
7145 fi
7146 else
7147 ac_cpp_err=yes
7148 fi
7149 if test -z "$ac_cpp_err"; then
7150 eval "$as_ac_Header=yes"
7151 else
7152 echo "$as_me: failed program was:" >&5
7153 cat "conftest.$ac_ext" >&5
7154 eval "$as_ac_Header=no"
7155 fi
7156 rm -f conftest.err "conftest.$ac_ext"
7157 fi
7158 echo "$as_me:7158: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7159 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7160 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7161 cat >>confdefs.h <<EOF
7162 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7163 EOF
7164
7165 fi
7166 done
7167
7168 cf_termcap_h="\
7169 #ifdef HAVE_TERMCAP_H
7170 #include <termcap.h>
7171 #else
7172 extern int tgetent(char *, const char *);
7173 #endif"
7174
7175 echo "$as_me:7175: checking if we want full tgetent function" >&5
7176 echo $ECHO_N "checking if we want full tgetent function... $ECHO_C" >&6
7177
7178 # Check whether --enable-full-tgetent or --disable-full-tgetent was given.
7179 if test "${enable_full_tgetent+set}" = set; then
7180 enableval="$enable_full_tgetent"
7181 test "$enableval" != no && enableval=yes
7182 if test "$enableval" != "yes" ; then
7183 cf_full_tgetent=no
7184 else
7185 cf_full_tgetent=yes
7186 fi
7187 else
7188 enableval=yes
7189 cf_full_tgetent=yes
7190
7191 fi;
7192 echo "$as_me:7192: result: $cf_full_tgetent" >&5
7193 echo "${ECHO_T}$cf_full_tgetent" >&6
7194
7195 if test "$cf_full_tgetent" = yes ; then
7196 cf_test_message="full tgetent"
7197 else
7198 cf_test_message="tgetent"
7199 fi
7200
7201 echo "$as_me:7201: checking for $cf_test_message function" >&5
7202 echo $ECHO_N "checking for $cf_test_message function... $ECHO_C" >&6
7203 if test "${cf_cv_lib_tgetent+set}" = set; then
7204 echo $ECHO_N "(cached) $ECHO_C" >&6
7205 else
7206
7207 cf_save_LIBS="$LIBS"
7208 cf_cv_lib_tgetent=no
7209 cf_TERMLIB="termlib ncursesw ncurses curses"
7210 if test "$cf_full_tgetent" = yes ; then
7211 cf_TERMLIB="otermcap termcap $cf_TERMLIB"
7212 cf_TERMTST="buffer[0] == 0"
7213 else
7214 cf_TERMLIB="tinfow tinfo $cf_TERMLIB"
7215 cf_TERMTST="0"
7216 fi
7217 for cf_termlib in '' $cf_TERMLIB ; do
7218 LIBS="$cf_save_LIBS"
7219 test -n "$cf_termlib" && {
7220 cf_add_libs="$LIBS"
7221 # reverse order
7222 cf_add_0lib=
7223 for cf_add_1lib in -l$cf_termlib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7224 # filter duplicates
7225 for cf_add_1lib in $cf_add_0lib; do
7226 for cf_add_2lib in $cf_add_libs; do
7227 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7228 cf_add_1lib=
7229 break
7230 fi
7231 done
7232 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7233 done
7234 LIBS="$cf_add_libs"
7235 }
7236 if test "$cross_compiling" = yes; then
7237 echo "cross-compiling, cannot verify if a termcap/tgetent is present in $cf_termlib" 1>&5
7238 else
7239 cat >"conftest.$ac_ext" <<_ACEOF
7240 #line 7240 "configure"
7241 #include "confdefs.h"
7242
7243 $cf_termcap_h
7244
7245 /* terminfo implementations ignore the buffer argument, making it useless for
7246 * the xterm application, which uses this information to make a new TERMCAP
7247 * environment variable.
7248 */
7249 int main(void)
7250 {
7251 char buffer[1024];
7252 buffer[0] = 0;
7253 tgetent(buffer, "$cf_TERMVAR");
7254 ${cf_cv_main_return:-return} ($cf_TERMTST); }
7255 _ACEOF
7256 rm -f "conftest$ac_exeext"
7257 if { (eval echo "$as_me:7257: \"$ac_link\"") >&5
7258 (eval $ac_link) 2>&5
7259 ac_status=$?
7260 echo "$as_me:7260: \$? = $ac_status" >&5
7261 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7262 { (eval echo "$as_me:7262: \"$ac_try\"") >&5
7263 (eval $ac_try) 2>&5
7264 ac_status=$?
7265 echo "$as_me:7265: \$? = $ac_status" >&5
7266 (exit "$ac_status"); }; }; then
7267 echo "yes, there is a termcap/tgetent in $cf_termlib" 1>&5
7268 if test -n "$cf_termlib" ; then
7269 cf_cv_lib_tgetent="-l$cf_termlib"
7270 else
7271 cf_cv_lib_tgetent=yes
7272 fi
7273 break
7274 else
7275 echo "$as_me: program exited with status $ac_status" >&5
7276 echo "$as_me: failed program was:" >&5
7277 cat "conftest.$ac_ext" >&5
7278 echo "no, there is no termcap/tgetent in $cf_termlib" 1>&5
7279 fi
7280 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7281 fi
7282 done
7283 LIBS="$cf_save_LIBS"
7284
7285 fi
7286 echo "$as_me:7286: result: $cf_cv_lib_tgetent" >&5
7287 echo "${ECHO_T}$cf_cv_lib_tgetent" >&6
7288
7289 # If we found a working tgetent(), set LIBS and check for termcap.h.
7290 # (LIBS cannot be set inside AC_CACHE_CHECK; the commands there should
7291 # not have side effects other than setting the cache variable, because
7292 # they are not executed when a cached value exists.)
7293 if test "x$cf_cv_lib_tgetent" != xno ; then
7294 test "x$cf_cv_lib_tgetent" != xyes && {
7295 cf_add_libs="$LIBS"
7296 # reverse order
7297 cf_add_0lib=
7298 for cf_add_1lib in $cf_cv_lib_tgetent; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7299 # filter duplicates
7300 for cf_add_1lib in $cf_add_0lib; do
7301 for cf_add_2lib in $cf_add_libs; do
7302 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7303 cf_add_1lib=
7304 break
7305 fi
7306 done
7307 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7308 done
7309 LIBS="$cf_add_libs"
7310 }
7311
7312 cat >>confdefs.h <<\EOF
7313 #define USE_TERMCAP 1
7314 EOF
7315
7316 if test "$cf_full_tgetent" = no ; then
7317 cat >"conftest.$ac_ext" <<_ACEOF
7318 #line 7318 "configure"
7319 #include "confdefs.h"
7320
7321 #include <termcap.h>
7322 int
7323 main (void)
7324 {
7325
7326 #ifdef NCURSES_VERSION
7327 make an error
7328 #endif
7329 ;
7330 return 0;
7331 }
7332 _ACEOF
7333 rm -f "conftest.$ac_objext"
7334 if { (eval echo "$as_me:7334: \"$ac_compile\"") >&5
7335 (eval $ac_compile) 2>&5
7336 ac_status=$?
7337 echo "$as_me:7337: \$? = $ac_status" >&5
7338 (exit "$ac_status"); } &&
7339 { ac_try='test -s "conftest.$ac_objext"'
7340 { (eval echo "$as_me:7340: \"$ac_try\"") >&5
7341 (eval $ac_try) 2>&5
7342 ac_status=$?
7343 echo "$as_me:7343: \$? = $ac_status" >&5
7344 (exit "$ac_status"); }; }; then
7345 cat >>confdefs.h <<\EOF
7346 #define HAVE_TERMCAP_H 1
7347 EOF
7348
7349 else
7350 echo "$as_me: failed program was:" >&5
7351 cat "conftest.$ac_ext" >&5
7352 fi
7353 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7354 fi
7355 else
7356 # If we didn't find a tgetent() that supports the buffer
7357 # argument, look again to see whether we can find even
7358 # a crippled one. A crippled tgetent() is still useful to
7359 # validate values for the TERM environment variable given to
7360 # child processes.
7361 echo "$as_me:7361: checking for partial tgetent function" >&5
7362 echo $ECHO_N "checking for partial tgetent function... $ECHO_C" >&6
7363 if test "${cf_cv_lib_part_tgetent+set}" = set; then
7364 echo $ECHO_N "(cached) $ECHO_C" >&6
7365 else
7366
7367 cf_cv_lib_part_tgetent=no
7368 for cf_termlib in $cf_TERMLIB ; do
7369 LIBS="$cf_save_LIBS -l$cf_termlib"
7370 cat >"conftest.$ac_ext" <<_ACEOF
7371 #line 7371 "configure"
7372 #include "confdefs.h"
7373 $cf_termcap_h
7374 int
7375 main (void)
7376 {
7377 tgetent(0, "$cf_TERMVAR")
7378 ;
7379 return 0;
7380 }
7381 _ACEOF
7382 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7383 if { (eval echo "$as_me:7383: \"$ac_link\"") >&5
7384 (eval $ac_link) 2>&5
7385 ac_status=$?
7386 echo "$as_me:7386: \$? = $ac_status" >&5
7387 (exit "$ac_status"); } &&
7388 { ac_try='test -s "conftest$ac_exeext"'
7389 { (eval echo "$as_me:7389: \"$ac_try\"") >&5
7390 (eval $ac_try) 2>&5
7391 ac_status=$?
7392 echo "$as_me:7392: \$? = $ac_status" >&5
7393 (exit "$ac_status"); }; }; then
7394 echo "there is a terminfo/tgetent in $cf_termlib" 1>&5
7395 cf_cv_lib_part_tgetent="-l$cf_termlib"
7396 break
7397 else
7398 echo "$as_me: failed program was:" >&5
7399 cat "conftest.$ac_ext" >&5
7400 fi
7401 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7402 done
7403 LIBS="$cf_save_LIBS"
7404
7405 fi
7406 echo "$as_me:7406: result: $cf_cv_lib_part_tgetent" >&5
7407 echo "${ECHO_T}$cf_cv_lib_part_tgetent" >&6
7408
7409 if test "$cf_cv_lib_part_tgetent" != no ; then
7410
7411 cf_add_libs="$LIBS"
7412 # reverse order
7413 cf_add_0lib=
7414 for cf_add_1lib in $cf_cv_lib_part_tgetent; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7415 # filter duplicates
7416 for cf_add_1lib in $cf_add_0lib; do
7417 for cf_add_2lib in $cf_add_libs; do
7418 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7419 cf_add_1lib=
7420 break
7421 fi
7422 done
7423 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7424 done
7425 LIBS="$cf_add_libs"
7426
7427 # If this is linking against ncurses, we'll trigger the
7428 # ifdef in resize.c that turns the termcap stuff back off.
7429
7430 cat >>confdefs.h <<\EOF
7431 #define USE_TERMINFO 1
7432 EOF
7433
7434 fi
7435 fi
7436
7437 echo "$as_me:7437: checking for X applications class" >&5
7438 echo $ECHO_N "checking for X applications class... $ECHO_C" >&6
7439
7440 # Check whether --with-app-class or --without-app-class was given.
7441 if test "${with_app_class+set}" = set; then
7442 withval="$with_app_class"
7443 APP_CLASS=$withval
7444 else
7445 APP_CLASS=XTerm
7446 fi;
7447
7448 case x$APP_CLASS in
7449 (*[/@,%]*)
7450 { echo "$as_me:7450: WARNING: X applications class cannot contain punctuation" >&5
7451 echo "$as_me: WARNING: X applications class cannot contain punctuation" >&2;}
7452 APP_CLASS=XTerm
7453 ;;
7454 (x[A-Z]*)
7455 ;;
7456 (*)
7457 { echo "$as_me:7457: WARNING: X applications class must start with capital, ignoring $APP_CLASS" >&5
7458 echo "$as_me: WARNING: X applications class must start with capital, ignoring $APP_CLASS" >&2;}
7459 APP_CLASS=XTerm
7460 ;;
7461 esac
7462
7463 echo "$as_me:7463: result: $APP_CLASS" >&5
7464 echo "${ECHO_T}$APP_CLASS" >&6
7465
7466 echo "$as_me:7466: checking for directory to install resource files" >&5
7467 echo $ECHO_N "checking for directory to install resource files... $ECHO_C" >&6
7468
7469 # Check whether --with-app-defaults or --without-app-defaults was given.
7470 if test "${with_app_defaults+set}" = set; then
7471 withval="$with_app_defaults"
7472 APPSDIR=$withval
7473 else
7474 APPSDIR='${exec_prefix}/lib/X11/app-defaults'
7475 fi;
7476
7477 if test "x$APPSDIR" = xauto
7478 then
7479 APPSDIR='${exec_prefix}/lib/X11/app-defaults'
7480 for cf_path in \
7481 /opt/local/share/X11/app-defaults \
7482 /opt/X11/share/X11/app-defaults \
7483 /usr/share/X11/app-defaults \
7484 /usr/X11/share/X11/app-defaults \
7485 /usr/X11/lib/X11/app-defaults \
7486 /usr/lib/X11/app-defaults \
7487 /etc/X11/app-defaults \
7488 /usr/pkg/lib/X11/app-defaults \
7489 /usr/X11R7/lib/X11/app-defaults \
7490 /usr/X11R6/lib/X11/app-defaults \
7491 /usr/X11R5/lib/X11/app-defaults \
7492 /usr/X11R4/lib/X11/app-defaults \
7493 /usr/local/lib/X11/app-defaults \
7494 /usr/local/share/X11/app-defaults \
7495 /usr/lib64/X11/app-defaults
7496 do
7497 if test -d "$cf_path" ; then
7498 APPSDIR="$cf_path"
7499 break
7500 fi
7501 done
7502 else
7503 cf_path=$APPSDIR
7504
7505 if test "x$prefix" != xNONE; then
7506 cf_path_syntax="$prefix"
7507 else
7508 cf_path_syntax="$ac_default_prefix"
7509 fi
7510
7511 case ".$cf_path" in
7512 (.\$\(*\)*|.\'*\'*)
7513 ;;
7514 (..|./*|.\\*)
7515 ;;
7516 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7517 ;;
7518 (.\$\{*prefix\}*|.\$\{*dir\}*)
7519 eval cf_path="$cf_path"
7520 case ".$cf_path" in
7521 (.NONE/*)
7522 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7523 ;;
7524 esac
7525 ;;
7526 (.no|.NONE/*)
7527 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7528 ;;
7529 (*)
7530 { { echo "$as_me:7530: error: expected a pathname, not \"$cf_path\"" >&5
7531 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
7532 { (exit 1); exit 1; }; }
7533 ;;
7534 esac
7535
7536 fi
7537
7538 echo "$as_me:7538: result: $APPSDIR" >&5
7539 echo "${ECHO_T}$APPSDIR" >&6
7540
7541 no_appsdir=
7542 if test "$APPSDIR" = no
7543 then
7544 no_appsdir="#"
7545 else
7546 EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(APPSDIR)"
7547 fi
7548
7549 echo "$as_me:7549: checking for the icon name" >&5
7550 echo $ECHO_N "checking for the icon name... $ECHO_C" >&6
7551
7552 # Check whether --with-icon-name or --without-icon-name was given.
7553 if test "${with_icon_name+set}" = set; then
7554 withval="$with_icon_name"
7555 ICON_NAME="$withval"
7556 else
7557 ICON_NAME=mini.xterm
7558 fi;
7559 case "x$ICON_NAME" in
7560 (xyes|xno|x)
7561 ICON_NAME=mini.xterm
7562 ;;
7563 esac
7564
7565 echo "$as_me:7565: result: $ICON_NAME" >&5
7566 echo "${ECHO_T}$ICON_NAME" >&6
7567
7568 echo "$as_me:7568: checking for icon symlink to use" >&5
7569 echo $ECHO_N "checking for icon symlink to use... $ECHO_C" >&6
7570
7571 # Check whether --with-icon-symlink or --without-icon-symlink was given.
7572 if test "${with_icon_symlink+set}" = set; then
7573 withval="$with_icon_symlink"
7574 ICON_SYMLINK="$withval"
7575 else
7576 ICON_SYMLINK=NONE
7577 fi;
7578 case "x$ICON_SYMLINK" in
7579 (xyes)
7580 ICON_SYMLINK=xterm
7581 ;;
7582 (xno|x)
7583 ICON_SYMLINK=NONE
7584 ;;
7585 esac
7586
7587 echo "$as_me:7587: result: $ICON_SYMLINK" >&5
7588 echo "${ECHO_T}$ICON_SYMLINK" >&6
7589
7590 # Install all icons except for the overused "terminal".
7591 cf_cv_icon_list=
7592 for my_item in $srcdir/icons/*.svg
7593 do
7594 test -f "$my_item" || continue
7595 cf_icon_name=`echo "$my_item" |sed -e "s,.svg,," -e "s,^$srcdir/,,"`
7596 case $cf_icon_name in
7597 (*_48x48)
7598 continue
7599 ;;
7600 esac
7601 test -n "$verbose" && echo " adding $cf_icon_name to icon-list" 1>&6
7602
7603 echo "${as_me:-configure}:7603: testing adding $cf_icon_name to icon-list ..." 1>&5
7604
7605 cf_cv_icon_list="$cf_cv_icon_list $cf_icon_name"
7606 if test -f "${cf_icon_name}_48x48.png"
7607 then
7608 test -n "$verbose" && echo " adding ${cf_icon_name}_48x48 to icon-list" 1>&6
7609
7610 echo "${as_me:-configure}:7610: testing adding ${cf_icon_name}_48x48 to icon-list ..." 1>&5
7611
7612 cf_cv_icon_list="$cf_cv_icon_list ${cf_icon_name}_48x48"
7613 fi
7614 done
7615
7616 echo "$as_me:7616: checking for directory to install pixmaps" >&5
7617 echo $ECHO_N "checking for directory to install pixmaps... $ECHO_C" >&6
7618
7619 # Check whether --with-pixmapdir or --without-pixmapdir was given.
7620 if test "${with_pixmapdir+set}" = set; then
7621 withval="$with_pixmapdir"
7622 PIXMAPDIR=$withval
7623 else
7624 test -z "$PIXMAPDIR" && PIXMAPDIR='${datadir}/pixmaps'
7625 fi;
7626
7627 if test "x$PIXMAPDIR" = xauto
7628 then
7629 PIXMAPDIR='${datadir}/pixmaps'
7630 for cf_path in \
7631 /usr/share/pixmaps \
7632 /usr/X11R6/share/pixmaps
7633 do
7634 if test -d "$cf_path" ; then
7635 PIXMAPDIR="$cf_path"
7636 break
7637 fi
7638 done
7639 else
7640 cf_path=$PIXMAPDIR
7641
7642 if test "x$prefix" != xNONE; then
7643 cf_path_syntax="$prefix"
7644 else
7645 cf_path_syntax="$ac_default_prefix"
7646 fi
7647
7648 case ".$cf_path" in
7649 (.\$\(*\)*|.\'*\'*)
7650 ;;
7651 (..|./*|.\\*)
7652 ;;
7653 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7654 ;;
7655 (.\$\{*prefix\}*|.\$\{*dir\}*)
7656 eval cf_path="$cf_path"
7657 case ".$cf_path" in
7658 (.NONE/*)
7659 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7660 ;;
7661 esac
7662 ;;
7663 (.no|.NONE/*)
7664 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7665 ;;
7666 (*)
7667 { { echo "$as_me:7667: error: expected a pathname, not \"$cf_path\"" >&5
7668 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
7669 { (exit 1); exit 1; }; }
7670 ;;
7671 esac
7672
7673 fi
7674 echo "$as_me:7674: result: $PIXMAPDIR" >&5
7675 echo "${ECHO_T}$PIXMAPDIR" >&6
7676
7677 no_pixmapdir=
7678 if test "$PIXMAPDIR" = no
7679 then
7680 no_pixmapdir="#"
7681 else
7682 EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(PIXMAPDIR)"
7683 fi
7684
7685 echo "$as_me:7685: checking for directory to install icons" >&5
7686 echo $ECHO_N "checking for directory to install icons... $ECHO_C" >&6
7687
7688 # Check whether --with-icondir or --without-icondir was given.
7689 if test "${with_icondir+set}" = set; then
7690 withval="$with_icondir"
7691 ICONDIR=$withval
7692 else
7693 test -z "$ICONDIR" && ICONDIR=no
7694 fi;
7695
7696 if test "x$ICONDIR" = xauto
7697 then
7698 ICONDIR='${datadir}/icons'
7699 for cf_path in \
7700 /usr/share/icons \
7701 /usr/X11R6/share/icons
7702 do
7703 if test -d "$cf_path" ; then
7704 ICONDIR="$cf_path"
7705 break
7706 fi
7707 done
7708 else
7709 cf_path=$ICONDIR
7710
7711 if test "x$prefix" != xNONE; then
7712 cf_path_syntax="$prefix"
7713 else
7714 cf_path_syntax="$ac_default_prefix"
7715 fi
7716
7717 case ".$cf_path" in
7718 (.\$\(*\)*|.\'*\'*)
7719 ;;
7720 (..|./*|.\\*)
7721 ;;
7722 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7723 ;;
7724 (.\$\{*prefix\}*|.\$\{*dir\}*)
7725 eval cf_path="$cf_path"
7726 case ".$cf_path" in
7727 (.NONE/*)
7728 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7729 ;;
7730 esac
7731 ;;
7732 (.no|.NONE/*)
7733 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7734 ;;
7735 (*)
7736 { { echo "$as_me:7736: error: expected a pathname, not \"$cf_path\"" >&5
7737 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
7738 { (exit 1); exit 1; }; }
7739 ;;
7740 esac
7741
7742 fi
7743 echo "$as_me:7743: result: $ICONDIR" >&5
7744 echo "${ECHO_T}$ICONDIR" >&6
7745
7746 no_icondir=
7747 if test "$ICONDIR" = no
7748 then
7749 no_icondir="#"
7750 else
7751 EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(ICONDIR)"
7752 fi
7753
7754 echo "$as_me:7754: checking if icon theme should be used" >&5
7755 echo $ECHO_N "checking if icon theme should be used... $ECHO_C" >&6
7756
7757 # Check whether --with-icon-theme or --without-icon-theme was given.
7758 if test "${with_icon_theme+set}" = set; then
7759 withval="$with_icon_theme"
7760 ICON_THEME=$withval
7761 else
7762 ICON_THEME=no
7763 fi;
7764
7765 case "x$ICON_THEME" in
7766 (xno)
7767 ;;
7768 (x|xyes)
7769 ICON_THEME=hicolor
7770 ;;
7771 esac
7772 echo "$as_me:7772: result: $ICON_THEME" >&5
7773 echo "${ECHO_T}$ICON_THEME" >&6
7774
7775 if test "x$ICON_THEME" = xno
7776 then
7777 if test "x$ICONDIR" != xno
7778 then
7779 test -n "$verbose" && echo " ignoring icondir without theme" 1>&6
7780
7781 echo "${as_me:-configure}:7781: testing ignoring icondir without theme ..." 1>&5
7782
7783 no_icondir="#"
7784 fi
7785 else
7786 if test "x$ICONDIR" = xno
7787 then
7788 { { echo "$as_me:7788: error: icondir must be set for icon theme" >&5
7789 echo "$as_me: error: icondir must be set for icon theme" >&2;}
7790 { (exit 1); exit 1; }; }
7791 fi
7792 fi
7793
7794 : ${ICON_FORMAT:=".svg .png .xpm"}
7795
7796 ICON_LIST=
7797
7798 if test "x$ICON_THEME" != xno
7799 then
7800 cf_icon_list="$cf_cv_icon_list"
7801 else
7802 cf_icon_list="icons/${ICON_NAME}_48x48"
7803 fi
7804
7805 echo "$as_me:7805: checking for icon(s) to install" >&5
7806 echo $ECHO_N "checking for icon(s) to install... $ECHO_C" >&6
7807 for cf_name in $cf_icon_list
7808 do
7809 test -n "$verbose" && echo " using $ICON_FORMAT" 1>&6
7810
7811 echo "${as_me:-configure}:7811: testing using $ICON_FORMAT ..." 1>&5
7812
7813 for cf_suffix in $ICON_FORMAT
7814 do
7815 cf_icon="${cf_name}${cf_suffix}"
7816 cf_left=`echo "$cf_icon" | sed -e 's/:.*//'`
7817 if test ! -f "${cf_left}"
7818 then
7819 if test "x$srcdir" != "x."
7820 then
7821 cf_icon="${srcdir}/${cf_left}"
7822 cf_left=`echo "$cf_icon" | sed -e 's/:.*//'`
7823 if test ! -f "${cf_left}"
7824 then
7825 continue
7826 fi
7827 else
7828 continue
7829 fi
7830 fi
7831 if test "x$ICON_THEME" != xno
7832 then
7833 cf_base=`basename "$cf_left"`
7834 cf_trim=`echo "$cf_base" | sed -e 's/_[0-9][0-9]x[0-9][0-9]\././'`
7835 case "x${cf_base}" in
7836 (*:*)
7837 cf_next=$cf_base
7838 # user-defined mapping
7839 ;;
7840 (*.png)
7841 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'`
7842 if test -z "$cf_size"
7843 then
7844 { echo "$as_me:7844: WARNING: cannot determine size of $cf_left" >&5
7845 echo "$as_me: WARNING: cannot determine size of $cf_left" >&2;}
7846 continue
7847 fi
7848 cf_next="$cf_size/apps/$cf_trim"
7849 ;;
7850 (*.svg)
7851 cf_next="scalable/apps/$cf_trim"
7852 ;;
7853 (*.xpm)
7854 test -n "$verbose" && echo " ignored XPM file in icon theme" 1>&6
7855
7856 echo "${as_me:-configure}:7856: testing ignored XPM file in icon theme ..." 1>&5
7857
7858 continue
7859 ;;
7860 (*_[0-9][0-9]*x[0-9][0-9]*.*)
7861 cf_size=`echo "$cf_left"|sed -e 's/^.*_\([0-9][0-9]*x[0-9][0-9]*\)\..*$/\1/'`
7862 cf_left=`echo "$cf_left"|sed -e 's/^\(.*\)_\([0-9][0-9]*x[0-9][0-9]*\)\(\..*\)$/\1\3/'`
7863 cf_next="$cf_size/apps/$cf_base"
7864 ;;
7865 esac
7866 test -n "$verbose" && echo " adding $cf_next" 1>&6
7867
7868 echo "${as_me:-configure}:7868: testing adding $cf_next ..." 1>&5
7869
7870 cf_icon="${cf_icon}:${cf_next}"
7871 fi
7872 test -n "$ICON_LIST" && ICON_LIST="$ICON_LIST "
7873 ICON_LIST="$ICON_LIST${cf_icon}"
7874 if test -z "$ICON_NAME"
7875 then
7876 ICON_NAME=`basename "$cf_icon" | sed -e 's/[.:].*//'`
7877 fi
7878 done
7879 done
7880
7881 if test -n "$verbose"
7882 then
7883 echo "$as_me:7883: checking result" >&5
7884 echo $ECHO_N "checking result... $ECHO_C" >&6
7885 fi
7886 echo "$as_me:7886: result: $ICON_LIST" >&5
7887 echo "${ECHO_T}$ICON_LIST" >&6
7888
7889 if test -z "$ICON_LIST"
7890 then
7891 { { echo "$as_me:7891: error: no icons found" >&5
7892 echo "$as_me: error: no icons found" >&2;}
7893 { (exit 1); exit 1; }; }
7894 fi
7895
7896 echo "$as_me:7896: checking for icon name" >&5
7897 echo $ECHO_N "checking for icon name... $ECHO_C" >&6
7898 echo "$as_me:7898: result: $ICON_NAME" >&5
7899 echo "${ECHO_T}$ICON_NAME" >&6
7900
7901 # Comment-out the install-desktop rule if the desktop-utils are not found.
7902 echo "$as_me:7902: checking if you want to install desktop files" >&5
7903 echo $ECHO_N "checking if you want to install desktop files... $ECHO_C" >&6
7904
7905 # Check whether --enable-desktop or --disable-desktop was given.
7906 if test "${enable_desktop+set}" = set; then
7907 enableval="$enable_desktop"
7908 test "$enableval" != no && enableval=yes
7909 if test "$enableval" != "yes" ; then
7910 enable_desktop=$enableval
7911 else
7912 enable_desktop=$enableval
7913 fi
7914 else
7915 enableval=yes
7916 enable_desktop=$enableval
7917
7918 fi;
7919 echo "$as_me:7919: result: $enable_desktop" >&5
7920 echo "${ECHO_T}$enable_desktop" >&6
7921
7922 desktop_utils=
7923 if test "$enable_desktop" = yes ; then
7924 # Extract the first word of "desktop-file-install", so it can be a program name with args.
7925 set dummy desktop-file-install; ac_word=$2
7926 echo "$as_me:7926: checking for $ac_word" >&5
7927 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7928 if test "${ac_cv_prog_desktop_utils+set}" = set; then
7929 echo $ECHO_N "(cached) $ECHO_C" >&6
7930 else
7931 if test -n "$desktop_utils"; then
7932 ac_cv_prog_desktop_utils="$desktop_utils" # Let the user override the test.
7933 else
7934 ac_save_IFS=$IFS; IFS=$ac_path_separator
7935 ac_dummy="$PATH"
7936 for ac_dir in $ac_dummy; do
7937 IFS=$ac_save_IFS
7938 test -z "$ac_dir" && ac_dir=.
7939 $as_executable_p "$ac_dir/$ac_word" || continue
7940 ac_cv_prog_desktop_utils="yes"
7941 echo "$as_me:7941: found $ac_dir/$ac_word" >&5
7942 break
7943 done
7944
7945 test -z "$ac_cv_prog_desktop_utils" && ac_cv_prog_desktop_utils="no"
7946 fi
7947 fi
7948 desktop_utils=$ac_cv_prog_desktop_utils
7949 if test -n "$desktop_utils"; then
7950 echo "$as_me:7950: result: $desktop_utils" >&5
7951 echo "${ECHO_T}$desktop_utils" >&6
7952 else
7953 echo "$as_me:7953: result: no" >&5
7954 echo "${ECHO_T}no" >&6
7955 fi
7956
7957 fi
7958
7959 test "$desktop_utils" = yes && desktop_utils= || desktop_utils="#"
7960
7961 if test -z "$desktop_utils"
7962 then
7963 echo "$as_me:7963: checking for requested desktop-category" >&5
7964 echo $ECHO_N "checking for requested desktop-category... $ECHO_C" >&6
7965
7966 # Check whether --with-desktop-category or --without-desktop-category was given.
7967 if test "${with_desktop_category+set}" = set; then
7968 withval="$with_desktop_category"
7969 cf_desktop_want=$withval
7970 else
7971 cf_desktop_want=auto
7972 fi;
7973 echo "$as_me:7973: result: $cf_desktop_want" >&5
7974 echo "${ECHO_T}$cf_desktop_want" >&6
7975
7976 if test "$cf_desktop_want" = auto
7977 then
7978 rm -rf conftest*
7979 cf_desktop_also=
7980 for cf_desktop_dir in \
7981 /usr/share/app-install \
7982 /usr/share/applications
7983 do
7984 if test -d $cf_desktop_dir
7985 then
7986 find $cf_desktop_dir -name '*.desktop' | \
7987 while true
7988 do
7989 read cf_desktop_path
7990 test -z "$cf_desktop_path" && break
7991 cf_desktop_name=`basename "$cf_desktop_path" .desktop`
7992 case $cf_desktop_name in
7993 (xterm|*-xterm|*rxvt*|*konsole|*[Tt]erminal)
7994 test -n "$verbose" && echo " inspect $cf_desktop_path" 1>&6
7995
7996 echo "${as_me:-configure}:7996: testing inspect $cf_desktop_path ..." 1>&5
7997
7998 ${EGREP-egrep} '^Categories=' "$cf_desktop_path" | \
7999 tr ';' '\n' | \
8000 sed -e 's%^.*=%%' -e '/^$/d' >>conftest.1
8001 ;;
8002 esac
8003 done
8004 fi
8005 done
8006 if test -s conftest.1
8007 then
8008 cf_desktop_last=
8009 sort conftest.1 | \
8010 while true
8011 do
8012 read cf_desktop_this
8013 test -z "$cf_desktop_this" && break
8014 if test -s conftest.2
8015 then
8016 grep -w "$cf_desktop_this" conftest.2 >/dev/null && continue
8017 elif test -s conftest.3
8018 then
8019 grep -w "$cf_desktop_this" conftest.3 >/dev/null && continue
8020 fi
8021 case "$cf_desktop_this" in
8022 (-*)
8023 ;;
8024 (Qt*|*Xfce*|*[ABCDEFGHIJKLMNOPQRSTUVWXYZ][ABCDEFGHIJKLMNOPQRSTUVWXYZ]*)
8025 test -n "$verbose" && echo " ignored $cf_desktop_this" 1>&6
8026
8027 echo "${as_me:-configure}:8027: testing ignored $cf_desktop_this ..." 1>&5
8028
8029 echo "$cf_desktop_this" >> conftest.3
8030 ;;
8031 (System|TerminalEmulator|*)
8032 test -n "$verbose" && echo " applied $cf_desktop_this" 1>&6
8033
8034 echo "${as_me:-configure}:8034: testing applied $cf_desktop_this ..." 1>&5
8035
8036 test "x$cf_desktop_last" != "x$cf_desktop_this" && echo "$cf_desktop_this" >>conftest.2
8037 ;;
8038 esac
8039 cf_desktop_last=$cf_desktop_this
8040 done
8041 cf_desktop_want="`tr '\n' ';' < conftest.2`"
8042 fi
8043 if test -n "$cf_desktop_want"
8044 then
8045 if test "$cf_desktop_want" = auto
8046 then
8047 cf_desktop_want=
8048 else
8049 # do a sanity check on the semicolon-separated list, ignore on failure
8050 cf_desktop_test=`echo "$cf_desktop_want" | sed -e 's/[^;]//g'`
8051 test -z "$cf_desktop_test" && cf_desktop_want=
8052 cf_desktop_test=`echo "$cf_desktop_want" | sed -e 's/^.*;$/./g'`
8053 test -z "$cf_desktop_test" && cf_desktop_want=
8054 fi
8055 fi
8056 if test -z "$cf_desktop_want"
8057 then
8058 cf_desktop_want="`echo "System|TerminalEmulator|*" | sed -e 's/\*//g' -e 's/|/;/g' -e 's/;*$/;/g'`"
8059 test -n "$verbose" && echo " no usable value found for desktop category" 1>&6
8060
8061 echo "${as_me:-configure}:8061: testing no usable value found for desktop category ..." 1>&5
8062
8063 fi
8064 fi
8065 DESKTOP_CATEGORY=`echo "$cf_desktop_want" | sed -e 's/[ ,]/;/g'`
8066 test -n "$verbose" && echo " will use Categories=$DESKTOP_CATEGORY" 1>&6
8067
8068 echo "${as_me:-configure}:8068: testing will use Categories=$DESKTOP_CATEGORY ..." 1>&5
8069
8070 fi
8071
8072 echo "$as_me:8072: checking for install-permissions reference" >&5
8073 echo $ECHO_N "checking for install-permissions reference... $ECHO_C" >&6
8074
8075 # Check whether --with-reference or --without-reference was given.
8076 if test "${with_reference+set}" = set; then
8077 withval="$with_reference"
8078 with_reference=$withval
8079 else
8080 with_reference=xterm
8081 fi;
8082 echo "$as_me:8082: result: $with_reference" >&5
8083 echo "${ECHO_T}$with_reference" >&6
8084
8085 with_full_paths=yes
8086
8087 echo "$as_me:8087: checking for PATH separator" >&5
8088 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
8089 case "$cf_cv_system_name" in
8090 (os2*) PATH_SEPARATOR=';' ;;
8091 (*) ${PATH_SEPARATOR:=':'} ;;
8092 esac
8093
8094 echo "$as_me:8094: result: $PATH_SEPARATOR" >&5
8095 echo "${ECHO_T}$PATH_SEPARATOR" >&6
8096
8097 test -z "$XTERM_PATH" && XTERM_PATH="$with_reference"
8098 for ac_prog in $XTERM_PATH $with_reference
8099 do
8100 # Extract the first word of "$ac_prog", so it can be a program name with args.
8101 set dummy $ac_prog; ac_word=$2
8102 echo "$as_me:8102: checking for $ac_word" >&5
8103 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8104 if test "${ac_cv_path_XTERM_PATH+set}" = set; then
8105 echo $ECHO_N "(cached) $ECHO_C" >&6
8106 else
8107 case $XTERM_PATH in
8108 [\\/]* | ?:[\\/]*)
8109 ac_cv_path_XTERM_PATH="$XTERM_PATH" # Let the user override the test with a path.
8110 ;;
8111 *)
8112 ac_save_IFS=$IFS; IFS=$ac_path_separator
8113 ac_dummy="$PATH"
8114 for ac_dir in $ac_dummy; do
8115 IFS=$ac_save_IFS
8116 test -z "$ac_dir" && ac_dir=.
8117 if $as_executable_p "$ac_dir/$ac_word"; then
8118 ac_cv_path_XTERM_PATH="$ac_dir/$ac_word"
8119 echo "$as_me:8119: found $ac_dir/$ac_word" >&5
8120 break
8121 fi
8122 done
8123
8124 ;;
8125 esac
8126 fi
8127 XTERM_PATH=$ac_cv_path_XTERM_PATH
8128
8129 if test -n "$XTERM_PATH"; then
8130 echo "$as_me:8130: result: $XTERM_PATH" >&5
8131 echo "${ECHO_T}$XTERM_PATH" >&6
8132 else
8133 echo "$as_me:8133: result: no" >&5
8134 echo "${ECHO_T}no" >&6
8135 fi
8136
8137 test -n "$XTERM_PATH" && break
8138 done
8139 test -n "$XTERM_PATH" || XTERM_PATH="$XTERM_PATH"
8140
8141 cf_path_prog=""
8142 cf_path_args=""
8143 IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8144 for cf_temp in $ac_cv_path_XTERM_PATH
8145 do
8146 if test -z "$cf_path_prog" ; then
8147 if test "$with_full_paths" = yes ; then
8148
8149 if test "x$prefix" != xNONE; then
8150 cf_path_syntax="$prefix"
8151 else
8152 cf_path_syntax="$ac_default_prefix"
8153 fi
8154
8155 case ".$cf_temp" in
8156 (.\$\(*\)*|.\'*\'*)
8157 ;;
8158 (..|./*|.\\*)
8159 ;;
8160 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8161 ;;
8162 (.\$\{*prefix\}*|.\$\{*dir\}*)
8163 eval cf_temp="$cf_temp"
8164 case ".$cf_temp" in
8165 (.NONE/*)
8166 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8167 ;;
8168 esac
8169 ;;
8170 (.no|.NONE/*)
8171 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8172 ;;
8173 (*)
8174 break
8175 ;;
8176 esac
8177
8178 cf_path_prog="$cf_temp"
8179 else
8180 cf_path_prog="`basename "$cf_temp"`"
8181 fi
8182 elif test -z "$cf_path_args" ; then
8183 cf_path_args="$cf_temp"
8184 else
8185 cf_path_args="$cf_path_args $cf_temp"
8186 fi
8187 done
8188 IFS="$cf_save_ifs"
8189
8190 if test -n "$cf_path_prog" ; then
8191
8192 echo "${as_me:-configure}:8192: testing defining path for ${cf_path_prog} ..." 1>&5
8193
8194 cat >>confdefs.h <<EOF
8195 #define XTERM_PATH_PATH "$cf_path_prog"
8196 EOF
8197
8198 test -n "$cf_path_args" &&
8199 cat >>confdefs.h <<EOF
8200 #define XTERM_PATH_ARGS "$cf_path_args"
8201 EOF
8202
8203 fi
8204
8205 # If any of --program-prefix, --program-suffix or --program-transform-name is
8206 # given, accept an option tell the makefile to create a symbolic link, e.g.,
8207 # to "xterm" on install.
8208 XTERM_SYMLINK=NONE
8209
8210 if test "$program_transform_name" != "'s,,,'" ; then
8211 cf_name=`echo "$program_transform_name" | sed -e 's,\\$\\$,$,g'`
8212 cf_name=`echo xterm |sed -e "$cf_name"`
8213 echo "$as_me:8213: checking for symbolic link to create to $cf_name" >&5
8214 echo $ECHO_N "checking for symbolic link to create to $cf_name... $ECHO_C" >&6
8215
8216 # Check whether --with-xterm-symlink or --without-xterm-symlink was given.
8217 if test "${with_xterm_symlink+set}" = set; then
8218 withval="$with_xterm_symlink"
8219 with_symlink=$withval
8220 else
8221 with_symlink=xterm
8222 fi;
8223 echo "$as_me:8223: result: $with_symlink" >&5
8224 echo "${ECHO_T}$with_symlink" >&6
8225 test "$with_symlink" = yes && with_symlink=xterm
8226 test -n "$with_symlink" && \
8227 test "$with_symlink" != no && \
8228 test "$with_symlink" != "$cf_name" && \
8229 XTERM_SYMLINK="$with_symlink"
8230 fi
8231
8232 echo "$as_me:8232: checking if you want to disable openpty" >&5
8233 echo $ECHO_N "checking if you want to disable openpty... $ECHO_C" >&6
8234
8235 # Check whether --enable-openpty or --disable-openpty was given.
8236 if test "${enable_openpty+set}" = set; then
8237 enableval="$enable_openpty"
8238 test "$enableval" != no && enableval=yes
8239 if test "$enableval" != "yes" ; then
8240 disable_openpty=yes
8241 else
8242 disable_openpty=no
8243 fi
8244 else
8245 enableval=yes
8246 disable_openpty=no
8247
8248 fi;
8249 echo "$as_me:8249: result: $disable_openpty" >&5
8250 echo "${ECHO_T}$disable_openpty" >&6
8251
8252 echo "$as_me:8252: checking if you want to disable setuid" >&5
8253 echo $ECHO_N "checking if you want to disable setuid... $ECHO_C" >&6
8254
8255 # Check whether --enable-setuid or --disable-setuid was given.
8256 if test "${enable_setuid+set}" = set; then
8257 enableval="$enable_setuid"
8258 test "$enableval" != no && enableval=yes
8259 if test "$enableval" != "yes" ; then
8260 disable_setuid=yes
8261 else
8262 disable_setuid=no
8263 fi
8264 else
8265 enableval=yes
8266 disable_setuid=no
8267
8268 fi;
8269 echo "$as_me:8269: result: $disable_setuid" >&5
8270 echo "${ECHO_T}$disable_setuid" >&6
8271
8272 echo "$as_me:8272: checking if you want to disable setgid" >&5
8273 echo $ECHO_N "checking if you want to disable setgid... $ECHO_C" >&6
8274
8275 # Check whether --enable-setgid or --disable-setgid was given.
8276 if test "${enable_setgid+set}" = set; then
8277 enableval="$enable_setgid"
8278 test "$enableval" != no && enableval=yes
8279 if test "$enableval" != "yes" ; then
8280 disable_setgid=yes
8281 else
8282 disable_setgid=no
8283 fi
8284 else
8285 enableval=yes
8286 disable_setgid=no
8287
8288 fi;
8289 echo "$as_me:8289: result: $disable_setgid" >&5
8290 echo "${ECHO_T}$disable_setgid" >&6
8291
8292 echo "$as_me:8292: checking if you want to run xterm setuid to a given user" >&5
8293 echo $ECHO_N "checking if you want to run xterm setuid to a given user... $ECHO_C" >&6
8294
8295 # Check whether --with-setuid or --without-setuid was given.
8296 if test "${with_setuid+set}" = set; then
8297 withval="$with_setuid"
8298 use_given_setuid=$withval
8299 else
8300 use_given_setuid=no
8301 fi;
8302 echo "$as_me:8302: result: $use_given_setuid" >&5
8303 echo "${ECHO_T}$use_given_setuid" >&6
8304
8305 if test "$use_given_setuid" != no ; then
8306 if test "$use_given_setuid" = yes ; then
8307 cf_cv_given_setuid=root
8308 else
8309 cf_cv_given_setuid=$use_given_setuid
8310 fi
8311 # inherit SINSTALL_OPTS from environment to allow packager to customize it.
8312 SINSTALL_OPTS="$SINSTALL_OPTS u+s -u $cf_cv_given_setuid"
8313 fi
8314
8315 echo "$as_me:8315: checking if you want to run xterm setgid to match utmp/utmpx file" >&5
8316 echo $ECHO_N "checking if you want to run xterm setgid to match utmp/utmpx file... $ECHO_C" >&6
8317
8318 # Check whether --with-utmp-setgid or --without-utmp-setgid was given.
8319 if test "${with_utmp_setgid+set}" = set; then
8320 withval="$with_utmp_setgid"
8321 use_utmp_setgid=$withval
8322 else
8323 use_utmp_setgid=no
8324 fi;
8325 echo "$as_me:8325: result: $use_utmp_setgid" >&5
8326 echo "${ECHO_T}$use_utmp_setgid" >&6
8327
8328 if test "$use_utmp_setgid" != no ; then
8329 if test "$use_utmp_setgid" = yes ; then
8330
8331 if test $cf_cv_have_utmp != no ; then
8332 echo "$as_me:8332: checking for utmp/utmpx group" >&5
8333 echo $ECHO_N "checking for utmp/utmpx group... $ECHO_C" >&6
8334 if test "${cf_cv_utmp_group+set}" = set; then
8335 echo $ECHO_N "(cached) $ECHO_C" >&6
8336 else
8337
8338 for cf_utmp_path in /var/adm /var/run
8339 do
8340 for cf_utmp_file in utmpx utmp
8341 do
8342 if test -f $cf_utmp_path/$cf_utmp_file
8343 then
8344 cf_cv_utmp_group=root
8345
8346 cf_option="-lL"
8347
8348 # Expect listing to have fields like this:
8349 #-r--r--r-- 1 user group 34293 Jul 18 16:29 pathname
8350 ls "$cf_option" "$cf_utmp_path/$cf_utmp_file" >conftest
8351 read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest
8352 if test -z "$cf_rest" ; then
8353 cf_option="${cf_option}g"
8354 ls "$cf_option" "$cf_utmp_path/$cf_utmp_file" >conftest
8355 read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest
8356 fi
8357 rm -f conftest
8358
8359 # If we have a pathname, and the date fields look right, assume we've
8360 # captured the group as well.
8361 if test -n "$cf_rest" ; then
8362 cf_test=`echo "${cf_date2}${cf_date3}" | sed -e 's/[0-9:]//g'`
8363 if test -z "$cf_test" ; then
8364 cf_cv_utmp_group=$cf_grp;
8365 fi
8366 fi
8367 break
8368 fi
8369 done
8370 test -n "$cf_cv_utmp_group" && break
8371 done
8372
8373 fi
8374 echo "$as_me:8374: result: $cf_cv_utmp_group" >&5
8375 echo "${ECHO_T}$cf_cv_utmp_group" >&6
8376 else
8377 { { echo "$as_me:8377: error: cannot find utmp group" >&5
8378 echo "$as_me: error: cannot find utmp group" >&2;}
8379 { (exit 1); exit 1; }; }
8380 fi
8381
8382 else
8383 cf_cv_utmp_group=$use_utmp_setgid
8384 fi
8385 if test "$cf_cv_posix_saved_ids" != yes ; then
8386 { { echo "$as_me:8386: error: Your system does not support POSIX saved-ids" >&5
8387 echo "$as_me: error: Your system does not support POSIX saved-ids" >&2;}
8388 { (exit 1); exit 1; }; }
8389 fi
8390
8391 cat >>confdefs.h <<\EOF
8392 #define USE_UTMP_SETGID 1
8393 EOF
8394
8395 SINSTALL_OPTS="$SINSTALL_OPTS g+s -g $cf_cv_utmp_group"
8396 fi
8397
8398 echo "$as_me:8398: checking if you want to link with utempter" >&5
8399 echo $ECHO_N "checking if you want to link with utempter... $ECHO_C" >&6
8400
8401 # Check whether --with-utempter or --without-utempter was given.
8402 if test "${with_utempter+set}" = set; then
8403 withval="$with_utempter"
8404 use_utempter=$withval
8405 else
8406 use_utempter=no
8407 fi;
8408 echo "$as_me:8408: result: $use_utempter" >&5
8409 echo "${ECHO_T}$use_utempter" >&6
8410
8411 if test "$use_utempter" = yes ; then
8412
8413 echo "$as_me:8413: checking if we can link with utempter library" >&5
8414 echo $ECHO_N "checking if we can link with utempter library... $ECHO_C" >&6
8415 if test "${cf_cv_have_utempter+set}" = set; then
8416 echo $ECHO_N "(cached) $ECHO_C" >&6
8417 else
8418
8419 cf_save_LIBS="$LIBS"
8420
8421 cf_add_libs="$LIBS"
8422 # reverse order
8423 cf_add_0lib=
8424 for cf_add_1lib in -lutempter; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8425 # filter duplicates
8426 for cf_add_1lib in $cf_add_0lib; do
8427 for cf_add_2lib in $cf_add_libs; do
8428 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8429 cf_add_1lib=
8430 break
8431 fi
8432 done
8433 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8434 done
8435 LIBS="$cf_add_libs"
8436
8437 cat >"conftest.$ac_ext" <<_ACEOF
8438 #line 8438 "configure"
8439 #include "confdefs.h"
8440
8441 #include <utempter.h>
8442
8443 int
8444 main (void)
8445 {
8446
8447 addToUtmp("/dev/tty", 0, 1);
8448 removeFromUtmp();
8449
8450 ;
8451 return 0;
8452 }
8453 _ACEOF
8454 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8455 if { (eval echo "$as_me:8455: \"$ac_link\"") >&5
8456 (eval $ac_link) 2>&5
8457 ac_status=$?
8458 echo "$as_me:8458: \$? = $ac_status" >&5
8459 (exit "$ac_status"); } &&
8460 { ac_try='test -s "conftest$ac_exeext"'
8461 { (eval echo "$as_me:8461: \"$ac_try\"") >&5
8462 (eval $ac_try) 2>&5
8463 ac_status=$?
8464 echo "$as_me:8464: \$? = $ac_status" >&5
8465 (exit "$ac_status"); }; }; then
8466
8467 cf_cv_have_utempter=yes
8468 else
8469 echo "$as_me: failed program was:" >&5
8470 cat "conftest.$ac_ext" >&5
8471
8472 cf_cv_have_utempter=no
8473 fi
8474 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8475 LIBS="$cf_save_LIBS"
8476
8477 fi
8478 echo "$as_me:8478: result: $cf_cv_have_utempter" >&5
8479 echo "${ECHO_T}$cf_cv_have_utempter" >&6
8480 if test "$cf_cv_have_utempter" = yes ; then
8481
8482 cat >>confdefs.h <<\EOF
8483 #define USE_UTEMPTER 1
8484 EOF
8485
8486 cf_add_libs="$LIBS"
8487 # reverse order
8488 cf_add_0lib=
8489 for cf_add_1lib in -lutempter; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8490 # filter duplicates
8491 for cf_add_1lib in $cf_add_0lib; do
8492 for cf_add_2lib in $cf_add_libs; do
8493 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8494 cf_add_1lib=
8495 break
8496 fi
8497 done
8498 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8499 done
8500 LIBS="$cf_add_libs"
8501
8502 fi
8503
8504 test "$cf_cv_have_utempter" != yes && use_utempter=no
8505 else
8506 use_utempter=no
8507 fi
8508
8509 # Some configurations permit (or require) either setuid or setgid mode.
8510 # Let the user decide.
8511 if test "$use_utempter" = yes ; then
8512 if test "${enable_setuid+set}" != set ; then
8513 disable_setuid=yes
8514 test -n "$verbose" && echo " No --disable-setuid option given, force to yes" 1>&6
8515
8516 echo "${as_me:-configure}:8516: testing No --disable-setuid option given, force to yes ..." 1>&5
8517
8518 fi
8519 fi
8520
8521 ### checks for external data
8522
8523 echo "$as_me:8523: checking if external errno is declared" >&5
8524 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
8525 if test "${cf_cv_dcl_errno+set}" = set; then
8526 echo $ECHO_N "(cached) $ECHO_C" >&6
8527 else
8528
8529 cat >"conftest.$ac_ext" <<_ACEOF
8530 #line 8530 "configure"
8531 #include "confdefs.h"
8532
8533 $ac_includes_default
8534 #include <errno.h>
8535 int
8536 main (void)
8537 {
8538 int x = (int) errno; (void)x
8539 ;
8540 return 0;
8541 }
8542 _ACEOF
8543 rm -f "conftest.$ac_objext"
8544 if { (eval echo "$as_me:8544: \"$ac_compile\"") >&5
8545 (eval $ac_compile) 2>&5
8546 ac_status=$?
8547 echo "$as_me:8547: \$? = $ac_status" >&5
8548 (exit "$ac_status"); } &&
8549 { ac_try='test -s "conftest.$ac_objext"'
8550 { (eval echo "$as_me:8550: \"$ac_try\"") >&5
8551 (eval $ac_try) 2>&5
8552 ac_status=$?
8553 echo "$as_me:8553: \$? = $ac_status" >&5
8554 (exit "$ac_status"); }; }; then
8555 cf_cv_dcl_errno=yes
8556 else
8557 echo "$as_me: failed program was:" >&5
8558 cat "conftest.$ac_ext" >&5
8559 cf_cv_dcl_errno=no
8560 fi
8561 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8562
8563 fi
8564 echo "$as_me:8564: result: $cf_cv_dcl_errno" >&5
8565 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
8566
8567 if test "$cf_cv_dcl_errno" = no ; then
8568
8569 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8570
8571 cat >>confdefs.h <<EOF
8572 #define $cf_result 1
8573 EOF
8574
8575 fi
8576
8577 # It's possible (for near-UNIX clones) that the data doesn't exist
8578
8579 echo "$as_me:8579: checking if external errno exists" >&5
8580 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
8581 if test "${cf_cv_have_errno+set}" = set; then
8582 echo $ECHO_N "(cached) $ECHO_C" >&6
8583 else
8584
8585 cat >"conftest.$ac_ext" <<_ACEOF
8586 #line 8586 "configure"
8587 #include "confdefs.h"
8588
8589 #undef errno
8590 extern int errno;
8591
8592 int
8593 main (void)
8594 {
8595 errno = 2
8596 ;
8597 return 0;
8598 }
8599 _ACEOF
8600 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8601 if { (eval echo "$as_me:8601: \"$ac_link\"") >&5
8602 (eval $ac_link) 2>&5
8603 ac_status=$?
8604 echo "$as_me:8604: \$? = $ac_status" >&5
8605 (exit "$ac_status"); } &&
8606 { ac_try='test -s "conftest$ac_exeext"'
8607 { (eval echo "$as_me:8607: \"$ac_try\"") >&5
8608 (eval $ac_try) 2>&5
8609 ac_status=$?
8610 echo "$as_me:8610: \$? = $ac_status" >&5
8611 (exit "$ac_status"); }; }; then
8612 cf_cv_have_errno=yes
8613 else
8614 echo "$as_me: failed program was:" >&5
8615 cat "conftest.$ac_ext" >&5
8616 cf_cv_have_errno=no
8617 fi
8618 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8619
8620 fi
8621 echo "$as_me:8621: result: $cf_cv_have_errno" >&5
8622 echo "${ECHO_T}$cf_cv_have_errno" >&6
8623
8624 if test "$cf_cv_have_errno" = yes ; then
8625
8626 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8627
8628 cat >>confdefs.h <<EOF
8629 #define $cf_result 1
8630 EOF
8631
8632 fi
8633
8634 echo "$as_me:8634: checking for explicit tty group name" >&5
8635 echo $ECHO_N "checking for explicit tty group name... $ECHO_C" >&6
8636
8637 # Check whether --with-tty-group or --without-tty-group was given.
8638 if test "${with_tty_group+set}" = set; then
8639 withval="$with_tty_group"
8640 cf_tty_group=$withval
8641 else
8642 cf_tty_group=auto...
8643 fi;
8644 test -z "$cf_tty_group" && cf_tty_group=auto...
8645 test "$cf_tty_group" = yes && cf_tty_group=auto...
8646 echo "$as_me:8646: result: $cf_tty_group" >&5
8647 echo "${ECHO_T}$cf_tty_group" >&6
8648
8649 if test "$cf_tty_group" = "auto..." ; then
8650 echo "$as_me:8650: checking for tty group name" >&5
8651 echo $ECHO_N "checking for tty group name... $ECHO_C" >&6
8652 if test "${cf_cv_tty_group_name+set}" = set; then
8653 echo $ECHO_N "(cached) $ECHO_C" >&6
8654 else
8655
8656 # If we are configuring as root, it is hard to get a clue about the tty group.
8657 # But we'll guess based on how our connection is set up - assuming it is done
8658 # properly.
8659
8660 cf_uid="`id | sed -e 's/^^=*=//' -e 's/(.*$//'`"
8661 # )vi
8662 if test "$cf_uid" != 0 ; then
8663 cf_cv_tty_group_name=
8664 cf_tty_name="`tty`"
8665 test "$cf_tty_name" = "not a tty" && cf_tty_name=/dev/tty
8666 test -z "$cf_tty_name" && cf_tty_name=/dev/tty
8667 if test -c "$cf_tty_name"
8668 then
8669 cf_option="-lL"
8670
8671 # Expect listing to have fields like this:
8672 #-rwxrwxrwx 1 user group 34293 Jul 18 16:29 pathname
8673 ls $cf_option "$cf_tty_name" >conftest.out
8674 read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest.out
8675 if test -z "$cf_rest" ; then
8676 cf_option="${cf_option}g"
8677 ls "$cf_option" "$cf_tty_name" >conftest.out
8678 read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest.out
8679 fi
8680 rm -f conftest.out
8681 cf_cv_tty_group_name=$cf_grp
8682 fi
8683 fi
8684
8685 # If we cannot deduce the tty group, fall back on hardcoded cases
8686
8687 if test -z "$cf_cv_tty_group_name"
8688 then
8689 case $host_os in
8690 (osf*)
8691 cf_cv_tty_group_name="terminal"
8692 ;;
8693 (*)
8694 cf_cv_tty_group_name="unknown"
8695 if ( ${EGREP-egrep} '^tty:' /etc/group 2>/dev/null 1>/dev/null ) then
8696 cf_cv_tty_group_name="tty"
8697 fi
8698 ;;
8699 esac
8700 fi
8701
8702 fi
8703 echo "$as_me:8703: result: $cf_cv_tty_group_name" >&5
8704 echo "${ECHO_T}$cf_cv_tty_group_name" >&6
8705 cf_tty_group="$cf_cv_tty_group_name"
8706 else
8707 # if configure option, always do this
8708
8709 cat >>confdefs.h <<\EOF
8710 #define USE_TTY_GROUP 1
8711 EOF
8712
8713 fi
8714
8715 cat >>confdefs.h <<EOF
8716 #define TTY_GROUP_NAME "$cf_tty_group"
8717 EOF
8718
8719 # This is only a double-check that the group-name we obtained above really
8720 # does apply to the device. We cannot perform this test if we are in batch
8721 # mode, or if we are cross-compiling.
8722
8723 echo "$as_me:8723: checking if we may use the $cf_tty_group group" >&5
8724 echo $ECHO_N "checking if we may use the $cf_tty_group group... $ECHO_C" >&6
8725 if test "${cf_cv_tty_group+set}" = set; then
8726 echo $ECHO_N "(cached) $ECHO_C" >&6
8727 else
8728
8729 cf_tty_name="`tty`"
8730 if test "$cf_tty_name" != "not a tty"
8731 then
8732 if test "$cross_compiling" = yes; then
8733 cf_cv_tty_group=unknown
8734 else
8735 cat >"conftest.$ac_ext" <<_ACEOF
8736 #line 8736 "configure"
8737 #include "confdefs.h"
8738
8739 $ac_includes_default
8740
8741 #include <grp.h>
8742
8743 int main(void)
8744 {
8745 struct stat sb;
8746 struct group *ttygrp;
8747 int fd;
8748 char *name;
8749
8750 for (fd = 0; fd < 3; ++fd) {
8751 if ((name = ttyname(fd)) != 0)
8752 break;
8753 }
8754 if (name == 0)
8755 name = "/dev/tty";
8756
8757 ttygrp = getgrnam(TTY_GROUP_NAME);
8758 endgrent();
8759
8760 if (ttygrp != 0
8761 && name != 0
8762 && stat(name, &sb) == 0
8763 && sb.st_gid != getgid()
8764 && sb.st_gid == ttygrp->gr_gid) {
8765 ${cf_cv_main_return:-return} (0);
8766 }
8767 ${cf_cv_main_return:-return} (1);
8768 }
8769
8770 _ACEOF
8771 rm -f "conftest$ac_exeext"
8772 if { (eval echo "$as_me:8772: \"$ac_link\"") >&5
8773 (eval $ac_link) 2>&5
8774 ac_status=$?
8775 echo "$as_me:8775: \$? = $ac_status" >&5
8776 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8777 { (eval echo "$as_me:8777: \"$ac_try\"") >&5
8778 (eval $ac_try) 2>&5
8779 ac_status=$?
8780 echo "$as_me:8780: \$? = $ac_status" >&5
8781 (exit "$ac_status"); }; }; then
8782 cf_cv_tty_group=yes
8783 else
8784 echo "$as_me: program exited with status $ac_status" >&5
8785 echo "$as_me: failed program was:" >&5
8786 cat "conftest.$ac_ext" >&5
8787 cf_cv_tty_group=no
8788 fi
8789 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8790 fi
8791 elif test "$cross_compiling" = yes; then
8792 cf_cv_tty_group=unknown
8793 else
8794 cf_cv_tty_group=yes
8795 fi
8796
8797 fi
8798 echo "$as_me:8798: result: $cf_cv_tty_group" >&5
8799 echo "${ECHO_T}$cf_cv_tty_group" >&6
8800
8801 if test $cf_cv_tty_group = no ; then
8802 { echo "$as_me:8802: WARNING: Cannot use $cf_tty_group group" >&5
8803 echo "$as_me: WARNING: Cannot use $cf_tty_group group" >&2;}
8804 else
8805 cat >>confdefs.h <<\EOF
8806 #define USE_TTY_GROUP 1
8807 EOF
8808
8809 fi
8810
8811 ### checks for system services and user specified options
8812
8813 echo "$as_me:8813: checking for X" >&5
8814 echo $ECHO_N "checking for X... $ECHO_C" >&6
8815
8816 # Check whether --with-x or --without-x was given.
8817 if test "${with_x+set}" = set; then
8818 withval="$with_x"
8819
8820 fi;
8821 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8822 if test "x$with_x" = xno; then
8823 # The user explicitly disabled X.
8824 have_x=disabled
8825 else
8826 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
8827 # Both variables are already set.
8828 have_x=yes
8829 else
8830 if test "${ac_cv_have_x+set}" = set; then
8831 echo $ECHO_N "(cached) $ECHO_C" >&6
8832 else
8833 # One or both of the vars are not set, and there is no cached value.
8834 ac_x_includes=no ac_x_libraries=no
8835 rm -fr conftest.dir
8836 if mkdir conftest.dir; then
8837 cd conftest.dir
8838 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
8839 cat >Imakefile <<'EOF'
8840 acfindx:
8841 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
8842 EOF
8843 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
8844 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8845 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
8846 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8847 for ac_extension in a so sl dylib dll; do
8848 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8849 test -f "$ac_im_libdir/libX11.$ac_extension"; then
8850 ac_im_usrlibdir=$ac_im_libdir; break
8851 fi
8852 done
8853 # Screen out bogus values from the imake configuration. They are
8854 # bogus both because they are the default anyway, and because
8855 # using them would break gcc on systems where it needs fixed includes.
8856 case $ac_im_incroot in
8857 /usr/include) ;;
8858 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8859 esac
8860 case $ac_im_usrlibdir in
8861 /usr/lib | /lib) ;;
8862 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8863 esac
8864 fi
8865 cd ..
8866 rm -fr conftest.dir
8867 fi
8868
8869 # Standard set of common directories for X headers.
8870 # Check X11 before X11Rn because it is often a symlink to the current release.
8871 ac_x_header_dirs='
8872 /usr/X11/include
8873 /usr/X11R7/include
8874 /usr/X11R6/include
8875 /usr/X11R5/include
8876 /usr/X11R4/include
8877
8878 /opt/local/include
8879 /opt/X11/include
8880
8881 /usr/include/X11
8882 /usr/include/X11R7
8883 /usr/include/X11R6
8884 /usr/include/X11R5
8885 /usr/include/X11R4
8886
8887 /usr/local/X11/include
8888 /usr/local/X11R7/include
8889 /usr/local/X11R6/include
8890 /usr/local/X11R5/include
8891 /usr/local/X11R4/include
8892
8893 /usr/local/include/X11
8894 /usr/local/include/X11R7
8895 /usr/local/include/X11R6
8896 /usr/local/include/X11R5
8897 /usr/local/include/X11R4
8898
8899 /usr/X386/include
8900 /usr/x386/include
8901 /usr/XFree86/include/X11
8902
8903 /usr/include
8904 /usr/local/include
8905 /usr/unsupported/include
8906 /usr/athena/include
8907 /usr/local/x11r5/include
8908 /usr/lpp/Xamples/include
8909
8910 /usr/openwin/include
8911 /usr/openwin/share/include'
8912
8913 if test "$ac_x_includes" = no; then
8914 # Guess where to find include files, by looking for Intrinsic.h.
8915 # First, try using that file with no special directory specified.
8916 cat >"conftest.$ac_ext" <<_ACEOF
8917 #line 8917 "configure"
8918 #include "confdefs.h"
8919 #include <X11/Intrinsic.h>
8920 _ACEOF
8921 if { (eval echo "$as_me:8921: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8922 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8923 ac_status=$?
8924 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8925 rm -f conftest.er1
8926 cat conftest.err >&5
8927 echo "$as_me:8927: \$? = $ac_status" >&5
8928 (exit "$ac_status"); } >/dev/null; then
8929 if test -s conftest.err; then
8930 ac_cpp_err=$ac_c_preproc_warn_flag
8931 else
8932 ac_cpp_err=
8933 fi
8934 else
8935 ac_cpp_err=yes
8936 fi
8937 if test -z "$ac_cpp_err"; then
8938 # We can compile using X headers with no special include directory.
8939 ac_x_includes=
8940 else
8941 echo "$as_me: failed program was:" >&5
8942 cat "conftest.$ac_ext" >&5
8943 for ac_dir in $ac_x_header_dirs; do
8944 if test -r "$ac_dir/X11/Intrinsic.h"; then
8945 ac_x_includes=$ac_dir
8946 break
8947 fi
8948 done
8949 fi
8950 rm -f conftest.err "conftest.$ac_ext"
8951 fi # $ac_x_includes = no
8952
8953 if test "$ac_x_libraries" = no; then
8954 # Check for the libraries.
8955 # See if we find them without any special options.
8956 # Don't add to $LIBS permanently.
8957 ac_save_LIBS=$LIBS
8958 LIBS="-lXt $LIBS"
8959 cat >"conftest.$ac_ext" <<_ACEOF
8960 #line 8960 "configure"
8961 #include "confdefs.h"
8962 #include <X11/Intrinsic.h>
8963 int
8964 main (void)
8965 {
8966 XtMalloc (0)
8967 ;
8968 return 0;
8969 }
8970 _ACEOF
8971 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8972 if { (eval echo "$as_me:8972: \"$ac_link\"") >&5
8973 (eval $ac_link) 2>&5
8974 ac_status=$?
8975 echo "$as_me:8975: \$? = $ac_status" >&5
8976 (exit "$ac_status"); } &&
8977 { ac_try='test -s "conftest$ac_exeext"'
8978 { (eval echo "$as_me:8978: \"$ac_try\"") >&5
8979 (eval $ac_try) 2>&5
8980 ac_status=$?
8981 echo "$as_me:8981: \$? = $ac_status" >&5
8982 (exit "$ac_status"); }; }; then
8983 LIBS=$ac_save_LIBS
8984 # We can link X programs with no special library path.
8985 ac_x_libraries=
8986 else
8987 echo "$as_me: failed program was:" >&5
8988 cat "conftest.$ac_ext" >&5
8989 LIBS=$ac_save_LIBS
8990 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8991 do
8992 # Don't even attempt the hair of trying to link an X program!
8993 for ac_extension in a so sl dylib dll; do
8994 if test -r "$ac_dir/libXt.$ac_extension"; then
8995 ac_x_libraries=$ac_dir
8996 break 2
8997 fi
8998 done
8999 done
9000 fi
9001 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9002 fi # $ac_x_libraries = no
9003
9004 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
9005 # Didn't find X anywhere. Cache the known absence of X.
9006 ac_cv_have_x="have_x=no"
9007 else
9008 # Record where we found X for the cache.
9009 ac_cv_have_x="have_x=yes \
9010 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9011 fi
9012 fi
9013
9014 fi
9015 eval "$ac_cv_have_x"
9016 fi # $with_x != no
9017
9018 if test "$have_x" != yes; then
9019 echo "$as_me:9019: result: $have_x" >&5
9020 echo "${ECHO_T}$have_x" >&6
9021 no_x=yes
9022 else
9023 # If each of the values was on the command line, it overrides each guess.
9024 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9025 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9026 # Update the cache value to reflect the command line values.
9027 ac_cv_have_x="have_x=yes \
9028 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9029 echo "$as_me:9029: result: libraries $x_libraries, headers $x_includes" >&5
9030 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
9031 fi
9032
9033 if test "$no_x" = yes; then
9034 # Not all programs may use this symbol, but it does not hurt to define it.
9035
9036 cat >>confdefs.h <<\EOF
9037 #define X_DISPLAY_MISSING 1
9038 EOF
9039
9040 X_CFLAGS=
9041 X_PRE_LIBS=
9042 X_LIBS=
9043 X_EXTRA_LIBS=
9044 else
9045 if test -n "$x_includes"; then
9046 X_CFLAGS="$X_CFLAGS -I$x_includes"
9047 fi
9048
9049 # It would also be nice to do this for all -L options, not just this one.
9050 if test -n "$x_libraries"; then
9051 X_LIBS="$X_LIBS -L$x_libraries"
9052 # For Solaris; some versions of Sun CC require a space after -R and
9053 # others require no space. Words are not sufficient . . . .
9054 case `(uname -sr) 2>/dev/null` in
9055 "SunOS 5"*)
9056 echo "$as_me:9056: checking whether -R must be followed by a space" >&5
9057 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
9058 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
9059 cat >"conftest.$ac_ext" <<_ACEOF
9060 #line 9060 "configure"
9061 #include "confdefs.h"
9062
9063 int
9064 main (void)
9065 {
9066
9067 ;
9068 return 0;
9069 }
9070 _ACEOF
9071 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9072 if { (eval echo "$as_me:9072: \"$ac_link\"") >&5
9073 (eval $ac_link) 2>&5
9074 ac_status=$?
9075 echo "$as_me:9075: \$? = $ac_status" >&5
9076 (exit "$ac_status"); } &&
9077 { ac_try='test -s "conftest$ac_exeext"'
9078 { (eval echo "$as_me:9078: \"$ac_try\"") >&5
9079 (eval $ac_try) 2>&5
9080 ac_status=$?
9081 echo "$as_me:9081: \$? = $ac_status" >&5
9082 (exit "$ac_status"); }; }; then
9083 ac_R_nospace=yes
9084 else
9085 echo "$as_me: failed program was:" >&5
9086 cat "conftest.$ac_ext" >&5
9087 ac_R_nospace=no
9088 fi
9089 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9090 if test $ac_R_nospace = yes; then
9091 echo "$as_me:9091: result: no" >&5
9092 echo "${ECHO_T}no" >&6
9093 X_LIBS="$X_LIBS -R$x_libraries"
9094 else
9095 LIBS="$ac_xsave_LIBS -R $x_libraries"
9096 cat >"conftest.$ac_ext" <<_ACEOF
9097 #line 9097 "configure"
9098 #include "confdefs.h"
9099
9100 int
9101 main (void)
9102 {
9103
9104 ;
9105 return 0;
9106 }
9107 _ACEOF
9108 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9109 if { (eval echo "$as_me:9109: \"$ac_link\"") >&5
9110 (eval $ac_link) 2>&5
9111 ac_status=$?
9112 echo "$as_me:9112: \$? = $ac_status" >&5
9113 (exit "$ac_status"); } &&
9114 { ac_try='test -s "conftest$ac_exeext"'
9115 { (eval echo "$as_me:9115: \"$ac_try\"") >&5
9116 (eval $ac_try) 2>&5
9117 ac_status=$?
9118 echo "$as_me:9118: \$? = $ac_status" >&5
9119 (exit "$ac_status"); }; }; then
9120 ac_R_space=yes
9121 else
9122 echo "$as_me: failed program was:" >&5
9123 cat "conftest.$ac_ext" >&5
9124 ac_R_space=no
9125 fi
9126 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9127 if test $ac_R_space = yes; then
9128 echo "$as_me:9128: result: yes" >&5
9129 echo "${ECHO_T}yes" >&6
9130 X_LIBS="$X_LIBS -R $x_libraries"
9131 else
9132 echo "$as_me:9132: result: neither works" >&5
9133 echo "${ECHO_T}neither works" >&6
9134 fi
9135 fi
9136 LIBS=$ac_xsave_LIBS
9137 esac
9138 fi
9139
9140 # Check for system-dependent libraries X programs must link with.
9141 # Do this before checking for the system-independent R6 libraries
9142 # (-lICE), since we may need -lsocket or whatever for X linking.
9143
9144 if test "$ISC" = yes; then
9145 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
9146 else
9147 # Martyn Johnson says this is needed for Ultrix, if the X
9148 # libraries were built with DECnet support. And Karl Berry says
9149 # the Alpha needs dnet_stub (dnet does not exist).
9150 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
9151 cat >"conftest.$ac_ext" <<_ACEOF
9152 #line 9152 "configure"
9153 #include "confdefs.h"
9154
9155 /* Override any gcc2 internal prototype to avoid an error. */
9156 #ifdef __cplusplus
9157 extern "C"
9158 #endif
9159 /* We use char because int might match the return type of a gcc2
9160 builtin and then its argument prototype would still apply. */
9161 char XOpenDisplay ();
9162 int
9163 main (void)
9164 {
9165 XOpenDisplay ();
9166 ;
9167 return 0;
9168 }
9169 _ACEOF
9170 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9171 if { (eval echo "$as_me:9171: \"$ac_link\"") >&5
9172 (eval $ac_link) 2>&5
9173 ac_status=$?
9174 echo "$as_me:9174: \$? = $ac_status" >&5
9175 (exit "$ac_status"); } &&
9176 { ac_try='test -s "conftest$ac_exeext"'
9177 { (eval echo "$as_me:9177: \"$ac_try\"") >&5
9178 (eval $ac_try) 2>&5
9179 ac_status=$?
9180 echo "$as_me:9180: \$? = $ac_status" >&5
9181 (exit "$ac_status"); }; }; then
9182 :
9183 else
9184 echo "$as_me: failed program was:" >&5
9185 cat "conftest.$ac_ext" >&5
9186 echo "$as_me:9186: checking for dnet_ntoa in -ldnet" >&5
9187 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
9188 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
9189 echo $ECHO_N "(cached) $ECHO_C" >&6
9190 else
9191 ac_check_lib_save_LIBS=$LIBS
9192 LIBS="-ldnet $LIBS"
9193 cat >"conftest.$ac_ext" <<_ACEOF
9194 #line 9194 "configure"
9195 #include "confdefs.h"
9196
9197 /* Override any gcc2 internal prototype to avoid an error. */
9198 #ifdef __cplusplus
9199 extern "C"
9200 #endif
9201 /* We use char because int might match the return type of a gcc2
9202 builtin and then its argument prototype would still apply. */
9203 char dnet_ntoa ();
9204 int
9205 main (void)
9206 {
9207 dnet_ntoa ();
9208 ;
9209 return 0;
9210 }
9211 _ACEOF
9212 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9213 if { (eval echo "$as_me:9213: \"$ac_link\"") >&5
9214 (eval $ac_link) 2>&5
9215 ac_status=$?
9216 echo "$as_me:9216: \$? = $ac_status" >&5
9217 (exit "$ac_status"); } &&
9218 { ac_try='test -s "conftest$ac_exeext"'
9219 { (eval echo "$as_me:9219: \"$ac_try\"") >&5
9220 (eval $ac_try) 2>&5
9221 ac_status=$?
9222 echo "$as_me:9222: \$? = $ac_status" >&5
9223 (exit "$ac_status"); }; }; then
9224 ac_cv_lib_dnet_dnet_ntoa=yes
9225 else
9226 echo "$as_me: failed program was:" >&5
9227 cat "conftest.$ac_ext" >&5
9228 ac_cv_lib_dnet_dnet_ntoa=no
9229 fi
9230 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9231 LIBS=$ac_check_lib_save_LIBS
9232 fi
9233 echo "$as_me:9233: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9234 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
9235 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
9236 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
9237 fi
9238
9239 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
9240 echo "$as_me:9240: checking for dnet_ntoa in -ldnet_stub" >&5
9241 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
9242 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
9243 echo $ECHO_N "(cached) $ECHO_C" >&6
9244 else
9245 ac_check_lib_save_LIBS=$LIBS
9246 LIBS="-ldnet_stub $LIBS"
9247 cat >"conftest.$ac_ext" <<_ACEOF
9248 #line 9248 "configure"
9249 #include "confdefs.h"
9250
9251 /* Override any gcc2 internal prototype to avoid an error. */
9252 #ifdef __cplusplus
9253 extern "C"
9254 #endif
9255 /* We use char because int might match the return type of a gcc2
9256 builtin and then its argument prototype would still apply. */
9257 char dnet_ntoa ();
9258 int
9259 main (void)
9260 {
9261 dnet_ntoa ();
9262 ;
9263 return 0;
9264 }
9265 _ACEOF
9266 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9267 if { (eval echo "$as_me:9267: \"$ac_link\"") >&5
9268 (eval $ac_link) 2>&5
9269 ac_status=$?
9270 echo "$as_me:9270: \$? = $ac_status" >&5
9271 (exit "$ac_status"); } &&
9272 { ac_try='test -s "conftest$ac_exeext"'
9273 { (eval echo "$as_me:9273: \"$ac_try\"") >&5
9274 (eval $ac_try) 2>&5
9275 ac_status=$?
9276 echo "$as_me:9276: \$? = $ac_status" >&5
9277 (exit "$ac_status"); }; }; then
9278 ac_cv_lib_dnet_stub_dnet_ntoa=yes
9279 else
9280 echo "$as_me: failed program was:" >&5
9281 cat "conftest.$ac_ext" >&5
9282 ac_cv_lib_dnet_stub_dnet_ntoa=no
9283 fi
9284 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9285 LIBS=$ac_check_lib_save_LIBS
9286 fi
9287 echo "$as_me:9287: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9288 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
9289 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
9290 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
9291 fi
9292
9293 fi
9294 fi
9295 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9296 LIBS="$ac_xsave_LIBS"
9297
9298 # msh (at] cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9299 # to get the SysV transport functions.
9300 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
9301 # needs -lnsl.
9302 # The nsl library prevents programs from opening the X display
9303 # on Irix 5.2, according to T.E. Dickey.
9304 # The functions gethostbyname, getservbyname, and inet_addr are
9305 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
9306 echo "$as_me:9306: checking for gethostbyname" >&5
9307 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
9308 if test "${ac_cv_func_gethostbyname+set}" = set; then
9309 echo $ECHO_N "(cached) $ECHO_C" >&6
9310 else
9311 cat >"conftest.$ac_ext" <<_ACEOF
9312 #line 9312 "configure"
9313 #include "confdefs.h"
9314 #define gethostbyname autoconf_temporary
9315 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9316 #undef gethostbyname
9317
9318 #ifdef __cplusplus
9319 extern "C"
9320 #endif
9321
9322 /* We use char because int might match the return type of a gcc2
9323 builtin and then its argument prototype would still apply. */
9324 char gethostbyname (void);
9325
9326 int
9327 main (void)
9328 {
9329
9330 /* The GNU C library defines stubs for functions which it implements
9331 to always fail with ENOSYS. Some functions are actually named
9332 something starting with __ and the normal name is an alias. */
9333 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
9334 #error found stub for gethostbyname
9335 #endif
9336
9337 return gethostbyname ();
9338 ;
9339 return 0;
9340 }
9341 _ACEOF
9342 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9343 if { (eval echo "$as_me:9343: \"$ac_link\"") >&5
9344 (eval $ac_link) 2>&5
9345 ac_status=$?
9346 echo "$as_me:9346: \$? = $ac_status" >&5
9347 (exit "$ac_status"); } &&
9348 { ac_try='test -s "conftest$ac_exeext"'
9349 { (eval echo "$as_me:9349: \"$ac_try\"") >&5
9350 (eval $ac_try) 2>&5
9351 ac_status=$?
9352 echo "$as_me:9352: \$? = $ac_status" >&5
9353 (exit "$ac_status"); }; }; then
9354 ac_cv_func_gethostbyname=yes
9355 else
9356 echo "$as_me: failed program was:" >&5
9357 cat "conftest.$ac_ext" >&5
9358 ac_cv_func_gethostbyname=no
9359 fi
9360 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9361 fi
9362 echo "$as_me:9362: result: $ac_cv_func_gethostbyname" >&5
9363 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
9364
9365 if test $ac_cv_func_gethostbyname = no; then
9366 echo "$as_me:9366: checking for gethostbyname in -lnsl" >&5
9367 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
9368 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
9369 echo $ECHO_N "(cached) $ECHO_C" >&6
9370 else
9371 ac_check_lib_save_LIBS=$LIBS
9372 LIBS="-lnsl $LIBS"
9373 cat >"conftest.$ac_ext" <<_ACEOF
9374 #line 9374 "configure"
9375 #include "confdefs.h"
9376
9377 /* Override any gcc2 internal prototype to avoid an error. */
9378 #ifdef __cplusplus
9379 extern "C"
9380 #endif
9381 /* We use char because int might match the return type of a gcc2
9382 builtin and then its argument prototype would still apply. */
9383 char gethostbyname ();
9384 int
9385 main (void)
9386 {
9387 gethostbyname ();
9388 ;
9389 return 0;
9390 }
9391 _ACEOF
9392 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9393 if { (eval echo "$as_me:9393: \"$ac_link\"") >&5
9394 (eval $ac_link) 2>&5
9395 ac_status=$?
9396 echo "$as_me:9396: \$? = $ac_status" >&5
9397 (exit "$ac_status"); } &&
9398 { ac_try='test -s "conftest$ac_exeext"'
9399 { (eval echo "$as_me:9399: \"$ac_try\"") >&5
9400 (eval $ac_try) 2>&5
9401 ac_status=$?
9402 echo "$as_me:9402: \$? = $ac_status" >&5
9403 (exit "$ac_status"); }; }; then
9404 ac_cv_lib_nsl_gethostbyname=yes
9405 else
9406 echo "$as_me: failed program was:" >&5
9407 cat "conftest.$ac_ext" >&5
9408 ac_cv_lib_nsl_gethostbyname=no
9409 fi
9410 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9411 LIBS=$ac_check_lib_save_LIBS
9412 fi
9413 echo "$as_me:9413: result: $ac_cv_lib_nsl_gethostbyname" >&5
9414 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
9415 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
9416 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
9417 fi
9418
9419 if test $ac_cv_lib_nsl_gethostbyname = no; then
9420 echo "$as_me:9420: checking for gethostbyname in -lbsd" >&5
9421 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
9422 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
9423 echo $ECHO_N "(cached) $ECHO_C" >&6
9424 else
9425 ac_check_lib_save_LIBS=$LIBS
9426 LIBS="-lbsd $LIBS"
9427 cat >"conftest.$ac_ext" <<_ACEOF
9428 #line 9428 "configure"
9429 #include "confdefs.h"
9430
9431 /* Override any gcc2 internal prototype to avoid an error. */
9432 #ifdef __cplusplus
9433 extern "C"
9434 #endif
9435 /* We use char because int might match the return type of a gcc2
9436 builtin and then its argument prototype would still apply. */
9437 char gethostbyname ();
9438 int
9439 main (void)
9440 {
9441 gethostbyname ();
9442 ;
9443 return 0;
9444 }
9445 _ACEOF
9446 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9447 if { (eval echo "$as_me:9447: \"$ac_link\"") >&5
9448 (eval $ac_link) 2>&5
9449 ac_status=$?
9450 echo "$as_me:9450: \$? = $ac_status" >&5
9451 (exit "$ac_status"); } &&
9452 { ac_try='test -s "conftest$ac_exeext"'
9453 { (eval echo "$as_me:9453: \"$ac_try\"") >&5
9454 (eval $ac_try) 2>&5
9455 ac_status=$?
9456 echo "$as_me:9456: \$? = $ac_status" >&5
9457 (exit "$ac_status"); }; }; then
9458 ac_cv_lib_bsd_gethostbyname=yes
9459 else
9460 echo "$as_me: failed program was:" >&5
9461 cat "conftest.$ac_ext" >&5
9462 ac_cv_lib_bsd_gethostbyname=no
9463 fi
9464 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9465 LIBS=$ac_check_lib_save_LIBS
9466 fi
9467 echo "$as_me:9467: result: $ac_cv_lib_bsd_gethostbyname" >&5
9468 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
9469 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
9470 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
9471 fi
9472
9473 fi
9474 fi
9475
9476 # lieder (at] skyler.mavd.honeywell.com says without -lsocket,
9477 # socket/setsockopt and other routines are undefined under SCO ODT
9478 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
9479 # on later versions), says Simon Leinen: it contains gethostby*
9480 # variants that don't use the nameserver (or something). -lsocket
9481 # must be given before -lnsl if both are needed. We assume that
9482 # if connect needs -lnsl, so does gethostbyname.
9483 echo "$as_me:9483: checking for connect" >&5
9484 echo $ECHO_N "checking for connect... $ECHO_C" >&6
9485 if test "${ac_cv_func_connect+set}" = set; then
9486 echo $ECHO_N "(cached) $ECHO_C" >&6
9487 else
9488 cat >"conftest.$ac_ext" <<_ACEOF
9489 #line 9489 "configure"
9490 #include "confdefs.h"
9491 #define connect autoconf_temporary
9492 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9493 #undef connect
9494
9495 #ifdef __cplusplus
9496 extern "C"
9497 #endif
9498
9499 /* We use char because int might match the return type of a gcc2
9500 builtin and then its argument prototype would still apply. */
9501 char connect (void);
9502
9503 int
9504 main (void)
9505 {
9506
9507 /* The GNU C library defines stubs for functions which it implements
9508 to always fail with ENOSYS. Some functions are actually named
9509 something starting with __ and the normal name is an alias. */
9510 #if defined (__stub_connect) || defined (__stub___connect)
9511 #error found stub for connect
9512 #endif
9513
9514 return connect ();
9515 ;
9516 return 0;
9517 }
9518 _ACEOF
9519 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9520 if { (eval echo "$as_me:9520: \"$ac_link\"") >&5
9521 (eval $ac_link) 2>&5
9522 ac_status=$?
9523 echo "$as_me:9523: \$? = $ac_status" >&5
9524 (exit "$ac_status"); } &&
9525 { ac_try='test -s "conftest$ac_exeext"'
9526 { (eval echo "$as_me:9526: \"$ac_try\"") >&5
9527 (eval $ac_try) 2>&5
9528 ac_status=$?
9529 echo "$as_me:9529: \$? = $ac_status" >&5
9530 (exit "$ac_status"); }; }; then
9531 ac_cv_func_connect=yes
9532 else
9533 echo "$as_me: failed program was:" >&5
9534 cat "conftest.$ac_ext" >&5
9535 ac_cv_func_connect=no
9536 fi
9537 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9538 fi
9539 echo "$as_me:9539: result: $ac_cv_func_connect" >&5
9540 echo "${ECHO_T}$ac_cv_func_connect" >&6
9541
9542 if test $ac_cv_func_connect = no; then
9543 echo "$as_me:9543: checking for connect in -lsocket" >&5
9544 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
9545 if test "${ac_cv_lib_socket_connect+set}" = set; then
9546 echo $ECHO_N "(cached) $ECHO_C" >&6
9547 else
9548 ac_check_lib_save_LIBS=$LIBS
9549 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
9550 cat >"conftest.$ac_ext" <<_ACEOF
9551 #line 9551 "configure"
9552 #include "confdefs.h"
9553
9554 /* Override any gcc2 internal prototype to avoid an error. */
9555 #ifdef __cplusplus
9556 extern "C"
9557 #endif
9558 /* We use char because int might match the return type of a gcc2
9559 builtin and then its argument prototype would still apply. */
9560 char connect ();
9561 int
9562 main (void)
9563 {
9564 connect ();
9565 ;
9566 return 0;
9567 }
9568 _ACEOF
9569 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9570 if { (eval echo "$as_me:9570: \"$ac_link\"") >&5
9571 (eval $ac_link) 2>&5
9572 ac_status=$?
9573 echo "$as_me:9573: \$? = $ac_status" >&5
9574 (exit "$ac_status"); } &&
9575 { ac_try='test -s "conftest$ac_exeext"'
9576 { (eval echo "$as_me:9576: \"$ac_try\"") >&5
9577 (eval $ac_try) 2>&5
9578 ac_status=$?
9579 echo "$as_me:9579: \$? = $ac_status" >&5
9580 (exit "$ac_status"); }; }; then
9581 ac_cv_lib_socket_connect=yes
9582 else
9583 echo "$as_me: failed program was:" >&5
9584 cat "conftest.$ac_ext" >&5
9585 ac_cv_lib_socket_connect=no
9586 fi
9587 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9588 LIBS=$ac_check_lib_save_LIBS
9589 fi
9590 echo "$as_me:9590: result: $ac_cv_lib_socket_connect" >&5
9591 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
9592 if test "$ac_cv_lib_socket_connect" = yes; then
9593 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
9594 fi
9595
9596 fi
9597
9598 # Guillermo Gomez says -lposix is necessary on A/UX.
9599 echo "$as_me:9599: checking for remove" >&5
9600 echo $ECHO_N "checking for remove... $ECHO_C" >&6
9601 if test "${ac_cv_func_remove+set}" = set; then
9602 echo $ECHO_N "(cached) $ECHO_C" >&6
9603 else
9604 cat >"conftest.$ac_ext" <<_ACEOF
9605 #line 9605 "configure"
9606 #include "confdefs.h"
9607 #define remove autoconf_temporary
9608 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9609 #undef remove
9610
9611 #ifdef __cplusplus
9612 extern "C"
9613 #endif
9614
9615 /* We use char because int might match the return type of a gcc2
9616 builtin and then its argument prototype would still apply. */
9617 char remove (void);
9618
9619 int
9620 main (void)
9621 {
9622
9623 /* The GNU C library defines stubs for functions which it implements
9624 to always fail with ENOSYS. Some functions are actually named
9625 something starting with __ and the normal name is an alias. */
9626 #if defined (__stub_remove) || defined (__stub___remove)
9627 #error found stub for remove
9628 #endif
9629
9630 return remove ();
9631 ;
9632 return 0;
9633 }
9634 _ACEOF
9635 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9636 if { (eval echo "$as_me:9636: \"$ac_link\"") >&5
9637 (eval $ac_link) 2>&5
9638 ac_status=$?
9639 echo "$as_me:9639: \$? = $ac_status" >&5
9640 (exit "$ac_status"); } &&
9641 { ac_try='test -s "conftest$ac_exeext"'
9642 { (eval echo "$as_me:9642: \"$ac_try\"") >&5
9643 (eval $ac_try) 2>&5
9644 ac_status=$?
9645 echo "$as_me:9645: \$? = $ac_status" >&5
9646 (exit "$ac_status"); }; }; then
9647 ac_cv_func_remove=yes
9648 else
9649 echo "$as_me: failed program was:" >&5
9650 cat "conftest.$ac_ext" >&5
9651 ac_cv_func_remove=no
9652 fi
9653 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9654 fi
9655 echo "$as_me:9655: result: $ac_cv_func_remove" >&5
9656 echo "${ECHO_T}$ac_cv_func_remove" >&6
9657
9658 if test $ac_cv_func_remove = no; then
9659 echo "$as_me:9659: checking for remove in -lposix" >&5
9660 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
9661 if test "${ac_cv_lib_posix_remove+set}" = set; then
9662 echo $ECHO_N "(cached) $ECHO_C" >&6
9663 else
9664 ac_check_lib_save_LIBS=$LIBS
9665 LIBS="-lposix $LIBS"
9666 cat >"conftest.$ac_ext" <<_ACEOF
9667 #line 9667 "configure"
9668 #include "confdefs.h"
9669
9670 /* Override any gcc2 internal prototype to avoid an error. */
9671 #ifdef __cplusplus
9672 extern "C"
9673 #endif
9674 /* We use char because int might match the return type of a gcc2
9675 builtin and then its argument prototype would still apply. */
9676 char remove ();
9677 int
9678 main (void)
9679 {
9680 remove ();
9681 ;
9682 return 0;
9683 }
9684 _ACEOF
9685 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9686 if { (eval echo "$as_me:9686: \"$ac_link\"") >&5
9687 (eval $ac_link) 2>&5
9688 ac_status=$?
9689 echo "$as_me:9689: \$? = $ac_status" >&5
9690 (exit "$ac_status"); } &&
9691 { ac_try='test -s "conftest$ac_exeext"'
9692 { (eval echo "$as_me:9692: \"$ac_try\"") >&5
9693 (eval $ac_try) 2>&5
9694 ac_status=$?
9695 echo "$as_me:9695: \$? = $ac_status" >&5
9696 (exit "$ac_status"); }; }; then
9697 ac_cv_lib_posix_remove=yes
9698 else
9699 echo "$as_me: failed program was:" >&5
9700 cat "conftest.$ac_ext" >&5
9701 ac_cv_lib_posix_remove=no
9702 fi
9703 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9704 LIBS=$ac_check_lib_save_LIBS
9705 fi
9706 echo "$as_me:9706: result: $ac_cv_lib_posix_remove" >&5
9707 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
9708 if test "$ac_cv_lib_posix_remove" = yes; then
9709 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
9710 fi
9711
9712 fi
9713
9714 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
9715 echo "$as_me:9715: checking for shmat" >&5
9716 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
9717 if test "${ac_cv_func_shmat+set}" = set; then
9718 echo $ECHO_N "(cached) $ECHO_C" >&6
9719 else
9720 cat >"conftest.$ac_ext" <<_ACEOF
9721 #line 9721 "configure"
9722 #include "confdefs.h"
9723 #define shmat autoconf_temporary
9724 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9725 #undef shmat
9726
9727 #ifdef __cplusplus
9728 extern "C"
9729 #endif
9730
9731 /* We use char because int might match the return type of a gcc2
9732 builtin and then its argument prototype would still apply. */
9733 char shmat (void);
9734
9735 int
9736 main (void)
9737 {
9738
9739 /* The GNU C library defines stubs for functions which it implements
9740 to always fail with ENOSYS. Some functions are actually named
9741 something starting with __ and the normal name is an alias. */
9742 #if defined (__stub_shmat) || defined (__stub___shmat)
9743 #error found stub for shmat
9744 #endif
9745
9746 return shmat ();
9747 ;
9748 return 0;
9749 }
9750 _ACEOF
9751 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9752 if { (eval echo "$as_me:9752: \"$ac_link\"") >&5
9753 (eval $ac_link) 2>&5
9754 ac_status=$?
9755 echo "$as_me:9755: \$? = $ac_status" >&5
9756 (exit "$ac_status"); } &&
9757 { ac_try='test -s "conftest$ac_exeext"'
9758 { (eval echo "$as_me:9758: \"$ac_try\"") >&5
9759 (eval $ac_try) 2>&5
9760 ac_status=$?
9761 echo "$as_me:9761: \$? = $ac_status" >&5
9762 (exit "$ac_status"); }; }; then
9763 ac_cv_func_shmat=yes
9764 else
9765 echo "$as_me: failed program was:" >&5
9766 cat "conftest.$ac_ext" >&5
9767 ac_cv_func_shmat=no
9768 fi
9769 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9770 fi
9771 echo "$as_me:9771: result: $ac_cv_func_shmat" >&5
9772 echo "${ECHO_T}$ac_cv_func_shmat" >&6
9773
9774 if test $ac_cv_func_shmat = no; then
9775 echo "$as_me:9775: checking for shmat in -lipc" >&5
9776 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
9777 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
9778 echo $ECHO_N "(cached) $ECHO_C" >&6
9779 else
9780 ac_check_lib_save_LIBS=$LIBS
9781 LIBS="-lipc $LIBS"
9782 cat >"conftest.$ac_ext" <<_ACEOF
9783 #line 9783 "configure"
9784 #include "confdefs.h"
9785
9786 /* Override any gcc2 internal prototype to avoid an error. */
9787 #ifdef __cplusplus
9788 extern "C"
9789 #endif
9790 /* We use char because int might match the return type of a gcc2
9791 builtin and then its argument prototype would still apply. */
9792 char shmat ();
9793 int
9794 main (void)
9795 {
9796 shmat ();
9797 ;
9798 return 0;
9799 }
9800 _ACEOF
9801 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9802 if { (eval echo "$as_me:9802: \"$ac_link\"") >&5
9803 (eval $ac_link) 2>&5
9804 ac_status=$?
9805 echo "$as_me:9805: \$? = $ac_status" >&5
9806 (exit "$ac_status"); } &&
9807 { ac_try='test -s "conftest$ac_exeext"'
9808 { (eval echo "$as_me:9808: \"$ac_try\"") >&5
9809 (eval $ac_try) 2>&5
9810 ac_status=$?
9811 echo "$as_me:9811: \$? = $ac_status" >&5
9812 (exit "$ac_status"); }; }; then
9813 ac_cv_lib_ipc_shmat=yes
9814 else
9815 echo "$as_me: failed program was:" >&5
9816 cat "conftest.$ac_ext" >&5
9817 ac_cv_lib_ipc_shmat=no
9818 fi
9819 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9820 LIBS=$ac_check_lib_save_LIBS
9821 fi
9822 echo "$as_me:9822: result: $ac_cv_lib_ipc_shmat" >&5
9823 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
9824 if test "$ac_cv_lib_ipc_shmat" = yes; then
9825 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
9826 fi
9827
9828 fi
9829 fi
9830
9831 # Check for libraries that X11R6 Xt/Xaw programs need.
9832 ac_save_LDFLAGS=$LDFLAGS
9833 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
9834 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
9835 # check for ICE first), but we must link in the order -lSM -lICE or
9836 # we get undefined symbols. So assume we have SM if we have ICE.
9837 # These have to be linked with before -lX11, unlike the other
9838 # libraries we check for below, so use a different variable.
9839 # John Interrante, Karl Berry
9840 echo "$as_me:9840: checking for IceConnectionNumber in -lICE" >&5
9841 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
9842 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
9843 echo $ECHO_N "(cached) $ECHO_C" >&6
9844 else
9845 ac_check_lib_save_LIBS=$LIBS
9846 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
9847 cat >"conftest.$ac_ext" <<_ACEOF
9848 #line 9848 "configure"
9849 #include "confdefs.h"
9850
9851 /* Override any gcc2 internal prototype to avoid an error. */
9852 #ifdef __cplusplus
9853 extern "C"
9854 #endif
9855 /* We use char because int might match the return type of a gcc2
9856 builtin and then its argument prototype would still apply. */
9857 char IceConnectionNumber ();
9858 int
9859 main (void)
9860 {
9861 IceConnectionNumber ();
9862 ;
9863 return 0;
9864 }
9865 _ACEOF
9866 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9867 if { (eval echo "$as_me:9867: \"$ac_link\"") >&5
9868 (eval $ac_link) 2>&5
9869 ac_status=$?
9870 echo "$as_me:9870: \$? = $ac_status" >&5
9871 (exit "$ac_status"); } &&
9872 { ac_try='test -s "conftest$ac_exeext"'
9873 { (eval echo "$as_me:9873: \"$ac_try\"") >&5
9874 (eval $ac_try) 2>&5
9875 ac_status=$?
9876 echo "$as_me:9876: \$? = $ac_status" >&5
9877 (exit "$ac_status"); }; }; then
9878 ac_cv_lib_ICE_IceConnectionNumber=yes
9879 else
9880 echo "$as_me: failed program was:" >&5
9881 cat "conftest.$ac_ext" >&5
9882 ac_cv_lib_ICE_IceConnectionNumber=no
9883 fi
9884 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9885 LIBS=$ac_check_lib_save_LIBS
9886 fi
9887 echo "$as_me:9887: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
9888 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
9889 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
9890 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
9891 fi
9892
9893 LDFLAGS=$ac_save_LDFLAGS
9894
9895 fi
9896
9897 echo "$as_me:9897: checking for sys/wait.h that is POSIX.1 compatible" >&5
9898 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
9899 if test "${ac_cv_header_sys_wait_h+set}" = set; then
9900 echo $ECHO_N "(cached) $ECHO_C" >&6
9901 else
9902 cat >"conftest.$ac_ext" <<_ACEOF
9903 #line 9903 "configure"
9904 #include "confdefs.h"
9905 #include <sys/types.h>
9906 #include <sys/wait.h>
9907 #ifndef WEXITSTATUS
9908 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
9909 #endif
9910 #ifndef WIFEXITED
9911 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
9912 #endif
9913
9914 int
9915 main (void)
9916 {
9917 int s;
9918 wait (&s);
9919 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
9920 ;
9921 return 0;
9922 }
9923 _ACEOF
9924 rm -f "conftest.$ac_objext"
9925 if { (eval echo "$as_me:9925: \"$ac_compile\"") >&5
9926 (eval $ac_compile) 2>&5
9927 ac_status=$?
9928 echo "$as_me:9928: \$? = $ac_status" >&5
9929 (exit "$ac_status"); } &&
9930 { ac_try='test -s "conftest.$ac_objext"'
9931 { (eval echo "$as_me:9931: \"$ac_try\"") >&5
9932 (eval $ac_try) 2>&5
9933 ac_status=$?
9934 echo "$as_me:9934: \$? = $ac_status" >&5
9935 (exit "$ac_status"); }; }; then
9936 ac_cv_header_sys_wait_h=yes
9937 else
9938 echo "$as_me: failed program was:" >&5
9939 cat "conftest.$ac_ext" >&5
9940 ac_cv_header_sys_wait_h=no
9941 fi
9942 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9943 fi
9944 echo "$as_me:9944: result: $ac_cv_header_sys_wait_h" >&5
9945 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
9946 if test $ac_cv_header_sys_wait_h = yes; then
9947
9948 cat >>confdefs.h <<\EOF
9949 #define HAVE_SYS_WAIT_H 1
9950 EOF
9951
9952 fi
9953
9954 echo "$as_me:9954: checking for POSIX wait functions" >&5
9955 echo $ECHO_N "checking for POSIX wait functions... $ECHO_C" >&6
9956 if test "${cf_cv_posix_wait+set}" = set; then
9957 echo $ECHO_N "(cached) $ECHO_C" >&6
9958 else
9959
9960 cat >"conftest.$ac_ext" <<_ACEOF
9961 #line 9961 "configure"
9962 #include "confdefs.h"
9963
9964 $ac_includes_default
9965
9966 #ifdef HAVE_SYS_WAIT_H
9967 #include <sys/wait.h>
9968 #endif
9969
9970 int
9971 main (void)
9972 {
9973
9974 int stat_loc;
9975 pid_t pid = waitpid(-1, &stat_loc, WNOHANG|WUNTRACED);
9976 pid_t pid2 = wait(&stat_loc);
9977 (void)pid;
9978 (void)pid2;
9979
9980 ;
9981 return 0;
9982 }
9983 _ACEOF
9984 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9985 if { (eval echo "$as_me:9985: \"$ac_link\"") >&5
9986 (eval $ac_link) 2>&5
9987 ac_status=$?
9988 echo "$as_me:9988: \$? = $ac_status" >&5
9989 (exit "$ac_status"); } &&
9990 { ac_try='test -s "conftest$ac_exeext"'
9991 { (eval echo "$as_me:9991: \"$ac_try\"") >&5
9992 (eval $ac_try) 2>&5
9993 ac_status=$?
9994 echo "$as_me:9994: \$? = $ac_status" >&5
9995 (exit "$ac_status"); }; }; then
9996 cf_cv_posix_wait=yes
9997 else
9998 echo "$as_me: failed program was:" >&5
9999 cat "conftest.$ac_ext" >&5
10000 cf_cv_posix_wait=no
10001 fi
10002 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10003
10004 fi
10005 echo "$as_me:10005: result: $cf_cv_posix_wait" >&5
10006 echo "${ECHO_T}$cf_cv_posix_wait" >&6
10007 test "$cf_cv_posix_wait" = yes &&
10008 cat >>confdefs.h <<\EOF
10009 #define USE_POSIX_WAIT 1
10010 EOF
10011
10012 echo "$as_me:10012: checking if external sys_nerr is declared" >&5
10013 echo $ECHO_N "checking if external sys_nerr is declared... $ECHO_C" >&6
10014 if test "${cf_cv_dcl_sys_nerr+set}" = set; then
10015 echo $ECHO_N "(cached) $ECHO_C" >&6
10016 else
10017
10018 cat >"conftest.$ac_ext" <<_ACEOF
10019 #line 10019 "configure"
10020 #include "confdefs.h"
10021
10022 $ac_includes_default
10023 #include <errno.h>
10024 int
10025 main (void)
10026 {
10027 int x = (int) sys_nerr; (void)x
10028 ;
10029 return 0;
10030 }
10031 _ACEOF
10032 rm -f "conftest.$ac_objext"
10033 if { (eval echo "$as_me:10033: \"$ac_compile\"") >&5
10034 (eval $ac_compile) 2>&5
10035 ac_status=$?
10036 echo "$as_me:10036: \$? = $ac_status" >&5
10037 (exit "$ac_status"); } &&
10038 { ac_try='test -s "conftest.$ac_objext"'
10039 { (eval echo "$as_me:10039: \"$ac_try\"") >&5
10040 (eval $ac_try) 2>&5
10041 ac_status=$?
10042 echo "$as_me:10042: \$? = $ac_status" >&5
10043 (exit "$ac_status"); }; }; then
10044 cf_cv_dcl_sys_nerr=yes
10045 else
10046 echo "$as_me: failed program was:" >&5
10047 cat "conftest.$ac_ext" >&5
10048 cf_cv_dcl_sys_nerr=no
10049 fi
10050 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10051
10052 fi
10053 echo "$as_me:10053: result: $cf_cv_dcl_sys_nerr" >&5
10054 echo "${ECHO_T}$cf_cv_dcl_sys_nerr" >&6
10055
10056 if test "$cf_cv_dcl_sys_nerr" = no ; then
10057
10058 cf_result=`echo "decl_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10059
10060 cat >>confdefs.h <<EOF
10061 #define $cf_result 1
10062 EOF
10063
10064 fi
10065
10066 # It's possible (for near-UNIX clones) that the data doesn't exist
10067
10068 echo "$as_me:10068: checking if external sys_nerr exists" >&5
10069 echo $ECHO_N "checking if external sys_nerr exists... $ECHO_C" >&6
10070 if test "${cf_cv_have_sys_nerr+set}" = set; then
10071 echo $ECHO_N "(cached) $ECHO_C" >&6
10072 else
10073
10074 cat >"conftest.$ac_ext" <<_ACEOF
10075 #line 10075 "configure"
10076 #include "confdefs.h"
10077
10078 #undef sys_nerr
10079 extern int sys_nerr;
10080
10081 int
10082 main (void)
10083 {
10084 sys_nerr = 2
10085 ;
10086 return 0;
10087 }
10088 _ACEOF
10089 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10090 if { (eval echo "$as_me:10090: \"$ac_link\"") >&5
10091 (eval $ac_link) 2>&5
10092 ac_status=$?
10093 echo "$as_me:10093: \$? = $ac_status" >&5
10094 (exit "$ac_status"); } &&
10095 { ac_try='test -s "conftest$ac_exeext"'
10096 { (eval echo "$as_me:10096: \"$ac_try\"") >&5
10097 (eval $ac_try) 2>&5
10098 ac_status=$?
10099 echo "$as_me:10099: \$? = $ac_status" >&5
10100 (exit "$ac_status"); }; }; then
10101 cf_cv_have_sys_nerr=yes
10102 else
10103 echo "$as_me: failed program was:" >&5
10104 cat "conftest.$ac_ext" >&5
10105 cf_cv_have_sys_nerr=no
10106 fi
10107 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10108
10109 fi
10110 echo "$as_me:10110: result: $cf_cv_have_sys_nerr" >&5
10111 echo "${ECHO_T}$cf_cv_have_sys_nerr" >&6
10112
10113 if test "$cf_cv_have_sys_nerr" = yes ; then
10114
10115 cf_result=`echo "have_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10116
10117 cat >>confdefs.h <<EOF
10118 #define $cf_result 1
10119 EOF
10120
10121 fi
10122
10123 echo "$as_me:10123: checking if external sys_errlist is declared" >&5
10124 echo $ECHO_N "checking if external sys_errlist is declared... $ECHO_C" >&6
10125 if test "${cf_cv_dcl_sys_errlist+set}" = set; then
10126 echo $ECHO_N "(cached) $ECHO_C" >&6
10127 else
10128
10129 cat >"conftest.$ac_ext" <<_ACEOF
10130 #line 10130 "configure"
10131 #include "confdefs.h"
10132
10133 $ac_includes_default
10134 #include <errno.h>
10135 int
10136 main (void)
10137 {
10138 int x = (int) sys_errlist; (void)x
10139 ;
10140 return 0;
10141 }
10142 _ACEOF
10143 rm -f "conftest.$ac_objext"
10144 if { (eval echo "$as_me:10144: \"$ac_compile\"") >&5
10145 (eval $ac_compile) 2>&5
10146 ac_status=$?
10147 echo "$as_me:10147: \$? = $ac_status" >&5
10148 (exit "$ac_status"); } &&
10149 { ac_try='test -s "conftest.$ac_objext"'
10150 { (eval echo "$as_me:10150: \"$ac_try\"") >&5
10151 (eval $ac_try) 2>&5
10152 ac_status=$?
10153 echo "$as_me:10153: \$? = $ac_status" >&5
10154 (exit "$ac_status"); }; }; then
10155 cf_cv_dcl_sys_errlist=yes
10156 else
10157 echo "$as_me: failed program was:" >&5
10158 cat "conftest.$ac_ext" >&5
10159 cf_cv_dcl_sys_errlist=no
10160 fi
10161 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10162
10163 fi
10164 echo "$as_me:10164: result: $cf_cv_dcl_sys_errlist" >&5
10165 echo "${ECHO_T}$cf_cv_dcl_sys_errlist" >&6
10166
10167 if test "$cf_cv_dcl_sys_errlist" = no ; then
10168
10169 cf_result=`echo "decl_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10170
10171 cat >>confdefs.h <<EOF
10172 #define $cf_result 1
10173 EOF
10174
10175 fi
10176
10177 # It's possible (for near-UNIX clones) that the data doesn't exist
10178
10179 echo "$as_me:10179: checking if external sys_errlist exists" >&5
10180 echo $ECHO_N "checking if external sys_errlist exists... $ECHO_C" >&6
10181 if test "${cf_cv_have_sys_errlist+set}" = set; then
10182 echo $ECHO_N "(cached) $ECHO_C" >&6
10183 else
10184
10185 cat >"conftest.$ac_ext" <<_ACEOF
10186 #line 10186 "configure"
10187 #include "confdefs.h"
10188
10189 #undef sys_errlist
10190 extern int sys_errlist;
10191
10192 int
10193 main (void)
10194 {
10195 sys_errlist = 2
10196 ;
10197 return 0;
10198 }
10199 _ACEOF
10200 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10201 if { (eval echo "$as_me:10201: \"$ac_link\"") >&5
10202 (eval $ac_link) 2>&5
10203 ac_status=$?
10204 echo "$as_me:10204: \$? = $ac_status" >&5
10205 (exit "$ac_status"); } &&
10206 { ac_try='test -s "conftest$ac_exeext"'
10207 { (eval echo "$as_me:10207: \"$ac_try\"") >&5
10208 (eval $ac_try) 2>&5
10209 ac_status=$?
10210 echo "$as_me:10210: \$? = $ac_status" >&5
10211 (exit "$ac_status"); }; }; then
10212 cf_cv_have_sys_errlist=yes
10213 else
10214 echo "$as_me: failed program was:" >&5
10215 cat "conftest.$ac_ext" >&5
10216 cf_cv_have_sys_errlist=no
10217 fi
10218 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10219
10220 fi
10221 echo "$as_me:10221: result: $cf_cv_have_sys_errlist" >&5
10222 echo "${ECHO_T}$cf_cv_have_sys_errlist" >&6
10223
10224 if test "$cf_cv_have_sys_errlist" = yes ; then
10225
10226 cf_result=`echo "have_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10227
10228 cat >>confdefs.h <<EOF
10229 #define $cf_result 1
10230 EOF
10231
10232 fi
10233
10234 cf_save_LIBS_CF_SYSV="$LIBS"
10235 cf_save_CFLAGS_CF_SYSV="$CFLAGS"
10236 cf_save_CPPFLAGS_CF_SYSV="$CPPFLAGS"
10237 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
10238 for cf_X_CFLAGS in $X_CFLAGS
10239 do
10240 case "x$cf_X_CFLAGS" in
10241 x-[IUD]*)
10242 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
10243 ;;
10244 *)
10245 CFLAGS="$CFLAGS $cf_X_CFLAGS"
10246 ;;
10247 esac
10248 done
10249
10250 for ac_header in \
10251 termios.h \
10252 stdlib.h \
10253 X11/Intrinsic.h \
10254
10255 do
10256 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10257 echo "$as_me:10257: checking for $ac_header" >&5
10258 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10259 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10260 echo $ECHO_N "(cached) $ECHO_C" >&6
10261 else
10262 cat >"conftest.$ac_ext" <<_ACEOF
10263 #line 10263 "configure"
10264 #include "confdefs.h"
10265 #include <$ac_header>
10266 _ACEOF
10267 if { (eval echo "$as_me:10267: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10268 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10269 ac_status=$?
10270 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10271 rm -f conftest.er1
10272 cat conftest.err >&5
10273 echo "$as_me:10273: \$? = $ac_status" >&5
10274 (exit "$ac_status"); } >/dev/null; then
10275 if test -s conftest.err; then
10276 ac_cpp_err=$ac_c_preproc_warn_flag
10277 else
10278 ac_cpp_err=
10279 fi
10280 else
10281 ac_cpp_err=yes
10282 fi
10283 if test -z "$ac_cpp_err"; then
10284 eval "$as_ac_Header=yes"
10285 else
10286 echo "$as_me: failed program was:" >&5
10287 cat "conftest.$ac_ext" >&5
10288 eval "$as_ac_Header=no"
10289 fi
10290 rm -f conftest.err "conftest.$ac_ext"
10291 fi
10292 echo "$as_me:10292: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10293 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10294 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10295 cat >>confdefs.h <<EOF
10296 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10297 EOF
10298
10299 fi
10300 done
10301
10302 echo "$as_me:10302: checking if we should define SYSV" >&5
10303 echo $ECHO_N "checking if we should define SYSV... $ECHO_C" >&6
10304 if test "${cf_cv_sysv+set}" = set; then
10305 echo $ECHO_N "(cached) $ECHO_C" >&6
10306 else
10307
10308 cat >"conftest.$ac_ext" <<_ACEOF
10309 #line 10309 "configure"
10310 #include "confdefs.h"
10311
10312 #undef SYSV
10313 #define SYSV 1 /* get Xos.h to declare sys_errlist[] */
10314 #ifdef HAVE_STDLIB_H
10315 #include <stdlib.h> /* look for wchar_t */
10316 #endif
10317 #ifdef HAVE_X11_INTRINSIC_H
10318 #include <X11/Intrinsic.h> /* Intrinsic.h has other traps... */
10319 #endif
10320 #ifdef HAVE_TERMIOS_H /* needed for HPUX 10.20 */
10321 #include <termios.h>
10322 #define STRUCT_TERMIOS struct termios
10323 #else
10324 #define STRUCT_TERMIOS struct termio
10325 #endif
10326 #include <curses.h>
10327 #include <term.h> /* eliminate most BSD hacks */
10328 #include <errno.h> /* declare sys_errlist on older systems */
10329 #include <sys/termio.h> /* eliminate most of the remaining ones */
10330
10331 int
10332 main (void)
10333 {
10334
10335 static STRUCT_TERMIOS d_tio;
10336 d_tio.c_cc[VINTR] = 0;
10337 d_tio.c_cc[VQUIT] = 0;
10338 d_tio.c_cc[VERASE] = 0;
10339 d_tio.c_cc[VKILL] = 0;
10340 d_tio.c_cc[VEOF] = 0;
10341 d_tio.c_cc[VEOL] = 0;
10342 d_tio.c_cc[VMIN] = 0;
10343 d_tio.c_cc[VTIME] = 0;
10344 #if defined(HAVE_SYS_ERRLIST) && !defined(DECL_SYS_ERRLIST)
10345 sys_errlist[0] = ""; /* Cygwin mis-declares this */
10346 #endif
10347
10348 ;
10349 return 0;
10350 }
10351 _ACEOF
10352 rm -f "conftest.$ac_objext"
10353 if { (eval echo "$as_me:10353: \"$ac_compile\"") >&5
10354 (eval $ac_compile) 2>&5
10355 ac_status=$?
10356 echo "$as_me:10356: \$? = $ac_status" >&5
10357 (exit "$ac_status"); } &&
10358 { ac_try='test -s "conftest.$ac_objext"'
10359 { (eval echo "$as_me:10359: \"$ac_try\"") >&5
10360 (eval $ac_try) 2>&5
10361 ac_status=$?
10362 echo "$as_me:10362: \$? = $ac_status" >&5
10363 (exit "$ac_status"); }; }; then
10364 cf_cv_sysv=yes
10365 else
10366 echo "$as_me: failed program was:" >&5
10367 cat "conftest.$ac_ext" >&5
10368 cf_cv_sysv=no
10369 fi
10370 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10371
10372 fi
10373 echo "$as_me:10373: result: $cf_cv_sysv" >&5
10374 echo "${ECHO_T}$cf_cv_sysv" >&6
10375 test "$cf_cv_sysv" = yes &&
10376 cat >>confdefs.h <<\EOF
10377 #define SYSV 1
10378 EOF
10379
10380 LIBS="$cf_save_LIBS_CF_SYSV"
10381 CFLAGS="$cf_save_CFLAGS_CF_SYSV"
10382 CPPFLAGS="$cf_save_CPPFLAGS_CF_SYSV"
10383
10384 echo "$as_me:10384: checking for elf_begin in -lelf" >&5
10385 echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
10386 if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
10387 echo $ECHO_N "(cached) $ECHO_C" >&6
10388 else
10389 ac_check_lib_save_LIBS=$LIBS
10390 LIBS="-lelf $LIBS"
10391 cat >"conftest.$ac_ext" <<_ACEOF
10392 #line 10392 "configure"
10393 #include "confdefs.h"
10394
10395 /* Override any gcc2 internal prototype to avoid an error. */
10396 #ifdef __cplusplus
10397 extern "C"
10398 #endif
10399 /* We use char because int might match the return type of a gcc2
10400 builtin and then its argument prototype would still apply. */
10401 char elf_begin ();
10402 int
10403 main (void)
10404 {
10405 elf_begin ();
10406 ;
10407 return 0;
10408 }
10409 _ACEOF
10410 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10411 if { (eval echo "$as_me:10411: \"$ac_link\"") >&5
10412 (eval $ac_link) 2>&5
10413 ac_status=$?
10414 echo "$as_me:10414: \$? = $ac_status" >&5
10415 (exit "$ac_status"); } &&
10416 { ac_try='test -s "conftest$ac_exeext"'
10417 { (eval echo "$as_me:10417: \"$ac_try\"") >&5
10418 (eval $ac_try) 2>&5
10419 ac_status=$?
10420 echo "$as_me:10420: \$? = $ac_status" >&5
10421 (exit "$ac_status"); }; }; then
10422 ac_cv_lib_elf_elf_begin=yes
10423 else
10424 echo "$as_me: failed program was:" >&5
10425 cat "conftest.$ac_ext" >&5
10426 ac_cv_lib_elf_elf_begin=no
10427 fi
10428 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10429 LIBS=$ac_check_lib_save_LIBS
10430 fi
10431 echo "$as_me:10431: result: $ac_cv_lib_elf_elf_begin" >&5
10432 echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
10433 if test "$ac_cv_lib_elf_elf_begin" = yes; then
10434
10435 echo "$as_me:10435: checking if this is an SVR4 system" >&5
10436 echo $ECHO_N "checking if this is an SVR4 system... $ECHO_C" >&6
10437 if test "${cf_cv_svr4+set}" = set; then
10438 echo $ECHO_N "(cached) $ECHO_C" >&6
10439 else
10440
10441 cat >"conftest.$ac_ext" <<_ACEOF
10442 #line 10442 "configure"
10443 #include "confdefs.h"
10444
10445 #if defined(__CYGWIN__)
10446 make an error
10447 #endif
10448 #include <elf.h>
10449 #include <sys/termio.h>
10450
10451 int
10452 main (void)
10453 {
10454
10455 static struct termio d_tio;
10456 d_tio.c_cc[VINTR] = 0;
10457 d_tio.c_cc[VQUIT] = 0;
10458 d_tio.c_cc[VERASE] = 0;
10459 d_tio.c_cc[VKILL] = 0;
10460 d_tio.c_cc[VEOF] = 0;
10461 d_tio.c_cc[VEOL] = 0;
10462 d_tio.c_cc[VMIN] = 0;
10463 d_tio.c_cc[VTIME] = 0;
10464 d_tio.c_cc[VLNEXT] = 0;
10465
10466 ;
10467 return 0;
10468 }
10469 _ACEOF
10470 rm -f "conftest.$ac_objext"
10471 if { (eval echo "$as_me:10471: \"$ac_compile\"") >&5
10472 (eval $ac_compile) 2>&5
10473 ac_status=$?
10474 echo "$as_me:10474: \$? = $ac_status" >&5
10475 (exit "$ac_status"); } &&
10476 { ac_try='test -s "conftest.$ac_objext"'
10477 { (eval echo "$as_me:10477: \"$ac_try\"") >&5
10478 (eval $ac_try) 2>&5
10479 ac_status=$?
10480 echo "$as_me:10480: \$? = $ac_status" >&5
10481 (exit "$ac_status"); }; }; then
10482 cf_cv_svr4=yes
10483 else
10484 echo "$as_me: failed program was:" >&5
10485 cat "conftest.$ac_ext" >&5
10486 cf_cv_svr4=no
10487 fi
10488 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10489
10490 fi
10491 echo "$as_me:10491: result: $cf_cv_svr4" >&5
10492 echo "${ECHO_T}$cf_cv_svr4" >&6
10493
10494 fi
10495
10496 test "$cf_cv_svr4" = yes &&
10497 cat >>confdefs.h <<\EOF
10498 #define SVR4 1
10499 EOF
10500
10501 echo "$as_me:10501: checking if you want to use pkg-config" >&5
10502 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
10503
10504 # Check whether --with-pkg-config or --without-pkg-config was given.
10505 if test "${with_pkg_config+set}" = set; then
10506 withval="$with_pkg_config"
10507 cf_pkg_config=$withval
10508 else
10509 cf_pkg_config=yes
10510 fi;
10511 echo "$as_me:10511: result: $cf_pkg_config" >&5
10512 echo "${ECHO_T}$cf_pkg_config" >&6
10513
10514 case "$cf_pkg_config" in
10515 (no)
10516 PKG_CONFIG=none
10517 ;;
10518 (yes)
10519
10520 if test -n "$ac_tool_prefix"; then
10521 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10522 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10523 echo "$as_me:10523: checking for $ac_word" >&5
10524 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10525 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10526 echo $ECHO_N "(cached) $ECHO_C" >&6
10527 else
10528 case $PKG_CONFIG in
10529 [\\/]* | ?:[\\/]*)
10530 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10531 ;;
10532 *)
10533 ac_save_IFS=$IFS; IFS=$ac_path_separator
10534 ac_dummy="$PATH"
10535 for ac_dir in $ac_dummy; do
10536 IFS=$ac_save_IFS
10537 test -z "$ac_dir" && ac_dir=.
10538 if $as_executable_p "$ac_dir/$ac_word"; then
10539 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
10540 echo "$as_me:10540: found $ac_dir/$ac_word" >&5
10541 break
10542 fi
10543 done
10544
10545 ;;
10546 esac
10547 fi
10548 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10549
10550 if test -n "$PKG_CONFIG"; then
10551 echo "$as_me:10551: result: $PKG_CONFIG" >&5
10552 echo "${ECHO_T}$PKG_CONFIG" >&6
10553 else
10554 echo "$as_me:10554: result: no" >&5
10555 echo "${ECHO_T}no" >&6
10556 fi
10557
10558 fi
10559 if test -z "$ac_cv_path_PKG_CONFIG"; then
10560 ac_pt_PKG_CONFIG=$PKG_CONFIG
10561 # Extract the first word of "pkg-config", so it can be a program name with args.
10562 set dummy pkg-config; ac_word=$2
10563 echo "$as_me:10563: checking for $ac_word" >&5
10564 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10565 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
10566 echo $ECHO_N "(cached) $ECHO_C" >&6
10567 else
10568 case $ac_pt_PKG_CONFIG in
10569 [\\/]* | ?:[\\/]*)
10570 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10571 ;;
10572 *)
10573 ac_save_IFS=$IFS; IFS=$ac_path_separator
10574 ac_dummy="$PATH"
10575 for ac_dir in $ac_dummy; do
10576 IFS=$ac_save_IFS
10577 test -z "$ac_dir" && ac_dir=.
10578 if $as_executable_p "$ac_dir/$ac_word"; then
10579 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
10580 echo "$as_me:10580: found $ac_dir/$ac_word" >&5
10581 break
10582 fi
10583 done
10584
10585 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
10586 ;;
10587 esac
10588 fi
10589 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10590
10591 if test -n "$ac_pt_PKG_CONFIG"; then
10592 echo "$as_me:10592: result: $ac_pt_PKG_CONFIG" >&5
10593 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
10594 else
10595 echo "$as_me:10595: result: no" >&5
10596 echo "${ECHO_T}no" >&6
10597 fi
10598
10599 PKG_CONFIG=$ac_pt_PKG_CONFIG
10600 else
10601 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10602 fi
10603
10604 ;;
10605 (*)
10606 PKG_CONFIG=$withval
10607 ;;
10608 esac
10609
10610 test -z "$PKG_CONFIG" && PKG_CONFIG=none
10611 if test "$PKG_CONFIG" != none ; then
10612
10613 if test "x$prefix" != xNONE; then
10614 cf_path_syntax="$prefix"
10615 else
10616 cf_path_syntax="$ac_default_prefix"
10617 fi
10618
10619 case ".$PKG_CONFIG" in
10620 (.\$\(*\)*|.\'*\'*)
10621 ;;
10622 (..|./*|.\\*)
10623 ;;
10624 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
10625 ;;
10626 (.\$\{*prefix\}*|.\$\{*dir\}*)
10627 eval PKG_CONFIG="$PKG_CONFIG"
10628 case ".$PKG_CONFIG" in
10629 (.NONE/*)
10630 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
10631 ;;
10632 esac
10633 ;;
10634 (.no|.NONE/*)
10635 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
10636 ;;
10637 (*)
10638 { { echo "$as_me:10638: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
10639 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
10640 { (exit 1); exit 1; }; }
10641 ;;
10642 esac
10643
10644 elif test "x$cf_pkg_config" != xno ; then
10645 { echo "$as_me:10645: WARNING: pkg-config is not installed" >&5
10646 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
10647 fi
10648
10649 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
10650 # in some cases has installed dummy files in the former, other cases replaced
10651 # it with a link to the new location). This complicates the configure script.
10652 # Check for that pitfall, and recover using pkg-config
10653 #
10654 # If none of these are set, the configuration is almost certainly broken.
10655 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
10656 then
10657
10658 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
10659 test -n "$verbose" && echo " found package x11" 1>&6
10660
10661 echo "${as_me:-configure}:10661: testing found package x11 ..." 1>&5
10662
10663 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
10664 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
10665 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
10666
10667 echo "${as_me:-configure}:10667: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10668
10669 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
10670
10671 echo "${as_me:-configure}:10671: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
10672
10673 cf_fix_cppflags=no
10674 cf_new_cflags=
10675 cf_new_cppflags=
10676 cf_new_extra_cppflags=
10677
10678 for cf_add_cflags in $cf_pkgconfig_incs
10679 do
10680 case "$cf_fix_cppflags" in
10681 (no)
10682 case "$cf_add_cflags" in
10683 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10684 case "$cf_add_cflags" in
10685 (-D*)
10686 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10687
10688 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10689 && test -z "${cf_tst_cflags}" \
10690 && cf_fix_cppflags=yes
10691
10692 if test "$cf_fix_cppflags" = yes ; then
10693
10694 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10695 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10696
10697 continue
10698 elif test "${cf_tst_cflags}" = "\"'" ; then
10699
10700 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10701 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10702
10703 continue
10704 fi
10705 ;;
10706 esac
10707 case "$CPPFLAGS" in
10708 (*$cf_add_cflags)
10709 ;;
10710 (*)
10711 case "$cf_add_cflags" in
10712 (-D*)
10713 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10714
10715 CPPFLAGS=`echo "$CPPFLAGS" | \
10716 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10717 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10718
10719 ;;
10720 esac
10721
10722 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10723 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10724
10725 ;;
10726 esac
10727 ;;
10728 (*)
10729
10730 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10731 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10732
10733 ;;
10734 esac
10735 ;;
10736 (yes)
10737
10738 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10739 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10740
10741 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10742
10743 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10744 && test -z "${cf_tst_cflags}" \
10745 && cf_fix_cppflags=no
10746 ;;
10747 esac
10748 done
10749
10750 if test -n "$cf_new_cflags" ; then
10751
10752 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10753 CFLAGS="${CFLAGS}$cf_new_cflags"
10754
10755 fi
10756
10757 if test -n "$cf_new_cppflags" ; then
10758
10759 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10760 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10761
10762 fi
10763
10764 if test -n "$cf_new_extra_cppflags" ; then
10765
10766 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10767 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10768
10769 fi
10770
10771 cf_add_libs="$LIBS"
10772 # reverse order
10773 cf_add_0lib=
10774 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10775 # filter duplicates
10776 for cf_add_1lib in $cf_add_0lib; do
10777 for cf_add_2lib in $cf_add_libs; do
10778 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10779 cf_add_1lib=
10780 break
10781 fi
10782 done
10783 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10784 done
10785 LIBS="$cf_add_libs"
10786
10787 :
10788 else
10789 cf_pkgconfig_incs=
10790 cf_pkgconfig_libs=
10791 { echo "$as_me:10791: WARNING: unable to find X11 library" >&5
10792 echo "$as_me: WARNING: unable to find X11 library" >&2;}
10793 fi
10794
10795 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
10796 test -n "$verbose" && echo " found package ice" 1>&6
10797
10798 echo "${as_me:-configure}:10798: testing found package ice ..." 1>&5
10799
10800 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
10801 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
10802 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
10803
10804 echo "${as_me:-configure}:10804: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10805
10806 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
10807
10808 echo "${as_me:-configure}:10808: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
10809
10810 cf_fix_cppflags=no
10811 cf_new_cflags=
10812 cf_new_cppflags=
10813 cf_new_extra_cppflags=
10814
10815 for cf_add_cflags in $cf_pkgconfig_incs
10816 do
10817 case "$cf_fix_cppflags" in
10818 (no)
10819 case "$cf_add_cflags" in
10820 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10821 case "$cf_add_cflags" in
10822 (-D*)
10823 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10824
10825 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10826 && test -z "${cf_tst_cflags}" \
10827 && cf_fix_cppflags=yes
10828
10829 if test "$cf_fix_cppflags" = yes ; then
10830
10831 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10832 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10833
10834 continue
10835 elif test "${cf_tst_cflags}" = "\"'" ; then
10836
10837 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10838 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10839
10840 continue
10841 fi
10842 ;;
10843 esac
10844 case "$CPPFLAGS" in
10845 (*$cf_add_cflags)
10846 ;;
10847 (*)
10848 case "$cf_add_cflags" in
10849 (-D*)
10850 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10851
10852 CPPFLAGS=`echo "$CPPFLAGS" | \
10853 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10854 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10855
10856 ;;
10857 esac
10858
10859 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10860 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10861
10862 ;;
10863 esac
10864 ;;
10865 (*)
10866
10867 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10868 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10869
10870 ;;
10871 esac
10872 ;;
10873 (yes)
10874
10875 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10876 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10877
10878 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10879
10880 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10881 && test -z "${cf_tst_cflags}" \
10882 && cf_fix_cppflags=no
10883 ;;
10884 esac
10885 done
10886
10887 if test -n "$cf_new_cflags" ; then
10888
10889 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10890 CFLAGS="${CFLAGS}$cf_new_cflags"
10891
10892 fi
10893
10894 if test -n "$cf_new_cppflags" ; then
10895
10896 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10897 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10898
10899 fi
10900
10901 if test -n "$cf_new_extra_cppflags" ; then
10902
10903 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10904 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10905
10906 fi
10907
10908 cf_add_libs="$LIBS"
10909 # reverse order
10910 cf_add_0lib=
10911 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10912 # filter duplicates
10913 for cf_add_1lib in $cf_add_0lib; do
10914 for cf_add_2lib in $cf_add_libs; do
10915 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10916 cf_add_1lib=
10917 break
10918 fi
10919 done
10920 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10921 done
10922 LIBS="$cf_add_libs"
10923
10924 :
10925 else
10926 cf_pkgconfig_incs=
10927 cf_pkgconfig_libs=
10928 { echo "$as_me:10928: WARNING: unable to find ICE library" >&5
10929 echo "$as_me: WARNING: unable to find ICE library" >&2;}
10930 fi
10931
10932 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
10933 test -n "$verbose" && echo " found package sm" 1>&6
10934
10935 echo "${as_me:-configure}:10935: testing found package sm ..." 1>&5
10936
10937 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
10938 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
10939 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
10940
10941 echo "${as_me:-configure}:10941: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10942
10943 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
10944
10945 echo "${as_me:-configure}:10945: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
10946
10947 cf_fix_cppflags=no
10948 cf_new_cflags=
10949 cf_new_cppflags=
10950 cf_new_extra_cppflags=
10951
10952 for cf_add_cflags in $cf_pkgconfig_incs
10953 do
10954 case "$cf_fix_cppflags" in
10955 (no)
10956 case "$cf_add_cflags" in
10957 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10958 case "$cf_add_cflags" in
10959 (-D*)
10960 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10961
10962 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10963 && test -z "${cf_tst_cflags}" \
10964 && cf_fix_cppflags=yes
10965
10966 if test "$cf_fix_cppflags" = yes ; then
10967
10968 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10969 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10970
10971 continue
10972 elif test "${cf_tst_cflags}" = "\"'" ; then
10973
10974 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10975 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10976
10977 continue
10978 fi
10979 ;;
10980 esac
10981 case "$CPPFLAGS" in
10982 (*$cf_add_cflags)
10983 ;;
10984 (*)
10985 case "$cf_add_cflags" in
10986 (-D*)
10987 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10988
10989 CPPFLAGS=`echo "$CPPFLAGS" | \
10990 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10991 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10992
10993 ;;
10994 esac
10995
10996 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10997 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10998
10999 ;;
11000 esac
11001 ;;
11002 (*)
11003
11004 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11005 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11006
11007 ;;
11008 esac
11009 ;;
11010 (yes)
11011
11012 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11013 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11014
11015 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11016
11017 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11018 && test -z "${cf_tst_cflags}" \
11019 && cf_fix_cppflags=no
11020 ;;
11021 esac
11022 done
11023
11024 if test -n "$cf_new_cflags" ; then
11025
11026 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11027 CFLAGS="${CFLAGS}$cf_new_cflags"
11028
11029 fi
11030
11031 if test -n "$cf_new_cppflags" ; then
11032
11033 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11034 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11035
11036 fi
11037
11038 if test -n "$cf_new_extra_cppflags" ; then
11039
11040 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11041 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11042
11043 fi
11044
11045 cf_add_libs="$LIBS"
11046 # reverse order
11047 cf_add_0lib=
11048 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11049 # filter duplicates
11050 for cf_add_1lib in $cf_add_0lib; do
11051 for cf_add_2lib in $cf_add_libs; do
11052 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11053 cf_add_1lib=
11054 break
11055 fi
11056 done
11057 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11058 done
11059 LIBS="$cf_add_libs"
11060
11061 :
11062 else
11063 cf_pkgconfig_incs=
11064 cf_pkgconfig_libs=
11065 { echo "$as_me:11065: WARNING: unable to find SM library" >&5
11066 echo "$as_me: WARNING: unable to find SM library" >&2;}
11067 fi
11068
11069 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
11070 test -n "$verbose" && echo " found package xt" 1>&6
11071
11072 echo "${as_me:-configure}:11072: testing found package xt ..." 1>&5
11073
11074 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
11075 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
11076 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11077
11078 echo "${as_me:-configure}:11078: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11079
11080 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
11081
11082 echo "${as_me:-configure}:11082: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11083
11084 cf_fix_cppflags=no
11085 cf_new_cflags=
11086 cf_new_cppflags=
11087 cf_new_extra_cppflags=
11088
11089 for cf_add_cflags in $cf_pkgconfig_incs
11090 do
11091 case "$cf_fix_cppflags" in
11092 (no)
11093 case "$cf_add_cflags" in
11094 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11095 case "$cf_add_cflags" in
11096 (-D*)
11097 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11098
11099 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11100 && test -z "${cf_tst_cflags}" \
11101 && cf_fix_cppflags=yes
11102
11103 if test "$cf_fix_cppflags" = yes ; then
11104
11105 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11106 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11107
11108 continue
11109 elif test "${cf_tst_cflags}" = "\"'" ; then
11110
11111 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11112 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11113
11114 continue
11115 fi
11116 ;;
11117 esac
11118 case "$CPPFLAGS" in
11119 (*$cf_add_cflags)
11120 ;;
11121 (*)
11122 case "$cf_add_cflags" in
11123 (-D*)
11124 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11125
11126 CPPFLAGS=`echo "$CPPFLAGS" | \
11127 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11128 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11129
11130 ;;
11131 esac
11132
11133 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11134 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11135
11136 ;;
11137 esac
11138 ;;
11139 (*)
11140
11141 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11142 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11143
11144 ;;
11145 esac
11146 ;;
11147 (yes)
11148
11149 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11150 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11151
11152 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11153
11154 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11155 && test -z "${cf_tst_cflags}" \
11156 && cf_fix_cppflags=no
11157 ;;
11158 esac
11159 done
11160
11161 if test -n "$cf_new_cflags" ; then
11162
11163 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11164 CFLAGS="${CFLAGS}$cf_new_cflags"
11165
11166 fi
11167
11168 if test -n "$cf_new_cppflags" ; then
11169
11170 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11171 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11172
11173 fi
11174
11175 if test -n "$cf_new_extra_cppflags" ; then
11176
11177 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11178 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11179
11180 fi
11181
11182 cf_add_libs="$LIBS"
11183 # reverse order
11184 cf_add_0lib=
11185 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11186 # filter duplicates
11187 for cf_add_1lib in $cf_add_0lib; do
11188 for cf_add_2lib in $cf_add_libs; do
11189 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11190 cf_add_1lib=
11191 break
11192 fi
11193 done
11194 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11195 done
11196 LIBS="$cf_add_libs"
11197
11198 :
11199 else
11200 cf_pkgconfig_incs=
11201 cf_pkgconfig_libs=
11202 { echo "$as_me:11202: WARNING: unable to find Xt library" >&5
11203 echo "$as_me: WARNING: unable to find Xt library" >&2;}
11204 fi
11205
11206 else
11207 LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
11208 fi
11209
11210 cf_have_X_LIBS=no
11211
11212 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
11213 test -n "$verbose" && echo " found package xt" 1>&6
11214
11215 echo "${as_me:-configure}:11215: testing found package xt ..." 1>&5
11216
11217 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
11218 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
11219 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11220
11221 echo "${as_me:-configure}:11221: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11222
11223 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
11224
11225 echo "${as_me:-configure}:11225: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11226
11227 cf_fix_cppflags=no
11228 cf_new_cflags=
11229 cf_new_cppflags=
11230 cf_new_extra_cppflags=
11231
11232 for cf_add_cflags in $cf_pkgconfig_incs
11233 do
11234 case "$cf_fix_cppflags" in
11235 (no)
11236 case "$cf_add_cflags" in
11237 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11238 case "$cf_add_cflags" in
11239 (-D*)
11240 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11241
11242 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11243 && test -z "${cf_tst_cflags}" \
11244 && cf_fix_cppflags=yes
11245
11246 if test "$cf_fix_cppflags" = yes ; then
11247
11248 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11249 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11250
11251 continue
11252 elif test "${cf_tst_cflags}" = "\"'" ; then
11253
11254 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11255 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11256
11257 continue
11258 fi
11259 ;;
11260 esac
11261 case "$CPPFLAGS" in
11262 (*$cf_add_cflags)
11263 ;;
11264 (*)
11265 case "$cf_add_cflags" in
11266 (-D*)
11267 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11268
11269 CPPFLAGS=`echo "$CPPFLAGS" | \
11270 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11271 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11272
11273 ;;
11274 esac
11275
11276 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11277 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11278
11279 ;;
11280 esac
11281 ;;
11282 (*)
11283
11284 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11285 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11286
11287 ;;
11288 esac
11289 ;;
11290 (yes)
11291
11292 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11293 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11294
11295 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11296
11297 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11298 && test -z "${cf_tst_cflags}" \
11299 && cf_fix_cppflags=no
11300 ;;
11301 esac
11302 done
11303
11304 if test -n "$cf_new_cflags" ; then
11305
11306 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11307 CFLAGS="${CFLAGS}$cf_new_cflags"
11308
11309 fi
11310
11311 if test -n "$cf_new_cppflags" ; then
11312
11313 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11314 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11315
11316 fi
11317
11318 if test -n "$cf_new_extra_cppflags" ; then
11319
11320 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11321 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11322
11323 fi
11324
11325 cf_add_libs="$LIBS"
11326 # reverse order
11327 cf_add_0lib=
11328 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11329 # filter duplicates
11330 for cf_add_1lib in $cf_add_0lib; do
11331 for cf_add_2lib in $cf_add_libs; do
11332 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11333 cf_add_1lib=
11334 break
11335 fi
11336 done
11337 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11338 done
11339 LIBS="$cf_add_libs"
11340
11341 case "x$LIBS" in
11342 (*-lX11*)
11343 ;;
11344 (*)
11345 # we have an "xt" package, but it may omit Xt's dependency on X11
11346 echo "$as_me:11346: checking for usable X dependency" >&5
11347 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
11348 if test "${cf_cv_xt_x11_compat+set}" = set; then
11349 echo $ECHO_N "(cached) $ECHO_C" >&6
11350 else
11351
11352 cat >"conftest.$ac_ext" <<_ACEOF
11353 #line 11353 "configure"
11354 #include "confdefs.h"
11355
11356 $ac_includes_default
11357 #include <X11/Xlib.h>
11358
11359 int
11360 main (void)
11361 {
11362
11363 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
11364 int rc2 = XClearWindow((Display*) 0, (Window) 0);
11365 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
11366 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
11367
11368 ;
11369 return 0;
11370 }
11371 _ACEOF
11372 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11373 if { (eval echo "$as_me:11373: \"$ac_link\"") >&5
11374 (eval $ac_link) 2>&5
11375 ac_status=$?
11376 echo "$as_me:11376: \$? = $ac_status" >&5
11377 (exit "$ac_status"); } &&
11378 { ac_try='test -s "conftest$ac_exeext"'
11379 { (eval echo "$as_me:11379: \"$ac_try\"") >&5
11380 (eval $ac_try) 2>&5
11381 ac_status=$?
11382 echo "$as_me:11382: \$? = $ac_status" >&5
11383 (exit "$ac_status"); }; }; then
11384 cf_cv_xt_x11_compat=yes
11385 else
11386 echo "$as_me: failed program was:" >&5
11387 cat "conftest.$ac_ext" >&5
11388 cf_cv_xt_x11_compat=no
11389 fi
11390 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11391 fi
11392 echo "$as_me:11392: result: $cf_cv_xt_x11_compat" >&5
11393 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
11394 if test "$cf_cv_xt_x11_compat" = no
11395 then
11396 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
11397
11398 echo "${as_me:-configure}:11398: testing work around broken X11 dependency ..." 1>&5
11399
11400 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
11401
11402 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
11403 test -n "$verbose" && echo " found package x11" 1>&6
11404
11405 echo "${as_me:-configure}:11405: testing found package x11 ..." 1>&5
11406
11407 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
11408 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
11409 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11410
11411 echo "${as_me:-configure}:11411: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11412
11413 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11414
11415 echo "${as_me:-configure}:11415: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11416
11417 cf_fix_cppflags=no
11418 cf_new_cflags=
11419 cf_new_cppflags=
11420 cf_new_extra_cppflags=
11421
11422 for cf_add_cflags in $cf_pkgconfig_incs
11423 do
11424 case "$cf_fix_cppflags" in
11425 (no)
11426 case "$cf_add_cflags" in
11427 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11428 case "$cf_add_cflags" in
11429 (-D*)
11430 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11431
11432 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11433 && test -z "${cf_tst_cflags}" \
11434 && cf_fix_cppflags=yes
11435
11436 if test "$cf_fix_cppflags" = yes ; then
11437
11438 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11439 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11440
11441 continue
11442 elif test "${cf_tst_cflags}" = "\"'" ; then
11443
11444 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11445 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11446
11447 continue
11448 fi
11449 ;;
11450 esac
11451 case "$CPPFLAGS" in
11452 (*$cf_add_cflags)
11453 ;;
11454 (*)
11455 case "$cf_add_cflags" in
11456 (-D*)
11457 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11458
11459 CPPFLAGS=`echo "$CPPFLAGS" | \
11460 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11461 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11462
11463 ;;
11464 esac
11465
11466 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11467 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11468
11469 ;;
11470 esac
11471 ;;
11472 (*)
11473
11474 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11475 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11476
11477 ;;
11478 esac
11479 ;;
11480 (yes)
11481
11482 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11483 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11484
11485 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11486
11487 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11488 && test -z "${cf_tst_cflags}" \
11489 && cf_fix_cppflags=no
11490 ;;
11491 esac
11492 done
11493
11494 if test -n "$cf_new_cflags" ; then
11495
11496 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11497 CFLAGS="${CFLAGS}$cf_new_cflags"
11498
11499 fi
11500
11501 if test -n "$cf_new_cppflags" ; then
11502
11503 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11504 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11505
11506 fi
11507
11508 if test -n "$cf_new_extra_cppflags" ; then
11509
11510 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11511 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11512
11513 fi
11514
11515 cf_add_libs="$LIBS"
11516 # reverse order
11517 cf_add_0lib=
11518 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11519 # filter duplicates
11520 for cf_add_1lib in $cf_add_0lib; do
11521 for cf_add_2lib in $cf_add_libs; do
11522 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11523 cf_add_1lib=
11524 break
11525 fi
11526 done
11527 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11528 done
11529 LIBS="$cf_add_libs"
11530
11531 :
11532 else
11533 cf_pkgconfig_incs=
11534 cf_pkgconfig_libs=
11535
11536 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11537
11538 echo "${as_me:-configure}:11538: testing ...before $LIBS ..." 1>&5
11539
11540 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
11541 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11542
11543 echo "${as_me:-configure}:11543: testing ...after $LIBS ..." 1>&5
11544
11545 fi
11546
11547 fi
11548 ;;
11549 esac
11550
11551 echo "$as_me:11551: checking for usable X Toolkit package" >&5
11552 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
11553 if test "${cf_cv_xt_ice_compat+set}" = set; then
11554 echo $ECHO_N "(cached) $ECHO_C" >&6
11555 else
11556
11557 cat >"conftest.$ac_ext" <<_ACEOF
11558 #line 11558 "configure"
11559 #include "confdefs.h"
11560
11561 $ac_includes_default
11562 #include <X11/Shell.h>
11563
11564 int
11565 main (void)
11566 {
11567 int num = IceConnectionNumber(0); (void) num
11568
11569 ;
11570 return 0;
11571 }
11572 _ACEOF
11573 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11574 if { (eval echo "$as_me:11574: \"$ac_link\"") >&5
11575 (eval $ac_link) 2>&5
11576 ac_status=$?
11577 echo "$as_me:11577: \$? = $ac_status" >&5
11578 (exit "$ac_status"); } &&
11579 { ac_try='test -s "conftest$ac_exeext"'
11580 { (eval echo "$as_me:11580: \"$ac_try\"") >&5
11581 (eval $ac_try) 2>&5
11582 ac_status=$?
11583 echo "$as_me:11583: \$? = $ac_status" >&5
11584 (exit "$ac_status"); }; }; then
11585 cf_cv_xt_ice_compat=yes
11586 else
11587 echo "$as_me: failed program was:" >&5
11588 cat "conftest.$ac_ext" >&5
11589 cf_cv_xt_ice_compat=no
11590 fi
11591 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11592 fi
11593 echo "$as_me:11593: result: $cf_cv_xt_ice_compat" >&5
11594 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
11595
11596 if test "$cf_cv_xt_ice_compat" = no
11597 then
11598 # workaround for broken ".pc" files used for X Toolkit.
11599 case "x$X_PRE_LIBS" in
11600 (*-lICE*)
11601 case "x$LIBS" in
11602 (*-lICE*)
11603 ;;
11604 (*)
11605 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
11606
11607 echo "${as_me:-configure}:11607: testing work around broken ICE dependency ..." 1>&5
11608
11609 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
11610 test -n "$verbose" && echo " found package ice" 1>&6
11611
11612 echo "${as_me:-configure}:11612: testing found package ice ..." 1>&5
11613
11614 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
11615 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
11616 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11617
11618 echo "${as_me:-configure}:11618: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11619
11620 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
11621
11622 echo "${as_me:-configure}:11622: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11623
11624 cf_fix_cppflags=no
11625 cf_new_cflags=
11626 cf_new_cppflags=
11627 cf_new_extra_cppflags=
11628
11629 for cf_add_cflags in $cf_pkgconfig_incs
11630 do
11631 case "$cf_fix_cppflags" in
11632 (no)
11633 case "$cf_add_cflags" in
11634 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11635 case "$cf_add_cflags" in
11636 (-D*)
11637 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11638
11639 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11640 && test -z "${cf_tst_cflags}" \
11641 && cf_fix_cppflags=yes
11642
11643 if test "$cf_fix_cppflags" = yes ; then
11644
11645 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11646 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11647
11648 continue
11649 elif test "${cf_tst_cflags}" = "\"'" ; then
11650
11651 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11652 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11653
11654 continue
11655 fi
11656 ;;
11657 esac
11658 case "$CPPFLAGS" in
11659 (*$cf_add_cflags)
11660 ;;
11661 (*)
11662 case "$cf_add_cflags" in
11663 (-D*)
11664 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11665
11666 CPPFLAGS=`echo "$CPPFLAGS" | \
11667 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11668 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11669
11670 ;;
11671 esac
11672
11673 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11674 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11675
11676 ;;
11677 esac
11678 ;;
11679 (*)
11680
11681 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11682 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11683
11684 ;;
11685 esac
11686 ;;
11687 (yes)
11688
11689 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11690 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11691
11692 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11693
11694 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11695 && test -z "${cf_tst_cflags}" \
11696 && cf_fix_cppflags=no
11697 ;;
11698 esac
11699 done
11700
11701 if test -n "$cf_new_cflags" ; then
11702
11703 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11704 CFLAGS="${CFLAGS}$cf_new_cflags"
11705
11706 fi
11707
11708 if test -n "$cf_new_cppflags" ; then
11709
11710 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11711 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11712
11713 fi
11714
11715 if test -n "$cf_new_extra_cppflags" ; then
11716
11717 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11718 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11719
11720 fi
11721
11722 cf_add_libs="$LIBS"
11723 # reverse order
11724 cf_add_0lib=
11725 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11726 # filter duplicates
11727 for cf_add_1lib in $cf_add_0lib; do
11728 for cf_add_2lib in $cf_add_libs; do
11729 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11730 cf_add_1lib=
11731 break
11732 fi
11733 done
11734 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11735 done
11736 LIBS="$cf_add_libs"
11737
11738 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
11739 test -n "$verbose" && echo " found package sm" 1>&6
11740
11741 echo "${as_me:-configure}:11741: testing found package sm ..." 1>&5
11742
11743 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
11744 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
11745 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11746
11747 echo "${as_me:-configure}:11747: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11748
11749 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
11750
11751 echo "${as_me:-configure}:11751: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11752
11753 cf_fix_cppflags=no
11754 cf_new_cflags=
11755 cf_new_cppflags=
11756 cf_new_extra_cppflags=
11757
11758 for cf_add_cflags in $cf_pkgconfig_incs
11759 do
11760 case "$cf_fix_cppflags" in
11761 (no)
11762 case "$cf_add_cflags" in
11763 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11764 case "$cf_add_cflags" in
11765 (-D*)
11766 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11767
11768 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11769 && test -z "${cf_tst_cflags}" \
11770 && cf_fix_cppflags=yes
11771
11772 if test "$cf_fix_cppflags" = yes ; then
11773
11774 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11775 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11776
11777 continue
11778 elif test "${cf_tst_cflags}" = "\"'" ; then
11779
11780 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11781 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11782
11783 continue
11784 fi
11785 ;;
11786 esac
11787 case "$CPPFLAGS" in
11788 (*$cf_add_cflags)
11789 ;;
11790 (*)
11791 case "$cf_add_cflags" in
11792 (-D*)
11793 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11794
11795 CPPFLAGS=`echo "$CPPFLAGS" | \
11796 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11797 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11798
11799 ;;
11800 esac
11801
11802 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11803 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11804
11805 ;;
11806 esac
11807 ;;
11808 (*)
11809
11810 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11811 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11812
11813 ;;
11814 esac
11815 ;;
11816 (yes)
11817
11818 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11819 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11820
11821 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11822
11823 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11824 && test -z "${cf_tst_cflags}" \
11825 && cf_fix_cppflags=no
11826 ;;
11827 esac
11828 done
11829
11830 if test -n "$cf_new_cflags" ; then
11831
11832 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11833 CFLAGS="${CFLAGS}$cf_new_cflags"
11834
11835 fi
11836
11837 if test -n "$cf_new_cppflags" ; then
11838
11839 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11840 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11841
11842 fi
11843
11844 if test -n "$cf_new_extra_cppflags" ; then
11845
11846 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11847 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11848
11849 fi
11850
11851 cf_add_libs="$LIBS"
11852 # reverse order
11853 cf_add_0lib=
11854 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11855 # filter duplicates
11856 for cf_add_1lib in $cf_add_0lib; do
11857 for cf_add_2lib in $cf_add_libs; do
11858 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11859 cf_add_1lib=
11860 break
11861 fi
11862 done
11863 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11864 done
11865 LIBS="$cf_add_libs"
11866
11867 :
11868 else
11869 cf_pkgconfig_incs=
11870 cf_pkgconfig_libs=
11871 :
11872 fi
11873
11874 else
11875 cf_pkgconfig_incs=
11876 cf_pkgconfig_libs=
11877
11878 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11879
11880 echo "${as_me:-configure}:11880: testing ...before $LIBS ..." 1>&5
11881
11882 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
11883 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11884
11885 echo "${as_me:-configure}:11885: testing ...after $LIBS ..." 1>&5
11886
11887 fi
11888
11889 ;;
11890 esac
11891 ;;
11892 esac
11893 fi
11894
11895 cf_have_X_LIBS=yes
11896
11897 else
11898 cf_pkgconfig_incs=
11899 cf_pkgconfig_libs=
11900
11901 LDFLAGS="$X_LIBS $LDFLAGS"
11902
11903 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
11904
11905 echo "${as_me:-configure}:11905: testing checking additions to CFLAGS ..." 1>&5
11906
11907 cf_check_cflags="$CFLAGS"
11908 cf_check_cppflags="$CPPFLAGS"
11909
11910 cf_fix_cppflags=no
11911 cf_new_cflags=
11912 cf_new_cppflags=
11913 cf_new_extra_cppflags=
11914
11915 for cf_add_cflags in $X_CFLAGS
11916 do
11917 case "$cf_fix_cppflags" in
11918 (no)
11919 case "$cf_add_cflags" in
11920 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11921 case "$cf_add_cflags" in
11922 (-D*)
11923 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11924
11925 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11926 && test -z "${cf_tst_cflags}" \
11927 && cf_fix_cppflags=yes
11928
11929 if test "$cf_fix_cppflags" = yes ; then
11930
11931 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11932 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11933
11934 continue
11935 elif test "${cf_tst_cflags}" = "\"'" ; then
11936
11937 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11938 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11939
11940 continue
11941 fi
11942 ;;
11943 esac
11944 case "$CPPFLAGS" in
11945 (*$cf_add_cflags)
11946 ;;
11947 (*)
11948 case "$cf_add_cflags" in
11949 (-D*)
11950 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11951
11952 CPPFLAGS=`echo "$CPPFLAGS" | \
11953 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11954 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11955
11956 ;;
11957 esac
11958
11959 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11960 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11961
11962 ;;
11963 esac
11964 ;;
11965 (*)
11966
11967 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11968 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11969
11970 ;;
11971 esac
11972 ;;
11973 (yes)
11974
11975 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11976 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11977
11978 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11979
11980 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11981 && test -z "${cf_tst_cflags}" \
11982 && cf_fix_cppflags=no
11983 ;;
11984 esac
11985 done
11986
11987 if test -n "$cf_new_cflags" ; then
11988 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
11989
11990 echo "${as_me:-configure}:11990: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11991
11992 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11993 CFLAGS="${CFLAGS}$cf_new_cflags"
11994
11995 fi
11996
11997 if test -n "$cf_new_cppflags" ; then
11998 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11999
12000 echo "${as_me:-configure}:12000: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12001
12002 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12003 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12004
12005 fi
12006
12007 if test -n "$cf_new_extra_cppflags" ; then
12008 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12009
12010 echo "${as_me:-configure}:12010: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12011
12012 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12013 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12014
12015 fi
12016
12017 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
12018 cat >"conftest.$ac_ext" <<_ACEOF
12019 #line 12019 "configure"
12020 #include "confdefs.h"
12021 #include <stdio.h>
12022 int
12023 main (void)
12024 {
12025 printf("Hello world");
12026 ;
12027 return 0;
12028 }
12029 _ACEOF
12030 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12031 if { (eval echo "$as_me:12031: \"$ac_link\"") >&5
12032 (eval $ac_link) 2>&5
12033 ac_status=$?
12034 echo "$as_me:12034: \$? = $ac_status" >&5
12035 (exit "$ac_status"); } &&
12036 { ac_try='test -s "conftest$ac_exeext"'
12037 { (eval echo "$as_me:12037: \"$ac_try\"") >&5
12038 (eval $ac_try) 2>&5
12039 ac_status=$?
12040 echo "$as_me:12040: \$? = $ac_status" >&5
12041 (exit "$ac_status"); }; }; then
12042 :
12043 else
12044 echo "$as_me: failed program was:" >&5
12045 cat "conftest.$ac_ext" >&5
12046 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
12047
12048 echo "${as_me:-configure}:12048: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
12049
12050 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
12051 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
12052
12053 echo "${as_me:-configure}:12053: testing but keeping change to \$CPPFLAGS ..." 1>&5
12054
12055 fi
12056 CFLAGS="$cf_check_cflags"
12057 fi
12058 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12059 fi
12060
12061 echo "$as_me:12061: checking for XOpenDisplay" >&5
12062 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
12063 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
12064 echo $ECHO_N "(cached) $ECHO_C" >&6
12065 else
12066 cat >"conftest.$ac_ext" <<_ACEOF
12067 #line 12067 "configure"
12068 #include "confdefs.h"
12069 #define XOpenDisplay autoconf_temporary
12070 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12071 #undef XOpenDisplay
12072
12073 #ifdef __cplusplus
12074 extern "C"
12075 #endif
12076
12077 /* We use char because int might match the return type of a gcc2
12078 builtin and then its argument prototype would still apply. */
12079 char XOpenDisplay (void);
12080
12081 int
12082 main (void)
12083 {
12084
12085 /* The GNU C library defines stubs for functions which it implements
12086 to always fail with ENOSYS. Some functions are actually named
12087 something starting with __ and the normal name is an alias. */
12088 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
12089 #error found stub for XOpenDisplay
12090 #endif
12091
12092 return XOpenDisplay ();
12093 ;
12094 return 0;
12095 }
12096 _ACEOF
12097 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12098 if { (eval echo "$as_me:12098: \"$ac_link\"") >&5
12099 (eval $ac_link) 2>&5
12100 ac_status=$?
12101 echo "$as_me:12101: \$? = $ac_status" >&5
12102 (exit "$ac_status"); } &&
12103 { ac_try='test -s "conftest$ac_exeext"'
12104 { (eval echo "$as_me:12104: \"$ac_try\"") >&5
12105 (eval $ac_try) 2>&5
12106 ac_status=$?
12107 echo "$as_me:12107: \$? = $ac_status" >&5
12108 (exit "$ac_status"); }; }; then
12109 ac_cv_func_XOpenDisplay=yes
12110 else
12111 echo "$as_me: failed program was:" >&5
12112 cat "conftest.$ac_ext" >&5
12113 ac_cv_func_XOpenDisplay=no
12114 fi
12115 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12116 fi
12117 echo "$as_me:12117: result: $ac_cv_func_XOpenDisplay" >&5
12118 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
12119 if test "$ac_cv_func_XOpenDisplay" = yes; then
12120 :
12121 else
12122
12123 echo "$as_me:12123: checking for XOpenDisplay in -lX11" >&5
12124 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12125 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12126 echo $ECHO_N "(cached) $ECHO_C" >&6
12127 else
12128 ac_check_lib_save_LIBS=$LIBS
12129 LIBS="-lX11 $LIBS"
12130 cat >"conftest.$ac_ext" <<_ACEOF
12131 #line 12131 "configure"
12132 #include "confdefs.h"
12133
12134 /* Override any gcc2 internal prototype to avoid an error. */
12135 #ifdef __cplusplus
12136 extern "C"
12137 #endif
12138 /* We use char because int might match the return type of a gcc2
12139 builtin and then its argument prototype would still apply. */
12140 char XOpenDisplay ();
12141 int
12142 main (void)
12143 {
12144 XOpenDisplay ();
12145 ;
12146 return 0;
12147 }
12148 _ACEOF
12149 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12150 if { (eval echo "$as_me:12150: \"$ac_link\"") >&5
12151 (eval $ac_link) 2>&5
12152 ac_status=$?
12153 echo "$as_me:12153: \$? = $ac_status" >&5
12154 (exit "$ac_status"); } &&
12155 { ac_try='test -s "conftest$ac_exeext"'
12156 { (eval echo "$as_me:12156: \"$ac_try\"") >&5
12157 (eval $ac_try) 2>&5
12158 ac_status=$?
12159 echo "$as_me:12159: \$? = $ac_status" >&5
12160 (exit "$ac_status"); }; }; then
12161 ac_cv_lib_X11_XOpenDisplay=yes
12162 else
12163 echo "$as_me: failed program was:" >&5
12164 cat "conftest.$ac_ext" >&5
12165 ac_cv_lib_X11_XOpenDisplay=no
12166 fi
12167 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12168 LIBS=$ac_check_lib_save_LIBS
12169 fi
12170 echo "$as_me:12170: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12171 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12172 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
12173
12174 cf_add_libs="$LIBS"
12175 # reverse order
12176 cf_add_0lib=
12177 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12178 # filter duplicates
12179 for cf_add_1lib in $cf_add_0lib; do
12180 for cf_add_2lib in $cf_add_libs; do
12181 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12182 cf_add_1lib=
12183 break
12184 fi
12185 done
12186 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12187 done
12188 LIBS="$cf_add_libs"
12189
12190 fi
12191
12192 fi
12193
12194 echo "$as_me:12194: checking for XtAppInitialize" >&5
12195 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
12196 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
12197 echo $ECHO_N "(cached) $ECHO_C" >&6
12198 else
12199 cat >"conftest.$ac_ext" <<_ACEOF
12200 #line 12200 "configure"
12201 #include "confdefs.h"
12202 #define XtAppInitialize autoconf_temporary
12203 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12204 #undef XtAppInitialize
12205
12206 #ifdef __cplusplus
12207 extern "C"
12208 #endif
12209
12210 /* We use char because int might match the return type of a gcc2
12211 builtin and then its argument prototype would still apply. */
12212 char XtAppInitialize (void);
12213
12214 int
12215 main (void)
12216 {
12217
12218 /* The GNU C library defines stubs for functions which it implements
12219 to always fail with ENOSYS. Some functions are actually named
12220 something starting with __ and the normal name is an alias. */
12221 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
12222 #error found stub for XtAppInitialize
12223 #endif
12224
12225 return XtAppInitialize ();
12226 ;
12227 return 0;
12228 }
12229 _ACEOF
12230 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12231 if { (eval echo "$as_me:12231: \"$ac_link\"") >&5
12232 (eval $ac_link) 2>&5
12233 ac_status=$?
12234 echo "$as_me:12234: \$? = $ac_status" >&5
12235 (exit "$ac_status"); } &&
12236 { ac_try='test -s "conftest$ac_exeext"'
12237 { (eval echo "$as_me:12237: \"$ac_try\"") >&5
12238 (eval $ac_try) 2>&5
12239 ac_status=$?
12240 echo "$as_me:12240: \$? = $ac_status" >&5
12241 (exit "$ac_status"); }; }; then
12242 ac_cv_func_XtAppInitialize=yes
12243 else
12244 echo "$as_me: failed program was:" >&5
12245 cat "conftest.$ac_ext" >&5
12246 ac_cv_func_XtAppInitialize=no
12247 fi
12248 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12249 fi
12250 echo "$as_me:12250: result: $ac_cv_func_XtAppInitialize" >&5
12251 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
12252 if test "$ac_cv_func_XtAppInitialize" = yes; then
12253 :
12254 else
12255
12256 echo "$as_me:12256: checking for XtAppInitialize in -lXt" >&5
12257 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
12258 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
12259 echo $ECHO_N "(cached) $ECHO_C" >&6
12260 else
12261 ac_check_lib_save_LIBS=$LIBS
12262 LIBS="-lXt $LIBS"
12263 cat >"conftest.$ac_ext" <<_ACEOF
12264 #line 12264 "configure"
12265 #include "confdefs.h"
12266
12267 /* Override any gcc2 internal prototype to avoid an error. */
12268 #ifdef __cplusplus
12269 extern "C"
12270 #endif
12271 /* We use char because int might match the return type of a gcc2
12272 builtin and then its argument prototype would still apply. */
12273 char XtAppInitialize ();
12274 int
12275 main (void)
12276 {
12277 XtAppInitialize ();
12278 ;
12279 return 0;
12280 }
12281 _ACEOF
12282 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12283 if { (eval echo "$as_me:12283: \"$ac_link\"") >&5
12284 (eval $ac_link) 2>&5
12285 ac_status=$?
12286 echo "$as_me:12286: \$? = $ac_status" >&5
12287 (exit "$ac_status"); } &&
12288 { ac_try='test -s "conftest$ac_exeext"'
12289 { (eval echo "$as_me:12289: \"$ac_try\"") >&5
12290 (eval $ac_try) 2>&5
12291 ac_status=$?
12292 echo "$as_me:12292: \$? = $ac_status" >&5
12293 (exit "$ac_status"); }; }; then
12294 ac_cv_lib_Xt_XtAppInitialize=yes
12295 else
12296 echo "$as_me: failed program was:" >&5
12297 cat "conftest.$ac_ext" >&5
12298 ac_cv_lib_Xt_XtAppInitialize=no
12299 fi
12300 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12301 LIBS=$ac_check_lib_save_LIBS
12302 fi
12303 echo "$as_me:12303: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
12304 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
12305 if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
12306
12307 cat >>confdefs.h <<\EOF
12308 #define HAVE_LIBXT 1
12309 EOF
12310
12311 cf_have_X_LIBS=Xt
12312 LIBS="-lXt $LIBS"
12313 fi
12314
12315 fi
12316
12317 fi
12318
12319 if test "$cf_have_X_LIBS" = no ; then
12320 { echo "$as_me:12320: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12321 test program. You will have to check and add the proper libraries by hand
12322 to makefile." >&5
12323 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12324 test program. You will have to check and add the proper libraries by hand
12325 to makefile." >&2;}
12326 fi
12327
12328 for ac_header in \
12329 X11/DECkeysym.h \
12330 X11/Sunkeysym.h \
12331 X11/XF86keysym.h \
12332 X11/XKBlib.h \
12333 X11/TranslateI.h \
12334 X11/Xpoll.h \
12335 X11/extensions/XKB.h \
12336
12337 do
12338 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12339 echo "$as_me:12339: checking for $ac_header" >&5
12340 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12341 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12342 echo $ECHO_N "(cached) $ECHO_C" >&6
12343 else
12344 cat >"conftest.$ac_ext" <<_ACEOF
12345 #line 12345 "configure"
12346 #include "confdefs.h"
12347 #include <$ac_header>
12348 _ACEOF
12349 if { (eval echo "$as_me:12349: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12350 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12351 ac_status=$?
12352 $EGREP -v '^ *\+' conftest.er1 >conftest.err
12353 rm -f conftest.er1
12354 cat conftest.err >&5
12355 echo "$as_me:12355: \$? = $ac_status" >&5
12356 (exit "$ac_status"); } >/dev/null; then
12357 if test -s conftest.err; then
12358 ac_cpp_err=$ac_c_preproc_warn_flag
12359 else
12360 ac_cpp_err=
12361 fi
12362 else
12363 ac_cpp_err=yes
12364 fi
12365 if test -z "$ac_cpp_err"; then
12366 eval "$as_ac_Header=yes"
12367 else
12368 echo "$as_me: failed program was:" >&5
12369 cat "conftest.$ac_ext" >&5
12370 eval "$as_ac_Header=no"
12371 fi
12372 rm -f conftest.err "conftest.$ac_ext"
12373 fi
12374 echo "$as_me:12374: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12375 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12376 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12377 cat >>confdefs.h <<EOF
12378 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12379 EOF
12380
12381 fi
12382 done
12383
12384 ICON_SUFFIX=.xbm
12385
12386 cf_save_cppflags="${CPPFLAGS}"
12387 cf_save_ldflags="${LDFLAGS}"
12388
12389 echo "$as_me:12389: checking if you want to use the Xpm library for colored icon" >&5
12390 echo $ECHO_N "checking if you want to use the Xpm library for colored icon... $ECHO_C" >&6
12391
12392 # Check whether --with-xpm or --without-xpm was given.
12393 if test "${with_xpm+set}" = set; then
12394 withval="$with_xpm"
12395 cf_Xpm_library="$withval"
12396 else
12397 cf_Xpm_library=yes
12398 fi;
12399 echo "$as_me:12399: result: $cf_Xpm_library" >&5
12400 echo "${ECHO_T}$cf_Xpm_library" >&6
12401
12402 if test "$cf_Xpm_library" != no ; then
12403 if test "$cf_Xpm_library" != yes ; then
12404 CPPFLAGS="$CPPFLAGS -I$withval/include"
12405 LDFLAGS="$LDFLAGS -L$withval/lib"
12406 fi
12407 echo "$as_me:12407: checking for X11/xpm.h" >&5
12408 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
12409 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
12410 echo $ECHO_N "(cached) $ECHO_C" >&6
12411 else
12412 cat >"conftest.$ac_ext" <<_ACEOF
12413 #line 12413 "configure"
12414 #include "confdefs.h"
12415 #include <X11/xpm.h>
12416 _ACEOF
12417 if { (eval echo "$as_me:12417: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12418 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12419 ac_status=$?
12420 $EGREP -v '^ *\+' conftest.er1 >conftest.err
12421 rm -f conftest.er1
12422 cat conftest.err >&5
12423 echo "$as_me:12423: \$? = $ac_status" >&5
12424 (exit "$ac_status"); } >/dev/null; then
12425 if test -s conftest.err; then
12426 ac_cpp_err=$ac_c_preproc_warn_flag
12427 else
12428 ac_cpp_err=
12429 fi
12430 else
12431 ac_cpp_err=yes
12432 fi
12433 if test -z "$ac_cpp_err"; then
12434 ac_cv_header_X11_xpm_h=yes
12435 else
12436 echo "$as_me: failed program was:" >&5
12437 cat "conftest.$ac_ext" >&5
12438 ac_cv_header_X11_xpm_h=no
12439 fi
12440 rm -f conftest.err "conftest.$ac_ext"
12441 fi
12442 echo "$as_me:12442: result: $ac_cv_header_X11_xpm_h" >&5
12443 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
12444 if test "$ac_cv_header_X11_xpm_h" = yes; then
12445
12446 echo "$as_me:12446: checking for XpmCreatePixmapFromData in -lXpm" >&5
12447 echo $ECHO_N "checking for XpmCreatePixmapFromData in -lXpm... $ECHO_C" >&6
12448 if test "${ac_cv_lib_Xpm_XpmCreatePixmapFromData+set}" = set; then
12449 echo $ECHO_N "(cached) $ECHO_C" >&6
12450 else
12451 ac_check_lib_save_LIBS=$LIBS
12452 LIBS="-lXpm -lX11 $X_LIBS $LIBS"
12453 cat >"conftest.$ac_ext" <<_ACEOF
12454 #line 12454 "configure"
12455 #include "confdefs.h"
12456
12457 /* Override any gcc2 internal prototype to avoid an error. */
12458 #ifdef __cplusplus
12459 extern "C"
12460 #endif
12461 /* We use char because int might match the return type of a gcc2
12462 builtin and then its argument prototype would still apply. */
12463 char XpmCreatePixmapFromData ();
12464 int
12465 main (void)
12466 {
12467 XpmCreatePixmapFromData ();
12468 ;
12469 return 0;
12470 }
12471 _ACEOF
12472 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12473 if { (eval echo "$as_me:12473: \"$ac_link\"") >&5
12474 (eval $ac_link) 2>&5
12475 ac_status=$?
12476 echo "$as_me:12476: \$? = $ac_status" >&5
12477 (exit "$ac_status"); } &&
12478 { ac_try='test -s "conftest$ac_exeext"'
12479 { (eval echo "$as_me:12479: \"$ac_try\"") >&5
12480 (eval $ac_try) 2>&5
12481 ac_status=$?
12482 echo "$as_me:12482: \$? = $ac_status" >&5
12483 (exit "$ac_status"); }; }; then
12484 ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes
12485 else
12486 echo "$as_me: failed program was:" >&5
12487 cat "conftest.$ac_ext" >&5
12488 ac_cv_lib_Xpm_XpmCreatePixmapFromData=no
12489 fi
12490 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12491 LIBS=$ac_check_lib_save_LIBS
12492 fi
12493 echo "$as_me:12493: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
12494 echo "${ECHO_T}$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6
12495 if test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = yes; then
12496
12497 cat >>confdefs.h <<\EOF
12498 #define HAVE_LIBXPM 1
12499 EOF
12500
12501 ICON_SUFFIX=.xpm
12502 LIBS="-lXpm $LIBS"
12503 else
12504 CPPFLAGS="${cf_save_cppflags}" LDFLAGS="${cf_save_ldflags}"
12505 fi
12506
12507 else
12508 CPPFLAGS="${cf_save_cppflags}" LDFLAGS="${cf_save_ldflags}"
12509 fi
12510
12511 fi
12512
12513 echo "$as_me:12513: checking if you want to use the Xinerama extension" >&5
12514 echo $ECHO_N "checking if you want to use the Xinerama extension... $ECHO_C" >&6
12515
12516 # Check whether --with-xinerama or --without-xinerama was given.
12517 if test "${with_xinerama+set}" = set; then
12518 withval="$with_xinerama"
12519 cf_with_xinerama="$withval"
12520 else
12521 cf_with_xinerama=yes
12522 fi;
12523 echo "$as_me:12523: result: $cf_with_xinerama" >&5
12524 echo "${ECHO_T}$cf_with_xinerama" >&6
12525 if test "$cf_with_xinerama" = yes; then
12526
12527 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xinerama"; then
12528 test -n "$verbose" && echo " found package xinerama" 1>&6
12529
12530 echo "${as_me:-configure}:12530: testing found package xinerama ..." 1>&5
12531
12532 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xinerama" 2>/dev/null`"
12533 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xinerama" 2>/dev/null`"
12534 test -n "$verbose" && echo " package xinerama CFLAGS: $cf_pkgconfig_incs" 1>&6
12535
12536 echo "${as_me:-configure}:12536: testing package xinerama CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12537
12538 test -n "$verbose" && echo " package xinerama LIBS: $cf_pkgconfig_libs" 1>&6
12539
12540 echo "${as_me:-configure}:12540: testing package xinerama LIBS: $cf_pkgconfig_libs ..." 1>&5
12541
12542 cf_fix_cppflags=no
12543 cf_new_cflags=
12544 cf_new_cppflags=
12545 cf_new_extra_cppflags=
12546
12547 for cf_add_cflags in $cf_pkgconfig_incs
12548 do
12549 case "$cf_fix_cppflags" in
12550 (no)
12551 case "$cf_add_cflags" in
12552 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12553 case "$cf_add_cflags" in
12554 (-D*)
12555 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12556
12557 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12558 && test -z "${cf_tst_cflags}" \
12559 && cf_fix_cppflags=yes
12560
12561 if test "$cf_fix_cppflags" = yes ; then
12562
12563 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12564 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12565
12566 continue
12567 elif test "${cf_tst_cflags}" = "\"'" ; then
12568
12569 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12570 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12571
12572 continue
12573 fi
12574 ;;
12575 esac
12576 case "$CPPFLAGS" in
12577 (*$cf_add_cflags)
12578 ;;
12579 (*)
12580 case "$cf_add_cflags" in
12581 (-D*)
12582 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12583
12584 CPPFLAGS=`echo "$CPPFLAGS" | \
12585 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12586 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12587
12588 ;;
12589 esac
12590
12591 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12592 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12593
12594 ;;
12595 esac
12596 ;;
12597 (*)
12598
12599 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12600 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12601
12602 ;;
12603 esac
12604 ;;
12605 (yes)
12606
12607 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12608 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12609
12610 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12611
12612 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12613 && test -z "${cf_tst_cflags}" \
12614 && cf_fix_cppflags=no
12615 ;;
12616 esac
12617 done
12618
12619 if test -n "$cf_new_cflags" ; then
12620
12621 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12622 CFLAGS="${CFLAGS}$cf_new_cflags"
12623
12624 fi
12625
12626 if test -n "$cf_new_cppflags" ; then
12627
12628 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12629 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12630
12631 fi
12632
12633 if test -n "$cf_new_extra_cppflags" ; then
12634
12635 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12636 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12637
12638 fi
12639
12640 cf_add_libs="$LIBS"
12641 # reverse order
12642 cf_add_0lib=
12643 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12644 # filter duplicates
12645 for cf_add_1lib in $cf_add_0lib; do
12646 for cf_add_2lib in $cf_add_libs; do
12647 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12648 cf_add_1lib=
12649 break
12650 fi
12651 done
12652 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12653 done
12654 LIBS="$cf_add_libs"
12655
12656 cat >>confdefs.h <<\EOF
12657 #define HAVE_X11_EXTENSIONS_XINERAMA_H 1
12658 EOF
12659
12660 else
12661 cf_pkgconfig_incs=
12662 cf_pkgconfig_libs=
12663
12664 echo "$as_me:12664: checking for XineramaQueryScreens in -lXinerama" >&5
12665 echo $ECHO_N "checking for XineramaQueryScreens in -lXinerama... $ECHO_C" >&6
12666 if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
12667 echo $ECHO_N "(cached) $ECHO_C" >&6
12668 else
12669 ac_check_lib_save_LIBS=$LIBS
12670 LIBS="-lXinerama $LIBS"
12671 cat >"conftest.$ac_ext" <<_ACEOF
12672 #line 12672 "configure"
12673 #include "confdefs.h"
12674
12675 /* Override any gcc2 internal prototype to avoid an error. */
12676 #ifdef __cplusplus
12677 extern "C"
12678 #endif
12679 /* We use char because int might match the return type of a gcc2
12680 builtin and then its argument prototype would still apply. */
12681 char XineramaQueryScreens ();
12682 int
12683 main (void)
12684 {
12685 XineramaQueryScreens ();
12686 ;
12687 return 0;
12688 }
12689 _ACEOF
12690 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12691 if { (eval echo "$as_me:12691: \"$ac_link\"") >&5
12692 (eval $ac_link) 2>&5
12693 ac_status=$?
12694 echo "$as_me:12694: \$? = $ac_status" >&5
12695 (exit "$ac_status"); } &&
12696 { ac_try='test -s "conftest$ac_exeext"'
12697 { (eval echo "$as_me:12697: \"$ac_try\"") >&5
12698 (eval $ac_try) 2>&5
12699 ac_status=$?
12700 echo "$as_me:12700: \$? = $ac_status" >&5
12701 (exit "$ac_status"); }; }; then
12702 ac_cv_lib_Xinerama_XineramaQueryScreens=yes
12703 else
12704 echo "$as_me: failed program was:" >&5
12705 cat "conftest.$ac_ext" >&5
12706 ac_cv_lib_Xinerama_XineramaQueryScreens=no
12707 fi
12708 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12709 LIBS=$ac_check_lib_save_LIBS
12710 fi
12711 echo "$as_me:12711: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
12712 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6
12713 if test "$ac_cv_lib_Xinerama_XineramaQueryScreens" = yes; then
12714
12715 cf_add_libs="$LIBS"
12716 # reverse order
12717 cf_add_0lib=
12718 for cf_add_1lib in -lXinerama; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12719 # filter duplicates
12720 for cf_add_1lib in $cf_add_0lib; do
12721 for cf_add_2lib in $cf_add_libs; do
12722 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12723 cf_add_1lib=
12724 break
12725 fi
12726 done
12727 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12728 done
12729 LIBS="$cf_add_libs"
12730
12731 for ac_header in \
12732 X11/extensions/Xinerama.h \
12733
12734 do
12735 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12736 echo "$as_me:12736: checking for $ac_header" >&5
12737 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12738 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12739 echo $ECHO_N "(cached) $ECHO_C" >&6
12740 else
12741 cat >"conftest.$ac_ext" <<_ACEOF
12742 #line 12742 "configure"
12743 #include "confdefs.h"
12744 #include <$ac_header>
12745 _ACEOF
12746 if { (eval echo "$as_me:12746: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12747 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12748 ac_status=$?
12749 $EGREP -v '^ *\+' conftest.er1 >conftest.err
12750 rm -f conftest.er1
12751 cat conftest.err >&5
12752 echo "$as_me:12752: \$? = $ac_status" >&5
12753 (exit "$ac_status"); } >/dev/null; then
12754 if test -s conftest.err; then
12755 ac_cpp_err=$ac_c_preproc_warn_flag
12756 else
12757 ac_cpp_err=
12758 fi
12759 else
12760 ac_cpp_err=yes
12761 fi
12762 if test -z "$ac_cpp_err"; then
12763 eval "$as_ac_Header=yes"
12764 else
12765 echo "$as_me: failed program was:" >&5
12766 cat "conftest.$ac_ext" >&5
12767 eval "$as_ac_Header=no"
12768 fi
12769 rm -f conftest.err "conftest.$ac_ext"
12770 fi
12771 echo "$as_me:12771: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12772 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12773 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12774 cat >>confdefs.h <<EOF
12775 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12776 EOF
12777
12778 fi
12779 done
12780
12781 fi
12782
12783 fi
12784
12785 fi
12786
12787 cf_x_athena=${cf_x_athena:-Xaw}
12788
12789 echo "$as_me:12789: checking if you want to link with Xaw 3d library" >&5
12790 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
12791 withval=
12792
12793 # Check whether --with-Xaw3d or --without-Xaw3d was given.
12794 if test "${with_Xaw3d+set}" = set; then
12795 withval="$with_Xaw3d"
12796
12797 fi;
12798 if test "$withval" = yes ; then
12799 cf_x_athena=Xaw3d
12800 echo "$as_me:12800: result: yes" >&5
12801 echo "${ECHO_T}yes" >&6
12802 else
12803 echo "$as_me:12803: result: no" >&5
12804 echo "${ECHO_T}no" >&6
12805 fi
12806
12807 echo "$as_me:12807: checking if you want to link with Xaw 3d xft library" >&5
12808 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
12809 withval=
12810
12811 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
12812 if test "${with_Xaw3dxft+set}" = set; then
12813 withval="$with_Xaw3dxft"
12814
12815 fi;
12816 if test "$withval" = yes ; then
12817 cf_x_athena=Xaw3dxft
12818 echo "$as_me:12818: result: yes" >&5
12819 echo "${ECHO_T}yes" >&6
12820 else
12821 echo "$as_me:12821: result: no" >&5
12822 echo "${ECHO_T}no" >&6
12823 fi
12824
12825 echo "$as_me:12825: checking if you want to link with neXT Athena library" >&5
12826 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
12827 withval=
12828
12829 # Check whether --with-neXtaw or --without-neXtaw was given.
12830 if test "${with_neXtaw+set}" = set; then
12831 withval="$with_neXtaw"
12832
12833 fi;
12834 if test "$withval" = yes ; then
12835 cf_x_athena=neXtaw
12836 echo "$as_me:12836: result: yes" >&5
12837 echo "${ECHO_T}yes" >&6
12838 else
12839 echo "$as_me:12839: result: no" >&5
12840 echo "${ECHO_T}no" >&6
12841 fi
12842
12843 echo "$as_me:12843: checking if you want to link with Athena-Plus library" >&5
12844 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
12845 withval=
12846
12847 # Check whether --with-XawPlus or --without-XawPlus was given.
12848 if test "${with_XawPlus+set}" = set; then
12849 withval="$with_XawPlus"
12850
12851 fi;
12852 if test "$withval" = yes ; then
12853 cf_x_athena=XawPlus
12854 echo "$as_me:12854: result: yes" >&5
12855 echo "${ECHO_T}yes" >&6
12856 else
12857 echo "$as_me:12857: result: no" >&5
12858 echo "${ECHO_T}no" >&6
12859 fi
12860
12861 cf_x_athena_lib=""
12862
12863 if test "$PKG_CONFIG" != none ; then
12864 cf_athena_list=
12865 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
12866 for cf_athena_pkg in \
12867 $cf_athena_list \
12868 ${cf_x_athena} \
12869 ${cf_x_athena}-devel \
12870 lib${cf_x_athena} \
12871 lib${cf_x_athena}-devel
12872 do
12873
12874 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_athena_pkg"; then
12875 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
12876
12877 echo "${as_me:-configure}:12877: testing found package $cf_athena_pkg ..." 1>&5
12878
12879 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_athena_pkg" 2>/dev/null`"
12880 cf_pkgconfig_libs="`$PKG_CONFIG --libs "$cf_athena_pkg" 2>/dev/null`"
12881 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
12882
12883 echo "${as_me:-configure}:12883: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12884
12885 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
12886
12887 echo "${as_me:-configure}:12887: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
12888
12889 cf_fix_cppflags=no
12890 cf_new_cflags=
12891 cf_new_cppflags=
12892 cf_new_extra_cppflags=
12893
12894 for cf_add_cflags in $cf_pkgconfig_incs
12895 do
12896 case "$cf_fix_cppflags" in
12897 (no)
12898 case "$cf_add_cflags" in
12899 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12900 case "$cf_add_cflags" in
12901 (-D*)
12902 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12903
12904 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12905 && test -z "${cf_tst_cflags}" \
12906 && cf_fix_cppflags=yes
12907
12908 if test "$cf_fix_cppflags" = yes ; then
12909
12910 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12911 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12912
12913 continue
12914 elif test "${cf_tst_cflags}" = "\"'" ; then
12915
12916 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12917 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12918
12919 continue
12920 fi
12921 ;;
12922 esac
12923 case "$CPPFLAGS" in
12924 (*$cf_add_cflags)
12925 ;;
12926 (*)
12927 case "$cf_add_cflags" in
12928 (-D*)
12929 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12930
12931 CPPFLAGS=`echo "$CPPFLAGS" | \
12932 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12933 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12934
12935 ;;
12936 esac
12937
12938 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12939 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12940
12941 ;;
12942 esac
12943 ;;
12944 (*)
12945
12946 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12947 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12948
12949 ;;
12950 esac
12951 ;;
12952 (yes)
12953
12954 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12955 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12956
12957 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12958
12959 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12960 && test -z "${cf_tst_cflags}" \
12961 && cf_fix_cppflags=no
12962 ;;
12963 esac
12964 done
12965
12966 if test -n "$cf_new_cflags" ; then
12967
12968 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12969 CFLAGS="${CFLAGS}$cf_new_cflags"
12970
12971 fi
12972
12973 if test -n "$cf_new_cppflags" ; then
12974
12975 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12976 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12977
12978 fi
12979
12980 if test -n "$cf_new_extra_cppflags" ; then
12981
12982 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12983 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12984
12985 fi
12986
12987 cf_add_libs="$LIBS"
12988 # reverse order
12989 cf_add_0lib=
12990 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12991 # filter duplicates
12992 for cf_add_1lib in $cf_add_0lib; do
12993 for cf_add_2lib in $cf_add_libs; do
12994 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12995 cf_add_1lib=
12996 break
12997 fi
12998 done
12999 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13000 done
13001 LIBS="$cf_add_libs"
13002
13003 cf_x_athena_lib="$cf_pkgconfig_libs"
13004
13005 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13006
13007 cat >>confdefs.h <<EOF
13008 #define $cf_x_athena_LIBS 1
13009 EOF
13010
13011 for cf_trim_lib in Xmu Xt X11
13012 do
13013 case "$LIBS" in
13014 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13015 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13016 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13017
13018 echo "${as_me:-configure}:13018: testing ..trimmed $LIBS ..." 1>&5
13019
13020 ;;
13021 esac
13022 done
13023
13024 echo "$as_me:13024: checking for usable $cf_x_athena/Xmu package" >&5
13025 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
13026 if test "${cf_cv_xaw_compat+set}" = set; then
13027 echo $ECHO_N "(cached) $ECHO_C" >&6
13028 else
13029
13030 cat >"conftest.$ac_ext" <<_ACEOF
13031 #line 13031 "configure"
13032 #include "confdefs.h"
13033
13034 $ac_includes_default
13035 #include <X11/Xmu/CharSet.h>
13036
13037 int
13038 main (void)
13039 {
13040
13041 int check = XmuCompareISOLatin1("big", "small");
13042 (void)check;
13043
13044 ;
13045 return 0;
13046 }
13047 _ACEOF
13048 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13049 if { (eval echo "$as_me:13049: \"$ac_link\"") >&5
13050 (eval $ac_link) 2>&5
13051 ac_status=$?
13052 echo "$as_me:13052: \$? = $ac_status" >&5
13053 (exit "$ac_status"); } &&
13054 { ac_try='test -s "conftest$ac_exeext"'
13055 { (eval echo "$as_me:13055: \"$ac_try\"") >&5
13056 (eval $ac_try) 2>&5
13057 ac_status=$?
13058 echo "$as_me:13058: \$? = $ac_status" >&5
13059 (exit "$ac_status"); }; }; then
13060 cf_cv_xaw_compat=yes
13061 else
13062 echo "$as_me: failed program was:" >&5
13063 cat "conftest.$ac_ext" >&5
13064 cf_cv_xaw_compat=no
13065 fi
13066 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13067 fi
13068 echo "$as_me:13068: result: $cf_cv_xaw_compat" >&5
13069 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
13070
13071 if test "$cf_cv_xaw_compat" = no
13072 then
13073 # workaround for broken ".pc" files...
13074 case "$cf_x_athena_lib" in
13075 (*-lXmu*)
13076 ;;
13077 (*)
13078 test -n "$verbose" && echo " work around broken package" 1>&6
13079
13080 echo "${as_me:-configure}:13080: testing work around broken package ..." 1>&5
13081
13082 cf_save_xmu="$LIBS"
13083 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
13084
13085 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xmu"; then
13086 test -n "$verbose" && echo " found package xmu" 1>&6
13087
13088 echo "${as_me:-configure}:13088: testing found package xmu ..." 1>&5
13089
13090 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xmu" 2>/dev/null`"
13091 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xmu" 2>/dev/null`"
13092 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
13093
13094 echo "${as_me:-configure}:13094: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13095
13096 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
13097
13098 echo "${as_me:-configure}:13098: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
13099
13100 cf_fix_cppflags=no
13101 cf_new_cflags=
13102 cf_new_cppflags=
13103 cf_new_extra_cppflags=
13104
13105 for cf_add_cflags in $cf_pkgconfig_incs
13106 do
13107 case "$cf_fix_cppflags" in
13108 (no)
13109 case "$cf_add_cflags" in
13110 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13111 case "$cf_add_cflags" in
13112 (-D*)
13113 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13114
13115 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13116 && test -z "${cf_tst_cflags}" \
13117 && cf_fix_cppflags=yes
13118
13119 if test "$cf_fix_cppflags" = yes ; then
13120
13121 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13122 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13123
13124 continue
13125 elif test "${cf_tst_cflags}" = "\"'" ; then
13126
13127 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13128 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13129
13130 continue
13131 fi
13132 ;;
13133 esac
13134 case "$CPPFLAGS" in
13135 (*$cf_add_cflags)
13136 ;;
13137 (*)
13138 case "$cf_add_cflags" in
13139 (-D*)
13140 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13141
13142 CPPFLAGS=`echo "$CPPFLAGS" | \
13143 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13144 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13145
13146 ;;
13147 esac
13148
13149 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13150 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13151
13152 ;;
13153 esac
13154 ;;
13155 (*)
13156
13157 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13158 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13159
13160 ;;
13161 esac
13162 ;;
13163 (yes)
13164
13165 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13166 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13167
13168 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13169
13170 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13171 && test -z "${cf_tst_cflags}" \
13172 && cf_fix_cppflags=no
13173 ;;
13174 esac
13175 done
13176
13177 if test -n "$cf_new_cflags" ; then
13178
13179 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13180 CFLAGS="${CFLAGS}$cf_new_cflags"
13181
13182 fi
13183
13184 if test -n "$cf_new_cppflags" ; then
13185
13186 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13187 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13188
13189 fi
13190
13191 if test -n "$cf_new_extra_cppflags" ; then
13192
13193 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13194 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13195
13196 fi
13197
13198 cf_add_libs="$LIBS"
13199 # reverse order
13200 cf_add_0lib=
13201 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13202 # filter duplicates
13203 for cf_add_1lib in $cf_add_0lib; do
13204 for cf_add_2lib in $cf_add_libs; do
13205 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13206 cf_add_1lib=
13207 break
13208 fi
13209 done
13210 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13211 done
13212 LIBS="$cf_add_libs"
13213
13214 LIBS="$cf_save_xmu"
13215
13216 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13217
13218 echo "${as_me:-configure}:13218: testing ...before $LIBS ..." 1>&5
13219
13220 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
13221 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13222
13223 echo "${as_me:-configure}:13223: testing ...after $LIBS ..." 1>&5
13224
13225 else
13226 cf_pkgconfig_incs=
13227 cf_pkgconfig_libs=
13228
13229 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13230
13231 echo "${as_me:-configure}:13231: testing ...before $LIBS ..." 1>&5
13232
13233 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
13234 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13235
13236 echo "${as_me:-configure}:13236: testing ...after $LIBS ..." 1>&5
13237
13238 fi
13239
13240 for cf_trim_lib in Xmu Xt X11
13241 do
13242 case "$LIBS" in
13243 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13244 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13245 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13246
13247 echo "${as_me:-configure}:13247: testing ..trimmed $LIBS ..." 1>&5
13248
13249 ;;
13250 esac
13251 done
13252
13253 ;;
13254 esac
13255 fi
13256
13257 break
13258 else
13259 cf_pkgconfig_incs=
13260 cf_pkgconfig_libs=
13261 :
13262 fi
13263
13264 done
13265 fi
13266
13267 if test -z "$cf_x_athena_lib" ; then
13268
13269 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
13270 test -n "$verbose" && echo " found package Xext" 1>&6
13271
13272 echo "${as_me:-configure}:13272: testing found package Xext ..." 1>&5
13273
13274 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
13275 cf_pkgconfig_libs="`$PKG_CONFIG --libs "Xext" 2>/dev/null`"
13276 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
13277
13278 echo "${as_me:-configure}:13278: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13279
13280 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
13281
13282 echo "${as_me:-configure}:13282: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
13283
13284 cf_fix_cppflags=no
13285 cf_new_cflags=
13286 cf_new_cppflags=
13287 cf_new_extra_cppflags=
13288
13289 for cf_add_cflags in $cf_pkgconfig_incs
13290 do
13291 case "$cf_fix_cppflags" in
13292 (no)
13293 case "$cf_add_cflags" in
13294 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13295 case "$cf_add_cflags" in
13296 (-D*)
13297 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13298
13299 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13300 && test -z "${cf_tst_cflags}" \
13301 && cf_fix_cppflags=yes
13302
13303 if test "$cf_fix_cppflags" = yes ; then
13304
13305 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13306 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13307
13308 continue
13309 elif test "${cf_tst_cflags}" = "\"'" ; then
13310
13311 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13312 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13313
13314 continue
13315 fi
13316 ;;
13317 esac
13318 case "$CPPFLAGS" in
13319 (*$cf_add_cflags)
13320 ;;
13321 (*)
13322 case "$cf_add_cflags" in
13323 (-D*)
13324 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13325
13326 CPPFLAGS=`echo "$CPPFLAGS" | \
13327 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13328 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13329
13330 ;;
13331 esac
13332
13333 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13334 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13335
13336 ;;
13337 esac
13338 ;;
13339 (*)
13340
13341 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13342 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13343
13344 ;;
13345 esac
13346 ;;
13347 (yes)
13348
13349 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13350 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13351
13352 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13353
13354 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13355 && test -z "${cf_tst_cflags}" \
13356 && cf_fix_cppflags=no
13357 ;;
13358 esac
13359 done
13360
13361 if test -n "$cf_new_cflags" ; then
13362
13363 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13364 CFLAGS="${CFLAGS}$cf_new_cflags"
13365
13366 fi
13367
13368 if test -n "$cf_new_cppflags" ; then
13369
13370 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13371 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13372
13373 fi
13374
13375 if test -n "$cf_new_extra_cppflags" ; then
13376
13377 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13378 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13379
13380 fi
13381
13382 cf_add_libs="$LIBS"
13383 # reverse order
13384 cf_add_0lib=
13385 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13386 # filter duplicates
13387 for cf_add_1lib in $cf_add_0lib; do
13388 for cf_add_2lib in $cf_add_libs; do
13389 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13390 cf_add_1lib=
13391 break
13392 fi
13393 done
13394 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13395 done
13396 LIBS="$cf_add_libs"
13397
13398 :
13399 else
13400 cf_pkgconfig_incs=
13401 cf_pkgconfig_libs=
13402
13403 echo "$as_me:13403: checking for XextCreateExtension in -lXext" >&5
13404 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
13405 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
13406 echo $ECHO_N "(cached) $ECHO_C" >&6
13407 else
13408 ac_check_lib_save_LIBS=$LIBS
13409 LIBS="-lXext $LIBS"
13410 cat >"conftest.$ac_ext" <<_ACEOF
13411 #line 13411 "configure"
13412 #include "confdefs.h"
13413
13414 /* Override any gcc2 internal prototype to avoid an error. */
13415 #ifdef __cplusplus
13416 extern "C"
13417 #endif
13418 /* We use char because int might match the return type of a gcc2
13419 builtin and then its argument prototype would still apply. */
13420 char XextCreateExtension ();
13421 int
13422 main (void)
13423 {
13424 XextCreateExtension ();
13425 ;
13426 return 0;
13427 }
13428 _ACEOF
13429 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13430 if { (eval echo "$as_me:13430: \"$ac_link\"") >&5
13431 (eval $ac_link) 2>&5
13432 ac_status=$?
13433 echo "$as_me:13433: \$? = $ac_status" >&5
13434 (exit "$ac_status"); } &&
13435 { ac_try='test -s "conftest$ac_exeext"'
13436 { (eval echo "$as_me:13436: \"$ac_try\"") >&5
13437 (eval $ac_try) 2>&5
13438 ac_status=$?
13439 echo "$as_me:13439: \$? = $ac_status" >&5
13440 (exit "$ac_status"); }; }; then
13441 ac_cv_lib_Xext_XextCreateExtension=yes
13442 else
13443 echo "$as_me: failed program was:" >&5
13444 cat "conftest.$ac_ext" >&5
13445 ac_cv_lib_Xext_XextCreateExtension=no
13446 fi
13447 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13448 LIBS=$ac_check_lib_save_LIBS
13449 fi
13450 echo "$as_me:13450: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
13451 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
13452 if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
13453
13454 cf_add_libs="$LIBS"
13455 # reverse order
13456 cf_add_0lib=
13457 for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13458 # filter duplicates
13459 for cf_add_1lib in $cf_add_0lib; do
13460 for cf_add_2lib in $cf_add_libs; do
13461 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13462 cf_add_1lib=
13463 break
13464 fi
13465 done
13466 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13467 done
13468 LIBS="$cf_add_libs"
13469
13470 fi
13471
13472 fi
13473
13474 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
13475 # in some cases has installed dummy files in the former, other cases replaced
13476 # it with a link to the new location). This complicates the configure script.
13477 # Check for that pitfall, and recover using pkg-config
13478 #
13479 # If none of these are set, the configuration is almost certainly broken.
13480 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
13481 then
13482
13483 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
13484 test -n "$verbose" && echo " found package x11" 1>&6
13485
13486 echo "${as_me:-configure}:13486: testing found package x11 ..." 1>&5
13487
13488 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
13489 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
13490 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
13491
13492 echo "${as_me:-configure}:13492: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13493
13494 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
13495
13496 echo "${as_me:-configure}:13496: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
13497
13498 cf_fix_cppflags=no
13499 cf_new_cflags=
13500 cf_new_cppflags=
13501 cf_new_extra_cppflags=
13502
13503 for cf_add_cflags in $cf_pkgconfig_incs
13504 do
13505 case "$cf_fix_cppflags" in
13506 (no)
13507 case "$cf_add_cflags" in
13508 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13509 case "$cf_add_cflags" in
13510 (-D*)
13511 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13512
13513 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13514 && test -z "${cf_tst_cflags}" \
13515 && cf_fix_cppflags=yes
13516
13517 if test "$cf_fix_cppflags" = yes ; then
13518
13519 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13520 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13521
13522 continue
13523 elif test "${cf_tst_cflags}" = "\"'" ; then
13524
13525 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13526 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13527
13528 continue
13529 fi
13530 ;;
13531 esac
13532 case "$CPPFLAGS" in
13533 (*$cf_add_cflags)
13534 ;;
13535 (*)
13536 case "$cf_add_cflags" in
13537 (-D*)
13538 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13539
13540 CPPFLAGS=`echo "$CPPFLAGS" | \
13541 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13542 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13543
13544 ;;
13545 esac
13546
13547 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13548 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13549
13550 ;;
13551 esac
13552 ;;
13553 (*)
13554
13555 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13556 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13557
13558 ;;
13559 esac
13560 ;;
13561 (yes)
13562
13563 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13564 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13565
13566 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13567
13568 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13569 && test -z "${cf_tst_cflags}" \
13570 && cf_fix_cppflags=no
13571 ;;
13572 esac
13573 done
13574
13575 if test -n "$cf_new_cflags" ; then
13576
13577 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13578 CFLAGS="${CFLAGS}$cf_new_cflags"
13579
13580 fi
13581
13582 if test -n "$cf_new_cppflags" ; then
13583
13584 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13585 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13586
13587 fi
13588
13589 if test -n "$cf_new_extra_cppflags" ; then
13590
13591 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13592 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13593
13594 fi
13595
13596 cf_add_libs="$LIBS"
13597 # reverse order
13598 cf_add_0lib=
13599 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13600 # filter duplicates
13601 for cf_add_1lib in $cf_add_0lib; do
13602 for cf_add_2lib in $cf_add_libs; do
13603 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13604 cf_add_1lib=
13605 break
13606 fi
13607 done
13608 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13609 done
13610 LIBS="$cf_add_libs"
13611
13612 :
13613 else
13614 cf_pkgconfig_incs=
13615 cf_pkgconfig_libs=
13616 { echo "$as_me:13616: WARNING: unable to find X11 library" >&5
13617 echo "$as_me: WARNING: unable to find X11 library" >&2;}
13618 fi
13619
13620 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
13621 test -n "$verbose" && echo " found package ice" 1>&6
13622
13623 echo "${as_me:-configure}:13623: testing found package ice ..." 1>&5
13624
13625 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
13626 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
13627 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
13628
13629 echo "${as_me:-configure}:13629: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13630
13631 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
13632
13633 echo "${as_me:-configure}:13633: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
13634
13635 cf_fix_cppflags=no
13636 cf_new_cflags=
13637 cf_new_cppflags=
13638 cf_new_extra_cppflags=
13639
13640 for cf_add_cflags in $cf_pkgconfig_incs
13641 do
13642 case "$cf_fix_cppflags" in
13643 (no)
13644 case "$cf_add_cflags" in
13645 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13646 case "$cf_add_cflags" in
13647 (-D*)
13648 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13649
13650 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13651 && test -z "${cf_tst_cflags}" \
13652 && cf_fix_cppflags=yes
13653
13654 if test "$cf_fix_cppflags" = yes ; then
13655
13656 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13657 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13658
13659 continue
13660 elif test "${cf_tst_cflags}" = "\"'" ; then
13661
13662 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13663 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13664
13665 continue
13666 fi
13667 ;;
13668 esac
13669 case "$CPPFLAGS" in
13670 (*$cf_add_cflags)
13671 ;;
13672 (*)
13673 case "$cf_add_cflags" in
13674 (-D*)
13675 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13676
13677 CPPFLAGS=`echo "$CPPFLAGS" | \
13678 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13679 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13680
13681 ;;
13682 esac
13683
13684 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13685 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13686
13687 ;;
13688 esac
13689 ;;
13690 (*)
13691
13692 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13693 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13694
13695 ;;
13696 esac
13697 ;;
13698 (yes)
13699
13700 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13701 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13702
13703 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13704
13705 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13706 && test -z "${cf_tst_cflags}" \
13707 && cf_fix_cppflags=no
13708 ;;
13709 esac
13710 done
13711
13712 if test -n "$cf_new_cflags" ; then
13713
13714 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13715 CFLAGS="${CFLAGS}$cf_new_cflags"
13716
13717 fi
13718
13719 if test -n "$cf_new_cppflags" ; then
13720
13721 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13722 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13723
13724 fi
13725
13726 if test -n "$cf_new_extra_cppflags" ; then
13727
13728 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13729 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13730
13731 fi
13732
13733 cf_add_libs="$LIBS"
13734 # reverse order
13735 cf_add_0lib=
13736 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13737 # filter duplicates
13738 for cf_add_1lib in $cf_add_0lib; do
13739 for cf_add_2lib in $cf_add_libs; do
13740 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13741 cf_add_1lib=
13742 break
13743 fi
13744 done
13745 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13746 done
13747 LIBS="$cf_add_libs"
13748
13749 :
13750 else
13751 cf_pkgconfig_incs=
13752 cf_pkgconfig_libs=
13753 { echo "$as_me:13753: WARNING: unable to find ICE library" >&5
13754 echo "$as_me: WARNING: unable to find ICE library" >&2;}
13755 fi
13756
13757 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
13758 test -n "$verbose" && echo " found package sm" 1>&6
13759
13760 echo "${as_me:-configure}:13760: testing found package sm ..." 1>&5
13761
13762 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
13763 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
13764 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
13765
13766 echo "${as_me:-configure}:13766: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13767
13768 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
13769
13770 echo "${as_me:-configure}:13770: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
13771
13772 cf_fix_cppflags=no
13773 cf_new_cflags=
13774 cf_new_cppflags=
13775 cf_new_extra_cppflags=
13776
13777 for cf_add_cflags in $cf_pkgconfig_incs
13778 do
13779 case "$cf_fix_cppflags" in
13780 (no)
13781 case "$cf_add_cflags" in
13782 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13783 case "$cf_add_cflags" in
13784 (-D*)
13785 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13786
13787 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13788 && test -z "${cf_tst_cflags}" \
13789 && cf_fix_cppflags=yes
13790
13791 if test "$cf_fix_cppflags" = yes ; then
13792
13793 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13794 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13795
13796 continue
13797 elif test "${cf_tst_cflags}" = "\"'" ; then
13798
13799 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13800 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13801
13802 continue
13803 fi
13804 ;;
13805 esac
13806 case "$CPPFLAGS" in
13807 (*$cf_add_cflags)
13808 ;;
13809 (*)
13810 case "$cf_add_cflags" in
13811 (-D*)
13812 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13813
13814 CPPFLAGS=`echo "$CPPFLAGS" | \
13815 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13816 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13817
13818 ;;
13819 esac
13820
13821 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13822 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13823
13824 ;;
13825 esac
13826 ;;
13827 (*)
13828
13829 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13830 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13831
13832 ;;
13833 esac
13834 ;;
13835 (yes)
13836
13837 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13838 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13839
13840 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13841
13842 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13843 && test -z "${cf_tst_cflags}" \
13844 && cf_fix_cppflags=no
13845 ;;
13846 esac
13847 done
13848
13849 if test -n "$cf_new_cflags" ; then
13850
13851 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13852 CFLAGS="${CFLAGS}$cf_new_cflags"
13853
13854 fi
13855
13856 if test -n "$cf_new_cppflags" ; then
13857
13858 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13859 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13860
13861 fi
13862
13863 if test -n "$cf_new_extra_cppflags" ; then
13864
13865 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13866 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13867
13868 fi
13869
13870 cf_add_libs="$LIBS"
13871 # reverse order
13872 cf_add_0lib=
13873 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13874 # filter duplicates
13875 for cf_add_1lib in $cf_add_0lib; do
13876 for cf_add_2lib in $cf_add_libs; do
13877 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13878 cf_add_1lib=
13879 break
13880 fi
13881 done
13882 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13883 done
13884 LIBS="$cf_add_libs"
13885
13886 :
13887 else
13888 cf_pkgconfig_incs=
13889 cf_pkgconfig_libs=
13890 { echo "$as_me:13890: WARNING: unable to find SM library" >&5
13891 echo "$as_me: WARNING: unable to find SM library" >&2;}
13892 fi
13893
13894 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
13895 test -n "$verbose" && echo " found package xt" 1>&6
13896
13897 echo "${as_me:-configure}:13897: testing found package xt ..." 1>&5
13898
13899 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
13900 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
13901 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13902
13903 echo "${as_me:-configure}:13903: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13904
13905 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
13906
13907 echo "${as_me:-configure}:13907: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13908
13909 cf_fix_cppflags=no
13910 cf_new_cflags=
13911 cf_new_cppflags=
13912 cf_new_extra_cppflags=
13913
13914 for cf_add_cflags in $cf_pkgconfig_incs
13915 do
13916 case "$cf_fix_cppflags" in
13917 (no)
13918 case "$cf_add_cflags" in
13919 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13920 case "$cf_add_cflags" in
13921 (-D*)
13922 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13923
13924 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13925 && test -z "${cf_tst_cflags}" \
13926 && cf_fix_cppflags=yes
13927
13928 if test "$cf_fix_cppflags" = yes ; then
13929
13930 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13931 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13932
13933 continue
13934 elif test "${cf_tst_cflags}" = "\"'" ; then
13935
13936 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13937 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13938
13939 continue
13940 fi
13941 ;;
13942 esac
13943 case "$CPPFLAGS" in
13944 (*$cf_add_cflags)
13945 ;;
13946 (*)
13947 case "$cf_add_cflags" in
13948 (-D*)
13949 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13950
13951 CPPFLAGS=`echo "$CPPFLAGS" | \
13952 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13953 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13954
13955 ;;
13956 esac
13957
13958 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13959 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13960
13961 ;;
13962 esac
13963 ;;
13964 (*)
13965
13966 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13967 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13968
13969 ;;
13970 esac
13971 ;;
13972 (yes)
13973
13974 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13975 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13976
13977 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13978
13979 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13980 && test -z "${cf_tst_cflags}" \
13981 && cf_fix_cppflags=no
13982 ;;
13983 esac
13984 done
13985
13986 if test -n "$cf_new_cflags" ; then
13987
13988 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13989 CFLAGS="${CFLAGS}$cf_new_cflags"
13990
13991 fi
13992
13993 if test -n "$cf_new_cppflags" ; then
13994
13995 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13996 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13997
13998 fi
13999
14000 if test -n "$cf_new_extra_cppflags" ; then
14001
14002 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14003 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14004
14005 fi
14006
14007 cf_add_libs="$LIBS"
14008 # reverse order
14009 cf_add_0lib=
14010 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14011 # filter duplicates
14012 for cf_add_1lib in $cf_add_0lib; do
14013 for cf_add_2lib in $cf_add_libs; do
14014 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14015 cf_add_1lib=
14016 break
14017 fi
14018 done
14019 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14020 done
14021 LIBS="$cf_add_libs"
14022
14023 :
14024 else
14025 cf_pkgconfig_incs=
14026 cf_pkgconfig_libs=
14027 { echo "$as_me:14027: WARNING: unable to find Xt library" >&5
14028 echo "$as_me: WARNING: unable to find Xt library" >&2;}
14029 fi
14030
14031 else
14032 LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
14033 fi
14034
14035 cf_have_X_LIBS=no
14036
14037 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
14038 test -n "$verbose" && echo " found package xt" 1>&6
14039
14040 echo "${as_me:-configure}:14040: testing found package xt ..." 1>&5
14041
14042 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
14043 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
14044 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
14045
14046 echo "${as_me:-configure}:14046: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14047
14048 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
14049
14050 echo "${as_me:-configure}:14050: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
14051
14052 cf_fix_cppflags=no
14053 cf_new_cflags=
14054 cf_new_cppflags=
14055 cf_new_extra_cppflags=
14056
14057 for cf_add_cflags in $cf_pkgconfig_incs
14058 do
14059 case "$cf_fix_cppflags" in
14060 (no)
14061 case "$cf_add_cflags" in
14062 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14063 case "$cf_add_cflags" in
14064 (-D*)
14065 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14066
14067 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14068 && test -z "${cf_tst_cflags}" \
14069 && cf_fix_cppflags=yes
14070
14071 if test "$cf_fix_cppflags" = yes ; then
14072
14073 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14074 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14075
14076 continue
14077 elif test "${cf_tst_cflags}" = "\"'" ; then
14078
14079 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14080 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14081
14082 continue
14083 fi
14084 ;;
14085 esac
14086 case "$CPPFLAGS" in
14087 (*$cf_add_cflags)
14088 ;;
14089 (*)
14090 case "$cf_add_cflags" in
14091 (-D*)
14092 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14093
14094 CPPFLAGS=`echo "$CPPFLAGS" | \
14095 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14096 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14097
14098 ;;
14099 esac
14100
14101 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14102 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14103
14104 ;;
14105 esac
14106 ;;
14107 (*)
14108
14109 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14110 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14111
14112 ;;
14113 esac
14114 ;;
14115 (yes)
14116
14117 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14118 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14119
14120 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14121
14122 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14123 && test -z "${cf_tst_cflags}" \
14124 && cf_fix_cppflags=no
14125 ;;
14126 esac
14127 done
14128
14129 if test -n "$cf_new_cflags" ; then
14130
14131 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14132 CFLAGS="${CFLAGS}$cf_new_cflags"
14133
14134 fi
14135
14136 if test -n "$cf_new_cppflags" ; then
14137
14138 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14139 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14140
14141 fi
14142
14143 if test -n "$cf_new_extra_cppflags" ; then
14144
14145 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14146 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14147
14148 fi
14149
14150 cf_add_libs="$LIBS"
14151 # reverse order
14152 cf_add_0lib=
14153 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14154 # filter duplicates
14155 for cf_add_1lib in $cf_add_0lib; do
14156 for cf_add_2lib in $cf_add_libs; do
14157 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14158 cf_add_1lib=
14159 break
14160 fi
14161 done
14162 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14163 done
14164 LIBS="$cf_add_libs"
14165
14166 case "x$LIBS" in
14167 (*-lX11*)
14168 ;;
14169 (*)
14170 # we have an "xt" package, but it may omit Xt's dependency on X11
14171 echo "$as_me:14171: checking for usable X dependency" >&5
14172 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
14173 if test "${cf_cv_xt_x11_compat+set}" = set; then
14174 echo $ECHO_N "(cached) $ECHO_C" >&6
14175 else
14176
14177 cat >"conftest.$ac_ext" <<_ACEOF
14178 #line 14178 "configure"
14179 #include "confdefs.h"
14180
14181 $ac_includes_default
14182 #include <X11/Xlib.h>
14183
14184 int
14185 main (void)
14186 {
14187
14188 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
14189 int rc2 = XClearWindow((Display*) 0, (Window) 0);
14190 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
14191 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
14192
14193 ;
14194 return 0;
14195 }
14196 _ACEOF
14197 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14198 if { (eval echo "$as_me:14198: \"$ac_link\"") >&5
14199 (eval $ac_link) 2>&5
14200 ac_status=$?
14201 echo "$as_me:14201: \$? = $ac_status" >&5
14202 (exit "$ac_status"); } &&
14203 { ac_try='test -s "conftest$ac_exeext"'
14204 { (eval echo "$as_me:14204: \"$ac_try\"") >&5
14205 (eval $ac_try) 2>&5
14206 ac_status=$?
14207 echo "$as_me:14207: \$? = $ac_status" >&5
14208 (exit "$ac_status"); }; }; then
14209 cf_cv_xt_x11_compat=yes
14210 else
14211 echo "$as_me: failed program was:" >&5
14212 cat "conftest.$ac_ext" >&5
14213 cf_cv_xt_x11_compat=no
14214 fi
14215 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14216 fi
14217 echo "$as_me:14217: result: $cf_cv_xt_x11_compat" >&5
14218 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
14219 if test "$cf_cv_xt_x11_compat" = no
14220 then
14221 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
14222
14223 echo "${as_me:-configure}:14223: testing work around broken X11 dependency ..." 1>&5
14224
14225 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
14226
14227 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
14228 test -n "$verbose" && echo " found package x11" 1>&6
14229
14230 echo "${as_me:-configure}:14230: testing found package x11 ..." 1>&5
14231
14232 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
14233 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
14234 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
14235
14236 echo "${as_me:-configure}:14236: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14237
14238 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
14239
14240 echo "${as_me:-configure}:14240: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
14241
14242 cf_fix_cppflags=no
14243 cf_new_cflags=
14244 cf_new_cppflags=
14245 cf_new_extra_cppflags=
14246
14247 for cf_add_cflags in $cf_pkgconfig_incs
14248 do
14249 case "$cf_fix_cppflags" in
14250 (no)
14251 case "$cf_add_cflags" in
14252 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14253 case "$cf_add_cflags" in
14254 (-D*)
14255 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14256
14257 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14258 && test -z "${cf_tst_cflags}" \
14259 && cf_fix_cppflags=yes
14260
14261 if test "$cf_fix_cppflags" = yes ; then
14262
14263 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14264 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14265
14266 continue
14267 elif test "${cf_tst_cflags}" = "\"'" ; then
14268
14269 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14270 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14271
14272 continue
14273 fi
14274 ;;
14275 esac
14276 case "$CPPFLAGS" in
14277 (*$cf_add_cflags)
14278 ;;
14279 (*)
14280 case "$cf_add_cflags" in
14281 (-D*)
14282 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14283
14284 CPPFLAGS=`echo "$CPPFLAGS" | \
14285 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14286 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14287
14288 ;;
14289 esac
14290
14291 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14292 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14293
14294 ;;
14295 esac
14296 ;;
14297 (*)
14298
14299 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14300 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14301
14302 ;;
14303 esac
14304 ;;
14305 (yes)
14306
14307 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14308 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14309
14310 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14311
14312 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14313 && test -z "${cf_tst_cflags}" \
14314 && cf_fix_cppflags=no
14315 ;;
14316 esac
14317 done
14318
14319 if test -n "$cf_new_cflags" ; then
14320
14321 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14322 CFLAGS="${CFLAGS}$cf_new_cflags"
14323
14324 fi
14325
14326 if test -n "$cf_new_cppflags" ; then
14327
14328 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14329 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14330
14331 fi
14332
14333 if test -n "$cf_new_extra_cppflags" ; then
14334
14335 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14336 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14337
14338 fi
14339
14340 cf_add_libs="$LIBS"
14341 # reverse order
14342 cf_add_0lib=
14343 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14344 # filter duplicates
14345 for cf_add_1lib in $cf_add_0lib; do
14346 for cf_add_2lib in $cf_add_libs; do
14347 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14348 cf_add_1lib=
14349 break
14350 fi
14351 done
14352 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14353 done
14354 LIBS="$cf_add_libs"
14355
14356 :
14357 else
14358 cf_pkgconfig_incs=
14359 cf_pkgconfig_libs=
14360
14361 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14362
14363 echo "${as_me:-configure}:14363: testing ...before $LIBS ..." 1>&5
14364
14365 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
14366 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14367
14368 echo "${as_me:-configure}:14368: testing ...after $LIBS ..." 1>&5
14369
14370 fi
14371
14372 fi
14373 ;;
14374 esac
14375
14376 echo "$as_me:14376: checking for usable X Toolkit package" >&5
14377 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
14378 if test "${cf_cv_xt_ice_compat+set}" = set; then
14379 echo $ECHO_N "(cached) $ECHO_C" >&6
14380 else
14381
14382 cat >"conftest.$ac_ext" <<_ACEOF
14383 #line 14383 "configure"
14384 #include "confdefs.h"
14385
14386 $ac_includes_default
14387 #include <X11/Shell.h>
14388
14389 int
14390 main (void)
14391 {
14392 int num = IceConnectionNumber(0); (void) num
14393
14394 ;
14395 return 0;
14396 }
14397 _ACEOF
14398 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14399 if { (eval echo "$as_me:14399: \"$ac_link\"") >&5
14400 (eval $ac_link) 2>&5
14401 ac_status=$?
14402 echo "$as_me:14402: \$? = $ac_status" >&5
14403 (exit "$ac_status"); } &&
14404 { ac_try='test -s "conftest$ac_exeext"'
14405 { (eval echo "$as_me:14405: \"$ac_try\"") >&5
14406 (eval $ac_try) 2>&5
14407 ac_status=$?
14408 echo "$as_me:14408: \$? = $ac_status" >&5
14409 (exit "$ac_status"); }; }; then
14410 cf_cv_xt_ice_compat=yes
14411 else
14412 echo "$as_me: failed program was:" >&5
14413 cat "conftest.$ac_ext" >&5
14414 cf_cv_xt_ice_compat=no
14415 fi
14416 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14417 fi
14418 echo "$as_me:14418: result: $cf_cv_xt_ice_compat" >&5
14419 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
14420
14421 if test "$cf_cv_xt_ice_compat" = no
14422 then
14423 # workaround for broken ".pc" files used for X Toolkit.
14424 case "x$X_PRE_LIBS" in
14425 (*-lICE*)
14426 case "x$LIBS" in
14427 (*-lICE*)
14428 ;;
14429 (*)
14430 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
14431
14432 echo "${as_me:-configure}:14432: testing work around broken ICE dependency ..." 1>&5
14433
14434 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
14435 test -n "$verbose" && echo " found package ice" 1>&6
14436
14437 echo "${as_me:-configure}:14437: testing found package ice ..." 1>&5
14438
14439 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
14440 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
14441 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
14442
14443 echo "${as_me:-configure}:14443: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14444
14445 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
14446
14447 echo "${as_me:-configure}:14447: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
14448
14449 cf_fix_cppflags=no
14450 cf_new_cflags=
14451 cf_new_cppflags=
14452 cf_new_extra_cppflags=
14453
14454 for cf_add_cflags in $cf_pkgconfig_incs
14455 do
14456 case "$cf_fix_cppflags" in
14457 (no)
14458 case "$cf_add_cflags" in
14459 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14460 case "$cf_add_cflags" in
14461 (-D*)
14462 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14463
14464 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14465 && test -z "${cf_tst_cflags}" \
14466 && cf_fix_cppflags=yes
14467
14468 if test "$cf_fix_cppflags" = yes ; then
14469
14470 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14471 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14472
14473 continue
14474 elif test "${cf_tst_cflags}" = "\"'" ; then
14475
14476 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14477 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14478
14479 continue
14480 fi
14481 ;;
14482 esac
14483 case "$CPPFLAGS" in
14484 (*$cf_add_cflags)
14485 ;;
14486 (*)
14487 case "$cf_add_cflags" in
14488 (-D*)
14489 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14490
14491 CPPFLAGS=`echo "$CPPFLAGS" | \
14492 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14493 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14494
14495 ;;
14496 esac
14497
14498 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14499 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14500
14501 ;;
14502 esac
14503 ;;
14504 (*)
14505
14506 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14507 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14508
14509 ;;
14510 esac
14511 ;;
14512 (yes)
14513
14514 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14515 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14516
14517 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14518
14519 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14520 && test -z "${cf_tst_cflags}" \
14521 && cf_fix_cppflags=no
14522 ;;
14523 esac
14524 done
14525
14526 if test -n "$cf_new_cflags" ; then
14527
14528 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14529 CFLAGS="${CFLAGS}$cf_new_cflags"
14530
14531 fi
14532
14533 if test -n "$cf_new_cppflags" ; then
14534
14535 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14536 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14537
14538 fi
14539
14540 if test -n "$cf_new_extra_cppflags" ; then
14541
14542 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14543 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14544
14545 fi
14546
14547 cf_add_libs="$LIBS"
14548 # reverse order
14549 cf_add_0lib=
14550 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14551 # filter duplicates
14552 for cf_add_1lib in $cf_add_0lib; do
14553 for cf_add_2lib in $cf_add_libs; do
14554 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14555 cf_add_1lib=
14556 break
14557 fi
14558 done
14559 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14560 done
14561 LIBS="$cf_add_libs"
14562
14563 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
14564 test -n "$verbose" && echo " found package sm" 1>&6
14565
14566 echo "${as_me:-configure}:14566: testing found package sm ..." 1>&5
14567
14568 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
14569 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
14570 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
14571
14572 echo "${as_me:-configure}:14572: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14573
14574 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
14575
14576 echo "${as_me:-configure}:14576: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
14577
14578 cf_fix_cppflags=no
14579 cf_new_cflags=
14580 cf_new_cppflags=
14581 cf_new_extra_cppflags=
14582
14583 for cf_add_cflags in $cf_pkgconfig_incs
14584 do
14585 case "$cf_fix_cppflags" in
14586 (no)
14587 case "$cf_add_cflags" in
14588 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14589 case "$cf_add_cflags" in
14590 (-D*)
14591 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14592
14593 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14594 && test -z "${cf_tst_cflags}" \
14595 && cf_fix_cppflags=yes
14596
14597 if test "$cf_fix_cppflags" = yes ; then
14598
14599 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14600 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14601
14602 continue
14603 elif test "${cf_tst_cflags}" = "\"'" ; then
14604
14605 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14606 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14607
14608 continue
14609 fi
14610 ;;
14611 esac
14612 case "$CPPFLAGS" in
14613 (*$cf_add_cflags)
14614 ;;
14615 (*)
14616 case "$cf_add_cflags" in
14617 (-D*)
14618 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14619
14620 CPPFLAGS=`echo "$CPPFLAGS" | \
14621 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14622 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14623
14624 ;;
14625 esac
14626
14627 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14628 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14629
14630 ;;
14631 esac
14632 ;;
14633 (*)
14634
14635 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14636 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14637
14638 ;;
14639 esac
14640 ;;
14641 (yes)
14642
14643 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14644 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14645
14646 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14647
14648 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14649 && test -z "${cf_tst_cflags}" \
14650 && cf_fix_cppflags=no
14651 ;;
14652 esac
14653 done
14654
14655 if test -n "$cf_new_cflags" ; then
14656
14657 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14658 CFLAGS="${CFLAGS}$cf_new_cflags"
14659
14660 fi
14661
14662 if test -n "$cf_new_cppflags" ; then
14663
14664 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14665 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14666
14667 fi
14668
14669 if test -n "$cf_new_extra_cppflags" ; then
14670
14671 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14672 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14673
14674 fi
14675
14676 cf_add_libs="$LIBS"
14677 # reverse order
14678 cf_add_0lib=
14679 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14680 # filter duplicates
14681 for cf_add_1lib in $cf_add_0lib; do
14682 for cf_add_2lib in $cf_add_libs; do
14683 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14684 cf_add_1lib=
14685 break
14686 fi
14687 done
14688 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14689 done
14690 LIBS="$cf_add_libs"
14691
14692 :
14693 else
14694 cf_pkgconfig_incs=
14695 cf_pkgconfig_libs=
14696 :
14697 fi
14698
14699 else
14700 cf_pkgconfig_incs=
14701 cf_pkgconfig_libs=
14702
14703 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14704
14705 echo "${as_me:-configure}:14705: testing ...before $LIBS ..." 1>&5
14706
14707 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
14708 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14709
14710 echo "${as_me:-configure}:14710: testing ...after $LIBS ..." 1>&5
14711
14712 fi
14713
14714 ;;
14715 esac
14716 ;;
14717 esac
14718 fi
14719
14720 cf_have_X_LIBS=yes
14721
14722 else
14723 cf_pkgconfig_incs=
14724 cf_pkgconfig_libs=
14725
14726 LDFLAGS="$X_LIBS $LDFLAGS"
14727
14728 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
14729
14730 echo "${as_me:-configure}:14730: testing checking additions to CFLAGS ..." 1>&5
14731
14732 cf_check_cflags="$CFLAGS"
14733 cf_check_cppflags="$CPPFLAGS"
14734
14735 cf_fix_cppflags=no
14736 cf_new_cflags=
14737 cf_new_cppflags=
14738 cf_new_extra_cppflags=
14739
14740 for cf_add_cflags in $X_CFLAGS
14741 do
14742 case "$cf_fix_cppflags" in
14743 (no)
14744 case "$cf_add_cflags" in
14745 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14746 case "$cf_add_cflags" in
14747 (-D*)
14748 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14749
14750 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14751 && test -z "${cf_tst_cflags}" \
14752 && cf_fix_cppflags=yes
14753
14754 if test "$cf_fix_cppflags" = yes ; then
14755
14756 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14757 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14758
14759 continue
14760 elif test "${cf_tst_cflags}" = "\"'" ; then
14761
14762 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14763 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14764
14765 continue
14766 fi
14767 ;;
14768 esac
14769 case "$CPPFLAGS" in
14770 (*$cf_add_cflags)
14771 ;;
14772 (*)
14773 case "$cf_add_cflags" in
14774 (-D*)
14775 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14776
14777 CPPFLAGS=`echo "$CPPFLAGS" | \
14778 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14779 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14780
14781 ;;
14782 esac
14783
14784 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14785 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14786
14787 ;;
14788 esac
14789 ;;
14790 (*)
14791
14792 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14793 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14794
14795 ;;
14796 esac
14797 ;;
14798 (yes)
14799
14800 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14801 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14802
14803 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14804
14805 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14806 && test -z "${cf_tst_cflags}" \
14807 && cf_fix_cppflags=no
14808 ;;
14809 esac
14810 done
14811
14812 if test -n "$cf_new_cflags" ; then
14813 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
14814
14815 echo "${as_me:-configure}:14815: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
14816
14817 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14818 CFLAGS="${CFLAGS}$cf_new_cflags"
14819
14820 fi
14821
14822 if test -n "$cf_new_cppflags" ; then
14823 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
14824
14825 echo "${as_me:-configure}:14825: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
14826
14827 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14828 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14829
14830 fi
14831
14832 if test -n "$cf_new_extra_cppflags" ; then
14833 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
14834
14835 echo "${as_me:-configure}:14835: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
14836
14837 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14838 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14839
14840 fi
14841
14842 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
14843 cat >"conftest.$ac_ext" <<_ACEOF
14844 #line 14844 "configure"
14845 #include "confdefs.h"
14846 #include <stdio.h>
14847 int
14848 main (void)
14849 {
14850 printf("Hello world");
14851 ;
14852 return 0;
14853 }
14854 _ACEOF
14855 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14856 if { (eval echo "$as_me:14856: \"$ac_link\"") >&5
14857 (eval $ac_link) 2>&5
14858 ac_status=$?
14859 echo "$as_me:14859: \$? = $ac_status" >&5
14860 (exit "$ac_status"); } &&
14861 { ac_try='test -s "conftest$ac_exeext"'
14862 { (eval echo "$as_me:14862: \"$ac_try\"") >&5
14863 (eval $ac_try) 2>&5
14864 ac_status=$?
14865 echo "$as_me:14865: \$? = $ac_status" >&5
14866 (exit "$ac_status"); }; }; then
14867 :
14868 else
14869 echo "$as_me: failed program was:" >&5
14870 cat "conftest.$ac_ext" >&5
14871 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
14872
14873 echo "${as_me:-configure}:14873: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
14874
14875 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
14876 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
14877
14878 echo "${as_me:-configure}:14878: testing but keeping change to \$CPPFLAGS ..." 1>&5
14879
14880 fi
14881 CFLAGS="$cf_check_cflags"
14882 fi
14883 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14884 fi
14885
14886 echo "$as_me:14886: checking for XOpenDisplay" >&5
14887 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
14888 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
14889 echo $ECHO_N "(cached) $ECHO_C" >&6
14890 else
14891 cat >"conftest.$ac_ext" <<_ACEOF
14892 #line 14892 "configure"
14893 #include "confdefs.h"
14894 #define XOpenDisplay autoconf_temporary
14895 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14896 #undef XOpenDisplay
14897
14898 #ifdef __cplusplus
14899 extern "C"
14900 #endif
14901
14902 /* We use char because int might match the return type of a gcc2
14903 builtin and then its argument prototype would still apply. */
14904 char XOpenDisplay (void);
14905
14906 int
14907 main (void)
14908 {
14909
14910 /* The GNU C library defines stubs for functions which it implements
14911 to always fail with ENOSYS. Some functions are actually named
14912 something starting with __ and the normal name is an alias. */
14913 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
14914 #error found stub for XOpenDisplay
14915 #endif
14916
14917 return XOpenDisplay ();
14918 ;
14919 return 0;
14920 }
14921 _ACEOF
14922 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14923 if { (eval echo "$as_me:14923: \"$ac_link\"") >&5
14924 (eval $ac_link) 2>&5
14925 ac_status=$?
14926 echo "$as_me:14926: \$? = $ac_status" >&5
14927 (exit "$ac_status"); } &&
14928 { ac_try='test -s "conftest$ac_exeext"'
14929 { (eval echo "$as_me:14929: \"$ac_try\"") >&5
14930 (eval $ac_try) 2>&5
14931 ac_status=$?
14932 echo "$as_me:14932: \$? = $ac_status" >&5
14933 (exit "$ac_status"); }; }; then
14934 ac_cv_func_XOpenDisplay=yes
14935 else
14936 echo "$as_me: failed program was:" >&5
14937 cat "conftest.$ac_ext" >&5
14938 ac_cv_func_XOpenDisplay=no
14939 fi
14940 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14941 fi
14942 echo "$as_me:14942: result: $ac_cv_func_XOpenDisplay" >&5
14943 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
14944 if test "$ac_cv_func_XOpenDisplay" = yes; then
14945 :
14946 else
14947
14948 echo "$as_me:14948: checking for XOpenDisplay in -lX11" >&5
14949 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
14950 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
14951 echo $ECHO_N "(cached) $ECHO_C" >&6
14952 else
14953 ac_check_lib_save_LIBS=$LIBS
14954 LIBS="-lX11 $LIBS"
14955 cat >"conftest.$ac_ext" <<_ACEOF
14956 #line 14956 "configure"
14957 #include "confdefs.h"
14958
14959 /* Override any gcc2 internal prototype to avoid an error. */
14960 #ifdef __cplusplus
14961 extern "C"
14962 #endif
14963 /* We use char because int might match the return type of a gcc2
14964 builtin and then its argument prototype would still apply. */
14965 char XOpenDisplay ();
14966 int
14967 main (void)
14968 {
14969 XOpenDisplay ();
14970 ;
14971 return 0;
14972 }
14973 _ACEOF
14974 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14975 if { (eval echo "$as_me:14975: \"$ac_link\"") >&5
14976 (eval $ac_link) 2>&5
14977 ac_status=$?
14978 echo "$as_me:14978: \$? = $ac_status" >&5
14979 (exit "$ac_status"); } &&
14980 { ac_try='test -s "conftest$ac_exeext"'
14981 { (eval echo "$as_me:14981: \"$ac_try\"") >&5
14982 (eval $ac_try) 2>&5
14983 ac_status=$?
14984 echo "$as_me:14984: \$? = $ac_status" >&5
14985 (exit "$ac_status"); }; }; then
14986 ac_cv_lib_X11_XOpenDisplay=yes
14987 else
14988 echo "$as_me: failed program was:" >&5
14989 cat "conftest.$ac_ext" >&5
14990 ac_cv_lib_X11_XOpenDisplay=no
14991 fi
14992 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14993 LIBS=$ac_check_lib_save_LIBS
14994 fi
14995 echo "$as_me:14995: result: $ac_cv_lib_X11_XOpenDisplay" >&5
14996 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
14997 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
14998
14999 cf_add_libs="$LIBS"
15000 # reverse order
15001 cf_add_0lib=
15002 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15003 # filter duplicates
15004 for cf_add_1lib in $cf_add_0lib; do
15005 for cf_add_2lib in $cf_add_libs; do
15006 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15007 cf_add_1lib=
15008 break
15009 fi
15010 done
15011 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15012 done
15013 LIBS="$cf_add_libs"
15014
15015 fi
15016
15017 fi
15018
15019 echo "$as_me:15019: checking for XtAppInitialize" >&5
15020 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
15021 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
15022 echo $ECHO_N "(cached) $ECHO_C" >&6
15023 else
15024 cat >"conftest.$ac_ext" <<_ACEOF
15025 #line 15025 "configure"
15026 #include "confdefs.h"
15027 #define XtAppInitialize autoconf_temporary
15028 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15029 #undef XtAppInitialize
15030
15031 #ifdef __cplusplus
15032 extern "C"
15033 #endif
15034
15035 /* We use char because int might match the return type of a gcc2
15036 builtin and then its argument prototype would still apply. */
15037 char XtAppInitialize (void);
15038
15039 int
15040 main (void)
15041 {
15042
15043 /* The GNU C library defines stubs for functions which it implements
15044 to always fail with ENOSYS. Some functions are actually named
15045 something starting with __ and the normal name is an alias. */
15046 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
15047 #error found stub for XtAppInitialize
15048 #endif
15049
15050 return XtAppInitialize ();
15051 ;
15052 return 0;
15053 }
15054 _ACEOF
15055 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15056 if { (eval echo "$as_me:15056: \"$ac_link\"") >&5
15057 (eval $ac_link) 2>&5
15058 ac_status=$?
15059 echo "$as_me:15059: \$? = $ac_status" >&5
15060 (exit "$ac_status"); } &&
15061 { ac_try='test -s "conftest$ac_exeext"'
15062 { (eval echo "$as_me:15062: \"$ac_try\"") >&5
15063 (eval $ac_try) 2>&5
15064 ac_status=$?
15065 echo "$as_me:15065: \$? = $ac_status" >&5
15066 (exit "$ac_status"); }; }; then
15067 ac_cv_func_XtAppInitialize=yes
15068 else
15069 echo "$as_me: failed program was:" >&5
15070 cat "conftest.$ac_ext" >&5
15071 ac_cv_func_XtAppInitialize=no
15072 fi
15073 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15074 fi
15075 echo "$as_me:15075: result: $ac_cv_func_XtAppInitialize" >&5
15076 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
15077 if test "$ac_cv_func_XtAppInitialize" = yes; then
15078 :
15079 else
15080
15081 echo "$as_me:15081: checking for XtAppInitialize in -lXt" >&5
15082 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
15083 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
15084 echo $ECHO_N "(cached) $ECHO_C" >&6
15085 else
15086 ac_check_lib_save_LIBS=$LIBS
15087 LIBS="-lXt $LIBS"
15088 cat >"conftest.$ac_ext" <<_ACEOF
15089 #line 15089 "configure"
15090 #include "confdefs.h"
15091
15092 /* Override any gcc2 internal prototype to avoid an error. */
15093 #ifdef __cplusplus
15094 extern "C"
15095 #endif
15096 /* We use char because int might match the return type of a gcc2
15097 builtin and then its argument prototype would still apply. */
15098 char XtAppInitialize ();
15099 int
15100 main (void)
15101 {
15102 XtAppInitialize ();
15103 ;
15104 return 0;
15105 }
15106 _ACEOF
15107 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15108 if { (eval echo "$as_me:15108: \"$ac_link\"") >&5
15109 (eval $ac_link) 2>&5
15110 ac_status=$?
15111 echo "$as_me:15111: \$? = $ac_status" >&5
15112 (exit "$ac_status"); } &&
15113 { ac_try='test -s "conftest$ac_exeext"'
15114 { (eval echo "$as_me:15114: \"$ac_try\"") >&5
15115 (eval $ac_try) 2>&5
15116 ac_status=$?
15117 echo "$as_me:15117: \$? = $ac_status" >&5
15118 (exit "$ac_status"); }; }; then
15119 ac_cv_lib_Xt_XtAppInitialize=yes
15120 else
15121 echo "$as_me: failed program was:" >&5
15122 cat "conftest.$ac_ext" >&5
15123 ac_cv_lib_Xt_XtAppInitialize=no
15124 fi
15125 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15126 LIBS=$ac_check_lib_save_LIBS
15127 fi
15128 echo "$as_me:15128: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
15129 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
15130 if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
15131
15132 cat >>confdefs.h <<\EOF
15133 #define HAVE_LIBXT 1
15134 EOF
15135
15136 cf_have_X_LIBS=Xt
15137 LIBS="-lXt $LIBS"
15138 fi
15139
15140 fi
15141
15142 fi
15143
15144 if test "$cf_have_X_LIBS" = no ; then
15145 { echo "$as_me:15145: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15146 test program. You will have to check and add the proper libraries by hand
15147 to makefile." >&5
15148 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15149 test program. You will have to check and add the proper libraries by hand
15150 to makefile." >&2;}
15151 fi
15152
15153 cf_x_athena_root=$cf_x_athena
15154 cf_x_athena_inc=""
15155
15156 for cf_path in default \
15157 /usr/contrib/X11R6 \
15158 /usr/contrib/X11R5 \
15159 /usr/lib/X11R5 \
15160 /usr/local
15161 do
15162 if test -z "$cf_x_athena_inc" ; then
15163
15164 cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
15165 cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
15166 cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
15167 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15168 for cf_X_CFLAGS in $X_CFLAGS
15169 do
15170 case "x$cf_X_CFLAGS" in
15171 x-[IUD]*)
15172 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15173 ;;
15174 *)
15175 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15176 ;;
15177 esac
15178 done
15179
15180 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
15181 if test "$cf_path" != default ; then
15182
15183 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15184 CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
15185
15186 echo "$as_me:15186: checking for $cf_test in $cf_path" >&5
15187 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
15188 else
15189 echo "$as_me:15189: checking for $cf_test" >&5
15190 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
15191 fi
15192 cat >"conftest.$ac_ext" <<_ACEOF
15193 #line 15193 "configure"
15194 #include "confdefs.h"
15195
15196 #include <X11/Intrinsic.h>
15197 #include <$cf_test>
15198 int
15199 main (void)
15200 {
15201
15202 ;
15203 return 0;
15204 }
15205 _ACEOF
15206 rm -f "conftest.$ac_objext"
15207 if { (eval echo "$as_me:15207: \"$ac_compile\"") >&5
15208 (eval $ac_compile) 2>&5
15209 ac_status=$?
15210 echo "$as_me:15210: \$? = $ac_status" >&5
15211 (exit "$ac_status"); } &&
15212 { ac_try='test -s "conftest.$ac_objext"'
15213 { (eval echo "$as_me:15213: \"$ac_try\"") >&5
15214 (eval $ac_try) 2>&5
15215 ac_status=$?
15216 echo "$as_me:15216: \$? = $ac_status" >&5
15217 (exit "$ac_status"); }; }; then
15218 cf_result=yes
15219 else
15220 echo "$as_me: failed program was:" >&5
15221 cat "conftest.$ac_ext" >&5
15222 cf_result=no
15223 fi
15224 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15225 echo "$as_me:15225: result: $cf_result" >&5
15226 echo "${ECHO_T}$cf_result" >&6
15227
15228 LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
15229 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
15230 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
15231
15232 if test "$cf_result" = yes ; then
15233 test "$cf_path" = default && cf_x_athena_inc=default
15234 test "$cf_path" != default && cf_x_athena_inc="$cf_path/include"
15235 break
15236 fi
15237 fi
15238 done
15239
15240 if test -z "$cf_x_athena_inc" ; then
15241 { echo "$as_me:15241: WARNING: Unable to find Athena header files" >&5
15242 echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
15243 elif test "$cf_x_athena_inc" != default ; then
15244
15245 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15246 CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
15247
15248 fi
15249
15250 cf_x_athena_root=$cf_x_athena
15251 cf_x_athena_lib=""
15252
15253 for cf_path in default \
15254 /usr/contrib/X11R6 \
15255 /usr/contrib/X11R5 \
15256 /usr/lib/X11R5 \
15257 /usr/local
15258 do
15259 for cf_lib in \
15260 ${cf_x_athena_root} \
15261 ${cf_x_athena_root}7 \
15262 ${cf_x_athena_root}6
15263 do
15264 for cf_libs in \
15265 "-l$cf_lib -lXmu" \
15266 "-l$cf_lib -lXpm -lXmu" \
15267 "-l${cf_lib}_s -lXmu_s"
15268 do
15269 test -n "$cf_x_athena_lib" && break
15270
15271 cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
15272 cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
15273 cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
15274 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15275 for cf_X_CFLAGS in $X_CFLAGS
15276 do
15277 case "x$cf_X_CFLAGS" in
15278 x-[IUD]*)
15279 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15280 ;;
15281 *)
15282 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15283 ;;
15284 esac
15285 done
15286
15287 cf_test=XawSimpleMenuAddGlobalActions
15288 test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
15289
15290 cf_add_libs="$LIBS"
15291 # reverse order
15292 cf_add_0lib=
15293 for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15294 # filter duplicates
15295 for cf_add_1lib in $cf_add_0lib; do
15296 for cf_add_2lib in $cf_add_libs; do
15297 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15298 cf_add_1lib=
15299 break
15300 fi
15301 done
15302 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15303 done
15304 LIBS="$cf_add_libs"
15305
15306 echo "$as_me:15306: checking for $cf_test in $cf_libs" >&5
15307 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
15308 cat >"conftest.$ac_ext" <<_ACEOF
15309 #line 15309 "configure"
15310 #include "confdefs.h"
15311
15312 $ac_includes_default
15313 #include <X11/Intrinsic.h>
15314 #include <X11/$cf_x_athena_root/SimpleMenu.h>
15315
15316 int
15317 main (void)
15318 {
15319
15320 $cf_test((XtAppContext) 0)
15321 ;
15322 return 0;
15323 }
15324 _ACEOF
15325 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15326 if { (eval echo "$as_me:15326: \"$ac_link\"") >&5
15327 (eval $ac_link) 2>&5
15328 ac_status=$?
15329 echo "$as_me:15329: \$? = $ac_status" >&5
15330 (exit "$ac_status"); } &&
15331 { ac_try='test -s "conftest$ac_exeext"'
15332 { (eval echo "$as_me:15332: \"$ac_try\"") >&5
15333 (eval $ac_try) 2>&5
15334 ac_status=$?
15335 echo "$as_me:15335: \$? = $ac_status" >&5
15336 (exit "$ac_status"); }; }; then
15337 cf_result=yes
15338 else
15339 echo "$as_me: failed program was:" >&5
15340 cat "conftest.$ac_ext" >&5
15341 cf_result=no
15342 fi
15343 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15344 echo "$as_me:15344: result: $cf_result" >&5
15345 echo "${ECHO_T}$cf_result" >&6
15346
15347 LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
15348 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
15349 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
15350
15351 if test "$cf_result" = yes ; then
15352 cf_x_athena_lib="$cf_libs"
15353 break
15354 fi
15355 done # cf_libs
15356 test -n "$cf_x_athena_lib" && break
15357 done # cf_lib
15358 done
15359
15360 if test -z "$cf_x_athena_lib" ; then
15361 { { echo "$as_me:15361: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
15362 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
15363 { (exit 1); exit 1; }; }
15364 fi
15365
15366 cf_add_libs="$LIBS"
15367 # reverse order
15368 cf_add_0lib=
15369 for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15370 # filter duplicates
15371 for cf_add_1lib in $cf_add_0lib; do
15372 for cf_add_2lib in $cf_add_libs; do
15373 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15374 cf_add_1lib=
15375 break
15376 fi
15377 done
15378 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15379 done
15380 LIBS="$cf_add_libs"
15381
15382 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15383
15384 cat >>confdefs.h <<EOF
15385 #define $cf_x_athena_LIBS 1
15386 EOF
15387
15388 fi
15389
15390 for ac_header in X11/Xpoll.h
15391 do
15392 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15393 echo "$as_me:15393: checking for $ac_header" >&5
15394 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15395 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15396 echo $ECHO_N "(cached) $ECHO_C" >&6
15397 else
15398 cat >"conftest.$ac_ext" <<_ACEOF
15399 #line 15399 "configure"
15400 #include "confdefs.h"
15401 #include <$ac_header>
15402 _ACEOF
15403 if { (eval echo "$as_me:15403: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15404 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15405 ac_status=$?
15406 $EGREP -v '^ *\+' conftest.er1 >conftest.err
15407 rm -f conftest.er1
15408 cat conftest.err >&5
15409 echo "$as_me:15409: \$? = $ac_status" >&5
15410 (exit "$ac_status"); } >/dev/null; then
15411 if test -s conftest.err; then
15412 ac_cpp_err=$ac_c_preproc_warn_flag
15413 else
15414 ac_cpp_err=
15415 fi
15416 else
15417 ac_cpp_err=yes
15418 fi
15419 if test -z "$ac_cpp_err"; then
15420 eval "$as_ac_Header=yes"
15421 else
15422 echo "$as_me: failed program was:" >&5
15423 cat "conftest.$ac_ext" >&5
15424 eval "$as_ac_Header=no"
15425 fi
15426 rm -f conftest.err "conftest.$ac_ext"
15427 fi
15428 echo "$as_me:15428: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
15429 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
15430 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
15431 cat >>confdefs.h <<EOF
15432 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15433 EOF
15434
15435 fi
15436 done
15437
15438 echo "$as_me:15438: checking for declaration of fd_set" >&5
15439 echo $ECHO_N "checking for declaration of fd_set... $ECHO_C" >&6
15440 if test "${cf_cv_type_fd_set+set}" = set; then
15441 echo $ECHO_N "(cached) $ECHO_C" >&6
15442 else
15443
15444 echo "${as_me:-configure}:15444: testing sys/types alone ..." 1>&5
15445
15446 cat >"conftest.$ac_ext" <<_ACEOF
15447 #line 15447 "configure"
15448 #include "confdefs.h"
15449
15450 #include <sys/types.h>
15451 int
15452 main (void)
15453 {
15454 fd_set x; (void)x
15455 ;
15456 return 0;
15457 }
15458 _ACEOF
15459 rm -f "conftest.$ac_objext"
15460 if { (eval echo "$as_me:15460: \"$ac_compile\"") >&5
15461 (eval $ac_compile) 2>&5
15462 ac_status=$?
15463 echo "$as_me:15463: \$? = $ac_status" >&5
15464 (exit "$ac_status"); } &&
15465 { ac_try='test -s "conftest.$ac_objext"'
15466 { (eval echo "$as_me:15466: \"$ac_try\"") >&5
15467 (eval $ac_try) 2>&5
15468 ac_status=$?
15469 echo "$as_me:15469: \$? = $ac_status" >&5
15470 (exit "$ac_status"); }; }; then
15471 cf_cv_type_fd_set=sys/types.h
15472 else
15473 echo "$as_me: failed program was:" >&5
15474 cat "conftest.$ac_ext" >&5
15475
15476 echo "${as_me:-configure}:15476: testing X11/Xpoll.h ..." 1>&5
15477
15478 cat >"conftest.$ac_ext" <<_ACEOF
15479 #line 15479 "configure"
15480 #include "confdefs.h"
15481
15482 #ifdef HAVE_X11_XPOLL_H
15483 #include <X11/Xpoll.h>
15484 #endif
15485 int
15486 main (void)
15487 {
15488 fd_set x; (void)x
15489 ;
15490 return 0;
15491 }
15492 _ACEOF
15493 rm -f "conftest.$ac_objext"
15494 if { (eval echo "$as_me:15494: \"$ac_compile\"") >&5
15495 (eval $ac_compile) 2>&5
15496 ac_status=$?
15497 echo "$as_me:15497: \$? = $ac_status" >&5
15498 (exit "$ac_status"); } &&
15499 { ac_try='test -s "conftest.$ac_objext"'
15500 { (eval echo "$as_me:15500: \"$ac_try\"") >&5
15501 (eval $ac_try) 2>&5
15502 ac_status=$?
15503 echo "$as_me:15503: \$? = $ac_status" >&5
15504 (exit "$ac_status"); }; }; then
15505 cf_cv_type_fd_set=X11/Xpoll.h
15506 else
15507 echo "$as_me: failed program was:" >&5
15508 cat "conftest.$ac_ext" >&5
15509
15510 echo "${as_me:-configure}:15510: testing sys/select.h ..." 1>&5
15511
15512 cat >"conftest.$ac_ext" <<_ACEOF
15513 #line 15513 "configure"
15514 #include "confdefs.h"
15515
15516 #include <sys/types.h>
15517 #include <sys/select.h>
15518 int
15519 main (void)
15520 {
15521 fd_set x; (void)x
15522 ;
15523 return 0;
15524 }
15525 _ACEOF
15526 rm -f "conftest.$ac_objext"
15527 if { (eval echo "$as_me:15527: \"$ac_compile\"") >&5
15528 (eval $ac_compile) 2>&5
15529 ac_status=$?
15530 echo "$as_me:15530: \$? = $ac_status" >&5
15531 (exit "$ac_status"); } &&
15532 { ac_try='test -s "conftest.$ac_objext"'
15533 { (eval echo "$as_me:15533: \"$ac_try\"") >&5
15534 (eval $ac_try) 2>&5
15535 ac_status=$?
15536 echo "$as_me:15536: \$? = $ac_status" >&5
15537 (exit "$ac_status"); }; }; then
15538 cf_cv_type_fd_set=sys/select.h
15539 else
15540 echo "$as_me: failed program was:" >&5
15541 cat "conftest.$ac_ext" >&5
15542 cf_cv_type_fd_set=unknown
15543 fi
15544 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15545 fi
15546 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15547 fi
15548 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15549 fi
15550 echo "$as_me:15550: result: $cf_cv_type_fd_set" >&5
15551 echo "${ECHO_T}$cf_cv_type_fd_set" >&6
15552 if test $cf_cv_type_fd_set = sys/select.h ; then
15553
15554 cat >>confdefs.h <<\EOF
15555 #define USE_SYS_SELECT_H 1
15556 EOF
15557
15558 fi
15559
15560 echo "$as_me:15560: checking for declaration of fd_mask" >&5
15561 echo $ECHO_N "checking for declaration of fd_mask... $ECHO_C" >&6
15562 if test "${cf_cv_type_fd_mask+set}" = set; then
15563 echo $ECHO_N "(cached) $ECHO_C" >&6
15564 else
15565
15566 if test x$cf_cv_type_fd_set = xX11/Xpoll.h ; then
15567 cat >"conftest.$ac_ext" <<_ACEOF
15568 #line 15568 "configure"
15569 #include "confdefs.h"
15570
15571 #include <X11/Xpoll.h>
15572 int
15573 main (void)
15574 {
15575 fd_mask x
15576 ;
15577 return 0;
15578 }
15579 _ACEOF
15580 rm -f "conftest.$ac_objext"
15581 if { (eval echo "$as_me:15581: \"$ac_compile\"") >&5
15582 (eval $ac_compile) 2>&5
15583 ac_status=$?
15584 echo "$as_me:15584: \$? = $ac_status" >&5
15585 (exit "$ac_status"); } &&
15586 { ac_try='test -s "conftest.$ac_objext"'
15587 { (eval echo "$as_me:15587: \"$ac_try\"") >&5
15588 (eval $ac_try) 2>&5
15589 ac_status=$?
15590 echo "$as_me:15590: \$? = $ac_status" >&5
15591 (exit "$ac_status"); }; }; then
15592 :
15593 else
15594 echo "$as_me: failed program was:" >&5
15595 cat "conftest.$ac_ext" >&5
15596
15597 echo "${as_me:-configure}:15597: testing if we must define CSRG_BASED ..." 1>&5
15598
15599 # Xosdefs.h on Mac OS X may not define this (but it should).
15600 cat >"conftest.$ac_ext" <<_ACEOF
15601 #line 15601 "configure"
15602 #include "confdefs.h"
15603
15604 #define CSRG_BASED
15605 #include <X11/Xpoll.h>
15606 int
15607 main (void)
15608 {
15609 fd_mask x
15610 ;
15611 return 0;
15612 }
15613 _ACEOF
15614 rm -f "conftest.$ac_objext"
15615 if { (eval echo "$as_me:15615: \"$ac_compile\"") >&5
15616 (eval $ac_compile) 2>&5
15617 ac_status=$?
15618 echo "$as_me:15618: \$? = $ac_status" >&5
15619 (exit "$ac_status"); } &&
15620 { ac_try='test -s "conftest.$ac_objext"'
15621 { (eval echo "$as_me:15621: \"$ac_try\"") >&5
15622 (eval $ac_try) 2>&5
15623 ac_status=$?
15624 echo "$as_me:15624: \$? = $ac_status" >&5
15625 (exit "$ac_status"); }; }; then
15626 cf_cv_type_fd_mask=CSRG_BASED
15627 else
15628 echo "$as_me: failed program was:" >&5
15629 cat "conftest.$ac_ext" >&5
15630 fi
15631 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15632 fi
15633 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15634 else
15635 cf_cv_type_fd_mask=$cf_cv_type_fd_set
15636 fi
15637
15638 fi
15639 echo "$as_me:15639: result: $cf_cv_type_fd_mask" >&5
15640 echo "${ECHO_T}$cf_cv_type_fd_mask" >&6
15641 if test x$cf_cv_type_fd_mask = xCSRG_BASED ; then
15642
15643 cat >>confdefs.h <<\EOF
15644 #define CSRG_BASED 1
15645 EOF
15646
15647 fi
15648
15649 echo "$as_me:15649: checking for IRIX 6.5 baud-rate redefinitions" >&5
15650 echo $ECHO_N "checking for IRIX 6.5 baud-rate redefinitions... $ECHO_C" >&6
15651 if test "${cf_cv_termio_c_ispeed+set}" = set; then
15652 echo $ECHO_N "(cached) $ECHO_C" >&6
15653 else
15654
15655 cat >"conftest.$ac_ext" <<_ACEOF
15656 #line 15656 "configure"
15657 #include "confdefs.h"
15658
15659 #include <sys/types.h>
15660 #include <sys/termio.h>
15661 int
15662 main (void)
15663 {
15664
15665 struct termio foo;
15666 foo.c_ispeed = B38400;
15667 foo.c_ospeed = B9600;
15668 (void)foo;
15669
15670 ;
15671 return 0;
15672 }
15673 _ACEOF
15674 rm -f "conftest.$ac_objext"
15675 if { (eval echo "$as_me:15675: \"$ac_compile\"") >&5
15676 (eval $ac_compile) 2>&5
15677 ac_status=$?
15678 echo "$as_me:15678: \$? = $ac_status" >&5
15679 (exit "$ac_status"); } &&
15680 { ac_try='test -s "conftest.$ac_objext"'
15681 { (eval echo "$as_me:15681: \"$ac_try\"") >&5
15682 (eval $ac_try) 2>&5
15683 ac_status=$?
15684 echo "$as_me:15684: \$? = $ac_status" >&5
15685 (exit "$ac_status"); }; }; then
15686 cf_cv_termio_c_ispeed=yes
15687
15688 else
15689 echo "$as_me: failed program was:" >&5
15690 cat "conftest.$ac_ext" >&5
15691 cf_cv_termio_c_ispeed=no
15692 fi
15693 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15694
15695 fi
15696 echo "$as_me:15696: result: $cf_cv_termio_c_ispeed" >&5
15697 echo "${ECHO_T}$cf_cv_termio_c_ispeed" >&6
15698 test "$cf_cv_termio_c_ispeed" = yes &&
15699 cat >>confdefs.h <<\EOF
15700 #define HAVE_TERMIO_C_ISPEED 1
15701 EOF
15702
15703 echo "$as_me:15703: checking for termios type tcflag_t" >&5
15704 echo $ECHO_N "checking for termios type tcflag_t... $ECHO_C" >&6
15705 if test "${cf_cv_havetype_tcflag_t+set}" = set; then
15706 echo $ECHO_N "(cached) $ECHO_C" >&6
15707 else
15708
15709 cat >"conftest.$ac_ext" <<_ACEOF
15710 #line 15710 "configure"
15711 #include "confdefs.h"
15712 #include <termios.h>
15713 int
15714 main (void)
15715 {
15716
15717 tcflag_t x = 0; (void)x
15718 ;
15719 return 0;
15720 }
15721 _ACEOF
15722 rm -f "conftest.$ac_objext"
15723 if { (eval echo "$as_me:15723: \"$ac_compile\"") >&5
15724 (eval $ac_compile) 2>&5
15725 ac_status=$?
15726 echo "$as_me:15726: \$? = $ac_status" >&5
15727 (exit "$ac_status"); } &&
15728 { ac_try='test -s "conftest.$ac_objext"'
15729 { (eval echo "$as_me:15729: \"$ac_try\"") >&5
15730 (eval $ac_try) 2>&5
15731 ac_status=$?
15732 echo "$as_me:15732: \$? = $ac_status" >&5
15733 (exit "$ac_status"); }; }; then
15734 cf_cv_havetype_tcflag_t=yes
15735 else
15736 echo "$as_me: failed program was:" >&5
15737 cat "conftest.$ac_ext" >&5
15738 cf_cv_havetype_tcflag_t=no
15739 fi
15740 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15741
15742 fi
15743 echo "$as_me:15743: result: $cf_cv_havetype_tcflag_t" >&5
15744 echo "${ECHO_T}$cf_cv_havetype_tcflag_t" >&6
15745 test "$cf_cv_havetype_tcflag_t" = no &&
15746 cat >>confdefs.h <<\EOF
15747 #define tcflag_t unsigned long
15748 EOF
15749
15750 echo "$as_me:15750: checking for termios type speed_t" >&5
15751 echo $ECHO_N "checking for termios type speed_t... $ECHO_C" >&6
15752 if test "${cf_cv_havetype_speed_t+set}" = set; then
15753 echo $ECHO_N "(cached) $ECHO_C" >&6
15754 else
15755
15756 cat >"conftest.$ac_ext" <<_ACEOF
15757 #line 15757 "configure"
15758 #include "confdefs.h"
15759 #include <termios.h>
15760 int
15761 main (void)
15762 {
15763
15764 speed_t x = 0; (void)x
15765 ;
15766 return 0;
15767 }
15768 _ACEOF
15769 rm -f "conftest.$ac_objext"
15770 if { (eval echo "$as_me:15770: \"$ac_compile\"") >&5
15771 (eval $ac_compile) 2>&5
15772 ac_status=$?
15773 echo "$as_me:15773: \$? = $ac_status" >&5
15774 (exit "$ac_status"); } &&
15775 { ac_try='test -s "conftest.$ac_objext"'
15776 { (eval echo "$as_me:15776: \"$ac_try\"") >&5
15777 (eval $ac_try) 2>&5
15778 ac_status=$?
15779 echo "$as_me:15779: \$? = $ac_status" >&5
15780 (exit "$ac_status"); }; }; then
15781 cf_cv_havetype_speed_t=yes
15782 else
15783 echo "$as_me: failed program was:" >&5
15784 cat "conftest.$ac_ext" >&5
15785 cf_cv_havetype_speed_t=no
15786 fi
15787 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15788
15789 fi
15790 echo "$as_me:15790: result: $cf_cv_havetype_speed_t" >&5
15791 echo "${ECHO_T}$cf_cv_havetype_speed_t" >&6
15792 test "$cf_cv_havetype_speed_t" = no &&
15793 cat >>confdefs.h <<\EOF
15794 #define speed_t unsigned short
15795 EOF
15796
15797 echo "$as_me:15797: checking for termios type cc_t" >&5
15798 echo $ECHO_N "checking for termios type cc_t... $ECHO_C" >&6
15799 if test "${cf_cv_havetype_cc_t+set}" = set; then
15800 echo $ECHO_N "(cached) $ECHO_C" >&6
15801 else
15802
15803 cat >"conftest.$ac_ext" <<_ACEOF
15804 #line 15804 "configure"
15805 #include "confdefs.h"
15806 #include <termios.h>
15807 int
15808 main (void)
15809 {
15810
15811 cc_t x = 0; (void)x
15812 ;
15813 return 0;
15814 }
15815 _ACEOF
15816 rm -f "conftest.$ac_objext"
15817 if { (eval echo "$as_me:15817: \"$ac_compile\"") >&5
15818 (eval $ac_compile) 2>&5
15819 ac_status=$?
15820 echo "$as_me:15820: \$? = $ac_status" >&5
15821 (exit "$ac_status"); } &&
15822 { ac_try='test -s "conftest.$ac_objext"'
15823 { (eval echo "$as_me:15823: \"$ac_try\"") >&5
15824 (eval $ac_try) 2>&5
15825 ac_status=$?
15826 echo "$as_me:15826: \$? = $ac_status" >&5
15827 (exit "$ac_status"); }; }; then
15828 cf_cv_havetype_cc_t=yes
15829 else
15830 echo "$as_me: failed program was:" >&5
15831 cat "conftest.$ac_ext" >&5
15832 cf_cv_havetype_cc_t=no
15833 fi
15834 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15835
15836 fi
15837 echo "$as_me:15837: result: $cf_cv_havetype_cc_t" >&5
15838 echo "${ECHO_T}$cf_cv_havetype_cc_t" >&6
15839 test "$cf_cv_havetype_cc_t" = no &&
15840 cat >>confdefs.h <<\EOF
15841 #define cc_t unsigned char
15842 EOF
15843
15844 # The Xcursor library is normally (weakly) linked via the X11 library rather
15845 # than directly to applications. xterm can select a cursor theme; users can
15846 # also use environment variables to select cursor size. We would only notice
15847 # the library if there are development files for it. Provide a way to disable
15848 # the feature if it is unwanted.
15849 echo "$as_me:15849: checking if we expect to use the Xcursor library" >&5
15850 echo $ECHO_N "checking if we expect to use the Xcursor library... $ECHO_C" >&6
15851
15852 # Check whether --enable-xcursor or --disable-xcursor was given.
15853 if test "${enable_xcursor+set}" = set; then
15854 enableval="$enable_xcursor"
15855 test "$enableval" != no && enableval=yes
15856 if test "$enableval" != "yes" ; then
15857 enable_xcursor=no
15858 else
15859 enable_xcursor=yes
15860 fi
15861 else
15862 enableval=yes
15863 enable_xcursor=yes
15864
15865 fi;
15866 echo "$as_me:15866: result: $enable_xcursor" >&5
15867 echo "${ECHO_T}$enable_xcursor" >&6
15868 if test "$enable_xcursor" = yes; then
15869
15870 cat >>confdefs.h <<\EOF
15871 #define HAVE_LIB_XCURSOR 1
15872 EOF
15873
15874 fi
15875
15876 LIBS="$LIBS $X_EXTRA_LIBS"
15877
15878 for ac_header in \
15879 stropts.h \
15880
15881 do
15882 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15883 echo "$as_me:15883: checking for $ac_header" >&5
15884 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15885 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15886 echo $ECHO_N "(cached) $ECHO_C" >&6
15887 else
15888 cat >"conftest.$ac_ext" <<_ACEOF
15889 #line 15889 "configure"
15890 #include "confdefs.h"
15891 #include <$ac_header>
15892 _ACEOF
15893 if { (eval echo "$as_me:15893: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15894 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15895 ac_status=$?
15896 $EGREP -v '^ *\+' conftest.er1 >conftest.err
15897 rm -f conftest.er1
15898 cat conftest.err >&5
15899 echo "$as_me:15899: \$? = $ac_status" >&5
15900 (exit "$ac_status"); } >/dev/null; then
15901 if test -s conftest.err; then
15902 ac_cpp_err=$ac_c_preproc_warn_flag
15903 else
15904 ac_cpp_err=
15905 fi
15906 else
15907 ac_cpp_err=yes
15908 fi
15909 if test -z "$ac_cpp_err"; then
15910 eval "$as_ac_Header=yes"
15911 else
15912 echo "$as_me: failed program was:" >&5
15913 cat "conftest.$ac_ext" >&5
15914 eval "$as_ac_Header=no"
15915 fi
15916 rm -f conftest.err "conftest.$ac_ext"
15917 fi
15918 echo "$as_me:15918: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
15919 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
15920 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
15921 cat >>confdefs.h <<EOF
15922 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15923 EOF
15924
15925 fi
15926 done
15927
15928 cf_func_grantpt="grantpt ptsname"
15929 cf_prefer_openpt=no
15930 case $host_os in
15931 (darwin[0-9].*)
15932 ;;
15933 (openbsd[0-9].*)
15934 # The POSIX entrypoints exist, but have never worked.
15935 ;;
15936 (linux*)
15937 cf_func_grantpt="$cf_func_grantpt posix_openpt"
15938 cf_prefer_openpt=yes
15939 ;;
15940 (*)
15941 cf_func_grantpt="$cf_func_grantpt posix_openpt"
15942 ;;
15943 esac
15944
15945 for ac_func in $cf_func_grantpt
15946 do
15947 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15948 echo "$as_me:15948: checking for $ac_func" >&5
15949 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15950 if eval "test \"\${$as_ac_var+set}\" = set"; then
15951 echo $ECHO_N "(cached) $ECHO_C" >&6
15952 else
15953 cat >"conftest.$ac_ext" <<_ACEOF
15954 #line 15954 "configure"
15955 #include "confdefs.h"
15956 #define $ac_func autoconf_temporary
15957 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15958 #undef $ac_func
15959
15960 #ifdef __cplusplus
15961 extern "C"
15962 #endif
15963
15964 /* We use char because int might match the return type of a gcc2
15965 builtin and then its argument prototype would still apply. */
15966 char $ac_func (void);
15967
15968 int
15969 main (void)
15970 {
15971
15972 /* The GNU C library defines stubs for functions which it implements
15973 to always fail with ENOSYS. Some functions are actually named
15974 something starting with __ and the normal name is an alias. */
15975 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15976 #error found stub for $ac_func
15977 #endif
15978
15979 return $ac_func ();
15980 ;
15981 return 0;
15982 }
15983 _ACEOF
15984 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15985 if { (eval echo "$as_me:15985: \"$ac_link\"") >&5
15986 (eval $ac_link) 2>&5
15987 ac_status=$?
15988 echo "$as_me:15988: \$? = $ac_status" >&5
15989 (exit "$ac_status"); } &&
15990 { ac_try='test -s "conftest$ac_exeext"'
15991 { (eval echo "$as_me:15991: \"$ac_try\"") >&5
15992 (eval $ac_try) 2>&5
15993 ac_status=$?
15994 echo "$as_me:15994: \$? = $ac_status" >&5
15995 (exit "$ac_status"); }; }; then
15996 eval "$as_ac_var=yes"
15997 else
15998 echo "$as_me: failed program was:" >&5
15999 cat "conftest.$ac_ext" >&5
16000 eval "$as_ac_var=no"
16001 fi
16002 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16003 fi
16004 echo "$as_me:16004: result: `eval echo '${'"$as_ac_var"'}'`" >&5
16005 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
16006 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
16007 cat >>confdefs.h <<EOF
16008 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16009 EOF
16010
16011 fi
16012 done
16013
16014 cf_grantpt_opts=
16015 if test "x$ac_cv_func_grantpt" = "xyes" ; then
16016 echo "$as_me:16016: checking if grantpt really works" >&5
16017 echo $ECHO_N "checking if grantpt really works... $ECHO_C" >&6
16018 cat >"conftest.$ac_ext" <<_ACEOF
16019 #line 16019 "configure"
16020 #include "confdefs.h"
16021
16022 #include <stdlib.h>
16023 #include <stdio.h>
16024 #include <termios.h>
16025 #include <unistd.h>
16026 #include <signal.h>
16027 #include <fcntl.h>
16028 #include <errno.h>
16029
16030 #ifndef HAVE_POSIX_OPENPT
16031 #undef posix_openpt
16032 #define posix_openpt(mode) open("/dev/ptmx", mode)
16033 #endif
16034
16035 #ifdef HAVE_STROPTS_H
16036 #include <stropts.h>
16037 #endif
16038
16039 static void failed(int code)
16040 {
16041 perror("conftest");
16042 exit(code);
16043 }
16044
16045 static void my_timeout(int sig)
16046 {
16047 (void)sig;
16048 exit(99);
16049 }
16050
16051 int
16052 main (void)
16053 {
16054
16055 int code = 0;
16056 int pty;
16057 int tty;
16058 char *slave;
16059 struct termios tio;
16060
16061 (void)tio;
16062 signal(SIGALRM, my_timeout);
16063
16064 if (alarm(2) == 9)
16065 failed(9);
16066 else if ((pty = posix_openpt(O_RDWR)) < 0)
16067 failed(1);
16068 else if (grantpt(pty) < 0)
16069 failed(2);
16070 else if (unlockpt(pty) < 0)
16071 failed(3);
16072 else if ((slave = ptsname(pty)) == 0)
16073 failed(4);
16074 #if (CONFTEST == 3) || defined(CONFTEST_isatty)
16075 else if (!isatty(pty))
16076 failed(4);
16077 #endif
16078 #if CONFTEST >= 4
16079 else if (tcgetattr(pty, &tio) < 0)
16080 failed(20);
16081 else if (tcsetattr(pty, TCSAFLUSH, &tio) < 0)
16082 failed(21);
16083 #endif
16084 /* BSD posix_openpt does not treat pty as a terminal until slave is opened.
16085 * Linux does treat it that way.
16086 */
16087 else if ((tty = open(slave, O_RDWR)) < 0)
16088 failed(5);
16089 #ifdef CONFTEST
16090 #ifdef I_PUSH
16091 #if (CONFTEST == 0) || defined(CONFTEST_ptem)
16092 else if (ioctl(tty, I_PUSH, "ptem") < 0)
16093 failed(10);
16094 #endif
16095 #if (CONFTEST == 1) || defined(CONFTEST_ldterm)
16096 else if (ioctl(tty, I_PUSH, "ldterm") < 0)
16097 failed(11);
16098 #endif
16099 #if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
16100 else if (ioctl(tty, I_PUSH, "ttcompat") < 0)
16101 failed(12);
16102 #endif
16103 #endif /* I_PUSH */
16104 #if CONFTEST >= 5
16105 else if (tcgetattr(tty, &tio) < 0)
16106 failed(30);
16107 else if (tcsetattr(tty, TCSAFLUSH, &tio) < 0)
16108 failed(31);
16109 #endif
16110 #endif /* CONFTEST */
16111 (void) tty;
16112 ${cf_cv_main_return:-return}(code);
16113
16114 ;
16115 return 0;
16116 }
16117 _ACEOF
16118 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16119 if { (eval echo "$as_me:16119: \"$ac_link\"") >&5
16120 (eval $ac_link) 2>&5
16121 ac_status=$?
16122 echo "$as_me:16122: \$? = $ac_status" >&5
16123 (exit "$ac_status"); } &&
16124 { ac_try='test -s "conftest$ac_exeext"'
16125 { (eval echo "$as_me:16125: \"$ac_try\"") >&5
16126 (eval $ac_try) 2>&5
16127 ac_status=$?
16128 echo "$as_me:16128: \$? = $ac_status" >&5
16129 (exit "$ac_status"); }; }; then
16130
16131 if test "$cross_compiling" = yes; then
16132 ac_cv_func_grantpt=maybe
16133 else
16134 cat >"conftest.$ac_ext" <<_ACEOF
16135 #line 16135 "configure"
16136 #include "confdefs.h"
16137
16138 #include <stdlib.h>
16139 #include <stdio.h>
16140 #include <termios.h>
16141 #include <unistd.h>
16142 #include <signal.h>
16143 #include <fcntl.h>
16144 #include <errno.h>
16145
16146 #ifndef HAVE_POSIX_OPENPT
16147 #undef posix_openpt
16148 #define posix_openpt(mode) open("/dev/ptmx", mode)
16149 #endif
16150
16151 #ifdef HAVE_STROPTS_H
16152 #include <stropts.h>
16153 #endif
16154
16155 static void failed(int code)
16156 {
16157 perror("conftest");
16158 exit(code);
16159 }
16160
16161 static void my_timeout(int sig)
16162 {
16163 (void)sig;
16164 exit(99);
16165 }
16166
16167 int main(void)
16168 {
16169
16170 int code = 0;
16171 int pty;
16172 int tty;
16173 char *slave;
16174 struct termios tio;
16175
16176 (void)tio;
16177 signal(SIGALRM, my_timeout);
16178
16179 if (alarm(2) == 9)
16180 failed(9);
16181 else if ((pty = posix_openpt(O_RDWR)) < 0)
16182 failed(1);
16183 else if (grantpt(pty) < 0)
16184 failed(2);
16185 else if (unlockpt(pty) < 0)
16186 failed(3);
16187 else if ((slave = ptsname(pty)) == 0)
16188 failed(4);
16189 #if (CONFTEST == 3) || defined(CONFTEST_isatty)
16190 else if (!isatty(pty))
16191 failed(4);
16192 #endif
16193 #if CONFTEST >= 4
16194 else if (tcgetattr(pty, &tio) < 0)
16195 failed(20);
16196 else if (tcsetattr(pty, TCSAFLUSH, &tio) < 0)
16197 failed(21);
16198 #endif
16199 /* BSD posix_openpt does not treat pty as a terminal until slave is opened.
16200 * Linux does treat it that way.
16201 */
16202 else if ((tty = open(slave, O_RDWR)) < 0)
16203 failed(5);
16204 #ifdef CONFTEST
16205 #ifdef I_PUSH
16206 #if (CONFTEST == 0) || defined(CONFTEST_ptem)
16207 else if (ioctl(tty, I_PUSH, "ptem") < 0)
16208 failed(10);
16209 #endif
16210 #if (CONFTEST == 1) || defined(CONFTEST_ldterm)
16211 else if (ioctl(tty, I_PUSH, "ldterm") < 0)
16212 failed(11);
16213 #endif
16214 #if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
16215 else if (ioctl(tty, I_PUSH, "ttcompat") < 0)
16216 failed(12);
16217 #endif
16218 #endif /* I_PUSH */
16219 #if CONFTEST >= 5
16220 else if (tcgetattr(tty, &tio) < 0)
16221 failed(30);
16222 else if (tcsetattr(tty, TCSAFLUSH, &tio) < 0)
16223 failed(31);
16224 #endif
16225 #endif /* CONFTEST */
16226 (void) tty;
16227 ${cf_cv_main_return:-return}(code);
16228
16229 }
16230
16231 _ACEOF
16232 rm -f "conftest$ac_exeext"
16233 if { (eval echo "$as_me:16233: \"$ac_link\"") >&5
16234 (eval $ac_link) 2>&5
16235 ac_status=$?
16236 echo "$as_me:16236: \$? = $ac_status" >&5
16237 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16238 { (eval echo "$as_me:16238: \"$ac_try\"") >&5
16239 (eval $ac_try) 2>&5
16240 ac_status=$?
16241 echo "$as_me:16241: \$? = $ac_status" >&5
16242 (exit "$ac_status"); }; }; then
16243 :
16244 else
16245 echo "$as_me: program exited with status $ac_status" >&5
16246 echo "$as_me: failed program was:" >&5
16247 cat "conftest.$ac_ext" >&5
16248 ac_cv_func_grantpt=no
16249
16250 fi
16251 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16252 fi
16253
16254 else
16255 echo "$as_me: failed program was:" >&5
16256 cat "conftest.$ac_ext" >&5
16257 ac_cv_func_grantpt=no
16258 fi
16259 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16260 echo "$as_me:16260: result: $ac_cv_func_grantpt" >&5
16261 echo "${ECHO_T}$ac_cv_func_grantpt" >&6
16262
16263 if test "x$ac_cv_func_grantpt" != "xno" ; then
16264
16265 if test "x$ac_cv_func_grantpt" = "xyes" ; then
16266 echo "$as_me:16266: checking for pty features" >&5
16267 echo $ECHO_N "checking for pty features... $ECHO_C" >&6
16268 if test "x$ac_cv_header_stropts_h" = xyes
16269 then
16270 cf_pty_this=0
16271 else
16272 cf_pty_this=3
16273 fi
16274
16275 cf_pty_defines=
16276 while test $cf_pty_this != 6
16277 do
16278
16279 cf_pty_feature=
16280 cf_pty_next="`expr $cf_pty_this + 1`"
16281
16282 echo "${as_me:-configure}:16282: testing pty feature test $cf_pty_next:5 ..." 1>&5
16283
16284 if test "$cross_compiling" = yes; then
16285 { { echo "$as_me:16285: error: cannot run test program while cross compiling" >&5
16286 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16287 { (exit 1); exit 1; }; }
16288 else
16289 cat >"conftest.$ac_ext" <<_ACEOF
16290 #line 16290 "configure"
16291 #include "confdefs.h"
16292 #define CONFTEST $cf_pty_this
16293 $cf_pty_defines
16294
16295 #include <stdlib.h>
16296 #include <stdio.h>
16297 #include <termios.h>
16298 #include <unistd.h>
16299 #include <signal.h>
16300 #include <fcntl.h>
16301 #include <errno.h>
16302
16303 #ifndef HAVE_POSIX_OPENPT
16304 #undef posix_openpt
16305 #define posix_openpt(mode) open("/dev/ptmx", mode)
16306 #endif
16307
16308 #ifdef HAVE_STROPTS_H
16309 #include <stropts.h>
16310 #endif
16311
16312 static void failed(int code)
16313 {
16314 perror("conftest");
16315 exit(code);
16316 }
16317
16318 static void my_timeout(int sig)
16319 {
16320 (void)sig;
16321 exit(99);
16322 }
16323
16324 int main(void)
16325 {
16326
16327 int code = 0;
16328 int pty;
16329 int tty;
16330 char *slave;
16331 struct termios tio;
16332
16333 (void)tio;
16334 signal(SIGALRM, my_timeout);
16335
16336 if (alarm(2) == 9)
16337 failed(9);
16338 else if ((pty = posix_openpt(O_RDWR)) < 0)
16339 failed(1);
16340 else if (grantpt(pty) < 0)
16341 failed(2);
16342 else if (unlockpt(pty) < 0)
16343 failed(3);
16344 else if ((slave = ptsname(pty)) == 0)
16345 failed(4);
16346 #if (CONFTEST == 3) || defined(CONFTEST_isatty)
16347 else if (!isatty(pty))
16348 failed(4);
16349 #endif
16350 #if CONFTEST >= 4
16351 else if (tcgetattr(pty, &tio) < 0)
16352 failed(20);
16353 else if (tcsetattr(pty, TCSAFLUSH, &tio) < 0)
16354 failed(21);
16355 #endif
16356 /* BSD posix_openpt does not treat pty as a terminal until slave is opened.
16357 * Linux does treat it that way.
16358 */
16359 else if ((tty = open(slave, O_RDWR)) < 0)
16360 failed(5);
16361 #ifdef CONFTEST
16362 #ifdef I_PUSH
16363 #if (CONFTEST == 0) || defined(CONFTEST_ptem)
16364 else if (ioctl(tty, I_PUSH, "ptem") < 0)
16365 failed(10);
16366 #endif
16367 #if (CONFTEST == 1) || defined(CONFTEST_ldterm)
16368 else if (ioctl(tty, I_PUSH, "ldterm") < 0)
16369 failed(11);
16370 #endif
16371 #if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
16372 else if (ioctl(tty, I_PUSH, "ttcompat") < 0)
16373 failed(12);
16374 #endif
16375 #endif /* I_PUSH */
16376 #if CONFTEST >= 5
16377 else if (tcgetattr(tty, &tio) < 0)
16378 failed(30);
16379 else if (tcsetattr(tty, TCSAFLUSH, &tio) < 0)
16380 failed(31);
16381 #endif
16382 #endif /* CONFTEST */
16383 (void) tty;
16384 ${cf_cv_main_return:-return}(code);
16385
16386 }
16387
16388 _ACEOF
16389 rm -f "conftest$ac_exeext"
16390 if { (eval echo "$as_me:16390: \"$ac_link\"") >&5
16391 (eval $ac_link) 2>&5
16392 ac_status=$?
16393 echo "$as_me:16393: \$? = $ac_status" >&5
16394 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16395 { (eval echo "$as_me:16395: \"$ac_try\"") >&5
16396 (eval $ac_try) 2>&5
16397 ac_status=$?
16398 echo "$as_me:16398: \$? = $ac_status" >&5
16399 (exit "$ac_status"); }; }; then
16400
16401 case $cf_pty_next in
16402 (1) # - streams
16403 cf_pty_feature=ptem
16404 ;;
16405 (2) # - streams
16406 cf_pty_feature=ldterm
16407 ;;
16408 (3) # - streams
16409 cf_pty_feature=ttcompat
16410 ;;
16411 (4)
16412 cf_pty_feature=pty_isatty
16413 ;;
16414 (5)
16415 cf_pty_feature=pty_tcsetattr
16416 ;;
16417 (6)
16418 cf_pty_feature=tty_tcsetattr
16419 ;;
16420 esac
16421
16422 else
16423 echo "$as_me: program exited with status $ac_status" >&5
16424 echo "$as_me: failed program was:" >&5
16425 cat "conftest.$ac_ext" >&5
16426
16427 case $cf_pty_next in
16428 (1|2|3)
16429
16430 echo "${as_me:-configure}:16430: testing skipping remaining streams features $cf_pty_this..2 ..." 1>&5
16431
16432 cf_pty_next=3
16433 ;;
16434 esac
16435
16436 fi
16437 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16438 fi
16439 if test -n "$cf_pty_feature"
16440 then
16441 cf_pty_defines="$cf_pty_defines
16442 #define CONFTEST_$cf_pty_feature 1
16443 "
16444 cf_grantpt_opts="$cf_grantpt_opts $cf_pty_feature"
16445 fi
16446
16447 cf_pty_this=$cf_pty_next
16448 done
16449 echo "$as_me:16449: result: $cf_grantpt_opts" >&5
16450 echo "${ECHO_T}$cf_grantpt_opts" >&6
16451 cf_grantpt_opts=`echo "$cf_grantpt_opts" | sed -e 's/ isatty//'`
16452 fi
16453 fi
16454 fi
16455
16456 if test "x$cf_prefer_posix_openpt" = "xyes" && test "x$ac_cv_func_posix_openpt" = "xyes" ; then
16457 test -n "$verbose" && echo " prefer posix_openpt over openpty" 1>&6
16458
16459 echo "${as_me:-configure}:16459: testing prefer posix_openpt over openpty ..." 1>&5
16460
16461 elif test "x$disable_openpty" != "xyes" || test -z "$cf_grantpt_opts" ; then
16462 echo "$as_me:16462: checking for openpty in -lutil" >&5
16463 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
16464 if test "${ac_cv_lib_util_openpty+set}" = set; then
16465 echo $ECHO_N "(cached) $ECHO_C" >&6
16466 else
16467 ac_check_lib_save_LIBS=$LIBS
16468 LIBS="-lutil $LIBS"
16469 cat >"conftest.$ac_ext" <<_ACEOF
16470 #line 16470 "configure"
16471 #include "confdefs.h"
16472
16473 /* Override any gcc2 internal prototype to avoid an error. */
16474 #ifdef __cplusplus
16475 extern "C"
16476 #endif
16477 /* We use char because int might match the return type of a gcc2
16478 builtin and then its argument prototype would still apply. */
16479 char openpty ();
16480 int
16481 main (void)
16482 {
16483 openpty ();
16484 ;
16485 return 0;
16486 }
16487 _ACEOF
16488 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16489 if { (eval echo "$as_me:16489: \"$ac_link\"") >&5
16490 (eval $ac_link) 2>&5
16491 ac_status=$?
16492 echo "$as_me:16492: \$? = $ac_status" >&5
16493 (exit "$ac_status"); } &&
16494 { ac_try='test -s "conftest$ac_exeext"'
16495 { (eval echo "$as_me:16495: \"$ac_try\"") >&5
16496 (eval $ac_try) 2>&5
16497 ac_status=$?
16498 echo "$as_me:16498: \$? = $ac_status" >&5
16499 (exit "$ac_status"); }; }; then
16500 ac_cv_lib_util_openpty=yes
16501 else
16502 echo "$as_me: failed program was:" >&5
16503 cat "conftest.$ac_ext" >&5
16504 ac_cv_lib_util_openpty=no
16505 fi
16506 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16507 LIBS=$ac_check_lib_save_LIBS
16508 fi
16509 echo "$as_me:16509: result: $ac_cv_lib_util_openpty" >&5
16510 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
16511 if test "$ac_cv_lib_util_openpty" = yes; then
16512 cf_have_openpty=yes
16513 else
16514 cf_have_openpty=no
16515 fi
16516
16517 if test "$cf_have_openpty" = yes ; then
16518 ac_cv_func_grantpt=no
16519 LIBS="-lutil $LIBS"
16520
16521 cat >>confdefs.h <<\EOF
16522 #define HAVE_OPENPTY 1
16523 EOF
16524
16525 for ac_header in \
16526 util.h \
16527 libutil.h \
16528 pty.h \
16529
16530 do
16531 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16532 echo "$as_me:16532: checking for $ac_header" >&5
16533 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16534 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16535 echo $ECHO_N "(cached) $ECHO_C" >&6
16536 else
16537 cat >"conftest.$ac_ext" <<_ACEOF
16538 #line 16538 "configure"
16539 #include "confdefs.h"
16540 #include <$ac_header>
16541 _ACEOF
16542 if { (eval echo "$as_me:16542: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16543 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16544 ac_status=$?
16545 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16546 rm -f conftest.er1
16547 cat conftest.err >&5
16548 echo "$as_me:16548: \$? = $ac_status" >&5
16549 (exit "$ac_status"); } >/dev/null; then
16550 if test -s conftest.err; then
16551 ac_cpp_err=$ac_c_preproc_warn_flag
16552 else
16553 ac_cpp_err=
16554 fi
16555 else
16556 ac_cpp_err=yes
16557 fi
16558 if test -z "$ac_cpp_err"; then
16559 eval "$as_ac_Header=yes"
16560 else
16561 echo "$as_me: failed program was:" >&5
16562 cat "conftest.$ac_ext" >&5
16563 eval "$as_ac_Header=no"
16564 fi
16565 rm -f conftest.err "conftest.$ac_ext"
16566 fi
16567 echo "$as_me:16567: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16568 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16569 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16570 cat >>confdefs.h <<EOF
16571 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16572 EOF
16573
16574 fi
16575 done
16576
16577 fi
16578 fi
16579
16580 if test "x$ac_cv_func_grantpt" != xno
16581 then
16582 test -n "$verbose" && echo " will rely upon grantpt" 1>&6
16583
16584 echo "${as_me:-configure}:16584: testing will rely upon grantpt ..." 1>&5
16585
16586 cat >>confdefs.h <<\EOF
16587 #define HAVE_WORKING_GRANTPT 1
16588 EOF
16589
16590 for cf_feature in $cf_grantpt_opts
16591 do
16592 cf_feature=`echo "$cf_feature" | sed -e 's/ //g'`
16593
16594 cf_FEATURE=`echo "$cf_feature" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16595
16596 cat >>confdefs.h <<EOF
16597 #define HAVE_GRANTPT_$cf_FEATURE 1
16598 EOF
16599
16600 done
16601 elif test "x$cf_have_openpty" = xno
16602 then
16603 test -n "$verbose" && echo " will rely upon BSD-pseudoterminals" 1>&6
16604
16605 echo "${as_me:-configure}:16605: testing will rely upon BSD-pseudoterminals ..." 1>&5
16606
16607 else
16608 test -n "$verbose" && echo " will rely upon openpty" 1>&6
16609
16610 echo "${as_me:-configure}:16610: testing will rely upon openpty ..." 1>&5
16611
16612 fi
16613
16614 echo "$as_me:16614: checking if we can use XkbQueryExtension" >&5
16615 echo $ECHO_N "checking if we can use XkbQueryExtension... $ECHO_C" >&6
16616 if test "${cf_cv_xkb_query_extension+set}" = set; then
16617 echo $ECHO_N "(cached) $ECHO_C" >&6
16618 else
16619
16620 cat >"conftest.$ac_ext" <<_ACEOF
16621 #line 16621 "configure"
16622 #include "confdefs.h"
16623
16624 #include <X11/Xlib.h>
16625 #include <X11/extensions/XKB.h>
16626 #include <X11/XKBlib.h>
16627
16628 int
16629 main (void)
16630 {
16631
16632 int xkbmajor = XkbMajorVersion;
16633 int xkbminor = XkbMinorVersion;
16634 int xkbopcode, xkbevent, xkberror;
16635
16636 if (XkbLibraryVersion(&xkbmajor, &xkbminor)
16637 && XkbQueryExtension((Display *)0,
16638 &xkbopcode,
16639 &xkbevent,
16640 &xkberror,
16641 &xkbmajor,
16642 &xkbminor))
16643 return 0;
16644
16645 ;
16646 return 0;
16647 }
16648 _ACEOF
16649 rm -f "conftest.$ac_objext"
16650 if { (eval echo "$as_me:16650: \"$ac_compile\"") >&5
16651 (eval $ac_compile) 2>&5
16652 ac_status=$?
16653 echo "$as_me:16653: \$? = $ac_status" >&5
16654 (exit "$ac_status"); } &&
16655 { ac_try='test -s "conftest.$ac_objext"'
16656 { (eval echo "$as_me:16656: \"$ac_try\"") >&5
16657 (eval $ac_try) 2>&5
16658 ac_status=$?
16659 echo "$as_me:16659: \$? = $ac_status" >&5
16660 (exit "$ac_status"); }; }; then
16661
16662 cf_cv_xkb_query_extension=yes
16663
16664 else
16665 echo "$as_me: failed program was:" >&5
16666 cat "conftest.$ac_ext" >&5
16667
16668 cf_cv_xkb_query_extension=no
16669
16670 fi
16671 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16672
16673 fi
16674 echo "$as_me:16674: result: $cf_cv_xkb_query_extension" >&5
16675 echo "${ECHO_T}$cf_cv_xkb_query_extension" >&6
16676
16677 if test $cf_cv_xkb_query_extension = yes
16678 then
16679
16680 for ac_func in XkbQueryExtension
16681 do
16682 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16683 echo "$as_me:16683: checking for $ac_func" >&5
16684 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16685 if eval "test \"\${$as_ac_var+set}\" = set"; then
16686 echo $ECHO_N "(cached) $ECHO_C" >&6
16687 else
16688 cat >"conftest.$ac_ext" <<_ACEOF
16689 #line 16689 "configure"
16690 #include "confdefs.h"
16691 #define $ac_func autoconf_temporary
16692 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16693 #undef $ac_func
16694
16695 #ifdef __cplusplus
16696 extern "C"
16697 #endif
16698
16699 /* We use char because int might match the return type of a gcc2
16700 builtin and then its argument prototype would still apply. */
16701 char $ac_func (void);
16702
16703 int
16704 main (void)
16705 {
16706
16707 /* The GNU C library defines stubs for functions which it implements
16708 to always fail with ENOSYS. Some functions are actually named
16709 something starting with __ and the normal name is an alias. */
16710 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16711 #error found stub for $ac_func
16712 #endif
16713
16714 return $ac_func ();
16715 ;
16716 return 0;
16717 }
16718 _ACEOF
16719 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16720 if { (eval echo "$as_me:16720: \"$ac_link\"") >&5
16721 (eval $ac_link) 2>&5
16722 ac_status=$?
16723 echo "$as_me:16723: \$? = $ac_status" >&5
16724 (exit "$ac_status"); } &&
16725 { ac_try='test -s "conftest$ac_exeext"'
16726 { (eval echo "$as_me:16726: \"$ac_try\"") >&5
16727 (eval $ac_try) 2>&5
16728 ac_status=$?
16729 echo "$as_me:16729: \$? = $ac_status" >&5
16730 (exit "$ac_status"); }; }; then
16731 eval "$as_ac_var=yes"
16732 else
16733 echo "$as_me: failed program was:" >&5
16734 cat "conftest.$ac_ext" >&5
16735 eval "$as_ac_var=no"
16736 fi
16737 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16738 fi
16739 echo "$as_me:16739: result: `eval echo '${'"$as_ac_var"'}'`" >&5
16740 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
16741 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
16742 cat >>confdefs.h <<EOF
16743 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16744 EOF
16745
16746 fi
16747 done
16748
16749 fi
16750
16751 echo "$as_me:16751: checking if we can use XkbKeycodeToKeysym" >&5
16752 echo $ECHO_N "checking if we can use XkbKeycodeToKeysym... $ECHO_C" >&6
16753 if test "${cf_cv_xkb_keycode_to_keysym+set}" = set; then
16754 echo $ECHO_N "(cached) $ECHO_C" >&6
16755 else
16756
16757 cat >"conftest.$ac_ext" <<_ACEOF
16758 #line 16758 "configure"
16759 #include "confdefs.h"
16760
16761 #include <X11/Xlib.h>
16762 #include <X11/XKBlib.h>
16763
16764 int
16765 main (void)
16766 {
16767
16768 KeySym keysym = XkbKeycodeToKeysym((Display *)0, 0, 0, 0);
16769 (void)keysym;
16770
16771 ;
16772 return 0;
16773 }
16774 _ACEOF
16775 rm -f "conftest.$ac_objext"
16776 if { (eval echo "$as_me:16776: \"$ac_compile\"") >&5
16777 (eval $ac_compile) 2>&5
16778 ac_status=$?
16779 echo "$as_me:16779: \$? = $ac_status" >&5
16780 (exit "$ac_status"); } &&
16781 { ac_try='test -s "conftest.$ac_objext"'
16782 { (eval echo "$as_me:16782: \"$ac_try\"") >&5
16783 (eval $ac_try) 2>&5
16784 ac_status=$?
16785 echo "$as_me:16785: \$? = $ac_status" >&5
16786 (exit "$ac_status"); }; }; then
16787
16788 cf_cv_xkb_keycode_to_keysym=yes
16789
16790 else
16791 echo "$as_me: failed program was:" >&5
16792 cat "conftest.$ac_ext" >&5
16793
16794 cf_cv_xkb_keycode_to_keysym=no
16795
16796 fi
16797 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16798
16799 fi
16800 echo "$as_me:16800: result: $cf_cv_xkb_keycode_to_keysym" >&5
16801 echo "${ECHO_T}$cf_cv_xkb_keycode_to_keysym" >&6
16802
16803 if test $cf_cv_xkb_keycode_to_keysym = yes
16804 then
16805
16806 for ac_func in XkbKeycodeToKeysym
16807 do
16808 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16809 echo "$as_me:16809: checking for $ac_func" >&5
16810 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16811 if eval "test \"\${$as_ac_var+set}\" = set"; then
16812 echo $ECHO_N "(cached) $ECHO_C" >&6
16813 else
16814 cat >"conftest.$ac_ext" <<_ACEOF
16815 #line 16815 "configure"
16816 #include "confdefs.h"
16817 #define $ac_func autoconf_temporary
16818 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16819 #undef $ac_func
16820
16821 #ifdef __cplusplus
16822 extern "C"
16823 #endif
16824
16825 /* We use char because int might match the return type of a gcc2
16826 builtin and then its argument prototype would still apply. */
16827 char $ac_func (void);
16828
16829 int
16830 main (void)
16831 {
16832
16833 /* The GNU C library defines stubs for functions which it implements
16834 to always fail with ENOSYS. Some functions are actually named
16835 something starting with __ and the normal name is an alias. */
16836 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16837 #error found stub for $ac_func
16838 #endif
16839
16840 return $ac_func ();
16841 ;
16842 return 0;
16843 }
16844 _ACEOF
16845 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16846 if { (eval echo "$as_me:16846: \"$ac_link\"") >&5
16847 (eval $ac_link) 2>&5
16848 ac_status=$?
16849 echo "$as_me:16849: \$? = $ac_status" >&5
16850 (exit "$ac_status"); } &&
16851 { ac_try='test -s "conftest$ac_exeext"'
16852 { (eval echo "$as_me:16852: \"$ac_try\"") >&5
16853 (eval $ac_try) 2>&5
16854 ac_status=$?
16855 echo "$as_me:16855: \$? = $ac_status" >&5
16856 (exit "$ac_status"); }; }; then
16857 eval "$as_ac_var=yes"
16858 else
16859 echo "$as_me: failed program was:" >&5
16860 cat "conftest.$ac_ext" >&5
16861 eval "$as_ac_var=no"
16862 fi
16863 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16864 fi
16865 echo "$as_me:16865: result: `eval echo '${'"$as_ac_var"'}'`" >&5
16866 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
16867 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
16868 cat >>confdefs.h <<EOF
16869 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16870 EOF
16871
16872 fi
16873 done
16874
16875 fi
16876
16877 cf_save_LIBS_CF_XKB_BELL_EXT="$LIBS"
16878 cf_save_CFLAGS_CF_XKB_BELL_EXT="$CFLAGS"
16879 cf_save_CPPFLAGS_CF_XKB_BELL_EXT="$CPPFLAGS"
16880 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16881 for cf_X_CFLAGS in $X_CFLAGS
16882 do
16883 case "x$cf_X_CFLAGS" in
16884 x-[IUD]*)
16885 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16886 ;;
16887 *)
16888 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16889 ;;
16890 esac
16891 done
16892
16893 echo "$as_me:16893: checking for XKB Bell extension" >&5
16894 echo $ECHO_N "checking for XKB Bell extension... $ECHO_C" >&6
16895 if test "${cf_cv_xkb_bell_ext+set}" = set; then
16896 echo $ECHO_N "(cached) $ECHO_C" >&6
16897 else
16898
16899 cat >"conftest.$ac_ext" <<_ACEOF
16900 #line 16900 "configure"
16901 #include "confdefs.h"
16902
16903 #include <X11/Intrinsic.h>
16904 #include <X11/XKBlib.h> /* has the prototype */
16905 #include <X11/extensions/XKBbells.h> /* has the XkbBI_xxx definitions */
16906
16907 int
16908 main (void)
16909 {
16910
16911 int x = (XkbBI_Info |XkbBI_MinorError |XkbBI_MajorError |XkbBI_TerminalBell |XkbBI_MarginBell);
16912 Atom y = 0;
16913 (void)x;
16914 XkbBell((Display *)0, (Widget)0, 0, y);
16915
16916 ;
16917 return 0;
16918 }
16919 _ACEOF
16920 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16921 if { (eval echo "$as_me:16921: \"$ac_link\"") >&5
16922 (eval $ac_link) 2>&5
16923 ac_status=$?
16924 echo "$as_me:16924: \$? = $ac_status" >&5
16925 (exit "$ac_status"); } &&
16926 { ac_try='test -s "conftest$ac_exeext"'
16927 { (eval echo "$as_me:16927: \"$ac_try\"") >&5
16928 (eval $ac_try) 2>&5
16929 ac_status=$?
16930 echo "$as_me:16930: \$? = $ac_status" >&5
16931 (exit "$ac_status"); }; }; then
16932 cf_cv_xkb_bell_ext=yes
16933 else
16934 echo "$as_me: failed program was:" >&5
16935 cat "conftest.$ac_ext" >&5
16936 cf_cv_xkb_bell_ext=no
16937 fi
16938 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16939
16940 fi
16941 echo "$as_me:16941: result: $cf_cv_xkb_bell_ext" >&5
16942 echo "${ECHO_T}$cf_cv_xkb_bell_ext" >&6
16943 test "$cf_cv_xkb_bell_ext" = yes &&
16944 cat >>confdefs.h <<\EOF
16945 #define HAVE_XKB_BELL_EXT 1
16946 EOF
16947
16948 LIBS="$cf_save_LIBS_CF_XKB_BELL_EXT"
16949 CFLAGS="$cf_save_CFLAGS_CF_XKB_BELL_EXT"
16950 CPPFLAGS="$cf_save_CPPFLAGS_CF_XKB_BELL_EXT"
16951
16952 for ac_func in Xutf8LookupString
16953 do
16954 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16955 echo "$as_me:16955: checking for $ac_func" >&5
16956 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16957 if eval "test \"\${$as_ac_var+set}\" = set"; then
16958 echo $ECHO_N "(cached) $ECHO_C" >&6
16959 else
16960 cat >"conftest.$ac_ext" <<_ACEOF
16961 #line 16961 "configure"
16962 #include "confdefs.h"
16963 #define $ac_func autoconf_temporary
16964 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16965 #undef $ac_func
16966
16967 #ifdef __cplusplus
16968 extern "C"
16969 #endif
16970
16971 /* We use char because int might match the return type of a gcc2
16972 builtin and then its argument prototype would still apply. */
16973 char $ac_func (void);
16974
16975 int
16976 main (void)
16977 {
16978
16979 /* The GNU C library defines stubs for functions which it implements
16980 to always fail with ENOSYS. Some functions are actually named
16981 something starting with __ and the normal name is an alias. */
16982 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16983 #error found stub for $ac_func
16984 #endif
16985
16986 return $ac_func ();
16987 ;
16988 return 0;
16989 }
16990 _ACEOF
16991 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16992 if { (eval echo "$as_me:16992: \"$ac_link\"") >&5
16993 (eval $ac_link) 2>&5
16994 ac_status=$?
16995 echo "$as_me:16995: \$? = $ac_status" >&5
16996 (exit "$ac_status"); } &&
16997 { ac_try='test -s "conftest$ac_exeext"'
16998 { (eval echo "$as_me:16998: \"$ac_try\"") >&5
16999 (eval $ac_try) 2>&5
17000 ac_status=$?
17001 echo "$as_me:17001: \$? = $ac_status" >&5
17002 (exit "$ac_status"); }; }; then
17003 eval "$as_ac_var=yes"
17004 else
17005 echo "$as_me: failed program was:" >&5
17006 cat "conftest.$ac_ext" >&5
17007 eval "$as_ac_var=no"
17008 fi
17009 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17010 fi
17011 echo "$as_me:17011: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17012 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17013 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17014 cat >>confdefs.h <<EOF
17015 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17016 EOF
17017
17018 else
17019
17020 EXTRAHDRS="$EXTRAHDRS xutf8.h"
17021 EXTRASRCS="$EXTRASRCS xutf8.c"
17022 EXTRAOBJS="$EXTRAOBJS xutf8.o"
17023
17024 fi
17025 done
17026
17027 echo "$as_me:17027: checking if you want narrow prototypes for X libraries" >&5
17028 echo $ECHO_N "checking if you want narrow prototypes for X libraries... $ECHO_C" >&6
17029
17030 case `$ac_config_guess` in
17031 (*freebsd*|*gnu*|*irix5*|*irix6*|*netbsd*|*openbsd*|*qnx*|*sco*|*sgi*)
17032 cf_default_narrowproto=yes
17033 ;;
17034 (*)
17035 cf_default_narrowproto=no
17036 ;;
17037 esac
17038
17039 # Check whether --enable-narrowproto or --disable-narrowproto was given.
17040 if test "${enable_narrowproto+set}" = set; then
17041 enableval="$enable_narrowproto"
17042 test "$enableval" != no && enableval=yes
17043 if test "$enableval" != "$cf_default_narrowproto" ; then
17044 enable_narrowproto=$enableval
17045 else
17046 enable_narrowproto=$cf_default_narrowproto
17047 fi
17048 else
17049 enableval=$cf_default_narrowproto
17050 enable_narrowproto=$cf_default_narrowproto
17051
17052 fi;
17053 echo "$as_me:17053: result: $enable_narrowproto" >&5
17054 echo "${ECHO_T}$enable_narrowproto" >&6
17055
17056 echo "$as_me:17056: checking if we should use imake to help" >&5
17057 echo $ECHO_N "checking if we should use imake to help... $ECHO_C" >&6
17058
17059 # Check whether --enable-imake or --disable-imake was given.
17060 if test "${enable_imake+set}" = set; then
17061 enableval="$enable_imake"
17062 test "$enableval" != no && enableval=yes
17063 if test "$enableval" != "yes" ; then
17064 enable_imake=no
17065 else
17066 enable_imake=yes
17067 fi
17068 else
17069 enableval=yes
17070 enable_imake=yes
17071
17072 fi;
17073 echo "$as_me:17073: result: $enable_imake" >&5
17074 echo "${ECHO_T}$enable_imake" >&6
17075
17076 if test "$enable_imake" = yes ; then
17077
17078 for ac_prog in xmkmf imake
17079 do
17080 # Extract the first word of "$ac_prog", so it can be a program name with args.
17081 set dummy $ac_prog; ac_word=$2
17082 echo "$as_me:17082: checking for $ac_word" >&5
17083 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17084 if test "${ac_cv_path_IMAKE+set}" = set; then
17085 echo $ECHO_N "(cached) $ECHO_C" >&6
17086 else
17087 case $IMAKE in
17088 [\\/]* | ?:[\\/]*)
17089 ac_cv_path_IMAKE="$IMAKE" # Let the user override the test with a path.
17090 ;;
17091 *)
17092 ac_save_IFS=$IFS; IFS=$ac_path_separator
17093 ac_dummy="$PATH"
17094 for ac_dir in $ac_dummy; do
17095 IFS=$ac_save_IFS
17096 test -z "$ac_dir" && ac_dir=.
17097 if $as_executable_p "$ac_dir/$ac_word"; then
17098 ac_cv_path_IMAKE="$ac_dir/$ac_word"
17099 echo "$as_me:17099: found $ac_dir/$ac_word" >&5
17100 break
17101 fi
17102 done
17103
17104 ;;
17105 esac
17106 fi
17107 IMAKE=$ac_cv_path_IMAKE
17108
17109 if test -n "$IMAKE"; then
17110 echo "$as_me:17110: result: $IMAKE" >&5
17111 echo "${ECHO_T}$IMAKE" >&6
17112 else
17113 echo "$as_me:17113: result: no" >&5
17114 echo "${ECHO_T}no" >&6
17115 fi
17116
17117 test -n "$IMAKE" && break
17118 done
17119
17120 if test -n "$IMAKE" ; then
17121
17122 case $IMAKE in
17123 (*/imake)
17124 cf_imake_opts="-DUseInstalled=YES"
17125 ;;
17126 (*/util/xmkmf)
17127 # A single parameter tells xmkmf where the config-files are:
17128 cf_imake_opts="`echo "$IMAKE"|sed -e s,/config/util/xmkmf,,`"
17129 ;;
17130 (*)
17131 cf_imake_opts=
17132 ;;
17133 esac
17134
17135 # If it's installed properly, imake (or its wrapper, xmkmf) will point to the
17136 # config directory.
17137 if mkdir conftestdir; then
17138 CDPATH=; export CDPATH
17139 cf_makefile=`cd "$srcdir" || exit;pwd`/Imakefile
17140 cd conftestdir
17141
17142 cat >fix_cflags.sed <<'CF_EOF'
17143 s/\\//g
17144 s/[ ][ ]*/ /g
17145 s/"//g
17146 :pack
17147 s/\(=[^ ][^ ]*\) \([^-]\)/\1 \2/g
17148 t pack
17149 s/\(-D[a-zA-Z0-9_][a-zA-Z0-9_]*\)=\([^\'0-9 ][^ ]*\)/\1='\\"\2\\"'/g
17150 s/^IMAKE[ ]/IMAKE_CFLAGS="/
17151 s/ / /g
17152 s/$/"/
17153 CF_EOF
17154
17155 cat >fix_lflags.sed <<'CF_EOF'
17156 s/^IMAKE[ ]*/IMAKE_LOADFLAGS="/
17157 s/$/"/
17158 CF_EOF
17159
17160 echo >./Imakefile
17161 test -f "$cf_makefile" && cat "$cf_makefile" >>./Imakefile
17162
17163 cat >> ./Imakefile <<'CF_EOF'
17164 findstddefs:
17165 @echo IMAKE ${ALLDEFINES} $(MAIN_DEFINES) $(VENDORMANDEFS) | sed -f fix_cflags.sed
17166 @echo IMAKE ${EXTRA_LOAD_FLAGS} | sed -f fix_lflags.sed
17167 CF_EOF
17168
17169 if ( $IMAKE "$cf_imake_opts" 1>/dev/null 2>&5 && test -f Makefile)
17170 then
17171 test -n "$verbose" && echo " Using $IMAKE $cf_imake_opts" 1>&6
17172
17173 echo "${as_me:-configure}:17173: testing Using $IMAKE $cf_imake_opts ..." 1>&5
17174
17175 else
17176 # sometimes imake doesn't have the config path compiled in. Find it.
17177 cf_config=
17178 for cf_libpath in $X_LIBS $LIBS ; do
17179 case "$cf_libpath" in
17180 (-L*)
17181 cf_libpath=`echo ".$cf_libpath" | sed -e 's/^...//'`
17182 cf_libpath="$cf_libpath/X11/config"
17183 if test -d "$cf_libpath" ; then
17184 cf_config="$cf_libpath"
17185 break
17186 fi
17187 ;;
17188 esac
17189 done
17190 if test -z "$cf_config" ; then
17191 { echo "$as_me:17191: WARNING: Could not find imake config-directory" >&5
17192 echo "$as_me: WARNING: Could not find imake config-directory" >&2;}
17193 else
17194 cf_imake_opts="$cf_imake_opts -I$cf_config"
17195 if ( "$IMAKE" -v "$cf_imake_opts" 2>&5)
17196 then
17197 test -n "$verbose" && echo " Using $IMAKE $cf_config" 1>&6
17198
17199 echo "${as_me:-configure}:17199: testing Using $IMAKE $cf_config ..." 1>&5
17200
17201 else
17202 { echo "$as_me:17202: WARNING: Cannot run $IMAKE" >&5
17203 echo "$as_me: WARNING: Cannot run $IMAKE" >&2;}
17204 fi
17205 fi
17206 fi
17207
17208 # GNU make sometimes prints "make[1]: Entering...", which
17209 # would confuse us.
17210 eval "`make findstddefs 2>/dev/null | grep -v make`"
17211
17212 cd ..
17213 rm -rf conftestdir
17214
17215 # We use ${ALLDEFINES} rather than ${STD_DEFINES} because the former
17216 # declares XTFUNCPROTO there. However, some vendors (e.g., SGI) have
17217 # modified it to support site.cf, adding a kludge for the /usr/include
17218 # directory. Try to filter that out, otherwise gcc won't find its
17219 # headers.
17220 if test -n "$GCC" ; then
17221 if test -n "$IMAKE_CFLAGS" ; then
17222 cf_nostdinc=""
17223 cf_std_incl=""
17224 cf_cpp_opts=""
17225 for cf_opt in $IMAKE_CFLAGS
17226 do
17227 case "$cf_opt" in
17228 (-nostdinc)
17229 cf_nostdinc="$cf_opt"
17230 ;;
17231 (-I/usr/include)
17232 cf_std_incl="$cf_opt"
17233 ;;
17234 (*)
17235 cf_cpp_opts="$cf_cpp_opts $cf_opt"
17236 ;;
17237 esac
17238 done
17239 if test -z "$cf_nostdinc" ; then
17240 IMAKE_CFLAGS="$cf_cpp_opts $cf_std_incl"
17241 elif test -z "$cf_std_incl" ; then
17242 IMAKE_CFLAGS="$cf_cpp_opts $cf_nostdinc"
17243 else
17244 test -n "$verbose" && echo " suppressed \"$cf_nostdinc\" and \"$cf_std_incl\"" 1>&6
17245
17246 echo "${as_me:-configure}:17246: testing suppressed \"$cf_nostdinc\" and \"$cf_std_incl\" ..." 1>&5
17247
17248 IMAKE_CFLAGS="$cf_cpp_opts"
17249 fi
17250 fi
17251 fi
17252 fi
17253
17254 # Some imake configurations define PROJECTROOT with an empty value. Remove
17255 # the empty definition.
17256 case $IMAKE_CFLAGS in
17257 (*-DPROJECTROOT=/*)
17258 ;;
17259 (*)
17260 IMAKE_CFLAGS=`echo "$IMAKE_CFLAGS" |sed -e "s,-DPROJECTROOT=[ ], ,"`
17261 ;;
17262 esac
17263
17264 fi
17265
17266 test -n "$verbose" && echo " IMAKE_CFLAGS $IMAKE_CFLAGS" 1>&6
17267
17268 echo "${as_me:-configure}:17268: testing IMAKE_CFLAGS $IMAKE_CFLAGS ..." 1>&5
17269
17270 test -n "$verbose" && echo " IMAKE_LOADFLAGS $IMAKE_LOADFLAGS" 1>&6
17271
17272 echo "${as_me:-configure}:17272: testing IMAKE_LOADFLAGS $IMAKE_LOADFLAGS ..." 1>&5
17273
17274 fi
17275
17276 if test -n "$IMAKE" && test -n "$IMAKE_CFLAGS" ; then
17277
17278 cf_fix_cppflags=no
17279 cf_new_cflags=
17280 cf_new_cppflags=
17281 cf_new_extra_cppflags=
17282
17283 for cf_add_cflags in $IMAKE_CFLAGS
17284 do
17285 case "$cf_fix_cppflags" in
17286 (no)
17287 case "$cf_add_cflags" in
17288 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17289 case "$cf_add_cflags" in
17290 (-D*)
17291 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17292
17293 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17294 && test -z "${cf_tst_cflags}" \
17295 && cf_fix_cppflags=yes
17296
17297 if test "$cf_fix_cppflags" = yes ; then
17298
17299 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17300 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17301
17302 continue
17303 elif test "${cf_tst_cflags}" = "\"'" ; then
17304
17305 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17306 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17307
17308 continue
17309 fi
17310 ;;
17311 esac
17312 case "$CPPFLAGS" in
17313 (*$cf_add_cflags)
17314 ;;
17315 (*)
17316 case "$cf_add_cflags" in
17317 (-D*)
17318 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17319
17320 CPPFLAGS=`echo "$CPPFLAGS" | \
17321 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17322 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17323
17324 ;;
17325 esac
17326
17327 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17328 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17329
17330 ;;
17331 esac
17332 ;;
17333 (*)
17334
17335 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17336 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17337
17338 ;;
17339 esac
17340 ;;
17341 (yes)
17342
17343 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17344 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17345
17346 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17347
17348 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17349 && test -z "${cf_tst_cflags}" \
17350 && cf_fix_cppflags=no
17351 ;;
17352 esac
17353 done
17354
17355 if test -n "$cf_new_cflags" ; then
17356
17357 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17358 CFLAGS="${CFLAGS}$cf_new_cflags"
17359
17360 fi
17361
17362 if test -n "$cf_new_cppflags" ; then
17363
17364 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17365 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17366
17367 fi
17368
17369 if test -n "$cf_new_extra_cppflags" ; then
17370
17371 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17372 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17373
17374 fi
17375
17376 else
17377 IMAKE_CFLAGS=
17378 IMAKE_LOADFLAGS=
17379 test -n "$verbose" && echo " make fallback definitions" 1>&6
17380
17381 echo "${as_me:-configure}:17381: testing make fallback definitions ..." 1>&5
17382
17383 # We prefer config.guess' values when we can get them, to avoid
17384 # inconsistent results with uname (AIX for instance). However,
17385 # config.guess is not always consistent either.
17386 case $host_os in
17387 (*[0-9].[0-9]*)
17388 UNAME_RELEASE="$host_os"
17389 ;;
17390 (*)
17391 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
17392 ;;
17393 esac
17394
17395 case .$UNAME_RELEASE in
17396 (*[0-9].[0-9]*)
17397 OSMAJORVERSION=`echo "$UNAME_RELEASE" |sed -e 's/^[^0-9]*//' -e 's/\..*//'`
17398 OSMINORVERSION=`echo "$UNAME_RELEASE" |sed -e 's/^[^0-9]*//' -e 's/^[^.]*\.//' -e 's/\..*//' -e 's/[^0-9].*//' `
17399 test -z "$OSMAJORVERSION" && OSMAJORVERSION=1
17400 test -z "$OSMINORVERSION" && OSMINORVERSION=0
17401 IMAKE_CFLAGS="-DOSMAJORVERSION=$OSMAJORVERSION -DOSMINORVERSION=$OSMINORVERSION $IMAKE_CFLAGS"
17402 ;;
17403 esac
17404
17405 # FUNCPROTO is standard with X11R6, but XFree86 drops it, leaving some
17406 # fallback/fragments for NeedPrototypes, etc.
17407 IMAKE_CFLAGS="-DFUNCPROTO=15 $IMAKE_CFLAGS"
17408
17409 # If this is not set properly, Xaw's scrollbars will not work
17410 if test "$enable_narrowproto" = yes ; then
17411 IMAKE_CFLAGS="-DNARROWPROTO=1 $IMAKE_CFLAGS"
17412 fi
17413
17414 # Other special definitions:
17415 case $host_os in
17416 (aix*)
17417 # imake on AIX 5.1 defines AIXV3. really.
17418 IMAKE_CFLAGS="-DAIXV3 -DAIXV4 $IMAKE_CFLAGS"
17419 ;;
17420 (irix[56].*)
17421 # these are needed to make SIGWINCH work in xterm
17422 IMAKE_CFLAGS="-DSYSV -DSVR4 $IMAKE_CFLAGS"
17423 ;;
17424 esac
17425
17426 # "modern" systems install X applications in /usr/bin. Other systems may
17427 # use one of the X release-based directories.
17428 case "$CFLAGS $CPPFLAGS $IMAKE_CFLAGS" in
17429 (*-DPROJECTROOT*)
17430 ;;
17431 (*)
17432 for cf_dir in /usr/X11R7 /usr/X11R6 /usr/X11R5
17433 do
17434 if test -d "$cf_dir/bin"
17435 then
17436 IMAKE_CFLAGS="$IMAKE_CFLAGS -DPROJECTROOT=\\\"$cf_dir\\\""
17437 break
17438 fi
17439 done
17440 ;;
17441 esac
17442
17443 cf_fix_cppflags=no
17444 cf_new_cflags=
17445 cf_new_cppflags=
17446 cf_new_extra_cppflags=
17447
17448 for cf_add_cflags in $IMAKE_CFLAGS
17449 do
17450 case "$cf_fix_cppflags" in
17451 (no)
17452 case "$cf_add_cflags" in
17453 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17454 case "$cf_add_cflags" in
17455 (-D*)
17456 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17457
17458 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17459 && test -z "${cf_tst_cflags}" \
17460 && cf_fix_cppflags=yes
17461
17462 if test "$cf_fix_cppflags" = yes ; then
17463
17464 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17465 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17466
17467 continue
17468 elif test "${cf_tst_cflags}" = "\"'" ; then
17469
17470 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17471 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17472
17473 continue
17474 fi
17475 ;;
17476 esac
17477 case "$CPPFLAGS" in
17478 (*$cf_add_cflags)
17479 ;;
17480 (*)
17481 case "$cf_add_cflags" in
17482 (-D*)
17483 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17484
17485 CPPFLAGS=`echo "$CPPFLAGS" | \
17486 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17487 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17488
17489 ;;
17490 esac
17491
17492 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17493 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17494
17495 ;;
17496 esac
17497 ;;
17498 (*)
17499
17500 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17501 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17502
17503 ;;
17504 esac
17505 ;;
17506 (yes)
17507
17508 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17509 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17510
17511 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17512
17513 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17514 && test -z "${cf_tst_cflags}" \
17515 && cf_fix_cppflags=no
17516 ;;
17517 esac
17518 done
17519
17520 if test -n "$cf_new_cflags" ; then
17521
17522 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17523 CFLAGS="${CFLAGS}$cf_new_cflags"
17524
17525 fi
17526
17527 if test -n "$cf_new_cppflags" ; then
17528
17529 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17530 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17531
17532 fi
17533
17534 if test -n "$cf_new_extra_cppflags" ; then
17535
17536 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17537 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17538
17539 fi
17540
17541 fi
17542
17543 # Extract the first word of "groff", so it can be a program name with args.
17544 set dummy groff; ac_word=$2
17545 echo "$as_me:17545: checking for $ac_word" >&5
17546 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17547 if test "${ac_cv_path_GROFF_PATH+set}" = set; then
17548 echo $ECHO_N "(cached) $ECHO_C" >&6
17549 else
17550 case $GROFF_PATH in
17551 [\\/]* | ?:[\\/]*)
17552 ac_cv_path_GROFF_PATH="$GROFF_PATH" # Let the user override the test with a path.
17553 ;;
17554 *)
17555 ac_save_IFS=$IFS; IFS=$ac_path_separator
17556 ac_dummy="$PATH"
17557 for ac_dir in $ac_dummy; do
17558 IFS=$ac_save_IFS
17559 test -z "$ac_dir" && ac_dir=.
17560 if $as_executable_p "$ac_dir/$ac_word"; then
17561 ac_cv_path_GROFF_PATH="$ac_dir/$ac_word"
17562 echo "$as_me:17562: found $ac_dir/$ac_word" >&5
17563 break
17564 fi
17565 done
17566
17567 test -z "$ac_cv_path_GROFF_PATH" && ac_cv_path_GROFF_PATH="no"
17568 ;;
17569 esac
17570 fi
17571 GROFF_PATH=$ac_cv_path_GROFF_PATH
17572
17573 if test -n "$GROFF_PATH"; then
17574 echo "$as_me:17574: result: $GROFF_PATH" >&5
17575 echo "${ECHO_T}$GROFF_PATH" >&6
17576 else
17577 echo "$as_me:17577: result: no" >&5
17578 echo "${ECHO_T}no" >&6
17579 fi
17580
17581 for ac_prog in nroff mandoc
17582 do
17583 # Extract the first word of "$ac_prog", so it can be a program name with args.
17584 set dummy $ac_prog; ac_word=$2
17585 echo "$as_me:17585: checking for $ac_word" >&5
17586 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17587 if test "${ac_cv_path_NROFF_PATH+set}" = set; then
17588 echo $ECHO_N "(cached) $ECHO_C" >&6
17589 else
17590 case $NROFF_PATH in
17591 [\\/]* | ?:[\\/]*)
17592 ac_cv_path_NROFF_PATH="$NROFF_PATH" # Let the user override the test with a path.
17593 ;;
17594 *)
17595 ac_save_IFS=$IFS; IFS=$ac_path_separator
17596 ac_dummy="$PATH"
17597 for ac_dir in $ac_dummy; do
17598 IFS=$ac_save_IFS
17599 test -z "$ac_dir" && ac_dir=.
17600 if $as_executable_p "$ac_dir/$ac_word"; then
17601 ac_cv_path_NROFF_PATH="$ac_dir/$ac_word"
17602 echo "$as_me:17602: found $ac_dir/$ac_word" >&5
17603 break
17604 fi
17605 done
17606
17607 ;;
17608 esac
17609 fi
17610 NROFF_PATH=$ac_cv_path_NROFF_PATH
17611
17612 if test -n "$NROFF_PATH"; then
17613 echo "$as_me:17613: result: $NROFF_PATH" >&5
17614 echo "${ECHO_T}$NROFF_PATH" >&6
17615 else
17616 echo "$as_me:17616: result: no" >&5
17617 echo "${ECHO_T}no" >&6
17618 fi
17619
17620 test -n "$NROFF_PATH" && break
17621 done
17622 test -n "$NROFF_PATH" || NROFF_PATH="no"
17623
17624 # Extract the first word of "tbl", so it can be a program name with args.
17625 set dummy tbl; ac_word=$2
17626 echo "$as_me:17626: checking for $ac_word" >&5
17627 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17628 if test "${ac_cv_path_TBL_PATH+set}" = set; then
17629 echo $ECHO_N "(cached) $ECHO_C" >&6
17630 else
17631 case $TBL_PATH in
17632 [\\/]* | ?:[\\/]*)
17633 ac_cv_path_TBL_PATH="$TBL_PATH" # Let the user override the test with a path.
17634 ;;
17635 *)
17636 ac_save_IFS=$IFS; IFS=$ac_path_separator
17637 ac_dummy="$PATH"
17638 for ac_dir in $ac_dummy; do
17639 IFS=$ac_save_IFS
17640 test -z "$ac_dir" && ac_dir=.
17641 if $as_executable_p "$ac_dir/$ac_word"; then
17642 ac_cv_path_TBL_PATH="$ac_dir/$ac_word"
17643 echo "$as_me:17643: found $ac_dir/$ac_word" >&5
17644 break
17645 fi
17646 done
17647
17648 test -z "$ac_cv_path_TBL_PATH" && ac_cv_path_TBL_PATH="cat"
17649 ;;
17650 esac
17651 fi
17652 TBL_PATH=$ac_cv_path_TBL_PATH
17653
17654 if test -n "$TBL_PATH"; then
17655 echo "$as_me:17655: result: $TBL_PATH" >&5
17656 echo "${ECHO_T}$TBL_PATH" >&6
17657 else
17658 echo "$as_me:17658: result: no" >&5
17659 echo "${ECHO_T}no" >&6
17660 fi
17661
17662 if test "x$GROFF_PATH" = xno
17663 then
17664 NROFF_NOTE=
17665 GROFF_NOTE="#"
17666 else
17667 NROFF_NOTE="#"
17668 GROFF_NOTE=
17669 fi
17670
17671 echo "$as_me:17671: checking for fgrep" >&5
17672 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
17673 if test "${ac_cv_path_FGREP+set}" = set; then
17674 echo $ECHO_N "(cached) $ECHO_C" >&6
17675 else
17676 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
17677 then ac_cv_path_FGREP="$GREP -F"
17678 else
17679 for ac_prog in gfgrep fgrep
17680 do
17681 # Extract the first word of "$ac_prog", so it can be a program name with args.
17682 set dummy $ac_prog; ac_word=$2
17683 echo "$as_me:17683: checking for $ac_word" >&5
17684 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17685 if test "${ac_cv_path_FGREP+set}" = set; then
17686 echo $ECHO_N "(cached) $ECHO_C" >&6
17687 else
17688 case $FGREP in
17689 [\\/]* | ?:[\\/]*)
17690 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
17691 ;;
17692 *)
17693 ac_save_IFS=$IFS; IFS=$ac_path_separator
17694 ac_dummy="$PATH"
17695 for ac_dir in $ac_dummy; do
17696 IFS=$ac_save_IFS
17697 test -z "$ac_dir" && ac_dir=.
17698 if $as_executable_p "$ac_dir/$ac_word"; then
17699 ac_cv_path_FGREP="$ac_dir/$ac_word"
17700 echo "$as_me:17700: found $ac_dir/$ac_word" >&5
17701 break
17702 fi
17703 done
17704
17705 ;;
17706 esac
17707 fi
17708 FGREP=$ac_cv_path_FGREP
17709
17710 if test -n "$FGREP"; then
17711 echo "$as_me:17711: result: $FGREP" >&5
17712 echo "${ECHO_T}$FGREP" >&6
17713 else
17714 echo "$as_me:17714: result: no" >&5
17715 echo "${ECHO_T}no" >&6
17716 fi
17717
17718 test -n "$FGREP" && break
17719 done
17720 test -n "$FGREP" || FGREP=": "
17721
17722 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:17722: error: cannot find workable fgrep" >&5
17723 echo "$as_me: error: cannot find workable fgrep" >&2;}
17724 { (exit 1); exit 1; }; }
17725 fi
17726 fi
17727 echo "$as_me:17727: result: $ac_cv_path_FGREP" >&5
17728 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
17729 FGREP="$ac_cv_path_FGREP"
17730
17731 case "x${with_man2html}" in
17732 (xno)
17733 cf_man2html=no
17734 ;;
17735 (x|xyes)
17736 # Extract the first word of "man2html", so it can be a program name with args.
17737 set dummy man2html; ac_word=$2
17738 echo "$as_me:17738: checking for $ac_word" >&5
17739 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17740 if test "${ac_cv_path_cf_man2html+set}" = set; then
17741 echo $ECHO_N "(cached) $ECHO_C" >&6
17742 else
17743 case $cf_man2html in
17744 [\\/]* | ?:[\\/]*)
17745 ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
17746 ;;
17747 *)
17748 ac_save_IFS=$IFS; IFS=$ac_path_separator
17749 ac_dummy="$PATH"
17750 for ac_dir in $ac_dummy; do
17751 IFS=$ac_save_IFS
17752 test -z "$ac_dir" && ac_dir=.
17753 if $as_executable_p "$ac_dir/$ac_word"; then
17754 ac_cv_path_cf_man2html="$ac_dir/$ac_word"
17755 echo "$as_me:17755: found $ac_dir/$ac_word" >&5
17756 break
17757 fi
17758 done
17759
17760 test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
17761 ;;
17762 esac
17763 fi
17764 cf_man2html=$ac_cv_path_cf_man2html
17765
17766 if test -n "$cf_man2html"; then
17767 echo "$as_me:17767: result: $cf_man2html" >&5
17768 echo "${ECHO_T}$cf_man2html" >&6
17769 else
17770 echo "$as_me:17770: result: no" >&5
17771 echo "${ECHO_T}no" >&6
17772 fi
17773
17774 case "x$cf_man2html" in
17775 (x/*)
17776 echo "$as_me:17776: checking for the modified Earl Hood script" >&5
17777 echo $ECHO_N "checking for the modified Earl Hood script... $ECHO_C" >&6
17778 if ( $cf_man2html -help 2>&1 | grep 'Make an index of headers at the end' >/dev/null )
17779 then
17780 cf_man2html_ok=yes
17781 else
17782 cf_man2html=no
17783 cf_man2html_ok=no
17784 fi
17785 echo "$as_me:17785: result: $cf_man2html_ok" >&5
17786 echo "${ECHO_T}$cf_man2html_ok" >&6
17787 ;;
17788 (*)
17789 cf_man2html=no
17790 ;;
17791 esac
17792 esac
17793
17794 echo "$as_me:17794: checking for program to convert manpage to html" >&5
17795 echo $ECHO_N "checking for program to convert manpage to html... $ECHO_C" >&6
17796
17797 # Check whether --with-man2html or --without-man2html was given.
17798 if test "${with_man2html+set}" = set; then
17799 withval="$with_man2html"
17800 cf_man2html=$withval
17801 else
17802 cf_man2html=$cf_man2html
17803 fi;
17804
17805 cf_with_groff=no
17806
17807 case $cf_man2html in
17808 (yes)
17809 echo "$as_me:17809: result: man2html" >&5
17810 echo "${ECHO_T}man2html" >&6
17811 # Extract the first word of "man2html", so it can be a program name with args.
17812 set dummy man2html; ac_word=$2
17813 echo "$as_me:17813: checking for $ac_word" >&5
17814 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17815 if test "${ac_cv_path_cf_man2html+set}" = set; then
17816 echo $ECHO_N "(cached) $ECHO_C" >&6
17817 else
17818 case $cf_man2html in
17819 [\\/]* | ?:[\\/]*)
17820 ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
17821 ;;
17822 *)
17823 ac_save_IFS=$IFS; IFS=$ac_path_separator
17824 ac_dummy="$PATH"
17825 for ac_dir in $ac_dummy; do
17826 IFS=$ac_save_IFS
17827 test -z "$ac_dir" && ac_dir=.
17828 if $as_executable_p "$ac_dir/$ac_word"; then
17829 ac_cv_path_cf_man2html="$ac_dir/$ac_word"
17830 echo "$as_me:17830: found $ac_dir/$ac_word" >&5
17831 break
17832 fi
17833 done
17834
17835 test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
17836 ;;
17837 esac
17838 fi
17839 cf_man2html=$ac_cv_path_cf_man2html
17840
17841 if test -n "$cf_man2html"; then
17842 echo "$as_me:17842: result: $cf_man2html" >&5
17843 echo "${ECHO_T}$cf_man2html" >&6
17844 else
17845 echo "$as_me:17845: result: no" >&5
17846 echo "${ECHO_T}no" >&6
17847 fi
17848
17849 ;;
17850 (no|groff|*/groff*)
17851 cf_with_groff=yes
17852 cf_man2html=$GROFF_PATH
17853 echo "$as_me:17853: result: $cf_man2html" >&5
17854 echo "${ECHO_T}$cf_man2html" >&6
17855 ;;
17856 (*)
17857 echo "$as_me:17857: result: $cf_man2html" >&5
17858 echo "${ECHO_T}$cf_man2html" >&6
17859 ;;
17860 esac
17861
17862 MAN2HTML_TEMP="man2html.tmp"
17863 cat >$MAN2HTML_TEMP <<CF_EOF
17864 #!$SHELL
17865 # Temporary script generated by CF_WITH_MAN2HTML
17866 # Convert inputs to html, sending result to standard output.
17867 #
17868 # Parameters:
17869 # \${1} = rootname of file to convert
17870 # \${2} = suffix of file to convert, e.g., "1"
17871 # \${3} = macros to use, e.g., "man"
17872 #
17873 ROOT=\$1
17874 TYPE=\$2
17875 MACS=\$3
17876
17877 unset LANG
17878 unset LC_ALL
17879 unset LC_CTYPE
17880 unset LANGUAGE
17881 GROFF_NO_SGR=stupid
17882 export GROFF_NO_SGR
17883
17884 CF_EOF
17885
17886 NROFF_OPTS=
17887 if test "x$cf_with_groff" = xyes
17888 then
17889 MAN2HTML_NOTE="$GROFF_NOTE"
17890 MAN2HTML_PATH="$GROFF_PATH"
17891 cat >>$MAN2HTML_TEMP <<CF_EOF
17892 $SHELL -c "$TBL_PATH \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
17893 CF_EOF
17894 else
17895 # disable hyphenation if this is groff
17896 if test "x$GROFF_PATH" != xno
17897 then
17898 echo "$as_me:17898: checking if nroff is really groff" >&5
17899 echo $ECHO_N "checking if nroff is really groff... $ECHO_C" >&6
17900 cf_check_groff="`$NROFF_PATH --version 2>/dev/null | grep groff`"
17901 test -n "$cf_check_groff" && cf_check_groff=yes
17902 test -n "$cf_check_groff" || cf_check_groff=no
17903 echo "$as_me:17903: result: $cf_check_groff" >&5
17904 echo "${ECHO_T}$cf_check_groff" >&6
17905 test "x$cf_check_groff" = xyes && NROFF_OPTS="-rHY=0"
17906 fi
17907 MAN2HTML_NOTE=""
17908
17909 if test "x$prefix" != xNONE; then
17910 cf_path_syntax="$prefix"
17911 else
17912 cf_path_syntax="$ac_default_prefix"
17913 fi
17914
17915 case ".$cf_man2html" in
17916 (.\$\(*\)*|.\'*\'*)
17917 ;;
17918 (..|./*|.\\*)
17919 ;;
17920 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17921 ;;
17922 (.\$\{*prefix\}*|.\$\{*dir\}*)
17923 eval cf_man2html="$cf_man2html"
17924 case ".$cf_man2html" in
17925 (.NONE/*)
17926 cf_man2html=`echo "$cf_man2html" | sed -e s%NONE%$cf_path_syntax%`
17927 ;;
17928 esac
17929 ;;
17930 (.no|.NONE/*)
17931 cf_man2html=`echo "$cf_man2html" | sed -e s%NONE%$cf_path_syntax%`
17932 ;;
17933 (*)
17934 { { echo "$as_me:17934: error: expected a pathname, not \"$cf_man2html\"" >&5
17935 echo "$as_me: error: expected a pathname, not \"$cf_man2html\"" >&2;}
17936 { (exit 1); exit 1; }; }
17937 ;;
17938 esac
17939
17940 MAN2HTML_PATH="$cf_man2html"
17941 echo "$as_me:17941: checking for $cf_man2html top/bottom margins" >&5
17942 echo $ECHO_N "checking for $cf_man2html top/bottom margins... $ECHO_C" >&6
17943
17944 # for this example, expect 3 lines of content, the remainder is head/foot
17945 cat >conftest.in <<CF_EOF
17946 .TH HEAD1 HEAD2 HEAD3 HEAD4 HEAD5
17947 .SH SECTION
17948 MARKER
17949 CF_EOF
17950
17951 LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
17952
17953 cf_man2html_1st="`${FGREP-fgrep} -n MARKER conftest.out |sed -e 's/^[^0-9]*://' -e 's/:.*//'`"
17954 cf_man2html_top=`expr "$cf_man2html_1st" - 2`
17955 cf_man2html_bot="`wc -l conftest.out |sed -e 's/[^0-9]//g'`"
17956 cf_man2html_bot=`expr "$cf_man2html_bot" - 2 - "$cf_man2html_top"`
17957 cf_man2html_top_bot="-topm=$cf_man2html_top -botm=$cf_man2html_bot"
17958
17959 echo "$as_me:17959: result: $cf_man2html_top_bot" >&5
17960 echo "${ECHO_T}$cf_man2html_top_bot" >&6
17961
17962 echo "$as_me:17962: checking for pagesize to use" >&5
17963 echo $ECHO_N "checking for pagesize to use... $ECHO_C" >&6
17964 for cf_block in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
17965 do
17966 cat >>conftest.in <<CF_EOF
17967 .nf
17968 0
17969 1
17970 2
17971 3
17972 4
17973 5
17974 6
17975 7
17976 8
17977 9
17978 CF_EOF
17979 done
17980
17981 LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
17982 cf_man2html_page="`${FGREP-fgrep} -n HEAD1 conftest.out |sed -n '$p' |sed -e 's/^[^0-9]*://' -e 's/:.*//'`"
17983 test -z "$cf_man2html_page" && cf_man2html_page=99999
17984 test "$cf_man2html_page" -gt 100 && cf_man2html_page=99999
17985
17986 rm -rf conftest*
17987 echo "$as_me:17987: result: $cf_man2html_page" >&5
17988 echo "${ECHO_T}$cf_man2html_page" >&6
17989
17990 cat >>$MAN2HTML_TEMP <<CF_EOF
17991 : \${MAN2HTML_PATH=$MAN2HTML_PATH}
17992 MAN2HTML_OPTS="\$MAN2HTML_OPTS -index -title=\"\$ROOT(\$TYPE)\" -compress -pgsize $cf_man2html_page"
17993 case \${TYPE} in
17994 (ms)
17995 $TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH -topm=0 -botm=0 \$MAN2HTML_OPTS
17996 ;;
17997 (*)
17998 $TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH $cf_man2html_top_bot \$MAN2HTML_OPTS
17999 ;;
18000 esac
18001 CF_EOF
18002 fi
18003
18004 chmod 700 $MAN2HTML_TEMP
18005
18006 # If we have already established that there is a full termcap implementation,
18007 # suppress the definitions for terminfo that we make have imported from the
18008 # imake-file.
18009 if test "x$cf_cv_lib_tgetent" != xno || test "x$cf_cv_lib_part_tgetent" != xno ; then
18010 case "$IMAKE_CFLAGS" in
18011 (*-DUSE_TERMINFO\ -DHAVE_TIGETSTR*)
18012
18013 test -n "$verbose" && echo " removing terminfo flags from IMAKE_CFLAGS" 1>&6
18014
18015 echo "${as_me:-configure}:18015: testing removing terminfo flags from IMAKE_CFLAGS ..." 1>&5
18016
18017 IMAKE_CFLAGS=`echo "$IMAKE_CFLAGS" | sed -e 's/-DUSE_TERMINFO[ ]*-DHAVE_TIGETSTR[ ]*//'`
18018 test -n "$verbose" && echo " ...result $IMAKE_CFLAGS" 1>&6
18019
18020 echo "${as_me:-configure}:18020: testing ...result $IMAKE_CFLAGS ..." 1>&5
18021
18022 test -n "$verbose" && echo " removing terminfo flags from CPPFLAGS" 1>&6
18023
18024 echo "${as_me:-configure}:18024: testing removing terminfo flags from CPPFLAGS ..." 1>&5
18025
18026 CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-DUSE_TERMINFO[ ]*-DHAVE_TIGETSTR[ ]*//'`
18027 test -n "$verbose" && echo " ...result $CPPFLAGS" 1>&6
18028
18029 echo "${as_me:-configure}:18029: testing ...result $CPPFLAGS ..." 1>&5
18030
18031 ;;
18032 esac
18033 fi
18034
18035 echo "$as_me:18035: checking for default terminal-id" >&5
18036 echo $ECHO_N "checking for default terminal-id... $ECHO_C" >&6
18037
18038 # Check whether --with-terminal-id or --without-terminal-id was given.
18039 if test "${with_terminal_id+set}" = set; then
18040 withval="$with_terminal_id"
18041 default_termid=$withval
18042 else
18043 default_termid=vt420
18044 fi;
18045 echo "$as_me:18045: result: $default_termid" >&5
18046 echo "${ECHO_T}$default_termid" >&6
18047 case $default_termid in
18048 (vt*) default_termid=`echo $default_termid | sed -e 's/^..//'`
18049 ;;
18050 esac
18051
18052 cat >>confdefs.h <<EOF
18053 #define DFT_DECID "$default_termid"
18054 EOF
18055
18056 echo "$as_me:18056: checking for default terminal-type" >&5
18057 echo $ECHO_N "checking for default terminal-type... $ECHO_C" >&6
18058
18059 # Check whether --with-terminal-type or --without-terminal-type was given.
18060 if test "${with_terminal_type+set}" = set; then
18061 withval="$with_terminal_type"
18062 default_TERM=$withval
18063 else
18064 default_TERM=xterm
18065 fi;
18066 echo "$as_me:18066: result: $default_TERM" >&5
18067 echo "${ECHO_T}$default_TERM" >&6
18068
18069 cat >>confdefs.h <<EOF
18070 #define DFT_TERMTYPE "$default_TERM"
18071 EOF
18072
18073 ###############################################################################
18074 echo "$as_me:18074: checking if backarrow-key should be BS" >&5
18075 echo $ECHO_N "checking if backarrow-key should be BS... $ECHO_C" >&6
18076
18077 # Check whether --enable-backarrow-key or --disable-backarrow-key was given.
18078 if test "${enable_backarrow_key+set}" = set; then
18079 enableval="$enable_backarrow_key"
18080 test "$enableval" != no && enableval=yes
18081 if test "$enableval" != "yes" ; then
18082 backarrow_is_bs=$enableval
18083 else
18084 backarrow_is_bs=yes
18085 fi
18086 else
18087 enableval=yes
18088 backarrow_is_bs=yes
18089
18090 fi;
18091
18092 echo "$as_me:18092: result: $backarrow_is_bs" >&5
18093 echo "${ECHO_T}$backarrow_is_bs" >&6
18094 case $backarrow_is_bs in
18095 (yes)
18096 backarrow_is_bs=true
18097 ;;
18098 (no)
18099 backarrow_is_bs=false
18100 ;;
18101 esac
18102 cf_xbool1=`echo "$backarrow_is_bs"|sed -e 's/^\(.\).*/\1/'`
18103
18104 cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18105
18106 cf_xbool2=`echo "$backarrow_is_bs"|sed -e 's/^.//'`
18107 backarrow_is_bs=${cf_xbool1}${cf_xbool2}
18108
18109 cat >>confdefs.h <<EOF
18110 #define DEF_BACKARO_BS $backarrow_is_bs
18111 EOF
18112
18113 echo "$as_me:18113: checking if backarrow-key should be treated as erase" >&5
18114 echo $ECHO_N "checking if backarrow-key should be treated as erase... $ECHO_C" >&6
18115
18116 # Check whether --enable-backarrow-is-erase or --disable-backarrow-is-erase was given.
18117 if test "${enable_backarrow_is_erase+set}" = set; then
18118 enableval="$enable_backarrow_is_erase"
18119 test "$enableval" != yes && enableval=no
18120 if test "$enableval" != "no" ; then
18121 backarrow_is_erase=$enableval
18122 else
18123 backarrow_is_erase=no
18124 fi
18125 else
18126 enableval=no
18127 backarrow_is_erase=no
18128
18129 fi;
18130
18131 echo "$as_me:18131: result: $backarrow_is_erase" >&5
18132 echo "${ECHO_T}$backarrow_is_erase" >&6
18133 case $backarrow_is_erase in
18134 (yes)
18135 backarrow_is_erase=true
18136 ;;
18137 (no)
18138 backarrow_is_erase=false
18139 ;;
18140 esac
18141 cf_xbool1=`echo "$backarrow_is_erase"|sed -e 's/^\(.\).*/\1/'`
18142
18143 cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18144
18145 cf_xbool2=`echo "$backarrow_is_erase"|sed -e 's/^.//'`
18146 backarrow_is_erase=${cf_xbool1}${cf_xbool2}
18147
18148 cat >>confdefs.h <<EOF
18149 #define DEF_BACKARO_ERASE $backarrow_is_erase
18150 EOF
18151
18152 echo "$as_me:18152: checking for default backspace/DEL setting" >&5
18153 echo $ECHO_N "checking for default backspace/DEL setting... $ECHO_C" >&6
18154
18155 # Check whether --enable-delete-is-del or --disable-delete-is-del was given.
18156 if test "${enable_delete_is_del+set}" = set; then
18157 enableval="$enable_delete_is_del"
18158 delete_is_del=$enableval
18159 else
18160 delete_is_del=maybe
18161 fi;
18162
18163 echo "$as_me:18163: result: $delete_is_del" >&5
18164 echo "${ECHO_T}$delete_is_del" >&6
18165 case $delete_is_del in
18166 (yes)
18167 delete_is_del=true
18168 ;;
18169 (no)
18170 delete_is_del=false
18171 ;;
18172 esac
18173 cf_xbool1=`echo "$delete_is_del"|sed -e 's/^\(.\).*/\1/'`
18174
18175 cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18176
18177 cf_xbool2=`echo "$delete_is_del"|sed -e 's/^.//'`
18178 delete_is_del=${cf_xbool1}${cf_xbool2}
18179
18180 cat >>confdefs.h <<EOF
18181 #define DEFDELETE_DEL $delete_is_del
18182 EOF
18183
18184 echo "$as_me:18184: checking for default pty initial erase setting" >&5
18185 echo $ECHO_N "checking for default pty initial erase setting... $ECHO_C" >&6
18186
18187 # Check whether --enable-pty-erase or --disable-pty-erase was given.
18188 if test "${enable_pty_erase+set}" = set; then
18189 enableval="$enable_pty_erase"
18190 initial_erase=$enableval
18191 else
18192 initial_erase=False
18193 fi;
18194
18195 echo "$as_me:18195: result: $initial_erase" >&5
18196 echo "${ECHO_T}$initial_erase" >&6
18197 case $initial_erase in
18198 (yes)
18199 initial_erase=true
18200 ;;
18201 (no)
18202 initial_erase=false
18203 ;;
18204 esac
18205 cf_xbool1=`echo "$initial_erase"|sed -e 's/^\(.\).*/\1/'`
18206
18207 cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18208
18209 cf_xbool2=`echo "$initial_erase"|sed -e 's/^.//'`
18210 initial_erase=${cf_xbool1}${cf_xbool2}
18211
18212 cat >>confdefs.h <<EOF
18213 #define DEF_INITIAL_ERASE $initial_erase
18214 EOF
18215
18216 echo "$as_me:18216: checking if alt should send ESC" >&5
18217 echo $ECHO_N "checking if alt should send ESC... $ECHO_C" >&6
18218
18219 # Check whether --enable-alt-sends-esc or --disable-alt-sends-esc was given.
18220 if test "${enable_alt_sends_esc+set}" = set; then
18221 enableval="$enable_alt_sends_esc"
18222 test "$enableval" != yes && enableval=no
18223 if test "$enableval" != "no" ; then
18224 alt_sends_esc=$enableval
18225 else
18226 alt_sends_esc=no
18227 fi
18228 else
18229 enableval=no
18230 alt_sends_esc=no
18231
18232 fi;
18233
18234 echo "$as_me:18234: result: $alt_sends_esc" >&5
18235 echo "${ECHO_T}$alt_sends_esc" >&6
18236 case $alt_sends_esc in
18237 (yes)
18238 alt_sends_esc=true
18239 ;;
18240 (no)
18241 alt_sends_esc=false
18242 ;;
18243 esac
18244 cf_xbool1=`echo "$alt_sends_esc"|sed -e 's/^\(.\).*/\1/'`
18245
18246 cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18247
18248 cf_xbool2=`echo "$alt_sends_esc"|sed -e 's/^.//'`
18249 alt_sends_esc=${cf_xbool1}${cf_xbool2}
18250
18251 cat >>confdefs.h <<EOF
18252 #define DEF_ALT_SENDS_ESC $alt_sends_esc
18253 EOF
18254
18255 echo "$as_me:18255: checking if meta should send ESC" >&5
18256 echo $ECHO_N "checking if meta should send ESC... $ECHO_C" >&6
18257
18258 # Check whether --enable-meta-sends-esc or --disable-meta-sends-esc was given.
18259 if test "${enable_meta_sends_esc+set}" = set; then
18260 enableval="$enable_meta_sends_esc"
18261 test "$enableval" != yes && enableval=no
18262 if test "$enableval" != "no" ; then
18263 meta_sends_esc=$enableval
18264 else
18265 meta_sends_esc=no
18266 fi
18267 else
18268 enableval=no
18269 meta_sends_esc=no
18270
18271 fi;
18272
18273 echo "$as_me:18273: result: $meta_sends_esc" >&5
18274 echo "${ECHO_T}$meta_sends_esc" >&6
18275 case $meta_sends_esc in
18276 (yes)
18277 meta_sends_esc=true
18278 ;;
18279 (no)
18280 meta_sends_esc=false
18281 ;;
18282 esac
18283 cf_xbool1=`echo "$meta_sends_esc"|sed -e 's/^\(.\).*/\1/'`
18284
18285 cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18286
18287 cf_xbool2=`echo "$meta_sends_esc"|sed -e 's/^.//'`
18288 meta_sends_esc=${cf_xbool1}${cf_xbool2}
18289
18290 cat >>confdefs.h <<EOF
18291 #define DEF_META_SENDS_ESC $meta_sends_esc
18292 EOF
18293
18294 ###############################################################################
18295 # Extract the first word of "tic", so it can be a program name with args.
18296 set dummy tic; ac_word=$2
18297 echo "$as_me:18297: checking for $ac_word" >&5
18298 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18299 if test "${ac_cv_prog_cf_tic_prog+set}" = set; then
18300 echo $ECHO_N "(cached) $ECHO_C" >&6
18301 else
18302 if test -n "$cf_tic_prog"; then
18303 ac_cv_prog_cf_tic_prog="$cf_tic_prog" # Let the user override the test.
18304 else
18305 ac_save_IFS=$IFS; IFS=$ac_path_separator
18306 ac_dummy="$PATH"
18307 for ac_dir in $ac_dummy; do
18308 IFS=$ac_save_IFS
18309 test -z "$ac_dir" && ac_dir=.
18310 $as_executable_p "$ac_dir/$ac_word" || continue
18311 ac_cv_prog_cf_tic_prog="yes"
18312 echo "$as_me:18312: found $ac_dir/$ac_word" >&5
18313 break
18314 done
18315
18316 test -z "$ac_cv_prog_cf_tic_prog" && ac_cv_prog_cf_tic_prog="no"
18317 fi
18318 fi
18319 cf_tic_prog=$ac_cv_prog_cf_tic_prog
18320 if test -n "$cf_tic_prog"; then
18321 echo "$as_me:18321: result: $cf_tic_prog" >&5
18322 echo "${ECHO_T}$cf_tic_prog" >&6
18323 else
18324 echo "$as_me:18324: result: no" >&5
18325 echo "${ECHO_T}no" >&6
18326 fi
18327
18328 if test "$cf_tic_prog" = yes ; then
18329 if test -n "$TERMINFO"
18330 then
18331 case "$TERMINFO" in
18332 (/*)
18333 test -d "$TERMINFO" || unset TERMINFO
18334 ;;
18335 (*)
18336 unset TERMINFO
18337 ;;
18338 esac
18339 fi
18340 echo "$as_me:18340: checking for private terminfo-directory" >&5
18341 echo $ECHO_N "checking for private terminfo-directory... $ECHO_C" >&6
18342
18343 # Check whether --with-own-terminfo or --without-own-terminfo was given.
18344 if test "${with_own_terminfo+set}" = set; then
18345 withval="$with_own_terminfo"
18346 TERMINFO_DIR=$withval
18347 else
18348 TERMINFO_DIR=${TERMINFO-none}
18349 fi;
18350 echo "$as_me:18350: result: $TERMINFO_DIR" >&5
18351 echo "${ECHO_T}$TERMINFO_DIR" >&6
18352 if test "$TERMINFO_DIR" = yes ; then
18353 { echo "$as_me:18353: WARNING: no value given" >&5
18354 echo "$as_me: WARNING: no value given" >&2;}
18355 elif test "$TERMINFO_DIR" != none ; then
18356 if test -d "$TERMINFO_DIR" ; then
18357
18358 cat >>confdefs.h <<EOF
18359 #define OWN_TERMINFO_DIR "$TERMINFO_DIR"
18360 EOF
18361
18362 echo "$as_me:18362: checking if \$TERMINFO should also be set" >&5
18363 echo $ECHO_N "checking if \$TERMINFO should also be set... $ECHO_C" >&6
18364
18365 # Check whether --enable-env-terminfo or --disable-env-terminfo was given.
18366 if test "${enable_env_terminfo+set}" = set; then
18367 enableval="$enable_env_terminfo"
18368 cf_env_terminfo=yes
18369 else
18370 cf_env_terminfo=no
18371 fi;
18372 echo "$as_me:18372: result: $cf_env_terminfo" >&5
18373 echo "${ECHO_T}$cf_env_terminfo" >&6
18374 test $cf_env_terminfo = yes &&
18375
18376 cat >>confdefs.h <<\EOF
18377 #define OWN_TERMINFO_ENV 1
18378 EOF
18379
18380 else
18381 { echo "$as_me:18381: WARNING: not a directory" >&5
18382 echo "$as_me: WARNING: not a directory" >&2;}
18383 fi
18384 elif test "$prefix" != NONE ; then
18385 TERMINFO_DIR='${prefix}/lib/terminfo'
18386 elif test -d /usr/lib/terminfo ; then
18387 TERMINFO_DIR=/usr/lib/terminfo
18388 else
18389 TERMINFO_DIR=
18390 fi
18391 SET_TERMINFO=
18392 if test -n "$TERMINFO_DIR" ; then
18393 TERMINFO_DIR='${DESTDIR}'$TERMINFO_DIR
18394 SET_TERMINFO='TERMINFO=${TERMINFO_DIR}'
18395 fi
18396 no_ticprog=
18397 else
18398 no_ticprog="#"
18399 TERMINFO_DIR=
18400 SET_TERMINFO=
18401 fi
18402
18403 ###############################################################################
18404
18405 echo "$as_me:18405: checking if you want active-icons" >&5
18406 echo $ECHO_N "checking if you want active-icons... $ECHO_C" >&6
18407
18408 # Check whether --enable-active-icon or --disable-active-icon was given.
18409 if test "${enable_active_icon+set}" = set; then
18410 enableval="$enable_active_icon"
18411 test "$enableval" != no && enableval=yes
18412 if test "$enableval" != "yes" ; then
18413 enable_active_icon=no
18414 else
18415 enable_active_icon=yes
18416 fi
18417 else
18418 enableval=yes
18419 enable_active_icon=yes
18420
18421 fi;
18422 echo "$as_me:18422: result: $enable_active_icon" >&5
18423 echo "${ECHO_T}$enable_active_icon" >&6
18424 if test "$enable_active_icon" = no ; then
18425
18426 cat >>confdefs.h <<\EOF
18427 #define NO_ACTIVE_ICON 1
18428 EOF
18429
18430 fi
18431
18432 echo "$as_me:18432: checking if you want ANSI color" >&5
18433 echo $ECHO_N "checking if you want ANSI color... $ECHO_C" >&6
18434
18435 # Check whether --enable-ansi-color or --disable-ansi-color was given.
18436 if test "${enable_ansi_color+set}" = set; then
18437 enableval="$enable_ansi_color"
18438 test "$enableval" != no && enableval=yes
18439 if test "$enableval" != "yes" ; then
18440 enable_ansi_color=no
18441 else
18442 enable_ansi_color=yes
18443 fi
18444 else
18445 enableval=yes
18446 enable_ansi_color=yes
18447
18448 fi;
18449 echo "$as_me:18449: result: $enable_ansi_color" >&5
18450 echo "${ECHO_T}$enable_ansi_color" >&6
18451 test "$enable_ansi_color" = no &&
18452 cat >>confdefs.h <<\EOF
18453 #define OPT_ISO_COLORS 0
18454 EOF
18455
18456 if test "$enable_ansi_color" = yes ; then
18457
18458 echo "$as_me:18458: checking if you want 16 colors like aixterm" >&5
18459 echo $ECHO_N "checking if you want 16 colors like aixterm... $ECHO_C" >&6
18460
18461 # Check whether --enable-16-color or --disable-16-color was given.
18462 if test "${enable_16_color+set}" = set; then
18463 enableval="$enable_16_color"
18464 test "$enableval" != no && enableval=yes
18465 if test "$enableval" != "yes" ; then
18466 enable_16_color=no
18467 else
18468 enable_16_color=yes
18469 fi
18470 else
18471 enableval=yes
18472 enable_16_color=yes
18473
18474 fi;
18475 echo "$as_me:18475: result: $enable_16_color" >&5
18476 echo "${ECHO_T}$enable_16_color" >&6
18477 test "$enable_16_color" = no &&
18478 cat >>confdefs.h <<\EOF
18479 #define OPT_AIX_COLORS 0
18480 EOF
18481
18482 echo "$as_me:18482: checking if you want 256 colors" >&5
18483 echo $ECHO_N "checking if you want 256 colors... $ECHO_C" >&6
18484
18485 # Check whether --enable-256-color or --disable-256-color was given.
18486 if test "${enable_256_color+set}" = set; then
18487 enableval="$enable_256_color"
18488 test "$enableval" != no && enableval=yes
18489 if test "$enableval" != "yes" ; then
18490 enable_256_color=no
18491 else
18492 enable_256_color=yes
18493 fi
18494 else
18495 enableval=yes
18496 enable_256_color=yes
18497
18498 fi;
18499 echo "$as_me:18499: result: $enable_256_color" >&5
18500 echo "${ECHO_T}$enable_256_color" >&6
18501
18502 if test "$enable_256_color" = yes ; then
18503
18504 CHARPROC_DEPS="$CHARPROC_DEPS 256colres.h"
18505 EXTRAHDRS="$EXTRAHDRS 256colres.h"
18506
18507 cat >>confdefs.h <<\EOF
18508 #define OPT_256_COLORS 1
18509 EOF
18510
18511 echo "$as_me:18511: checking if you want direct-color support" >&5
18512 echo $ECHO_N "checking if you want direct-color support... $ECHO_C" >&6
18513
18514 # Check whether --enable-direct-color or --disable-direct-color was given.
18515 if test "${enable_direct_color+set}" = set; then
18516 enableval="$enable_direct_color"
18517 test "$enableval" != no && enableval=yes
18518 if test "$enableval" != "yes" ; then
18519 enable_direct_color=no
18520 else
18521 enable_direct_color=yes
18522 fi
18523 else
18524 enableval=yes
18525 enable_direct_color=yes
18526
18527 fi;
18528 echo "$as_me:18528: result: $enable_direct_color" >&5
18529 echo "${ECHO_T}$enable_direct_color" >&6
18530 if test "$enable_direct_color" = yes ; then
18531
18532 cat >>confdefs.h <<\EOF
18533 #define OPT_DIRECT_COLOR 1
18534 EOF
18535
18536 fi
18537
18538 else
18539
18540 echo "$as_me:18540: checking if you want 88 colors" >&5
18541 echo $ECHO_N "checking if you want 88 colors... $ECHO_C" >&6
18542
18543 # Check whether --enable-88-color or --disable-88-color was given.
18544 if test "${enable_88_color+set}" = set; then
18545 enableval="$enable_88_color"
18546 test "$enableval" != no && enableval=yes
18547 if test "$enableval" != "yes" ; then
18548 enable_88_color=no
18549 else
18550 enable_88_color=yes
18551 fi
18552 else
18553 enableval=yes
18554 enable_88_color=yes
18555
18556 fi;
18557 echo "$as_me:18557: result: $enable_88_color" >&5
18558 echo "${ECHO_T}$enable_88_color" >&6
18559 if test "$enable_88_color" = yes ; then
18560 CHARPROC_DEPS="$CHARPROC_DEPS 88colres.h"
18561 EXTRAHDRS="$EXTRAHDRS 88colres.h"
18562
18563 cat >>confdefs.h <<\EOF
18564 #define OPT_88_COLORS 1
18565 EOF
18566
18567 fi
18568
18569 fi
18570
18571 fi
18572
18573 echo "$as_me:18573: checking if you want blinking cursor" >&5
18574 echo $ECHO_N "checking if you want blinking cursor... $ECHO_C" >&6
18575
18576 # Check whether --enable-blink-cursor or --disable-blink-cursor was given.
18577 if test "${enable_blink_cursor+set}" = set; then
18578 enableval="$enable_blink_cursor"
18579 test "$enableval" != no && enableval=yes
18580 if test "$enableval" != "yes" ; then
18581 enable_blink_curs=no
18582 else
18583 enable_blink_curs=yes
18584 fi
18585 else
18586 enableval=yes
18587 enable_blink_curs=yes
18588
18589 fi;
18590 echo "$as_me:18590: result: $enable_blink_curs" >&5
18591 echo "${ECHO_T}$enable_blink_curs" >&6
18592 test "$enable_blink_curs" = no &&
18593 cat >>confdefs.h <<\EOF
18594 #define OPT_BLINK_CURS 0
18595 EOF
18596
18597 echo "$as_me:18597: checking if you want to ignore Linux's broken palette-strings" >&5
18598 echo $ECHO_N "checking if you want to ignore Linux's broken palette-strings... $ECHO_C" >&6
18599
18600 case $host_os in
18601 (linux*)
18602 assume_broken_osc=yes ;;
18603 (*)
18604 assume_broken_osc=no ;;
18605 esac
18606
18607 # Check whether --enable-broken-osc or --disable-broken-osc was given.
18608 if test "${enable_broken_osc+set}" = set; then
18609 enableval="$enable_broken_osc"
18610 test "$enableval" != no && enableval=yes
18611 if test "$enableval" != "$assume_broken_osc" ; then
18612 enable_broken_osc=$enableval
18613 else
18614 enable_broken_osc=$enableval
18615 fi
18616 else
18617 enableval=$assume_broken_osc
18618 enable_broken_osc=$enableval
18619
18620 fi;
18621 echo "$as_me:18621: result: $enable_broken_osc" >&5
18622 echo "${ECHO_T}$enable_broken_osc" >&6
18623 if test "$enable_broken_osc" = yes ; then
18624
18625 cat >>confdefs.h <<\EOF
18626 #define OPT_BROKEN_OSC 1
18627 EOF
18628
18629 else
18630
18631 cat >>confdefs.h <<\EOF
18632 #define OPT_BROKEN_OSC 0
18633 EOF
18634
18635 fi
18636
18637 echo "$as_me:18637: checking if you want to allow broken string-terminators" >&5
18638 echo $ECHO_N "checking if you want to allow broken string-terminators... $ECHO_C" >&6
18639
18640 # Check whether --enable-broken-st or --disable-broken-st was given.
18641 if test "${enable_broken_st+set}" = set; then
18642 enableval="$enable_broken_st"
18643 test "$enableval" != yes && enableval=no
18644 if test "$enableval" != "no" ; then
18645 enable_broken_st=no
18646 else
18647 enable_broken_st=yes
18648 fi
18649 else
18650 enableval=no
18651 enable_broken_st=yes
18652
18653 fi;
18654 echo "$as_me:18654: result: $enable_broken_st" >&5
18655 echo "${ECHO_T}$enable_broken_st" >&6
18656 test "$enable_broken_st" = no &&
18657 cat >>confdefs.h <<\EOF
18658 #define OPT_BROKEN_ST 0
18659 EOF
18660
18661 echo "$as_me:18661: checking if you want to compile-in icon data" >&5
18662 echo $ECHO_N "checking if you want to compile-in icon data... $ECHO_C" >&6
18663
18664 # Check whether --enable-builtin-xpms or --disable-builtin-xpms was given.
18665 if test "${enable_builtin_xpms+set}" = set; then
18666 enableval="$enable_builtin_xpms"
18667 test "$enableval" != yes && enableval=no
18668 if test "$enableval" != "no" ; then
18669 enable_builtin_xpms=yes
18670 else
18671 enable_builtin_xpms=no
18672 fi
18673 else
18674 enableval=no
18675 enable_builtin_xpms=no
18676
18677 fi;
18678 echo "$as_me:18678: result: $enable_builtin_xpms" >&5
18679 echo "${ECHO_T}$enable_builtin_xpms" >&6
18680 test "$enable_builtin_xpms" = yes &&
18681 cat >>confdefs.h <<\EOF
18682 #define OPT_BUILTIN_XPMS 1
18683 EOF
18684
18685 echo "$as_me:18685: checking if you want printable 128-159" >&5
18686 echo $ECHO_N "checking if you want printable 128-159... $ECHO_C" >&6
18687
18688 # Check whether --enable-c1-print or --disable-c1-print was given.
18689 if test "${enable_c1_print+set}" = set; then
18690 enableval="$enable_c1_print"
18691 test "$enableval" != no && enableval=yes
18692 if test "$enableval" != "yes" ; then
18693 enable_c1_print=no
18694 else
18695 enable_c1_print=yes
18696 fi
18697 else
18698 enableval=yes
18699 enable_c1_print=yes
18700
18701 fi;
18702 echo "$as_me:18702: result: $enable_c1_print" >&5
18703 echo "${ECHO_T}$enable_c1_print" >&6
18704 test "$enable_c1_print" = no &&
18705 cat >>confdefs.h <<\EOF
18706 #define OPT_C1_PRINT 0
18707 EOF
18708
18709 if test "$enable_ansi_color" = yes ; then
18710
18711 echo "$as_me:18711: checking if you want bold colors mapped like IBM PC" >&5
18712 echo $ECHO_N "checking if you want bold colors mapped like IBM PC... $ECHO_C" >&6
18713
18714 # Check whether --enable-bold-color or --disable-bold-color was given.
18715 if test "${enable_bold_color+set}" = set; then
18716 enableval="$enable_bold_color"
18717 test "$enableval" != no && enableval=yes
18718 if test "$enableval" != "yes" ; then
18719 enable_pc_color=no
18720 else
18721 enable_pc_color=yes
18722 fi
18723 else
18724 enableval=yes
18725 enable_pc_color=yes
18726
18727 fi;
18728 echo "$as_me:18728: result: $enable_pc_color" >&5
18729 echo "${ECHO_T}$enable_pc_color" >&6
18730 test "$enable_pc_color" = no &&
18731 cat >>confdefs.h <<\EOF
18732 #define OPT_PC_COLORS 0
18733 EOF
18734
18735 echo "$as_me:18735: checking if you want separate color-classes" >&5
18736 echo $ECHO_N "checking if you want separate color-classes... $ECHO_C" >&6
18737
18738 # Check whether --enable-color-class or --disable-color-class was given.
18739 if test "${enable_color_class+set}" = set; then
18740 enableval="$enable_color_class"
18741 test "$enableval" != no && enableval=yes
18742 if test "$enableval" != "yes" ; then
18743 enable_color_class=no
18744 else
18745 enable_color_class=yes
18746 fi
18747 else
18748 enableval=yes
18749 enable_color_class=yes
18750
18751 fi;
18752 echo "$as_me:18752: result: $enable_color_class" >&5
18753 echo "${ECHO_T}$enable_color_class" >&6
18754 test "$enable_color_class" = no &&
18755 cat >>confdefs.h <<\EOF
18756 #define OPT_COLOR_CLASS 0
18757 EOF
18758
18759 echo "$as_me:18759: checking if you want color-mode enabled by default" >&5
18760 echo $ECHO_N "checking if you want color-mode enabled by default... $ECHO_C" >&6
18761
18762 # Check whether --enable-color-mode or --disable-color-mode was given.
18763 if test "${enable_color_mode+set}" = set; then
18764 enableval="$enable_color_mode"
18765 test "$enableval" != no && enableval=yes
18766 if test "$enableval" != "yes" ; then
18767 default_colormode=no
18768 else
18769 default_colormode=yes
18770 fi
18771 else
18772 enableval=yes
18773 default_colormode=yes
18774
18775 fi;
18776 echo "$as_me:18776: result: $default_colormode" >&5
18777 echo "${ECHO_T}$default_colormode" >&6
18778 test "$default_colormode" = no &&
18779 cat >>confdefs.h <<\EOF
18780 #define DFT_COLORMODE 0
18781 EOF
18782
18783 fi
18784
18785 echo "$as_me:18785: checking if you want support for color highlighting" >&5
18786 echo $ECHO_N "checking if you want support for color highlighting... $ECHO_C" >&6
18787
18788 # Check whether --enable-highlighting or --disable-highlighting was given.
18789 if test "${enable_highlighting+set}" = set; then
18790 enableval="$enable_highlighting"
18791 test "$enableval" != no && enableval=yes
18792 if test "$enableval" != "yes" ; then
18793 default_highlight=no
18794 else
18795 default_highlight=yes
18796 fi
18797 else
18798 enableval=yes
18799 default_highlight=yes
18800
18801 fi;
18802 echo "$as_me:18802: result: $default_highlight" >&5
18803 echo "${ECHO_T}$default_highlight" >&6
18804 test "$default_highlight" = no &&
18805 cat >>confdefs.h <<\EOF
18806 #define OPT_HIGHLIGHT_COLOR 0
18807 EOF
18808
18809 echo "$as_me:18809: checking if you want support for doublesize characters" >&5
18810 echo $ECHO_N "checking if you want support for doublesize characters... $ECHO_C" >&6
18811
18812 # Check whether --enable-doublechars or --disable-doublechars was given.
18813 if test "${enable_doublechars+set}" = set; then
18814 enableval="$enable_doublechars"
18815 test "$enableval" != no && enableval=yes
18816 if test "$enableval" != "yes" ; then
18817 enable_doublechars=no
18818 else
18819 enable_doublechars=yes
18820 fi
18821 else
18822 enableval=yes
18823 enable_doublechars=yes
18824
18825 fi;
18826 echo "$as_me:18826: result: $enable_doublechars" >&5
18827 echo "${ECHO_T}$enable_doublechars" >&6
18828 test "$enable_doublechars" = no &&
18829 cat >>confdefs.h <<\EOF
18830 #define OPT_DEC_CHRSET 0
18831 EOF
18832
18833 echo "$as_me:18833: checking if you want fallback-support for box characters" >&5
18834 echo $ECHO_N "checking if you want fallback-support for box characters... $ECHO_C" >&6
18835
18836 # Check whether --enable-boxchars or --disable-boxchars was given.
18837 if test "${enable_boxchars+set}" = set; then
18838 enableval="$enable_boxchars"
18839 test "$enableval" != no && enableval=yes
18840 if test "$enableval" != "yes" ; then
18841 enable_boxchars=no
18842 else
18843 enable_boxchars=yes
18844 fi
18845 else
18846 enableval=yes
18847 enable_boxchars=yes
18848
18849 fi;
18850 echo "$as_me:18850: result: $enable_boxchars" >&5
18851 echo "${ECHO_T}$enable_boxchars" >&6
18852 test "$enable_boxchars" = no &&
18853 cat >>confdefs.h <<\EOF
18854 #define OPT_BOX_CHARS 0
18855 EOF
18856
18857 echo "$as_me:18857: checking if you want to allow spawning commands to process selections" >&5
18858 echo $ECHO_N "checking if you want to allow spawning commands to process selections... $ECHO_C" >&6
18859
18860 # Check whether --enable-exec-selection or --disable-exec-selection was given.
18861 if test "${enable_exec_selection+set}" = set; then
18862 enableval="$enable_exec_selection"
18863 test "$enableval" != no && enableval=yes
18864 if test "$enableval" != "yes" ; then
18865 enable_exec_selection=no
18866 else
18867 enable_exec_selection=yes
18868 fi
18869 else
18870 enableval=yes
18871 enable_exec_selection=yes
18872
18873 fi;
18874 echo "$as_me:18874: result: $enable_exec_selection" >&5
18875 echo "${ECHO_T}$enable_exec_selection" >&6
18876 if test "$enable_exec_selection" = no ; then
18877
18878 cat >>confdefs.h <<\EOF
18879 #define OPT_EXEC_SELECTION 0
18880 EOF
18881
18882 fi
18883
18884 echo "$as_me:18884: checking if you want to allow spawning new xterms" >&5
18885 echo $ECHO_N "checking if you want to allow spawning new xterms... $ECHO_C" >&6
18886
18887 # Check whether --enable-exec-xterm or --disable-exec-xterm was given.
18888 if test "${enable_exec_xterm+set}" = set; then
18889 enableval="$enable_exec_xterm"
18890 test "$enableval" != yes && enableval=no
18891 if test "$enableval" != "no" ; then
18892 enable_exec_xterm=yes
18893 else
18894 enable_exec_xterm=no
18895 fi
18896 else
18897 enableval=no
18898 enable_exec_xterm=no
18899
18900 fi;
18901 echo "$as_me:18901: result: $enable_exec_xterm" >&5
18902 echo "${ECHO_T}$enable_exec_xterm" >&6
18903 if test "$enable_exec_xterm" = yes ; then
18904
18905 echo "$as_me:18905: checking for proc tree with cwd-support" >&5
18906 echo $ECHO_N "checking for proc tree with cwd-support... $ECHO_C" >&6
18907 if test "${cf_cv_procfs_cwd+set}" = set; then
18908 echo $ECHO_N "(cached) $ECHO_C" >&6
18909 else
18910
18911 cf_cv_procfs_cwd=no
18912 for cf_path in /proc /compat/linux/proc /usr/compat/linux/proc
18913 do
18914 if test -d "$cf_path" && \
18915 test -d "$cf_path"/$$ && \
18916 { test -d "$cf_path"/$$/cwd || \
18917 test -L "$cf_path"/$$/cwd; }; then
18918 cf_cv_procfs_cwd="$cf_path"
18919 break
18920 fi
18921 done
18922
18923 fi
18924 echo "$as_me:18924: result: $cf_cv_procfs_cwd" >&5
18925 echo "${ECHO_T}$cf_cv_procfs_cwd" >&6
18926
18927 if test "$cf_cv_procfs_cwd" = no ; then
18928 { echo "$as_me:18928: WARNING: no suitable proc filesystem found" >&5
18929 echo "$as_me: WARNING: no suitable proc filesystem found" >&2;}
18930 else
18931
18932 cat >>confdefs.h <<EOF
18933 #define PROCFS_ROOT "$cf_cv_procfs_cwd"
18934 EOF
18935
18936 cat >>confdefs.h <<\EOF
18937 #define OPT_EXEC_XTERM 1
18938 EOF
18939
18940 fi
18941 fi
18942
18943 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
18944 test -n "$verbose" && echo " found package Xext" 1>&6
18945
18946 echo "${as_me:-configure}:18946: testing found package Xext ..." 1>&5
18947
18948 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
18949 cf_pkgconfig_libs="`$PKG_CONFIG --libs "Xext" 2>/dev/null`"
18950 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
18951
18952 echo "${as_me:-configure}:18952: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
18953
18954 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
18955
18956 echo "${as_me:-configure}:18956: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
18957
18958 cf_fix_cppflags=no
18959 cf_new_cflags=
18960 cf_new_cppflags=
18961 cf_new_extra_cppflags=
18962
18963 for cf_add_cflags in $cf_pkgconfig_incs
18964 do
18965 case "$cf_fix_cppflags" in
18966 (no)
18967 case "$cf_add_cflags" in
18968 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18969 case "$cf_add_cflags" in
18970 (-D*)
18971 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18972
18973 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18974 && test -z "${cf_tst_cflags}" \
18975 && cf_fix_cppflags=yes
18976
18977 if test "$cf_fix_cppflags" = yes ; then
18978
18979 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18980 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18981
18982 continue
18983 elif test "${cf_tst_cflags}" = "\"'" ; then
18984
18985 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18986 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18987
18988 continue
18989 fi
18990 ;;
18991 esac
18992 case "$CPPFLAGS" in
18993 (*$cf_add_cflags)
18994 ;;
18995 (*)
18996 case "$cf_add_cflags" in
18997 (-D*)
18998 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18999
19000 CPPFLAGS=`echo "$CPPFLAGS" | \
19001 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
19002 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
19003
19004 ;;
19005 esac
19006
19007 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19008 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19009
19010 ;;
19011 esac
19012 ;;
19013 (*)
19014
19015 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19016 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19017
19018 ;;
19019 esac
19020 ;;
19021 (yes)
19022
19023 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19024 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19025
19026 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19027
19028 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19029 && test -z "${cf_tst_cflags}" \
19030 && cf_fix_cppflags=no
19031 ;;
19032 esac
19033 done
19034
19035 if test -n "$cf_new_cflags" ; then
19036
19037 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19038 CFLAGS="${CFLAGS}$cf_new_cflags"
19039
19040 fi
19041
19042 if test -n "$cf_new_cppflags" ; then
19043
19044 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19045 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19046
19047 fi
19048
19049 if test -n "$cf_new_extra_cppflags" ; then
19050
19051 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19052 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19053
19054 fi
19055
19056 cf_add_libs="$LIBS"
19057 # reverse order
19058 cf_add_0lib=
19059 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19060 # filter duplicates
19061 for cf_add_1lib in $cf_add_0lib; do
19062 for cf_add_2lib in $cf_add_libs; do
19063 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19064 cf_add_1lib=
19065 break
19066 fi
19067 done
19068 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19069 done
19070 LIBS="$cf_add_libs"
19071
19072 :
19073 else
19074 cf_pkgconfig_incs=
19075 cf_pkgconfig_libs=
19076
19077 echo "$as_me:19077: checking for XextCreateExtension in -lXext" >&5
19078 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
19079 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
19080 echo $ECHO_N "(cached) $ECHO_C" >&6
19081 else
19082 ac_check_lib_save_LIBS=$LIBS
19083 LIBS="-lXext $LIBS"
19084 cat >"conftest.$ac_ext" <<_ACEOF
19085 #line 19085 "configure"
19086 #include "confdefs.h"
19087
19088 /* Override any gcc2 internal prototype to avoid an error. */
19089 #ifdef __cplusplus
19090 extern "C"
19091 #endif
19092 /* We use char because int might match the return type of a gcc2
19093 builtin and then its argument prototype would still apply. */
19094 char XextCreateExtension ();
19095 int
19096 main (void)
19097 {
19098 XextCreateExtension ();
19099 ;
19100 return 0;
19101 }
19102 _ACEOF
19103 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19104 if { (eval echo "$as_me:19104: \"$ac_link\"") >&5
19105 (eval $ac_link) 2>&5
19106 ac_status=$?
19107 echo "$as_me:19107: \$? = $ac_status" >&5
19108 (exit "$ac_status"); } &&
19109 { ac_try='test -s "conftest$ac_exeext"'
19110 { (eval echo "$as_me:19110: \"$ac_try\"") >&5
19111 (eval $ac_try) 2>&5
19112 ac_status=$?
19113 echo "$as_me:19113: \$? = $ac_status" >&5
19114 (exit "$ac_status"); }; }; then
19115 ac_cv_lib_Xext_XextCreateExtension=yes
19116 else
19117 echo "$as_me: failed program was:" >&5
19118 cat "conftest.$ac_ext" >&5
19119 ac_cv_lib_Xext_XextCreateExtension=no
19120 fi
19121 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19122 LIBS=$ac_check_lib_save_LIBS
19123 fi
19124 echo "$as_me:19124: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
19125 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
19126 if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
19127
19128 cf_add_libs="$LIBS"
19129 # reverse order
19130 cf_add_0lib=
19131 for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19132 # filter duplicates
19133 for cf_add_1lib in $cf_add_0lib; do
19134 for cf_add_2lib in $cf_add_libs; do
19135 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19136 cf_add_1lib=
19137 break
19138 fi
19139 done
19140 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19141 done
19142 LIBS="$cf_add_libs"
19143
19144 fi
19145
19146 fi
19147
19148 echo "$as_me:19148: checking for X11/extensions/Xdbe.h" >&5
19149 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6
19150 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
19151 echo $ECHO_N "(cached) $ECHO_C" >&6
19152 else
19153 cat >"conftest.$ac_ext" <<_ACEOF
19154 #line 19154 "configure"
19155 #include "confdefs.h"
19156 #include <X11/extensions/Xdbe.h>
19157 _ACEOF
19158 if { (eval echo "$as_me:19158: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19159 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19160 ac_status=$?
19161 $EGREP -v '^ *\+' conftest.er1 >conftest.err
19162 rm -f conftest.er1
19163 cat conftest.err >&5
19164 echo "$as_me:19164: \$? = $ac_status" >&5
19165 (exit "$ac_status"); } >/dev/null; then
19166 if test -s conftest.err; then
19167 ac_cpp_err=$ac_c_preproc_warn_flag
19168 else
19169 ac_cpp_err=
19170 fi
19171 else
19172 ac_cpp_err=yes
19173 fi
19174 if test -z "$ac_cpp_err"; then
19175 ac_cv_header_X11_extensions_Xdbe_h=yes
19176 else
19177 echo "$as_me: failed program was:" >&5
19178 cat "conftest.$ac_ext" >&5
19179 ac_cv_header_X11_extensions_Xdbe_h=no
19180 fi
19181 rm -f conftest.err "conftest.$ac_ext"
19182 fi
19183 echo "$as_me:19183: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
19184 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6
19185 if test "$ac_cv_header_X11_extensions_Xdbe_h" = yes; then
19186
19187 cat >>confdefs.h <<\EOF
19188 #define HAVE_X11_EXTENSIONS_XDBE_H 1
19189 EOF
19190
19191 echo "$as_me:19191: checking for XdbeSwapBuffers" >&5
19192 echo $ECHO_N "checking for XdbeSwapBuffers... $ECHO_C" >&6
19193 if test "${ac_cv_func_XdbeSwapBuffers+set}" = set; then
19194 echo $ECHO_N "(cached) $ECHO_C" >&6
19195 else
19196 cat >"conftest.$ac_ext" <<_ACEOF
19197 #line 19197 "configure"
19198 #include "confdefs.h"
19199 #define XdbeSwapBuffers autoconf_temporary
19200 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
19201 #undef XdbeSwapBuffers
19202
19203 #ifdef __cplusplus
19204 extern "C"
19205 #endif
19206
19207 /* We use char because int might match the return type of a gcc2
19208 builtin and then its argument prototype would still apply. */
19209 char XdbeSwapBuffers (void);
19210
19211 int
19212 main (void)
19213 {
19214
19215 /* The GNU C library defines stubs for functions which it implements
19216 to always fail with ENOSYS. Some functions are actually named
19217 something starting with __ and the normal name is an alias. */
19218 #if defined (__stub_XdbeSwapBuffers) || defined (__stub___XdbeSwapBuffers)
19219 #error found stub for XdbeSwapBuffers
19220 #endif
19221
19222 return XdbeSwapBuffers ();
19223 ;
19224 return 0;
19225 }
19226 _ACEOF
19227 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19228 if { (eval echo "$as_me:19228: \"$ac_link\"") >&5
19229 (eval $ac_link) 2>&5
19230 ac_status=$?
19231 echo "$as_me:19231: \$? = $ac_status" >&5
19232 (exit "$ac_status"); } &&
19233 { ac_try='test -s "conftest$ac_exeext"'
19234 { (eval echo "$as_me:19234: \"$ac_try\"") >&5
19235 (eval $ac_try) 2>&5
19236 ac_status=$?
19237 echo "$as_me:19237: \$? = $ac_status" >&5
19238 (exit "$ac_status"); }; }; then
19239 ac_cv_func_XdbeSwapBuffers=yes
19240 else
19241 echo "$as_me: failed program was:" >&5
19242 cat "conftest.$ac_ext" >&5
19243 ac_cv_func_XdbeSwapBuffers=no
19244 fi
19245 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19246 fi
19247 echo "$as_me:19247: result: $ac_cv_func_XdbeSwapBuffers" >&5
19248 echo "${ECHO_T}$ac_cv_func_XdbeSwapBuffers" >&6
19249 if test "$ac_cv_func_XdbeSwapBuffers" = yes; then
19250
19251 cat >>confdefs.h <<\EOF
19252 #define HAVE_XDBESWAPBUFFERS 1
19253 EOF
19254
19255 cf_x_ext_double_buffer=yes
19256 fi
19257
19258 fi
19259
19260 double_buffer=False
19261 if test "$cf_x_ext_double_buffer" = yes ; then
19262 echo "$as_me:19262: checking if you want to enable double-buffering in default resources" >&5
19263 echo $ECHO_N "checking if you want to enable double-buffering in default resources... $ECHO_C" >&6
19264
19265 # Check whether --enable-double-buffer or --disable-double-buffer was given.
19266 if test "${enable_double_buffer+set}" = set; then
19267 enableval="$enable_double_buffer"
19268 test "$enableval" != yes && enableval=no
19269 if test "$enableval" != "no" ; then
19270 enable_double_bfr=yes
19271 else
19272 enable_double_bfr=no
19273 fi
19274 else
19275 enableval=no
19276 enable_double_bfr=no
19277
19278 fi;
19279 echo "$as_me:19279: result: $enable_double_bfr" >&5
19280 echo "${ECHO_T}$enable_double_bfr" >&6
19281 if test "$enable_double_bfr" = yes ; then
19282
19283 cat >>confdefs.h <<\EOF
19284 #define OPT_DOUBLE_BUFFER 1
19285 EOF
19286
19287 double_buffer=True
19288 fi
19289 fi
19290
19291 echo "$as_me:19291: checking if you want to use FreeType library" >&5
19292 echo $ECHO_N "checking if you want to use FreeType library... $ECHO_C" >&6
19293
19294 # Check whether --enable-freetype or --disable-freetype was given.
19295 if test "${enable_freetype+set}" = set; then
19296 enableval="$enable_freetype"
19297 test "$enableval" != no && enableval=yes
19298 if test "$enableval" != "yes" ; then
19299 enable_freetype=no
19300 else
19301 enable_freetype=yes
19302 fi
19303 else
19304 enableval=yes
19305 enable_freetype=yes
19306
19307 fi;
19308 echo "$as_me:19308: result: $enable_freetype" >&5
19309 echo "${ECHO_T}$enable_freetype" >&6
19310 if test "$enable_freetype" = yes ; then
19311
19312 cf_cv_x_freetype_incs=no
19313 cf_cv_x_freetype_libs=no
19314 cf_extra_freetype_libs=
19315 FREETYPE_CONFIG=none
19316 FREETYPE_PARAMS=
19317
19318 echo "$as_me:19318: checking for FreeType configuration script" >&5
19319 echo $ECHO_N "checking for FreeType configuration script... $ECHO_C" >&6
19320
19321 # Check whether --with-freetype-config or --without-freetype-config was given.
19322 if test "${with_freetype_config+set}" = set; then
19323 withval="$with_freetype_config"
19324 cf_cv_x_freetype_cfgs="$withval"
19325 else
19326 cf_cv_x_freetype_cfgs=auto
19327 fi;
19328 test -z $cf_cv_x_freetype_cfgs && cf_cv_x_freetype_cfgs=auto
19329 test $cf_cv_x_freetype_cfgs = no && cf_cv_x_freetype_cfgs=none
19330 echo "$as_me:19330: result: $cf_cv_x_freetype_cfgs" >&5
19331 echo "${ECHO_T}$cf_cv_x_freetype_cfgs" >&6
19332
19333 case $cf_cv_x_freetype_cfgs in
19334 (none)
19335 echo "$as_me:19335: checking if you specified -D/-I options for FreeType" >&5
19336 echo $ECHO_N "checking if you specified -D/-I options for FreeType... $ECHO_C" >&6
19337
19338 # Check whether --with-freetype-cflags or --without-freetype-cflags was given.
19339 if test "${with_freetype_cflags+set}" = set; then
19340 withval="$with_freetype_cflags"
19341 cf_cv_x_freetype_incs="$with_freetype_cflags"
19342 else
19343 cf_cv_x_freetype_incs=no
19344 fi;
19345 echo "$as_me:19345: result: $cf_cv_x_freetype_incs" >&5
19346 echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6
19347
19348 echo "$as_me:19348: checking if you specified -L/-l options for FreeType" >&5
19349 echo $ECHO_N "checking if you specified -L/-l options for FreeType... $ECHO_C" >&6
19350
19351 # Check whether --with-freetype-libs or --without-freetype-libs was given.
19352 if test "${with_freetype_libs+set}" = set; then
19353 withval="$with_freetype_libs"
19354 cf_cv_x_freetype_libs="$with_freetype_libs"
19355 else
19356 cf_cv_x_freetype_libs=no
19357 fi;
19358 echo "$as_me:19358: result: $cf_cv_x_freetype_libs" >&5
19359 echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6
19360 ;;
19361 (auto)
19362 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then
19363 FREETYPE_CONFIG=$PKG_CONFIG
19364 FREETYPE_PARAMS=xft
19365 else
19366 # Extract the first word of "freetype-config", so it can be a program name with args.
19367 set dummy freetype-config; ac_word=$2
19368 echo "$as_me:19368: checking for $ac_word" >&5
19369 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19370 if test "${ac_cv_path_FREETYPE_CONFIG+set}" = set; then
19371 echo $ECHO_N "(cached) $ECHO_C" >&6
19372 else
19373 case $FREETYPE_CONFIG in
19374 [\\/]* | ?:[\\/]*)
19375 ac_cv_path_FREETYPE_CONFIG="$FREETYPE_CONFIG" # Let the user override the test with a path.
19376 ;;
19377 *)
19378 ac_save_IFS=$IFS; IFS=$ac_path_separator
19379 ac_dummy="$PATH"
19380 for ac_dir in $ac_dummy; do
19381 IFS=$ac_save_IFS
19382 test -z "$ac_dir" && ac_dir=.
19383 if $as_executable_p "$ac_dir/$ac_word"; then
19384 ac_cv_path_FREETYPE_CONFIG="$ac_dir/$ac_word"
19385 echo "$as_me:19385: found $ac_dir/$ac_word" >&5
19386 break
19387 fi
19388 done
19389
19390 test -z "$ac_cv_path_FREETYPE_CONFIG" && ac_cv_path_FREETYPE_CONFIG="none"
19391 ;;
19392 esac
19393 fi
19394 FREETYPE_CONFIG=$ac_cv_path_FREETYPE_CONFIG
19395
19396 if test -n "$FREETYPE_CONFIG"; then
19397 echo "$as_me:19397: result: $FREETYPE_CONFIG" >&5
19398 echo "${ECHO_T}$FREETYPE_CONFIG" >&6
19399 else
19400 echo "$as_me:19400: result: no" >&5
19401 echo "${ECHO_T}no" >&6
19402 fi
19403
19404 if test "$FREETYPE_CONFIG" != none; then
19405 FREETYPE_CONFIG=$FREETYPE_CONFIG
19406 cf_extra_freetype_libs="-lXft"
19407 else
19408 # Extract the first word of "xft-config", so it can be a program name with args.
19409 set dummy xft-config; ac_word=$2
19410 echo "$as_me:19410: checking for $ac_word" >&5
19411 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19412 if test "${ac_cv_path_FREETYPE_OLD_CONFIG+set}" = set; then
19413 echo $ECHO_N "(cached) $ECHO_C" >&6
19414 else
19415 case $FREETYPE_OLD_CONFIG in
19416 [\\/]* | ?:[\\/]*)
19417 ac_cv_path_FREETYPE_OLD_CONFIG="$FREETYPE_OLD_CONFIG" # Let the user override the test with a path.
19418 ;;
19419 *)
19420 ac_save_IFS=$IFS; IFS=$ac_path_separator
19421 ac_dummy="$PATH"
19422 for ac_dir in $ac_dummy; do
19423 IFS=$ac_save_IFS
19424 test -z "$ac_dir" && ac_dir=.
19425 if $as_executable_p "$ac_dir/$ac_word"; then
19426 ac_cv_path_FREETYPE_OLD_CONFIG="$ac_dir/$ac_word"
19427 echo "$as_me:19427: found $ac_dir/$ac_word" >&5
19428 break
19429 fi
19430 done
19431
19432 test -z "$ac_cv_path_FREETYPE_OLD_CONFIG" && ac_cv_path_FREETYPE_OLD_CONFIG="none"
19433 ;;
19434 esac
19435 fi
19436 FREETYPE_OLD_CONFIG=$ac_cv_path_FREETYPE_OLD_CONFIG
19437
19438 if test -n "$FREETYPE_OLD_CONFIG"; then
19439 echo "$as_me:19439: result: $FREETYPE_OLD_CONFIG" >&5
19440 echo "${ECHO_T}$FREETYPE_OLD_CONFIG" >&6
19441 else
19442 echo "$as_me:19442: result: no" >&5
19443 echo "${ECHO_T}no" >&6
19444 fi
19445
19446 if test "$FREETYPE_OLD_CONFIG" != none; then
19447 FREETYPE_CONFIG=$FREETYPE_OLD_CONFIG
19448 fi
19449 fi
19450 fi
19451 ;;
19452 (pkg*)
19453 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then
19454 FREETYPE_CONFIG=$cf_cv_x_freetype_cfgs
19455 FREETYPE_PARAMS=xft
19456 else
19457 { echo "$as_me:19457: WARNING: cannot find pkg-config for Xft" >&5
19458 echo "$as_me: WARNING: cannot find pkg-config for Xft" >&2;}
19459 fi
19460 ;;
19461 (*)
19462 # Extract the first word of "$cf_cv_x_freetype_cfgs", so it can be a program name with args.
19463 set dummy $cf_cv_x_freetype_cfgs; ac_word=$2
19464 echo "$as_me:19464: checking for $ac_word" >&5
19465 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19466 if test "${ac_cv_path_FREETYPE_XFT_CONFIG+set}" = set; then
19467 echo $ECHO_N "(cached) $ECHO_C" >&6
19468 else
19469 case $FREETYPE_XFT_CONFIG in
19470 [\\/]* | ?:[\\/]*)
19471 ac_cv_path_FREETYPE_XFT_CONFIG="$FREETYPE_XFT_CONFIG" # Let the user override the test with a path.
19472 ;;
19473 *)
19474 ac_save_IFS=$IFS; IFS=$ac_path_separator
19475 ac_dummy="$PATH"
19476 for ac_dir in $ac_dummy; do
19477 IFS=$ac_save_IFS
19478 test -z "$ac_dir" && ac_dir=.
19479 if $as_executable_p "$ac_dir/$ac_word"; then
19480 ac_cv_path_FREETYPE_XFT_CONFIG="$ac_dir/$ac_word"
19481 echo "$as_me:19481: found $ac_dir/$ac_word" >&5
19482 break
19483 fi
19484 done
19485
19486 test -z "$ac_cv_path_FREETYPE_XFT_CONFIG" && ac_cv_path_FREETYPE_XFT_CONFIG="none"
19487 ;;
19488 esac
19489 fi
19490 FREETYPE_XFT_CONFIG=$ac_cv_path_FREETYPE_XFT_CONFIG
19491
19492 if test -n "$FREETYPE_XFT_CONFIG"; then
19493 echo "$as_me:19493: result: $FREETYPE_XFT_CONFIG" >&5
19494 echo "${ECHO_T}$FREETYPE_XFT_CONFIG" >&6
19495 else
19496 echo "$as_me:19496: result: no" >&5
19497 echo "${ECHO_T}no" >&6
19498 fi
19499
19500 if test "$FREETYPE_XFT_CONFIG" != none; then
19501 FREETYPE_CONFIG=$FREETYPE_XFT_CONFIG
19502 else
19503 { echo "$as_me:19503: WARNING: cannot find config script for Xft" >&5
19504 echo "$as_me: WARNING: cannot find config script for Xft" >&2;}
19505 fi
19506 ;;
19507 esac
19508
19509 if test "$FREETYPE_CONFIG" != none ; then
19510 echo "$as_me:19510: checking for FreeType config" >&5
19511 echo $ECHO_N "checking for FreeType config... $ECHO_C" >&6
19512 echo "$as_me:19512: result: $FREETYPE_CONFIG $FREETYPE_PARAMS" >&5
19513 echo "${ECHO_T}$FREETYPE_CONFIG $FREETYPE_PARAMS" >&6
19514
19515 if test "$cf_cv_x_freetype_incs" = no ; then
19516 echo "$as_me:19516: checking for $FREETYPE_CONFIG cflags" >&5
19517 echo $ECHO_N "checking for $FREETYPE_CONFIG cflags... $ECHO_C" >&6
19518 cf_cv_x_freetype_incs="`$FREETYPE_CONFIG $FREETYPE_PARAMS --cflags 2>/dev/null`"
19519 echo "$as_me:19519: result: $cf_cv_x_freetype_incs" >&5
19520 echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6
19521 fi
19522
19523 if test "$cf_cv_x_freetype_libs" = no ; then
19524 echo "$as_me:19524: checking for $FREETYPE_CONFIG libs" >&5
19525 echo $ECHO_N "checking for $FREETYPE_CONFIG libs... $ECHO_C" >&6
19526 cf_cv_x_freetype_libs="$cf_extra_freetype_libs `$FREETYPE_CONFIG $FREETYPE_PARAMS --libs 2>/dev/null`"
19527 echo "$as_me:19527: result: $cf_cv_x_freetype_libs" >&5
19528 echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6
19529 fi
19530 fi
19531
19532 if test "$cf_cv_x_freetype_incs" = no ; then
19533 cf_cv_x_freetype_incs=
19534 fi
19535
19536 if test "$cf_cv_x_freetype_libs" = no ; then
19537 cf_cv_x_freetype_libs=-lXft
19538 fi
19539
19540 echo "$as_me:19540: checking if we can link with FreeType libraries" >&5
19541 echo $ECHO_N "checking if we can link with FreeType libraries... $ECHO_C" >&6
19542
19543 cf_save_LIBS="$LIBS"
19544 cf_save_INCS="$CPPFLAGS"
19545
19546 cf_add_libs="$LIBS"
19547 # reverse order
19548 cf_add_0lib=
19549 for cf_add_1lib in $cf_cv_x_freetype_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19550 # filter duplicates
19551 for cf_add_1lib in $cf_add_0lib; do
19552 for cf_add_2lib in $cf_add_libs; do
19553 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19554 cf_add_1lib=
19555 break
19556 fi
19557 done
19558 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19559 done
19560 LIBS="$cf_add_libs"
19561
19562 CPPFLAGS="$CPPFLAGS $cf_cv_x_freetype_incs"
19563
19564 cat >"conftest.$ac_ext" <<_ACEOF
19565 #line 19565 "configure"
19566 #include "confdefs.h"
19567
19568 #include <X11/Xlib.h>
19569 #include <X11/extensions/Xrender.h>
19570 #include <X11/Xft/Xft.h>
19571 int
19572 main (void)
19573 {
19574
19575 XftPattern *pat = XftNameParse ("name"); (void)pat
19576 ;
19577 return 0;
19578 }
19579 _ACEOF
19580 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19581 if { (eval echo "$as_me:19581: \"$ac_link\"") >&5
19582 (eval $ac_link) 2>&5
19583 ac_status=$?
19584 echo "$as_me:19584: \$? = $ac_status" >&5
19585 (exit "$ac_status"); } &&
19586 { ac_try='test -s "conftest$ac_exeext"'
19587 { (eval echo "$as_me:19587: \"$ac_try\"") >&5
19588 (eval $ac_try) 2>&5
19589 ac_status=$?
19590 echo "$as_me:19590: \$? = $ac_status" >&5
19591 (exit "$ac_status"); }; }; then
19592 cf_cv_found_freetype=yes
19593 else
19594 echo "$as_me: failed program was:" >&5
19595 cat "conftest.$ac_ext" >&5
19596 cf_cv_found_freetype=no
19597 fi
19598 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19599 echo "$as_me:19599: result: $cf_cv_found_freetype" >&5
19600 echo "${ECHO_T}$cf_cv_found_freetype" >&6
19601
19602 LIBS="$cf_save_LIBS"
19603 CPPFLAGS="$cf_save_INCS"
19604
19605 if test "$cf_cv_found_freetype" = yes ; then
19606
19607 cf_add_libs="$LIBS"
19608 # reverse order
19609 cf_add_0lib=
19610 for cf_add_1lib in $cf_cv_x_freetype_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19611 # filter duplicates
19612 for cf_add_1lib in $cf_add_0lib; do
19613 for cf_add_2lib in $cf_add_libs; do
19614 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19615 cf_add_1lib=
19616 break
19617 fi
19618 done
19619 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19620 done
19621 LIBS="$cf_add_libs"
19622
19623 cf_fix_cppflags=no
19624 cf_new_cflags=
19625 cf_new_cppflags=
19626 cf_new_extra_cppflags=
19627
19628 for cf_add_cflags in $cf_cv_x_freetype_incs
19629 do
19630 case "$cf_fix_cppflags" in
19631 (no)
19632 case "$cf_add_cflags" in
19633 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19634 case "$cf_add_cflags" in
19635 (-D*)
19636 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19637
19638 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19639 && test -z "${cf_tst_cflags}" \
19640 && cf_fix_cppflags=yes
19641
19642 if test "$cf_fix_cppflags" = yes ; then
19643
19644 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19645 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19646
19647 continue
19648 elif test "${cf_tst_cflags}" = "\"'" ; then
19649
19650 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19651 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19652
19653 continue
19654 fi
19655 ;;
19656 esac
19657 case "$CPPFLAGS" in
19658 (*$cf_add_cflags)
19659 ;;
19660 (*)
19661 case "$cf_add_cflags" in
19662 (-D*)
19663 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19664
19665 CPPFLAGS=`echo "$CPPFLAGS" | \
19666 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
19667 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
19668
19669 ;;
19670 esac
19671
19672 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19673 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19674
19675 ;;
19676 esac
19677 ;;
19678 (*)
19679
19680 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19681 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19682
19683 ;;
19684 esac
19685 ;;
19686 (yes)
19687
19688 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19689 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19690
19691 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19692
19693 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19694 && test -z "${cf_tst_cflags}" \
19695 && cf_fix_cppflags=no
19696 ;;
19697 esac
19698 done
19699
19700 if test -n "$cf_new_cflags" ; then
19701
19702 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19703 CFLAGS="${CFLAGS}$cf_new_cflags"
19704
19705 fi
19706
19707 if test -n "$cf_new_cppflags" ; then
19708
19709 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19710 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19711
19712 fi
19713
19714 if test -n "$cf_new_extra_cppflags" ; then
19715
19716 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19717 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19718
19719 fi
19720
19721 cat >>confdefs.h <<\EOF
19722 #define XRENDERFONT 1
19723 EOF
19724
19725 for ac_func in \
19726 XftDrawCharSpec \
19727 XftDrawSetClip \
19728 XftDrawSetClipRectangles \
19729
19730 do
19731 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19732 echo "$as_me:19732: checking for $ac_func" >&5
19733 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19734 if eval "test \"\${$as_ac_var+set}\" = set"; then
19735 echo $ECHO_N "(cached) $ECHO_C" >&6
19736 else
19737 cat >"conftest.$ac_ext" <<_ACEOF
19738 #line 19738 "configure"
19739 #include "confdefs.h"
19740 #define $ac_func autoconf_temporary
19741 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
19742 #undef $ac_func
19743
19744 #ifdef __cplusplus
19745 extern "C"
19746 #endif
19747
19748 /* We use char because int might match the return type of a gcc2
19749 builtin and then its argument prototype would still apply. */
19750 char $ac_func (void);
19751
19752 int
19753 main (void)
19754 {
19755
19756 /* The GNU C library defines stubs for functions which it implements
19757 to always fail with ENOSYS. Some functions are actually named
19758 something starting with __ and the normal name is an alias. */
19759 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19760 #error found stub for $ac_func
19761 #endif
19762
19763 return $ac_func ();
19764 ;
19765 return 0;
19766 }
19767 _ACEOF
19768 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19769 if { (eval echo "$as_me:19769: \"$ac_link\"") >&5
19770 (eval $ac_link) 2>&5
19771 ac_status=$?
19772 echo "$as_me:19772: \$? = $ac_status" >&5
19773 (exit "$ac_status"); } &&
19774 { ac_try='test -s "conftest$ac_exeext"'
19775 { (eval echo "$as_me:19775: \"$ac_try\"") >&5
19776 (eval $ac_try) 2>&5
19777 ac_status=$?
19778 echo "$as_me:19778: \$? = $ac_status" >&5
19779 (exit "$ac_status"); }; }; then
19780 eval "$as_ac_var=yes"
19781 else
19782 echo "$as_me: failed program was:" >&5
19783 cat "conftest.$ac_ext" >&5
19784 eval "$as_ac_var=no"
19785 fi
19786 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19787 fi
19788 echo "$as_me:19788: result: `eval echo '${'"$as_ac_var"'}'`" >&5
19789 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
19790 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
19791 cat >>confdefs.h <<EOF
19792 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19793 EOF
19794
19795 fi
19796 done
19797
19798 else
19799 { echo "$as_me:19799: WARNING: No libraries found for FreeType" >&5
19800 echo "$as_me: WARNING: No libraries found for FreeType" >&2;}
19801 CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
19802 fi
19803
19804 # FIXME: revisit this if needed
19805
19806 if test "$cf_cv_found_freetype" = yes ; then
19807 echo "$as_me:19807: checking for usable Xft/fontconfig package" >&5
19808 echo $ECHO_N "checking for usable Xft/fontconfig package... $ECHO_C" >&6
19809 if test "${cf_cv_xft_compat+set}" = set; then
19810 echo $ECHO_N "(cached) $ECHO_C" >&6
19811 else
19812
19813 cat >"conftest.$ac_ext" <<_ACEOF
19814 #line 19814 "configure"
19815 #include "confdefs.h"
19816
19817 #include <X11/Xft/Xft.h>
19818
19819 int
19820 main (void)
19821 {
19822
19823 XftPattern *pat = 0;
19824 XftPatternBuild(pat,
19825 XFT_FAMILY, XftTypeString, "mono",
19826 (void *) 0);
19827
19828 ;
19829 return 0;
19830 }
19831 _ACEOF
19832 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19833 if { (eval echo "$as_me:19833: \"$ac_link\"") >&5
19834 (eval $ac_link) 2>&5
19835 ac_status=$?
19836 echo "$as_me:19836: \$? = $ac_status" >&5
19837 (exit "$ac_status"); } &&
19838 { ac_try='test -s "conftest$ac_exeext"'
19839 { (eval echo "$as_me:19839: \"$ac_try\"") >&5
19840 (eval $ac_try) 2>&5
19841 ac_status=$?
19842 echo "$as_me:19842: \$? = $ac_status" >&5
19843 (exit "$ac_status"); }; }; then
19844 cf_cv_xft_compat=yes
19845 else
19846 echo "$as_me: failed program was:" >&5
19847 cat "conftest.$ac_ext" >&5
19848 cf_cv_xft_compat=no
19849 fi
19850 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19851
19852 fi
19853 echo "$as_me:19853: result: $cf_cv_xft_compat" >&5
19854 echo "${ECHO_T}$cf_cv_xft_compat" >&6
19855
19856 if test "$cf_cv_xft_compat" = no
19857 then
19858 # workaround for broken ".pc" files used for Xft.
19859 case "$cf_cv_x_freetype_libs" in
19860 (*-lfontconfig*)
19861 ;;
19862 (*)
19863 test -n "$verbose" && echo " work around broken package" 1>&6
19864
19865 echo "${as_me:-configure}:19865: testing work around broken package ..." 1>&5
19866
19867 cf_save_fontconfig="$LIBS"
19868
19869 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "fontconfig"; then
19870 test -n "$verbose" && echo " found package fontconfig" 1>&6
19871
19872 echo "${as_me:-configure}:19872: testing found package fontconfig ..." 1>&5
19873
19874 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "fontconfig" 2>/dev/null`"
19875 cf_pkgconfig_libs="`$PKG_CONFIG --libs "fontconfig" 2>/dev/null`"
19876 test -n "$verbose" && echo " package fontconfig CFLAGS: $cf_pkgconfig_incs" 1>&6
19877
19878 echo "${as_me:-configure}:19878: testing package fontconfig CFLAGS: $cf_pkgconfig_incs ..." 1>&5
19879
19880 test -n "$verbose" && echo " package fontconfig LIBS: $cf_pkgconfig_libs" 1>&6
19881
19882 echo "${as_me:-configure}:19882: testing package fontconfig LIBS: $cf_pkgconfig_libs ..." 1>&5
19883
19884 cf_fix_cppflags=no
19885 cf_new_cflags=
19886 cf_new_cppflags=
19887 cf_new_extra_cppflags=
19888
19889 for cf_add_cflags in $cf_pkgconfig_incs
19890 do
19891 case "$cf_fix_cppflags" in
19892 (no)
19893 case "$cf_add_cflags" in
19894 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19895 case "$cf_add_cflags" in
19896 (-D*)
19897 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19898
19899 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19900 && test -z "${cf_tst_cflags}" \
19901 && cf_fix_cppflags=yes
19902
19903 if test "$cf_fix_cppflags" = yes ; then
19904
19905 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19906 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19907
19908 continue
19909 elif test "${cf_tst_cflags}" = "\"'" ; then
19910
19911 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19912 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19913
19914 continue
19915 fi
19916 ;;
19917 esac
19918 case "$CPPFLAGS" in
19919 (*$cf_add_cflags)
19920 ;;
19921 (*)
19922 case "$cf_add_cflags" in
19923 (-D*)
19924 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19925
19926 CPPFLAGS=`echo "$CPPFLAGS" | \
19927 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
19928 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
19929
19930 ;;
19931 esac
19932
19933 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19934 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19935
19936 ;;
19937 esac
19938 ;;
19939 (*)
19940
19941 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19942 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19943
19944 ;;
19945 esac
19946 ;;
19947 (yes)
19948
19949 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19950 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19951
19952 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19953
19954 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19955 && test -z "${cf_tst_cflags}" \
19956 && cf_fix_cppflags=no
19957 ;;
19958 esac
19959 done
19960
19961 if test -n "$cf_new_cflags" ; then
19962
19963 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19964 CFLAGS="${CFLAGS}$cf_new_cflags"
19965
19966 fi
19967
19968 if test -n "$cf_new_cppflags" ; then
19969
19970 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19971 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19972
19973 fi
19974
19975 if test -n "$cf_new_extra_cppflags" ; then
19976
19977 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19978 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19979
19980 fi
19981
19982 cf_add_libs="$LIBS"
19983 # reverse order
19984 cf_add_0lib=
19985 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19986 # filter duplicates
19987 for cf_add_1lib in $cf_add_0lib; do
19988 for cf_add_2lib in $cf_add_libs; do
19989 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19990 cf_add_1lib=
19991 break
19992 fi
19993 done
19994 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19995 done
19996 LIBS="$cf_add_libs"
19997
19998 cf_fix_cppflags=no
19999 cf_new_cflags=
20000 cf_new_cppflags=
20001 cf_new_extra_cppflags=
20002
20003 for cf_add_cflags in $cf_pkgconfig_incs
20004 do
20005 case "$cf_fix_cppflags" in
20006 (no)
20007 case "$cf_add_cflags" in
20008 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20009 case "$cf_add_cflags" in
20010 (-D*)
20011 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20012
20013 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20014 && test -z "${cf_tst_cflags}" \
20015 && cf_fix_cppflags=yes
20016
20017 if test "$cf_fix_cppflags" = yes ; then
20018
20019 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20020 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20021
20022 continue
20023 elif test "${cf_tst_cflags}" = "\"'" ; then
20024
20025 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20026 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20027
20028 continue
20029 fi
20030 ;;
20031 esac
20032 case "$CPPFLAGS" in
20033 (*$cf_add_cflags)
20034 ;;
20035 (*)
20036 case "$cf_add_cflags" in
20037 (-D*)
20038 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20039
20040 CPPFLAGS=`echo "$CPPFLAGS" | \
20041 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
20042 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
20043
20044 ;;
20045 esac
20046
20047 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20048 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20049
20050 ;;
20051 esac
20052 ;;
20053 (*)
20054
20055 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20056 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20057
20058 ;;
20059 esac
20060 ;;
20061 (yes)
20062
20063 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20064 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20065
20066 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20067
20068 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20069 && test -z "${cf_tst_cflags}" \
20070 && cf_fix_cppflags=no
20071 ;;
20072 esac
20073 done
20074
20075 if test -n "$cf_new_cflags" ; then
20076
20077 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20078 CFLAGS="${CFLAGS}$cf_new_cflags"
20079
20080 fi
20081
20082 if test -n "$cf_new_cppflags" ; then
20083
20084 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20085 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20086
20087 fi
20088
20089 if test -n "$cf_new_extra_cppflags" ; then
20090
20091 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20092 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20093
20094 fi
20095
20096 LIBS="$cf_save_fontconfig"
20097
20098 test -n "$verbose" && echo " ...before $LIBS" 1>&6
20099
20100 echo "${as_me:-configure}:20100: testing ...before $LIBS ..." 1>&5
20101
20102 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXft %-lXft $cf_pkgconfig_libs %" -e 's% % %g'`
20103 test -n "$verbose" && echo " ...after $LIBS" 1>&6
20104
20105 echo "${as_me:-configure}:20105: testing ...after $LIBS ..." 1>&5
20106
20107 else
20108 cf_pkgconfig_incs=
20109 cf_pkgconfig_libs=
20110
20111 test -n "$verbose" && echo " ...before $LIBS" 1>&6
20112
20113 echo "${as_me:-configure}:20113: testing ...before $LIBS ..." 1>&5
20114
20115 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXft %-lXft -lfontconfig %" -e 's% % %g'`
20116 test -n "$verbose" && echo " ...after $LIBS" 1>&6
20117
20118 echo "${as_me:-configure}:20118: testing ...after $LIBS ..." 1>&5
20119
20120 fi
20121
20122 ;;
20123 esac
20124 fi
20125 fi
20126
20127 else
20128 CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
20129 fi
20130
20131 echo "$as_me:20131: checking if you want support for HP-style function keys" >&5
20132 echo $ECHO_N "checking if you want support for HP-style function keys... $ECHO_C" >&6
20133
20134 # Check whether --enable-hp-fkeys or --disable-hp-fkeys was given.
20135 if test "${enable_hp_fkeys+set}" = set; then
20136 enableval="$enable_hp_fkeys"
20137 test "$enableval" != yes && enableval=no
20138 if test "$enableval" != "no" ; then
20139 enable_hp_fkeys=yes
20140 else
20141 enable_hp_fkeys=no
20142 fi
20143 else
20144 enableval=no
20145 enable_hp_fkeys=no
20146
20147 fi;
20148 echo "$as_me:20148: result: $enable_hp_fkeys" >&5
20149 echo "${ECHO_T}$enable_hp_fkeys" >&6
20150 if test "$enable_hp_fkeys" = yes ; then
20151
20152 cat >>confdefs.h <<\EOF
20153 #define OPT_HP_FUNC_KEYS 1
20154 EOF
20155
20156 fi
20157
20158 echo "$as_me:20158: checking if you want support for SCO-style function keys" >&5
20159 echo $ECHO_N "checking if you want support for SCO-style function keys... $ECHO_C" >&6
20160
20161 # Check whether --enable-sco-fkeys or --disable-sco-fkeys was given.
20162 if test "${enable_sco_fkeys+set}" = set; then
20163 enableval="$enable_sco_fkeys"
20164 test "$enableval" != yes && enableval=no
20165 if test "$enableval" != "no" ; then
20166 enable_sco_fkeys=yes
20167 else
20168 enable_sco_fkeys=no
20169 fi
20170 else
20171 enableval=no
20172 enable_sco_fkeys=no
20173
20174 fi;
20175 echo "$as_me:20175: result: $enable_sco_fkeys" >&5
20176 echo "${ECHO_T}$enable_sco_fkeys" >&6
20177 if test "$enable_sco_fkeys" = yes ; then
20178
20179 cat >>confdefs.h <<\EOF
20180 #define OPT_SCO_FUNC_KEYS 1
20181 EOF
20182
20183 fi
20184
20185 echo "$as_me:20185: checking if you want support for Sun-style function keys" >&5
20186 echo $ECHO_N "checking if you want support for Sun-style function keys... $ECHO_C" >&6
20187
20188 # Check whether --enable-sun-fkeys or --disable-sun-fkeys was given.
20189 if test "${enable_sun_fkeys+set}" = set; then
20190 enableval="$enable_sun_fkeys"
20191 test "$enableval" != no && enableval=yes
20192 if test "$enableval" != "yes" ; then
20193 enable_sun_fkeys=no
20194 else
20195 enable_sun_fkeys=yes
20196 fi
20197 else
20198 enableval=yes
20199 enable_sun_fkeys=yes
20200
20201 fi;
20202 echo "$as_me:20202: result: $enable_sun_fkeys" >&5
20203 echo "${ECHO_T}$enable_sun_fkeys" >&6
20204 if test "$enable_sun_fkeys" = no ; then
20205
20206 cat >>confdefs.h <<\EOF
20207 #define OPT_SUN_FUNC_KEYS 0
20208 EOF
20209
20210 fi
20211
20212 echo "$as_me:20212: checking if you want saved-lines stored as a FIFO" >&5
20213 echo $ECHO_N "checking if you want saved-lines stored as a FIFO... $ECHO_C" >&6
20214
20215 # Check whether --enable-fifo-lines or --disable-fifo-lines was given.
20216 if test "${enable_fifo_lines+set}" = set; then
20217 enableval="$enable_fifo_lines"
20218 test "$enableval" != no && enableval=yes
20219 if test "$enableval" != "yes" ; then
20220 enable_fifo_lines=no
20221 else
20222 enable_fifo_lines=yes
20223 fi
20224 else
20225 enableval=yes
20226 enable_fifo_lines=yes
20227
20228 fi;
20229 echo "$as_me:20229: result: $enable_fifo_lines" >&5
20230 echo "${ECHO_T}$enable_fifo_lines" >&6
20231 if test "$enable_fifo_lines" != yes ; then
20232 { echo "$as_me:20232: WARNING: this option has been deprecated" >&5
20233 echo "$as_me: WARNING: this option has been deprecated" >&2;}
20234 fi
20235
20236 echo "$as_me:20236: checking if you want support for internationalization" >&5
20237 echo $ECHO_N "checking if you want support for internationalization... $ECHO_C" >&6
20238
20239 # Check whether --enable-i18n or --disable-i18n was given.
20240 if test "${enable_i18n+set}" = set; then
20241 enableval="$enable_i18n"
20242 test "$enableval" != no && enableval=yes
20243 if test "$enableval" != "yes" ; then
20244 enable_i18n=no
20245 else
20246 enable_i18n=yes
20247 fi
20248 else
20249 enableval=yes
20250 enable_i18n=yes
20251
20252 fi;
20253 echo "$as_me:20253: result: $enable_i18n" >&5
20254 echo "${ECHO_T}$enable_i18n" >&6
20255 if test "$enable_i18n" = no ; then
20256
20257 cat >>confdefs.h <<\EOF
20258 #define OPT_I18N_SUPPORT 0
20259 EOF
20260
20261 fi
20262
20263 echo "$as_me:20263: checking if you want support for initial-erase setup" >&5
20264 echo $ECHO_N "checking if you want support for initial-erase setup... $ECHO_C" >&6
20265
20266 # Check whether --enable-initial-erase or --disable-initial-erase was given.
20267 if test "${enable_initial_erase+set}" = set; then
20268 enableval="$enable_initial_erase"
20269 test "$enableval" != no && enableval=yes
20270 if test "$enableval" != "yes" ; then
20271 enable_ie=no
20272 else
20273 enable_ie=yes
20274 fi
20275 else
20276 enableval=yes
20277 enable_ie=yes
20278
20279 fi;
20280 echo "$as_me:20280: result: $enable_ie" >&5
20281 echo "${ECHO_T}$enable_ie" >&6
20282 if test "$enable_ie" = no ; then
20283
20284 cat >>confdefs.h <<\EOF
20285 #define OPT_INITIAL_ERASE 0
20286 EOF
20287
20288 fi
20289
20290 echo "$as_me:20290: checking if you want support for input-method" >&5
20291 echo $ECHO_N "checking if you want support for input-method... $ECHO_C" >&6
20292
20293 # Check whether --enable-input-method or --disable-input-method was given.
20294 if test "${enable_input_method+set}" = set; then
20295 enableval="$enable_input_method"
20296 test "$enableval" != no && enableval=yes
20297 if test "$enableval" != "yes" ; then
20298 enable_ximp=no
20299 else
20300 enable_ximp=$enable_i18n
20301 fi
20302 else
20303 enableval=yes
20304 enable_ximp=$enable_i18n
20305
20306 fi;
20307 echo "$as_me:20307: result: $enable_ximp" >&5
20308 echo "${ECHO_T}$enable_ximp" >&6
20309
20310 echo "$as_me:20310: checking if X libraries support input-method" >&5
20311 echo $ECHO_N "checking if X libraries support input-method... $ECHO_C" >&6
20312 if test "${cf_cv_input_method+set}" = set; then
20313 echo $ECHO_N "(cached) $ECHO_C" >&6
20314 else
20315
20316 cat >"conftest.$ac_ext" <<_ACEOF
20317 #line 20317 "configure"
20318 #include "confdefs.h"
20319
20320 #include <X11/IntrinsicP.h>
20321 #include <X11/Xatom.h>
20322 #include <X11/Xutil.h>
20323 #include <X11/Xmu/Atoms.h>
20324 #include <X11/Xmu/Converters.h>
20325 #include <X11/Xaw/XawImP.h>
20326
20327 int
20328 main (void)
20329 {
20330
20331 {
20332 XIM xim;
20333 XIMStyles *xim_styles = 0;
20334 XIMStyle input_style;
20335 Widget w = XtCreateWidget("none", (WidgetClass)0, None, (ArgList)0, 0);
20336
20337 XSetLocaleModifiers("@im=none");
20338 xim = XOpenIM(XtDisplay(w), NULL, NULL, NULL);
20339 XGetIMValues(xim, XNQueryInputStyle, &xim_styles, NULL);
20340 XCloseIM(xim);
20341 input_style = (XIMPreeditNothing | XIMStatusNothing);
20342 (void)xim_styles;
20343 (void)input_style;
20344 }
20345
20346 ;
20347 return 0;
20348 }
20349 _ACEOF
20350 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20351 if { (eval echo "$as_me:20351: \"$ac_link\"") >&5
20352 (eval $ac_link) 2>&5
20353 ac_status=$?
20354 echo "$as_me:20354: \$? = $ac_status" >&5
20355 (exit "$ac_status"); } &&
20356 { ac_try='test -s "conftest$ac_exeext"'
20357 { (eval echo "$as_me:20357: \"$ac_try\"") >&5
20358 (eval $ac_try) 2>&5
20359 ac_status=$?
20360 echo "$as_me:20360: \$? = $ac_status" >&5
20361 (exit "$ac_status"); }; }; then
20362 cf_cv_input_method=yes
20363 else
20364 echo "$as_me: failed program was:" >&5
20365 cat "conftest.$ac_ext" >&5
20366 cf_cv_input_method=no
20367 fi
20368 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20369 fi
20370 echo "$as_me:20370: result: $cf_cv_input_method" >&5
20371 echo "${ECHO_T}$cf_cv_input_method" >&6
20372
20373 test "$cf_cv_input_method" = no && enable_ximp=no
20374 if test "$enable_ximp" != no ; then
20375 if test "$enable_i18n" = no ; then
20376 { echo "$as_me:20376: WARNING: input-methor relies upon internationalization" >&5
20377 echo "$as_me: WARNING: input-methor relies upon internationalization" >&2;}
20378 enable_ximp=no
20379 fi
20380 fi
20381 if test "$enable_ximp" = no ; then
20382
20383 cat >>confdefs.h <<\EOF
20384 #define OPT_INPUT_METHOD 0
20385 EOF
20386
20387 fi
20388
20389 echo "$as_me:20389: checking if you want support for load-vt-fonts" >&5
20390 echo $ECHO_N "checking if you want support for load-vt-fonts... $ECHO_C" >&6
20391
20392 # Check whether --enable-load-vt-fonts or --disable-load-vt-fonts was given.
20393 if test "${enable_load_vt_fonts+set}" = set; then
20394 enableval="$enable_load_vt_fonts"
20395 test "$enableval" != yes && enableval=no
20396 if test "$enableval" != "no" ; then
20397 enable_load_vt_fonts=yes
20398 else
20399 enable_load_vt_fonts=no
20400 fi
20401 else
20402 enableval=no
20403 enable_load_vt_fonts=no
20404
20405 fi;
20406 echo "$as_me:20406: result: $enable_load_vt_fonts" >&5
20407 echo "${ECHO_T}$enable_load_vt_fonts" >&6
20408 if test "$enable_load_vt_fonts" = yes ; then
20409
20410 cat >>confdefs.h <<\EOF
20411 #define OPT_LOAD_VTFONTS 1
20412 EOF
20413
20414 fi
20415
20416 echo "$as_me:20416: checking if you want support for logging" >&5
20417 echo $ECHO_N "checking if you want support for logging... $ECHO_C" >&6
20418
20419 # Check whether --enable-logging or --disable-logging was given.
20420 if test "${enable_logging+set}" = set; then
20421 enableval="$enable_logging"
20422 test "$enableval" != yes && enableval=no
20423 if test "$enableval" != "no" ; then
20424 enable_logging=yes
20425 else
20426 enable_logging=no
20427 fi
20428 else
20429 enableval=no
20430 enable_logging=no
20431
20432 fi;
20433 echo "$as_me:20433: result: $enable_logging" >&5
20434 echo "${ECHO_T}$enable_logging" >&6
20435 if test "$enable_logging" = yes ; then
20436
20437 cat >>confdefs.h <<\EOF
20438 #define ALLOWLOGGING 1
20439 EOF
20440
20441 echo "$as_me:20441: checking if you want to allow logging via a pipe" >&5
20442 echo $ECHO_N "checking if you want to allow logging via a pipe... $ECHO_C" >&6
20443
20444 # Check whether --enable-logfile-exec or --disable-logfile-exec was given.
20445 if test "${enable_logfile_exec+set}" = set; then
20446 enableval="$enable_logfile_exec"
20447 test "$enableval" != yes && enableval=no
20448 if test "$enableval" != "no" ; then
20449 enable_log_exec=yes
20450 else
20451 enable_log_exec=no
20452 fi
20453 else
20454 enableval=no
20455 enable_log_exec=no
20456
20457 fi;
20458 echo "$as_me:20458: result: $enable_log_exec" >&5
20459 echo "${ECHO_T}$enable_log_exec" >&6
20460 if test "$enable_log_exec" = yes ; then
20461
20462 cat >>confdefs.h <<\EOF
20463 #define ALLOWLOGFILEEXEC 1
20464 EOF
20465
20466 fi
20467 fi
20468
20469 echo "$as_me:20469: checking if you want support for iconify/maximize translations" >&5
20470 echo $ECHO_N "checking if you want support for iconify/maximize translations... $ECHO_C" >&6
20471
20472 # Check whether --enable-maximize or --disable-maximize was given.
20473 if test "${enable_maximize+set}" = set; then
20474 enableval="$enable_maximize"
20475 test "$enableval" != no && enableval=yes
20476 if test "$enableval" != "yes" ; then
20477 enable_maximize=no
20478 else
20479 enable_maximize=yes
20480 fi
20481 else
20482 enableval=yes
20483 enable_maximize=yes
20484
20485 fi;
20486 echo "$as_me:20486: result: $enable_maximize" >&5
20487 echo "${ECHO_T}$enable_maximize" >&6
20488 test "$enable_maximize" = no &&
20489 cat >>confdefs.h <<\EOF
20490 #define OPT_MAXIMIZE 0
20491 EOF
20492
20493 echo "$as_me:20493: checking if you want NumLock to override keyboard tables" >&5
20494 echo $ECHO_N "checking if you want NumLock to override keyboard tables... $ECHO_C" >&6
20495
20496 # Check whether --enable-num-lock or --disable-num-lock was given.
20497 if test "${enable_num_lock+set}" = set; then
20498 enableval="$enable_num_lock"
20499 test "$enableval" != no && enableval=yes
20500 if test "$enableval" != "yes" ; then
20501 enable_numlock=no
20502 else
20503 enable_numlock=yes
20504 fi
20505 else
20506 enableval=yes
20507 enable_numlock=yes
20508
20509 fi;
20510 echo "$as_me:20510: result: $enable_numlock" >&5
20511 echo "${ECHO_T}$enable_numlock" >&6
20512 test "$enable_numlock" = no &&
20513 cat >>confdefs.h <<\EOF
20514 #define OPT_NUM_LOCK 0
20515 EOF
20516
20517 echo "$as_me:20517: checking if you want support for get/set of base64 selection data" >&5
20518 echo $ECHO_N "checking if you want support for get/set of base64 selection data... $ECHO_C" >&6
20519
20520 # Check whether --enable-paste64 or --disable-paste64 was given.
20521 if test "${enable_paste64+set}" = set; then
20522 enableval="$enable_paste64"
20523 test "$enableval" != no && enableval=yes
20524 if test "$enableval" != "yes" ; then
20525 enable_paste64=no
20526 else
20527 enable_paste64=yes
20528 fi
20529 else
20530 enableval=yes
20531 enable_paste64=yes
20532
20533 fi;
20534 echo "$as_me:20534: result: $enable_paste64" >&5
20535 echo "${ECHO_T}$enable_paste64" >&6
20536 if test "$enable_paste64" = yes ; then
20537
20538 cat >>confdefs.h <<\EOF
20539 #define OPT_PASTE64 1
20540 EOF
20541
20542 else
20543
20544 cat >>confdefs.h <<\EOF
20545 #define OPT_PASTE64 0
20546 EOF
20547
20548 fi
20549
20550 echo "$as_me:20550: checking if you want support for pty-handshaking" >&5
20551 echo $ECHO_N "checking if you want support for pty-handshaking... $ECHO_C" >&6
20552
20553 # Check whether --enable-pty-handshake or --disable-pty-handshake was given.
20554 if test "${enable_pty_handshake+set}" = set; then
20555 enableval="$enable_pty_handshake"
20556 test "$enableval" != no && enableval=yes
20557 if test "$enableval" != "yes" ; then
20558 enable_pty_handshake=no
20559 else
20560 enable_pty_handshake=yes
20561 fi
20562 else
20563 enableval=yes
20564 enable_pty_handshake=yes
20565
20566 fi;
20567 echo "$as_me:20567: result: $enable_pty_handshake" >&5
20568 echo "${ECHO_T}$enable_pty_handshake" >&6
20569 if test "$enable_pty_handshake" = yes ; then
20570
20571 cat >>confdefs.h <<\EOF
20572 #define OPT_PTY_HANDSHAKE 1
20573 EOF
20574
20575 else
20576
20577 cat >>confdefs.h <<\EOF
20578 #define OPT_PTY_HANDSHAKE 0
20579 EOF
20580
20581 fi
20582
20583 echo "$as_me:20583: checking if you want support for mouse in readline applications" >&5
20584 echo $ECHO_N "checking if you want support for mouse in readline applications... $ECHO_C" >&6
20585
20586 # Check whether --enable-readline-mouse or --disable-readline-mouse was given.
20587 if test "${enable_readline_mouse+set}" = set; then
20588 enableval="$enable_readline_mouse"
20589 test "$enableval" != no && enableval=yes
20590 if test "$enableval" != "yes" ; then
20591 enable_readline_mouse=no
20592 else
20593 enable_readline_mouse=yes
20594 fi
20595 else
20596 enableval=yes
20597 enable_readline_mouse=yes
20598
20599 fi;
20600 echo "$as_me:20600: result: $enable_readline_mouse" >&5
20601 echo "${ECHO_T}$enable_readline_mouse" >&6
20602 if test "$enable_readline_mouse" = yes ; then
20603
20604 cat >>confdefs.h <<\EOF
20605 #define OPT_READLINE 1
20606 EOF
20607
20608 fi
20609
20610 echo "$as_me:20610: checking if you want support for regular-expression selections" >&5
20611 echo $ECHO_N "checking if you want support for regular-expression selections... $ECHO_C" >&6
20612
20613 # Check whether --enable-regex or --disable-regex was given.
20614 if test "${enable_regex+set}" = set; then
20615 enableval="$enable_regex"
20616 test "$enableval" != no && enableval=yes
20617 if test "$enableval" != "yes" ; then
20618 enable_regex=no
20619 else
20620 enable_regex=yes
20621 fi
20622 else
20623 enableval=yes
20624 enable_regex=yes
20625
20626 fi;
20627 echo "$as_me:20627: result: $enable_regex" >&5
20628 echo "${ECHO_T}$enable_regex" >&6
20629 if test "$enable_regex" = yes ; then
20630
20631 echo "$as_me:20631: checking if you want to use PCRE2 for regular-expressions" >&5
20632 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
20633
20634 # Check whether --with-pcre2 or --without-pcre2 was given.
20635 if test "${with_pcre2+set}" = set; then
20636 withval="$with_pcre2"
20637
20638 fi;
20639 test -z "$with_pcre2" && with_pcre2=no
20640 echo "$as_me:20640: result: $with_pcre2" >&5
20641 echo "${ECHO_T}$with_pcre2" >&6
20642
20643 if test "x$with_pcre2" != xno ; then
20644 cf_with_pcre2_ok=no
20645 for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
20646 do
20647
20648 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
20649 test -n "$verbose" && echo " found package $cf_with_pcre2" 1>&6
20650
20651 echo "${as_me:-configure}:20651: testing found package $cf_with_pcre2 ..." 1>&5
20652
20653 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
20654 cf_pkgconfig_libs="`$PKG_CONFIG --libs "$cf_with_pcre2" 2>/dev/null`"
20655 test -n "$verbose" && echo " package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
20656
20657 echo "${as_me:-configure}:20657: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20658
20659 test -n "$verbose" && echo " package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
20660
20661 echo "${as_me:-configure}:20661: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
20662
20663 cf_fix_cppflags=no
20664 cf_new_cflags=
20665 cf_new_cppflags=
20666 cf_new_extra_cppflags=
20667
20668 for cf_add_cflags in $cf_pkgconfig_incs
20669 do
20670 case "$cf_fix_cppflags" in
20671 (no)
20672 case "$cf_add_cflags" in
20673 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20674 case "$cf_add_cflags" in
20675 (-D*)
20676 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20677
20678 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20679 && test -z "${cf_tst_cflags}" \
20680 && cf_fix_cppflags=yes
20681
20682 if test "$cf_fix_cppflags" = yes ; then
20683
20684 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20685 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20686
20687 continue
20688 elif test "${cf_tst_cflags}" = "\"'" ; then
20689
20690 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20691 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20692
20693 continue
20694 fi
20695 ;;
20696 esac
20697 case "$CPPFLAGS" in
20698 (*$cf_add_cflags)
20699 ;;
20700 (*)
20701 case "$cf_add_cflags" in
20702 (-D*)
20703 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20704
20705 CPPFLAGS=`echo "$CPPFLAGS" | \
20706 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
20707 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
20708
20709 ;;
20710 esac
20711
20712 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20713 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20714
20715 ;;
20716 esac
20717 ;;
20718 (*)
20719
20720 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20721 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20722
20723 ;;
20724 esac
20725 ;;
20726 (yes)
20727
20728 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20729 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20730
20731 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20732
20733 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20734 && test -z "${cf_tst_cflags}" \
20735 && cf_fix_cppflags=no
20736 ;;
20737 esac
20738 done
20739
20740 if test -n "$cf_new_cflags" ; then
20741
20742 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20743 CFLAGS="${CFLAGS}$cf_new_cflags"
20744
20745 fi
20746
20747 if test -n "$cf_new_cppflags" ; then
20748
20749 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20750 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20751
20752 fi
20753
20754 if test -n "$cf_new_extra_cppflags" ; then
20755
20756 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20757 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20758
20759 fi
20760
20761 cf_add_libs="$LIBS"
20762 # reverse order
20763 cf_add_0lib=
20764 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20765 # filter duplicates
20766 for cf_add_1lib in $cf_add_0lib; do
20767 for cf_add_2lib in $cf_add_libs; do
20768 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20769 cf_add_1lib=
20770 break
20771 fi
20772 done
20773 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20774 done
20775 LIBS="$cf_add_libs"
20776
20777 cf_with_pcre2_ok=yes; break
20778 else
20779 cf_pkgconfig_incs=
20780 cf_pkgconfig_libs=
20781 :
20782 fi
20783
20784 done
20785 cf_with_pcre2_ok=yes || { { echo "$as_me:20785: error: Cannot find PCRE2 library" >&5
20786 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
20787 { (exit 1); exit 1; }; }
20788
20789 cat >>confdefs.h <<\EOF
20790 #define HAVE_LIB_PCRE2 1
20791 EOF
20792
20793 # if pkgconfig gave no results, look for the libraries directly
20794 case "$LIBS" in
20795 (*pcre2-posix*|*pcreposix*)
20796 ;;
20797 (*)
20798 echo "$as_me:20798: checking for regcomp in -lpcre2-posix" >&5
20799 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
20800 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
20801 echo $ECHO_N "(cached) $ECHO_C" >&6
20802 else
20803 ac_check_lib_save_LIBS=$LIBS
20804 LIBS="-lpcre2-posix $LIBS"
20805 cat >"conftest.$ac_ext" <<_ACEOF
20806 #line 20806 "configure"
20807 #include "confdefs.h"
20808
20809 /* Override any gcc2 internal prototype to avoid an error. */
20810 #ifdef __cplusplus
20811 extern "C"
20812 #endif
20813 /* We use char because int might match the return type of a gcc2
20814 builtin and then its argument prototype would still apply. */
20815 char regcomp ();
20816 int
20817 main (void)
20818 {
20819 regcomp ();
20820 ;
20821 return 0;
20822 }
20823 _ACEOF
20824 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20825 if { (eval echo "$as_me:20825: \"$ac_link\"") >&5
20826 (eval $ac_link) 2>&5
20827 ac_status=$?
20828 echo "$as_me:20828: \$? = $ac_status" >&5
20829 (exit "$ac_status"); } &&
20830 { ac_try='test -s "conftest$ac_exeext"'
20831 { (eval echo "$as_me:20831: \"$ac_try\"") >&5
20832 (eval $ac_try) 2>&5
20833 ac_status=$?
20834 echo "$as_me:20834: \$? = $ac_status" >&5
20835 (exit "$ac_status"); }; }; then
20836 ac_cv_lib_pcre2_posix_regcomp=yes
20837 else
20838 echo "$as_me: failed program was:" >&5
20839 cat "conftest.$ac_ext" >&5
20840 ac_cv_lib_pcre2_posix_regcomp=no
20841 fi
20842 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20843 LIBS=$ac_check_lib_save_LIBS
20844 fi
20845 echo "$as_me:20845: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
20846 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
20847 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
20848
20849 cf_add_libs="$LIBS"
20850 # reverse order
20851 cf_add_0lib=
20852 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20853 # filter duplicates
20854 for cf_add_1lib in $cf_add_0lib; do
20855 for cf_add_2lib in $cf_add_libs; do
20856 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20857 cf_add_1lib=
20858 break
20859 fi
20860 done
20861 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20862 done
20863 LIBS="$cf_add_libs"
20864
20865 else
20866 echo "$as_me:20866: checking for regcomp in -lpcreposix" >&5
20867 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
20868 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
20869 echo $ECHO_N "(cached) $ECHO_C" >&6
20870 else
20871 ac_check_lib_save_LIBS=$LIBS
20872 LIBS="-lpcreposix $LIBS"
20873 cat >"conftest.$ac_ext" <<_ACEOF
20874 #line 20874 "configure"
20875 #include "confdefs.h"
20876
20877 /* Override any gcc2 internal prototype to avoid an error. */
20878 #ifdef __cplusplus
20879 extern "C"
20880 #endif
20881 /* We use char because int might match the return type of a gcc2
20882 builtin and then its argument prototype would still apply. */
20883 char regcomp ();
20884 int
20885 main (void)
20886 {
20887 regcomp ();
20888 ;
20889 return 0;
20890 }
20891 _ACEOF
20892 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20893 if { (eval echo "$as_me:20893: \"$ac_link\"") >&5
20894 (eval $ac_link) 2>&5
20895 ac_status=$?
20896 echo "$as_me:20896: \$? = $ac_status" >&5
20897 (exit "$ac_status"); } &&
20898 { ac_try='test -s "conftest$ac_exeext"'
20899 { (eval echo "$as_me:20899: \"$ac_try\"") >&5
20900 (eval $ac_try) 2>&5
20901 ac_status=$?
20902 echo "$as_me:20902: \$? = $ac_status" >&5
20903 (exit "$ac_status"); }; }; then
20904 ac_cv_lib_pcreposix_regcomp=yes
20905 else
20906 echo "$as_me: failed program was:" >&5
20907 cat "conftest.$ac_ext" >&5
20908 ac_cv_lib_pcreposix_regcomp=no
20909 fi
20910 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20911 LIBS=$ac_check_lib_save_LIBS
20912 fi
20913 echo "$as_me:20913: result: $ac_cv_lib_pcreposix_regcomp" >&5
20914 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
20915 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
20916
20917 cf_add_libs="$LIBS"
20918 # reverse order
20919 cf_add_0lib=
20920 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20921 # filter duplicates
20922 for cf_add_1lib in $cf_add_0lib; do
20923 for cf_add_2lib in $cf_add_libs; do
20924 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20925 cf_add_1lib=
20926 break
20927 fi
20928 done
20929 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20930 done
20931 LIBS="$cf_add_libs"
20932
20933 else
20934 { { echo "$as_me:20934: error: Cannot find PCRE2 POSIX library" >&5
20935 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
20936 { (exit 1); exit 1; }; }
20937 fi
20938
20939 fi
20940
20941 ;;
20942 esac
20943
20944 # either way, check for the library header files
20945
20946 for ac_header in pcre2posix.h pcreposix.h
20947 do
20948 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20949 echo "$as_me:20949: checking for $ac_header" >&5
20950 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20951 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20952 echo $ECHO_N "(cached) $ECHO_C" >&6
20953 else
20954 cat >"conftest.$ac_ext" <<_ACEOF
20955 #line 20955 "configure"
20956 #include "confdefs.h"
20957 #include <$ac_header>
20958 _ACEOF
20959 if { (eval echo "$as_me:20959: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20960 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20961 ac_status=$?
20962 $EGREP -v '^ *\+' conftest.er1 >conftest.err
20963 rm -f conftest.er1
20964 cat conftest.err >&5
20965 echo "$as_me:20965: \$? = $ac_status" >&5
20966 (exit "$ac_status"); } >/dev/null; then
20967 if test -s conftest.err; then
20968 ac_cpp_err=$ac_c_preproc_warn_flag
20969 else
20970 ac_cpp_err=
20971 fi
20972 else
20973 ac_cpp_err=yes
20974 fi
20975 if test -z "$ac_cpp_err"; then
20976 eval "$as_ac_Header=yes"
20977 else
20978 echo "$as_me: failed program was:" >&5
20979 cat "conftest.$ac_ext" >&5
20980 eval "$as_ac_Header=no"
20981 fi
20982 rm -f conftest.err "conftest.$ac_ext"
20983 fi
20984 echo "$as_me:20984: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20985 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20986 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20987 cat >>confdefs.h <<EOF
20988 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20989 EOF
20990
20991 fi
20992 done
20993
20994 for ac_func in PCRE2regcomp
20995 do
20996 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20997 echo "$as_me:20997: checking for $ac_func" >&5
20998 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20999 if eval "test \"\${$as_ac_var+set}\" = set"; then
21000 echo $ECHO_N "(cached) $ECHO_C" >&6
21001 else
21002 cat >"conftest.$ac_ext" <<_ACEOF
21003 #line 21003 "configure"
21004 #include "confdefs.h"
21005 #define $ac_func autoconf_temporary
21006 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21007 #undef $ac_func
21008
21009 #ifdef __cplusplus
21010 extern "C"
21011 #endif
21012
21013 /* We use char because int might match the return type of a gcc2
21014 builtin and then its argument prototype would still apply. */
21015 char $ac_func (void);
21016
21017 int
21018 main (void)
21019 {
21020
21021 /* The GNU C library defines stubs for functions which it implements
21022 to always fail with ENOSYS. Some functions are actually named
21023 something starting with __ and the normal name is an alias. */
21024 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21025 #error found stub for $ac_func
21026 #endif
21027
21028 return $ac_func ();
21029 ;
21030 return 0;
21031 }
21032 _ACEOF
21033 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21034 if { (eval echo "$as_me:21034: \"$ac_link\"") >&5
21035 (eval $ac_link) 2>&5
21036 ac_status=$?
21037 echo "$as_me:21037: \$? = $ac_status" >&5
21038 (exit "$ac_status"); } &&
21039 { ac_try='test -s "conftest$ac_exeext"'
21040 { (eval echo "$as_me:21040: \"$ac_try\"") >&5
21041 (eval $ac_try) 2>&5
21042 ac_status=$?
21043 echo "$as_me:21043: \$? = $ac_status" >&5
21044 (exit "$ac_status"); }; }; then
21045 eval "$as_ac_var=yes"
21046 else
21047 echo "$as_me: failed program was:" >&5
21048 cat "conftest.$ac_ext" >&5
21049 eval "$as_ac_var=no"
21050 fi
21051 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21052 fi
21053 echo "$as_me:21053: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21054 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21055 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21056 cat >>confdefs.h <<EOF
21057 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21058 EOF
21059
21060 fi
21061 done
21062
21063 fi
21064
21065 if test "$with_pcre2" = no ; then
21066
21067 echo "$as_me:21067: checking if you want to use PCRE for regular-expressions" >&5
21068 echo $ECHO_N "checking if you want to use PCRE for regular-expressions... $ECHO_C" >&6
21069
21070 # Check whether --with-pcre or --without-pcre was given.
21071 if test "${with_pcre+set}" = set; then
21072 withval="$with_pcre"
21073
21074 fi;
21075 test -z "$with_pcre" && with_pcre=no
21076 echo "$as_me:21076: result: $with_pcre" >&5
21077 echo "${ECHO_T}$with_pcre" >&6
21078
21079 if test "$with_pcre" != no ; then
21080
21081 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "libpcre"; then
21082 test -n "$verbose" && echo " found package libpcre" 1>&6
21083
21084 echo "${as_me:-configure}:21084: testing found package libpcre ..." 1>&5
21085
21086 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "libpcre" 2>/dev/null`"
21087 cf_pkgconfig_libs="`$PKG_CONFIG --libs "libpcre" 2>/dev/null`"
21088 test -n "$verbose" && echo " package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
21089
21090 echo "${as_me:-configure}:21090: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
21091
21092 test -n "$verbose" && echo " package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
21093
21094 echo "${as_me:-configure}:21094: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
21095
21096 cf_fix_cppflags=no
21097 cf_new_cflags=
21098 cf_new_cppflags=
21099 cf_new_extra_cppflags=
21100
21101 for cf_add_cflags in $cf_pkgconfig_incs
21102 do
21103 case "$cf_fix_cppflags" in
21104 (no)
21105 case "$cf_add_cflags" in
21106 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21107 case "$cf_add_cflags" in
21108 (-D*)
21109 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21110
21111 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21112 && test -z "${cf_tst_cflags}" \
21113 && cf_fix_cppflags=yes
21114
21115 if test "$cf_fix_cppflags" = yes ; then
21116
21117 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21118 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21119
21120 continue
21121 elif test "${cf_tst_cflags}" = "\"'" ; then
21122
21123 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21124 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21125
21126 continue
21127 fi
21128 ;;
21129 esac
21130 case "$CPPFLAGS" in
21131 (*$cf_add_cflags)
21132 ;;
21133 (*)
21134 case "$cf_add_cflags" in
21135 (-D*)
21136 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21137
21138 CPPFLAGS=`echo "$CPPFLAGS" | \
21139 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
21140 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
21141
21142 ;;
21143 esac
21144
21145 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21146 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21147
21148 ;;
21149 esac
21150 ;;
21151 (*)
21152
21153 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21154 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21155
21156 ;;
21157 esac
21158 ;;
21159 (yes)
21160
21161 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21162 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21163
21164 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21165
21166 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21167 && test -z "${cf_tst_cflags}" \
21168 && cf_fix_cppflags=no
21169 ;;
21170 esac
21171 done
21172
21173 if test -n "$cf_new_cflags" ; then
21174
21175 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21176 CFLAGS="${CFLAGS}$cf_new_cflags"
21177
21178 fi
21179
21180 if test -n "$cf_new_cppflags" ; then
21181
21182 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21183 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21184
21185 fi
21186
21187 if test -n "$cf_new_extra_cppflags" ; then
21188
21189 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21190 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21191
21192 fi
21193
21194 cf_add_libs="$LIBS"
21195 # reverse order
21196 cf_add_0lib=
21197 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21198 # filter duplicates
21199 for cf_add_1lib in $cf_add_0lib; do
21200 for cf_add_2lib in $cf_add_libs; do
21201 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21202 cf_add_1lib=
21203 break
21204 fi
21205 done
21206 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21207 done
21208 LIBS="$cf_add_libs"
21209
21210 :
21211 else
21212 cf_pkgconfig_incs=
21213 cf_pkgconfig_libs=
21214
21215 echo "$as_me:21215: checking for pcre_compile in -lpcre" >&5
21216 echo $ECHO_N "checking for pcre_compile in -lpcre... $ECHO_C" >&6
21217 if test "${ac_cv_lib_pcre_pcre_compile+set}" = set; then
21218 echo $ECHO_N "(cached) $ECHO_C" >&6
21219 else
21220 ac_check_lib_save_LIBS=$LIBS
21221 LIBS="-lpcre $LIBS"
21222 cat >"conftest.$ac_ext" <<_ACEOF
21223 #line 21223 "configure"
21224 #include "confdefs.h"
21225
21226 /* Override any gcc2 internal prototype to avoid an error. */
21227 #ifdef __cplusplus
21228 extern "C"
21229 #endif
21230 /* We use char because int might match the return type of a gcc2
21231 builtin and then its argument prototype would still apply. */
21232 char pcre_compile ();
21233 int
21234 main (void)
21235 {
21236 pcre_compile ();
21237 ;
21238 return 0;
21239 }
21240 _ACEOF
21241 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21242 if { (eval echo "$as_me:21242: \"$ac_link\"") >&5
21243 (eval $ac_link) 2>&5
21244 ac_status=$?
21245 echo "$as_me:21245: \$? = $ac_status" >&5
21246 (exit "$ac_status"); } &&
21247 { ac_try='test -s "conftest$ac_exeext"'
21248 { (eval echo "$as_me:21248: \"$ac_try\"") >&5
21249 (eval $ac_try) 2>&5
21250 ac_status=$?
21251 echo "$as_me:21251: \$? = $ac_status" >&5
21252 (exit "$ac_status"); }; }; then
21253 ac_cv_lib_pcre_pcre_compile=yes
21254 else
21255 echo "$as_me: failed program was:" >&5
21256 cat "conftest.$ac_ext" >&5
21257 ac_cv_lib_pcre_pcre_compile=no
21258 fi
21259 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21260 LIBS=$ac_check_lib_save_LIBS
21261 fi
21262 echo "$as_me:21262: result: $ac_cv_lib_pcre_pcre_compile" >&5
21263 echo "${ECHO_T}$ac_cv_lib_pcre_pcre_compile" >&6
21264 if test "$ac_cv_lib_pcre_pcre_compile" = yes; then
21265 cat >>confdefs.h <<EOF
21266 #define HAVE_LIBPCRE 1
21267 EOF
21268
21269 LIBS="-lpcre $LIBS"
21270
21271 else
21272 { { echo "$as_me:21272: error: Cannot find PCRE library" >&5
21273 echo "$as_me: error: Cannot find PCRE library" >&2;}
21274 { (exit 1); exit 1; }; }
21275 fi
21276
21277 fi
21278
21279 cat >>confdefs.h <<\EOF
21280 #define HAVE_LIB_PCRE 1
21281 EOF
21282
21283 case $LIBS in
21284 (*pcreposix*)
21285 ;;
21286 (*)
21287 echo "$as_me:21287: checking for pcreposix_regcomp in -lpcreposix" >&5
21288 echo $ECHO_N "checking for pcreposix_regcomp in -lpcreposix... $ECHO_C" >&6
21289 if test "${ac_cv_lib_pcreposix_pcreposix_regcomp+set}" = set; then
21290 echo $ECHO_N "(cached) $ECHO_C" >&6
21291 else
21292 ac_check_lib_save_LIBS=$LIBS
21293 LIBS="-lpcreposix $LIBS"
21294 cat >"conftest.$ac_ext" <<_ACEOF
21295 #line 21295 "configure"
21296 #include "confdefs.h"
21297
21298 /* Override any gcc2 internal prototype to avoid an error. */
21299 #ifdef __cplusplus
21300 extern "C"
21301 #endif
21302 /* We use char because int might match the return type of a gcc2
21303 builtin and then its argument prototype would still apply. */
21304 char pcreposix_regcomp ();
21305 int
21306 main (void)
21307 {
21308 pcreposix_regcomp ();
21309 ;
21310 return 0;
21311 }
21312 _ACEOF
21313 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21314 if { (eval echo "$as_me:21314: \"$ac_link\"") >&5
21315 (eval $ac_link) 2>&5
21316 ac_status=$?
21317 echo "$as_me:21317: \$? = $ac_status" >&5
21318 (exit "$ac_status"); } &&
21319 { ac_try='test -s "conftest$ac_exeext"'
21320 { (eval echo "$as_me:21320: \"$ac_try\"") >&5
21321 (eval $ac_try) 2>&5
21322 ac_status=$?
21323 echo "$as_me:21323: \$? = $ac_status" >&5
21324 (exit "$ac_status"); }; }; then
21325 ac_cv_lib_pcreposix_pcreposix_regcomp=yes
21326 else
21327 echo "$as_me: failed program was:" >&5
21328 cat "conftest.$ac_ext" >&5
21329 ac_cv_lib_pcreposix_pcreposix_regcomp=no
21330 fi
21331 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21332 LIBS=$ac_check_lib_save_LIBS
21333 fi
21334 echo "$as_me:21334: result: $ac_cv_lib_pcreposix_pcreposix_regcomp" >&5
21335 echo "${ECHO_T}$ac_cv_lib_pcreposix_pcreposix_regcomp" >&6
21336 if test "$ac_cv_lib_pcreposix_pcreposix_regcomp" = yes; then
21337
21338 cat >>confdefs.h <<\EOF
21339 #define HAVE_PCREPOSIX_H 1
21340 EOF
21341
21342 cf_add_libs="$LIBS"
21343 # reverse order
21344 cf_add_0lib=
21345 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21346 # filter duplicates
21347 for cf_add_1lib in $cf_add_0lib; do
21348 for cf_add_2lib in $cf_add_libs; do
21349 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21350 cf_add_1lib=
21351 break
21352 fi
21353 done
21354 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21355 done
21356 LIBS="$cf_add_libs"
21357
21358 else
21359 echo "$as_me:21359: checking for regcomp in -lpcreposix" >&5
21360 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
21361 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
21362 echo $ECHO_N "(cached) $ECHO_C" >&6
21363 else
21364 ac_check_lib_save_LIBS=$LIBS
21365 LIBS="-lpcreposix $LIBS"
21366 cat >"conftest.$ac_ext" <<_ACEOF
21367 #line 21367 "configure"
21368 #include "confdefs.h"
21369
21370 /* Override any gcc2 internal prototype to avoid an error. */
21371 #ifdef __cplusplus
21372 extern "C"
21373 #endif
21374 /* We use char because int might match the return type of a gcc2
21375 builtin and then its argument prototype would still apply. */
21376 char regcomp ();
21377 int
21378 main (void)
21379 {
21380 regcomp ();
21381 ;
21382 return 0;
21383 }
21384 _ACEOF
21385 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21386 if { (eval echo "$as_me:21386: \"$ac_link\"") >&5
21387 (eval $ac_link) 2>&5
21388 ac_status=$?
21389 echo "$as_me:21389: \$? = $ac_status" >&5
21390 (exit "$ac_status"); } &&
21391 { ac_try='test -s "conftest$ac_exeext"'
21392 { (eval echo "$as_me:21392: \"$ac_try\"") >&5
21393 (eval $ac_try) 2>&5
21394 ac_status=$?
21395 echo "$as_me:21395: \$? = $ac_status" >&5
21396 (exit "$ac_status"); }; }; then
21397 ac_cv_lib_pcreposix_regcomp=yes
21398 else
21399 echo "$as_me: failed program was:" >&5
21400 cat "conftest.$ac_ext" >&5
21401 ac_cv_lib_pcreposix_regcomp=no
21402 fi
21403 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21404 LIBS=$ac_check_lib_save_LIBS
21405 fi
21406 echo "$as_me:21406: result: $ac_cv_lib_pcreposix_regcomp" >&5
21407 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
21408 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
21409
21410 cat >>confdefs.h <<\EOF
21411 #define HAVE_PCREPOSIX_H 1
21412 EOF
21413
21414 cf_add_libs="$LIBS"
21415 # reverse order
21416 cf_add_0lib=
21417 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21418 # filter duplicates
21419 for cf_add_1lib in $cf_add_0lib; do
21420 for cf_add_2lib in $cf_add_libs; do
21421 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21422 cf_add_1lib=
21423 break
21424 fi
21425 done
21426 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21427 done
21428 LIBS="$cf_add_libs"
21429
21430 else
21431 { { echo "$as_me:21431: error: Cannot find PCRE POSIX library" >&5
21432 echo "$as_me: error: Cannot find PCRE POSIX library" >&2;}
21433 { (exit 1); exit 1; }; }
21434 fi
21435
21436 fi
21437
21438 ;;
21439 esac
21440 fi
21441
21442 if test "$with_pcre" = no ; then
21443
21444 cf_regex_func=no
21445 cf_regex_libs=
21446 case "$host_os" in
21447 (mingw*)
21448 # -lsystre -ltre -lintl -liconv
21449 echo "$as_me:21449: checking for regcomp in -lsystre" >&5
21450 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
21451 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
21452 echo $ECHO_N "(cached) $ECHO_C" >&6
21453 else
21454 ac_check_lib_save_LIBS=$LIBS
21455 LIBS="-lsystre $LIBS"
21456 cat >"conftest.$ac_ext" <<_ACEOF
21457 #line 21457 "configure"
21458 #include "confdefs.h"
21459
21460 /* Override any gcc2 internal prototype to avoid an error. */
21461 #ifdef __cplusplus
21462 extern "C"
21463 #endif
21464 /* We use char because int might match the return type of a gcc2
21465 builtin and then its argument prototype would still apply. */
21466 char regcomp ();
21467 int
21468 main (void)
21469 {
21470 regcomp ();
21471 ;
21472 return 0;
21473 }
21474 _ACEOF
21475 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21476 if { (eval echo "$as_me:21476: \"$ac_link\"") >&5
21477 (eval $ac_link) 2>&5
21478 ac_status=$?
21479 echo "$as_me:21479: \$? = $ac_status" >&5
21480 (exit "$ac_status"); } &&
21481 { ac_try='test -s "conftest$ac_exeext"'
21482 { (eval echo "$as_me:21482: \"$ac_try\"") >&5
21483 (eval $ac_try) 2>&5
21484 ac_status=$?
21485 echo "$as_me:21485: \$? = $ac_status" >&5
21486 (exit "$ac_status"); }; }; then
21487 ac_cv_lib_systre_regcomp=yes
21488 else
21489 echo "$as_me: failed program was:" >&5
21490 cat "conftest.$ac_ext" >&5
21491 ac_cv_lib_systre_regcomp=no
21492 fi
21493 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21494 LIBS=$ac_check_lib_save_LIBS
21495 fi
21496 echo "$as_me:21496: result: $ac_cv_lib_systre_regcomp" >&5
21497 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
21498 if test "$ac_cv_lib_systre_regcomp" = yes; then
21499
21500 echo "$as_me:21500: checking for libiconv_open in -liconv" >&5
21501 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
21502 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
21503 echo $ECHO_N "(cached) $ECHO_C" >&6
21504 else
21505 ac_check_lib_save_LIBS=$LIBS
21506 LIBS="-liconv $LIBS"
21507 cat >"conftest.$ac_ext" <<_ACEOF
21508 #line 21508 "configure"
21509 #include "confdefs.h"
21510
21511 /* Override any gcc2 internal prototype to avoid an error. */
21512 #ifdef __cplusplus
21513 extern "C"
21514 #endif
21515 /* We use char because int might match the return type of a gcc2
21516 builtin and then its argument prototype would still apply. */
21517 char libiconv_open ();
21518 int
21519 main (void)
21520 {
21521 libiconv_open ();
21522 ;
21523 return 0;
21524 }
21525 _ACEOF
21526 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21527 if { (eval echo "$as_me:21527: \"$ac_link\"") >&5
21528 (eval $ac_link) 2>&5
21529 ac_status=$?
21530 echo "$as_me:21530: \$? = $ac_status" >&5
21531 (exit "$ac_status"); } &&
21532 { ac_try='test -s "conftest$ac_exeext"'
21533 { (eval echo "$as_me:21533: \"$ac_try\"") >&5
21534 (eval $ac_try) 2>&5
21535 ac_status=$?
21536 echo "$as_me:21536: \$? = $ac_status" >&5
21537 (exit "$ac_status"); }; }; then
21538 ac_cv_lib_iconv_libiconv_open=yes
21539 else
21540 echo "$as_me: failed program was:" >&5
21541 cat "conftest.$ac_ext" >&5
21542 ac_cv_lib_iconv_libiconv_open=no
21543 fi
21544 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21545 LIBS=$ac_check_lib_save_LIBS
21546 fi
21547 echo "$as_me:21547: result: $ac_cv_lib_iconv_libiconv_open" >&5
21548 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
21549 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
21550
21551 cf_add_libs="$LIBS"
21552 # reverse order
21553 cf_add_0lib=
21554 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21555 # filter duplicates
21556 for cf_add_1lib in $cf_add_0lib; do
21557 for cf_add_2lib in $cf_add_libs; do
21558 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21559 cf_add_1lib=
21560 break
21561 fi
21562 done
21563 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21564 done
21565 LIBS="$cf_add_libs"
21566
21567 fi
21568
21569 echo "$as_me:21569: checking for libintl_gettext in -lintl" >&5
21570 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
21571 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
21572 echo $ECHO_N "(cached) $ECHO_C" >&6
21573 else
21574 ac_check_lib_save_LIBS=$LIBS
21575 LIBS="-lintl $LIBS"
21576 cat >"conftest.$ac_ext" <<_ACEOF
21577 #line 21577 "configure"
21578 #include "confdefs.h"
21579
21580 /* Override any gcc2 internal prototype to avoid an error. */
21581 #ifdef __cplusplus
21582 extern "C"
21583 #endif
21584 /* We use char because int might match the return type of a gcc2
21585 builtin and then its argument prototype would still apply. */
21586 char libintl_gettext ();
21587 int
21588 main (void)
21589 {
21590 libintl_gettext ();
21591 ;
21592 return 0;
21593 }
21594 _ACEOF
21595 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21596 if { (eval echo "$as_me:21596: \"$ac_link\"") >&5
21597 (eval $ac_link) 2>&5
21598 ac_status=$?
21599 echo "$as_me:21599: \$? = $ac_status" >&5
21600 (exit "$ac_status"); } &&
21601 { ac_try='test -s "conftest$ac_exeext"'
21602 { (eval echo "$as_me:21602: \"$ac_try\"") >&5
21603 (eval $ac_try) 2>&5
21604 ac_status=$?
21605 echo "$as_me:21605: \$? = $ac_status" >&5
21606 (exit "$ac_status"); }; }; then
21607 ac_cv_lib_intl_libintl_gettext=yes
21608 else
21609 echo "$as_me: failed program was:" >&5
21610 cat "conftest.$ac_ext" >&5
21611 ac_cv_lib_intl_libintl_gettext=no
21612 fi
21613 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21614 LIBS=$ac_check_lib_save_LIBS
21615 fi
21616 echo "$as_me:21616: result: $ac_cv_lib_intl_libintl_gettext" >&5
21617 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
21618 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
21619
21620 cf_add_libs="$LIBS"
21621 # reverse order
21622 cf_add_0lib=
21623 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21624 # filter duplicates
21625 for cf_add_1lib in $cf_add_0lib; do
21626 for cf_add_2lib in $cf_add_libs; do
21627 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21628 cf_add_1lib=
21629 break
21630 fi
21631 done
21632 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21633 done
21634 LIBS="$cf_add_libs"
21635
21636 fi
21637
21638 echo "$as_me:21638: checking for tre_regcomp in -ltre" >&5
21639 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
21640 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
21641 echo $ECHO_N "(cached) $ECHO_C" >&6
21642 else
21643 ac_check_lib_save_LIBS=$LIBS
21644 LIBS="-ltre $LIBS"
21645 cat >"conftest.$ac_ext" <<_ACEOF
21646 #line 21646 "configure"
21647 #include "confdefs.h"
21648
21649 /* Override any gcc2 internal prototype to avoid an error. */
21650 #ifdef __cplusplus
21651 extern "C"
21652 #endif
21653 /* We use char because int might match the return type of a gcc2
21654 builtin and then its argument prototype would still apply. */
21655 char tre_regcomp ();
21656 int
21657 main (void)
21658 {
21659 tre_regcomp ();
21660 ;
21661 return 0;
21662 }
21663 _ACEOF
21664 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21665 if { (eval echo "$as_me:21665: \"$ac_link\"") >&5
21666 (eval $ac_link) 2>&5
21667 ac_status=$?
21668 echo "$as_me:21668: \$? = $ac_status" >&5
21669 (exit "$ac_status"); } &&
21670 { ac_try='test -s "conftest$ac_exeext"'
21671 { (eval echo "$as_me:21671: \"$ac_try\"") >&5
21672 (eval $ac_try) 2>&5
21673 ac_status=$?
21674 echo "$as_me:21674: \$? = $ac_status" >&5
21675 (exit "$ac_status"); }; }; then
21676 ac_cv_lib_tre_tre_regcomp=yes
21677 else
21678 echo "$as_me: failed program was:" >&5
21679 cat "conftest.$ac_ext" >&5
21680 ac_cv_lib_tre_tre_regcomp=no
21681 fi
21682 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21683 LIBS=$ac_check_lib_save_LIBS
21684 fi
21685 echo "$as_me:21685: result: $ac_cv_lib_tre_tre_regcomp" >&5
21686 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
21687 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
21688
21689 cf_add_libs="$LIBS"
21690 # reverse order
21691 cf_add_0lib=
21692 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21693 # filter duplicates
21694 for cf_add_1lib in $cf_add_0lib; do
21695 for cf_add_2lib in $cf_add_libs; do
21696 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21697 cf_add_1lib=
21698 break
21699 fi
21700 done
21701 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21702 done
21703 LIBS="$cf_add_libs"
21704
21705 fi
21706
21707 cf_add_libs="$LIBS"
21708 # reverse order
21709 cf_add_0lib=
21710 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21711 # filter duplicates
21712 for cf_add_1lib in $cf_add_0lib; do
21713 for cf_add_2lib in $cf_add_libs; do
21714 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21715 cf_add_1lib=
21716 break
21717 fi
21718 done
21719 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21720 done
21721 LIBS="$cf_add_libs"
21722
21723 cf_regex_func=regcomp
21724
21725 else
21726
21727 echo "$as_me:21727: checking for regcomp in -lgnurx" >&5
21728 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
21729 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
21730 echo $ECHO_N "(cached) $ECHO_C" >&6
21731 else
21732 ac_check_lib_save_LIBS=$LIBS
21733 LIBS="-lgnurx $LIBS"
21734 cat >"conftest.$ac_ext" <<_ACEOF
21735 #line 21735 "configure"
21736 #include "confdefs.h"
21737
21738 /* Override any gcc2 internal prototype to avoid an error. */
21739 #ifdef __cplusplus
21740 extern "C"
21741 #endif
21742 /* We use char because int might match the return type of a gcc2
21743 builtin and then its argument prototype would still apply. */
21744 char regcomp ();
21745 int
21746 main (void)
21747 {
21748 regcomp ();
21749 ;
21750 return 0;
21751 }
21752 _ACEOF
21753 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21754 if { (eval echo "$as_me:21754: \"$ac_link\"") >&5
21755 (eval $ac_link) 2>&5
21756 ac_status=$?
21757 echo "$as_me:21757: \$? = $ac_status" >&5
21758 (exit "$ac_status"); } &&
21759 { ac_try='test -s "conftest$ac_exeext"'
21760 { (eval echo "$as_me:21760: \"$ac_try\"") >&5
21761 (eval $ac_try) 2>&5
21762 ac_status=$?
21763 echo "$as_me:21763: \$? = $ac_status" >&5
21764 (exit "$ac_status"); }; }; then
21765 ac_cv_lib_gnurx_regcomp=yes
21766 else
21767 echo "$as_me: failed program was:" >&5
21768 cat "conftest.$ac_ext" >&5
21769 ac_cv_lib_gnurx_regcomp=no
21770 fi
21771 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21772 LIBS=$ac_check_lib_save_LIBS
21773 fi
21774 echo "$as_me:21774: result: $ac_cv_lib_gnurx_regcomp" >&5
21775 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
21776 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
21777
21778 cf_add_libs="$LIBS"
21779 # reverse order
21780 cf_add_0lib=
21781 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21782 # filter duplicates
21783 for cf_add_1lib in $cf_add_0lib; do
21784 for cf_add_2lib in $cf_add_libs; do
21785 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21786 cf_add_1lib=
21787 break
21788 fi
21789 done
21790 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21791 done
21792 LIBS="$cf_add_libs"
21793
21794 cf_regex_func=regcomp
21795 fi
21796
21797 fi
21798
21799 ;;
21800 (*)
21801 cf_regex_libs="regex re"
21802 echo "$as_me:21802: checking for regcomp" >&5
21803 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
21804 if test "${ac_cv_func_regcomp+set}" = set; then
21805 echo $ECHO_N "(cached) $ECHO_C" >&6
21806 else
21807 cat >"conftest.$ac_ext" <<_ACEOF
21808 #line 21808 "configure"
21809 #include "confdefs.h"
21810 #define regcomp autoconf_temporary
21811 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21812 #undef regcomp
21813
21814 #ifdef __cplusplus
21815 extern "C"
21816 #endif
21817
21818 /* We use char because int might match the return type of a gcc2
21819 builtin and then its argument prototype would still apply. */
21820 char regcomp (void);
21821
21822 int
21823 main (void)
21824 {
21825
21826 /* The GNU C library defines stubs for functions which it implements
21827 to always fail with ENOSYS. Some functions are actually named
21828 something starting with __ and the normal name is an alias. */
21829 #if defined (__stub_regcomp) || defined (__stub___regcomp)
21830 #error found stub for regcomp
21831 #endif
21832
21833 return regcomp ();
21834 ;
21835 return 0;
21836 }
21837 _ACEOF
21838 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21839 if { (eval echo "$as_me:21839: \"$ac_link\"") >&5
21840 (eval $ac_link) 2>&5
21841 ac_status=$?
21842 echo "$as_me:21842: \$? = $ac_status" >&5
21843 (exit "$ac_status"); } &&
21844 { ac_try='test -s "conftest$ac_exeext"'
21845 { (eval echo "$as_me:21845: \"$ac_try\"") >&5
21846 (eval $ac_try) 2>&5
21847 ac_status=$?
21848 echo "$as_me:21848: \$? = $ac_status" >&5
21849 (exit "$ac_status"); }; }; then
21850 ac_cv_func_regcomp=yes
21851 else
21852 echo "$as_me: failed program was:" >&5
21853 cat "conftest.$ac_ext" >&5
21854 ac_cv_func_regcomp=no
21855 fi
21856 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21857 fi
21858 echo "$as_me:21858: result: $ac_cv_func_regcomp" >&5
21859 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
21860 if test "$ac_cv_func_regcomp" = yes; then
21861 cf_regex_func=regcomp
21862 else
21863
21864 for cf_regex_lib in $cf_regex_libs
21865 do
21866 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
21867 echo "$as_me:21867: checking for regcomp in -l$cf_regex_lib" >&5
21868 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
21869 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
21870 echo $ECHO_N "(cached) $ECHO_C" >&6
21871 else
21872 ac_check_lib_save_LIBS=$LIBS
21873 LIBS="-l$cf_regex_lib $LIBS"
21874 cat >"conftest.$ac_ext" <<_ACEOF
21875 #line 21875 "configure"
21876 #include "confdefs.h"
21877
21878 /* Override any gcc2 internal prototype to avoid an error. */
21879 #ifdef __cplusplus
21880 extern "C"
21881 #endif
21882 /* We use char because int might match the return type of a gcc2
21883 builtin and then its argument prototype would still apply. */
21884 char regcomp ();
21885 int
21886 main (void)
21887 {
21888 regcomp ();
21889 ;
21890 return 0;
21891 }
21892 _ACEOF
21893 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21894 if { (eval echo "$as_me:21894: \"$ac_link\"") >&5
21895 (eval $ac_link) 2>&5
21896 ac_status=$?
21897 echo "$as_me:21897: \$? = $ac_status" >&5
21898 (exit "$ac_status"); } &&
21899 { ac_try='test -s "conftest$ac_exeext"'
21900 { (eval echo "$as_me:21900: \"$ac_try\"") >&5
21901 (eval $ac_try) 2>&5
21902 ac_status=$?
21903 echo "$as_me:21903: \$? = $ac_status" >&5
21904 (exit "$ac_status"); }; }; then
21905 eval "$as_ac_Lib=yes"
21906 else
21907 echo "$as_me: failed program was:" >&5
21908 cat "conftest.$ac_ext" >&5
21909 eval "$as_ac_Lib=no"
21910 fi
21911 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21912 LIBS=$ac_check_lib_save_LIBS
21913 fi
21914 echo "$as_me:21914: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
21915 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
21916 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
21917
21918 cf_add_libs="$LIBS"
21919 # reverse order
21920 cf_add_0lib=
21921 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21922 # filter duplicates
21923 for cf_add_1lib in $cf_add_0lib; do
21924 for cf_add_2lib in $cf_add_libs; do
21925 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21926 cf_add_1lib=
21927 break
21928 fi
21929 done
21930 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21931 done
21932 LIBS="$cf_add_libs"
21933
21934 cf_regex_func=regcomp
21935 break
21936 fi
21937
21938 done
21939
21940 fi
21941
21942 ;;
21943 esac
21944
21945 if test "$cf_regex_func" = no ; then
21946 echo "$as_me:21946: checking for compile" >&5
21947 echo $ECHO_N "checking for compile... $ECHO_C" >&6
21948 if test "${ac_cv_func_compile+set}" = set; then
21949 echo $ECHO_N "(cached) $ECHO_C" >&6
21950 else
21951 cat >"conftest.$ac_ext" <<_ACEOF
21952 #line 21952 "configure"
21953 #include "confdefs.h"
21954 #define compile autoconf_temporary
21955 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21956 #undef compile
21957
21958 #ifdef __cplusplus
21959 extern "C"
21960 #endif
21961
21962 /* We use char because int might match the return type of a gcc2
21963 builtin and then its argument prototype would still apply. */
21964 char compile (void);
21965
21966 int
21967 main (void)
21968 {
21969
21970 /* The GNU C library defines stubs for functions which it implements
21971 to always fail with ENOSYS. Some functions are actually named
21972 something starting with __ and the normal name is an alias. */
21973 #if defined (__stub_compile) || defined (__stub___compile)
21974 #error found stub for compile
21975 #endif
21976
21977 return compile ();
21978 ;
21979 return 0;
21980 }
21981 _ACEOF
21982 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21983 if { (eval echo "$as_me:21983: \"$ac_link\"") >&5
21984 (eval $ac_link) 2>&5
21985 ac_status=$?
21986 echo "$as_me:21986: \$? = $ac_status" >&5
21987 (exit "$ac_status"); } &&
21988 { ac_try='test -s "conftest$ac_exeext"'
21989 { (eval echo "$as_me:21989: \"$ac_try\"") >&5
21990 (eval $ac_try) 2>&5
21991 ac_status=$?
21992 echo "$as_me:21992: \$? = $ac_status" >&5
21993 (exit "$ac_status"); }; }; then
21994 ac_cv_func_compile=yes
21995 else
21996 echo "$as_me: failed program was:" >&5
21997 cat "conftest.$ac_ext" >&5
21998 ac_cv_func_compile=no
21999 fi
22000 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22001 fi
22002 echo "$as_me:22002: result: $ac_cv_func_compile" >&5
22003 echo "${ECHO_T}$ac_cv_func_compile" >&6
22004 if test "$ac_cv_func_compile" = yes; then
22005 cf_regex_func=compile
22006 else
22007
22008 echo "$as_me:22008: checking for compile in -lgen" >&5
22009 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
22010 if test "${ac_cv_lib_gen_compile+set}" = set; then
22011 echo $ECHO_N "(cached) $ECHO_C" >&6
22012 else
22013 ac_check_lib_save_LIBS=$LIBS
22014 LIBS="-lgen $LIBS"
22015 cat >"conftest.$ac_ext" <<_ACEOF
22016 #line 22016 "configure"
22017 #include "confdefs.h"
22018
22019 /* Override any gcc2 internal prototype to avoid an error. */
22020 #ifdef __cplusplus
22021 extern "C"
22022 #endif
22023 /* We use char because int might match the return type of a gcc2
22024 builtin and then its argument prototype would still apply. */
22025 char compile ();
22026 int
22027 main (void)
22028 {
22029 compile ();
22030 ;
22031 return 0;
22032 }
22033 _ACEOF
22034 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22035 if { (eval echo "$as_me:22035: \"$ac_link\"") >&5
22036 (eval $ac_link) 2>&5
22037 ac_status=$?
22038 echo "$as_me:22038: \$? = $ac_status" >&5
22039 (exit "$ac_status"); } &&
22040 { ac_try='test -s "conftest$ac_exeext"'
22041 { (eval echo "$as_me:22041: \"$ac_try\"") >&5
22042 (eval $ac_try) 2>&5
22043 ac_status=$?
22044 echo "$as_me:22044: \$? = $ac_status" >&5
22045 (exit "$ac_status"); }; }; then
22046 ac_cv_lib_gen_compile=yes
22047 else
22048 echo "$as_me: failed program was:" >&5
22049 cat "conftest.$ac_ext" >&5
22050 ac_cv_lib_gen_compile=no
22051 fi
22052 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22053 LIBS=$ac_check_lib_save_LIBS
22054 fi
22055 echo "$as_me:22055: result: $ac_cv_lib_gen_compile" >&5
22056 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
22057 if test "$ac_cv_lib_gen_compile" = yes; then
22058
22059 cf_add_libs="$LIBS"
22060 # reverse order
22061 cf_add_0lib=
22062 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22063 # filter duplicates
22064 for cf_add_1lib in $cf_add_0lib; do
22065 for cf_add_2lib in $cf_add_libs; do
22066 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22067 cf_add_1lib=
22068 break
22069 fi
22070 done
22071 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22072 done
22073 LIBS="$cf_add_libs"
22074
22075 cf_regex_func=compile
22076 fi
22077
22078 fi
22079
22080 fi
22081
22082 if test "$cf_regex_func" = no ; then
22083 { echo "$as_me:22083: WARNING: cannot find regular expression library" >&5
22084 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
22085 fi
22086
22087 echo "$as_me:22087: checking for regular-expression headers" >&5
22088 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
22089 if test "${cf_cv_regex_hdrs+set}" = set; then
22090 echo $ECHO_N "(cached) $ECHO_C" >&6
22091 else
22092
22093 cf_cv_regex_hdrs=no
22094 case "$cf_regex_func" in
22095 (compile)
22096 for cf_regex_hdr in regexp.h regexpr.h
22097 do
22098 cat >"conftest.$ac_ext" <<_ACEOF
22099 #line 22099 "configure"
22100 #include "confdefs.h"
22101 #include <$cf_regex_hdr>
22102 int
22103 main (void)
22104 {
22105
22106 char *p = compile("", "", "", 0);
22107 int x = step("", "");
22108 (void)p;
22109 (void)x;
22110
22111 ;
22112 return 0;
22113 }
22114 _ACEOF
22115 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22116 if { (eval echo "$as_me:22116: \"$ac_link\"") >&5
22117 (eval $ac_link) 2>&5
22118 ac_status=$?
22119 echo "$as_me:22119: \$? = $ac_status" >&5
22120 (exit "$ac_status"); } &&
22121 { ac_try='test -s "conftest$ac_exeext"'
22122 { (eval echo "$as_me:22122: \"$ac_try\"") >&5
22123 (eval $ac_try) 2>&5
22124 ac_status=$?
22125 echo "$as_me:22125: \$? = $ac_status" >&5
22126 (exit "$ac_status"); }; }; then
22127
22128 cf_cv_regex_hdrs=$cf_regex_hdr
22129 break
22130
22131 else
22132 echo "$as_me: failed program was:" >&5
22133 cat "conftest.$ac_ext" >&5
22134 fi
22135 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22136 done
22137 ;;
22138 (*)
22139 for cf_regex_hdr in regex.h
22140 do
22141 cat >"conftest.$ac_ext" <<_ACEOF
22142 #line 22142 "configure"
22143 #include "confdefs.h"
22144 #include <sys/types.h>
22145 #include <$cf_regex_hdr>
22146 int
22147 main (void)
22148 {
22149
22150 regex_t *p = 0;
22151 int x = regcomp(p, "", 0);
22152 int y = regexec(p, "", 0, 0, 0);
22153 (void)x;
22154 (void)y;
22155 regfree(p);
22156
22157 ;
22158 return 0;
22159 }
22160 _ACEOF
22161 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22162 if { (eval echo "$as_me:22162: \"$ac_link\"") >&5
22163 (eval $ac_link) 2>&5
22164 ac_status=$?
22165 echo "$as_me:22165: \$? = $ac_status" >&5
22166 (exit "$ac_status"); } &&
22167 { ac_try='test -s "conftest$ac_exeext"'
22168 { (eval echo "$as_me:22168: \"$ac_try\"") >&5
22169 (eval $ac_try) 2>&5
22170 ac_status=$?
22171 echo "$as_me:22171: \$? = $ac_status" >&5
22172 (exit "$ac_status"); }; }; then
22173
22174 cf_cv_regex_hdrs=$cf_regex_hdr
22175 break
22176
22177 else
22178 echo "$as_me: failed program was:" >&5
22179 cat "conftest.$ac_ext" >&5
22180 fi
22181 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22182 done
22183 ;;
22184 esac
22185
22186 fi
22187 echo "$as_me:22187: result: $cf_cv_regex_hdrs" >&5
22188 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
22189
22190 case "$cf_cv_regex_hdrs" in
22191 (no) { echo "$as_me:22191: WARNING: no regular expression header found" >&5
22192 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
22193 (regex.h)
22194 cat >>confdefs.h <<\EOF
22195 #define HAVE_REGEX_H_FUNCS 1
22196 EOF
22197 ;;
22198 (regexp.h)
22199 cat >>confdefs.h <<\EOF
22200 #define HAVE_REGEXP_H_FUNCS 1
22201 EOF
22202 ;;
22203 (regexpr.h)
22204 cat >>confdefs.h <<\EOF
22205 #define HAVE_REGEXPR_H_FUNCS 1
22206 EOF
22207 ;;
22208 esac
22209
22210 if test "X$cf_cv_regex_hdrs" != "Xregex.h" ; then
22211 { { echo "$as_me:22211: error: Only POSIX, PCRE, or PCRE2 regular expressions are supported" >&5
22212 echo "$as_me: error: Only POSIX, PCRE, or PCRE2 regular expressions are supported" >&2;}
22213 { (exit 1); exit 1; }; }
22214 fi
22215 fi
22216 fi
22217
22218 cat >>confdefs.h <<\EOF
22219 #define OPT_SELECT_REGEX 1
22220 EOF
22221
22222 fi
22223
22224 echo "$as_me:22224: checking if you want support for right-scrollbar" >&5
22225 echo $ECHO_N "checking if you want support for right-scrollbar... $ECHO_C" >&6
22226
22227 # Check whether --enable-rightbar or --disable-rightbar was given.
22228 if test "${enable_rightbar+set}" = set; then
22229 enableval="$enable_rightbar"
22230 test "$enableval" != no && enableval=yes
22231 if test "$enableval" != "yes" ; then
22232 enable_rightbar=no
22233 else
22234 enable_rightbar=yes
22235 fi
22236 else
22237 enableval=yes
22238 enable_rightbar=yes
22239
22240 fi;
22241 echo "$as_me:22241: result: $enable_rightbar" >&5
22242 echo "${ECHO_T}$enable_rightbar" >&6
22243 if test "$enable_rightbar" = yes ; then
22244
22245 cat >>confdefs.h <<\EOF
22246 #define SCROLLBAR_RIGHT 1
22247 EOF
22248
22249 fi
22250
22251 echo "$as_me:22251: checking if you want check for redundant name-change" >&5
22252 echo $ECHO_N "checking if you want check for redundant name-change... $ECHO_C" >&6
22253
22254 # Check whether --enable-samename or --disable-samename was given.
22255 if test "${enable_samename+set}" = set; then
22256 enableval="$enable_samename"
22257 test "$enableval" != no && enableval=yes
22258 if test "$enableval" != "yes" ; then
22259 enable_samename=no
22260 else
22261 enable_samename=yes
22262 fi
22263 else
22264 enableval=yes
22265 enable_samename=yes
22266
22267 fi;
22268 echo "$as_me:22268: result: $enable_samename" >&5
22269 echo "${ECHO_T}$enable_samename" >&6
22270 test "$enable_samename" = no &&
22271 cat >>confdefs.h <<\EOF
22272 #define OPT_SAME_NAME 0
22273 EOF
22274
22275 echo "$as_me:22275: checking if you want support for selection-actions" >&5
22276 echo $ECHO_N "checking if you want support for selection-actions... $ECHO_C" >&6
22277
22278 # Check whether --enable-selection-ops or --disable-selection-ops was given.
22279 if test "${enable_selection_ops+set}" = set; then
22280 enableval="$enable_selection_ops"
22281 test "$enableval" != no && enableval=yes
22282 if test "$enableval" != "yes" ; then
22283 enable_selection_ops=no
22284 else
22285 enable_selection_ops=yes
22286 fi
22287 else
22288 enableval=yes
22289 enable_selection_ops=yes
22290
22291 fi;
22292 echo "$as_me:22292: result: $enable_selection_ops" >&5
22293 echo "${ECHO_T}$enable_selection_ops" >&6
22294 test "$enable_selection_ops" = no &&
22295 cat >>confdefs.h <<\EOF
22296 #define OPT_SELECTION_OPS 0
22297 EOF
22298
22299 echo "$as_me:22299: checking if you want support for session management" >&5
22300 echo $ECHO_N "checking if you want support for session management... $ECHO_C" >&6
22301
22302 # Check whether --enable-session-mgt or --disable-session-mgt was given.
22303 if test "${enable_session_mgt+set}" = set; then
22304 enableval="$enable_session_mgt"
22305 test "$enableval" != no && enableval=yes
22306 if test "$enableval" != "yes" ; then
22307 enable_session_mgt=no
22308 else
22309 enable_session_mgt=yes
22310 fi
22311 else
22312 enableval=yes
22313 enable_session_mgt=yes
22314
22315 fi;
22316 echo "$as_me:22316: result: $enable_session_mgt" >&5
22317 echo "${ECHO_T}$enable_session_mgt" >&6
22318 test "$enable_session_mgt" = no &&
22319 cat >>confdefs.h <<\EOF
22320 #define OPT_SESSION_MGT 0
22321 EOF
22322
22323 echo "$as_me:22323: checking if you want support for status-line" >&5
22324 echo $ECHO_N "checking if you want support for status-line... $ECHO_C" >&6
22325
22326 # Check whether --enable-status-line or --disable-status-line was given.
22327 if test "${enable_status_line+set}" = set; then
22328 enableval="$enable_status_line"
22329 test "$enableval" != yes && enableval=no
22330 if test "$enableval" != "no" ; then
22331 enable_status_line=yes
22332 else
22333 enable_status_line=no
22334 fi
22335 else
22336 enableval=no
22337 enable_status_line=no
22338
22339 fi;
22340 echo "$as_me:22340: result: $enable_status_line" >&5
22341 echo "${ECHO_T}$enable_status_line" >&6
22342 test "$enable_status_line" = yes &&
22343 cat >>confdefs.h <<\EOF
22344 #define OPT_STATUS_LINE 1
22345 EOF
22346
22347 echo "$as_me:22347: checking if you want to use termcap function-keys" >&5
22348 echo $ECHO_N "checking if you want to use termcap function-keys... $ECHO_C" >&6
22349
22350 # Check whether --enable-tcap-fkeys or --disable-tcap-fkeys was given.
22351 if test "${enable_tcap_fkeys+set}" = set; then
22352 enableval="$enable_tcap_fkeys"
22353 test "$enableval" != no && enableval=yes
22354 if test "$enableval" != "yes" ; then
22355 enable_tcap_fkeys=no
22356 else
22357 enable_tcap_fkeys=yes
22358 fi
22359 else
22360 enableval=yes
22361 enable_tcap_fkeys=yes
22362
22363 fi;
22364 echo "$as_me:22364: result: $enable_tcap_fkeys" >&5
22365 echo "${ECHO_T}$enable_tcap_fkeys" >&6
22366 test "$enable_tcap_fkeys" = no &&
22367 cat >>confdefs.h <<\EOF
22368 #define OPT_TCAP_FKEYS 0
22369 EOF
22370
22371 echo "$as_me:22371: checking if you want to use termcap-query/report" >&5
22372 echo $ECHO_N "checking if you want to use termcap-query/report... $ECHO_C" >&6
22373
22374 # Check whether --enable-tcap-query or --disable-tcap-query was given.
22375 if test "${enable_tcap_query+set}" = set; then
22376 enableval="$enable_tcap_query"
22377 test "$enableval" != no && enableval=yes
22378 if test "$enableval" != "yes" ; then
22379 enable_tcap_query=no
22380 else
22381 enable_tcap_query=yes
22382 fi
22383 else
22384 enableval=yes
22385 enable_tcap_query=yes
22386
22387 fi;
22388 echo "$as_me:22388: result: $enable_tcap_query" >&5
22389 echo "${ECHO_T}$enable_tcap_query" >&6
22390 test "$enable_tcap_query" = no &&
22391 cat >>confdefs.h <<\EOF
22392 #define OPT_TCAP_QUERY 0
22393 EOF
22394
22395 echo "$as_me:22395: checking if you want support for tek4014" >&5
22396 echo $ECHO_N "checking if you want support for tek4014... $ECHO_C" >&6
22397
22398 # Check whether --enable-tek4014 or --disable-tek4014 was given.
22399 if test "${enable_tek4014+set}" = set; then
22400 enableval="$enable_tek4014"
22401 test "$enableval" != no && enableval=yes
22402 if test "$enableval" != "yes" ; then
22403 enable_tek4014=no
22404 else
22405 enable_tek4014=yes
22406 fi
22407 else
22408 enableval=yes
22409 enable_tek4014=yes
22410
22411 fi;
22412 echo "$as_me:22412: result: $enable_tek4014" >&5
22413 echo "${ECHO_T}$enable_tek4014" >&6
22414 if test "$enable_tek4014" = no ; then
22415
22416 cat >>confdefs.h <<\EOF
22417 #define OPT_TEK4014 0
22418 EOF
22419
22420 else
22421 EXTRAHDRS="$EXTRAHDRS Tekparse.h"
22422 EXTRASRCS="$EXTRASRCS TekPrsTbl.c Tekproc.c"
22423 EXTRAOBJS="$EXTRAOBJS TekPrsTbl.o Tekproc.o"
22424 fi
22425
22426 echo "$as_me:22426: checking if you want pulldown menus with a toolbar" >&5
22427 echo $ECHO_N "checking if you want pulldown menus with a toolbar... $ECHO_C" >&6
22428
22429 # Check whether --enable-toolbar or --disable-toolbar was given.
22430 if test "${enable_toolbar+set}" = set; then
22431 enableval="$enable_toolbar"
22432 test "$enableval" != yes && enableval=no
22433 if test "$enableval" != "no" ; then
22434 enable_toolbar=yes
22435 else
22436 enable_toolbar=no
22437 fi
22438 else
22439 enableval=no
22440 enable_toolbar=no
22441
22442 fi;
22443 echo "$as_me:22443: result: $enable_toolbar" >&5
22444 echo "${ECHO_T}$enable_toolbar" >&6
22445 if test "$enable_toolbar" = yes ; then
22446
22447 cat >>confdefs.h <<\EOF
22448 #define OPT_TOOLBAR 1
22449 EOF
22450
22451 fi
22452
22453 echo "$as_me:22453: checking if you want VT52 emulation" >&5
22454 echo $ECHO_N "checking if you want VT52 emulation... $ECHO_C" >&6
22455
22456 # Check whether --enable-vt52 or --disable-vt52 was given.
22457 if test "${enable_vt52+set}" = set; then
22458 enableval="$enable_vt52"
22459 test "$enableval" != no && enableval=yes
22460 if test "$enableval" != "yes" ; then
22461 enable_vt52=no
22462 else
22463 enable_vt52=yes
22464 fi
22465 else
22466 enableval=yes
22467 enable_vt52=yes
22468
22469 fi;
22470 echo "$as_me:22470: result: $enable_vt52" >&5
22471 echo "${ECHO_T}$enable_vt52" >&6
22472 test "$enable_vt52" = no &&
22473 cat >>confdefs.h <<\EOF
22474 #define OPT_VT52_MODE 0
22475 EOF
22476
22477 echo "$as_me:22477: checking if you want wide-attribute support" >&5
22478 echo $ECHO_N "checking if you want wide-attribute support... $ECHO_C" >&6
22479
22480 # Check whether --enable-wide-attrs or --disable-wide-attrs was given.
22481 if test "${enable_wide_attrs+set}" = set; then
22482 enableval="$enable_wide_attrs"
22483 test "$enableval" != no && enableval=yes
22484 if test "$enableval" != "yes" ; then
22485 enable_wattr=no
22486 else
22487 enable_wattr=yes
22488 fi
22489 else
22490 enableval=yes
22491 enable_wattr=yes
22492
22493 fi;
22494 echo "$as_me:22494: result: $enable_wattr" >&5
22495 echo "${ECHO_T}$enable_wattr" >&6
22496
22497 if test x$enable_wattr = xno && test x$enable_direct_color = xyes ; then
22498 { echo "$as_me:22498: WARNING: overriding wide-attributes to support direct color" >&5
22499 echo "$as_me: WARNING: overriding wide-attributes to support direct color" >&2;}
22500 enable_wattr=yes
22501 fi
22502
22503 echo "$as_me:22503: checking if you want wide-character support" >&5
22504 echo $ECHO_N "checking if you want wide-character support... $ECHO_C" >&6
22505
22506 # Check whether --enable-wide-chars or --disable-wide-chars was given.
22507 if test "${enable_wide_chars+set}" = set; then
22508 enableval="$enable_wide_chars"
22509 test "$enableval" != no && enableval=yes
22510 if test "$enableval" != "yes" ; then
22511 enable_wchar=no
22512 else
22513 enable_wchar=yes
22514 fi
22515 else
22516 enableval=yes
22517 enable_wchar=yes
22518
22519 fi;
22520 echo "$as_me:22520: result: $enable_wchar" >&5
22521 echo "${ECHO_T}$enable_wchar" >&6
22522 test "x$enable_wattr" = xno &&
22523 cat >>confdefs.h <<\EOF
22524 #define OPT_WIDE_ATTRS 0
22525 EOF
22526
22527 echo "$as_me:22527: checking if you want only 16-bit character support" >&5
22528 echo $ECHO_N "checking if you want only 16-bit character support... $ECHO_C" >&6
22529
22530 # Check whether --enable-16bit-chars or --disable-16bit-chars was given.
22531 if test "${enable_16bit_chars+set}" = set; then
22532 enableval="$enable_16bit_chars"
22533 test "$enableval" != yes && enableval=no
22534 if test "$enableval" != "no" ; then
22535 enable_16bit_chars=yes
22536 else
22537 enable_16bit_chars=no
22538 fi
22539 else
22540 enableval=no
22541 enable_16bit_chars=no
22542
22543 fi;
22544 echo "$as_me:22544: result: $enable_16bit_chars" >&5
22545 echo "${ECHO_T}$enable_16bit_chars" >&6
22546
22547 if test "$enable_16bit_chars" = yes ; then
22548
22549 cat >>confdefs.h <<\EOF
22550 #define OPT_WIDER_ICHAR 0
22551 EOF
22552
22553 enable_wchar=yes
22554 fi
22555
22556 if test "$enable_wchar" = yes ; then
22557
22558 echo "$as_me:22558: checking if you want to use mini-luit/Latin9 built-in support" >&5
22559 echo $ECHO_N "checking if you want to use mini-luit/Latin9 built-in support... $ECHO_C" >&6
22560
22561 # Check whether --enable-mini-luit or --disable-mini-luit was given.
22562 if test "${enable_mini_luit+set}" = set; then
22563 enableval="$enable_mini_luit"
22564 test "$enableval" != yes && enableval=no
22565 if test "$enableval" != "no" ; then
22566 enable_mini_luit=yes
22567 else
22568 enable_mini_luit=no
22569 fi
22570 else
22571 enableval=no
22572 enable_mini_luit=no
22573
22574 fi;
22575 echo "$as_me:22575: result: $enable_mini_luit" >&5
22576 echo "${ECHO_T}$enable_mini_luit" >&6
22577 if test "$enable_mini_luit" = yes ; then
22578
22579 cat >>confdefs.h <<\EOF
22580 #define OPT_MINI_LUIT 1
22581 EOF
22582
22583 fi
22584
22585 echo "$as_me:22585: checking if you want to use luit" >&5
22586 echo $ECHO_N "checking if you want to use luit... $ECHO_C" >&6
22587
22588 # Check whether --enable-luit or --disable-luit was given.
22589 if test "${enable_luit+set}" = set; then
22590 enableval="$enable_luit"
22591 test "$enableval" != no && enableval=yes
22592 if test "$enableval" != "yes" ; then
22593 enable_luit=no
22594 else
22595 enable_luit=yes
22596 fi
22597 else
22598 enableval=yes
22599 enable_luit=yes
22600
22601 fi;
22602 echo "$as_me:22602: result: $enable_luit" >&5
22603 echo "${ECHO_T}$enable_luit" >&6
22604 if test "$enable_luit" = yes ; then
22605
22606 cat >>confdefs.h <<\EOF
22607 #define OPT_LUIT_PROG 1
22608 EOF
22609
22610 test -z "$LUIT" && LUIT="xterm-filter"
22611 for ac_prog in $LUIT xterm-filter bluit luit
22612 do
22613 # Extract the first word of "$ac_prog", so it can be a program name with args.
22614 set dummy $ac_prog; ac_word=$2
22615 echo "$as_me:22615: checking for $ac_word" >&5
22616 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22617 if test "${ac_cv_path_LUIT+set}" = set; then
22618 echo $ECHO_N "(cached) $ECHO_C" >&6
22619 else
22620 case $LUIT in
22621 [\\/]* | ?:[\\/]*)
22622 ac_cv_path_LUIT="$LUIT" # Let the user override the test with a path.
22623 ;;
22624 *)
22625 ac_save_IFS=$IFS; IFS=$ac_path_separator
22626 ac_dummy="$PATH"
22627 for ac_dir in $ac_dummy; do
22628 IFS=$ac_save_IFS
22629 test -z "$ac_dir" && ac_dir=.
22630 if $as_executable_p "$ac_dir/$ac_word"; then
22631 ac_cv_path_LUIT="$ac_dir/$ac_word"
22632 echo "$as_me:22632: found $ac_dir/$ac_word" >&5
22633 break
22634 fi
22635 done
22636
22637 ;;
22638 esac
22639 fi
22640 LUIT=$ac_cv_path_LUIT
22641
22642 if test -n "$LUIT"; then
22643 echo "$as_me:22643: result: $LUIT" >&5
22644 echo "${ECHO_T}$LUIT" >&6
22645 else
22646 echo "$as_me:22646: result: no" >&5
22647 echo "${ECHO_T}no" >&6
22648 fi
22649
22650 test -n "$LUIT" && break
22651 done
22652 test -n "$LUIT" || LUIT="$LUIT"
22653
22654 cf_path_prog=""
22655 cf_path_args=""
22656 IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
22657 for cf_temp in $ac_cv_path_LUIT
22658 do
22659 if test -z "$cf_path_prog" ; then
22660 if test "$with_full_paths" = yes ; then
22661
22662 if test "x$prefix" != xNONE; then
22663 cf_path_syntax="$prefix"
22664 else
22665 cf_path_syntax="$ac_default_prefix"
22666 fi
22667
22668 case ".$cf_temp" in
22669 (.\$\(*\)*|.\'*\'*)
22670 ;;
22671 (..|./*|.\\*)
22672 ;;
22673 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
22674 ;;
22675 (.\$\{*prefix\}*|.\$\{*dir\}*)
22676 eval cf_temp="$cf_temp"
22677 case ".$cf_temp" in
22678 (.NONE/*)
22679 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
22680 ;;
22681 esac
22682 ;;
22683 (.no|.NONE/*)
22684 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
22685 ;;
22686 (*)
22687 break
22688 ;;
22689 esac
22690
22691 cf_path_prog="$cf_temp"
22692 else
22693 cf_path_prog="`basename "$cf_temp"`"
22694 fi
22695 elif test -z "$cf_path_args" ; then
22696 cf_path_args="$cf_temp"
22697 else
22698 cf_path_args="$cf_path_args $cf_temp"
22699 fi
22700 done
22701 IFS="$cf_save_ifs"
22702
22703 if test -n "$cf_path_prog" ; then
22704
22705 echo "${as_me:-configure}:22705: testing defining path for ${cf_path_prog} ..." 1>&5
22706
22707 cat >>confdefs.h <<EOF
22708 #define LUIT_PATH "$cf_path_prog"
22709 EOF
22710
22711 test -n "$cf_path_args" &&
22712 cat >>confdefs.h <<EOF
22713 #define LUIT_ARGS "$cf_path_args"
22714 EOF
22715
22716 fi
22717
22718 fi
22719
22720 cat >>confdefs.h <<\EOF
22721 #define OPT_WIDE_CHARS 1
22722 EOF
22723
22724 EXTRAHDRS="$EXTRAHDRS charclass.h precompose.h wcwidth.h"
22725 EXTRASRCS="$EXTRASRCS charclass.c precompose.c wcwidth.c"
22726 EXTRAOBJS="$EXTRAOBJS charclass.o precompose.o wcwidth.o"
22727 fi
22728
22729 echo "$as_me:22729: checking if you want dynamic-abbreviation support" >&5
22730 echo $ECHO_N "checking if you want dynamic-abbreviation support... $ECHO_C" >&6
22731
22732 # Check whether --enable-dabbrev or --disable-dabbrev was given.
22733 if test "${enable_dabbrev+set}" = set; then
22734 enableval="$enable_dabbrev"
22735 test "$enableval" != yes && enableval=no
22736 if test "$enableval" != "no" ; then
22737 enable_dabbrev=yes
22738 else
22739 enable_dabbrev=no
22740 fi
22741 else
22742 enableval=no
22743 enable_dabbrev=no
22744
22745 fi;
22746 echo "$as_me:22746: result: $enable_dabbrev" >&5
22747 echo "${ECHO_T}$enable_dabbrev" >&6
22748 if test "$enable_dabbrev" = yes ; then
22749
22750 cat >>confdefs.h <<\EOF
22751 #define OPT_DABBREV 1
22752 EOF
22753
22754 fi
22755
22756 echo "$as_me:22756: checking if you want DECterm Locator support" >&5
22757 echo $ECHO_N "checking if you want DECterm Locator support... $ECHO_C" >&6
22758
22759 # Check whether --enable-dec-locator or --disable-dec-locator was given.
22760 if test "${enable_dec_locator+set}" = set; then
22761 enableval="$enable_dec_locator"
22762 test "$enableval" != yes && enableval=no
22763 if test "$enableval" != "no" ; then
22764 enable_dec_locator=yes
22765 else
22766 enable_dec_locator=no
22767 fi
22768 else
22769 enableval=no
22770 enable_dec_locator=no
22771
22772 fi;
22773 echo "$as_me:22773: result: $enable_dec_locator" >&5
22774 echo "${ECHO_T}$enable_dec_locator" >&6
22775 if test "$enable_dec_locator" = yes ; then
22776
22777 cat >>confdefs.h <<\EOF
22778 #define OPT_DEC_LOCATOR 1
22779 EOF
22780
22781 fi
22782
22783 echo "$as_me:22783: checking if you want XHTML and SVG screen dump support" >&5
22784 echo $ECHO_N "checking if you want XHTML and SVG screen dump support... $ECHO_C" >&6
22785
22786 # Check whether --enable-screen-dumps or --disable-screen-dumps was given.
22787 if test "${enable_screen_dumps+set}" = set; then
22788 enableval="$enable_screen_dumps"
22789 test "$enableval" != no && enableval=yes
22790 if test "$enableval" != "yes" ; then
22791 enable_screen_dumps=no
22792 else
22793 enable_screen_dumps=yes
22794 fi
22795 else
22796 enableval=yes
22797 enable_screen_dumps=yes
22798
22799 fi;
22800 echo "$as_me:22800: result: $enable_screen_dumps" >&5
22801 echo "${ECHO_T}$enable_screen_dumps" >&6
22802 if test "$enable_screen_dumps" = yes ; then
22803 EXTRASRCS="$EXTRASRCS html.c svg.c"
22804 EXTRAOBJS="$EXTRAOBJS html.o svg.o"
22805 else
22806
22807 cat >>confdefs.h <<\EOF
22808 #define OPT_SCREEN_DUMPS 0
22809 EOF
22810
22811 fi
22812
22813 echo "$as_me:22813: checking if you want ReGIS graphics support" >&5
22814 echo $ECHO_N "checking if you want ReGIS graphics support... $ECHO_C" >&6
22815
22816 # Check whether --enable-regis-graphics or --disable-regis-graphics was given.
22817 if test "${enable_regis_graphics+set}" = set; then
22818 enableval="$enable_regis_graphics"
22819 test "$enableval" != yes && enableval=no
22820 if test "$enableval" != "no" ; then
22821 enable_regis_graphics=yes
22822 else
22823 enable_regis_graphics=no
22824 fi
22825 else
22826 enableval=no
22827 enable_regis_graphics=no
22828
22829 fi;
22830 echo "$as_me:22830: result: $enable_regis_graphics" >&5
22831 echo "${ECHO_T}$enable_regis_graphics" >&6
22832 if test "$enable_regis_graphics" = yes ; then
22833
22834 cat >>confdefs.h <<\EOF
22835 #define OPT_REGIS_GRAPHICS 1
22836 EOF
22837
22838 EXTRAHDRS="$EXTRAHDRS graphics_regis.h"
22839 EXTRASRCS="$EXTRASRCS graphics_regis.c"
22840 EXTRAOBJS="$EXTRAOBJS graphics_regis.o"
22841
22842 echo "$as_me:22842: checking if -lm needed for math functions" >&5
22843 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
22844 if test "${cf_cv_need_libm+set}" = set; then
22845 echo $ECHO_N "(cached) $ECHO_C" >&6
22846 else
22847
22848 cat >"conftest.$ac_ext" <<_ACEOF
22849 #line 22849 "configure"
22850 #include "confdefs.h"
22851
22852 #include <stdio.h>
22853 #include <stdlib.h>
22854 #include <math.h>
22855
22856 int
22857 main (void)
22858 {
22859 double x = rand(); printf("result = %g\\n", sin(x))
22860 ;
22861 return 0;
22862 }
22863 _ACEOF
22864 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22865 if { (eval echo "$as_me:22865: \"$ac_link\"") >&5
22866 (eval $ac_link) 2>&5
22867 ac_status=$?
22868 echo "$as_me:22868: \$? = $ac_status" >&5
22869 (exit "$ac_status"); } &&
22870 { ac_try='test -s "conftest$ac_exeext"'
22871 { (eval echo "$as_me:22871: \"$ac_try\"") >&5
22872 (eval $ac_try) 2>&5
22873 ac_status=$?
22874 echo "$as_me:22874: \$? = $ac_status" >&5
22875 (exit "$ac_status"); }; }; then
22876 cf_cv_need_libm=no
22877 else
22878 echo "$as_me: failed program was:" >&5
22879 cat "conftest.$ac_ext" >&5
22880 cf_cv_need_libm=yes
22881 fi
22882 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22883 fi
22884 echo "$as_me:22884: result: $cf_cv_need_libm" >&5
22885 echo "${ECHO_T}$cf_cv_need_libm" >&6
22886
22887 if test "$cf_cv_need_libm" = yes
22888 then
22889
22890 cf_save_LIBS="$LIBS"
22891 LIBS="$LIBS -lm"
22892 echo "$as_me:22892: checking if -lm is available for math functions" >&5
22893 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
22894 if test "${cf_cv_have_libm+set}" = set; then
22895 echo $ECHO_N "(cached) $ECHO_C" >&6
22896 else
22897
22898 cat >"conftest.$ac_ext" <<_ACEOF
22899 #line 22899 "configure"
22900 #include "confdefs.h"
22901
22902 #include <stdio.h>
22903 #include <stdlib.h>
22904 #include <math.h>
22905
22906 int
22907 main (void)
22908 {
22909 double x = rand(); printf("result = %g\\n", sin(x))
22910 ;
22911 return 0;
22912 }
22913 _ACEOF
22914 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22915 if { (eval echo "$as_me:22915: \"$ac_link\"") >&5
22916 (eval $ac_link) 2>&5
22917 ac_status=$?
22918 echo "$as_me:22918: \$? = $ac_status" >&5
22919 (exit "$ac_status"); } &&
22920 { ac_try='test -s "conftest$ac_exeext"'
22921 { (eval echo "$as_me:22921: \"$ac_try\"") >&5
22922 (eval $ac_try) 2>&5
22923 ac_status=$?
22924 echo "$as_me:22924: \$? = $ac_status" >&5
22925 (exit "$ac_status"); }; }; then
22926 cf_cv_have_libm=yes
22927 else
22928 echo "$as_me: failed program was:" >&5
22929 cat "conftest.$ac_ext" >&5
22930 cf_cv_have_libm=no
22931 fi
22932 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22933 fi
22934 echo "$as_me:22934: result: $cf_cv_have_libm" >&5
22935 echo "${ECHO_T}$cf_cv_have_libm" >&6
22936 LIBS="$cf_save_LIBS"
22937
22938 if test "$cf_cv_have_libm" = yes
22939 then
22940
22941 cf_add_libs="$LIBS"
22942 # reverse order
22943 cf_add_0lib=
22944 for cf_add_1lib in -lm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22945 # filter duplicates
22946 for cf_add_1lib in $cf_add_0lib; do
22947 for cf_add_2lib in $cf_add_libs; do
22948 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22949 cf_add_1lib=
22950 break
22951 fi
22952 done
22953 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22954 done
22955 LIBS="$cf_add_libs"
22956
22957 fi
22958 else
22959 cf_cv_have_libm=yes
22960 fi
22961
22962 if test "$cf_cv_have_libm" = yes
22963 then
22964
22965 cat >>confdefs.h <<\EOF
22966 #define HAVE_MATH_FUNCS 1
22967 EOF
22968
22969 fi
22970
22971 fi
22972
22973 echo "$as_me:22973: checking if you want sixel graphics support" >&5
22974 echo $ECHO_N "checking if you want sixel graphics support... $ECHO_C" >&6
22975
22976 # Check whether --enable-sixel-graphics or --disable-sixel-graphics was given.
22977 if test "${enable_sixel_graphics+set}" = set; then
22978 enableval="$enable_sixel_graphics"
22979 test "$enableval" != no && enableval=yes
22980 if test "$enableval" != "yes" ; then
22981 enable_sixel_graphics=no
22982 else
22983 enable_sixel_graphics=yes
22984 fi
22985 else
22986 enableval=yes
22987 enable_sixel_graphics=yes
22988
22989 fi;
22990 echo "$as_me:22990: result: $enable_sixel_graphics" >&5
22991 echo "${ECHO_T}$enable_sixel_graphics" >&6
22992 if test "$enable_sixel_graphics" = yes ; then
22993
22994 cat >>confdefs.h <<\EOF
22995 #define OPT_SIXEL_GRAPHICS 1
22996 EOF
22997
22998 EXTRAHDRS="$EXTRAHDRS graphics_sixel.h"
22999 EXTRASRCS="$EXTRASRCS graphics_sixel.c"
23000 EXTRAOBJS="$EXTRAOBJS graphics_sixel.o"
23001 fi
23002
23003 if test "$enable_regis_graphics" = yes || test "$enable_sixel_graphics" = yes ; then
23004
23005 cat >>confdefs.h <<\EOF
23006 #define OPT_GRAPHICS 1
23007 EOF
23008
23009 EXTRAHDRS="$EXTRAHDRS graphics.h"
23010 EXTRASRCS="$EXTRASRCS graphics.c"
23011 EXTRAOBJS="$EXTRAOBJS graphics.o"
23012 fi
23013
23014 echo "$as_me:23014: checking if you want sixel screen dump support" >&5
23015 echo $ECHO_N "checking if you want sixel screen dump support... $ECHO_C" >&6
23016
23017 # Check whether --enable-print-graphics or --disable-print-graphics was given.
23018 if test "${enable_print_graphics+set}" = set; then
23019 enableval="$enable_print_graphics"
23020 test "$enableval" != no && enableval=yes
23021 if test "$enableval" != "yes" ; then
23022 enable_print_graphics=no
23023 else
23024 enable_print_graphics=$enable_regis_graphics
23025 fi
23026 else
23027 enableval=yes
23028 enable_print_graphics=$enable_regis_graphics
23029
23030 fi;
23031 echo "$as_me:23031: result: $enable_print_graphics" >&5
23032 echo "${ECHO_T}$enable_print_graphics" >&6
23033 if test "$enable_print_graphics" = yes ; then
23034
23035 cat >>confdefs.h <<\EOF
23036 #define OPT_PRINT_GRAPHICS 1
23037 EOF
23038
23039 fi
23040
23041 echo "$as_me:23041: checking if you want VT420 rectangle support" >&5
23042 echo $ECHO_N "checking if you want VT420 rectangle support... $ECHO_C" >&6
23043
23044 # Check whether --enable-rectangles or --disable-rectangles was given.
23045 if test "${enable_rectangles+set}" = set; then
23046 enableval="$enable_rectangles"
23047 test "$enableval" != no && enableval=yes
23048 if test "$enableval" != "yes" ; then
23049 enable_rectangles=no
23050 else
23051 enable_rectangles=yes
23052 fi
23053 else
23054 enableval=yes
23055 enable_rectangles=yes
23056
23057 fi;
23058 echo "$as_me:23058: result: $enable_rectangles" >&5
23059 echo "${ECHO_T}$enable_rectangles" >&6
23060 if test "$enable_rectangles" = no ; then
23061
23062 cat >>confdefs.h <<\EOF
23063 #define OPT_DEC_RECTOPS 0
23064 EOF
23065
23066 fi
23067
23068 echo "$as_me:23068: checking if you want -ziconbeep option" >&5
23069 echo $ECHO_N "checking if you want -ziconbeep option... $ECHO_C" >&6
23070
23071 # Check whether --enable-ziconbeep or --disable-ziconbeep was given.
23072 if test "${enable_ziconbeep+set}" = set; then
23073 enableval="$enable_ziconbeep"
23074 test "$enableval" != no && enableval=yes
23075 if test "$enableval" != "yes" ; then
23076 enable_ziconbeep=no
23077 else
23078 enable_ziconbeep=yes
23079 fi
23080 else
23081 enableval=yes
23082 enable_ziconbeep=yes
23083
23084 fi;
23085 echo "$as_me:23085: result: $enable_ziconbeep" >&5
23086 echo "${ECHO_T}$enable_ziconbeep" >&6
23087 test "$enable_ziconbeep" = no &&
23088 cat >>confdefs.h <<\EOF
23089 #define OPT_ZICONBEEP 0
23090 EOF
23091
23092 ###############################################################################
23093
23094 echo "$as_me:23094: checking if you want debugging traces" >&5
23095 echo $ECHO_N "checking if you want debugging traces... $ECHO_C" >&6
23096
23097 # Check whether --enable-trace or --disable-trace was given.
23098 if test "${enable_trace+set}" = set; then
23099 enableval="$enable_trace"
23100 test "$enableval" != yes && enableval=no
23101 if test "$enableval" != "no" ; then
23102 enable_trace=yes
23103 else
23104 enable_trace=no
23105 fi
23106 else
23107 enableval=no
23108 enable_trace=no
23109
23110 fi;
23111 echo "$as_me:23111: result: $enable_trace" >&5
23112 echo "${ECHO_T}$enable_trace" >&6
23113 if test "$enable_trace" = yes ; then
23114
23115 cat >>confdefs.h <<\EOF
23116 #define OPT_TRACE 1
23117 EOF
23118
23119 EXTRASRCS="$EXTRASRCS trace.c"
23120 EXTRAOBJS="$EXTRAOBJS trace.o"
23121 fi
23122
23123 echo "$as_me:23123: checking if you want to use dmalloc for testing" >&5
23124 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
23125
23126 # Check whether --with-dmalloc or --without-dmalloc was given.
23127 if test "${with_dmalloc+set}" = set; then
23128 withval="$with_dmalloc"
23129 case "x$withval" in
23130 (x|xno) ;;
23131 (*)
23132 : "${with_cflags:=-g}"
23133 : "${enable_leaks:=no}"
23134 with_dmalloc=yes
23135
23136 cat >>confdefs.h <<EOF
23137 #define USE_DMALLOC 1
23138 EOF
23139
23140 ;;
23141 esac
23142 else
23143 with_dmalloc=
23144 fi;
23145 echo "$as_me:23145: result: ${with_dmalloc:-no}" >&5
23146 echo "${ECHO_T}${with_dmalloc:-no}" >&6
23147
23148 case ".$with_cflags" in
23149 (.*-g*)
23150 case .$CFLAGS in
23151 (.*-g*)
23152 ;;
23153 (*)
23154
23155 cf_fix_cppflags=no
23156 cf_new_cflags=
23157 cf_new_cppflags=
23158 cf_new_extra_cppflags=
23159
23160 for cf_add_cflags in -g
23161 do
23162 case "$cf_fix_cppflags" in
23163 (no)
23164 case "$cf_add_cflags" in
23165 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23166 case "$cf_add_cflags" in
23167 (-D*)
23168 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23169
23170 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23171 && test -z "${cf_tst_cflags}" \
23172 && cf_fix_cppflags=yes
23173
23174 if test "$cf_fix_cppflags" = yes ; then
23175
23176 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23177 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23178
23179 continue
23180 elif test "${cf_tst_cflags}" = "\"'" ; then
23181
23182 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23183 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23184
23185 continue
23186 fi
23187 ;;
23188 esac
23189 case "$CPPFLAGS" in
23190 (*$cf_add_cflags)
23191 ;;
23192 (*)
23193 case "$cf_add_cflags" in
23194 (-D*)
23195 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23196
23197 CPPFLAGS=`echo "$CPPFLAGS" | \
23198 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
23199 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
23200
23201 ;;
23202 esac
23203
23204 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23205 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23206
23207 ;;
23208 esac
23209 ;;
23210 (*)
23211
23212 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23213 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23214
23215 ;;
23216 esac
23217 ;;
23218 (yes)
23219
23220 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23221 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23222
23223 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23224
23225 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23226 && test -z "${cf_tst_cflags}" \
23227 && cf_fix_cppflags=no
23228 ;;
23229 esac
23230 done
23231
23232 if test -n "$cf_new_cflags" ; then
23233
23234 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23235 CFLAGS="${CFLAGS}$cf_new_cflags"
23236
23237 fi
23238
23239 if test -n "$cf_new_cppflags" ; then
23240
23241 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23242 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23243
23244 fi
23245
23246 if test -n "$cf_new_extra_cppflags" ; then
23247
23248 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23249 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23250
23251 fi
23252
23253 ;;
23254 esac
23255 ;;
23256 esac
23257
23258 if test "$with_dmalloc" = yes ; then
23259 echo "$as_me:23259: checking for dmalloc.h" >&5
23260 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
23261 if test "${ac_cv_header_dmalloc_h+set}" = set; then
23262 echo $ECHO_N "(cached) $ECHO_C" >&6
23263 else
23264 cat >"conftest.$ac_ext" <<_ACEOF
23265 #line 23265 "configure"
23266 #include "confdefs.h"
23267 #include <dmalloc.h>
23268 _ACEOF
23269 if { (eval echo "$as_me:23269: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23270 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23271 ac_status=$?
23272 $EGREP -v '^ *\+' conftest.er1 >conftest.err
23273 rm -f conftest.er1
23274 cat conftest.err >&5
23275 echo "$as_me:23275: \$? = $ac_status" >&5
23276 (exit "$ac_status"); } >/dev/null; then
23277 if test -s conftest.err; then
23278 ac_cpp_err=$ac_c_preproc_warn_flag
23279 else
23280 ac_cpp_err=
23281 fi
23282 else
23283 ac_cpp_err=yes
23284 fi
23285 if test -z "$ac_cpp_err"; then
23286 ac_cv_header_dmalloc_h=yes
23287 else
23288 echo "$as_me: failed program was:" >&5
23289 cat "conftest.$ac_ext" >&5
23290 ac_cv_header_dmalloc_h=no
23291 fi
23292 rm -f conftest.err "conftest.$ac_ext"
23293 fi
23294 echo "$as_me:23294: result: $ac_cv_header_dmalloc_h" >&5
23295 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
23296 if test "$ac_cv_header_dmalloc_h" = yes; then
23297
23298 echo "$as_me:23298: checking for dmalloc_debug in -ldmalloc" >&5
23299 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
23300 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
23301 echo $ECHO_N "(cached) $ECHO_C" >&6
23302 else
23303 ac_check_lib_save_LIBS=$LIBS
23304 LIBS="-ldmalloc $LIBS"
23305 cat >"conftest.$ac_ext" <<_ACEOF
23306 #line 23306 "configure"
23307 #include "confdefs.h"
23308
23309 /* Override any gcc2 internal prototype to avoid an error. */
23310 #ifdef __cplusplus
23311 extern "C"
23312 #endif
23313 /* We use char because int might match the return type of a gcc2
23314 builtin and then its argument prototype would still apply. */
23315 char dmalloc_debug ();
23316 int
23317 main (void)
23318 {
23319 dmalloc_debug ();
23320 ;
23321 return 0;
23322 }
23323 _ACEOF
23324 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23325 if { (eval echo "$as_me:23325: \"$ac_link\"") >&5
23326 (eval $ac_link) 2>&5
23327 ac_status=$?
23328 echo "$as_me:23328: \$? = $ac_status" >&5
23329 (exit "$ac_status"); } &&
23330 { ac_try='test -s "conftest$ac_exeext"'
23331 { (eval echo "$as_me:23331: \"$ac_try\"") >&5
23332 (eval $ac_try) 2>&5
23333 ac_status=$?
23334 echo "$as_me:23334: \$? = $ac_status" >&5
23335 (exit "$ac_status"); }; }; then
23336 ac_cv_lib_dmalloc_dmalloc_debug=yes
23337 else
23338 echo "$as_me: failed program was:" >&5
23339 cat "conftest.$ac_ext" >&5
23340 ac_cv_lib_dmalloc_dmalloc_debug=no
23341 fi
23342 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23343 LIBS=$ac_check_lib_save_LIBS
23344 fi
23345 echo "$as_me:23345: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
23346 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
23347 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
23348 cat >>confdefs.h <<EOF
23349 #define HAVE_LIBDMALLOC 1
23350 EOF
23351
23352 LIBS="-ldmalloc $LIBS"
23353
23354 fi
23355
23356 fi
23357
23358 fi
23359
23360 echo "$as_me:23360: checking if you want to use dbmalloc for testing" >&5
23361 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
23362
23363 # Check whether --with-dbmalloc or --without-dbmalloc was given.
23364 if test "${with_dbmalloc+set}" = set; then
23365 withval="$with_dbmalloc"
23366 case "x$withval" in
23367 (x|xno) ;;
23368 (*)
23369 : "${with_cflags:=-g}"
23370 : "${enable_leaks:=no}"
23371 with_dbmalloc=yes
23372
23373 cat >>confdefs.h <<EOF
23374 #define USE_DBMALLOC 1
23375 EOF
23376
23377 ;;
23378 esac
23379 else
23380 with_dbmalloc=
23381 fi;
23382 echo "$as_me:23382: result: ${with_dbmalloc:-no}" >&5
23383 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
23384
23385 case ".$with_cflags" in
23386 (.*-g*)
23387 case .$CFLAGS in
23388 (.*-g*)
23389 ;;
23390 (*)
23391
23392 cf_fix_cppflags=no
23393 cf_new_cflags=
23394 cf_new_cppflags=
23395 cf_new_extra_cppflags=
23396
23397 for cf_add_cflags in -g
23398 do
23399 case "$cf_fix_cppflags" in
23400 (no)
23401 case "$cf_add_cflags" in
23402 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23403 case "$cf_add_cflags" in
23404 (-D*)
23405 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23406
23407 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23408 && test -z "${cf_tst_cflags}" \
23409 && cf_fix_cppflags=yes
23410
23411 if test "$cf_fix_cppflags" = yes ; then
23412
23413 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23414 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23415
23416 continue
23417 elif test "${cf_tst_cflags}" = "\"'" ; then
23418
23419 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23420 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23421
23422 continue
23423 fi
23424 ;;
23425 esac
23426 case "$CPPFLAGS" in
23427 (*$cf_add_cflags)
23428 ;;
23429 (*)
23430 case "$cf_add_cflags" in
23431 (-D*)
23432 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23433
23434 CPPFLAGS=`echo "$CPPFLAGS" | \
23435 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
23436 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
23437
23438 ;;
23439 esac
23440
23441 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23442 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23443
23444 ;;
23445 esac
23446 ;;
23447 (*)
23448
23449 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23450 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23451
23452 ;;
23453 esac
23454 ;;
23455 (yes)
23456
23457 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23458 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23459
23460 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23461
23462 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23463 && test -z "${cf_tst_cflags}" \
23464 && cf_fix_cppflags=no
23465 ;;
23466 esac
23467 done
23468
23469 if test -n "$cf_new_cflags" ; then
23470
23471 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23472 CFLAGS="${CFLAGS}$cf_new_cflags"
23473
23474 fi
23475
23476 if test -n "$cf_new_cppflags" ; then
23477
23478 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23479 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23480
23481 fi
23482
23483 if test -n "$cf_new_extra_cppflags" ; then
23484
23485 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23486 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23487
23488 fi
23489
23490 ;;
23491 esac
23492 ;;
23493 esac
23494
23495 if test "$with_dbmalloc" = yes ; then
23496 echo "$as_me:23496: checking for dbmalloc.h" >&5
23497 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
23498 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
23499 echo $ECHO_N "(cached) $ECHO_C" >&6
23500 else
23501 cat >"conftest.$ac_ext" <<_ACEOF
23502 #line 23502 "configure"
23503 #include "confdefs.h"
23504 #include <dbmalloc.h>
23505 _ACEOF
23506 if { (eval echo "$as_me:23506: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23507 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23508 ac_status=$?
23509 $EGREP -v '^ *\+' conftest.er1 >conftest.err
23510 rm -f conftest.er1
23511 cat conftest.err >&5
23512 echo "$as_me:23512: \$? = $ac_status" >&5
23513 (exit "$ac_status"); } >/dev/null; then
23514 if test -s conftest.err; then
23515 ac_cpp_err=$ac_c_preproc_warn_flag
23516 else
23517 ac_cpp_err=
23518 fi
23519 else
23520 ac_cpp_err=yes
23521 fi
23522 if test -z "$ac_cpp_err"; then
23523 ac_cv_header_dbmalloc_h=yes
23524 else
23525 echo "$as_me: failed program was:" >&5
23526 cat "conftest.$ac_ext" >&5
23527 ac_cv_header_dbmalloc_h=no
23528 fi
23529 rm -f conftest.err "conftest.$ac_ext"
23530 fi
23531 echo "$as_me:23531: result: $ac_cv_header_dbmalloc_h" >&5
23532 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
23533 if test "$ac_cv_header_dbmalloc_h" = yes; then
23534
23535 echo "$as_me:23535: checking for debug_malloc in -ldbmalloc" >&5
23536 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
23537 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
23538 echo $ECHO_N "(cached) $ECHO_C" >&6
23539 else
23540 ac_check_lib_save_LIBS=$LIBS
23541 LIBS="-ldbmalloc $LIBS"
23542 cat >"conftest.$ac_ext" <<_ACEOF
23543 #line 23543 "configure"
23544 #include "confdefs.h"
23545
23546 /* Override any gcc2 internal prototype to avoid an error. */
23547 #ifdef __cplusplus
23548 extern "C"
23549 #endif
23550 /* We use char because int might match the return type of a gcc2
23551 builtin and then its argument prototype would still apply. */
23552 char debug_malloc ();
23553 int
23554 main (void)
23555 {
23556 debug_malloc ();
23557 ;
23558 return 0;
23559 }
23560 _ACEOF
23561 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23562 if { (eval echo "$as_me:23562: \"$ac_link\"") >&5
23563 (eval $ac_link) 2>&5
23564 ac_status=$?
23565 echo "$as_me:23565: \$? = $ac_status" >&5
23566 (exit "$ac_status"); } &&
23567 { ac_try='test -s "conftest$ac_exeext"'
23568 { (eval echo "$as_me:23568: \"$ac_try\"") >&5
23569 (eval $ac_try) 2>&5
23570 ac_status=$?
23571 echo "$as_me:23571: \$? = $ac_status" >&5
23572 (exit "$ac_status"); }; }; then
23573 ac_cv_lib_dbmalloc_debug_malloc=yes
23574 else
23575 echo "$as_me: failed program was:" >&5
23576 cat "conftest.$ac_ext" >&5
23577 ac_cv_lib_dbmalloc_debug_malloc=no
23578 fi
23579 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23580 LIBS=$ac_check_lib_save_LIBS
23581 fi
23582 echo "$as_me:23582: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
23583 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
23584 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
23585 cat >>confdefs.h <<EOF
23586 #define HAVE_LIBDBMALLOC 1
23587 EOF
23588
23589 LIBS="-ldbmalloc $LIBS"
23590
23591 fi
23592
23593 fi
23594
23595 fi
23596
23597 echo "$as_me:23597: checking if you want to use valgrind for testing" >&5
23598 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
23599
23600 # Check whether --with-valgrind or --without-valgrind was given.
23601 if test "${with_valgrind+set}" = set; then
23602 withval="$with_valgrind"
23603 case "x$withval" in
23604 (x|xno) ;;
23605 (*)
23606 : "${with_cflags:=-g}"
23607 : "${enable_leaks:=no}"
23608 with_valgrind=yes
23609
23610 cat >>confdefs.h <<EOF
23611 #define USE_VALGRIND 1
23612 EOF
23613
23614 ;;
23615 esac
23616 else
23617 with_valgrind=
23618 fi;
23619 echo "$as_me:23619: result: ${with_valgrind:-no}" >&5
23620 echo "${ECHO_T}${with_valgrind:-no}" >&6
23621
23622 case ".$with_cflags" in
23623 (.*-g*)
23624 case .$CFLAGS in
23625 (.*-g*)
23626 ;;
23627 (*)
23628
23629 cf_fix_cppflags=no
23630 cf_new_cflags=
23631 cf_new_cppflags=
23632 cf_new_extra_cppflags=
23633
23634 for cf_add_cflags in -g
23635 do
23636 case "$cf_fix_cppflags" in
23637 (no)
23638 case "$cf_add_cflags" in
23639 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23640 case "$cf_add_cflags" in
23641 (-D*)
23642 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23643
23644 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23645 && test -z "${cf_tst_cflags}" \
23646 && cf_fix_cppflags=yes
23647
23648 if test "$cf_fix_cppflags" = yes ; then
23649
23650 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23651 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23652
23653 continue
23654 elif test "${cf_tst_cflags}" = "\"'" ; then
23655
23656 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23657 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23658
23659 continue
23660 fi
23661 ;;
23662 esac
23663 case "$CPPFLAGS" in
23664 (*$cf_add_cflags)
23665 ;;
23666 (*)
23667 case "$cf_add_cflags" in
23668 (-D*)
23669 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23670
23671 CPPFLAGS=`echo "$CPPFLAGS" | \
23672 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
23673 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
23674
23675 ;;
23676 esac
23677
23678 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23679 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23680
23681 ;;
23682 esac
23683 ;;
23684 (*)
23685
23686 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23687 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23688
23689 ;;
23690 esac
23691 ;;
23692 (yes)
23693
23694 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23695 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23696
23697 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23698
23699 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23700 && test -z "${cf_tst_cflags}" \
23701 && cf_fix_cppflags=no
23702 ;;
23703 esac
23704 done
23705
23706 if test -n "$cf_new_cflags" ; then
23707
23708 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23709 CFLAGS="${CFLAGS}$cf_new_cflags"
23710
23711 fi
23712
23713 if test -n "$cf_new_cppflags" ; then
23714
23715 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23716 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23717
23718 fi
23719
23720 if test -n "$cf_new_extra_cppflags" ; then
23721
23722 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23723 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23724
23725 fi
23726
23727 ;;
23728 esac
23729 ;;
23730 esac
23731
23732 echo "$as_me:23732: checking if you want to perform memory-leak testing" >&5
23733 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
23734
23735 # Check whether --enable-leaks or --disable-leaks was given.
23736 if test "${enable_leaks+set}" = set; then
23737 enableval="$enable_leaks"
23738 enable_leaks=$enableval
23739 else
23740 enable_leaks=yes
23741 fi;
23742 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
23743 echo "$as_me:23743: result: $with_no_leaks" >&5
23744 echo "${ECHO_T}$with_no_leaks" >&6
23745
23746 if test "$enable_leaks" = no ; then
23747
23748 cat >>confdefs.h <<\EOF
23749 #define NO_LEAKS 1
23750 EOF
23751
23752 cat >>confdefs.h <<\EOF
23753 #define YY_NO_LEAKS 1
23754 EOF
23755
23756 fi
23757
23758 echo "$as_me:23758: checking if you want to see long compiling messages" >&5
23759 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
23760
23761 # Check whether --enable-echo or --disable-echo was given.
23762 if test "${enable_echo+set}" = set; then
23763 enableval="$enable_echo"
23764 test "$enableval" != no && enableval=yes
23765 if test "$enableval" != "yes" ; then
23766
23767 ECHO_LT='--silent'
23768 ECHO_LD='@echo linking $@;'
23769 RULE_CC='@echo compiling $<'
23770 SHOW_CC='@echo compiling $@'
23771 ECHO_CC='@'
23772
23773 else
23774
23775 ECHO_LT=''
23776 ECHO_LD=''
23777 RULE_CC=''
23778 SHOW_CC=''
23779 ECHO_CC=''
23780
23781 fi
23782 else
23783 enableval=yes
23784
23785 ECHO_LT=''
23786 ECHO_LD=''
23787 RULE_CC=''
23788 SHOW_CC=''
23789 ECHO_CC=''
23790
23791 fi;
23792 echo "$as_me:23792: result: $enableval" >&5
23793 echo "${ECHO_T}$enableval" >&6
23794
23795 echo "$as_me:23795: checking if you want magic cookie emulation" >&5
23796 echo $ECHO_N "checking if you want magic cookie emulation... $ECHO_C" >&6
23797
23798 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
23799 if test "${enable_xmc_glitch+set}" = set; then
23800 enableval="$enable_xmc_glitch"
23801 test "$enableval" != yes && enableval=no
23802 if test "$enableval" != "no" ; then
23803 enable_xmc=yes
23804 else
23805 enable_xmc=no
23806 fi
23807 else
23808 enableval=no
23809 enable_xmc=no
23810
23811 fi;
23812 echo "$as_me:23812: result: $enable_xmc" >&5
23813 echo "${ECHO_T}$enable_xmc" >&6
23814 if test "$enable_xmc" = yes ; then
23815
23816 cat >>confdefs.h <<\EOF
23817 #define OPT_XMC_GLITCH 1
23818 EOF
23819
23820 EXTRASRCS="$EXTRASRCS testxmc.c"
23821 EXTRAOBJS="$EXTRAOBJS testxmc.o"
23822 fi
23823
23824 for ac_func in tigetstr
23825 do
23826 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23827 echo "$as_me:23827: checking for $ac_func" >&5
23828 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23829 if eval "test \"\${$as_ac_var+set}\" = set"; then
23830 echo $ECHO_N "(cached) $ECHO_C" >&6
23831 else
23832 cat >"conftest.$ac_ext" <<_ACEOF
23833 #line 23833 "configure"
23834 #include "confdefs.h"
23835 #define $ac_func autoconf_temporary
23836 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
23837 #undef $ac_func
23838
23839 #ifdef __cplusplus
23840 extern "C"
23841 #endif
23842
23843 /* We use char because int might match the return type of a gcc2
23844 builtin and then its argument prototype would still apply. */
23845 char $ac_func (void);
23846
23847 int
23848 main (void)
23849 {
23850
23851 /* The GNU C library defines stubs for functions which it implements
23852 to always fail with ENOSYS. Some functions are actually named
23853 something starting with __ and the normal name is an alias. */
23854 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23855 #error found stub for $ac_func
23856 #endif
23857
23858 return $ac_func ();
23859 ;
23860 return 0;
23861 }
23862 _ACEOF
23863 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23864 if { (eval echo "$as_me:23864: \"$ac_link\"") >&5
23865 (eval $ac_link) 2>&5
23866 ac_status=$?
23867 echo "$as_me:23867: \$? = $ac_status" >&5
23868 (exit "$ac_status"); } &&
23869 { ac_try='test -s "conftest$ac_exeext"'
23870 { (eval echo "$as_me:23870: \"$ac_try\"") >&5
23871 (eval $ac_try) 2>&5
23872 ac_status=$?
23873 echo "$as_me:23873: \$? = $ac_status" >&5
23874 (exit "$ac_status"); }; }; then
23875 eval "$as_ac_var=yes"
23876 else
23877 echo "$as_me: failed program was:" >&5
23878 cat "conftest.$ac_ext" >&5
23879 eval "$as_ac_var=no"
23880 fi
23881 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23882 fi
23883 echo "$as_me:23883: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23884 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23885 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23886 cat >>confdefs.h <<EOF
23887 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23888 EOF
23889
23890 fi
23891 done
23892
23893 if test -n "$cf_cv_lib_part_tgetent"; then
23894
23895 for ac_func in use_extended_names
23896 do
23897 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23898 echo "$as_me:23898: checking for $ac_func" >&5
23899 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23900 if eval "test \"\${$as_ac_var+set}\" = set"; then
23901 echo $ECHO_N "(cached) $ECHO_C" >&6
23902 else
23903 cat >"conftest.$ac_ext" <<_ACEOF
23904 #line 23904 "configure"
23905 #include "confdefs.h"
23906 #define $ac_func autoconf_temporary
23907 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
23908 #undef $ac_func
23909
23910 #ifdef __cplusplus
23911 extern "C"
23912 #endif
23913
23914 /* We use char because int might match the return type of a gcc2
23915 builtin and then its argument prototype would still apply. */
23916 char $ac_func (void);
23917
23918 int
23919 main (void)
23920 {
23921
23922 /* The GNU C library defines stubs for functions which it implements
23923 to always fail with ENOSYS. Some functions are actually named
23924 something starting with __ and the normal name is an alias. */
23925 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23926 #error found stub for $ac_func
23927 #endif
23928
23929 return $ac_func ();
23930 ;
23931 return 0;
23932 }
23933 _ACEOF
23934 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23935 if { (eval echo "$as_me:23935: \"$ac_link\"") >&5
23936 (eval $ac_link) 2>&5
23937 ac_status=$?
23938 echo "$as_me:23938: \$? = $ac_status" >&5
23939 (exit "$ac_status"); } &&
23940 { ac_try='test -s "conftest$ac_exeext"'
23941 { (eval echo "$as_me:23941: \"$ac_try\"") >&5
23942 (eval $ac_try) 2>&5
23943 ac_status=$?
23944 echo "$as_me:23944: \$? = $ac_status" >&5
23945 (exit "$ac_status"); }; }; then
23946 eval "$as_ac_var=yes"
23947 else
23948 echo "$as_me: failed program was:" >&5
23949 cat "conftest.$ac_ext" >&5
23950 eval "$as_ac_var=no"
23951 fi
23952 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23953 fi
23954 echo "$as_me:23954: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23955 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23956 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23957 cat >>confdefs.h <<EOF
23958 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23959 EOF
23960
23961 fi
23962 done
23963
23964 fi
23965
23966 echo "$as_me:23966: checking if you want to use C11 _Noreturn feature" >&5
23967 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
23968
23969 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
23970 if test "${enable_stdnoreturn+set}" = set; then
23971 enableval="$enable_stdnoreturn"
23972 test "$enableval" != yes && enableval=no
23973 if test "$enableval" != "no" ; then
23974 enable_stdnoreturn=yes
23975 else
23976 enable_stdnoreturn=no
23977 fi
23978 else
23979 enableval=no
23980 enable_stdnoreturn=no
23981
23982 fi;
23983 echo "$as_me:23983: result: $enable_stdnoreturn" >&5
23984 echo "${ECHO_T}$enable_stdnoreturn" >&6
23985
23986 if test $enable_stdnoreturn = yes; then
23987 echo "$as_me:23987: checking for C11 _Noreturn feature" >&5
23988 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
23989 if test "${cf_cv_c11_noreturn+set}" = set; then
23990 echo $ECHO_N "(cached) $ECHO_C" >&6
23991 else
23992 cat >"conftest.$ac_ext" <<_ACEOF
23993 #line 23993 "configure"
23994 #include "confdefs.h"
23995
23996 $ac_includes_default
23997 #include <stdnoreturn.h>
23998 static _Noreturn void giveup(void) { exit(0); }
23999
24000 int
24001 main (void)
24002 {
24003 if (feof(stdin)) giveup()
24004 ;
24005 return 0;
24006 }
24007 _ACEOF
24008 rm -f "conftest.$ac_objext"
24009 if { (eval echo "$as_me:24009: \"$ac_compile\"") >&5
24010 (eval $ac_compile) 2>&5
24011 ac_status=$?
24012 echo "$as_me:24012: \$? = $ac_status" >&5
24013 (exit "$ac_status"); } &&
24014 { ac_try='test -s "conftest.$ac_objext"'
24015 { (eval echo "$as_me:24015: \"$ac_try\"") >&5
24016 (eval $ac_try) 2>&5
24017 ac_status=$?
24018 echo "$as_me:24018: \$? = $ac_status" >&5
24019 (exit "$ac_status"); }; }; then
24020 cf_cv_c11_noreturn=yes
24021 else
24022 echo "$as_me: failed program was:" >&5
24023 cat "conftest.$ac_ext" >&5
24024 cf_cv_c11_noreturn=no
24025 fi
24026 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24027
24028 fi
24029 echo "$as_me:24029: result: $cf_cv_c11_noreturn" >&5
24030 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
24031 else
24032 cf_cv_c11_noreturn=no,
24033 fi
24034
24035 if test "$cf_cv_c11_noreturn" = yes; then
24036
24037 cat >>confdefs.h <<\EOF
24038 #define HAVE_STDNORETURN_H 1
24039 EOF
24040
24041 cat >>confdefs.h <<EOF
24042 #define STDC_NORETURN _Noreturn
24043 EOF
24044
24045 HAVE_STDNORETURN_H=1
24046 else
24047 HAVE_STDNORETURN_H=0
24048 fi
24049
24050 if test "$GCC" = yes || test "$GXX" = yes
24051 then
24052
24053 if test "$GCC" = yes || test "$GXX" = yes
24054 then
24055 case $CFLAGS in
24056 (*-Werror=*)
24057 cf_temp_flags=
24058 for cf_temp_scan in $CFLAGS
24059 do
24060 case "x$cf_temp_scan" in
24061 (x-Werror=format*)
24062
24063 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
24064 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
24065
24066 ;;
24067 (x-Werror=*)
24068
24069 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
24070 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
24071
24072 ;;
24073 (*)
24074
24075 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
24076 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
24077
24078 ;;
24079 esac
24080 done
24081 if test "x$CFLAGS" != "x$cf_temp_flags"
24082 then
24083 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
24084
24085 echo "${as_me:-configure}:24085: testing repairing CFLAGS: $CFLAGS ..." 1>&5
24086
24087 CFLAGS="$cf_temp_flags"
24088 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
24089
24090 echo "${as_me:-configure}:24090: testing ... fixed $CFLAGS ..." 1>&5
24091
24092 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
24093
24094 echo "${as_me:-configure}:24094: testing ... extra $EXTRA_CFLAGS ..." 1>&5
24095
24096 fi
24097 ;;
24098 esac
24099 fi
24100
24101 if test "$GCC" = yes || test "$GXX" = yes
24102 then
24103 case $CPPFLAGS in
24104 (*-Werror=*)
24105 cf_temp_flags=
24106 for cf_temp_scan in $CPPFLAGS
24107 do
24108 case "x$cf_temp_scan" in
24109 (x-Werror=format*)
24110
24111 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
24112 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
24113
24114 ;;
24115 (x-Werror=*)
24116
24117 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
24118 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
24119
24120 ;;
24121 (*)
24122
24123 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
24124 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
24125
24126 ;;
24127 esac
24128 done
24129 if test "x$CPPFLAGS" != "x$cf_temp_flags"
24130 then
24131 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
24132
24133 echo "${as_me:-configure}:24133: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
24134
24135 CPPFLAGS="$cf_temp_flags"
24136 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
24137
24138 echo "${as_me:-configure}:24138: testing ... fixed $CPPFLAGS ..." 1>&5
24139
24140 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
24141
24142 echo "${as_me:-configure}:24142: testing ... extra $EXTRA_CFLAGS ..." 1>&5
24143
24144 fi
24145 ;;
24146 esac
24147 fi
24148
24149 if test "$GCC" = yes || test "$GXX" = yes
24150 then
24151 case $LDFLAGS in
24152 (*-Werror=*)
24153 cf_temp_flags=
24154 for cf_temp_scan in $LDFLAGS
24155 do
24156 case "x$cf_temp_scan" in
24157 (x-Werror=format*)
24158
24159 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
24160 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
24161
24162 ;;
24163 (x-Werror=*)
24164
24165 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
24166 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
24167
24168 ;;
24169 (*)
24170
24171 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
24172 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
24173
24174 ;;
24175 esac
24176 done
24177 if test "x$LDFLAGS" != "x$cf_temp_flags"
24178 then
24179 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
24180
24181 echo "${as_me:-configure}:24181: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
24182
24183 LDFLAGS="$cf_temp_flags"
24184 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
24185
24186 echo "${as_me:-configure}:24186: testing ... fixed $LDFLAGS ..." 1>&5
24187
24188 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
24189
24190 echo "${as_me:-configure}:24190: testing ... extra $EXTRA_CFLAGS ..." 1>&5
24191
24192 fi
24193 ;;
24194 esac
24195 fi
24196
24197 echo "$as_me:24197: checking if you want to turn on gcc warnings" >&5
24198 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
24199
24200 # Check whether --enable-warnings or --disable-warnings was given.
24201 if test "${enable_warnings+set}" = set; then
24202 enableval="$enable_warnings"
24203 test "$enableval" != yes && enableval=no
24204 if test "$enableval" != "no" ; then
24205 enable_warnings=yes
24206 else
24207 enable_warnings=no
24208 fi
24209 else
24210 enableval=no
24211 enable_warnings=no
24212
24213 fi;
24214 echo "$as_me:24214: result: $enable_warnings" >&5
24215 echo "${ECHO_T}$enable_warnings" >&6
24216 if test "$enable_warnings" = "yes"
24217 then
24218
24219 if test "x$have_x" = xyes; then
24220
24221 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
24222 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
24223 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
24224 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
24225 for cf_X_CFLAGS in $X_CFLAGS
24226 do
24227 case "x$cf_X_CFLAGS" in
24228 x-[IUD]*)
24229 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
24230 ;;
24231 *)
24232 CFLAGS="$CFLAGS $cf_X_CFLAGS"
24233 ;;
24234 esac
24235 done
24236
24237 cat >"conftest.$ac_ext" <<_ACEOF
24238 #line 24238 "configure"
24239 #include "confdefs.h"
24240
24241 #include <stdlib.h>
24242 #include <X11/Intrinsic.h>
24243
24244 int
24245 main (void)
24246 {
24247 String foo = malloc(1); free((void*)foo)
24248 ;
24249 return 0;
24250 }
24251 _ACEOF
24252 rm -f "conftest.$ac_objext"
24253 if { (eval echo "$as_me:24253: \"$ac_compile\"") >&5
24254 (eval $ac_compile) 2>&5
24255 ac_status=$?
24256 echo "$as_me:24256: \$? = $ac_status" >&5
24257 (exit "$ac_status"); } &&
24258 { ac_try='test -s "conftest.$ac_objext"'
24259 { (eval echo "$as_me:24259: \"$ac_try\"") >&5
24260 (eval $ac_try) 2>&5
24261 ac_status=$?
24262 echo "$as_me:24262: \$? = $ac_status" >&5
24263 (exit "$ac_status"); }; }; then
24264
24265 echo "$as_me:24265: checking for X11/Xt const-feature" >&5
24266 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
24267 if test "${cf_cv_const_x_string+set}" = set; then
24268 echo $ECHO_N "(cached) $ECHO_C" >&6
24269 else
24270
24271 cat >"conftest.$ac_ext" <<_ACEOF
24272 #line 24272 "configure"
24273 #include "confdefs.h"
24274
24275 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
24276 #undef XTSTRINGDEFINES /* X11R5 and later */
24277 #include <stdlib.h>
24278 #include <X11/Intrinsic.h>
24279
24280 int
24281 main (void)
24282 {
24283 String foo = malloc(1); *foo = 0
24284 ;
24285 return 0;
24286 }
24287 _ACEOF
24288 rm -f "conftest.$ac_objext"
24289 if { (eval echo "$as_me:24289: \"$ac_compile\"") >&5
24290 (eval $ac_compile) 2>&5
24291 ac_status=$?
24292 echo "$as_me:24292: \$? = $ac_status" >&5
24293 (exit "$ac_status"); } &&
24294 { ac_try='test -s "conftest.$ac_objext"'
24295 { (eval echo "$as_me:24295: \"$ac_try\"") >&5
24296 (eval $ac_try) 2>&5
24297 ac_status=$?
24298 echo "$as_me:24298: \$? = $ac_status" >&5
24299 (exit "$ac_status"); }; }; then
24300
24301 cf_cv_const_x_string=no
24302
24303 else
24304 echo "$as_me: failed program was:" >&5
24305 cat "conftest.$ac_ext" >&5
24306
24307 cf_cv_const_x_string=yes
24308
24309 fi
24310 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24311
24312 fi
24313 echo "$as_me:24313: result: $cf_cv_const_x_string" >&5
24314 echo "${ECHO_T}$cf_cv_const_x_string" >&6
24315
24316 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
24317 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
24318 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
24319
24320 case "$cf_cv_const_x_string" in
24321 (no)
24322
24323 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24324 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
24325
24326 ;;
24327 (*)
24328
24329 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24330 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
24331
24332 ;;
24333 esac
24334
24335 else
24336 echo "$as_me: failed program was:" >&5
24337 cat "conftest.$ac_ext" >&5
24338 fi
24339 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24340 fi
24341 cat > "conftest.$ac_ext" <<EOF
24342 #line 24342 "${as_me:-configure}"
24343 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
24344 EOF
24345 if test "$INTEL_COMPILER" = yes
24346 then
24347 # The "-wdXXX" options suppress warnings:
24348 # remark #1419: external declaration in primary source file
24349 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
24350 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
24351 # remark #193: zero used for undefined preprocessing identifier
24352 # remark #593: variable "curs_sb_left_arrow" was set but never used
24353 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
24354 # remark #869: parameter "tw" was never referenced
24355 # remark #981: operands are evaluated in unspecified order
24356 # warning #279: controlling expression is constant
24357
24358 { echo "$as_me:24358: checking for $CC warning options..." >&5
24359 echo "$as_me: checking for $CC warning options..." >&6;}
24360 cf_save_CFLAGS="$CFLAGS"
24361 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
24362 for cf_opt in \
24363 wd1419 \
24364 wd1683 \
24365 wd1684 \
24366 wd193 \
24367 wd593 \
24368 wd279 \
24369 wd810 \
24370 wd869 \
24371 wd981
24372 do
24373 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
24374 if { (eval echo "$as_me:24374: \"$ac_compile\"") >&5
24375 (eval $ac_compile) 2>&5
24376 ac_status=$?
24377 echo "$as_me:24377: \$? = $ac_status" >&5
24378 (exit "$ac_status"); }; then
24379 test -n "$verbose" && echo "$as_me:24379: result: ... -$cf_opt" >&5
24380 echo "${ECHO_T}... -$cf_opt" >&6
24381 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
24382 fi
24383 done
24384 CFLAGS="$cf_save_CFLAGS"
24385 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
24386 then
24387 { echo "$as_me:24387: checking for $CC warning options..." >&5
24388 echo "$as_me: checking for $CC warning options..." >&6;}
24389 cf_save_CFLAGS="$CFLAGS"
24390 cf_warn_CONST=""
24391 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
24392 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
24393 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
24394 for cf_opt in W Wall \
24395 Wbad-function-cast \
24396 Wcast-align \
24397 Wcast-qual \
24398 Wdeclaration-after-statement \
24399 Wextra \
24400 Winline \
24401 Wmissing-declarations \
24402 Wmissing-prototypes \
24403 Wnested-externs \
24404 Wpointer-arith \
24405 Wshadow \
24406 Wstrict-prototypes \
24407 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum Wno-cast-qual
24408 do
24409 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
24410 if { (eval echo "$as_me:24410: \"$ac_compile\"") >&5
24411 (eval $ac_compile) 2>&5
24412 ac_status=$?
24413 echo "$as_me:24413: \$? = $ac_status" >&5
24414 (exit "$ac_status"); }; then
24415 test -n "$verbose" && echo "$as_me:24415: result: ... -$cf_opt" >&5
24416 echo "${ECHO_T}... -$cf_opt" >&6
24417 case "$cf_opt" in
24418 (Winline)
24419 case "$GCC_VERSION" in
24420 ([34].*)
24421 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
24422
24423 echo "${as_me:-configure}:24423: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
24424
24425 continue;;
24426 esac
24427 ;;
24428 (Wpointer-arith)
24429 case "$GCC_VERSION" in
24430 ([12].*)
24431 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
24432
24433 echo "${as_me:-configure}:24433: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
24434
24435 continue;;
24436 esac
24437 ;;
24438 esac
24439 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
24440 fi
24441 done
24442 CFLAGS="$cf_save_CFLAGS"
24443 fi
24444 rm -rf ./conftest*
24445
24446 fi
24447
24448 if test "$GCC" = yes || test "$GXX" = yes
24449 then
24450 cat > conftest.i <<EOF
24451 #ifndef GCC_PRINTF
24452 #define GCC_PRINTF 0
24453 #endif
24454 #ifndef GCC_SCANF
24455 #define GCC_SCANF 0
24456 #endif
24457 #ifndef GCC_NORETURN
24458 #define GCC_NORETURN /* nothing */
24459 #endif
24460 #ifndef GCC_UNUSED
24461 #define GCC_UNUSED /* nothing */
24462 #endif
24463 EOF
24464 if test "$GCC" = yes
24465 then
24466 { echo "$as_me:24466: checking for $CC __attribute__ directives..." >&5
24467 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
24468 cat > "conftest.$ac_ext" <<EOF
24469 #line 24469 "${as_me:-configure}"
24470 #include <stdio.h>
24471 #include "confdefs.h"
24472 #include "conftest.h"
24473 #include "conftest.i"
24474 #if GCC_PRINTF
24475 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
24476 #else
24477 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
24478 #endif
24479 #if GCC_SCANF
24480 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
24481 #else
24482 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
24483 #endif
24484 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
24485 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
24486 extern GCC_NORETURN void foo(void);
24487 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
24488 EOF
24489 cf_printf_attribute=no
24490 cf_scanf_attribute=no
24491 for cf_attribute in scanf printf unused noreturn
24492 do
24493
24494 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24495
24496 cf_directive="__attribute__(($cf_attribute))"
24497 echo "checking for $CC $cf_directive" 1>&5
24498
24499 case "$cf_attribute" in
24500 (printf)
24501 cf_printf_attribute=yes
24502 cat >conftest.h <<EOF
24503 #define GCC_$cf_ATTRIBUTE 1
24504 EOF
24505 ;;
24506 (scanf)
24507 cf_scanf_attribute=yes
24508 cat >conftest.h <<EOF
24509 #define GCC_$cf_ATTRIBUTE 1
24510 EOF
24511 ;;
24512 (*)
24513 cat >conftest.h <<EOF
24514 #define GCC_$cf_ATTRIBUTE $cf_directive
24515 EOF
24516 ;;
24517 esac
24518
24519 if { (eval echo "$as_me:24519: \"$ac_compile\"") >&5
24520 (eval $ac_compile) 2>&5
24521 ac_status=$?
24522 echo "$as_me:24522: \$? = $ac_status" >&5
24523 (exit "$ac_status"); }; then
24524 test -n "$verbose" && echo "$as_me:24524: result: ... $cf_attribute" >&5
24525 echo "${ECHO_T}... $cf_attribute" >&6
24526 cat conftest.h >>confdefs.h
24527 case "$cf_attribute" in
24528 (noreturn)
24529
24530 cat >>confdefs.h <<EOF
24531 #define GCC_NORETURN $cf_directive
24532 EOF
24533
24534 ;;
24535 (printf)
24536 cf_value='/* nothing */'
24537 if test "$cf_printf_attribute" != no ; then
24538 cf_value='__attribute__((format(printf,fmt,var)))'
24539
24540 cat >>confdefs.h <<\EOF
24541 #define GCC_PRINTF 1
24542 EOF
24543
24544 fi
24545
24546 cat >>confdefs.h <<EOF
24547 #define GCC_PRINTFLIKE(fmt,var) $cf_value
24548 EOF
24549
24550 ;;
24551 (scanf)
24552 cf_value='/* nothing */'
24553 if test "$cf_scanf_attribute" != no ; then
24554 cf_value='__attribute__((format(scanf,fmt,var)))'
24555
24556 cat >>confdefs.h <<\EOF
24557 #define GCC_SCANF 1
24558 EOF
24559
24560 fi
24561
24562 cat >>confdefs.h <<EOF
24563 #define GCC_SCANFLIKE(fmt,var) $cf_value
24564 EOF
24565
24566 ;;
24567 (unused)
24568
24569 cat >>confdefs.h <<EOF
24570 #define GCC_UNUSED $cf_directive
24571 EOF
24572
24573 ;;
24574 esac
24575 fi
24576 done
24577 else
24578 ${FGREP-fgrep} define conftest.i >>confdefs.h
24579 fi
24580 rm -rf ./conftest*
24581 fi
24582
24583 fi
24584
24585 test "$disable_setuid" = yes &&
24586 cat >>confdefs.h <<\EOF
24587 #define DISABLE_SETUID 1
24588 EOF
24589
24590 test "$disable_setgid" = yes &&
24591 cat >>confdefs.h <<\EOF
24592 #define DISABLE_SETGID 1
24593 EOF
24594
24595 if test $disable_setuid = yes ; then
24596 MAY_SETUID="#"
24597 NOT_SETUID=
24598 elif test $disable_setgid = yes ; then
24599 MAY_SETUID="#"
24600 NOT_SETUID=
24601 else
24602 MAY_SETUID=
24603 NOT_SETUID="#"
24604 fi
24605
24606 ### remove from CPPFLAGS the optional features we define in xtermcfg.h
24607 ### or other conflicting symbols that may be defined via imake:
24608 for cf_def in \
24609 __STDC__ \
24610 ALLOWLOGGING \
24611 ALLOWLOGFILEEXEC \
24612 OPT_LUIT_PROG \
24613 OPT_WIDE_CHARS \
24614 SCROLLBAR_RIGHT \
24615 USE_TTY_GROUP \
24616 USE_UTEMPTER \
24617 XRENDERFONT
24618 do
24619 CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-D$cf_def//`
24620 done
24621
24622 echo "$as_me:24622: checking if filesystem supports mixed-case filenames" >&5
24623 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
24624 if test "${cf_cv_mixedcase+set}" = set; then
24625 echo $ECHO_N "(cached) $ECHO_C" >&6
24626 else
24627
24628 if test "$cross_compiling" = yes ; then
24629 case "$target_alias" in
24630 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
24631 cf_cv_mixedcase=no
24632 ;;
24633 (*)
24634 cf_cv_mixedcase=yes
24635 ;;
24636 esac
24637 else
24638 rm -f conftest CONFTEST
24639 echo test >conftest
24640 if test -f CONFTEST ; then
24641 cf_cv_mixedcase=no
24642 else
24643 cf_cv_mixedcase=yes
24644 fi
24645 rm -f conftest CONFTEST
24646 fi
24647
24648 fi
24649 echo "$as_me:24649: result: $cf_cv_mixedcase" >&5
24650 echo "${ECHO_T}$cf_cv_mixedcase" >&6
24651 test "$cf_cv_mixedcase" = yes &&
24652 cat >>confdefs.h <<\EOF
24653 #define MIXEDCASE_FILENAMES 1
24654 EOF
24655
24656 for ac_prog in exctags ctags
24657 do
24658 # Extract the first word of "$ac_prog", so it can be a program name with args.
24659 set dummy $ac_prog; ac_word=$2
24660 echo "$as_me:24660: checking for $ac_word" >&5
24661 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24662 if test "${ac_cv_prog_CTAGS+set}" = set; then
24663 echo $ECHO_N "(cached) $ECHO_C" >&6
24664 else
24665 if test -n "$CTAGS"; then
24666 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
24667 else
24668 ac_save_IFS=$IFS; IFS=$ac_path_separator
24669 ac_dummy="$PATH"
24670 for ac_dir in $ac_dummy; do
24671 IFS=$ac_save_IFS
24672 test -z "$ac_dir" && ac_dir=.
24673 $as_executable_p "$ac_dir/$ac_word" || continue
24674 ac_cv_prog_CTAGS="$ac_prog"
24675 echo "$as_me:24675: found $ac_dir/$ac_word" >&5
24676 break
24677 done
24678
24679 fi
24680 fi
24681 CTAGS=$ac_cv_prog_CTAGS
24682 if test -n "$CTAGS"; then
24683 echo "$as_me:24683: result: $CTAGS" >&5
24684 echo "${ECHO_T}$CTAGS" >&6
24685 else
24686 echo "$as_me:24686: result: no" >&5
24687 echo "${ECHO_T}no" >&6
24688 fi
24689
24690 test -n "$CTAGS" && break
24691 done
24692
24693 for ac_prog in exetags etags
24694 do
24695 # Extract the first word of "$ac_prog", so it can be a program name with args.
24696 set dummy $ac_prog; ac_word=$2
24697 echo "$as_me:24697: checking for $ac_word" >&5
24698 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24699 if test "${ac_cv_prog_ETAGS+set}" = set; then
24700 echo $ECHO_N "(cached) $ECHO_C" >&6
24701 else
24702 if test -n "$ETAGS"; then
24703 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
24704 else
24705 ac_save_IFS=$IFS; IFS=$ac_path_separator
24706 ac_dummy="$PATH"
24707 for ac_dir in $ac_dummy; do
24708 IFS=$ac_save_IFS
24709 test -z "$ac_dir" && ac_dir=.
24710 $as_executable_p "$ac_dir/$ac_word" || continue
24711 ac_cv_prog_ETAGS="$ac_prog"
24712 echo "$as_me:24712: found $ac_dir/$ac_word" >&5
24713 break
24714 done
24715
24716 fi
24717 fi
24718 ETAGS=$ac_cv_prog_ETAGS
24719 if test -n "$ETAGS"; then
24720 echo "$as_me:24720: result: $ETAGS" >&5
24721 echo "${ECHO_T}$ETAGS" >&6
24722 else
24723 echo "$as_me:24723: result: no" >&5
24724 echo "${ECHO_T}no" >&6
24725 fi
24726
24727 test -n "$ETAGS" && break
24728 done
24729
24730 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
24731 set dummy ${CTAGS:-ctags}; ac_word=$2
24732 echo "$as_me:24732: checking for $ac_word" >&5
24733 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24734 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
24735 echo $ECHO_N "(cached) $ECHO_C" >&6
24736 else
24737 if test -n "$MAKE_LOWER_TAGS"; then
24738 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
24739 else
24740 ac_save_IFS=$IFS; IFS=$ac_path_separator
24741 ac_dummy="$PATH"
24742 for ac_dir in $ac_dummy; do
24743 IFS=$ac_save_IFS
24744 test -z "$ac_dir" && ac_dir=.
24745 $as_executable_p "$ac_dir/$ac_word" || continue
24746 ac_cv_prog_MAKE_LOWER_TAGS="yes"
24747 echo "$as_me:24747: found $ac_dir/$ac_word" >&5
24748 break
24749 done
24750
24751 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
24752 fi
24753 fi
24754 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
24755 if test -n "$MAKE_LOWER_TAGS"; then
24756 echo "$as_me:24756: result: $MAKE_LOWER_TAGS" >&5
24757 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
24758 else
24759 echo "$as_me:24759: result: no" >&5
24760 echo "${ECHO_T}no" >&6
24761 fi
24762
24763 if test "$cf_cv_mixedcase" = yes ; then
24764 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
24765 set dummy ${ETAGS:-etags}; ac_word=$2
24766 echo "$as_me:24766: checking for $ac_word" >&5
24767 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24768 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
24769 echo $ECHO_N "(cached) $ECHO_C" >&6
24770 else
24771 if test -n "$MAKE_UPPER_TAGS"; then
24772 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
24773 else
24774 ac_save_IFS=$IFS; IFS=$ac_path_separator
24775 ac_dummy="$PATH"
24776 for ac_dir in $ac_dummy; do
24777 IFS=$ac_save_IFS
24778 test -z "$ac_dir" && ac_dir=.
24779 $as_executable_p "$ac_dir/$ac_word" || continue
24780 ac_cv_prog_MAKE_UPPER_TAGS="yes"
24781 echo "$as_me:24781: found $ac_dir/$ac_word" >&5
24782 break
24783 done
24784
24785 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
24786 fi
24787 fi
24788 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
24789 if test -n "$MAKE_UPPER_TAGS"; then
24790 echo "$as_me:24790: result: $MAKE_UPPER_TAGS" >&5
24791 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
24792 else
24793 echo "$as_me:24793: result: no" >&5
24794 echo "${ECHO_T}no" >&6
24795 fi
24796
24797 else
24798 MAKE_UPPER_TAGS=no
24799 fi
24800
24801 if test "$MAKE_UPPER_TAGS" = yes ; then
24802 MAKE_UPPER_TAGS=
24803 else
24804 MAKE_UPPER_TAGS="#"
24805 fi
24806
24807 if test "$MAKE_LOWER_TAGS" = yes ; then
24808 MAKE_LOWER_TAGS=
24809 else
24810 MAKE_LOWER_TAGS="#"
24811 fi
24812
24813 LD_RPATH_OPT=
24814 if test "x$cf_cv_enable_rpath" != xno
24815 then
24816 echo "$as_me:24816: checking for an rpath option" >&5
24817 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
24818 case "$cf_cv_system_name" in
24819 (irix*)
24820 if test "$GCC" = yes; then
24821 LD_RPATH_OPT="-Wl,-rpath,"
24822 else
24823 LD_RPATH_OPT="-rpath "
24824 fi
24825 ;;
24826 (linux*|gnu*|k*bsd*-gnu|freebsd*)
24827 LD_RPATH_OPT="-Wl,-rpath,"
24828 ;;
24829 (openbsd[2-9].*|mirbsd*)
24830 LD_RPATH_OPT="-Wl,-rpath,"
24831 ;;
24832 (dragonfly*)
24833 LD_RPATH_OPT="-rpath "
24834 ;;
24835 (netbsd*)
24836 LD_RPATH_OPT="-Wl,-rpath,"
24837 ;;
24838 (osf*|mls+*)
24839 LD_RPATH_OPT="-rpath "
24840 ;;
24841 (solaris2*)
24842 LD_RPATH_OPT="-R"
24843 ;;
24844 (*)
24845 ;;
24846 esac
24847 echo "$as_me:24847: result: $LD_RPATH_OPT" >&5
24848 echo "${ECHO_T}$LD_RPATH_OPT" >&6
24849
24850 case "x$LD_RPATH_OPT" in
24851 (x-R*)
24852 echo "$as_me:24852: checking if we need a space after rpath option" >&5
24853 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
24854 cf_save_LIBS="$LIBS"
24855
24856 cf_add_libs="$LIBS"
24857 # reverse order
24858 cf_add_0lib=
24859 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24860 # filter duplicates
24861 for cf_add_1lib in $cf_add_0lib; do
24862 for cf_add_2lib in $cf_add_libs; do
24863 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24864 cf_add_1lib=
24865 break
24866 fi
24867 done
24868 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24869 done
24870 LIBS="$cf_add_libs"
24871
24872 cat >"conftest.$ac_ext" <<_ACEOF
24873 #line 24873 "configure"
24874 #include "confdefs.h"
24875
24876 int
24877 main (void)
24878 {
24879
24880 ;
24881 return 0;
24882 }
24883 _ACEOF
24884 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24885 if { (eval echo "$as_me:24885: \"$ac_link\"") >&5
24886 (eval $ac_link) 2>&5
24887 ac_status=$?
24888 echo "$as_me:24888: \$? = $ac_status" >&5
24889 (exit "$ac_status"); } &&
24890 { ac_try='test -s "conftest$ac_exeext"'
24891 { (eval echo "$as_me:24891: \"$ac_try\"") >&5
24892 (eval $ac_try) 2>&5
24893 ac_status=$?
24894 echo "$as_me:24894: \$? = $ac_status" >&5
24895 (exit "$ac_status"); }; }; then
24896 cf_rpath_space=no
24897 else
24898 echo "$as_me: failed program was:" >&5
24899 cat "conftest.$ac_ext" >&5
24900 cf_rpath_space=yes
24901 fi
24902 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24903 LIBS="$cf_save_LIBS"
24904 echo "$as_me:24904: result: $cf_rpath_space" >&5
24905 echo "${ECHO_T}$cf_rpath_space" >&6
24906 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
24907 ;;
24908 esac
24909 fi
24910
24911 echo "$as_me:24911: checking if rpath-hack should be disabled" >&5
24912 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
24913
24914 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
24915 if test "${enable_rpath_hack+set}" = set; then
24916 enableval="$enable_rpath_hack"
24917 test "$enableval" != no && enableval=yes
24918 if test "$enableval" != "yes" ; then
24919 enable_rpath_hack=no
24920 else
24921 enable_rpath_hack=yes
24922 fi
24923 else
24924 enableval=yes
24925 enable_rpath_hack=yes
24926
24927 fi;
24928 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
24929 echo "$as_me:24929: result: $cf_disable_rpath_hack" >&5
24930 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
24931
24932 if test "$enable_rpath_hack" = yes ; then
24933
24934 echo "$as_me:24934: checking for updated LDFLAGS" >&5
24935 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
24936 if test -n "$LD_RPATH_OPT" ; then
24937 echo "$as_me:24937: result: maybe" >&5
24938 echo "${ECHO_T}maybe" >&6
24939
24940 for ac_prog in ldd
24941 do
24942 # Extract the first word of "$ac_prog", so it can be a program name with args.
24943 set dummy $ac_prog; ac_word=$2
24944 echo "$as_me:24944: checking for $ac_word" >&5
24945 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24946 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
24947 echo $ECHO_N "(cached) $ECHO_C" >&6
24948 else
24949 if test -n "$cf_ldd_prog"; then
24950 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
24951 else
24952 ac_save_IFS=$IFS; IFS=$ac_path_separator
24953 ac_dummy="$PATH"
24954 for ac_dir in $ac_dummy; do
24955 IFS=$ac_save_IFS
24956 test -z "$ac_dir" && ac_dir=.
24957 $as_executable_p "$ac_dir/$ac_word" || continue
24958 ac_cv_prog_cf_ldd_prog="$ac_prog"
24959 echo "$as_me:24959: found $ac_dir/$ac_word" >&5
24960 break
24961 done
24962
24963 fi
24964 fi
24965 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
24966 if test -n "$cf_ldd_prog"; then
24967 echo "$as_me:24967: result: $cf_ldd_prog" >&5
24968 echo "${ECHO_T}$cf_ldd_prog" >&6
24969 else
24970 echo "$as_me:24970: result: no" >&5
24971 echo "${ECHO_T}no" >&6
24972 fi
24973
24974 test -n "$cf_ldd_prog" && break
24975 done
24976 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
24977
24978 cf_rpath_list="/usr/lib /lib"
24979 if test "$cf_ldd_prog" != no
24980 then
24981 cf_rpath_oops=
24982
24983 cat >"conftest.$ac_ext" <<_ACEOF
24984 #line 24984 "configure"
24985 #include "confdefs.h"
24986 #include <stdio.h>
24987 int
24988 main (void)
24989 {
24990 printf("Hello");
24991 ;
24992 return 0;
24993 }
24994 _ACEOF
24995 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24996 if { (eval echo "$as_me:24996: \"$ac_link\"") >&5
24997 (eval $ac_link) 2>&5
24998 ac_status=$?
24999 echo "$as_me:24999: \$? = $ac_status" >&5
25000 (exit "$ac_status"); } &&
25001 { ac_try='test -s "conftest$ac_exeext"'
25002 { (eval echo "$as_me:25002: \"$ac_try\"") >&5
25003 (eval $ac_try) 2>&5
25004 ac_status=$?
25005 echo "$as_me:25005: \$? = $ac_status" >&5
25006 (exit "$ac_status"); }; }; then
25007 cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
25008 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
25009 else
25010 echo "$as_me: failed program was:" >&5
25011 cat "conftest.$ac_ext" >&5
25012 fi
25013 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25014
25015 # If we passed the link-test, but get a "not found" on a given library,
25016 # this could be due to inept reconfiguration of gcc to make it only
25017 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
25018 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
25019 # /usr/local libraries.
25020 if test -n "$cf_rpath_oops"
25021 then
25022 for cf_rpath_src in $cf_rpath_oops
25023 do
25024 for cf_rpath_dir in \
25025 /usr/local \
25026 /usr/pkg \
25027 /opt/sfw
25028 do
25029 if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
25030 then
25031 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
25032
25033 echo "${as_me:-configure}:25033: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
25034
25035 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
25036 break
25037 fi
25038 done
25039 done
25040 fi
25041 fi
25042
25043 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
25044
25045 echo "${as_me:-configure}:25045: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
25046
25047 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
25048
25049 echo "${as_me:-configure}:25049: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
25050
25051 cf_rpath_dst=
25052 for cf_rpath_src in $LDFLAGS
25053 do
25054 case "$cf_rpath_src" in
25055 (-L*)
25056
25057 # check if this refers to a directory which we will ignore
25058 cf_rpath_skip=no
25059 if test -n "$cf_rpath_list"
25060 then
25061 for cf_rpath_item in $cf_rpath_list
25062 do
25063 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
25064 then
25065 cf_rpath_skip=yes
25066 break
25067 fi
25068 done
25069 fi
25070
25071 if test "$cf_rpath_skip" = no
25072 then
25073 # transform the option
25074 if test "$LD_RPATH_OPT" = "-R " ; then
25075 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
25076 else
25077 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
25078 fi
25079
25080 # if we have not already added this, add it now
25081 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
25082 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
25083 then
25084 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
25085
25086 echo "${as_me:-configure}:25086: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
25087
25088 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
25089 fi
25090 fi
25091 ;;
25092 esac
25093 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
25094 done
25095 LDFLAGS=$cf_rpath_dst
25096
25097 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
25098
25099 echo "${as_me:-configure}:25099: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
25100
25101 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
25102
25103 echo "${as_me:-configure}:25103: testing ...checking LIBS $LIBS ..." 1>&5
25104
25105 cf_rpath_dst=
25106 for cf_rpath_src in $LIBS
25107 do
25108 case "$cf_rpath_src" in
25109 (-L*)
25110
25111 # check if this refers to a directory which we will ignore
25112 cf_rpath_skip=no
25113 if test -n "$cf_rpath_list"
25114 then
25115 for cf_rpath_item in $cf_rpath_list
25116 do
25117 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
25118 then
25119 cf_rpath_skip=yes
25120 break
25121 fi
25122 done
25123 fi
25124
25125 if test "$cf_rpath_skip" = no
25126 then
25127 # transform the option
25128 if test "$LD_RPATH_OPT" = "-R " ; then
25129 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
25130 else
25131 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
25132 fi
25133
25134 # if we have not already added this, add it now
25135 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
25136 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
25137 then
25138 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
25139
25140 echo "${as_me:-configure}:25140: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
25141
25142 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
25143 fi
25144 fi
25145 ;;
25146 esac
25147 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
25148 done
25149 LIBS=$cf_rpath_dst
25150
25151 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
25152
25153 echo "${as_me:-configure}:25153: testing ...checked LIBS $LIBS ..." 1>&5
25154
25155 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
25156
25157 echo "${as_me:-configure}:25157: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
25158
25159 else
25160 echo "$as_me:25160: result: no" >&5
25161 echo "${ECHO_T}no" >&6
25162 fi
25163
25164 fi
25165
25166 # Force plink.sh to not trim pcre's libraries, which have the same symbol
25167 # names as the system regexp.
25168 if test "$with_pcre" != no
25169 then
25170 LIBS=`echo "$LIBS" | sed -e 's/-lpcre/-kpcre/g'`
25171 fi
25172
25173 ### output xtermcfg.h, etc
25174 ac_config_files="$ac_config_files Makefile df-install minstall:minstall.in run-tic.sh:run-tic.in"
25175
25176 cat >confcache <<\_ACEOF
25177 # This file is a shell script that caches the results of configure
25178 # tests run on this system so they can be shared between configure
25179 # scripts and configure runs, see configure's option --config-cache.
25180 # It is not useful on other systems. If it contains results you don't
25181 # want to keep, you may remove or edit it.
25182 #
25183 # config.status only pays attention to the cache file if you give it
25184 # the --recheck option to rerun configure.
25185 #
25186 # `ac_cv_env_foo' variables (set or unset) will be overriden when
25187 # loading this file, other *unset* `ac_cv_foo' will be assigned the
25188 # following values.
25189
25190 _ACEOF
25191
25192 # The following way of writing the cache mishandles newlines in values,
25193 # but we know of no workaround that is simple, portable, and efficient.
25194 # So, don't put newlines in cache variables' values.
25195 # Ultrix sh set writes to stderr and can't be redirected directly,
25196 # and sets the high bit in the cache file unless we assign to the vars.
25197 {
25198 (set) 2>&1 |
25199 case `(ac_space=' '; set | grep ac_space) 2>&1` in
25200 *ac_space=\ *)
25201 # `set' does not quote correctly, so add quotes (double-quote
25202 # substitution turns \\\\ into \\, and sed turns \\ into \).
25203 sed -n \
25204 "s/'/'\\\\''/g;
25205 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
25206 ;;
25207 *)
25208 # `set' quotes correctly as required by POSIX, so do not add quotes.
25209 sed -n \
25210 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
25211 ;;
25212 esac;
25213 } |
25214 sed '
25215 t clear
25216 : clear
25217 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25218 t end
25219 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25220 : end' >>confcache
25221 if cmp -s $cache_file confcache; then :; else
25222 if test -w $cache_file; then
25223 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
25224 cat confcache >$cache_file
25225 else
25226 echo "not updating unwritable cache $cache_file"
25227 fi
25228 fi
25229 rm -f confcache
25230
25231 test "x$prefix" = xNONE && prefix=$ac_default_prefix
25232 # Let make expand exec_prefix.
25233 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25234
25235 # VPATH may cause trouble with some makes, so we remove $(srcdir),
25236 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25237 # trailing colons and then remove the whole line if VPATH becomes empty
25238 # (actually we leave an empty line to preserve line numbers).
25239 if test "x$srcdir" = x.; then
25240 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25241 s/:*\$(srcdir):*/:/;
25242 s/:*\${srcdir}:*/:/;
25243 s/:*@srcdir@:*/:/;
25244 s/^\([^=]*=[ ]*\):*/\1/;
25245 s/:*$//;
25246 s/^[^=]*=[ ]*$//;
25247 }'
25248 fi
25249
25250 DEFS=-DHAVE_CONFIG_H
25251
25252 : "${CONFIG_STATUS=./config.status}"
25253 ac_clean_files_save=$ac_clean_files
25254 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25255 { echo "$as_me:25255: creating $CONFIG_STATUS" >&5
25256 echo "$as_me: creating $CONFIG_STATUS" >&6;}
25257 cat >"$CONFIG_STATUS" <<_ACEOF
25258 #! $SHELL
25259 # Generated automatically by configure.
25260 # Run this file to recreate the current configuration.
25261 # Compiler output produced by configure, useful for debugging
25262 # configure, is in config.log if it exists.
25263
25264 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
25265
25266 debug=false
25267 SHELL=\${CONFIG_SHELL-$SHELL}
25268 ac_cs_invocation="\$0 \$@"
25269
25270 CLICOLOR_FORCE= GREP_OPTIONS=
25271 unset CLICOLOR_FORCE GREP_OPTIONS
25272 _ACEOF
25273
25274 cat >>"$CONFIG_STATUS" <<\_ACEOF
25275 # Be Bourne compatible
25276 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25277 emulate sh
25278 NULLCMD=:
25279 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
25280 set -o posix
25281 fi
25282
25283 # Name of the executable.
25284 as_me=`echo "$0" |sed 's,.*[\\/],,'`
25285
25286 if expr a : '\(a\)' >/dev/null 2>&1; then
25287 as_expr="expr"
25288 else
25289 as_expr="false"
25290 fi
25291
25292 rm -f conf$$ conf$$.exe conf$$.file
25293 echo >conf$$.file
25294 if ln -s conf$$.file conf$$ 2>/dev/null; then
25295 # We could just check for DJGPP; but this test a) works b) is more generic
25296 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
25297 if test -f conf$$.exe; then
25298 # Don't use ln at all; we don't have any links
25299 as_ln_s='cp -p'
25300 else
25301 as_ln_s='ln -s'
25302 fi
25303 elif ln conf$$.file conf$$ 2>/dev/null; then
25304 as_ln_s='ln'
25305 else
25306 as_ln_s='cp -p'
25307 fi
25308 rm -f conf$$ conf$$.exe conf$$.file
25309
25310 as_executable_p="test -f"
25311
25312 # Support unset when possible.
25313 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
25314 as_unset="unset"
25315 else
25316 as_unset="false"
25317 fi
25318
25319 # NLS nuisances.
25320 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
25321 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
25322 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
25323 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
25324 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
25325 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
25326 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
25327 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
25328
25329 # IFS
25330 # We need space, tab and new line, in precisely that order.
25331 as_nl='
25332 '
25333 IFS=" $as_nl"
25334
25335 # CDPATH.
25336 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
25337
25338 exec 6>&1
25339
25340 _ACEOF
25341
25342 # Files that config.status was made for.
25343 if test -n "$ac_config_files"; then
25344 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
25345 fi
25346
25347 if test -n "$ac_config_headers"; then
25348 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
25349 fi
25350
25351 if test -n "$ac_config_links"; then
25352 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
25353 fi
25354
25355 if test -n "$ac_config_commands"; then
25356 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
25357 fi
25358
25359 cat >>"$CONFIG_STATUS" <<\EOF
25360
25361 ac_cs_usage="\
25362 \`$as_me' instantiates files from templates according to the
25363 current configuration.
25364
25365 Usage: $0 [OPTIONS] [FILE]...
25366
25367 -h, --help print this help, then exit
25368 -V, --version print version number, then exit
25369 -d, --debug don't remove temporary files
25370 --recheck update $as_me by reconfiguring in the same conditions
25371 --file=FILE[:TEMPLATE]
25372 instantiate the configuration file FILE
25373 --header=FILE[:TEMPLATE]
25374 instantiate the configuration header FILE
25375
25376 Configuration files:
25377 $config_files
25378
25379 Configuration headers:
25380 $config_headers
25381
25382 Report bugs to <dickey@invisible-island.net>."
25383 EOF
25384
25385 cat >>"$CONFIG_STATUS" <<EOF
25386 ac_cs_version="\\
25387 config.status
25388 configured by $0, generated by GNU Autoconf 2.52.20230114,
25389 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
25390
25391 Copyright 2003-2022,2023 Thomas E. Dickey
25392 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
25393 Free Software Foundation, Inc.
25394 This config.status script is free software; the Free Software Foundation
25395 gives unlimited permission to copy, distribute and modify it."
25396 srcdir="$srcdir"
25397 INSTALL="$INSTALL"
25398 EOF
25399
25400 cat >>"$CONFIG_STATUS" <<\EOF
25401 # If no file are specified by the user, then we need to provide default
25402 # value. By we need to know if files were specified by the user.
25403 ac_need_defaults=:
25404 while test $# != 0
25405 do
25406 case $1 in
25407 --*=*)
25408 ac_option=`expr "x$1" : 'x\([^=]*\)='`
25409 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
25410 shift
25411 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
25412 shift
25413 ;;
25414 -*);;
25415 *) # This is not an option, so the user has probably given explicit
25416 # arguments.
25417 ac_need_defaults=false;;
25418 esac
25419
25420 case $1 in
25421 # Handling of the options.
25422 EOF
25423 cat >>"$CONFIG_STATUS" <<EOF
25424 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25425 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
25426 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
25427 EOF
25428 cat >>"$CONFIG_STATUS" <<\EOF
25429 --version | --vers* | -V )
25430 echo "$ac_cs_version"; exit 0 ;;
25431 --he | --h)
25432 # Conflict between --help and --header
25433 { { echo "$as_me:25433: error: ambiguous option: $1
25434 Try \`$0 --help' for more information." >&5
25435 echo "$as_me: error: ambiguous option: $1
25436 Try \`$0 --help' for more information." >&2;}
25437 { (exit 1); exit 1; }; };;
25438 --help | --hel | -h )
25439 echo "$ac_cs_usage"; exit 0 ;;
25440 --debug | --d* | -d )
25441 debug=: ;;
25442 --file | --fil | --fi | --f )
25443 shift
25444 CONFIG_FILES="$CONFIG_FILES $1"
25445 ac_need_defaults=false;;
25446 --header | --heade | --head | --hea )
25447 shift
25448 CONFIG_HEADERS="$CONFIG_HEADERS $1"
25449 ac_need_defaults=false;;
25450
25451 # This is an error.
25452 -*) { { echo "$as_me:25452: error: unrecognized option: $1
25453 Try \`$0 --help' for more information." >&5
25454 echo "$as_me: error: unrecognized option: $1
25455 Try \`$0 --help' for more information." >&2;}
25456 { (exit 1); exit 1; }; } ;;
25457
25458 *) ac_config_targets="$ac_config_targets $1" ;;
25459
25460 esac
25461 shift
25462 done
25463
25464 exec 5>>config.log
25465 cat >&5 << _ACEOF
25466
25467 ## ----------------------- ##
25468 ## Running config.status. ##
25469 ## ----------------------- ##
25470
25471 This file was extended by $as_me 2.52.20230114, executed with
25472 CONFIG_FILES = $CONFIG_FILES
25473 CONFIG_HEADERS = $CONFIG_HEADERS
25474 CONFIG_LINKS = $CONFIG_LINKS
25475 CONFIG_COMMANDS = $CONFIG_COMMANDS
25476 > "$ac_cs_invocation"
25477 on `(hostname || uname -n) 2>/dev/null | sed 1q`
25478
25479 _ACEOF
25480 EOF
25481
25482 cat >>"$CONFIG_STATUS" <<\EOF
25483 for ac_config_target in $ac_config_targets
25484 do
25485 case "$ac_config_target" in
25486 # Handling of arguments.
25487 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
25488 "df-install" ) CONFIG_FILES="$CONFIG_FILES df-install" ;;
25489 "minstall" ) CONFIG_FILES="$CONFIG_FILES minstall:minstall.in" ;;
25490 "run-tic.sh" ) CONFIG_FILES="$CONFIG_FILES run-tic.sh:run-tic.in" ;;
25491 "xtermcfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS xtermcfg.h:xtermcfg.hin" ;;
25492 *) { { echo "$as_me:25492: error: invalid argument: $ac_config_target" >&5
25493 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25494 { (exit 1); exit 1; }; };;
25495 esac
25496 done
25497
25498 # If the user did not use the arguments to specify the items to instantiate,
25499 # then the envvar interface is used. Set only those that are not.
25500 # We use the long form for the default assignment because of an extremely
25501 # bizarre bug on SunOS 4.1.3.
25502 if "$ac_need_defaults"; then
25503 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25504 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25505 fi
25506
25507 # Create a temporary directory, and hook for its removal unless debugging.
25508 $debug ||
25509 {
25510 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
25511 trap '{ (exit 1); exit 1; }' 1 2 13 15
25512 }
25513
25514 # Create a (secure) tmp directory for tmp files.
25515 : "${TMPDIR=/tmp}"
25516 {
25517 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
25518 test -n "$tmp" && test -d "$tmp"
25519 } ||
25520 {
25521 tmp=$TMPDIR/cs$$-$RANDOM
25522 (umask 077 && mkdir "$tmp")
25523 } ||
25524 {
25525 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
25526 { (exit 1); exit 1; }
25527 }
25528
25529 EOF
25530
25531 cat >>"$CONFIG_STATUS" <<EOF
25532
25533 #
25534 # CONFIG_FILES section.
25535 #
25536
25537 # No need to generate the scripts if there are no CONFIG_FILES.
25538 # This happens for instance when ./config.status config.h
25539 if test -n "\$CONFIG_FILES"; then
25540 # Protect against being on the right side of a sed subst in config.status.
25541 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
25542 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
25543 s,@SHELL@,$SHELL,;t t
25544 s,@exec_prefix@,$exec_prefix,;t t
25545 s,@prefix@,$prefix,;t t
25546 s,@program_transform_name@,$program_transform_name,;t t
25547 s,@bindir@,$bindir,;t t
25548 s,@sbindir@,$sbindir,;t t
25549 s,@libexecdir@,$libexecdir,;t t
25550 s,@datarootdir@,$datarootdir,;t t
25551 s,@datadir@,$datadir,;t t
25552 s,@sysconfdir@,$sysconfdir,;t t
25553 s,@sharedstatedir@,$sharedstatedir,;t t
25554 s,@localstatedir@,$localstatedir,;t t
25555 s,@runstatedir@,$runstatedir,;t t
25556 s,@libdir@,$libdir,;t t
25557 s,@includedir@,$includedir,;t t
25558 s,@oldincludedir@,$oldincludedir,;t t
25559 s,@infodir@,$infodir,;t t
25560 s,@mandir@,$mandir,;t t
25561 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
25562 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
25563 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
25564 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
25565 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
25566 s,@build_alias@,$build_alias,;t t
25567 s,@host_alias@,$host_alias,;t t
25568 s,@target_alias@,$target_alias,;t t
25569 s,@ECHO_C@,$ECHO_C,;t t
25570 s,@ECHO_N@,$ECHO_N,;t t
25571 s,@ECHO_T@,$ECHO_T,;t t
25572 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
25573 s,@DEFS@,$DEFS,;t t
25574 s,@LIBS@,$LIBS,;t t
25575 s,@build@,$build,;t t
25576 s,@build_cpu@,$build_cpu,;t t
25577 s,@build_vendor@,$build_vendor,;t t
25578 s,@build_os@,$build_os,;t t
25579 s,@host@,$host,;t t
25580 s,@host_cpu@,$host_cpu,;t t
25581 s,@host_vendor@,$host_vendor,;t t
25582 s,@host_os@,$host_os,;t t
25583 s,@CC@,$CC,;t t
25584 s,@CFLAGS@,$CFLAGS,;t t
25585 s,@LDFLAGS@,$LDFLAGS,;t t
25586 s,@CPPFLAGS@,$CPPFLAGS,;t t
25587 s,@ac_ct_CC@,$ac_ct_CC,;t t
25588 s,@EXEEXT@,$EXEEXT,;t t
25589 s,@OBJEXT@,$OBJEXT,;t t
25590 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
25591 s,@CPP@,$CPP,;t t
25592 s,@GREP@,$GREP,;t t
25593 s,@EGREP@,$EGREP,;t t
25594 s,@AWK@,$AWK,;t t
25595 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
25596 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
25597 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
25598 s,@LN_S@,$LN_S,;t t
25599 s,@LINT@,$LINT,;t t
25600 s,@LINT_OPTS@,$LINT_OPTS,;t t
25601 s,@LINT_LIBS@,$LINT_LIBS,;t t
25602 s,@APP_CLASS@,$APP_CLASS,;t t
25603 s,@APPSDIR@,$APPSDIR,;t t
25604 s,@no_appsdir@,$no_appsdir,;t t
25605 s,@ICON_NAME@,$ICON_NAME,;t t
25606 s,@ICON_SYMLINK@,$ICON_SYMLINK,;t t
25607 s,@PIXMAPDIR@,$PIXMAPDIR,;t t
25608 s,@no_pixmapdir@,$no_pixmapdir,;t t
25609 s,@ICONDIR@,$ICONDIR,;t t
25610 s,@no_icondir@,$no_icondir,;t t
25611 s,@ICON_FORMAT@,$ICON_FORMAT,;t t
25612 s,@ICON_THEME@,$ICON_THEME,;t t
25613 s,@ICON_LIST@,$ICON_LIST,;t t
25614 s,@desktop_utils@,$desktop_utils,;t t
25615 s,@DESKTOP_FLAGS@,$DESKTOP_FLAGS,;t t
25616 s,@DESKTOP_CATEGORY@,$DESKTOP_CATEGORY,;t t
25617 s,@XTERM_PATH@,$XTERM_PATH,;t t
25618 s,@XTERM_SYMLINK@,$XTERM_SYMLINK,;t t
25619 s,@SINSTALL_OPTS@,$SINSTALL_OPTS,;t t
25620 s,@X_CFLAGS@,$X_CFLAGS,;t t
25621 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
25622 s,@X_LIBS@,$X_LIBS,;t t
25623 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
25624 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
25625 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
25626 s,@ICON_SUFFIX@,$ICON_SUFFIX,;t t
25627 s,@IMAKE@,$IMAKE,;t t
25628 s,@IMAKE_CFLAGS@,$IMAKE_CFLAGS,;t t
25629 s,@IMAKE_LOADFLAGS@,$IMAKE_LOADFLAGS,;t t
25630 s,@GROFF_PATH@,$GROFF_PATH,;t t
25631 s,@NROFF_PATH@,$NROFF_PATH,;t t
25632 s,@TBL_PATH@,$TBL_PATH,;t t
25633 s,@GROFF_NOTE@,$GROFF_NOTE,;t t
25634 s,@NROFF_NOTE@,$NROFF_NOTE,;t t
25635 s,@FGREP@,$FGREP,;t t
25636 s,@cf_man2html@,$cf_man2html,;t t
25637 s,@MAN2HTML_NOTE@,$MAN2HTML_NOTE,;t t
25638 s,@MAN2HTML_PATH@,$MAN2HTML_PATH,;t t
25639 s,@MAN2HTML_TEMP@,$MAN2HTML_TEMP,;t t
25640 s,@default_termid@,$default_termid,;t t
25641 s,@default_TERM@,$default_TERM,;t t
25642 s,@backarrow_is_bs@,$backarrow_is_bs,;t t
25643 s,@backarrow_is_erase@,$backarrow_is_erase,;t t
25644 s,@delete_is_del@,$delete_is_del,;t t
25645 s,@initial_erase@,$initial_erase,;t t
25646 s,@alt_sends_esc@,$alt_sends_esc,;t t
25647 s,@meta_sends_esc@,$meta_sends_esc,;t t
25648 s,@cf_tic_prog@,$cf_tic_prog,;t t
25649 s,@no_ticprog@,$no_ticprog,;t t
25650 s,@TERMINFO_DIR@,$TERMINFO_DIR,;t t
25651 s,@SET_TERMINFO@,$SET_TERMINFO,;t t
25652 s,@double_buffer@,$double_buffer,;t t
25653 s,@FREETYPE_CONFIG@,$FREETYPE_CONFIG,;t t
25654 s,@FREETYPE_OLD_CONFIG@,$FREETYPE_OLD_CONFIG,;t t
25655 s,@FREETYPE_XFT_CONFIG@,$FREETYPE_XFT_CONFIG,;t t
25656 s,@HAVE_TYPE_FCCHAR32@,$HAVE_TYPE_FCCHAR32,;t t
25657 s,@HAVE_TYPE_XFTCHARSPEC@,$HAVE_TYPE_XFTCHARSPEC,;t t
25658 s,@LUIT@,$LUIT,;t t
25659 s,@ECHO_LT@,$ECHO_LT,;t t
25660 s,@ECHO_LD@,$ECHO_LD,;t t
25661 s,@RULE_CC@,$RULE_CC,;t t
25662 s,@SHOW_CC@,$SHOW_CC,;t t
25663 s,@ECHO_CC@,$ECHO_CC,;t t
25664 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
25665 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
25666 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
25667 s,@CHARPROC_DEPS@,$CHARPROC_DEPS,;t t
25668 s,@EXTRAHDRS@,$EXTRAHDRS,;t t
25669 s,@EXTRASRCS@,$EXTRASRCS,;t t
25670 s,@EXTRAOBJS@,$EXTRAOBJS,;t t
25671 s,@MAY_SETUID@,$MAY_SETUID,;t t
25672 s,@NOT_SETUID@,$NOT_SETUID,;t t
25673 s,@CTAGS@,$CTAGS,;t t
25674 s,@ETAGS@,$ETAGS,;t t
25675 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
25676 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
25677 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
25678 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
25679 CEOF
25680
25681 EOF
25682
25683 cat >>"$CONFIG_STATUS" <<\EOF
25684 # Split the substitutions into bite-sized pieces for seds with
25685 # small command number limits, like on Digital OSF/1 and HP-UX.
25686 ac_max_sed_lines=48
25687 ac_sed_frag=1 # Number of current file.
25688 ac_beg=1 # First line for current file.
25689 ac_end=$ac_max_sed_lines # Line after last line for current file.
25690 ac_more_lines=:
25691 ac_sed_cmds=
25692 while "$ac_more_lines"; do
25693 if test "$ac_beg" -gt 1; then
25694 sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
25695 else
25696 sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
25697 fi
25698 if test ! -s "$tmp"/subs.frag; then
25699 ac_more_lines=false
25700 else
25701 # The purpose of the label and of the branching condition is to
25702 # speed up the sed processing (if there are no `@' at all, there
25703 # is no need to browse any of the substitutions).
25704 # These are the two extra sed commands mentioned above.
25705 (echo ':t
25706 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
25707 # It is possible to make a multiline substitution using escaped newlines.
25708 # Ensure that we do not split the substitution between script fragments.
25709 ac_BEG=$ac_end
25710 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
25711 sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
25712 if test -s "$tmp"/subs.next; then
25713 grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
25714 if test ! -s "$tmp"/subs.edit; then
25715 grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
25716 if test ! -s "$tmp"/subs.edit; then
25717 if test "$ac_beg" -gt 1; then
25718 ac_end=`expr "$ac_end" - 1`
25719 continue
25720 fi
25721 fi
25722 fi
25723 fi
25724
25725 if test -z "$ac_sed_cmds"; then
25726 ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
25727 else
25728 ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
25729 fi
25730 ac_sed_frag=`expr "$ac_sed_frag" + 1`
25731 ac_beg=$ac_end
25732 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
25733 fi
25734 done
25735 if test -z "$ac_sed_cmds"; then
25736 ac_sed_cmds="cat"
25737 fi
25738 fi # test -n "$CONFIG_FILES"
25739
25740 EOF
25741 cat >>"$CONFIG_STATUS" <<\EOF
25742 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
25743 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25744 case "$ac_file" in
25745 - | *:- | *:-:* ) # input from stdin
25746 cat >"$tmp"/stdin
25747 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25748 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25749 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25750 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25751 * ) ac_file_in=$ac_file.in ;;
25752 esac
25753
25754 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
25755 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25756 X"$ac_file" : 'X\(//\)[^/]' \| \
25757 X"$ac_file" : 'X\(//\)$' \| \
25758 X"$ac_file" : 'X\(/\)' \| \
25759 . : '\(.\)' 2>/dev/null ||
25760 echo X"$ac_file" |
25761 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25762 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25763 /^X\(\/\/\)$/{ s//\1/; q; }
25764 /^X\(\/\).*/{ s//\1/; q; }
25765 s/.*/./; q'`
25766 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25767 { case "$ac_dir" in
25768 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25769 *) as_incr_dir=.;;
25770 esac
25771 as_dummy="$ac_dir"
25772 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25773 case $as_mkdir_dir in
25774 # Skip DOS drivespec
25775 ?:) as_incr_dir=$as_mkdir_dir ;;
25776 *)
25777 as_incr_dir=$as_incr_dir/$as_mkdir_dir
25778 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25779 ;;
25780 esac
25781 done; }
25782
25783 ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
25784 # A "../" for each directory in $ac_dir_suffix.
25785 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
25786 else
25787 ac_dir_suffix= ac_dots=
25788 fi
25789
25790 case "$srcdir" in
25791 .) ac_srcdir=.
25792 if test -z "$ac_dots"; then
25793 ac_top_srcdir=.
25794 else
25795 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
25796 fi ;;
25797 [\\/]* | ?:[\\/]* )
25798 ac_srcdir="$srcdir$ac_dir_suffix";
25799 ac_top_srcdir="$srcdir" ;;
25800 *) # Relative path.
25801 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
25802 ac_top_srcdir="$ac_dots$srcdir" ;;
25803 esac
25804
25805 case $INSTALL in
25806 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25807 *) ac_INSTALL=$ac_dots$INSTALL ;;
25808 esac
25809
25810 if test x"$ac_file" != x-; then
25811 { echo "$as_me:25811: creating $ac_file" >&5
25812 echo "$as_me: creating $ac_file" >&6;}
25813 rm -f "$ac_file"
25814 fi
25815 # Let's still pretend it is `configure' which instantiates (i.e., don't
25816 # use $as_me), people would be surprised to read:
25817 # /* config.h. Generated automatically by config.status. */
25818 configure_input="Generated automatically from `echo $ac_file_in |
25819 sed 's,.*/,,'` by configure."
25820
25821 # First look for the input files in the build tree, otherwise in the
25822 # src tree.
25823 ac_file_inputs=`IFS=:
25824 for f in $ac_file_in; do
25825 case $f in
25826 -) echo "$tmp"/stdin ;;
25827 [\\/$]*)
25828 # Absolute (can't be DOS-style, as IFS=:)
25829 test -f "$f" || { { echo "$as_me:25829: error: cannot find input file: $f" >&5
25830 echo "$as_me: error: cannot find input file: $f" >&2;}
25831 { (exit 1); exit 1; }; }
25832 echo "$f";;
25833 *) # Relative
25834 if test -f "$f"; then
25835 # Build tree
25836 echo "$f"
25837 elif test -f "$srcdir/$f"; then
25838 # Source tree
25839 echo "$srcdir/$f"
25840 else
25841 # /dev/null tree
25842 { { echo "$as_me:25842: error: cannot find input file: $f" >&5
25843 echo "$as_me: error: cannot find input file: $f" >&2;}
25844 { (exit 1); exit 1; }; }
25845 fi;;
25846 esac
25847 done` || { (exit 1); exit 1; }
25848 EOF
25849 cat >>"$CONFIG_STATUS" <<\EOF
25850 ac_warn_datarootdir=no
25851 if test x"$ac_file" != x-; then
25852 for ac_item in $ac_file_inputs
25853 do
25854 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
25855 if test -n "$ac_seen"; then
25856 ac_used=`grep '@datarootdir@' "$ac_item"`
25857 if test -z "$ac_used"; then
25858 { echo "$as_me:25858: WARNING: datarootdir was used implicitly but not set:
25859 $ac_seen" >&5
25860 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
25861 $ac_seen" >&2;}
25862 ac_warn_datarootdir=yes
25863 fi
25864 fi
25865 ac_seen=`grep '${datarootdir}' "$ac_item"`
25866 if test -n "$ac_seen"; then
25867 { echo "$as_me:25867: WARNING: datarootdir was used explicitly but not set:
25868 $ac_seen" >&5
25869 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
25870 $ac_seen" >&2;}
25871 ac_warn_datarootdir=yes
25872 fi
25873 done
25874 fi
25875
25876 if test "x$ac_warn_datarootdir" = xyes; then
25877 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
25878 fi
25879
25880 EOF
25881 cat >>"$CONFIG_STATUS" <<EOF
25882 sed "$ac_vpsub
25883 $extrasub
25884 EOF
25885 cat >>"$CONFIG_STATUS" <<\EOF
25886 :t
25887 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25888 s,@configure_input@,$configure_input,;t t
25889 s,@srcdir@,$ac_srcdir,;t t
25890 s,@top_srcdir@,$ac_top_srcdir,;t t
25891 s,@INSTALL@,$ac_INSTALL,;t t
25892 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
25893 rm -f "$tmp"/stdin
25894 EOF
25895 : "${FGREP:=grep -F}"
25896 : "${EGREP:=grep -E}"
25897 cat >>"$CONFIG_STATUS" <<EOF
25898 : "\${FGREP:=$FGREP}"
25899 : "\${EGREP:=$EGREP}"
25900 EOF
25901 cat >>"$CONFIG_STATUS" <<\EOF
25902 if test x"$ac_file" != x-; then
25903 cp "$tmp/out" "$ac_file"
25904
25905 for ac_name in prefix exec_prefix datarootdir
25906 do
25907 ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
25908 if test -n "$ac_seen"; then
25909 ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"`
25910 if test -z "$ac_init"; then
25911 ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
25912 { echo "$as_me:25912: WARNING: Variable $ac_name is used but was not set:
25913 $ac_seen" >&5
25914 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
25915 $ac_seen" >&2;}
25916 fi
25917 fi
25918 done
25919 $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
25920 $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
25921 if test -s "$tmp"/out; then
25922 ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
25923 { echo "$as_me:25923: WARNING: Some variables may not be substituted:
25924 $ac_seen" >&5
25925 echo "$as_me: WARNING: Some variables may not be substituted:
25926 $ac_seen" >&2;}
25927 fi
25928 else
25929 cat "$tmp"/out
25930 fi
25931 rm -f "$tmp"/out
25932
25933 done
25934 EOF
25935 cat >>"$CONFIG_STATUS" <<\EOF
25936
25937 #
25938 # CONFIG_HEADER section.
25939 #
25940
25941 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25942 # NAME is the cpp macro being defined and VALUE is the value it is being given.
25943 #
25944 # ac_d sets the value in "#define NAME VALUE" lines.
25945 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
25946 ac_dB='[ ].*$,\1#\2'
25947 ac_dC=' '
25948 ac_dD=',;t'
25949 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25950 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
25951 ac_iB='\([ ]\),\1#\2define\3'
25952 ac_iC=' '
25953 ac_iD='\4,;t'
25954 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25955 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
25956 ac_uB='$,\1#\2define\3'
25957 ac_uC=' '
25958 ac_uD=',;t'
25959
25960 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
25961 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25962 case "$ac_file" in
25963 - | *:- | *:-:* ) # input from stdin
25964 cat >"$tmp"/stdin
25965 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25966 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25967 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25968 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25969 * ) ac_file_in=$ac_file.in ;;
25970 esac
25971
25972 test x"$ac_file" != x- && { echo "$as_me:25972: creating $ac_file" >&5
25973 echo "$as_me: creating $ac_file" >&6;}
25974
25975 # First look for the input files in the build tree, otherwise in the
25976 # src tree.
25977 ac_file_inputs=`IFS=:
25978 for f in $ac_file_in; do
25979 case $f in
25980 -) echo "$tmp"/stdin ;;
25981 [\\/$]*)
25982 # Absolute (can't be DOS-style, as IFS=:)
25983 test -f "$f" || { { echo "$as_me:25983: error: cannot find input file: $f" >&5
25984 echo "$as_me: error: cannot find input file: $f" >&2;}
25985 { (exit 1); exit 1; }; }
25986 echo $f;;
25987 *) # Relative
25988 if test -f "$f"; then
25989 # Build tree
25990 echo $f
25991 elif test -f "$srcdir/$f"; then
25992 # Source tree
25993 echo "$srcdir/$f"
25994 else
25995 # /dev/null tree
25996 { { echo "$as_me:25996: error: cannot find input file: $f" >&5
25997 echo "$as_me: error: cannot find input file: $f" >&2;}
25998 { (exit 1); exit 1; }; }
25999 fi;;
26000 esac
26001 done` || { (exit 1); exit 1; }
26002 # Remove the trailing spaces.
26003 sed 's/[ ]*$//' $ac_file_inputs >"$tmp"/in
26004
26005 EOF
26006
26007 # Transform confdefs.h into two sed scripts, `conftest.defines' and
26008 # `conftest.undefs', that substitutes the proper values into
26009 # config.h.in to produce config.h. The first handles `#define'
26010 # templates, and the second `#undef' templates.
26011 # And first: Protect against being on the right side of a sed subst in
26012 # config.status. Protect against being in an unquoted here document
26013 # in config.status.
26014 rm -f conftest.defines conftest.undefs
26015 # Using a here document instead of a string reduces the quoting nightmare.
26016 # Putting comments in sed scripts is not portable.
26017 #
26018 # `end' is used to avoid that the second main sed command (meant for
26019 # 0-ary CPP macros) applies to n-ary macro definitions.
26020 # See the Autoconf documentation for `clear'.
26021 cat >confdef2sed.sed <<\EOF
26022 s/[\\&,]/\\&/g
26023 s,[\\$`],\\&,g
26024 t clear
26025 : clear
26026 s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
26027 t end
26028 s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
26029 : end
26030 EOF
26031 # If some macros were called several times there might be several times
26032 # the same #defines, which is useless. Nevertheless, we may not want to
26033 # sort them, since we want the *last* AC-DEFINE to be honored.
26034 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
26035 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
26036 sed 's/ac_d/ac_i/g' conftest.defines >>conftest.undefs
26037 rm -f confdef2sed.sed
26038
26039 # This sed command replaces #undef with comments. This is necessary, for
26040 # example, in the case of _POSIX_SOURCE, which is predefined and required
26041 # on some systems where configure will not decide to define it.
26042 cat >>conftest.undefs <<\EOF
26043 s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
26044 EOF
26045
26046 # Break up conftest.defines because some shells have a limit on the size
26047 # of here documents, and old seds have small limits too (100 cmds).
26048 echo ' # Handle all the #define templates only if necessary.' >>"$CONFIG_STATUS"
26049 echo ' if ${EGREP-grep -E} "^[ ]*#[ ]*define" "$tmp"/in >/dev/null; then' >>"$CONFIG_STATUS"
26050 echo ' # If there are no defines, we may have an empty if/fi' >>"$CONFIG_STATUS"
26051 echo ' :' >>"$CONFIG_STATUS"
26052 rm -f conftest.tail
26053 while grep . conftest.defines >/dev/null
26054 do
26055 # Write a limited-size here document to "$tmp"/defines.sed.
26056 echo ' cat >"$tmp"/defines.sed <<CEOF' >>"$CONFIG_STATUS"
26057 # Speed up: don't consider the non `#define' lines.
26058 echo '/^[ ]*#[ ]*define/!b' >>"$CONFIG_STATUS"
26059 # Work around the forget-to-reset-the-flag bug.
26060 echo 't clr' >>"$CONFIG_STATUS"
26061 echo ': clr' >>"$CONFIG_STATUS"
26062 sed "${ac_max_here_lines}q" conftest.defines >>"$CONFIG_STATUS"
26063 echo 'CEOF
26064 sed -f "$tmp"/defines.sed "$tmp"/in >"$tmp"/out
26065 rm -f "$tmp"/in
26066 mv "$tmp"/out "$tmp"/in
26067 ' >>"$CONFIG_STATUS"
26068 sed "1,${ac_max_here_lines}d" conftest.defines >conftest.tail
26069 rm -f conftest.defines
26070 mv conftest.tail conftest.defines
26071 done
26072 rm -f conftest.defines
26073 echo ' fi # grep' >>"$CONFIG_STATUS"
26074 echo >>"$CONFIG_STATUS"
26075
26076 # Break up conftest.undefs because some shells have a limit on the size
26077 # of here documents, and old seds have small limits too (100 cmds).
26078 echo ' # Handle all the #undef templates' >>"$CONFIG_STATUS"
26079 rm -f conftest.tail
26080 while grep . conftest.undefs >/dev/null
26081 do
26082 # Write a limited-size here document to "$tmp"/undefs.sed.
26083 echo ' cat >"$tmp"/undefs.sed <<CEOF' >>"$CONFIG_STATUS"
26084 # Speed up: don't consider the non `#undef'
26085 echo '/^[ ]*#[ ]*undef/!b' >>"$CONFIG_STATUS"
26086 # Work around the forget-to-reset-the-flag bug.
26087 echo 't clr' >>"$CONFIG_STATUS"
26088 echo ': clr' >>"$CONFIG_STATUS"
26089 sed "${ac_max_here_lines}q" conftest.undefs >>"$CONFIG_STATUS"
26090 echo 'CEOF
26091 sed -f "$tmp"/undefs.sed "$tmp"/in >"$tmp"/out
26092 rm -f "$tmp"/in
26093 mv "$tmp"/out "$tmp"/in
26094 ' >>"$CONFIG_STATUS"
26095 sed "1,${ac_max_here_lines}d" conftest.undefs >conftest.tail
26096 rm -f conftest.undefs
26097 mv conftest.tail conftest.undefs
26098 done
26099 rm -f conftest.undefs
26100
26101 cat >>"$CONFIG_STATUS" <<\EOF
26102 # Let's still pretend it is `configure' which instantiates (i.e., don't
26103 # use $as_me), people would be surprised to read:
26104 # /* config.h. Generated automatically by config.status. */
26105 if test x"$ac_file" = x-; then
26106 echo "/* Generated automatically by configure. */" >"$tmp"/config.h
26107 else
26108 echo "/* $ac_file. Generated automatically by configure. */" >"$tmp"/config.h
26109 fi
26110 cat "$tmp"/in >>"$tmp"/config.h
26111 rm -f "$tmp"/in
26112 if test x"$ac_file" != x-; then
26113 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
26114 { echo "$as_me:26114: $ac_file is unchanged" >&5
26115 echo "$as_me: $ac_file is unchanged" >&6;}
26116 else
26117 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26118 X"$ac_file" : 'X\(//\)[^/]' \| \
26119 X"$ac_file" : 'X\(//\)$' \| \
26120 X"$ac_file" : 'X\(/\)' \| \
26121 . : '\(.\)' 2>/dev/null ||
26122 echo X"$ac_file" |
26123 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
26124 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
26125 /^X\(\/\/\)$/{ s//\1/; q; }
26126 /^X\(\/\).*/{ s//\1/; q; }
26127 s/.*/./; q'`
26128 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
26129 { case "$ac_dir" in
26130 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
26131 *) as_incr_dir=.;;
26132 esac
26133 as_dummy="$ac_dir"
26134 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
26135 case $as_mkdir_dir in
26136 # Skip DOS drivespec
26137 ?:) as_incr_dir=$as_mkdir_dir ;;
26138 *)
26139 as_incr_dir=$as_incr_dir/$as_mkdir_dir
26140 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
26141 ;;
26142 esac
26143 done; }
26144
26145 fi
26146 rm -f "$ac_file"
26147 mv "$tmp/config.h" "$ac_file"
26148 fi
26149 else
26150 cat "$tmp"/config.h
26151 rm -f "$tmp"/config.h
26152 fi
26153 done
26154 EOF
26155
26156 cat >>"$CONFIG_STATUS" <<\EOF
26157
26158 { (exit 0); exit 0; }
26159 EOF
26160 chmod +x "$CONFIG_STATUS"
26161 ac_clean_files=$ac_clean_files_save
26162
26163 # configure is writing to config.log, and then calls config.status.
26164 # config.status does its own redirection, appending to config.log.
26165 # Unfortunately, on DOS this fails, as config.log is still kept open
26166 # by configure, so config.status won't be able to write to it; its
26167 # output is simply discarded. So we exec the FD to /dev/null,
26168 # effectively closing config.log, so it can be properly (re)opened and
26169 # appended to by config.status. When coming back to configure, we
26170 # need to make the FD available again.
26171 if test "$no_create" != yes; then
26172 ac_cs_success=:
26173 exec 5>/dev/null
26174 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
26175 exec 5>>config.log
26176 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26177 # would make configure fail if this is the last instruction.
26178 "$ac_cs_success" || { (exit 1); exit 1; }
26179 fi
26180
26181