(x_real_positions): Handle failure in XQueryTree.
[bpt/emacs.git] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.
4 #
5 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
6 # Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Avoid depending upon Character Ranges.
11 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14 as_cr_digits='0123456789'
15 as_cr_alnum=$as_cr_Letters$as_cr_digits
16
17 # Sed expression to map a string onto a valid variable name.
18 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19
20 # Sed expression to map a string onto a valid CPP name.
21 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
22
23 # Be Bourne compatible
24 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25 emulate sh
26 NULLCMD=:
27 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28 set -o posix
29 fi
30
31 # Name of the executable.
32 as_me=`echo "$0" |sed 's,.*[\\/],,'`
33
34 if expr a : '\(a\)' >/dev/null 2>&1; then
35 as_expr=expr
36 else
37 as_expr=false
38 fi
39
40 rm -f conf$$ conf$$.exe conf$$.file
41 echo >conf$$.file
42 if ln -s conf$$.file conf$$ 2>/dev/null; then
43 # We could just check for DJGPP; but this test a) works b) is more generic
44 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45 if test -f conf$$.exe; then
46 # Don't use ln at all; we don't have any links
47 as_ln_s='cp -p'
48 else
49 as_ln_s='ln -s'
50 fi
51 elif ln conf$$.file conf$$ 2>/dev/null; then
52 as_ln_s=ln
53 else
54 as_ln_s='cp -p'
55 fi
56 rm -f conf$$ conf$$.exe conf$$.file
57
58 as_executable_p="test -f"
59
60 # Support unset when possible.
61 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
62 as_unset=unset
63 else
64 as_unset=false
65 fi
66
67 # NLS nuisances.
68 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
69 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
70 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
71 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
72 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
73 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
74 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
75 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
76
77 # IFS
78 # We need space, tab and new line, in precisely that order.
79 as_nl='
80 '
81 IFS=" $as_nl"
82
83 # CDPATH.
84 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
85
86 # Name of the host.
87 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
88 # so uname gets run too.
89 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
90
91 exec 6>&1
92
93 #
94 # Initializations.
95 #
96 ac_default_prefix=/usr/local
97 cross_compiling=no
98 subdirs=
99 MFLAGS= MAKEFLAGS=
100 SHELL=${CONFIG_SHELL-/bin/sh}
101
102 # Maximum number of lines to put in a shell here document.
103 # This variable seems obsolete. It should probably be removed, and
104 # only ac_max_sed_lines should be used.
105 : ${ac_max_here_lines=38}
106
107 ac_unique_file="src/lisp.h"
108 # Factoring default headers for most tests.
109 ac_includes_default="\
110 #include <stdio.h>
111 #if HAVE_SYS_TYPES_H
112 # include <sys/types.h>
113 #endif
114 #if HAVE_SYS_STAT_H
115 # include <sys/stat.h>
116 #endif
117 #if STDC_HEADERS
118 # include <stdlib.h>
119 # include <stddef.h>
120 #else
121 # if HAVE_STDLIB_H
122 # include <stdlib.h>
123 # endif
124 #endif
125 #if HAVE_STRING_H
126 # if !STDC_HEADERS && HAVE_MEMORY_H
127 # include <memory.h>
128 # endif
129 # include <string.h>
130 #endif
131 #if HAVE_STRINGS_H
132 # include <strings.h>
133 #endif
134 #if HAVE_INTTYPES_H
135 # include <inttypes.h>
136 #else
137 # if HAVE_STDINT_H
138 # include <stdint.h>
139 # endif
140 #endif
141 #if HAVE_UNISTD_H
142 # include <unistd.h>
143 #endif"
144
145 # Initialize some variables set by options.
146 ac_init_help=
147 ac_init_version=false
148 # The variables have the same names as the options, with
149 # dashes changed to underlines.
150 cache_file=/dev/null
151 exec_prefix=NONE
152 no_create=
153 no_recursion=
154 prefix=NONE
155 program_prefix=NONE
156 program_suffix=NONE
157 program_transform_name=s,x,x,
158 silent=
159 site=
160 srcdir=
161 verbose=
162 x_includes=NONE
163 x_libraries=NONE
164
165 # Installation directory options.
166 # These are left unexpanded so users can "make install exec_prefix=/foo"
167 # and all the variables that are supposed to be based on exec_prefix
168 # by default will actually change.
169 # Use braces instead of parens because sh, perl, etc. also accept them.
170 bindir='${exec_prefix}/bin'
171 sbindir='${exec_prefix}/sbin'
172 libexecdir='${exec_prefix}/libexec'
173 datadir='${prefix}/share'
174 sysconfdir='${prefix}/etc'
175 sharedstatedir='${prefix}/com'
176 localstatedir='${prefix}/var'
177 libdir='${exec_prefix}/lib'
178 includedir='${prefix}/include'
179 oldincludedir='/usr/include'
180 infodir='${prefix}/info'
181 mandir='${prefix}/man'
182
183 # Identity of this package.
184 PACKAGE_NAME=
185 PACKAGE_TARNAME=
186 PACKAGE_VERSION=
187 PACKAGE_STRING=
188 PACKAGE_BUGREPORT=
189
190 ac_prev=
191 for ac_option
192 do
193 # If the previous option needs an argument, assign it.
194 if test -n "$ac_prev"; then
195 eval "$ac_prev=\$ac_option"
196 ac_prev=
197 continue
198 fi
199
200 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
201
202 # Accept the important Cygnus configure options, so we can diagnose typos.
203
204 case $ac_option in
205
206 -bindir | --bindir | --bindi | --bind | --bin | --bi)
207 ac_prev=bindir ;;
208 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
209 bindir=$ac_optarg ;;
210
211 -build | --build | --buil | --bui | --bu)
212 ac_prev=build_alias ;;
213 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
214 build_alias=$ac_optarg ;;
215
216 -cache-file | --cache-file | --cache-fil | --cache-fi \
217 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
218 ac_prev=cache_file ;;
219 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
220 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
221 cache_file=$ac_optarg ;;
222
223 --config-cache | -C)
224 cache_file=config.cache ;;
225
226 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
227 ac_prev=datadir ;;
228 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
229 | --da=*)
230 datadir=$ac_optarg ;;
231
232 -disable-* | --disable-*)
233 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
234 # Reject names that are not valid shell variable names.
235 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
236 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
237 { (exit 1); exit 1; }; }
238 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
239 eval "enable_$ac_feature=no" ;;
240
241 -enable-* | --enable-*)
242 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
243 # Reject names that are not valid shell variable names.
244 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246 { (exit 1); exit 1; }; }
247 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248 case $ac_option in
249 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
250 *) ac_optarg=yes ;;
251 esac
252 eval "enable_$ac_feature='$ac_optarg'" ;;
253
254 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
255 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
256 | --exec | --exe | --ex)
257 ac_prev=exec_prefix ;;
258 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
259 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
260 | --exec=* | --exe=* | --ex=*)
261 exec_prefix=$ac_optarg ;;
262
263 -gas | --gas | --ga | --g)
264 # Obsolete; use --with-gas.
265 with_gas=yes ;;
266
267 -help | --help | --hel | --he | -h)
268 ac_init_help=long ;;
269 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
270 ac_init_help=recursive ;;
271 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
272 ac_init_help=short ;;
273
274 -host | --host | --hos | --ho)
275 ac_prev=host_alias ;;
276 -host=* | --host=* | --hos=* | --ho=*)
277 host_alias=$ac_optarg ;;
278
279 -includedir | --includedir | --includedi | --included | --include \
280 | --includ | --inclu | --incl | --inc)
281 ac_prev=includedir ;;
282 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
283 | --includ=* | --inclu=* | --incl=* | --inc=*)
284 includedir=$ac_optarg ;;
285
286 -infodir | --infodir | --infodi | --infod | --info | --inf)
287 ac_prev=infodir ;;
288 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
289 infodir=$ac_optarg ;;
290
291 -libdir | --libdir | --libdi | --libd)
292 ac_prev=libdir ;;
293 -libdir=* | --libdir=* | --libdi=* | --libd=*)
294 libdir=$ac_optarg ;;
295
296 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
297 | --libexe | --libex | --libe)
298 ac_prev=libexecdir ;;
299 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
300 | --libexe=* | --libex=* | --libe=*)
301 libexecdir=$ac_optarg ;;
302
303 -localstatedir | --localstatedir | --localstatedi | --localstated \
304 | --localstate | --localstat | --localsta | --localst \
305 | --locals | --local | --loca | --loc | --lo)
306 ac_prev=localstatedir ;;
307 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
308 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
309 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
310 localstatedir=$ac_optarg ;;
311
312 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
313 ac_prev=mandir ;;
314 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
315 mandir=$ac_optarg ;;
316
317 -nfp | --nfp | --nf)
318 # Obsolete; use --without-fp.
319 with_fp=no ;;
320
321 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
322 | --no-cr | --no-c)
323 no_create=yes ;;
324
325 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
326 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
327 no_recursion=yes ;;
328
329 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
330 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
331 | --oldin | --oldi | --old | --ol | --o)
332 ac_prev=oldincludedir ;;
333 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
334 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
335 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
336 oldincludedir=$ac_optarg ;;
337
338 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
339 ac_prev=prefix ;;
340 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
341 prefix=$ac_optarg ;;
342
343 -program-prefix | --program-prefix | --program-prefi | --program-pref \
344 | --program-pre | --program-pr | --program-p)
345 ac_prev=program_prefix ;;
346 -program-prefix=* | --program-prefix=* | --program-prefi=* \
347 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
348 program_prefix=$ac_optarg ;;
349
350 -program-suffix | --program-suffix | --program-suffi | --program-suff \
351 | --program-suf | --program-su | --program-s)
352 ac_prev=program_suffix ;;
353 -program-suffix=* | --program-suffix=* | --program-suffi=* \
354 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
355 program_suffix=$ac_optarg ;;
356
357 -program-transform-name | --program-transform-name \
358 | --program-transform-nam | --program-transform-na \
359 | --program-transform-n | --program-transform- \
360 | --program-transform | --program-transfor \
361 | --program-transfo | --program-transf \
362 | --program-trans | --program-tran \
363 | --progr-tra | --program-tr | --program-t)
364 ac_prev=program_transform_name ;;
365 -program-transform-name=* | --program-transform-name=* \
366 | --program-transform-nam=* | --program-transform-na=* \
367 | --program-transform-n=* | --program-transform-=* \
368 | --program-transform=* | --program-transfor=* \
369 | --program-transfo=* | --program-transf=* \
370 | --program-trans=* | --program-tran=* \
371 | --progr-tra=* | --program-tr=* | --program-t=*)
372 program_transform_name=$ac_optarg ;;
373
374 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
375 | -silent | --silent | --silen | --sile | --sil)
376 silent=yes ;;
377
378 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
379 ac_prev=sbindir ;;
380 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
381 | --sbi=* | --sb=*)
382 sbindir=$ac_optarg ;;
383
384 -sharedstatedir | --sharedstatedir | --sharedstatedi \
385 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
386 | --sharedst | --shareds | --shared | --share | --shar \
387 | --sha | --sh)
388 ac_prev=sharedstatedir ;;
389 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
390 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
391 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
392 | --sha=* | --sh=*)
393 sharedstatedir=$ac_optarg ;;
394
395 -site | --site | --sit)
396 ac_prev=site ;;
397 -site=* | --site=* | --sit=*)
398 site=$ac_optarg ;;
399
400 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
401 ac_prev=srcdir ;;
402 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
403 srcdir=$ac_optarg ;;
404
405 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
406 | --syscon | --sysco | --sysc | --sys | --sy)
407 ac_prev=sysconfdir ;;
408 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
409 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
410 sysconfdir=$ac_optarg ;;
411
412 -target | --target | --targe | --targ | --tar | --ta | --t)
413 ac_prev=target_alias ;;
414 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
415 target_alias=$ac_optarg ;;
416
417 -v | -verbose | --verbose | --verbos | --verbo | --verb)
418 verbose=yes ;;
419
420 -version | --version | --versio | --versi | --vers | -V)
421 ac_init_version=: ;;
422
423 -with-* | --with-*)
424 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
425 # Reject names that are not valid shell variable names.
426 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
427 { echo "$as_me: error: invalid package name: $ac_package" >&2
428 { (exit 1); exit 1; }; }
429 ac_package=`echo $ac_package| sed 's/-/_/g'`
430 case $ac_option in
431 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
432 *) ac_optarg=yes ;;
433 esac
434 eval "with_$ac_package='$ac_optarg'" ;;
435
436 -without-* | --without-*)
437 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
438 # Reject names that are not valid shell variable names.
439 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
440 { echo "$as_me: error: invalid package name: $ac_package" >&2
441 { (exit 1); exit 1; }; }
442 ac_package=`echo $ac_package | sed 's/-/_/g'`
443 eval "with_$ac_package=no" ;;
444
445 --x)
446 # Obsolete; use --with-x.
447 with_x=yes ;;
448
449 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
450 | --x-incl | --x-inc | --x-in | --x-i)
451 ac_prev=x_includes ;;
452 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
453 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
454 x_includes=$ac_optarg ;;
455
456 -x-libraries | --x-libraries | --x-librarie | --x-librari \
457 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
458 ac_prev=x_libraries ;;
459 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
460 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
461 x_libraries=$ac_optarg ;;
462
463 -*) { echo "$as_me: error: unrecognized option: $ac_option
464 Try \`$0 --help' for more information." >&2
465 { (exit 1); exit 1; }; }
466 ;;
467
468 *=*)
469 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
470 # Reject names that are not valid shell variable names.
471 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
472 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
473 { (exit 1); exit 1; }; }
474 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
475 eval "$ac_envvar='$ac_optarg'"
476 export $ac_envvar ;;
477
478 *)
479 # FIXME: should be removed in autoconf 3.0.
480 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
481 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
482 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
483 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
484 ;;
485
486 esac
487 done
488
489 if test -n "$ac_prev"; then
490 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
491 { echo "$as_me: error: missing argument to $ac_option" >&2
492 { (exit 1); exit 1; }; }
493 fi
494
495 # Be sure to have absolute paths.
496 for ac_var in exec_prefix prefix
497 do
498 eval ac_val=$`echo $ac_var`
499 case $ac_val in
500 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
501 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
502 { (exit 1); exit 1; }; };;
503 esac
504 done
505
506 # Be sure to have absolute paths.
507 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
508 localstatedir libdir includedir oldincludedir infodir mandir
509 do
510 eval ac_val=$`echo $ac_var`
511 case $ac_val in
512 [\\/$]* | ?:[\\/]* ) ;;
513 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
514 { (exit 1); exit 1; }; };;
515 esac
516 done
517
518 # There might be people who depend on the old broken behavior: `$host'
519 # used to hold the argument of --host etc.
520 build=$build_alias
521 host=$host_alias
522 target=$target_alias
523
524 # FIXME: should be removed in autoconf 3.0.
525 if test "x$host_alias" != x; then
526 if test "x$build_alias" = x; then
527 cross_compiling=maybe
528 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
529 If a cross compiler is detected then cross compile mode will be used." >&2
530 elif test "x$build_alias" != "x$host_alias"; then
531 cross_compiling=yes
532 fi
533 fi
534
535 ac_tool_prefix=
536 test -n "$host_alias" && ac_tool_prefix=$host_alias-
537
538 test "$silent" = yes && exec 6>/dev/null
539
540 # Find the source files, if location was not specified.
541 if test -z "$srcdir"; then
542 ac_srcdir_defaulted=yes
543 # Try the directory containing this script, then its parent.
544 ac_prog=$0
545 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
546 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
547 srcdir=$ac_confdir
548 if test ! -r $srcdir/$ac_unique_file; then
549 srcdir=..
550 fi
551 else
552 ac_srcdir_defaulted=no
553 fi
554 if test ! -r $srcdir/$ac_unique_file; then
555 if test "$ac_srcdir_defaulted" = yes; then
556 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
557 { (exit 1); exit 1; }; }
558 else
559 { echo "$as_me: error: cannot find sources in $srcdir" >&2
560 { (exit 1); exit 1; }; }
561 fi
562 fi
563 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
564 ac_env_build_alias_set=${build_alias+set}
565 ac_env_build_alias_value=$build_alias
566 ac_cv_env_build_alias_set=${build_alias+set}
567 ac_cv_env_build_alias_value=$build_alias
568 ac_env_host_alias_set=${host_alias+set}
569 ac_env_host_alias_value=$host_alias
570 ac_cv_env_host_alias_set=${host_alias+set}
571 ac_cv_env_host_alias_value=$host_alias
572 ac_env_target_alias_set=${target_alias+set}
573 ac_env_target_alias_value=$target_alias
574 ac_cv_env_target_alias_set=${target_alias+set}
575 ac_cv_env_target_alias_value=$target_alias
576 ac_env_CC_set=${CC+set}
577 ac_env_CC_value=$CC
578 ac_cv_env_CC_set=${CC+set}
579 ac_cv_env_CC_value=$CC
580 ac_env_CFLAGS_set=${CFLAGS+set}
581 ac_env_CFLAGS_value=$CFLAGS
582 ac_cv_env_CFLAGS_set=${CFLAGS+set}
583 ac_cv_env_CFLAGS_value=$CFLAGS
584 ac_env_LDFLAGS_set=${LDFLAGS+set}
585 ac_env_LDFLAGS_value=$LDFLAGS
586 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
587 ac_cv_env_LDFLAGS_value=$LDFLAGS
588 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
589 ac_env_CPPFLAGS_value=$CPPFLAGS
590 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
591 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
592 ac_env_CPP_set=${CPP+set}
593 ac_env_CPP_value=$CPP
594 ac_cv_env_CPP_set=${CPP+set}
595 ac_cv_env_CPP_value=$CPP
596
597 #
598 # Report the --help message.
599 #
600 if test "$ac_init_help" = "long"; then
601 # Omit some internal or obsolete options to make the list less imposing.
602 # This message is too long to be a string in the A/UX 3.1 sh.
603 cat <<EOF
604 \`configure' configures this package to adapt to many kinds of systems.
605
606 Usage: $0 [OPTION]... [VAR=VALUE]...
607
608 To assign environment variables (e.g., CC, CFLAGS...), specify them as
609 VAR=VALUE. See below for descriptions of some of the useful variables.
610
611 Defaults for the options are specified in brackets.
612
613 Configuration:
614 -h, --help display this help and exit
615 --help=short display options specific to this package
616 --help=recursive display the short help of all the included packages
617 -V, --version display version information and exit
618 -q, --quiet, --silent do not print \`checking...' messages
619 --cache-file=FILE cache test results in FILE [disabled]
620 -C, --config-cache alias for \`--cache-file=config.cache'
621 -n, --no-create do not create output files
622 --srcdir=DIR find the sources in DIR [configure dir or \`..']
623
624 EOF
625
626 cat <<EOF
627 Installation directories:
628 --prefix=PREFIX install architecture-independent files in PREFIX
629 [$ac_default_prefix]
630 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
631 [PREFIX]
632
633 By default, \`make install' will install all the files in
634 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
635 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
636 for instance \`--prefix=\$HOME'.
637
638 For better control, use the options below.
639
640 Fine tuning of the installation directories:
641 --bindir=DIR user executables [EPREFIX/bin]
642 --sbindir=DIR system admin executables [EPREFIX/sbin]
643 --libexecdir=DIR program executables [EPREFIX/libexec]
644 --datadir=DIR read-only architecture-independent data [PREFIX/share]
645 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
646 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
647 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
648 --libdir=DIR object code libraries [EPREFIX/lib]
649 --includedir=DIR C header files [PREFIX/include]
650 --oldincludedir=DIR C header files for non-gcc [/usr/include]
651 --infodir=DIR info documentation [PREFIX/info]
652 --mandir=DIR man documentation [PREFIX/man]
653 EOF
654
655 cat <<\EOF
656
657 Program names:
658 --program-prefix=PREFIX prepend PREFIX to installed program names
659 --program-suffix=SUFFIX append SUFFIX to installed program names
660 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
661
662 X features:
663 --x-includes=DIR X include files are in DIR
664 --x-libraries=DIR X library files are in DIR
665
666 System types:
667 --build=BUILD configure for building on BUILD [guessed]
668 --host=HOST build programs to run on HOST [BUILD]
669 EOF
670 fi
671
672 if test -n "$ac_init_help"; then
673
674 cat <<\EOF
675
676 Optional Features:
677 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
678 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
679 --disable-largefile omit support for large files
680
681 Optional Packages:
682 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
683 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
684 --without-gcc don't use GCC to compile Emacs if GCC is found
685 --without-pop don't support POP mail retrieval with movemail
686 --with-kerberos support Kerberos-authenticated POP
687 --with-kerberos5 support Kerberos version 5 authenticated POP
688 --with-hesiod support Hesiod to get the POP server host
689 --with-x-toolkit=KIT use an X toolkit (KIT = yes/lucid/athena/motif/no)
690 --with-xpm use -lXpm for displaying XPM images
691 --with-jpeg use -ljpeg for displaying JPEG images
692 --with-tiff use -ltiff for displaying TIFF images
693 --with-gif use -lungif for displaying GIF images
694 --with-png use -lpng for displaying PNG images
695 --without-toolkit-scroll-bars
696 don't use Motif or Xaw3d scroll bars
697 --without-xim don't use X11 XIM
698 --with-x use the X Window System
699
700 Some influential environment variables:
701 CC C compiler command
702 CFLAGS C compiler flags
703 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
704 nonstandard directory <lib dir>
705 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
706 headers in a nonstandard directory <include dir>
707 CPP C preprocessor
708
709 Use these variables to override the choices made by `configure' or to help
710 it to find libraries and programs with nonstandard names/locations.
711
712 EOF
713 fi
714
715 if test "$ac_init_help" = "recursive"; then
716 # If there are subdirs, report their specific --help.
717 ac_popdir=`pwd`
718 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
719 cd $ac_subdir
720 # A "../" for each directory in /$ac_subdir.
721 ac_dots=`echo $ac_subdir |
722 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
723
724 case $srcdir in
725 .) # No --srcdir option. We are building in place.
726 ac_sub_srcdir=$srcdir ;;
727 [\\/]* | ?:[\\/]* ) # Absolute path.
728 ac_sub_srcdir=$srcdir/$ac_subdir ;;
729 *) # Relative path.
730 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
731 esac
732
733 # Check for guested configure; otherwise get Cygnus style configure.
734 if test -f $ac_sub_srcdir/configure.gnu; then
735 echo
736 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
737 elif test -f $ac_sub_srcdir/configure; then
738 echo
739 $SHELL $ac_sub_srcdir/configure --help=recursive
740 elif test -f $ac_sub_srcdir/configure.ac ||
741 test -f $ac_sub_srcdir/configure.in; then
742 echo
743 $ac_configure --help
744 else
745 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
746 fi
747 cd $ac_popdir
748 done
749 fi
750
751 test -n "$ac_init_help" && exit 0
752 if $ac_init_version; then
753 cat <<\EOF
754
755 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
756 Free Software Foundation, Inc.
757 This configure script is free software; the Free Software Foundation
758 gives unlimited permission to copy, distribute and modify it.
759 EOF
760 exit 0
761 fi
762 exec 5>config.log
763 cat >&5 <<EOF
764 This file contains any messages produced by compilers while
765 running configure, to aid debugging if configure makes a mistake.
766
767 It was created by $as_me, which was
768 generated by GNU Autoconf 2.52. Invocation command line was
769
770 $ $0 $@
771
772 EOF
773 {
774 cat <<_ASUNAME
775 ## ---------- ##
776 ## Platform. ##
777 ## ---------- ##
778
779 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
780 uname -m = `(uname -m) 2>/dev/null || echo unknown`
781 uname -r = `(uname -r) 2>/dev/null || echo unknown`
782 uname -s = `(uname -s) 2>/dev/null || echo unknown`
783 uname -v = `(uname -v) 2>/dev/null || echo unknown`
784
785 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
786 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
787
788 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
789 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
790 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
791 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
792 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
793 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
794 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
795
796 PATH = $PATH
797
798 _ASUNAME
799 } >&5
800
801 cat >&5 <<EOF
802 ## ------------ ##
803 ## Core tests. ##
804 ## ------------ ##
805
806 EOF
807
808 # Keep a trace of the command line.
809 # Strip out --no-create and --no-recursion so they do not pile up.
810 # Also quote any args containing shell meta-characters.
811 ac_configure_args=
812 ac_sep=
813 for ac_arg
814 do
815 case $ac_arg in
816 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
817 | --no-cr | --no-c) ;;
818 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
819 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
820 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
821 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
822 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
823 ac_sep=" " ;;
824 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
825 ac_sep=" " ;;
826 esac
827 # Get rid of the leading space.
828 done
829
830 # When interrupted or exit'd, cleanup temporary files, and complete
831 # config.log. We remove comments because anyway the quotes in there
832 # would cause problems or look ugly.
833 trap 'exit_status=$?
834 # Save into config.log some information that might help in debugging.
835 echo >&5
836 echo "## ----------------- ##" >&5
837 echo "## Cache variables. ##" >&5
838 echo "## ----------------- ##" >&5
839 echo >&5
840 # The following way of writing the cache mishandles newlines in values,
841 {
842 (set) 2>&1 |
843 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
844 *ac_space=\ *)
845 sed -n \
846 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
847 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
848 ;;
849 *)
850 sed -n \
851 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
852 ;;
853 esac;
854 } >&5
855 sed "/^$/d" confdefs.h >conftest.log
856 if test -s conftest.log; then
857 echo >&5
858 echo "## ------------ ##" >&5
859 echo "## confdefs.h. ##" >&5
860 echo "## ------------ ##" >&5
861 echo >&5
862 cat conftest.log >&5
863 fi
864 (echo; echo) >&5
865 test "$ac_signal" != 0 &&
866 echo "$as_me: caught signal $ac_signal" >&5
867 echo "$as_me: exit $exit_status" >&5
868 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
869 exit $exit_status
870 ' 0
871 for ac_signal in 1 2 13 15; do
872 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
873 done
874 ac_signal=0
875
876 # confdefs.h avoids OS command line length limits that DEFS can exceed.
877 rm -rf conftest* confdefs.h
878 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
879 echo >confdefs.h
880
881 # Let the site file select an alternate cache file if it wants to.
882 # Prefer explicitly selected file to automatically selected ones.
883 if test -z "$CONFIG_SITE"; then
884 if test "x$prefix" != xNONE; then
885 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
886 else
887 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
888 fi
889 fi
890 for ac_site_file in $CONFIG_SITE; do
891 if test -r "$ac_site_file"; then
892 { echo "$as_me:892: loading site script $ac_site_file" >&5
893 echo "$as_me: loading site script $ac_site_file" >&6;}
894 cat "$ac_site_file" >&5
895 . "$ac_site_file"
896 fi
897 done
898
899 if test -r "$cache_file"; then
900 # Some versions of bash will fail to source /dev/null (special
901 # files actually), so we avoid doing that.
902 if test -f "$cache_file"; then
903 { echo "$as_me:903: loading cache $cache_file" >&5
904 echo "$as_me: loading cache $cache_file" >&6;}
905 case $cache_file in
906 [\\/]* | ?:[\\/]* ) . $cache_file;;
907 *) . ./$cache_file;;
908 esac
909 fi
910 else
911 { echo "$as_me:911: creating cache $cache_file" >&5
912 echo "$as_me: creating cache $cache_file" >&6;}
913 >$cache_file
914 fi
915
916 # Check that the precious variables saved in the cache have kept the same
917 # value.
918 ac_cache_corrupted=false
919 for ac_var in `(set) 2>&1 |
920 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
921 eval ac_old_set=\$ac_cv_env_${ac_var}_set
922 eval ac_new_set=\$ac_env_${ac_var}_set
923 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
924 eval ac_new_val="\$ac_env_${ac_var}_value"
925 case $ac_old_set,$ac_new_set in
926 set,)
927 { echo "$as_me:927: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
928 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
929 ac_cache_corrupted=: ;;
930 ,set)
931 { echo "$as_me:931: error: \`$ac_var' was not set in the previous run" >&5
932 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
933 ac_cache_corrupted=: ;;
934 ,);;
935 *)
936 if test "x$ac_old_val" != "x$ac_new_val"; then
937 { echo "$as_me:937: error: \`$ac_var' has changed since the previous run:" >&5
938 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
939 { echo "$as_me:939: former value: $ac_old_val" >&5
940 echo "$as_me: former value: $ac_old_val" >&2;}
941 { echo "$as_me:941: current value: $ac_new_val" >&5
942 echo "$as_me: current value: $ac_new_val" >&2;}
943 ac_cache_corrupted=:
944 fi;;
945 esac
946 # Pass precious variables to config.status. It doesn't matter if
947 # we pass some twice (in addition to the command line arguments).
948 if test "$ac_new_set" = set; then
949 case $ac_new_val in
950 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
951 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
952 ac_configure_args="$ac_configure_args '$ac_arg'"
953 ;;
954 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
955 ;;
956 esac
957 fi
958 done
959 if $ac_cache_corrupted; then
960 { echo "$as_me:960: error: changes in the environment can compromise the build" >&5
961 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
962 { { echo "$as_me:962: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
963 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
964 { (exit 1); exit 1; }; }
965 fi
966
967 ac_ext=c
968 ac_cpp='$CPP $CPPFLAGS'
969 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
970 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
971 ac_compiler_gnu=$ac_cv_c_compiler_gnu
972
973 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
974 *c*,-n*) ECHO_N= ECHO_C='
975 ' ECHO_T=' ' ;;
976 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
977 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
978 esac
979 echo "#! $SHELL" >conftest.sh
980 echo "exit 0" >>conftest.sh
981 chmod +x conftest.sh
982 if { (echo "$as_me:982: PATH=\".;.\"; conftest.sh") >&5
983 (PATH=".;."; conftest.sh) 2>&5
984 ac_status=$?
985 echo "$as_me:985: \$? = $ac_status" >&5
986 (exit $ac_status); }; then
987 ac_path_separator=';'
988 else
989 ac_path_separator=:
990 fi
991 PATH_SEPARATOR="$ac_path_separator"
992 rm -f conftest.sh
993
994 ac_config_headers="$ac_config_headers src/config.h:src/config.in"
995
996 test "$program_prefix" != NONE &&
997 program_transform_name="s,^,$program_prefix,;$program_transform_name"
998 # Use a double $ so make ignores it.
999 test "$program_suffix" != NONE &&
1000 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1001 # Double any \ or $. echo might interpret backslashes.
1002 # By default was `s,x,x', remove it if useless.
1003 cat <<\_ACEOF >conftest.sed
1004 s/[\\$]/&&/g;s/;s,x,x,$//
1005 _ACEOF
1006 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1007 rm conftest.sed
1008
1009 lispdir='${datadir}/emacs/${version}/lisp'
1010 locallisppath='${datadir}/emacs/${version}/site-lisp:'\
1011 '${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
1012 lisppath='${locallisppath}:${lispdir}'
1013 etcdir='${datadir}/emacs/${version}/etc'
1014 archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1015 docdir='${datadir}/emacs/${version}/etc'
1016
1017 # Check whether --with-gcc or --without-gcc was given.
1018 if test "${with_gcc+set}" = set; then
1019 withval="$with_gcc"
1020
1021 fi;
1022
1023 # Check whether --with-pop or --without-pop was given.
1024 if test "${with_pop+set}" = set; then
1025 withval="$with_pop"
1026 if test "$withval" = yes; then
1027 cat >>confdefs.h <<\EOF
1028 #define MAIL_USE_POP 1
1029 EOF
1030
1031 else :
1032 fi
1033 else
1034 cat >>confdefs.h <<\EOF
1035 #define MAIL_USE_POP 1
1036 EOF
1037
1038 fi;
1039
1040 # Check whether --with-kerberos or --without-kerberos was given.
1041 if test "${with_kerberos+set}" = set; then
1042 withval="$with_kerberos"
1043 cat >>confdefs.h <<\EOF
1044 #define KERBEROS 1
1045 EOF
1046
1047 fi;
1048
1049 # Check whether --with-kerberos5 or --without-kerberos5 was given.
1050 if test "${with_kerberos5+set}" = set; then
1051 withval="$with_kerberos5"
1052 if test "${with_kerberos5+set}" = set; then
1053 if test "${with_kerberos+set}" != set; then
1054 with_kerberos=yes
1055 cat >>confdefs.h <<\EOF
1056 #define KERBEROS 1
1057 EOF
1058
1059 fi
1060 fi
1061 cat >>confdefs.h <<\EOF
1062 #define KERBEROS5 1
1063 EOF
1064
1065 fi;
1066
1067 # Check whether --with-hesiod or --without-hesiod was given.
1068 if test "${with_hesiod+set}" = set; then
1069 withval="$with_hesiod"
1070 cat >>confdefs.h <<\EOF
1071 #define HESIOD 1
1072 EOF
1073
1074 fi;
1075
1076 # Check whether --with-x-toolkit or --without-x-toolkit was given.
1077 if test "${with_x_toolkit+set}" = set; then
1078 withval="$with_x_toolkit"
1079 case "${withval}" in
1080 y | ye | yes ) val=athena ;;
1081 n | no ) val=no ;;
1082 l | lu | luc | luci | lucid ) val=lucid ;;
1083 a | at | ath | athe | athen | athena ) val=athena ;;
1084 m | mo | mot | moti | motif ) val=motif ;;
1085 * )
1086 { { echo "$as_me:1086: error: \`--with-x-toolkit=$withval' is invalid\;
1087 this option's value should be \`yes', \`no', \`lucid', \`athena', or \`motif'.
1088 Currently, \`yes', \`athena' and \`lucid' are synonyms." >&5
1089 echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid\;
1090 this option's value should be \`yes', \`no', \`lucid', \`athena', or \`motif'.
1091 Currently, \`yes', \`athena' and \`lucid' are synonyms." >&2;}
1092 { (exit 1); exit 1; }; }
1093 ;;
1094 esac
1095 with_x_toolkit=$val
1096
1097 fi;
1098
1099 # Check whether --with-xpm or --without-xpm was given.
1100 if test "${with_xpm+set}" = set; then
1101 withval="$with_xpm"
1102
1103 fi;
1104
1105 # Check whether --with-jpeg or --without-jpeg was given.
1106 if test "${with_jpeg+set}" = set; then
1107 withval="$with_jpeg"
1108
1109 fi;
1110
1111 # Check whether --with-tiff or --without-tiff was given.
1112 if test "${with_tiff+set}" = set; then
1113 withval="$with_tiff"
1114
1115 fi;
1116
1117 # Check whether --with-gif or --without-gif was given.
1118 if test "${with_gif+set}" = set; then
1119 withval="$with_gif"
1120
1121 fi;
1122
1123 # Check whether --with-png or --without-png was given.
1124 if test "${with_png+set}" = set; then
1125 withval="$with_png"
1126
1127 fi;
1128
1129 # Check whether --with-toolkit-scroll-bars or --without-toolkit-scroll-bars was given.
1130 if test "${with_toolkit_scroll_bars+set}" = set; then
1131 withval="$with_toolkit_scroll_bars"
1132
1133 fi;
1134
1135 # Check whether --with-xim or --without-xim was given.
1136 if test "${with_xim+set}" = set; then
1137 withval="$with_xim"
1138
1139 fi;
1140
1141 #### Make srcdir absolute, if it isn't already. It's important to
1142 #### avoid running the path through pwd unnecessarily, since pwd can
1143 #### give you automounter prefixes, which can go away. We do all this
1144 #### so Emacs can find its files when run uninstalled.
1145 ## Make sure CDPATH doesn't affect cd (in case PWD is relative).
1146 unset CDPATH
1147 case "${srcdir}" in
1148 /* ) ;;
1149 . )
1150 ## We may be able to use the $PWD environment variable to make this
1151 ## absolute. But sometimes PWD is inaccurate.
1152 ## Note: we used to use ${PWD} at the end instead of `pwd`,
1153 ## but that tested only for a well-formed and valid PWD,
1154 ## it did not object when PWD was well-formed and valid but just wrong.
1155 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
1156 then
1157 srcdir="$PWD"
1158 else
1159 srcdir="`(cd ${srcdir}; pwd)`"
1160 fi
1161 ;;
1162 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
1163 esac
1164
1165 #### Check if the source directory already has a configured system in it.
1166 if test `pwd` != `(cd ${srcdir} && pwd)` \
1167 && test -f "${srcdir}/src/config.h" ; then
1168 { echo "$as_me:1168: WARNING: The directory tree \`${srcdir}' is being used
1169 as a build directory right now; it has been configured in its own
1170 right. To configure in another directory as well, you MUST
1171 use GNU make. If you do not have GNU make, then you must
1172 now do \`make distclean' in ${srcdir},
1173 and then run $0 again." >&5
1174 echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
1175 as a build directory right now; it has been configured in its own
1176 right. To configure in another directory as well, you MUST
1177 use GNU make. If you do not have GNU make, then you must
1178 now do \`make distclean' in ${srcdir},
1179 and then run $0 again." >&2;}
1180
1181 extrasub='/^VPATH[ ]*=/c\
1182 vpath %.c $(srcdir)\
1183 vpath %.h $(srcdir)\
1184 vpath %.y $(srcdir)\
1185 vpath %.l $(srcdir)\
1186 vpath %.s $(srcdir)\
1187 vpath %.in $(srcdir)\
1188 vpath %.texi $(srcdir)'
1189 fi
1190
1191 #### Given the configuration name, set machfile and opsysfile to the
1192 #### names of the m/*.h and s/*.h files we should use.
1193
1194 ### Canonicalize the configuration name.
1195
1196 ac_aux_dir=
1197 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1198 if test -f $ac_dir/install-sh; then
1199 ac_aux_dir=$ac_dir
1200 ac_install_sh="$ac_aux_dir/install-sh -c"
1201 break
1202 elif test -f $ac_dir/install.sh; then
1203 ac_aux_dir=$ac_dir
1204 ac_install_sh="$ac_aux_dir/install.sh -c"
1205 break
1206 elif test -f $ac_dir/shtool; then
1207 ac_aux_dir=$ac_dir
1208 ac_install_sh="$ac_aux_dir/shtool install -c"
1209 break
1210 fi
1211 done
1212 if test -z "$ac_aux_dir"; then
1213 { { echo "$as_me:1213: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1214 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1215 { (exit 1); exit 1; }; }
1216 fi
1217 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1218 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1219 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1220
1221 # Make sure we can run config.sub.
1222 $ac_config_sub sun4 >/dev/null 2>&1 ||
1223 { { echo "$as_me:1223: error: cannot run $ac_config_sub" >&5
1224 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1225 { (exit 1); exit 1; }; }
1226
1227 echo "$as_me:1227: checking build system type" >&5
1228 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1229 if test "${ac_cv_build+set}" = set; then
1230 echo $ECHO_N "(cached) $ECHO_C" >&6
1231 else
1232 ac_cv_build_alias=$build_alias
1233 test -z "$ac_cv_build_alias" &&
1234 ac_cv_build_alias=`$ac_config_guess`
1235 test -z "$ac_cv_build_alias" &&
1236 { { echo "$as_me:1236: error: cannot guess build type; you must specify one" >&5
1237 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1238 { (exit 1); exit 1; }; }
1239 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1240 { { echo "$as_me:1240: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1241 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1242 { (exit 1); exit 1; }; }
1243
1244 fi
1245 echo "$as_me:1245: result: $ac_cv_build" >&5
1246 echo "${ECHO_T}$ac_cv_build" >&6
1247 build=$ac_cv_build
1248 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1249 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1250 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1251
1252 echo "$as_me:1252: checking host system type" >&5
1253 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1254 if test "${ac_cv_host+set}" = set; then
1255 echo $ECHO_N "(cached) $ECHO_C" >&6
1256 else
1257 ac_cv_host_alias=$host_alias
1258 test -z "$ac_cv_host_alias" &&
1259 ac_cv_host_alias=$ac_cv_build_alias
1260 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1261 { { echo "$as_me:1261: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1262 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1263 { (exit 1); exit 1; }; }
1264
1265 fi
1266 echo "$as_me:1266: result: $ac_cv_host" >&5
1267 echo "${ECHO_T}$ac_cv_host" >&6
1268 host=$ac_cv_host
1269 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1270 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1271 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1272
1273 canonical=$host
1274 configuration=${host_alias-$host}
1275
1276 ### If you add support for a new configuration, add code to this
1277 ### switch statement to recognize your configuration name and select
1278 ### the appropriate operating system and machine description files.
1279
1280 ### You would hope that you could choose an m/*.h file pretty much
1281 ### based on the machine portion of the configuration name, and an s-
1282 ### file based on the operating system portion. However, it turns out
1283 ### that each m/*.h file is pretty manufacturer-specific - for
1284 ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
1285 ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
1286 ### machines. So we basically have to have a special case for each
1287 ### configuration name.
1288 ###
1289 ### As far as handling version numbers on operating systems is
1290 ### concerned, make sure things will fail in a fixable way. If
1291 ### /etc/MACHINES doesn't say anything about version numbers, be
1292 ### prepared to handle anything reasonably. If version numbers
1293 ### matter, be sure /etc/MACHINES says something about it.
1294 ###
1295 ### Eric Raymond says we should accept strings like "sysvr4" to mean
1296 ### "System V Release 4"; he writes, "The old convention encouraged
1297 ### confusion between `system' and `release' levels'."
1298
1299 machine='' opsys='' unported=no
1300 case "${canonical}" in
1301
1302 ## FreeBSD ports
1303 *-*-freebsd* )
1304 opsys=freebsd
1305 case "${canonical}" in
1306 alpha*-*-freebsd*) machine=alpha ;;
1307 i[3456]86-*-freebsd*) machine=intel386 ;;
1308 esac
1309 ;;
1310
1311 ## NetBSD ports
1312 *-*-netbsd* )
1313 opsys=netbsd
1314 case "${canonical}" in
1315 alpha*-*-netbsd*) machine=alpha ;;
1316 i[3456]86-*-netbsd*) machine=intel386 ;;
1317 m68k-*-netbsd*)
1318 # This is somewhat bogus.
1319 machine=hp9000s300 ;;
1320 powerpc-apple-netbsd*) machine=macppc ;;
1321 mips-*-netbsd*) machine=pmax ;;
1322 mipsel-*-netbsd*) machine=pmax ;;
1323 ns32k-*-netbsd*) machine=ns32000 ;;
1324 powerpc-*-netbsd*) machine=macppc ;;
1325 sparc*-*-netbsd*) machine=sparc ;;
1326 vax-*-netbsd*) machine=vax ;;
1327 arm-*-netbsd*) machine=arm ;;
1328 esac
1329 ;;
1330
1331 ## OpenBSD ports
1332 *-*-openbsd* )
1333 opsys=openbsd
1334 case "${canonical}" in
1335 alpha*-*-openbsd*) machine=alpha ;;
1336 i386-*-openbsd*) machine=intel386 ;;
1337 m68k-*-openbsd*) machine=hp9000s300 ;;
1338 mipsel-*-openbsd*) machine=pmax ;;
1339 ns32k-*-openbsd*) machine=ns32000 ;;
1340 sparc-*-openbsd*) machine=sparc ;;
1341 vax-*-openbsd*) machine=vax ;;
1342 esac
1343 ;;
1344
1345 ## Acorn RISCiX:
1346 arm-acorn-riscix1.1* )
1347 machine=acorn opsys=riscix1-1
1348 ;;
1349 arm-acorn-riscix1.2* | arm-acorn-riscix )
1350 ## This name is riscix12 instead of riscix1.2
1351 ## to avoid a file name conflict on MSDOS.
1352 machine=acorn opsys=riscix12
1353 ;;
1354
1355 ## BSDI ports
1356 *-*-bsdi* )
1357 opsys=bsdi
1358 case "${canonical}" in
1359 i[345]86-*-bsdi*) machine=intel386 ;;
1360 sparc-*-bsdi*) machine=sparc ;;
1361 powerpc-*-bsdi*) machine=macppc ;;
1362 esac
1363 case "${canonical}" in
1364 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
1365 *-*-bsdi2.0* ) opsys=bsdos2 ;;
1366 *-*-bsdi2* ) opsys=bsdos2-1 ;;
1367 *-*-bsdi3* ) opsys=bsdos3 ;;
1368 *-*-bsdi[45]* ) opsys=bsdos4 ;;
1369 esac
1370 ;;
1371
1372 ## Alliant machines
1373 ## Strictly speaking, we need the version of the alliant operating
1374 ## system to choose the right machine file, but currently the
1375 ## configuration name doesn't tell us enough to choose the right
1376 ## one; we need to give alliants their own operating system name to
1377 ## do this right. When someone cares, they can help us.
1378 fx80-alliant-* )
1379 machine=alliant4 opsys=bsd4-2
1380 ;;
1381 i860-alliant-* )
1382 machine=alliant-2800 opsys=bsd4-3
1383 ;;
1384
1385 ## Alpha (DEC) machines.
1386 alpha*-dec-osf* )
1387 machine=alpha opsys=osf1
1388 # This is needed to find X11R6.1 libraries for certain tests.
1389 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
1390 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
1391 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
1392 # due to non-traditional preprocessing with the current compiler
1393 # defaults. OSF 4 can also have that compiler version, and there
1394 # seems always to have been a usable /usr/bin/cpp.
1395 NON_GNU_CPP=/usr/bin/cpp
1396 case "${canonical}" in
1397 alpha*-dec-osf[5-9]*)
1398 opsys=osf5-0 ;;
1399 esac
1400 ;;
1401
1402 alpha*-*-linux-gnu* )
1403 machine=alpha opsys=gnu-linux
1404 ;;
1405
1406 arm*-*-linux-gnu* )
1407 machine=arm opsys=gnu-linux
1408 ;;
1409
1410 ppc-*-linux | \
1411 powerpc-*-linux* )
1412 machine=macppc opsys=gnu-linux
1413 ;;
1414
1415 ## Altos 3068
1416 m68*-altos-sysv* )
1417 machine=altos opsys=usg5-2
1418 ;;
1419
1420 ## Amdahl UTS
1421 580-amdahl-sysv* )
1422 machine=amdahl opsys=usg5-2-2
1423 ;;
1424
1425 ## Apollo, Domain/OS
1426 m68*-apollo-* )
1427 machine=apollo opsys=bsd4-3
1428 ;;
1429
1430 ## AT&T 3b2, 3b5, 3b15, 3b20
1431 we32k-att-sysv* )
1432 machine=att3b opsys=usg5-2-2
1433 ;;
1434
1435 ## AT&T 3b1 - The Mighty Unix PC!
1436 m68*-att-sysv* )
1437 machine=7300 opsys=usg5-2-2
1438 ;;
1439
1440 ## Bull dpx20
1441 rs6000-bull-bosx* )
1442 machine=ibmrs6000 opsys=aix3-2
1443 ;;
1444
1445 ## Bull dpx2
1446 m68*-bull-sysv3* )
1447 machine=dpx2 opsys=usg5-3
1448 ;;
1449
1450 ## Bull sps7
1451 m68*-bull-sysv2* )
1452 machine=sps7 opsys=usg5-2
1453 ;;
1454
1455 ## CCI 5/32, 6/32 -- see "Tahoe".
1456
1457 ## Celerity
1458 ## I don't know what configuration name to use for this; config.sub
1459 ## doesn't seem to know anything about it. Hey, Celerity users, get
1460 ## in touch with us!
1461 celerity-celerity-bsd* )
1462 machine=celerity opsys=bsd4-2
1463 ;;
1464
1465 ## Clipper
1466 ## What operating systems does this chip run that Emacs has been
1467 ## tested on?
1468 clipper-* )
1469 machine=clipper
1470 ## We'll use the catch-all code at the bottom to guess the
1471 ## operating system.
1472 ;;
1473
1474 ## Compaq Nonstop
1475 mips-compaq-nonstopux* )
1476 machine=nonstopux opsys=nonstopux
1477 ;;
1478
1479 ## Convex
1480 *-convex-bsd* | *-convex-convexos* )
1481 machine=convex opsys=bsd4-3
1482 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
1483 NON_GNU_CPP="cc -E -P"
1484 ;;
1485
1486 ## Cubix QBx/386
1487 i[3456]86-cubix-sysv* )
1488 machine=intel386 opsys=usg5-3
1489 ;;
1490
1491 ## Cydra 5
1492 cydra*-cydrome-sysv* )
1493 machine=cydra5 opsys=usg5-3
1494 ;;
1495
1496 ## Data General AViiON Machines
1497 ## DG changed naming conventions with the release of 5.4.4.10, they
1498 ## dropped the initial 5.4 but left the intervening R. Because of the
1499 ## R this shouldn't conflict with older versions of the OS (which I
1500 ## think were named like dgux4.*). In addition, DG new AViiONs series
1501 ## uses either Motorola M88k or Intel Pentium CPUs.
1502 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
1503 machine=aviion opsys=dgux4
1504 ;;
1505 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
1506 ## This name is dgux5-4-3 instead of dgux5-4r3
1507 ## to avoid a file name conflict on MSDOS.
1508 machine=aviion opsys=dgux5-4-3
1509 ;;
1510 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
1511 machine=aviion opsys=dgux5-4r2
1512 ;;
1513 m88k-dg-dgux* )
1514 machine=aviion opsys=dgux
1515 ;;
1516
1517 ## Data General AViiON Intel (x86) Machines
1518 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
1519 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
1520 i[345]86-dg-dguxR4* )
1521 machine=aviion-intel opsys=dgux4
1522 ;;
1523
1524 ## DECstations
1525 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1526 machine=pmax opsys=bsd4-2
1527 ;;
1528 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1529 machine=pmax opsys=bsd4-3
1530 ;;
1531 mips-dec-ultrix* )
1532 machine=pmax opsys=ultrix4-3
1533 ;;
1534 mips-dec-osf* )
1535 machine=pmax opsys=osf1
1536 ;;
1537 mips-dec-mach_bsd4.3* )
1538 machine=pmax opsys=mach-bsd4-3
1539 ;;
1540
1541 ## Motorola Delta machines
1542 m68k-motorola-sysv* | m68000-motorola-sysv* )
1543 machine=delta opsys=usg5-3
1544 if test -z "`type gnucc | grep 'not found'`"
1545 then
1546 if test -s /etc/167config
1547 then CC="gnucc -m68040"
1548 else CC="gnucc -m68881"
1549 fi
1550 else
1551 if test -z "`type gcc | grep 'not found'`"
1552 then CC=gcc
1553 else CC=cc
1554 fi
1555 fi
1556 ;;
1557 m88k-motorola-sysv4* )
1558 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1559 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1560 # I hope there are not other 4.0 versions for this machine
1561 # which really need usg5-4 instead.
1562 machine=delta88k opsys=usg5-4-2
1563 ;;
1564 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1565 machine=delta88k opsys=usg5-3
1566 ;;
1567
1568 ## Dual machines
1569 m68*-dual-sysv* )
1570 machine=dual opsys=usg5-2
1571 ;;
1572 m68*-dual-uniplus* )
1573 machine=dual opsys=unipl5-2
1574 ;;
1575
1576 ## Elxsi 6400
1577 elxsi-elxsi-sysv* )
1578 machine=elxsi opsys=usg5-2
1579 ;;
1580
1581 ## Encore machines
1582 ns16k-encore-bsd* )
1583 machine=ns16000 opsys=umax
1584 ;;
1585
1586 ## The GEC 63 - apparently, this port isn't really finished yet.
1587 # I'm sure we finished off the last of the machines, though. -- fx
1588
1589 ## Gould Power Node and NP1
1590 pn-gould-bsd4.2* )
1591 machine=gould opsys=bsd4-2
1592 ;;
1593 pn-gould-bsd4.3* )
1594 machine=gould opsys=bsd4-3
1595 ;;
1596 np1-gould-bsd* )
1597 machine=gould-np1 opsys=bsd4-3
1598 ;;
1599
1600 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
1601 ## as far as Emacs is concerned).
1602 m88k-harris-cxux* )
1603 # Build needs to be different on 7.0 and later releases
1604 case "`uname -r`" in
1605 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
1606 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
1607 esac
1608 NON_GNU_CPP="/lib/cpp"
1609 ;;
1610 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
1611 m68k-harris-cxux* )
1612 machine=nh3000 opsys=cxux
1613 ;;
1614 ## Harris power pc NightHawk running Power UNIX (Series 6000)
1615 powerpc-harris-powerunix )
1616 machine=nh6000 opsys=powerunix
1617 NON_GNU_CPP="cc -Xo -E -P"
1618 ;;
1619 ## SR2001/SR2201 running HI-UX/MPP
1620 hppa1.1-hitachi-hiuxmpp* )
1621 machine=sr2k opsys=hiuxmpp
1622 ;;
1623 hppa1.1-hitachi-hiuxwe2* )
1624 machine=sr2k opsys=hiuxwe2
1625 ;;
1626 ## Honeywell XPS100
1627 xps*-honeywell-sysv* )
1628 machine=xps100 opsys=usg5-2
1629 ;;
1630
1631 ## HP 9000 series 200 or 300
1632 m68*-hp-bsd* )
1633 machine=hp9000s300 opsys=bsd4-3
1634 ;;
1635 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
1636 m68*-hp-hpux* )
1637 case "`uname -r`" in
1638 ## Someone's system reports A.B8.05 for this.
1639 ## I wonder what other possibilities there are.
1640 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
1641 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
1642 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
1643 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
1644 *) machine=hp9000s300 opsys=hpux ;;
1645 esac
1646 ;;
1647
1648 ## HP 9000 series 700 and 800, running HP/UX
1649 hppa*-hp-hpux7* )
1650 machine=hp800 opsys=hpux
1651 ;;
1652 hppa*-hp-hpux8* )
1653 machine=hp800 opsys=hpux8
1654 ;;
1655 hppa*-hp-hpux9shr* )
1656 machine=hp800 opsys=hpux9shr
1657 ;;
1658 hppa*-hp-hpux9* )
1659 machine=hp800 opsys=hpux9
1660 ;;
1661 hppa*-hp-hpux10* )
1662 machine=hp800 opsys=hpux10
1663 ;;
1664 hppa*-hp-hpux1[1-9]* )
1665 machine=hp800 opsys=hpux11
1666 ;;
1667
1668 hppa*-*-linux-gnu* )
1669 machine=hp800 opsys=gnu-linux
1670 ;;
1671
1672 ## HP 9000 series 700 and 800, running HP/UX
1673 hppa*-hp-hpux* )
1674 ## Cross-compilation? Nah!
1675 case "`uname -r`" in
1676 ## Someone's system reports A.B8.05 for this.
1677 ## I wonder what other possibilities there are.
1678 *.B8.* ) machine=hp800 opsys=hpux8 ;;
1679 *.08.* ) machine=hp800 opsys=hpux8 ;;
1680 *.09.* ) machine=hp800 opsys=hpux9 ;;
1681 *) machine=hp800 opsys=hpux10 ;;
1682 esac
1683 ;;
1684 hppa*-*-nextstep* )
1685 machine=hp800 opsys=nextstep
1686 ;;
1687
1688 ## Orion machines
1689 orion-orion-bsd* )
1690 machine=orion opsys=bsd4-2
1691 ;;
1692 clipper-orion-bsd* )
1693 machine=orion105 opsys=bsd4-2
1694 ;;
1695
1696 ## IBM machines
1697 i[3456]86-ibm-aix1.1* )
1698 machine=ibmps2-aix opsys=usg5-2-2
1699 ;;
1700 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
1701 machine=ibmps2-aix opsys=usg5-3
1702 ;;
1703 i370-ibm-aix*)
1704 machine=ibm370aix opsys=usg5-3
1705 ;;
1706 s390-*-linux-gnu)
1707 machine=ibms390 opsys=gnu-linux
1708 ;;
1709 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
1710 machine=ibmrs6000 opsys=aix3-1
1711 ;;
1712 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
1713 machine=ibmrs6000 opsys=aix3-2-5
1714 ;;
1715 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
1716 machine=ibmrs6000 opsys=aix4-1
1717 ;;
1718 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
1719 machine=ibmrs6000 opsys=aix4-2
1720 ;;
1721 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
1722 machine=ibmrs6000 opsys=aix4
1723 ;;
1724 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
1725 machine=ibmrs6000 opsys=aix4-1
1726 ;;
1727 rs6000-ibm-aix* | powerpc-ibm-aix* )
1728 machine=ibmrs6000 opsys=aix3-2
1729 ;;
1730 romp-ibm-bsd4.3* )
1731 machine=ibmrt opsys=bsd4-3
1732 ;;
1733 romp-ibm-bsd4.2* )
1734 machine=ibmrt opsys=bsd4-2
1735 ;;
1736 romp-ibm-aos4.3* )
1737 machine=ibmrt opsys=bsd4-3
1738 ;;
1739 romp-ibm-aos4.2* )
1740 machine=ibmrt opsys=bsd4-2
1741 ;;
1742 romp-ibm-aos* )
1743 machine=ibmrt opsys=bsd4-3
1744 ;;
1745 romp-ibm-bsd* )
1746 machine=ibmrt opsys=bsd4-3
1747 ;;
1748 romp-ibm-aix* )
1749 machine=ibmrt-aix opsys=usg5-2-2
1750 ;;
1751
1752 ## Integrated Solutions `Optimum V'
1753 m68*-isi-bsd4.2* )
1754 machine=isi-ov opsys=bsd4-2
1755 ;;
1756 m68*-isi-bsd4.3* )
1757 machine=isi-ov opsys=bsd4-3
1758 ;;
1759
1760 ## Intel 386 machines where we do care about the manufacturer
1761 i[3456]86-intsys-sysv* )
1762 machine=is386 opsys=usg5-2-2
1763 ;;
1764
1765 ## Prime EXL
1766 i[3456]86-prime-sysv* )
1767 machine=i386 opsys=usg5-3
1768 ;;
1769
1770 ## Sequent Symmetry running Dynix
1771 i[3456]86-sequent-bsd* )
1772 machine=symmetry opsys=bsd4-3
1773 ;;
1774
1775 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
1776 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
1777 machine=sequent-ptx opsys=ptx4
1778 NON_GNU_CPP=/lib/cpp
1779 ;;
1780
1781 ## Sequent Symmetry running DYNIX/ptx
1782 ## Use the old cpp rather than the newer ANSI one.
1783 i[3456]86-sequent-ptx* )
1784 machine=sequent-ptx opsys=ptx
1785 NON_GNU_CPP="/lib/cpp"
1786 ;;
1787
1788 ## ncr machine running svr4.3.
1789 i[3456]86-ncr-sysv4.3 )
1790 machine=ncr386 opsys=usg5-4-3
1791 ;;
1792
1793 ## Unspecified sysv on an ncr machine defaults to svr4.2.
1794 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
1795 i[3456]86-ncr-sysv* )
1796 machine=ncr386 opsys=usg5-4-2
1797 ;;
1798
1799 ## Intel Paragon OSF/1
1800 i860-intel-osf1* )
1801 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
1802 ;;
1803
1804 ## Intel 860
1805 i860-*-sysv4* )
1806 machine=i860 opsys=usg5-4
1807 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
1808 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
1809 ;;
1810
1811 ## Macintosh PowerPC
1812 powerpc*-*-linux-gnu* )
1813 machine=macppc opsys=gnu-linux
1814 ;;
1815
1816 ## Masscomp machines
1817 m68*-masscomp-rtu* )
1818 machine=masscomp opsys=rtu
1819 ;;
1820
1821 ## Megatest machines
1822 m68*-megatest-bsd* )
1823 machine=mega68 opsys=bsd4-2
1824 ;;
1825
1826 ## Workstations sold by MIPS
1827 ## This is not necessarily all workstations using the MIPS processor -
1828 ## Irises are produced by SGI, and DECstations by DEC.
1829
1830 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
1831 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
1832 ## it gives for choosing between the alternatives seems to be "Use
1833 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
1834 ## the BSD world." I'll assume that these are instructions for
1835 ## handling two odd situations, and that every other situation
1836 ## should use mips.h and usg5-2-2, they being listed first.
1837 mips-mips-usg* )
1838 machine=mips4
1839 ## Fall through to the general code at the bottom to decide on the OS.
1840 ;;
1841 mips-mips-riscos4* )
1842 machine=mips4 opsys=bsd4-3
1843 NON_GNU_CC="cc -systype bsd43"
1844 NON_GNU_CPP="cc -systype bsd43 -E"
1845 ;;
1846 mips-mips-riscos5* )
1847 machine=mips4 opsys=riscos5
1848 NON_GNU_CC="cc -systype bsd43"
1849 NON_GNU_CPP="cc -systype bsd43 -E"
1850 ;;
1851 mips-mips-bsd* )
1852 machine=mips opsys=bsd4-3
1853 ;;
1854 mips-mips-* )
1855 machine=mips opsys=usg5-2-2
1856 ;;
1857
1858 ## NeXT
1859 m68*-next-* | m68k-*-nextstep* )
1860 machine=m68k opsys=nextstep
1861 ;;
1862
1863 ## The complete machine from National Semiconductor
1864 ns32k-ns-genix* )
1865 machine=ns32000 opsys=usg5-2
1866 ;;
1867
1868 ## NCR machines
1869 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
1870 machine=tower32 opsys=usg5-2-2
1871 ;;
1872 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
1873 machine=tower32v3 opsys=usg5-3
1874 ;;
1875
1876 ## NEC EWS4800
1877 mips-nec-sysv4*)
1878 machine=ews4800 opsys=ux4800
1879 ;;
1880
1881 ## Nixdorf Targon 31
1882 m68*-nixdorf-sysv* )
1883 machine=targon31 opsys=usg5-2-2
1884 ;;
1885
1886 ## Nu (TI or LMI)
1887 m68*-nu-sysv* )
1888 machine=nu opsys=usg5-2
1889 ;;
1890
1891 ## Plexus
1892 m68*-plexus-sysv* )
1893 machine=plexus opsys=usg5-2
1894 ;;
1895
1896 ## PowerPC reference platform
1897 powerpcle-*-solaris2* )
1898 machine=prep
1899 opsys=sol2-5
1900 ;;
1901
1902 ## Pyramid machines
1903 ## I don't really have any idea what sort of processor the Pyramid has,
1904 ## so I'm assuming it is its own architecture.
1905 pyramid-pyramid-bsd* )
1906 machine=pyramid opsys=bsd4-2
1907 ;;
1908
1909 ## Sequent Balance
1910 ns32k-sequent-bsd4.2* )
1911 machine=sequent opsys=bsd4-2
1912 ;;
1913 ns32k-sequent-bsd4.3* )
1914 machine=sequent opsys=bsd4-3
1915 ;;
1916
1917 ## Siemens Nixdorf
1918 mips-siemens-sysv* | mips-sni-sysv*)
1919 machine=mips-siemens opsys=usg5-4
1920 NON_GNU_CC=/usr/ccs/bin/cc
1921 NON_GNU_CPP=/usr/ccs/lib/cpp
1922 ;;
1923
1924 ## Silicon Graphics machines
1925 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
1926 m68*-sgi-iris3.5* )
1927 machine=irist opsys=iris3-5
1928 ;;
1929 m68*-sgi-iris3.6* | m68*-sgi-iris*)
1930 machine=irist opsys=iris3-6
1931 ;;
1932 ## Iris 4D
1933 mips-sgi-irix3* )
1934 machine=iris4d opsys=irix3-3
1935 ;;
1936 mips-sgi-irix4* )
1937 machine=iris4d opsys=irix4-0
1938 ;;
1939 mips-sgi-irix6.5 )
1940 machine=iris4d opsys=irix6-5
1941 # Without defining _LANGUAGE_C, things get masked out in the headers
1942 # so that, for instance, grepping for `free' in stdlib.h fails and
1943 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
1944 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
1945 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
1946 ;;
1947 mips-sgi-irix6* )
1948 machine=iris4d opsys=irix6-0
1949 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
1950 # but presumably it does no harm.
1951 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
1952 # -32 probably isn't necessary in later v.6s -- anyone know which?
1953 NON_GCC_TEST_OPTIONS=-32
1954 ;;
1955 mips-sgi-irix5.[01]* )
1956 machine=iris4d opsys=irix5-0
1957 ;;
1958 mips-sgi-irix5* | mips-sgi-irix* )
1959 machine=iris4d opsys=irix5-2
1960 ;;
1961
1962 ## SONY machines
1963 m68*-sony-bsd4.2* )
1964 machine=news opsys=bsd4-2
1965 ;;
1966 m68*-sony-bsd4.3* )
1967 machine=news opsys=bsd4-3
1968 ;;
1969 m68*-sony-newsos3* | m68*-sony-news3*)
1970 machine=news opsys=bsd4-3
1971 ;;
1972 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
1973 machine=news-risc opsys=bsd4-3
1974 ;;
1975 mips-sony-newsos6* )
1976 machine=news-r6 opsys=newsos6
1977 ;;
1978 mips-sony-news* )
1979 machine=news-risc opsys=newsos5
1980 ;;
1981
1982 ## Stride
1983 m68*-stride-sysv* )
1984 machine=stride opsys=usg5-2
1985 ;;
1986
1987 ## Suns
1988 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
1989 machine=sparc opsys=gnu-linux
1990 ;;
1991
1992 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
1993 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
1994 | rs6000-*-solaris2*)
1995 case "${canonical}" in
1996 m68*-sunos1* ) machine=sun1 ;;
1997 m68*-sunos2* ) machine=sun2 ;;
1998 m68* ) machine=sun3 ;;
1999 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
2000 i[3456]86-*-* ) machine=intel386 ;;
2001 powerpcle* ) machine=powerpcle ;;
2002 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2003 sparc* ) machine=sparc ;;
2004 * ) unported=yes ;;
2005 esac
2006 case "${canonical}" in
2007 ## The Sun386 didn't get past 4.0.
2008 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2009 *-sunos4.0* ) opsys=sunos4-0 ;;
2010 *-sunos4.1.[3-9]*noshare )
2011 ## This name is sunos413 instead of sunos4-1-3
2012 ## to avoid a file name conflict on MSDOS.
2013 opsys=sunos413
2014 NON_GNU_CPP=/usr/lib/cpp
2015 NON_GCC_TEST_OPTIONS=-Bstatic
2016 GCC_TEST_OPTIONS=-static
2017 ;;
2018 *-sunos4.1.[3-9]* | *-sunos4shr*)
2019 opsys=sunos4shr
2020 NON_GNU_CPP=/usr/lib/cpp
2021 ;;
2022 *-sunos4* | *-sunos )
2023 opsys=sunos4-1
2024 NON_GCC_TEST_OPTIONS=-Bstatic
2025 GCC_TEST_OPTIONS=-static
2026 ;;
2027 *-sunos5.3* | *-solaris2.3* )
2028 opsys=sol2-3
2029 NON_GNU_CPP=/usr/ccs/lib/cpp
2030 ;;
2031 *-sunos5.4* | *-solaris2.4* )
2032 opsys=sol2-4
2033 NON_GNU_CPP=/usr/ccs/lib/cpp
2034 RANLIB="ar -ts"
2035 ;;
2036 *-sunos5.5* | *-solaris2.5* )
2037 opsys=sol2-5
2038 NON_GNU_CPP=/usr/ccs/lib/cpp
2039 RANLIB="ar -ts"
2040 ;;
2041 *-sunos5* | *-solaris* )
2042 opsys=sol2-5
2043 NON_GNU_CPP=/usr/ccs/lib/cpp
2044 ;;
2045 * ) opsys=bsd4-2 ;;
2046 esac
2047 ## Watch out for a compiler that we know will not work.
2048 case "${canonical}" in
2049 *-solaris* | *-sunos5* )
2050 if [ "x$CC" = x/usr/ucb/cc ]; then
2051 ## /usr/ucb/cc doesn't work;
2052 ## we should find some other compiler that does work.
2053 unset CC
2054 fi
2055 ;;
2056 *) ;;
2057 esac
2058 ;;
2059 sparc-*-nextstep* )
2060 machine=sparc opsys=nextstep
2061 ;;
2062
2063 ## Tadpole 68k
2064 m68*-tadpole-sysv* )
2065 machine=tad68k opsys=usg5-3
2066 ;;
2067
2068 ## Tahoe machines
2069 tahoe-tahoe-bsd4.2* )
2070 machine=tahoe opsys=bsd4-2
2071 ;;
2072 tahoe-tahoe-bsd4.3* )
2073 machine=tahoe opsys=bsd4-3
2074 ;;
2075
2076 ## Tandem Integrity S2
2077 mips-tandem-sysv* )
2078 machine=tandem-s2 opsys=usg5-3
2079 ;;
2080
2081 ## Tektronix XD88
2082 m88k-tektronix-sysv3* )
2083 machine=tekxd88 opsys=usg5-3
2084 ;;
2085
2086 ## Tektronix 16000 box (6130?)
2087 ns16k-tektronix-bsd* )
2088 machine=ns16000 opsys=bsd4-2
2089 ;;
2090 ## Tektronix 4300
2091 ## src/m/tek4300.h hints that this is a m68k machine.
2092 m68*-tektronix-bsd* )
2093 machine=tek4300 opsys=bsd4-3
2094 ;;
2095
2096 ## Titan P2 or P3
2097 ## We seem to have lost the machine-description file titan.h!
2098 titan-titan-sysv* )
2099 machine=titan opsys=usg5-3
2100 ;;
2101
2102 ## Ustation E30 (SS5E)
2103 m68*-unisys-uniplus* )
2104 machine=ustation opsystem=unipl5-2
2105 ;;
2106
2107 ## Vaxen.
2108 vax-dec-* )
2109 machine=vax
2110 case "${canonical}" in
2111 *-bsd4.1* ) opsys=bsd4-1 ;;
2112 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
2113 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
2114 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
2115 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
2116 *-vms* ) opsys=vms ;;
2117 * ) unported=yes
2118 esac
2119 ;;
2120
2121 ## Whitechapel MG1
2122 ns16k-whitechapel-* )
2123 machine=mg1
2124 ## We don't know what sort of OS runs on these; we'll let the
2125 ## operating system guessing code below try.
2126 ;;
2127
2128 ## Wicat
2129 m68*-wicat-sysv* )
2130 machine=wicat opsys=usg5-2
2131 ;;
2132
2133 ## IA-64
2134 ia64*-*-linux* )
2135 machine=ia64 opsys=gnu-linux
2136 ;;
2137
2138 ## Intel 386 machines where we don't care about the manufacturer
2139 i[3456]86-*-* )
2140 machine=intel386
2141 case "${canonical}" in
2142 *-lynxos* ) opsys=lynxos ;;
2143 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
2144 *-isc2.2* ) opsys=isc2-2 ;;
2145 *-isc4.0* ) opsys=isc4-0 ;;
2146 *-isc4.* ) opsys=isc4-1
2147 GCC_TEST_OPTIONS=-posix
2148 NON_GCC_TEST_OPTIONS=-Xp
2149 ;;
2150 *-isc* ) opsys=isc3-0 ;;
2151 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
2152 *-esix* ) opsys=esix ;;
2153 *-xenix* ) opsys=xenix ;;
2154 *-linux-gnu* ) opsys=gnu-linux ;;
2155 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
2156 *-sco3.2v5* ) opsys=sco5
2157 NON_GNU_CPP=/lib/cpp
2158 # Prevent -belf from being passed to $CPP.
2159 # /lib/cpp does not accept it.
2160 OVERRIDE_CPPFLAGS=" "
2161 ;;
2162 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2163 *-386bsd* ) opsys=386bsd ;;
2164 *-nextstep* ) opsys=nextstep ;;
2165 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2166 esac
2167 ;;
2168
2169 ## m68k Linux-based GNU system
2170 m68k-*-linux-gnu* )
2171 machine=m68k opsys=gnu-linux
2172 ;;
2173
2174 ## Mips Linux-based GNU system
2175 mips-*-linux-gnu* )
2176 machine=mips opsys=gnu-linux
2177 ;;
2178
2179 ## UXP/DS
2180 sparc-fujitsu-sysv4* )
2181 machine=sparc opsys=uxpds
2182 NON_GNU_CPP=/usr/ccs/lib/cpp
2183 RANLIB="ar -ts"
2184 ;;
2185
2186 ## UXP/V
2187 f301-fujitsu-uxpv4.1)
2188 machine=f301 opsys=uxpv
2189 ;;
2190
2191 * )
2192 unported=yes
2193 ;;
2194 esac
2195
2196 ### If the code above didn't choose an operating system, just choose
2197 ### an operating system based on the configuration name. You really
2198 ### only want to use this when you have no idea what the right
2199 ### operating system is; if you know what operating systems a machine
2200 ### runs, it's cleaner to make it explicit in the case statement
2201 ### above.
2202 if test x"${opsys}" = x; then
2203 case "${canonical}" in
2204 *-gnu* ) opsys=gnu ;;
2205 *-bsd4.[01] ) opsys=bsd4-1 ;;
2206 *-bsd4.2 ) opsys=bsd4-2 ;;
2207 *-bsd4.3 ) opsys=bsd4-3 ;;
2208 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
2209 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
2210 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
2211 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
2212 *-sysv4.2uw* ) opsys=unixware ;;
2213 *-sysv4.1* | *-sysvr4.1* )
2214 NON_GNU_CPP=/usr/lib/cpp
2215 opsys=usg5-4 ;;
2216 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2217 if [ x$NON_GNU_CPP = x ]; then
2218 if [ -f /usr/ccs/lib/cpp ]; then
2219 NON_GNU_CPP=/usr/ccs/lib/cpp
2220 else
2221 NON_GNU_CPP=/lib/cpp
2222 fi
2223 fi
2224 opsys=usg5-4-2 ;;
2225 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2226 * )
2227 unported=yes
2228 ;;
2229 esac
2230 fi
2231
2232 if test $unported = yes; then
2233 { { echo "$as_me:2233: error: Emacs hasn't been ported to \`${canonical}' systems.
2234 Check \`etc/MACHINES' for recognized configuration names." >&5
2235 echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2236 Check \`etc/MACHINES' for recognized configuration names." >&2;}
2237 { (exit 1); exit 1; }; }
2238 fi
2239
2240 machfile="m/${machine}.h"
2241 opsysfile="s/${opsys}.h"
2242
2243 #### Choose a compiler.
2244 test -n "$CC" && cc_specified=yes
2245
2246 # Save the value of CFLAGS that the user specified.
2247 SPECIFIED_CFLAGS="$CFLAGS"
2248
2249 case ${with_gcc} in
2250 "yes" ) CC="gcc" GCC=yes ;;
2251 "no" ) : ${CC=cc} ;;
2252 * )
2253 esac
2254 ac_ext=c
2255 ac_cpp='$CPP $CPPFLAGS'
2256 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2257 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2258 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2259 if test -n "$ac_tool_prefix"; then
2260 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2261 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2262 echo "$as_me:2262: checking for $ac_word" >&5
2263 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2264 if test "${ac_cv_prog_CC+set}" = set; then
2265 echo $ECHO_N "(cached) $ECHO_C" >&6
2266 else
2267 if test -n "$CC"; then
2268 ac_cv_prog_CC="$CC" # Let the user override the test.
2269 else
2270 ac_save_IFS=$IFS; IFS=$ac_path_separator
2271 ac_dummy="$PATH"
2272 for ac_dir in $ac_dummy; do
2273 IFS=$ac_save_IFS
2274 test -z "$ac_dir" && ac_dir=.
2275 $as_executable_p "$ac_dir/$ac_word" || continue
2276 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2277 echo "$as_me:2277: found $ac_dir/$ac_word" >&5
2278 break
2279 done
2280
2281 fi
2282 fi
2283 CC=$ac_cv_prog_CC
2284 if test -n "$CC"; then
2285 echo "$as_me:2285: result: $CC" >&5
2286 echo "${ECHO_T}$CC" >&6
2287 else
2288 echo "$as_me:2288: result: no" >&5
2289 echo "${ECHO_T}no" >&6
2290 fi
2291
2292 fi
2293 if test -z "$ac_cv_prog_CC"; then
2294 ac_ct_CC=$CC
2295 # Extract the first word of "gcc", so it can be a program name with args.
2296 set dummy gcc; ac_word=$2
2297 echo "$as_me:2297: checking for $ac_word" >&5
2298 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2299 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2300 echo $ECHO_N "(cached) $ECHO_C" >&6
2301 else
2302 if test -n "$ac_ct_CC"; then
2303 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2304 else
2305 ac_save_IFS=$IFS; IFS=$ac_path_separator
2306 ac_dummy="$PATH"
2307 for ac_dir in $ac_dummy; do
2308 IFS=$ac_save_IFS
2309 test -z "$ac_dir" && ac_dir=.
2310 $as_executable_p "$ac_dir/$ac_word" || continue
2311 ac_cv_prog_ac_ct_CC="gcc"
2312 echo "$as_me:2312: found $ac_dir/$ac_word" >&5
2313 break
2314 done
2315
2316 fi
2317 fi
2318 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2319 if test -n "$ac_ct_CC"; then
2320 echo "$as_me:2320: result: $ac_ct_CC" >&5
2321 echo "${ECHO_T}$ac_ct_CC" >&6
2322 else
2323 echo "$as_me:2323: result: no" >&5
2324 echo "${ECHO_T}no" >&6
2325 fi
2326
2327 CC=$ac_ct_CC
2328 else
2329 CC="$ac_cv_prog_CC"
2330 fi
2331
2332 if test -z "$CC"; then
2333 if test -n "$ac_tool_prefix"; then
2334 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2335 set dummy ${ac_tool_prefix}cc; ac_word=$2
2336 echo "$as_me:2336: checking for $ac_word" >&5
2337 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2338 if test "${ac_cv_prog_CC+set}" = set; then
2339 echo $ECHO_N "(cached) $ECHO_C" >&6
2340 else
2341 if test -n "$CC"; then
2342 ac_cv_prog_CC="$CC" # Let the user override the test.
2343 else
2344 ac_save_IFS=$IFS; IFS=$ac_path_separator
2345 ac_dummy="$PATH"
2346 for ac_dir in $ac_dummy; do
2347 IFS=$ac_save_IFS
2348 test -z "$ac_dir" && ac_dir=.
2349 $as_executable_p "$ac_dir/$ac_word" || continue
2350 ac_cv_prog_CC="${ac_tool_prefix}cc"
2351 echo "$as_me:2351: found $ac_dir/$ac_word" >&5
2352 break
2353 done
2354
2355 fi
2356 fi
2357 CC=$ac_cv_prog_CC
2358 if test -n "$CC"; then
2359 echo "$as_me:2359: result: $CC" >&5
2360 echo "${ECHO_T}$CC" >&6
2361 else
2362 echo "$as_me:2362: result: no" >&5
2363 echo "${ECHO_T}no" >&6
2364 fi
2365
2366 fi
2367 if test -z "$ac_cv_prog_CC"; then
2368 ac_ct_CC=$CC
2369 # Extract the first word of "cc", so it can be a program name with args.
2370 set dummy cc; ac_word=$2
2371 echo "$as_me:2371: checking for $ac_word" >&5
2372 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2373 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2374 echo $ECHO_N "(cached) $ECHO_C" >&6
2375 else
2376 if test -n "$ac_ct_CC"; then
2377 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2378 else
2379 ac_save_IFS=$IFS; IFS=$ac_path_separator
2380 ac_dummy="$PATH"
2381 for ac_dir in $ac_dummy; do
2382 IFS=$ac_save_IFS
2383 test -z "$ac_dir" && ac_dir=.
2384 $as_executable_p "$ac_dir/$ac_word" || continue
2385 ac_cv_prog_ac_ct_CC="cc"
2386 echo "$as_me:2386: found $ac_dir/$ac_word" >&5
2387 break
2388 done
2389
2390 fi
2391 fi
2392 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2393 if test -n "$ac_ct_CC"; then
2394 echo "$as_me:2394: result: $ac_ct_CC" >&5
2395 echo "${ECHO_T}$ac_ct_CC" >&6
2396 else
2397 echo "$as_me:2397: result: no" >&5
2398 echo "${ECHO_T}no" >&6
2399 fi
2400
2401 CC=$ac_ct_CC
2402 else
2403 CC="$ac_cv_prog_CC"
2404 fi
2405
2406 fi
2407 if test -z "$CC"; then
2408 # Extract the first word of "cc", so it can be a program name with args.
2409 set dummy cc; ac_word=$2
2410 echo "$as_me:2410: checking for $ac_word" >&5
2411 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2412 if test "${ac_cv_prog_CC+set}" = set; then
2413 echo $ECHO_N "(cached) $ECHO_C" >&6
2414 else
2415 if test -n "$CC"; then
2416 ac_cv_prog_CC="$CC" # Let the user override the test.
2417 else
2418 ac_prog_rejected=no
2419 ac_save_IFS=$IFS; IFS=$ac_path_separator
2420 ac_dummy="$PATH"
2421 for ac_dir in $ac_dummy; do
2422 IFS=$ac_save_IFS
2423 test -z "$ac_dir" && ac_dir=.
2424 $as_executable_p "$ac_dir/$ac_word" || continue
2425 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2426 ac_prog_rejected=yes
2427 continue
2428 fi
2429 ac_cv_prog_CC="cc"
2430 echo "$as_me:2430: found $ac_dir/$ac_word" >&5
2431 break
2432 done
2433
2434 if test $ac_prog_rejected = yes; then
2435 # We found a bogon in the path, so make sure we never use it.
2436 set dummy $ac_cv_prog_CC
2437 shift
2438 if test $# != 0; then
2439 # We chose a different compiler from the bogus one.
2440 # However, it has the same basename, so the bogon will be chosen
2441 # first if we set CC to just the basename; use the full file name.
2442 shift
2443 set dummy "$ac_dir/$ac_word" ${1+"$@"}
2444 shift
2445 ac_cv_prog_CC="$@"
2446 fi
2447 fi
2448 fi
2449 fi
2450 CC=$ac_cv_prog_CC
2451 if test -n "$CC"; then
2452 echo "$as_me:2452: result: $CC" >&5
2453 echo "${ECHO_T}$CC" >&6
2454 else
2455 echo "$as_me:2455: result: no" >&5
2456 echo "${ECHO_T}no" >&6
2457 fi
2458
2459 fi
2460 if test -z "$CC"; then
2461 if test -n "$ac_tool_prefix"; then
2462 for ac_prog in cl
2463 do
2464 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2465 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2466 echo "$as_me:2466: checking for $ac_word" >&5
2467 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2468 if test "${ac_cv_prog_CC+set}" = set; then
2469 echo $ECHO_N "(cached) $ECHO_C" >&6
2470 else
2471 if test -n "$CC"; then
2472 ac_cv_prog_CC="$CC" # Let the user override the test.
2473 else
2474 ac_save_IFS=$IFS; IFS=$ac_path_separator
2475 ac_dummy="$PATH"
2476 for ac_dir in $ac_dummy; do
2477 IFS=$ac_save_IFS
2478 test -z "$ac_dir" && ac_dir=.
2479 $as_executable_p "$ac_dir/$ac_word" || continue
2480 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2481 echo "$as_me:2481: found $ac_dir/$ac_word" >&5
2482 break
2483 done
2484
2485 fi
2486 fi
2487 CC=$ac_cv_prog_CC
2488 if test -n "$CC"; then
2489 echo "$as_me:2489: result: $CC" >&5
2490 echo "${ECHO_T}$CC" >&6
2491 else
2492 echo "$as_me:2492: result: no" >&5
2493 echo "${ECHO_T}no" >&6
2494 fi
2495
2496 test -n "$CC" && break
2497 done
2498 fi
2499 if test -z "$CC"; then
2500 ac_ct_CC=$CC
2501 for ac_prog in cl
2502 do
2503 # Extract the first word of "$ac_prog", so it can be a program name with args.
2504 set dummy $ac_prog; ac_word=$2
2505 echo "$as_me:2505: checking for $ac_word" >&5
2506 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2507 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2508 echo $ECHO_N "(cached) $ECHO_C" >&6
2509 else
2510 if test -n "$ac_ct_CC"; then
2511 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2512 else
2513 ac_save_IFS=$IFS; IFS=$ac_path_separator
2514 ac_dummy="$PATH"
2515 for ac_dir in $ac_dummy; do
2516 IFS=$ac_save_IFS
2517 test -z "$ac_dir" && ac_dir=.
2518 $as_executable_p "$ac_dir/$ac_word" || continue
2519 ac_cv_prog_ac_ct_CC="$ac_prog"
2520 echo "$as_me:2520: found $ac_dir/$ac_word" >&5
2521 break
2522 done
2523
2524 fi
2525 fi
2526 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2527 if test -n "$ac_ct_CC"; then
2528 echo "$as_me:2528: result: $ac_ct_CC" >&5
2529 echo "${ECHO_T}$ac_ct_CC" >&6
2530 else
2531 echo "$as_me:2531: result: no" >&5
2532 echo "${ECHO_T}no" >&6
2533 fi
2534
2535 test -n "$ac_ct_CC" && break
2536 done
2537
2538 CC=$ac_ct_CC
2539 fi
2540
2541 fi
2542
2543 test -z "$CC" && { { echo "$as_me:2543: error: no acceptable cc found in \$PATH" >&5
2544 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
2545 { (exit 1); exit 1; }; }
2546
2547 # Provide some information about the compiler.
2548 echo "$as_me:2548:" \
2549 "checking for C compiler version" >&5
2550 ac_compiler=`set X $ac_compile; echo $2`
2551 { (eval echo "$as_me:2551: \"$ac_compiler --version </dev/null >&5\"") >&5
2552 (eval $ac_compiler --version </dev/null >&5) 2>&5
2553 ac_status=$?
2554 echo "$as_me:2554: \$? = $ac_status" >&5
2555 (exit $ac_status); }
2556 { (eval echo "$as_me:2556: \"$ac_compiler -v </dev/null >&5\"") >&5
2557 (eval $ac_compiler -v </dev/null >&5) 2>&5
2558 ac_status=$?
2559 echo "$as_me:2559: \$? = $ac_status" >&5
2560 (exit $ac_status); }
2561 { (eval echo "$as_me:2561: \"$ac_compiler -V </dev/null >&5\"") >&5
2562 (eval $ac_compiler -V </dev/null >&5) 2>&5
2563 ac_status=$?
2564 echo "$as_me:2564: \$? = $ac_status" >&5
2565 (exit $ac_status); }
2566
2567 cat >conftest.$ac_ext <<_ACEOF
2568 #line 2568 "configure"
2569 #include "confdefs.h"
2570
2571 int
2572 main ()
2573 {
2574
2575 ;
2576 return 0;
2577 }
2578 _ACEOF
2579 ac_clean_files_save=$ac_clean_files
2580 ac_clean_files="$ac_clean_files a.out a.exe"
2581 # Try to create an executable without -o first, disregard a.out.
2582 # It will help us diagnose broken compilers, and finding out an intuition
2583 # of exeext.
2584 echo "$as_me:2584: checking for C compiler default output" >&5
2585 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2586 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2587 if { (eval echo "$as_me:2587: \"$ac_link_default\"") >&5
2588 (eval $ac_link_default) 2>&5
2589 ac_status=$?
2590 echo "$as_me:2590: \$? = $ac_status" >&5
2591 (exit $ac_status); }; then
2592 # Find the output, starting from the most likely. This scheme is
2593 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2594 # resort.
2595 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
2596 ls a.out conftest 2>/dev/null;
2597 ls a.* conftest.* 2>/dev/null`; do
2598 case $ac_file in
2599 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2600 a.out ) # We found the default executable, but exeext='' is most
2601 # certainly right.
2602 break;;
2603 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2604 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2605 export ac_cv_exeext
2606 break;;
2607 * ) break;;
2608 esac
2609 done
2610 else
2611 echo "$as_me: failed program was:" >&5
2612 cat conftest.$ac_ext >&5
2613 { { echo "$as_me:2613: error: C compiler cannot create executables" >&5
2614 echo "$as_me: error: C compiler cannot create executables" >&2;}
2615 { (exit 77); exit 77; }; }
2616 fi
2617
2618 ac_exeext=$ac_cv_exeext
2619 echo "$as_me:2619: result: $ac_file" >&5
2620 echo "${ECHO_T}$ac_file" >&6
2621
2622 # Check the compiler produces executables we can run. If not, either
2623 # the compiler is broken, or we cross compile.
2624 echo "$as_me:2624: checking whether the C compiler works" >&5
2625 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2626 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2627 # If not cross compiling, check that we can run a simple program.
2628 if test "$cross_compiling" != yes; then
2629 if { ac_try='./$ac_file'
2630 { (eval echo "$as_me:2630: \"$ac_try\"") >&5
2631 (eval $ac_try) 2>&5
2632 ac_status=$?
2633 echo "$as_me:2633: \$? = $ac_status" >&5
2634 (exit $ac_status); }; }; then
2635 cross_compiling=no
2636 else
2637 if test "$cross_compiling" = maybe; then
2638 cross_compiling=yes
2639 else
2640 { { echo "$as_me:2640: error: cannot run C compiled programs.
2641 If you meant to cross compile, use \`--host'." >&5
2642 echo "$as_me: error: cannot run C compiled programs.
2643 If you meant to cross compile, use \`--host'." >&2;}
2644 { (exit 1); exit 1; }; }
2645 fi
2646 fi
2647 fi
2648 echo "$as_me:2648: result: yes" >&5
2649 echo "${ECHO_T}yes" >&6
2650
2651 rm -f a.out a.exe conftest$ac_cv_exeext
2652 ac_clean_files=$ac_clean_files_save
2653 # Check the compiler produces executables we can run. If not, either
2654 # the compiler is broken, or we cross compile.
2655 echo "$as_me:2655: checking whether we are cross compiling" >&5
2656 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2657 echo "$as_me:2657: result: $cross_compiling" >&5
2658 echo "${ECHO_T}$cross_compiling" >&6
2659
2660 echo "$as_me:2660: checking for executable suffix" >&5
2661 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
2662 if { (eval echo "$as_me:2662: \"$ac_link\"") >&5
2663 (eval $ac_link) 2>&5
2664 ac_status=$?
2665 echo "$as_me:2665: \$? = $ac_status" >&5
2666 (exit $ac_status); }; then
2667 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2668 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2669 # work properly (i.e., refer to `conftest.exe'), while it won't with
2670 # `rm'.
2671 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2672 case $ac_file in
2673 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2674 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2675 export ac_cv_exeext
2676 break;;
2677 * ) break;;
2678 esac
2679 done
2680 else
2681 { { echo "$as_me:2681: error: cannot compute EXEEXT: cannot compile and link" >&5
2682 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2683 { (exit 1); exit 1; }; }
2684 fi
2685
2686 rm -f conftest$ac_cv_exeext
2687 echo "$as_me:2687: result: $ac_cv_exeext" >&5
2688 echo "${ECHO_T}$ac_cv_exeext" >&6
2689
2690 rm -f conftest.$ac_ext
2691 EXEEXT=$ac_cv_exeext
2692 ac_exeext=$EXEEXT
2693 echo "$as_me:2693: checking for object suffix" >&5
2694 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2695 if test "${ac_cv_objext+set}" = set; then
2696 echo $ECHO_N "(cached) $ECHO_C" >&6
2697 else
2698 cat >conftest.$ac_ext <<_ACEOF
2699 #line 2699 "configure"
2700 #include "confdefs.h"
2701
2702 int
2703 main ()
2704 {
2705
2706 ;
2707 return 0;
2708 }
2709 _ACEOF
2710 rm -f conftest.o conftest.obj
2711 if { (eval echo "$as_me:2711: \"$ac_compile\"") >&5
2712 (eval $ac_compile) 2>&5
2713 ac_status=$?
2714 echo "$as_me:2714: \$? = $ac_status" >&5
2715 (exit $ac_status); }; then
2716 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2717 case $ac_file in
2718 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2719 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2720 break;;
2721 esac
2722 done
2723 else
2724 echo "$as_me: failed program was:" >&5
2725 cat conftest.$ac_ext >&5
2726 { { echo "$as_me:2726: error: cannot compute OBJEXT: cannot compile" >&5
2727 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2728 { (exit 1); exit 1; }; }
2729 fi
2730
2731 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2732 fi
2733 echo "$as_me:2733: result: $ac_cv_objext" >&5
2734 echo "${ECHO_T}$ac_cv_objext" >&6
2735 OBJEXT=$ac_cv_objext
2736 ac_objext=$OBJEXT
2737 echo "$as_me:2737: checking whether we are using the GNU C compiler" >&5
2738 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2739 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2740 echo $ECHO_N "(cached) $ECHO_C" >&6
2741 else
2742 cat >conftest.$ac_ext <<_ACEOF
2743 #line 2743 "configure"
2744 #include "confdefs.h"
2745
2746 int
2747 main ()
2748 {
2749 #ifndef __GNUC__
2750 choke me
2751 #endif
2752
2753 ;
2754 return 0;
2755 }
2756 _ACEOF
2757 rm -f conftest.$ac_objext
2758 if { (eval echo "$as_me:2758: \"$ac_compile\"") >&5
2759 (eval $ac_compile) 2>&5
2760 ac_status=$?
2761 echo "$as_me:2761: \$? = $ac_status" >&5
2762 (exit $ac_status); } &&
2763 { ac_try='test -s conftest.$ac_objext'
2764 { (eval echo "$as_me:2764: \"$ac_try\"") >&5
2765 (eval $ac_try) 2>&5
2766 ac_status=$?
2767 echo "$as_me:2767: \$? = $ac_status" >&5
2768 (exit $ac_status); }; }; then
2769 ac_compiler_gnu=yes
2770 else
2771 echo "$as_me: failed program was:" >&5
2772 cat conftest.$ac_ext >&5
2773 ac_compiler_gnu=no
2774 fi
2775 rm -f conftest.$ac_objext conftest.$ac_ext
2776 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2777
2778 fi
2779 echo "$as_me:2779: result: $ac_cv_c_compiler_gnu" >&5
2780 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2781 GCC=`test $ac_compiler_gnu = yes && echo yes`
2782 ac_test_CFLAGS=${CFLAGS+set}
2783 ac_save_CFLAGS=$CFLAGS
2784 CFLAGS="-g"
2785 echo "$as_me:2785: checking whether $CC accepts -g" >&5
2786 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2787 if test "${ac_cv_prog_cc_g+set}" = set; then
2788 echo $ECHO_N "(cached) $ECHO_C" >&6
2789 else
2790 cat >conftest.$ac_ext <<_ACEOF
2791 #line 2791 "configure"
2792 #include "confdefs.h"
2793
2794 int
2795 main ()
2796 {
2797
2798 ;
2799 return 0;
2800 }
2801 _ACEOF
2802 rm -f conftest.$ac_objext
2803 if { (eval echo "$as_me:2803: \"$ac_compile\"") >&5
2804 (eval $ac_compile) 2>&5
2805 ac_status=$?
2806 echo "$as_me:2806: \$? = $ac_status" >&5
2807 (exit $ac_status); } &&
2808 { ac_try='test -s conftest.$ac_objext'
2809 { (eval echo "$as_me:2809: \"$ac_try\"") >&5
2810 (eval $ac_try) 2>&5
2811 ac_status=$?
2812 echo "$as_me:2812: \$? = $ac_status" >&5
2813 (exit $ac_status); }; }; then
2814 ac_cv_prog_cc_g=yes
2815 else
2816 echo "$as_me: failed program was:" >&5
2817 cat conftest.$ac_ext >&5
2818 ac_cv_prog_cc_g=no
2819 fi
2820 rm -f conftest.$ac_objext conftest.$ac_ext
2821 fi
2822 echo "$as_me:2822: result: $ac_cv_prog_cc_g" >&5
2823 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2824 if test "$ac_test_CFLAGS" = set; then
2825 CFLAGS=$ac_save_CFLAGS
2826 elif test $ac_cv_prog_cc_g = yes; then
2827 if test "$GCC" = yes; then
2828 CFLAGS="-g -O2"
2829 else
2830 CFLAGS="-g"
2831 fi
2832 else
2833 if test "$GCC" = yes; then
2834 CFLAGS="-O2"
2835 else
2836 CFLAGS=
2837 fi
2838 fi
2839 # Some people use a C++ compiler to compile C. Since we use `exit',
2840 # in C++ we need to declare it. In case someone uses the same compiler
2841 # for both compiling C and C++ we need to have the C++ compiler decide
2842 # the declaration of exit, since it's the most demanding environment.
2843 cat >conftest.$ac_ext <<_ACEOF
2844 #ifndef __cplusplus
2845 choke me
2846 #endif
2847 _ACEOF
2848 rm -f conftest.$ac_objext
2849 if { (eval echo "$as_me:2849: \"$ac_compile\"") >&5
2850 (eval $ac_compile) 2>&5
2851 ac_status=$?
2852 echo "$as_me:2852: \$? = $ac_status" >&5
2853 (exit $ac_status); } &&
2854 { ac_try='test -s conftest.$ac_objext'
2855 { (eval echo "$as_me:2855: \"$ac_try\"") >&5
2856 (eval $ac_try) 2>&5
2857 ac_status=$?
2858 echo "$as_me:2858: \$? = $ac_status" >&5
2859 (exit $ac_status); }; }; then
2860 for ac_declaration in \
2861 ''\
2862 '#include <stdlib.h>' \
2863 'extern "C" void std::exit (int) throw (); using std::exit;' \
2864 'extern "C" void std::exit (int); using std::exit;' \
2865 'extern "C" void exit (int) throw ();' \
2866 'extern "C" void exit (int);' \
2867 'void exit (int);'
2868 do
2869 cat >conftest.$ac_ext <<_ACEOF
2870 #line 2870 "configure"
2871 #include "confdefs.h"
2872 #include <stdlib.h>
2873 $ac_declaration
2874 int
2875 main ()
2876 {
2877 exit (42);
2878 ;
2879 return 0;
2880 }
2881 _ACEOF
2882 rm -f conftest.$ac_objext
2883 if { (eval echo "$as_me:2883: \"$ac_compile\"") >&5
2884 (eval $ac_compile) 2>&5
2885 ac_status=$?
2886 echo "$as_me:2886: \$? = $ac_status" >&5
2887 (exit $ac_status); } &&
2888 { ac_try='test -s conftest.$ac_objext'
2889 { (eval echo "$as_me:2889: \"$ac_try\"") >&5
2890 (eval $ac_try) 2>&5
2891 ac_status=$?
2892 echo "$as_me:2892: \$? = $ac_status" >&5
2893 (exit $ac_status); }; }; then
2894 :
2895 else
2896 echo "$as_me: failed program was:" >&5
2897 cat conftest.$ac_ext >&5
2898 continue
2899 fi
2900 rm -f conftest.$ac_objext conftest.$ac_ext
2901 cat >conftest.$ac_ext <<_ACEOF
2902 #line 2902 "configure"
2903 #include "confdefs.h"
2904 $ac_declaration
2905 int
2906 main ()
2907 {
2908 exit (42);
2909 ;
2910 return 0;
2911 }
2912 _ACEOF
2913 rm -f conftest.$ac_objext
2914 if { (eval echo "$as_me:2914: \"$ac_compile\"") >&5
2915 (eval $ac_compile) 2>&5
2916 ac_status=$?
2917 echo "$as_me:2917: \$? = $ac_status" >&5
2918 (exit $ac_status); } &&
2919 { ac_try='test -s conftest.$ac_objext'
2920 { (eval echo "$as_me:2920: \"$ac_try\"") >&5
2921 (eval $ac_try) 2>&5
2922 ac_status=$?
2923 echo "$as_me:2923: \$? = $ac_status" >&5
2924 (exit $ac_status); }; }; then
2925 break
2926 else
2927 echo "$as_me: failed program was:" >&5
2928 cat conftest.$ac_ext >&5
2929 fi
2930 rm -f conftest.$ac_objext conftest.$ac_ext
2931 done
2932 rm -f conftest*
2933 if test -n "$ac_declaration"; then
2934 echo '#ifdef __cplusplus' >>confdefs.h
2935 echo $ac_declaration >>confdefs.h
2936 echo '#endif' >>confdefs.h
2937 fi
2938
2939 else
2940 echo "$as_me: failed program was:" >&5
2941 cat conftest.$ac_ext >&5
2942 fi
2943 rm -f conftest.$ac_objext conftest.$ac_ext
2944 ac_ext=c
2945 ac_cpp='$CPP $CPPFLAGS'
2946 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2947 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2948 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2949
2950 # On Suns, sometimes $CPP names a directory.
2951 if test -n "$CPP" && test -d "$CPP"; then
2952 CPP=
2953 fi
2954
2955 #### Some systems specify a CPP to use unless we are using GCC.
2956 #### Now that we know whether we are using GCC, we can decide whether
2957 #### to use that one.
2958 if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
2959 then
2960 CPP="$NON_GNU_CPP"
2961 fi
2962
2963 #### Some systems specify a CC to use unless we are using GCC.
2964 #### Now that we know whether we are using GCC, we can decide whether
2965 #### to use that one.
2966 if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
2967 test x$cc_specified != xyes
2968 then
2969 CC="$NON_GNU_CC"
2970 fi
2971
2972 if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
2973 then
2974 CC="$CC $GCC_TEST_OPTIONS"
2975 fi
2976
2977 if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
2978 then
2979 CC="$CC $NON_GCC_TEST_OPTIONS"
2980 fi
2981
2982 if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
2983 then
2984 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
2985 fi
2986
2987 if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
2988 then
2989 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
2990 fi
2991
2992 #### Some other nice autoconf tests. If you add a test here which
2993 #### should make an entry in src/config.h, don't forget to add an
2994 #### #undef clause to src/config.h.in for autoconf to modify.
2995
2996 echo "$as_me:2996: checking whether ln -s works" >&5
2997 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2998 LN_S=$as_ln_s
2999 if test "$LN_S" = "ln -s"; then
3000 echo "$as_me:3000: result: yes" >&5
3001 echo "${ECHO_T}yes" >&6
3002 else
3003 echo "$as_me:3003: result: no, using $LN_S" >&5
3004 echo "${ECHO_T}no, using $LN_S" >&6
3005 fi
3006
3007 ac_ext=c
3008 ac_cpp='$CPP $CPPFLAGS'
3009 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3010 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3011 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3012 echo "$as_me:3012: checking how to run the C preprocessor" >&5
3013 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3014 # On Suns, sometimes $CPP names a directory.
3015 if test -n "$CPP" && test -d "$CPP"; then
3016 CPP=
3017 fi
3018 if test -z "$CPP"; then
3019 if test "${ac_cv_prog_CPP+set}" = set; then
3020 echo $ECHO_N "(cached) $ECHO_C" >&6
3021 else
3022 # Double quotes because CPP needs to be expanded
3023 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3024 do
3025 ac_preproc_ok=false
3026 for ac_c_preproc_warn_flag in '' yes
3027 do
3028 # Use a header file that comes with gcc, so configuring glibc
3029 # with a fresh cross-compiler works.
3030 # On the NeXT, cc -E runs the code through the compiler's parser,
3031 # not just through cpp. "Syntax error" is here to catch this case.
3032 cat >conftest.$ac_ext <<_ACEOF
3033 #line 3033 "configure"
3034 #include "confdefs.h"
3035 #include <assert.h>
3036 Syntax error
3037 _ACEOF
3038 if { (eval echo "$as_me:3038: \"$ac_cpp conftest.$ac_ext\"") >&5
3039 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3040 ac_status=$?
3041 egrep -v '^ *\+' conftest.er1 >conftest.err
3042 rm -f conftest.er1
3043 cat conftest.err >&5
3044 echo "$as_me:3044: \$? = $ac_status" >&5
3045 (exit $ac_status); } >/dev/null; then
3046 if test -s conftest.err; then
3047 ac_cpp_err=$ac_c_preproc_warn_flag
3048 else
3049 ac_cpp_err=
3050 fi
3051 else
3052 ac_cpp_err=yes
3053 fi
3054 if test -z "$ac_cpp_err"; then
3055 :
3056 else
3057 echo "$as_me: failed program was:" >&5
3058 cat conftest.$ac_ext >&5
3059 # Broken: fails on valid input.
3060 continue
3061 fi
3062 rm -f conftest.err conftest.$ac_ext
3063
3064 # OK, works on sane cases. Now check whether non-existent headers
3065 # can be detected and how.
3066 cat >conftest.$ac_ext <<_ACEOF
3067 #line 3067 "configure"
3068 #include "confdefs.h"
3069 #include <ac_nonexistent.h>
3070 _ACEOF
3071 if { (eval echo "$as_me:3071: \"$ac_cpp conftest.$ac_ext\"") >&5
3072 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3073 ac_status=$?
3074 egrep -v '^ *\+' conftest.er1 >conftest.err
3075 rm -f conftest.er1
3076 cat conftest.err >&5
3077 echo "$as_me:3077: \$? = $ac_status" >&5
3078 (exit $ac_status); } >/dev/null; then
3079 if test -s conftest.err; then
3080 ac_cpp_err=$ac_c_preproc_warn_flag
3081 else
3082 ac_cpp_err=
3083 fi
3084 else
3085 ac_cpp_err=yes
3086 fi
3087 if test -z "$ac_cpp_err"; then
3088 # Broken: success on invalid input.
3089 continue
3090 else
3091 echo "$as_me: failed program was:" >&5
3092 cat conftest.$ac_ext >&5
3093 # Passes both tests.
3094 ac_preproc_ok=:
3095 break
3096 fi
3097 rm -f conftest.err conftest.$ac_ext
3098
3099 done
3100 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3101 rm -f conftest.err conftest.$ac_ext
3102 if $ac_preproc_ok; then
3103 break
3104 fi
3105
3106 done
3107 ac_cv_prog_CPP=$CPP
3108
3109 fi
3110 CPP=$ac_cv_prog_CPP
3111 else
3112 ac_cv_prog_CPP=$CPP
3113 fi
3114 echo "$as_me:3114: result: $CPP" >&5
3115 echo "${ECHO_T}$CPP" >&6
3116 ac_preproc_ok=false
3117 for ac_c_preproc_warn_flag in '' yes
3118 do
3119 # Use a header file that comes with gcc, so configuring glibc
3120 # with a fresh cross-compiler works.
3121 # On the NeXT, cc -E runs the code through the compiler's parser,
3122 # not just through cpp. "Syntax error" is here to catch this case.
3123 cat >conftest.$ac_ext <<_ACEOF
3124 #line 3124 "configure"
3125 #include "confdefs.h"
3126 #include <assert.h>
3127 Syntax error
3128 _ACEOF
3129 if { (eval echo "$as_me:3129: \"$ac_cpp conftest.$ac_ext\"") >&5
3130 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3131 ac_status=$?
3132 egrep -v '^ *\+' conftest.er1 >conftest.err
3133 rm -f conftest.er1
3134 cat conftest.err >&5
3135 echo "$as_me:3135: \$? = $ac_status" >&5
3136 (exit $ac_status); } >/dev/null; then
3137 if test -s conftest.err; then
3138 ac_cpp_err=$ac_c_preproc_warn_flag
3139 else
3140 ac_cpp_err=
3141 fi
3142 else
3143 ac_cpp_err=yes
3144 fi
3145 if test -z "$ac_cpp_err"; then
3146 :
3147 else
3148 echo "$as_me: failed program was:" >&5
3149 cat conftest.$ac_ext >&5
3150 # Broken: fails on valid input.
3151 continue
3152 fi
3153 rm -f conftest.err conftest.$ac_ext
3154
3155 # OK, works on sane cases. Now check whether non-existent headers
3156 # can be detected and how.
3157 cat >conftest.$ac_ext <<_ACEOF
3158 #line 3158 "configure"
3159 #include "confdefs.h"
3160 #include <ac_nonexistent.h>
3161 _ACEOF
3162 if { (eval echo "$as_me:3162: \"$ac_cpp conftest.$ac_ext\"") >&5
3163 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3164 ac_status=$?
3165 egrep -v '^ *\+' conftest.er1 >conftest.err
3166 rm -f conftest.er1
3167 cat conftest.err >&5
3168 echo "$as_me:3168: \$? = $ac_status" >&5
3169 (exit $ac_status); } >/dev/null; then
3170 if test -s conftest.err; then
3171 ac_cpp_err=$ac_c_preproc_warn_flag
3172 else
3173 ac_cpp_err=
3174 fi
3175 else
3176 ac_cpp_err=yes
3177 fi
3178 if test -z "$ac_cpp_err"; then
3179 # Broken: success on invalid input.
3180 continue
3181 else
3182 echo "$as_me: failed program was:" >&5
3183 cat conftest.$ac_ext >&5
3184 # Passes both tests.
3185 ac_preproc_ok=:
3186 break
3187 fi
3188 rm -f conftest.err conftest.$ac_ext
3189
3190 done
3191 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3192 rm -f conftest.err conftest.$ac_ext
3193 if $ac_preproc_ok; then
3194 :
3195 else
3196 { { echo "$as_me:3196: error: C preprocessor \"$CPP\" fails sanity check" >&5
3197 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3198 { (exit 1); exit 1; }; }
3199 fi
3200
3201 ac_ext=c
3202 ac_cpp='$CPP $CPPFLAGS'
3203 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3204 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3205 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3206
3207 # Find a good install program. We prefer a C program (faster),
3208 # so one script is as good as another. But avoid the broken or
3209 # incompatible versions:
3210 # SysV /etc/install, /usr/sbin/install
3211 # SunOS /usr/etc/install
3212 # IRIX /sbin/install
3213 # AIX /bin/install
3214 # AmigaOS /C/install, which installs bootblocks on floppy discs
3215 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3216 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3217 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3218 # ./install, which can be erroneously created by make from ./install.sh.
3219 echo "$as_me:3219: checking for a BSD compatible install" >&5
3220 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3221 if test -z "$INSTALL"; then
3222 if test "${ac_cv_path_install+set}" = set; then
3223 echo $ECHO_N "(cached) $ECHO_C" >&6
3224 else
3225 ac_save_IFS=$IFS; IFS=$ac_path_separator
3226 for ac_dir in $PATH; do
3227 IFS=$ac_save_IFS
3228 # Account for people who put trailing slashes in PATH elements.
3229 case $ac_dir/ in
3230 / | ./ | .// | /cC/* \
3231 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3232 | /usr/ucb/* ) ;;
3233 *)
3234 # OSF1 and SCO ODT 3.0 have their own names for install.
3235 # Don't use installbsd from OSF since it installs stuff as root
3236 # by default.
3237 for ac_prog in ginstall scoinst install; do
3238 if $as_executable_p "$ac_dir/$ac_prog"; then
3239 if test $ac_prog = install &&
3240 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3241 # AIX install. It has an incompatible calling convention.
3242 :
3243 elif test $ac_prog = install &&
3244 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3245 # program-specific install script used by HP pwplus--don't use.
3246 :
3247 else
3248 ac_cv_path_install="$ac_dir/$ac_prog -c"
3249 break 2
3250 fi
3251 fi
3252 done
3253 ;;
3254 esac
3255 done
3256
3257 fi
3258 if test "${ac_cv_path_install+set}" = set; then
3259 INSTALL=$ac_cv_path_install
3260 else
3261 # As a last resort, use the slow shell script. We don't cache a
3262 # path for INSTALL within a source directory, because that will
3263 # break other packages using the cache if that directory is
3264 # removed, or if the path is relative.
3265 INSTALL=$ac_install_sh
3266 fi
3267 fi
3268 echo "$as_me:3268: result: $INSTALL" >&5
3269 echo "${ECHO_T}$INSTALL" >&6
3270
3271 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3272 # It thinks the first close brace ends the variable substitution.
3273 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3274
3275 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3276
3277 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3278
3279 for ac_prog in 'bison -y' byacc
3280 do
3281 # Extract the first word of "$ac_prog", so it can be a program name with args.
3282 set dummy $ac_prog; ac_word=$2
3283 echo "$as_me:3283: checking for $ac_word" >&5
3284 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3285 if test "${ac_cv_prog_YACC+set}" = set; then
3286 echo $ECHO_N "(cached) $ECHO_C" >&6
3287 else
3288 if test -n "$YACC"; then
3289 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3290 else
3291 ac_save_IFS=$IFS; IFS=$ac_path_separator
3292 ac_dummy="$PATH"
3293 for ac_dir in $ac_dummy; do
3294 IFS=$ac_save_IFS
3295 test -z "$ac_dir" && ac_dir=.
3296 $as_executable_p "$ac_dir/$ac_word" || continue
3297 ac_cv_prog_YACC="$ac_prog"
3298 echo "$as_me:3298: found $ac_dir/$ac_word" >&5
3299 break
3300 done
3301
3302 fi
3303 fi
3304 YACC=$ac_cv_prog_YACC
3305 if test -n "$YACC"; then
3306 echo "$as_me:3306: result: $YACC" >&5
3307 echo "${ECHO_T}$YACC" >&6
3308 else
3309 echo "$as_me:3309: result: no" >&5
3310 echo "${ECHO_T}no" >&6
3311 fi
3312
3313 test -n "$YACC" && break
3314 done
3315 test -n "$YACC" || YACC="yacc"
3316
3317 if test "x$RANLIB" = x; then
3318 if test -n "$ac_tool_prefix"; then
3319 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3320 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3321 echo "$as_me:3321: checking for $ac_word" >&5
3322 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3323 if test "${ac_cv_prog_RANLIB+set}" = set; then
3324 echo $ECHO_N "(cached) $ECHO_C" >&6
3325 else
3326 if test -n "$RANLIB"; then
3327 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3328 else
3329 ac_save_IFS=$IFS; IFS=$ac_path_separator
3330 ac_dummy="$PATH"
3331 for ac_dir in $ac_dummy; do
3332 IFS=$ac_save_IFS
3333 test -z "$ac_dir" && ac_dir=.
3334 $as_executable_p "$ac_dir/$ac_word" || continue
3335 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3336 echo "$as_me:3336: found $ac_dir/$ac_word" >&5
3337 break
3338 done
3339
3340 fi
3341 fi
3342 RANLIB=$ac_cv_prog_RANLIB
3343 if test -n "$RANLIB"; then
3344 echo "$as_me:3344: result: $RANLIB" >&5
3345 echo "${ECHO_T}$RANLIB" >&6
3346 else
3347 echo "$as_me:3347: result: no" >&5
3348 echo "${ECHO_T}no" >&6
3349 fi
3350
3351 fi
3352 if test -z "$ac_cv_prog_RANLIB"; then
3353 ac_ct_RANLIB=$RANLIB
3354 # Extract the first word of "ranlib", so it can be a program name with args.
3355 set dummy ranlib; ac_word=$2
3356 echo "$as_me:3356: checking for $ac_word" >&5
3357 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3358 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3359 echo $ECHO_N "(cached) $ECHO_C" >&6
3360 else
3361 if test -n "$ac_ct_RANLIB"; then
3362 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3363 else
3364 ac_save_IFS=$IFS; IFS=$ac_path_separator
3365 ac_dummy="$PATH"
3366 for ac_dir in $ac_dummy; do
3367 IFS=$ac_save_IFS
3368 test -z "$ac_dir" && ac_dir=.
3369 $as_executable_p "$ac_dir/$ac_word" || continue
3370 ac_cv_prog_ac_ct_RANLIB="ranlib"
3371 echo "$as_me:3371: found $ac_dir/$ac_word" >&5
3372 break
3373 done
3374
3375 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3376 fi
3377 fi
3378 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3379 if test -n "$ac_ct_RANLIB"; then
3380 echo "$as_me:3380: result: $ac_ct_RANLIB" >&5
3381 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3382 else
3383 echo "$as_me:3383: result: no" >&5
3384 echo "${ECHO_T}no" >&6
3385 fi
3386
3387 RANLIB=$ac_ct_RANLIB
3388 else
3389 RANLIB="$ac_cv_prog_RANLIB"
3390 fi
3391
3392 fi
3393
3394 echo "$as_me:3394: checking for AIX" >&5
3395 echo $ECHO_N "checking for AIX... $ECHO_C" >&6
3396 cat >conftest.$ac_ext <<_ACEOF
3397 #line 3397 "configure"
3398 #include "confdefs.h"
3399 #ifdef _AIX
3400 yes
3401 #endif
3402
3403 _ACEOF
3404 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3405 egrep "yes" >/dev/null 2>&1; then
3406 echo "$as_me:3406: result: yes" >&5
3407 echo "${ECHO_T}yes" >&6
3408 cat >>confdefs.h <<\EOF
3409 #define _ALL_SOURCE 1
3410 EOF
3411
3412 else
3413 echo "$as_me:3413: result: no" >&5
3414 echo "${ECHO_T}no" >&6
3415 fi
3416 rm -f conftest*
3417
3418 #### Extract some information from the operating system and machine files.
3419
3420 { echo "$as_me:3420: checking the machine- and system-dependent files to find out
3421 - which libraries the lib-src programs will want, and
3422 - whether the GNU malloc routines are usable..." >&5
3423 echo "$as_me: checking the machine- and system-dependent files to find out
3424 - which libraries the lib-src programs will want, and
3425 - whether the GNU malloc routines are usable..." >&6;}
3426
3427 ### First figure out CFLAGS (which we use for running the compiler here)
3428 ### and REAL_CFLAGS (which we use for real compilation).
3429 ### The two are the same except on a few systems, where they are made
3430 ### different to work around various lossages. For example,
3431 ### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
3432 ### as implying static linking.
3433
3434 ### If the CFLAGS env var is specified, we use that value
3435 ### instead of the default.
3436
3437 ### It's not important that this name contain the PID; you can't run
3438 ### two configures in the same directory and have anything work
3439 ### anyway.
3440 tempcname="conftest.c"
3441
3442 echo '
3443 #include "'${srcdir}'/src/'${opsysfile}'"
3444 #include "'${srcdir}'/src/'${machfile}'"
3445 #ifndef LIBS_MACHINE
3446 #define LIBS_MACHINE
3447 #endif
3448 #ifndef LIBS_SYSTEM
3449 #define LIBS_SYSTEM
3450 #endif
3451 #ifndef C_SWITCH_SYSTEM
3452 #define C_SWITCH_SYSTEM
3453 #endif
3454 #ifndef C_SWITCH_MACHINE
3455 #define C_SWITCH_MACHINE
3456 #endif
3457 configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
3458 configure___ c_switch_system=C_SWITCH_SYSTEM
3459 configure___ c_switch_machine=C_SWITCH_MACHINE
3460
3461 #ifndef LIB_X11_LIB
3462 #define LIB_X11_LIB -lX11
3463 #endif
3464
3465 #ifndef LIBX11_MACHINE
3466 #define LIBX11_MACHINE
3467 #endif
3468
3469 #ifndef LIBX11_SYSTEM
3470 #define LIBX11_SYSTEM
3471 #endif
3472 configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
3473
3474 #ifdef UNEXEC
3475 configure___ unexec=UNEXEC
3476 #else
3477 configure___ unexec=unexec.o
3478 #endif
3479
3480 #ifdef SYSTEM_MALLOC
3481 configure___ system_malloc=yes
3482 #else
3483 configure___ system_malloc=no
3484 #endif
3485
3486 #ifdef USE_MMAP_FOR_BUFFERS
3487 configure___ use_mmap_for_buffers=yes
3488 #else
3489 configure___ use_mmap_for_buffers=no
3490 #endif
3491
3492 #ifndef C_DEBUG_SWITCH
3493 #define C_DEBUG_SWITCH -g
3494 #endif
3495
3496 #ifndef C_OPTIMIZE_SWITCH
3497 #ifdef __GNUC__
3498 #define C_OPTIMIZE_SWITCH -O2
3499 #else
3500 #define C_OPTIMIZE_SWITCH -O
3501 #endif
3502 #endif
3503
3504 #ifndef LD_SWITCH_MACHINE
3505 #define LD_SWITCH_MACHINE
3506 #endif
3507
3508 #ifndef LD_SWITCH_SYSTEM
3509 #define LD_SWITCH_SYSTEM
3510 #endif
3511
3512 #ifndef LD_SWITCH_X_SITE_AUX
3513 #define LD_SWITCH_X_SITE_AUX
3514 #endif
3515
3516 configure___ ld_switch_system=LD_SWITCH_SYSTEM
3517 configure___ ld_switch_machine=LD_SWITCH_MACHINE
3518
3519 #ifdef THIS_IS_CONFIGURE
3520
3521 /* Get the CFLAGS for tests in configure. */
3522 #ifdef __GNUC__
3523 configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3524 #else
3525 configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3526 #endif
3527
3528 #else /* not THIS_IS_CONFIGURE */
3529
3530 /* Get the CFLAGS for real compilation. */
3531 #ifdef __GNUC__
3532 configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3533 #else
3534 configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3535 #endif
3536
3537 #endif /* not THIS_IS_CONFIGURE */
3538 ' > ${tempcname}
3539
3540 # The value of CPP is a quoted variable reference, so we need to do this
3541 # to get its actual value...
3542 CPP=`eval "echo $CPP"`
3543 eval `${CPP} -Isrc ${tempcname} \
3544 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3545 if test "x$SPECIFIED_CFLAGS" = x; then
3546 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
3547 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3548 else
3549 REAL_CFLAGS="$CFLAGS"
3550 fi
3551 rm ${tempcname}
3552
3553 ac_link="$ac_link $ld_switch_machine $ld_switch_system"
3554
3555 ### Make sure subsequent tests use flags consistent with the build flags.
3556
3557 if test x"${OVERRIDE_CPPFLAGS}" != x; then
3558 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
3559 else
3560 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
3561 fi
3562
3563 # Check whether --enable-largefile or --disable-largefile was given.
3564 if test "${enable_largefile+set}" = set; then
3565 enableval="$enable_largefile"
3566
3567 fi;
3568 if test "$enable_largefile" != no; then
3569
3570 echo "$as_me:3570: checking for special C compiler options needed for large files" >&5
3571 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
3572 if test "${ac_cv_sys_largefile_CC+set}" = set; then
3573 echo $ECHO_N "(cached) $ECHO_C" >&6
3574 else
3575 ac_cv_sys_largefile_CC=no
3576 if test "$GCC" != yes; then
3577 ac_save_CC=$CC
3578 while :; do
3579 # IRIX 6.2 and later do not support large files by default,
3580 # so use the C compiler's -n32 option if that helps.
3581 cat >conftest.$ac_ext <<_ACEOF
3582 #line 3582 "configure"
3583 #include "confdefs.h"
3584 #include <sys/types.h>
3585 /* Check that off_t can represent 2**63 - 1 correctly.
3586 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3587 since some C++ compilers masquerading as C compilers
3588 incorrectly reject 9223372036854775807. */
3589 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3590 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3591 && LARGE_OFF_T % 2147483647 == 1)
3592 ? 1 : -1];
3593 int
3594 main ()
3595 {
3596
3597 ;
3598 return 0;
3599 }
3600 _ACEOF
3601 rm -f conftest.$ac_objext
3602 if { (eval echo "$as_me:3602: \"$ac_compile\"") >&5
3603 (eval $ac_compile) 2>&5
3604 ac_status=$?
3605 echo "$as_me:3605: \$? = $ac_status" >&5
3606 (exit $ac_status); } &&
3607 { ac_try='test -s conftest.$ac_objext'
3608 { (eval echo "$as_me:3608: \"$ac_try\"") >&5
3609 (eval $ac_try) 2>&5
3610 ac_status=$?
3611 echo "$as_me:3611: \$? = $ac_status" >&5
3612 (exit $ac_status); }; }; then
3613 break
3614 else
3615 echo "$as_me: failed program was:" >&5
3616 cat conftest.$ac_ext >&5
3617 fi
3618 rm -f conftest.$ac_objext
3619 CC="$CC -n32"
3620 rm -f conftest.$ac_objext
3621 if { (eval echo "$as_me:3621: \"$ac_compile\"") >&5
3622 (eval $ac_compile) 2>&5
3623 ac_status=$?
3624 echo "$as_me:3624: \$? = $ac_status" >&5
3625 (exit $ac_status); } &&
3626 { ac_try='test -s conftest.$ac_objext'
3627 { (eval echo "$as_me:3627: \"$ac_try\"") >&5
3628 (eval $ac_try) 2>&5
3629 ac_status=$?
3630 echo "$as_me:3630: \$? = $ac_status" >&5
3631 (exit $ac_status); }; }; then
3632 ac_cv_sys_largefile_CC=' -n32'; break
3633 else
3634 echo "$as_me: failed program was:" >&5
3635 cat conftest.$ac_ext >&5
3636 fi
3637 rm -f conftest.$ac_objext
3638 break
3639 done
3640 CC=$ac_save_CC
3641 rm -f conftest.$ac_ext
3642 fi
3643 fi
3644 echo "$as_me:3644: result: $ac_cv_sys_largefile_CC" >&5
3645 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
3646 if test "$ac_cv_sys_largefile_CC" != no; then
3647 CC=$CC$ac_cv_sys_largefile_CC
3648 fi
3649
3650 echo "$as_me:3650: checking for _FILE_OFFSET_BITS value needed for large files" >&5
3651 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
3652 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
3653 echo $ECHO_N "(cached) $ECHO_C" >&6
3654 else
3655 while :; do
3656 ac_cv_sys_file_offset_bits=no
3657 cat >conftest.$ac_ext <<_ACEOF
3658 #line 3658 "configure"
3659 #include "confdefs.h"
3660 #include <sys/types.h>
3661 /* Check that off_t can represent 2**63 - 1 correctly.
3662 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3663 since some C++ compilers masquerading as C compilers
3664 incorrectly reject 9223372036854775807. */
3665 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3666 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3667 && LARGE_OFF_T % 2147483647 == 1)
3668 ? 1 : -1];
3669 int
3670 main ()
3671 {
3672
3673 ;
3674 return 0;
3675 }
3676 _ACEOF
3677 rm -f conftest.$ac_objext
3678 if { (eval echo "$as_me:3678: \"$ac_compile\"") >&5
3679 (eval $ac_compile) 2>&5
3680 ac_status=$?
3681 echo "$as_me:3681: \$? = $ac_status" >&5
3682 (exit $ac_status); } &&
3683 { ac_try='test -s conftest.$ac_objext'
3684 { (eval echo "$as_me:3684: \"$ac_try\"") >&5
3685 (eval $ac_try) 2>&5
3686 ac_status=$?
3687 echo "$as_me:3687: \$? = $ac_status" >&5
3688 (exit $ac_status); }; }; then
3689 break
3690 else
3691 echo "$as_me: failed program was:" >&5
3692 cat conftest.$ac_ext >&5
3693 fi
3694 rm -f conftest.$ac_objext conftest.$ac_ext
3695 cat >conftest.$ac_ext <<_ACEOF
3696 #line 3696 "configure"
3697 #include "confdefs.h"
3698 #define _FILE_OFFSET_BITS 64
3699 #include <sys/types.h>
3700 /* Check that off_t can represent 2**63 - 1 correctly.
3701 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3702 since some C++ compilers masquerading as C compilers
3703 incorrectly reject 9223372036854775807. */
3704 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3705 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3706 && LARGE_OFF_T % 2147483647 == 1)
3707 ? 1 : -1];
3708 int
3709 main ()
3710 {
3711
3712 ;
3713 return 0;
3714 }
3715 _ACEOF
3716 rm -f conftest.$ac_objext
3717 if { (eval echo "$as_me:3717: \"$ac_compile\"") >&5
3718 (eval $ac_compile) 2>&5
3719 ac_status=$?
3720 echo "$as_me:3720: \$? = $ac_status" >&5
3721 (exit $ac_status); } &&
3722 { ac_try='test -s conftest.$ac_objext'
3723 { (eval echo "$as_me:3723: \"$ac_try\"") >&5
3724 (eval $ac_try) 2>&5
3725 ac_status=$?
3726 echo "$as_me:3726: \$? = $ac_status" >&5
3727 (exit $ac_status); }; }; then
3728 ac_cv_sys_file_offset_bits=64; break
3729 else
3730 echo "$as_me: failed program was:" >&5
3731 cat conftest.$ac_ext >&5
3732 fi
3733 rm -f conftest.$ac_objext conftest.$ac_ext
3734 break
3735 done
3736 fi
3737 echo "$as_me:3737: result: $ac_cv_sys_file_offset_bits" >&5
3738 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
3739 if test "$ac_cv_sys_file_offset_bits" != no; then
3740
3741 cat >>confdefs.h <<EOF
3742 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
3743 EOF
3744
3745 fi
3746 rm -f conftest*
3747 echo "$as_me:3747: checking for _LARGE_FILES value needed for large files" >&5
3748 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
3749 if test "${ac_cv_sys_large_files+set}" = set; then
3750 echo $ECHO_N "(cached) $ECHO_C" >&6
3751 else
3752 while :; do
3753 ac_cv_sys_large_files=no
3754 cat >conftest.$ac_ext <<_ACEOF
3755 #line 3755 "configure"
3756 #include "confdefs.h"
3757 #include <sys/types.h>
3758 /* Check that off_t can represent 2**63 - 1 correctly.
3759 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3760 since some C++ compilers masquerading as C compilers
3761 incorrectly reject 9223372036854775807. */
3762 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3763 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3764 && LARGE_OFF_T % 2147483647 == 1)
3765 ? 1 : -1];
3766 int
3767 main ()
3768 {
3769
3770 ;
3771 return 0;
3772 }
3773 _ACEOF
3774 rm -f conftest.$ac_objext
3775 if { (eval echo "$as_me:3775: \"$ac_compile\"") >&5
3776 (eval $ac_compile) 2>&5
3777 ac_status=$?
3778 echo "$as_me:3778: \$? = $ac_status" >&5
3779 (exit $ac_status); } &&
3780 { ac_try='test -s conftest.$ac_objext'
3781 { (eval echo "$as_me:3781: \"$ac_try\"") >&5
3782 (eval $ac_try) 2>&5
3783 ac_status=$?
3784 echo "$as_me:3784: \$? = $ac_status" >&5
3785 (exit $ac_status); }; }; then
3786 break
3787 else
3788 echo "$as_me: failed program was:" >&5
3789 cat conftest.$ac_ext >&5
3790 fi
3791 rm -f conftest.$ac_objext conftest.$ac_ext
3792 cat >conftest.$ac_ext <<_ACEOF
3793 #line 3793 "configure"
3794 #include "confdefs.h"
3795 #define _LARGE_FILES 1
3796 #include <sys/types.h>
3797 /* Check that off_t can represent 2**63 - 1 correctly.
3798 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3799 since some C++ compilers masquerading as C compilers
3800 incorrectly reject 9223372036854775807. */
3801 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3802 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3803 && LARGE_OFF_T % 2147483647 == 1)
3804 ? 1 : -1];
3805 int
3806 main ()
3807 {
3808
3809 ;
3810 return 0;
3811 }
3812 _ACEOF
3813 rm -f conftest.$ac_objext
3814 if { (eval echo "$as_me:3814: \"$ac_compile\"") >&5
3815 (eval $ac_compile) 2>&5
3816 ac_status=$?
3817 echo "$as_me:3817: \$? = $ac_status" >&5
3818 (exit $ac_status); } &&
3819 { ac_try='test -s conftest.$ac_objext'
3820 { (eval echo "$as_me:3820: \"$ac_try\"") >&5
3821 (eval $ac_try) 2>&5
3822 ac_status=$?
3823 echo "$as_me:3823: \$? = $ac_status" >&5
3824 (exit $ac_status); }; }; then
3825 ac_cv_sys_large_files=1; break
3826 else
3827 echo "$as_me: failed program was:" >&5
3828 cat conftest.$ac_ext >&5
3829 fi
3830 rm -f conftest.$ac_objext conftest.$ac_ext
3831 break
3832 done
3833 fi
3834 echo "$as_me:3834: result: $ac_cv_sys_large_files" >&5
3835 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
3836 if test "$ac_cv_sys_large_files" != no; then
3837
3838 cat >>confdefs.h <<EOF
3839 #define _LARGE_FILES $ac_cv_sys_large_files
3840 EOF
3841
3842 fi
3843 rm -f conftest*
3844 fi
3845
3846 # Sound support for GNU/Linux and the free BSDs.
3847
3848 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
3849 do
3850 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3851 echo "$as_me:3851: checking for $ac_header" >&5
3852 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3853 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3854 echo $ECHO_N "(cached) $ECHO_C" >&6
3855 else
3856 cat >conftest.$ac_ext <<_ACEOF
3857 #line 3857 "configure"
3858 #include "confdefs.h"
3859 #include <$ac_header>
3860 _ACEOF
3861 if { (eval echo "$as_me:3861: \"$ac_cpp conftest.$ac_ext\"") >&5
3862 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3863 ac_status=$?
3864 egrep -v '^ *\+' conftest.er1 >conftest.err
3865 rm -f conftest.er1
3866 cat conftest.err >&5
3867 echo "$as_me:3867: \$? = $ac_status" >&5
3868 (exit $ac_status); } >/dev/null; then
3869 if test -s conftest.err; then
3870 ac_cpp_err=$ac_c_preproc_warn_flag
3871 else
3872 ac_cpp_err=
3873 fi
3874 else
3875 ac_cpp_err=yes
3876 fi
3877 if test -z "$ac_cpp_err"; then
3878 eval "$as_ac_Header=yes"
3879 else
3880 echo "$as_me: failed program was:" >&5
3881 cat conftest.$ac_ext >&5
3882 eval "$as_ac_Header=no"
3883 fi
3884 rm -f conftest.err conftest.$ac_ext
3885 fi
3886 echo "$as_me:3886: result: `eval echo '${'$as_ac_Header'}'`" >&5
3887 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3888 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3889 cat >>confdefs.h <<EOF
3890 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3891 EOF
3892
3893 fi
3894 done
3895
3896 # Emulation library used on NetBSD.
3897 echo "$as_me:3897: checking for _oss_ioctl in -lossaudio" >&5
3898 echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6
3899 if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
3900 echo $ECHO_N "(cached) $ECHO_C" >&6
3901 else
3902 ac_check_lib_save_LIBS=$LIBS
3903 LIBS="-lossaudio $LIBS"
3904 cat >conftest.$ac_ext <<_ACEOF
3905 #line 3905 "configure"
3906 #include "confdefs.h"
3907
3908 /* Override any gcc2 internal prototype to avoid an error. */
3909 #ifdef __cplusplus
3910 extern "C"
3911 #endif
3912 /* We use char because int might match the return type of a gcc2
3913 builtin and then its argument prototype would still apply. */
3914 char _oss_ioctl ();
3915 int
3916 main ()
3917 {
3918 _oss_ioctl ();
3919 ;
3920 return 0;
3921 }
3922 _ACEOF
3923 rm -f conftest.$ac_objext conftest$ac_exeext
3924 if { (eval echo "$as_me:3924: \"$ac_link\"") >&5
3925 (eval $ac_link) 2>&5
3926 ac_status=$?
3927 echo "$as_me:3927: \$? = $ac_status" >&5
3928 (exit $ac_status); } &&
3929 { ac_try='test -s conftest$ac_exeext'
3930 { (eval echo "$as_me:3930: \"$ac_try\"") >&5
3931 (eval $ac_try) 2>&5
3932 ac_status=$?
3933 echo "$as_me:3933: \$? = $ac_status" >&5
3934 (exit $ac_status); }; }; then
3935 ac_cv_lib_ossaudio__oss_ioctl=yes
3936 else
3937 echo "$as_me: failed program was:" >&5
3938 cat conftest.$ac_ext >&5
3939 ac_cv_lib_ossaudio__oss_ioctl=no
3940 fi
3941 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3942 LIBS=$ac_check_lib_save_LIBS
3943 fi
3944 echo "$as_me:3944: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
3945 echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6
3946 if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
3947 LIBSOUND=-lossaudio
3948 else
3949 LIBSOUND=
3950 fi
3951
3952 for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
3953 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
3954 termcap.h stdio_ext.h fcntl.h term.h strings.h coff.h
3955 do
3956 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3957 echo "$as_me:3957: checking for $ac_header" >&5
3958 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3959 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3960 echo $ECHO_N "(cached) $ECHO_C" >&6
3961 else
3962 cat >conftest.$ac_ext <<_ACEOF
3963 #line 3963 "configure"
3964 #include "confdefs.h"
3965 #include <$ac_header>
3966 _ACEOF
3967 if { (eval echo "$as_me:3967: \"$ac_cpp conftest.$ac_ext\"") >&5
3968 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3969 ac_status=$?
3970 egrep -v '^ *\+' conftest.er1 >conftest.err
3971 rm -f conftest.er1
3972 cat conftest.err >&5
3973 echo "$as_me:3973: \$? = $ac_status" >&5
3974 (exit $ac_status); } >/dev/null; then
3975 if test -s conftest.err; then
3976 ac_cpp_err=$ac_c_preproc_warn_flag
3977 else
3978 ac_cpp_err=
3979 fi
3980 else
3981 ac_cpp_err=yes
3982 fi
3983 if test -z "$ac_cpp_err"; then
3984 eval "$as_ac_Header=yes"
3985 else
3986 echo "$as_me: failed program was:" >&5
3987 cat conftest.$ac_ext >&5
3988 eval "$as_ac_Header=no"
3989 fi
3990 rm -f conftest.err conftest.$ac_ext
3991 fi
3992 echo "$as_me:3992: result: `eval echo '${'$as_ac_Header'}'`" >&5
3993 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3994 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3995 cat >>confdefs.h <<EOF
3996 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3997 EOF
3998
3999 fi
4000 done
4001
4002 echo "$as_me:4002: checking for ANSI C header files" >&5
4003 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4004 if test "${ac_cv_header_stdc+set}" = set; then
4005 echo $ECHO_N "(cached) $ECHO_C" >&6
4006 else
4007 cat >conftest.$ac_ext <<_ACEOF
4008 #line 4008 "configure"
4009 #include "confdefs.h"
4010 #include <stdlib.h>
4011 #include <stdarg.h>
4012 #include <string.h>
4013 #include <float.h>
4014
4015 _ACEOF
4016 if { (eval echo "$as_me:4016: \"$ac_cpp conftest.$ac_ext\"") >&5
4017 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4018 ac_status=$?
4019 egrep -v '^ *\+' conftest.er1 >conftest.err
4020 rm -f conftest.er1
4021 cat conftest.err >&5
4022 echo "$as_me:4022: \$? = $ac_status" >&5
4023 (exit $ac_status); } >/dev/null; then
4024 if test -s conftest.err; then
4025 ac_cpp_err=$ac_c_preproc_warn_flag
4026 else
4027 ac_cpp_err=
4028 fi
4029 else
4030 ac_cpp_err=yes
4031 fi
4032 if test -z "$ac_cpp_err"; then
4033 ac_cv_header_stdc=yes
4034 else
4035 echo "$as_me: failed program was:" >&5
4036 cat conftest.$ac_ext >&5
4037 ac_cv_header_stdc=no
4038 fi
4039 rm -f conftest.err conftest.$ac_ext
4040
4041 if test $ac_cv_header_stdc = yes; then
4042 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4043 cat >conftest.$ac_ext <<_ACEOF
4044 #line 4044 "configure"
4045 #include "confdefs.h"
4046 #include <string.h>
4047
4048 _ACEOF
4049 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4050 egrep "memchr" >/dev/null 2>&1; then
4051 :
4052 else
4053 ac_cv_header_stdc=no
4054 fi
4055 rm -f conftest*
4056
4057 fi
4058
4059 if test $ac_cv_header_stdc = yes; then
4060 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4061 cat >conftest.$ac_ext <<_ACEOF
4062 #line 4062 "configure"
4063 #include "confdefs.h"
4064 #include <stdlib.h>
4065
4066 _ACEOF
4067 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4068 egrep "free" >/dev/null 2>&1; then
4069 :
4070 else
4071 ac_cv_header_stdc=no
4072 fi
4073 rm -f conftest*
4074
4075 fi
4076
4077 if test $ac_cv_header_stdc = yes; then
4078 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4079 if test "$cross_compiling" = yes; then
4080 :
4081 else
4082 cat >conftest.$ac_ext <<_ACEOF
4083 #line 4083 "configure"
4084 #include "confdefs.h"
4085 #include <ctype.h>
4086 #if ((' ' & 0x0FF) == 0x020)
4087 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4088 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4089 #else
4090 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4091 || ('j' <= (c) && (c) <= 'r') \
4092 || ('s' <= (c) && (c) <= 'z'))
4093 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4094 #endif
4095
4096 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4097 int
4098 main ()
4099 {
4100 int i;
4101 for (i = 0; i < 256; i++)
4102 if (XOR (islower (i), ISLOWER (i))
4103 || toupper (i) != TOUPPER (i))
4104 exit(2);
4105 exit (0);
4106 }
4107 _ACEOF
4108 rm -f conftest$ac_exeext
4109 if { (eval echo "$as_me:4109: \"$ac_link\"") >&5
4110 (eval $ac_link) 2>&5
4111 ac_status=$?
4112 echo "$as_me:4112: \$? = $ac_status" >&5
4113 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4114 { (eval echo "$as_me:4114: \"$ac_try\"") >&5
4115 (eval $ac_try) 2>&5
4116 ac_status=$?
4117 echo "$as_me:4117: \$? = $ac_status" >&5
4118 (exit $ac_status); }; }; then
4119 :
4120 else
4121 echo "$as_me: program exited with status $ac_status" >&5
4122 echo "$as_me: failed program was:" >&5
4123 cat conftest.$ac_ext >&5
4124 ac_cv_header_stdc=no
4125 fi
4126 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4127 fi
4128 fi
4129 fi
4130 echo "$as_me:4130: result: $ac_cv_header_stdc" >&5
4131 echo "${ECHO_T}$ac_cv_header_stdc" >&6
4132 if test $ac_cv_header_stdc = yes; then
4133
4134 cat >>confdefs.h <<\EOF
4135 #define STDC_HEADERS 1
4136 EOF
4137
4138 fi
4139
4140 echo "$as_me:4140: checking whether time.h and sys/time.h may both be included" >&5
4141 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
4142 if test "${ac_cv_header_time+set}" = set; then
4143 echo $ECHO_N "(cached) $ECHO_C" >&6
4144 else
4145 cat >conftest.$ac_ext <<_ACEOF
4146 #line 4146 "configure"
4147 #include "confdefs.h"
4148 #include <sys/types.h>
4149 #include <sys/time.h>
4150 #include <time.h>
4151
4152 int
4153 main ()
4154 {
4155 if ((struct tm *) 0)
4156 return 0;
4157 ;
4158 return 0;
4159 }
4160 _ACEOF
4161 rm -f conftest.$ac_objext
4162 if { (eval echo "$as_me:4162: \"$ac_compile\"") >&5
4163 (eval $ac_compile) 2>&5
4164 ac_status=$?
4165 echo "$as_me:4165: \$? = $ac_status" >&5
4166 (exit $ac_status); } &&
4167 { ac_try='test -s conftest.$ac_objext'
4168 { (eval echo "$as_me:4168: \"$ac_try\"") >&5
4169 (eval $ac_try) 2>&5
4170 ac_status=$?
4171 echo "$as_me:4171: \$? = $ac_status" >&5
4172 (exit $ac_status); }; }; then
4173 ac_cv_header_time=yes
4174 else
4175 echo "$as_me: failed program was:" >&5
4176 cat conftest.$ac_ext >&5
4177 ac_cv_header_time=no
4178 fi
4179 rm -f conftest.$ac_objext conftest.$ac_ext
4180 fi
4181 echo "$as_me:4181: result: $ac_cv_header_time" >&5
4182 echo "${ECHO_T}$ac_cv_header_time" >&6
4183 if test $ac_cv_header_time = yes; then
4184
4185 cat >>confdefs.h <<\EOF
4186 #define TIME_WITH_SYS_TIME 1
4187 EOF
4188
4189 fi
4190
4191 echo "$as_me:4191: checking for sys_siglist declaration in signal.h or unistd.h" >&5
4192 echo $ECHO_N "checking for sys_siglist declaration in signal.h or unistd.h... $ECHO_C" >&6
4193 if test "${ac_cv_decl_sys_siglist+set}" = set; then
4194 echo $ECHO_N "(cached) $ECHO_C" >&6
4195 else
4196 cat >conftest.$ac_ext <<_ACEOF
4197 #line 4197 "configure"
4198 #include "confdefs.h"
4199 #include <sys/types.h>
4200 #include <signal.h>
4201 /* NetBSD declares sys_siglist in unistd.h. */
4202 #if HAVE_UNISTD_H
4203 # include <unistd.h>
4204 #endif
4205
4206 int
4207 main ()
4208 {
4209 char *msg = *(sys_siglist + 1);
4210 ;
4211 return 0;
4212 }
4213 _ACEOF
4214 rm -f conftest.$ac_objext
4215 if { (eval echo "$as_me:4215: \"$ac_compile\"") >&5
4216 (eval $ac_compile) 2>&5
4217 ac_status=$?
4218 echo "$as_me:4218: \$? = $ac_status" >&5
4219 (exit $ac_status); } &&
4220 { ac_try='test -s conftest.$ac_objext'
4221 { (eval echo "$as_me:4221: \"$ac_try\"") >&5
4222 (eval $ac_try) 2>&5
4223 ac_status=$?
4224 echo "$as_me:4224: \$? = $ac_status" >&5
4225 (exit $ac_status); }; }; then
4226 ac_cv_decl_sys_siglist=yes
4227 else
4228 echo "$as_me: failed program was:" >&5
4229 cat conftest.$ac_ext >&5
4230 ac_cv_decl_sys_siglist=no
4231 fi
4232 rm -f conftest.$ac_objext conftest.$ac_ext
4233 fi
4234 echo "$as_me:4234: result: $ac_cv_decl_sys_siglist" >&5
4235 echo "${ECHO_T}$ac_cv_decl_sys_siglist" >&6
4236 if test $ac_cv_decl_sys_siglist = yes; then
4237
4238 cat >>confdefs.h <<\EOF
4239 #define SYS_SIGLIST_DECLARED 1
4240 EOF
4241
4242 fi
4243
4244 echo "$as_me:4244: checking for sys/wait.h that is POSIX.1 compatible" >&5
4245 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
4246 if test "${ac_cv_header_sys_wait_h+set}" = set; then
4247 echo $ECHO_N "(cached) $ECHO_C" >&6
4248 else
4249 cat >conftest.$ac_ext <<_ACEOF
4250 #line 4250 "configure"
4251 #include "confdefs.h"
4252 #include <sys/types.h>
4253 #include <sys/wait.h>
4254 #ifndef WEXITSTATUS
4255 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4256 #endif
4257 #ifndef WIFEXITED
4258 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4259 #endif
4260
4261 int
4262 main ()
4263 {
4264 int s;
4265 wait (&s);
4266 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4267 ;
4268 return 0;
4269 }
4270 _ACEOF
4271 rm -f conftest.$ac_objext
4272 if { (eval echo "$as_me:4272: \"$ac_compile\"") >&5
4273 (eval $ac_compile) 2>&5
4274 ac_status=$?
4275 echo "$as_me:4275: \$? = $ac_status" >&5
4276 (exit $ac_status); } &&
4277 { ac_try='test -s conftest.$ac_objext'
4278 { (eval echo "$as_me:4278: \"$ac_try\"") >&5
4279 (eval $ac_try) 2>&5
4280 ac_status=$?
4281 echo "$as_me:4281: \$? = $ac_status" >&5
4282 (exit $ac_status); }; }; then
4283 ac_cv_header_sys_wait_h=yes
4284 else
4285 echo "$as_me: failed program was:" >&5
4286 cat conftest.$ac_ext >&5
4287 ac_cv_header_sys_wait_h=no
4288 fi
4289 rm -f conftest.$ac_objext conftest.$ac_ext
4290 fi
4291 echo "$as_me:4291: result: $ac_cv_header_sys_wait_h" >&5
4292 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
4293 if test $ac_cv_header_sys_wait_h = yes; then
4294
4295 cat >>confdefs.h <<\EOF
4296 #define HAVE_SYS_WAIT_H 1
4297 EOF
4298
4299 fi
4300
4301 echo "$as_me:4301: checking for struct utimbuf" >&5
4302 echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
4303 if test "${emacs_cv_struct_utimbuf+set}" = set; then
4304 echo $ECHO_N "(cached) $ECHO_C" >&6
4305 else
4306 cat >conftest.$ac_ext <<_ACEOF
4307 #line 4307 "configure"
4308 #include "confdefs.h"
4309 #ifdef TIME_WITH_SYS_TIME
4310 #include <sys/time.h>
4311 #include <time.h>
4312 #else
4313 #ifdef HAVE_SYS_TIME_H
4314 #include <sys/time.h>
4315 #else
4316 #include <time.h>
4317 #endif
4318 #endif
4319 #ifdef HAVE_UTIME_H
4320 #include <utime.h>
4321 #endif
4322 int
4323 main ()
4324 {
4325 static struct utimbuf x; x.actime = x.modtime;
4326 ;
4327 return 0;
4328 }
4329 _ACEOF
4330 rm -f conftest.$ac_objext
4331 if { (eval echo "$as_me:4331: \"$ac_compile\"") >&5
4332 (eval $ac_compile) 2>&5
4333 ac_status=$?
4334 echo "$as_me:4334: \$? = $ac_status" >&5
4335 (exit $ac_status); } &&
4336 { ac_try='test -s conftest.$ac_objext'
4337 { (eval echo "$as_me:4337: \"$ac_try\"") >&5
4338 (eval $ac_try) 2>&5
4339 ac_status=$?
4340 echo "$as_me:4340: \$? = $ac_status" >&5
4341 (exit $ac_status); }; }; then
4342 emacs_cv_struct_utimbuf=yes
4343 else
4344 echo "$as_me: failed program was:" >&5
4345 cat conftest.$ac_ext >&5
4346 emacs_cv_struct_utimbuf=no
4347 fi
4348 rm -f conftest.$ac_objext conftest.$ac_ext
4349 fi
4350 echo "$as_me:4350: result: $emacs_cv_struct_utimbuf" >&5
4351 echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6
4352 if test $emacs_cv_struct_utimbuf = yes; then
4353 cat >>confdefs.h <<\EOF
4354 #define HAVE_STRUCT_UTIMBUF 1
4355 EOF
4356
4357 fi
4358
4359 echo "$as_me:4359: checking return type of signal handlers" >&5
4360 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4361 if test "${ac_cv_type_signal+set}" = set; then
4362 echo $ECHO_N "(cached) $ECHO_C" >&6
4363 else
4364 cat >conftest.$ac_ext <<_ACEOF
4365 #line 4365 "configure"
4366 #include "confdefs.h"
4367 #include <sys/types.h>
4368 #include <signal.h>
4369 #ifdef signal
4370 # undef signal
4371 #endif
4372 #ifdef __cplusplus
4373 extern "C" void (*signal (int, void (*)(int)))(int);
4374 #else
4375 void (*signal ()) ();
4376 #endif
4377
4378 int
4379 main ()
4380 {
4381 int i;
4382 ;
4383 return 0;
4384 }
4385 _ACEOF
4386 rm -f conftest.$ac_objext
4387 if { (eval echo "$as_me:4387: \"$ac_compile\"") >&5
4388 (eval $ac_compile) 2>&5
4389 ac_status=$?
4390 echo "$as_me:4390: \$? = $ac_status" >&5
4391 (exit $ac_status); } &&
4392 { ac_try='test -s conftest.$ac_objext'
4393 { (eval echo "$as_me:4393: \"$ac_try\"") >&5
4394 (eval $ac_try) 2>&5
4395 ac_status=$?
4396 echo "$as_me:4396: \$? = $ac_status" >&5
4397 (exit $ac_status); }; }; then
4398 ac_cv_type_signal=void
4399 else
4400 echo "$as_me: failed program was:" >&5
4401 cat conftest.$ac_ext >&5
4402 ac_cv_type_signal=int
4403 fi
4404 rm -f conftest.$ac_objext conftest.$ac_ext
4405 fi
4406 echo "$as_me:4406: result: $ac_cv_type_signal" >&5
4407 echo "${ECHO_T}$ac_cv_type_signal" >&6
4408
4409 cat >>confdefs.h <<EOF
4410 #define RETSIGTYPE $ac_cv_type_signal
4411 EOF
4412
4413 echo "$as_me:4413: checking for speed_t" >&5
4414 echo $ECHO_N "checking for speed_t... $ECHO_C" >&6
4415 if test "${emacs_cv_speed_t+set}" = set; then
4416 echo $ECHO_N "(cached) $ECHO_C" >&6
4417 else
4418 cat >conftest.$ac_ext <<_ACEOF
4419 #line 4419 "configure"
4420 #include "confdefs.h"
4421 #include <termios.h>
4422 int
4423 main ()
4424 {
4425 speed_t x = 1;
4426 ;
4427 return 0;
4428 }
4429 _ACEOF
4430 rm -f conftest.$ac_objext
4431 if { (eval echo "$as_me:4431: \"$ac_compile\"") >&5
4432 (eval $ac_compile) 2>&5
4433 ac_status=$?
4434 echo "$as_me:4434: \$? = $ac_status" >&5
4435 (exit $ac_status); } &&
4436 { ac_try='test -s conftest.$ac_objext'
4437 { (eval echo "$as_me:4437: \"$ac_try\"") >&5
4438 (eval $ac_try) 2>&5
4439 ac_status=$?
4440 echo "$as_me:4440: \$? = $ac_status" >&5
4441 (exit $ac_status); }; }; then
4442 emacs_cv_speed_t=yes
4443 else
4444 echo "$as_me: failed program was:" >&5
4445 cat conftest.$ac_ext >&5
4446 emacs_cv_speed_t=no
4447 fi
4448 rm -f conftest.$ac_objext conftest.$ac_ext
4449 fi
4450 echo "$as_me:4450: result: $emacs_cv_speed_t" >&5
4451 echo "${ECHO_T}$emacs_cv_speed_t" >&6
4452 if test $emacs_cv_speed_t = yes; then
4453 cat >>confdefs.h <<\EOF
4454 #define HAVE_SPEED_T 1
4455 EOF
4456
4457 fi
4458
4459 echo "$as_me:4459: checking for struct timeval" >&5
4460 echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
4461 if test "${emacs_cv_struct_timeval+set}" = set; then
4462 echo $ECHO_N "(cached) $ECHO_C" >&6
4463 else
4464 cat >conftest.$ac_ext <<_ACEOF
4465 #line 4465 "configure"
4466 #include "confdefs.h"
4467 #ifdef TIME_WITH_SYS_TIME
4468 #include <sys/time.h>
4469 #include <time.h>
4470 #else
4471 #ifdef HAVE_SYS_TIME_H
4472 #include <sys/time.h>
4473 #else
4474 #include <time.h>
4475 #endif
4476 #endif
4477 int
4478 main ()
4479 {
4480 static struct timeval x; x.tv_sec = x.tv_usec;
4481 ;
4482 return 0;
4483 }
4484 _ACEOF
4485 rm -f conftest.$ac_objext
4486 if { (eval echo "$as_me:4486: \"$ac_compile\"") >&5
4487 (eval $ac_compile) 2>&5
4488 ac_status=$?
4489 echo "$as_me:4489: \$? = $ac_status" >&5
4490 (exit $ac_status); } &&
4491 { ac_try='test -s conftest.$ac_objext'
4492 { (eval echo "$as_me:4492: \"$ac_try\"") >&5
4493 (eval $ac_try) 2>&5
4494 ac_status=$?
4495 echo "$as_me:4495: \$? = $ac_status" >&5
4496 (exit $ac_status); }; }; then
4497 emacs_cv_struct_timeval=yes
4498 else
4499 echo "$as_me: failed program was:" >&5
4500 cat conftest.$ac_ext >&5
4501 emacs_cv_struct_timeval=no
4502 fi
4503 rm -f conftest.$ac_objext conftest.$ac_ext
4504 fi
4505 echo "$as_me:4505: result: $emacs_cv_struct_timeval" >&5
4506 echo "${ECHO_T}$emacs_cv_struct_timeval" >&6
4507 HAVE_TIMEVAL=$emacs_cv_struct_timeval
4508 if test $emacs_cv_struct_timeval = yes; then
4509 cat >>confdefs.h <<\EOF
4510 #define HAVE_TIMEVAL 1
4511 EOF
4512
4513 fi
4514
4515 echo "$as_me:4515: checking for struct exception" >&5
4516 echo $ECHO_N "checking for struct exception... $ECHO_C" >&6
4517 if test "${emacs_cv_struct_exception+set}" = set; then
4518 echo $ECHO_N "(cached) $ECHO_C" >&6
4519 else
4520 cat >conftest.$ac_ext <<_ACEOF
4521 #line 4521 "configure"
4522 #include "confdefs.h"
4523 #include <math.h>
4524 int
4525 main ()
4526 {
4527 static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
4528 ;
4529 return 0;
4530 }
4531 _ACEOF
4532 rm -f conftest.$ac_objext
4533 if { (eval echo "$as_me:4533: \"$ac_compile\"") >&5
4534 (eval $ac_compile) 2>&5
4535 ac_status=$?
4536 echo "$as_me:4536: \$? = $ac_status" >&5
4537 (exit $ac_status); } &&
4538 { ac_try='test -s conftest.$ac_objext'
4539 { (eval echo "$as_me:4539: \"$ac_try\"") >&5
4540 (eval $ac_try) 2>&5
4541 ac_status=$?
4542 echo "$as_me:4542: \$? = $ac_status" >&5
4543 (exit $ac_status); }; }; then
4544 emacs_cv_struct_exception=yes
4545 else
4546 echo "$as_me: failed program was:" >&5
4547 cat conftest.$ac_ext >&5
4548 emacs_cv_struct_exception=no
4549 fi
4550 rm -f conftest.$ac_objext conftest.$ac_ext
4551 fi
4552 echo "$as_me:4552: result: $emacs_cv_struct_exception" >&5
4553 echo "${ECHO_T}$emacs_cv_struct_exception" >&6
4554 HAVE_EXCEPTION=$emacs_cv_struct_exception
4555 if test $emacs_cv_struct_exception != yes; then
4556 cat >>confdefs.h <<\EOF
4557 #define NO_MATHERR 1
4558 EOF
4559
4560 fi
4561
4562 echo "$as_me:4562: checking whether struct tm is in sys/time.h or time.h" >&5
4563 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
4564 if test "${ac_cv_struct_tm+set}" = set; then
4565 echo $ECHO_N "(cached) $ECHO_C" >&6
4566 else
4567 cat >conftest.$ac_ext <<_ACEOF
4568 #line 4568 "configure"
4569 #include "confdefs.h"
4570 #include <sys/types.h>
4571 #include <time.h>
4572
4573 int
4574 main ()
4575 {
4576 struct tm *tp; tp->tm_sec;
4577 ;
4578 return 0;
4579 }
4580 _ACEOF
4581 rm -f conftest.$ac_objext
4582 if { (eval echo "$as_me:4582: \"$ac_compile\"") >&5
4583 (eval $ac_compile) 2>&5
4584 ac_status=$?
4585 echo "$as_me:4585: \$? = $ac_status" >&5
4586 (exit $ac_status); } &&
4587 { ac_try='test -s conftest.$ac_objext'
4588 { (eval echo "$as_me:4588: \"$ac_try\"") >&5
4589 (eval $ac_try) 2>&5
4590 ac_status=$?
4591 echo "$as_me:4591: \$? = $ac_status" >&5
4592 (exit $ac_status); }; }; then
4593 ac_cv_struct_tm=time.h
4594 else
4595 echo "$as_me: failed program was:" >&5
4596 cat conftest.$ac_ext >&5
4597 ac_cv_struct_tm=sys/time.h
4598 fi
4599 rm -f conftest.$ac_objext conftest.$ac_ext
4600 fi
4601 echo "$as_me:4601: result: $ac_cv_struct_tm" >&5
4602 echo "${ECHO_T}$ac_cv_struct_tm" >&6
4603 if test $ac_cv_struct_tm = sys/time.h; then
4604
4605 cat >>confdefs.h <<\EOF
4606 #define TM_IN_SYS_TIME 1
4607 EOF
4608
4609 fi
4610
4611 echo "$as_me:4611: checking for struct tm.tm_zone" >&5
4612 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
4613 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
4614 echo $ECHO_N "(cached) $ECHO_C" >&6
4615 else
4616 cat >conftest.$ac_ext <<_ACEOF
4617 #line 4617 "configure"
4618 #include "confdefs.h"
4619 #include <sys/types.h>
4620 #include <$ac_cv_struct_tm>
4621
4622 int
4623 main ()
4624 {
4625 static struct tm ac_aggr;
4626 if (ac_aggr.tm_zone)
4627 return 0;
4628 ;
4629 return 0;
4630 }
4631 _ACEOF
4632 rm -f conftest.$ac_objext
4633 if { (eval echo "$as_me:4633: \"$ac_compile\"") >&5
4634 (eval $ac_compile) 2>&5
4635 ac_status=$?
4636 echo "$as_me:4636: \$? = $ac_status" >&5
4637 (exit $ac_status); } &&
4638 { ac_try='test -s conftest.$ac_objext'
4639 { (eval echo "$as_me:4639: \"$ac_try\"") >&5
4640 (eval $ac_try) 2>&5
4641 ac_status=$?
4642 echo "$as_me:4642: \$? = $ac_status" >&5
4643 (exit $ac_status); }; }; then
4644 ac_cv_member_struct_tm_tm_zone=yes
4645 else
4646 echo "$as_me: failed program was:" >&5
4647 cat conftest.$ac_ext >&5
4648 ac_cv_member_struct_tm_tm_zone=no
4649 fi
4650 rm -f conftest.$ac_objext conftest.$ac_ext
4651 fi
4652 echo "$as_me:4652: result: $ac_cv_member_struct_tm_tm_zone" >&5
4653 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
4654 if test $ac_cv_member_struct_tm_tm_zone = yes; then
4655
4656 cat >>confdefs.h <<EOF
4657 #define HAVE_STRUCT_TM_TM_ZONE 1
4658 EOF
4659
4660 fi
4661
4662 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
4663
4664 cat >>confdefs.h <<\EOF
4665 #define HAVE_TM_ZONE 1
4666 EOF
4667
4668 else
4669 echo "$as_me:4669: checking for tzname" >&5
4670 echo $ECHO_N "checking for tzname... $ECHO_C" >&6
4671 if test "${ac_cv_var_tzname+set}" = set; then
4672 echo $ECHO_N "(cached) $ECHO_C" >&6
4673 else
4674 cat >conftest.$ac_ext <<_ACEOF
4675 #line 4675 "configure"
4676 #include "confdefs.h"
4677 #include <time.h>
4678 #ifndef tzname /* For SGI. */
4679 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
4680 #endif
4681
4682 int
4683 main ()
4684 {
4685 atoi(*tzname);
4686 ;
4687 return 0;
4688 }
4689 _ACEOF
4690 rm -f conftest.$ac_objext conftest$ac_exeext
4691 if { (eval echo "$as_me:4691: \"$ac_link\"") >&5
4692 (eval $ac_link) 2>&5
4693 ac_status=$?
4694 echo "$as_me:4694: \$? = $ac_status" >&5
4695 (exit $ac_status); } &&
4696 { ac_try='test -s conftest$ac_exeext'
4697 { (eval echo "$as_me:4697: \"$ac_try\"") >&5
4698 (eval $ac_try) 2>&5
4699 ac_status=$?
4700 echo "$as_me:4700: \$? = $ac_status" >&5
4701 (exit $ac_status); }; }; then
4702 ac_cv_var_tzname=yes
4703 else
4704 echo "$as_me: failed program was:" >&5
4705 cat conftest.$ac_ext >&5
4706 ac_cv_var_tzname=no
4707 fi
4708 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4709 fi
4710 echo "$as_me:4710: result: $ac_cv_var_tzname" >&5
4711 echo "${ECHO_T}$ac_cv_var_tzname" >&6
4712 if test $ac_cv_var_tzname = yes; then
4713
4714 cat >>confdefs.h <<\EOF
4715 #define HAVE_TZNAME 1
4716 EOF
4717
4718 fi
4719 fi
4720
4721 echo "$as_me:4721: checking for tm_gmtoff in struct tm" >&5
4722 echo $ECHO_N "checking for tm_gmtoff in struct tm... $ECHO_C" >&6
4723 if test "${emacs_cv_tm_gmtoff+set}" = set; then
4724 echo $ECHO_N "(cached) $ECHO_C" >&6
4725 else
4726 cat >conftest.$ac_ext <<_ACEOF
4727 #line 4727 "configure"
4728 #include "confdefs.h"
4729 #include <time.h>
4730 int
4731 main ()
4732 {
4733 struct tm t; t.tm_gmtoff = 0
4734 ;
4735 return 0;
4736 }
4737 _ACEOF
4738 rm -f conftest.$ac_objext conftest$ac_exeext
4739 if { (eval echo "$as_me:4739: \"$ac_link\"") >&5
4740 (eval $ac_link) 2>&5
4741 ac_status=$?
4742 echo "$as_me:4742: \$? = $ac_status" >&5
4743 (exit $ac_status); } &&
4744 { ac_try='test -s conftest$ac_exeext'
4745 { (eval echo "$as_me:4745: \"$ac_try\"") >&5
4746 (eval $ac_try) 2>&5
4747 ac_status=$?
4748 echo "$as_me:4748: \$? = $ac_status" >&5
4749 (exit $ac_status); }; }; then
4750 emacs_cv_tm_gmtoff=yes
4751 else
4752 echo "$as_me: failed program was:" >&5
4753 cat conftest.$ac_ext >&5
4754 emacs_cv_tm_gmtoff=no
4755 fi
4756 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4757 fi
4758 echo "$as_me:4758: result: $emacs_cv_tm_gmtoff" >&5
4759 echo "${ECHO_T}$emacs_cv_tm_gmtoff" >&6
4760 if test $emacs_cv_tm_gmtoff = yes; then
4761 cat >>confdefs.h <<\EOF
4762 #define HAVE_TM_GMTOFF 1
4763 EOF
4764
4765 fi
4766
4767 echo "$as_me:4767: checking for $CC option to accept ANSI C" >&5
4768 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
4769 if test "${ac_cv_prog_cc_stdc+set}" = set; then
4770 echo $ECHO_N "(cached) $ECHO_C" >&6
4771 else
4772 ac_cv_prog_cc_stdc=no
4773 ac_save_CC=$CC
4774 cat >conftest.$ac_ext <<_ACEOF
4775 #line 4775 "configure"
4776 #include "confdefs.h"
4777 #include <stdarg.h>
4778 #include <stdio.h>
4779 #include <sys/types.h>
4780 #include <sys/stat.h>
4781 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4782 struct buf { int x; };
4783 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4784 static char *e (p, i)
4785 char **p;
4786 int i;
4787 {
4788 return p[i];
4789 }
4790 static char *f (char * (*g) (char **, int), char **p, ...)
4791 {
4792 char *s;
4793 va_list v;
4794 va_start (v,p);
4795 s = g (p, va_arg (v,int));
4796 va_end (v);
4797 return s;
4798 }
4799 int test (int i, double x);
4800 struct s1 {int (*f) (int a);};
4801 struct s2 {int (*f) (double a);};
4802 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4803 int argc;
4804 char **argv;
4805 int
4806 main ()
4807 {
4808 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4809 ;
4810 return 0;
4811 }
4812 _ACEOF
4813 # Don't try gcc -ansi; that turns off useful extensions and
4814 # breaks some systems' header files.
4815 # AIX -qlanglvl=ansi
4816 # Ultrix and OSF/1 -std1
4817 # HP-UX 10.20 and later -Ae
4818 # HP-UX older versions -Aa -D_HPUX_SOURCE
4819 # SVR4 -Xc -D__EXTENSIONS__
4820 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4821 do
4822 CC="$ac_save_CC $ac_arg"
4823 rm -f conftest.$ac_objext
4824 if { (eval echo "$as_me:4824: \"$ac_compile\"") >&5
4825 (eval $ac_compile) 2>&5
4826 ac_status=$?
4827 echo "$as_me:4827: \$? = $ac_status" >&5
4828 (exit $ac_status); } &&
4829 { ac_try='test -s conftest.$ac_objext'
4830 { (eval echo "$as_me:4830: \"$ac_try\"") >&5
4831 (eval $ac_try) 2>&5
4832 ac_status=$?
4833 echo "$as_me:4833: \$? = $ac_status" >&5
4834 (exit $ac_status); }; }; then
4835 ac_cv_prog_cc_stdc=$ac_arg
4836 break
4837 else
4838 echo "$as_me: failed program was:" >&5
4839 cat conftest.$ac_ext >&5
4840 fi
4841 rm -f conftest.$ac_objext
4842 done
4843 rm -f conftest.$ac_ext conftest.$ac_objext
4844 CC=$ac_save_CC
4845
4846 fi
4847
4848 case "x$ac_cv_prog_cc_stdc" in
4849 x|xno)
4850 echo "$as_me:4850: result: none needed" >&5
4851 echo "${ECHO_T}none needed" >&6 ;;
4852 *)
4853 echo "$as_me:4853: result: $ac_cv_prog_cc_stdc" >&5
4854 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
4855 CC="$CC $ac_cv_prog_cc_stdc" ;;
4856 esac
4857
4858 echo "$as_me:4858: checking for function prototypes" >&5
4859 echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
4860 if test "$ac_cv_prog_cc_stdc" != no; then
4861 echo "$as_me:4861: result: yes" >&5
4862 echo "${ECHO_T}yes" >&6
4863
4864 cat >>confdefs.h <<\EOF
4865 #define PROTOTYPES 1
4866 EOF
4867
4868 else
4869 echo "$as_me:4869: result: no" >&5
4870 echo "${ECHO_T}no" >&6
4871 fi
4872
4873 echo "$as_me:4873: checking for working volatile" >&5
4874 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
4875 if test "${ac_cv_c_volatile+set}" = set; then
4876 echo $ECHO_N "(cached) $ECHO_C" >&6
4877 else
4878 cat >conftest.$ac_ext <<_ACEOF
4879 #line 4879 "configure"
4880 #include "confdefs.h"
4881
4882 int
4883 main ()
4884 {
4885
4886 volatile int x;
4887 int * volatile y;
4888 ;
4889 return 0;
4890 }
4891 _ACEOF
4892 rm -f conftest.$ac_objext
4893 if { (eval echo "$as_me:4893: \"$ac_compile\"") >&5
4894 (eval $ac_compile) 2>&5
4895 ac_status=$?
4896 echo "$as_me:4896: \$? = $ac_status" >&5
4897 (exit $ac_status); } &&
4898 { ac_try='test -s conftest.$ac_objext'
4899 { (eval echo "$as_me:4899: \"$ac_try\"") >&5
4900 (eval $ac_try) 2>&5
4901 ac_status=$?
4902 echo "$as_me:4902: \$? = $ac_status" >&5
4903 (exit $ac_status); }; }; then
4904 ac_cv_c_volatile=yes
4905 else
4906 echo "$as_me: failed program was:" >&5
4907 cat conftest.$ac_ext >&5
4908 ac_cv_c_volatile=no
4909 fi
4910 rm -f conftest.$ac_objext conftest.$ac_ext
4911 fi
4912 echo "$as_me:4912: result: $ac_cv_c_volatile" >&5
4913 echo "${ECHO_T}$ac_cv_c_volatile" >&6
4914 if test $ac_cv_c_volatile = no; then
4915
4916 cat >>confdefs.h <<\EOF
4917 #define volatile
4918 EOF
4919
4920 fi
4921
4922 echo "$as_me:4922: checking for an ANSI C-conforming const" >&5
4923 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
4924 if test "${ac_cv_c_const+set}" = set; then
4925 echo $ECHO_N "(cached) $ECHO_C" >&6
4926 else
4927 cat >conftest.$ac_ext <<_ACEOF
4928 #line 4928 "configure"
4929 #include "confdefs.h"
4930
4931 int
4932 main ()
4933 {
4934 /* FIXME: Include the comments suggested by Paul. */
4935 #ifndef __cplusplus
4936 /* Ultrix mips cc rejects this. */
4937 typedef int charset[2];
4938 const charset x;
4939 /* SunOS 4.1.1 cc rejects this. */
4940 char const *const *ccp;
4941 char **p;
4942 /* NEC SVR4.0.2 mips cc rejects this. */
4943 struct point {int x, y;};
4944 static struct point const zero = {0,0};
4945 /* AIX XL C 1.02.0.0 rejects this.
4946 It does not let you subtract one const X* pointer from another in
4947 an arm of an if-expression whose if-part is not a constant
4948 expression */
4949 const char *g = "string";
4950 ccp = &g + (g ? g-g : 0);
4951 /* HPUX 7.0 cc rejects these. */
4952 ++ccp;
4953 p = (char**) ccp;
4954 ccp = (char const *const *) p;
4955 { /* SCO 3.2v4 cc rejects this. */
4956 char *t;
4957 char const *s = 0 ? (char *) 0 : (char const *) 0;
4958
4959 *t++ = 0;
4960 }
4961 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
4962 int x[] = {25, 17};
4963 const int *foo = &x[0];
4964 ++foo;
4965 }
4966 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4967 typedef const int *iptr;
4968 iptr p = 0;
4969 ++p;
4970 }
4971 { /* AIX XL C 1.02.0.0 rejects this saying
4972 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4973 struct s { int j; const int *ap[3]; };
4974 struct s *b; b->j = 5;
4975 }
4976 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4977 const int foo = 10;
4978 }
4979 #endif
4980
4981 ;
4982 return 0;
4983 }
4984 _ACEOF
4985 rm -f conftest.$ac_objext
4986 if { (eval echo "$as_me:4986: \"$ac_compile\"") >&5
4987 (eval $ac_compile) 2>&5
4988 ac_status=$?
4989 echo "$as_me:4989: \$? = $ac_status" >&5
4990 (exit $ac_status); } &&
4991 { ac_try='test -s conftest.$ac_objext'
4992 { (eval echo "$as_me:4992: \"$ac_try\"") >&5
4993 (eval $ac_try) 2>&5
4994 ac_status=$?
4995 echo "$as_me:4995: \$? = $ac_status" >&5
4996 (exit $ac_status); }; }; then
4997 ac_cv_c_const=yes
4998 else
4999 echo "$as_me: failed program was:" >&5
5000 cat conftest.$ac_ext >&5
5001 ac_cv_c_const=no
5002 fi
5003 rm -f conftest.$ac_objext conftest.$ac_ext
5004 fi
5005 echo "$as_me:5005: result: $ac_cv_c_const" >&5
5006 echo "${ECHO_T}$ac_cv_c_const" >&6
5007 if test $ac_cv_c_const = no; then
5008
5009 cat >>confdefs.h <<\EOF
5010 #define const
5011 EOF
5012
5013 fi
5014
5015 echo "$as_me:5015: checking for void * support" >&5
5016 echo $ECHO_N "checking for void * support... $ECHO_C" >&6
5017 if test "${emacs_cv_void_star+set}" = set; then
5018 echo $ECHO_N "(cached) $ECHO_C" >&6
5019 else
5020 cat >conftest.$ac_ext <<_ACEOF
5021 #line 5021 "configure"
5022 #include "confdefs.h"
5023
5024 int
5025 main ()
5026 {
5027 void * foo;
5028 ;
5029 return 0;
5030 }
5031 _ACEOF
5032 rm -f conftest.$ac_objext
5033 if { (eval echo "$as_me:5033: \"$ac_compile\"") >&5
5034 (eval $ac_compile) 2>&5
5035 ac_status=$?
5036 echo "$as_me:5036: \$? = $ac_status" >&5
5037 (exit $ac_status); } &&
5038 { ac_try='test -s conftest.$ac_objext'
5039 { (eval echo "$as_me:5039: \"$ac_try\"") >&5
5040 (eval $ac_try) 2>&5
5041 ac_status=$?
5042 echo "$as_me:5042: \$? = $ac_status" >&5
5043 (exit $ac_status); }; }; then
5044 emacs_cv_void_star=yes
5045 else
5046 echo "$as_me: failed program was:" >&5
5047 cat conftest.$ac_ext >&5
5048 emacs_cv_void_star=no
5049 fi
5050 rm -f conftest.$ac_objext conftest.$ac_ext
5051 fi
5052 echo "$as_me:5052: result: $emacs_cv_void_star" >&5
5053 echo "${ECHO_T}$emacs_cv_void_star" >&6
5054 if test $emacs_cv_void_star = yes; then
5055 cat >>confdefs.h <<\EOF
5056 #define POINTER_TYPE void
5057 EOF
5058
5059 else
5060 cat >>confdefs.h <<\EOF
5061 #define POINTER_TYPE char
5062 EOF
5063
5064 fi
5065
5066 echo "$as_me:5066: checking whether ${MAKE-make} sets \${MAKE}" >&5
5067 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
5068 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
5069 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
5070 echo $ECHO_N "(cached) $ECHO_C" >&6
5071 else
5072 cat >conftest.make <<\EOF
5073 all:
5074 @echo 'ac_maketemp="${MAKE}"'
5075 EOF
5076 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5077 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
5078 if test -n "$ac_maketemp"; then
5079 eval ac_cv_prog_make_${ac_make}_set=yes
5080 else
5081 eval ac_cv_prog_make_${ac_make}_set=no
5082 fi
5083 rm -f conftest.make
5084 fi
5085 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
5086 echo "$as_me:5086: result: yes" >&5
5087 echo "${ECHO_T}yes" >&6
5088 SET_MAKE=
5089 else
5090 echo "$as_me:5090: result: no" >&5
5091 echo "${ECHO_T}no" >&6
5092 SET_MAKE="MAKE=${MAKE-make}"
5093 fi
5094
5095 echo "$as_me:5095: checking for long file names" >&5
5096 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
5097 if test "${ac_cv_sys_long_file_names+set}" = set; then
5098 echo $ECHO_N "(cached) $ECHO_C" >&6
5099 else
5100 ac_cv_sys_long_file_names=yes
5101 # Test for long file names in all the places we know might matter:
5102 # . the current directory, where building will happen
5103 # $prefix/lib where we will be installing things
5104 # $exec_prefix/lib likewise
5105 # eval it to expand exec_prefix.
5106 # $TMPDIR if set, where it might want to write temporary files
5107 # if $TMPDIR is not set:
5108 # /tmp where it might want to write temporary files
5109 # /var/tmp likewise
5110 # /usr/tmp likewise
5111 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
5112 ac_tmpdirs=$TMPDIR
5113 else
5114 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
5115 fi
5116 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
5117 test -d $ac_dir || continue
5118 test -w $ac_dir || continue # It is less confusing to not echo anything here.
5119 ac_xdir=$ac_dir/cf$$
5120 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
5121 ac_tf1=$ac_xdir/conftest9012345
5122 ac_tf2=$ac_xdir/conftest9012346
5123 (echo 1 >$ac_tf1) 2>/dev/null
5124 (echo 2 >$ac_tf2) 2>/dev/null
5125 ac_val=`cat $ac_tf1 2>/dev/null`
5126 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
5127 ac_cv_sys_long_file_names=no
5128 rm -rf $ac_xdir 2>/dev/null
5129 break
5130 fi
5131 rm -rf $ac_xdir 2>/dev/null
5132 done
5133 fi
5134 echo "$as_me:5134: result: $ac_cv_sys_long_file_names" >&5
5135 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
5136 if test $ac_cv_sys_long_file_names = yes; then
5137
5138 cat >>confdefs.h <<\EOF
5139 #define HAVE_LONG_FILE_NAMES 1
5140 EOF
5141
5142 fi
5143
5144 #### Choose a window system.
5145
5146 echo "$as_me:5146: checking for X" >&5
5147 echo $ECHO_N "checking for X... $ECHO_C" >&6
5148
5149 # Check whether --with-x or --without-x was given.
5150 if test "${with_x+set}" = set; then
5151 withval="$with_x"
5152
5153 fi;
5154 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5155 if test "x$with_x" = xno; then
5156 # The user explicitly disabled X.
5157 have_x=disabled
5158 else
5159 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5160 # Both variables are already set.
5161 have_x=yes
5162 else
5163 if test "${ac_cv_have_x+set}" = set; then
5164 echo $ECHO_N "(cached) $ECHO_C" >&6
5165 else
5166 # One or both of the vars are not set, and there is no cached value.
5167 ac_x_includes=no ac_x_libraries=no
5168 rm -fr conftest.dir
5169 if mkdir conftest.dir; then
5170 cd conftest.dir
5171 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5172 cat >Imakefile <<'EOF'
5173 acfindx:
5174 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5175 EOF
5176 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5177 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5178 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5179 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5180 for ac_extension in a so sl; do
5181 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5182 test -f $ac_im_libdir/libX11.$ac_extension; then
5183 ac_im_usrlibdir=$ac_im_libdir; break
5184 fi
5185 done
5186 # Screen out bogus values from the imake configuration. They are
5187 # bogus both because they are the default anyway, and because
5188 # using them would break gcc on systems where it needs fixed includes.
5189 case $ac_im_incroot in
5190 /usr/include) ;;
5191 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
5192 esac
5193 case $ac_im_usrlibdir in
5194 /usr/lib | /lib) ;;
5195 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
5196 esac
5197 fi
5198 cd ..
5199 rm -fr conftest.dir
5200 fi
5201
5202 # Standard set of common directories for X headers.
5203 # Check X11 before X11Rn because it is often a symlink to the current release.
5204 ac_x_header_dirs='
5205 /usr/X11/include
5206 /usr/X11R6/include
5207 /usr/X11R5/include
5208 /usr/X11R4/include
5209
5210 /usr/include/X11
5211 /usr/include/X11R6
5212 /usr/include/X11R5
5213 /usr/include/X11R4
5214
5215 /usr/local/X11/include
5216 /usr/local/X11R6/include
5217 /usr/local/X11R5/include
5218 /usr/local/X11R4/include
5219
5220 /usr/local/include/X11
5221 /usr/local/include/X11R6
5222 /usr/local/include/X11R5
5223 /usr/local/include/X11R4
5224
5225 /usr/X386/include
5226 /usr/x386/include
5227 /usr/XFree86/include/X11
5228
5229 /usr/include
5230 /usr/local/include
5231 /usr/unsupported/include
5232 /usr/athena/include
5233 /usr/local/x11r5/include
5234 /usr/lpp/Xamples/include
5235
5236 /usr/openwin/include
5237 /usr/openwin/share/include'
5238
5239 if test "$ac_x_includes" = no; then
5240 # Guess where to find include files, by looking for Intrinsic.h.
5241 # First, try using that file with no special directory specified.
5242 cat >conftest.$ac_ext <<_ACEOF
5243 #line 5243 "configure"
5244 #include "confdefs.h"
5245 #include <X11/Intrinsic.h>
5246 _ACEOF
5247 if { (eval echo "$as_me:5247: \"$ac_cpp conftest.$ac_ext\"") >&5
5248 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5249 ac_status=$?
5250 egrep -v '^ *\+' conftest.er1 >conftest.err
5251 rm -f conftest.er1
5252 cat conftest.err >&5
5253 echo "$as_me:5253: \$? = $ac_status" >&5
5254 (exit $ac_status); } >/dev/null; then
5255 if test -s conftest.err; then
5256 ac_cpp_err=$ac_c_preproc_warn_flag
5257 else
5258 ac_cpp_err=
5259 fi
5260 else
5261 ac_cpp_err=yes
5262 fi
5263 if test -z "$ac_cpp_err"; then
5264 # We can compile using X headers with no special include directory.
5265 ac_x_includes=
5266 else
5267 echo "$as_me: failed program was:" >&5
5268 cat conftest.$ac_ext >&5
5269 for ac_dir in $ac_x_header_dirs; do
5270 if test -r "$ac_dir/X11/Intrinsic.h"; then
5271 ac_x_includes=$ac_dir
5272 break
5273 fi
5274 done
5275 fi
5276 rm -f conftest.err conftest.$ac_ext
5277 fi # $ac_x_includes = no
5278
5279 if test "$ac_x_libraries" = no; then
5280 # Check for the libraries.
5281 # See if we find them without any special options.
5282 # Don't add to $LIBS permanently.
5283 ac_save_LIBS=$LIBS
5284 LIBS="-lXt $LIBS"
5285 cat >conftest.$ac_ext <<_ACEOF
5286 #line 5286 "configure"
5287 #include "confdefs.h"
5288 #include <X11/Intrinsic.h>
5289 int
5290 main ()
5291 {
5292 XtMalloc (0)
5293 ;
5294 return 0;
5295 }
5296 _ACEOF
5297 rm -f conftest.$ac_objext conftest$ac_exeext
5298 if { (eval echo "$as_me:5298: \"$ac_link\"") >&5
5299 (eval $ac_link) 2>&5
5300 ac_status=$?
5301 echo "$as_me:5301: \$? = $ac_status" >&5
5302 (exit $ac_status); } &&
5303 { ac_try='test -s conftest$ac_exeext'
5304 { (eval echo "$as_me:5304: \"$ac_try\"") >&5
5305 (eval $ac_try) 2>&5
5306 ac_status=$?
5307 echo "$as_me:5307: \$? = $ac_status" >&5
5308 (exit $ac_status); }; }; then
5309 LIBS=$ac_save_LIBS
5310 # We can link X programs with no special library path.
5311 ac_x_libraries=
5312 else
5313 echo "$as_me: failed program was:" >&5
5314 cat conftest.$ac_ext >&5
5315 LIBS=$ac_save_LIBS
5316 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
5317 do
5318 # Don't even attempt the hair of trying to link an X program!
5319 for ac_extension in a so sl; do
5320 if test -r $ac_dir/libXt.$ac_extension; then
5321 ac_x_libraries=$ac_dir
5322 break 2
5323 fi
5324 done
5325 done
5326 fi
5327 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5328 fi # $ac_x_libraries = no
5329
5330 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
5331 # Didn't find X anywhere. Cache the known absence of X.
5332 ac_cv_have_x="have_x=no"
5333 else
5334 # Record where we found X for the cache.
5335 ac_cv_have_x="have_x=yes \
5336 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5337 fi
5338 fi
5339
5340 fi
5341 eval "$ac_cv_have_x"
5342 fi # $with_x != no
5343
5344 if test "$have_x" != yes; then
5345 echo "$as_me:5345: result: $have_x" >&5
5346 echo "${ECHO_T}$have_x" >&6
5347 no_x=yes
5348 else
5349 # If each of the values was on the command line, it overrides each guess.
5350 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5351 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5352 # Update the cache value to reflect the command line values.
5353 ac_cv_have_x="have_x=yes \
5354 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5355 echo "$as_me:5355: result: libraries $x_libraries, headers $x_includes" >&5
5356 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
5357 fi
5358
5359 if test "$no_x" = yes; then
5360 window_system=none
5361 else
5362 window_system=x11
5363 fi
5364
5365 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
5366 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
5367 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
5368 x_default_search_path=""
5369 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
5370 x_search_path="\
5371 ${x_library}/X11/%L/%T/%N%C%S:\
5372 ${x_library}/X11/%l/%T/%N%C%S:\
5373 ${x_library}/X11/%T/%N%C%S:\
5374 ${x_library}/X11/%L/%T/%N%S:\
5375 ${x_library}/X11/%l/%T/%N%S:\
5376 ${x_library}/X11/%T/%N%S"
5377 if test x"${x_default_search_path}" = x; then
5378 x_default_search_path=${x_search_path}
5379 else
5380 x_default_search_path="${x_search_path}:${x_default_search_path}"
5381 fi
5382 done
5383 fi
5384 if test "${x_includes}" != NONE && test -n "${x_includes}"; then
5385 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
5386 fi
5387
5388 if test x"${x_includes}" = x; then
5389 bitmapdir=/usr/include/X11/bitmaps
5390 else
5391 # accumulate include directories that have X11 bitmap subdirectories
5392 bmd_acc="dummyval"
5393 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
5394 if test -d "${bmd}/X11/bitmaps"; then
5395 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
5396 fi
5397 if test -d "${bmd}/bitmaps"; then
5398 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
5399 fi
5400 done
5401 if test ${bmd_acc} != "dummyval"; then
5402 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
5403 fi
5404 fi
5405
5406 case "${window_system}" in
5407 x11 )
5408 HAVE_X_WINDOWS=yes
5409 HAVE_X11=yes
5410 case "${with_x_toolkit}" in
5411 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
5412 motif ) USE_X_TOOLKIT=MOTIF ;;
5413 no ) USE_X_TOOLKIT=none ;;
5414 * ) USE_X_TOOLKIT=maybe ;;
5415 esac
5416 ;;
5417 none )
5418 HAVE_X_WINDOWS=no
5419 HAVE_X11=no
5420 USE_X_TOOLKIT=none
5421 ;;
5422 esac
5423
5424 ### If we're using X11, we should use the X menu package.
5425 HAVE_MENUS=no
5426 case ${HAVE_X11} in
5427 yes ) HAVE_MENUS=yes ;;
5428 esac
5429
5430 if test "${opsys}" = "hpux9"; then
5431 case "${x_libraries}" in
5432 *X11R4* )
5433 opsysfile="s/hpux9-x11r4.h"
5434 ;;
5435 esac
5436 fi
5437
5438 if test "${opsys}" = "hpux9shr"; then
5439 case "${x_libraries}" in
5440 *X11R4* )
5441 opsysfile="s/hpux9shxr4.h"
5442 ;;
5443 esac
5444 fi
5445
5446 ### Compute the unexec source name from the object name.
5447 UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
5448
5449 # Do the opsystem or machine files prohibit the use of the GNU malloc?
5450 # Assume not, until told otherwise.
5451 GNU_MALLOC=yes
5452 doug_lea_malloc=yes
5453 echo "$as_me:5453: checking for malloc_get_state" >&5
5454 echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6
5455 if test "${ac_cv_func_malloc_get_state+set}" = set; then
5456 echo $ECHO_N "(cached) $ECHO_C" >&6
5457 else
5458 cat >conftest.$ac_ext <<_ACEOF
5459 #line 5459 "configure"
5460 #include "confdefs.h"
5461 /* System header to define __stub macros and hopefully few prototypes,
5462 which can conflict with char malloc_get_state (); below. */
5463 #include <assert.h>
5464 /* Override any gcc2 internal prototype to avoid an error. */
5465 #ifdef __cplusplus
5466 extern "C"
5467 #endif
5468 /* We use char because int might match the return type of a gcc2
5469 builtin and then its argument prototype would still apply. */
5470 char malloc_get_state ();
5471 char (*f) ();
5472
5473 int
5474 main ()
5475 {
5476 /* The GNU C library defines this for functions which it implements
5477 to always fail with ENOSYS. Some functions are actually named
5478 something starting with __ and the normal name is an alias. */
5479 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
5480 choke me
5481 #else
5482 f = malloc_get_state;
5483 #endif
5484
5485 ;
5486 return 0;
5487 }
5488 _ACEOF
5489 rm -f conftest.$ac_objext conftest$ac_exeext
5490 if { (eval echo "$as_me:5490: \"$ac_link\"") >&5
5491 (eval $ac_link) 2>&5
5492 ac_status=$?
5493 echo "$as_me:5493: \$? = $ac_status" >&5
5494 (exit $ac_status); } &&
5495 { ac_try='test -s conftest$ac_exeext'
5496 { (eval echo "$as_me:5496: \"$ac_try\"") >&5
5497 (eval $ac_try) 2>&5
5498 ac_status=$?
5499 echo "$as_me:5499: \$? = $ac_status" >&5
5500 (exit $ac_status); }; }; then
5501 ac_cv_func_malloc_get_state=yes
5502 else
5503 echo "$as_me: failed program was:" >&5
5504 cat conftest.$ac_ext >&5
5505 ac_cv_func_malloc_get_state=no
5506 fi
5507 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5508 fi
5509 echo "$as_me:5509: result: $ac_cv_func_malloc_get_state" >&5
5510 echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6
5511 if test $ac_cv_func_malloc_get_state = yes; then
5512 :
5513 else
5514 doug_lea_malloc=no
5515 fi
5516
5517 echo "$as_me:5517: checking for malloc_set_state" >&5
5518 echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6
5519 if test "${ac_cv_func_malloc_set_state+set}" = set; then
5520 echo $ECHO_N "(cached) $ECHO_C" >&6
5521 else
5522 cat >conftest.$ac_ext <<_ACEOF
5523 #line 5523 "configure"
5524 #include "confdefs.h"
5525 /* System header to define __stub macros and hopefully few prototypes,
5526 which can conflict with char malloc_set_state (); below. */
5527 #include <assert.h>
5528 /* Override any gcc2 internal prototype to avoid an error. */
5529 #ifdef __cplusplus
5530 extern "C"
5531 #endif
5532 /* We use char because int might match the return type of a gcc2
5533 builtin and then its argument prototype would still apply. */
5534 char malloc_set_state ();
5535 char (*f) ();
5536
5537 int
5538 main ()
5539 {
5540 /* The GNU C library defines this for functions which it implements
5541 to always fail with ENOSYS. Some functions are actually named
5542 something starting with __ and the normal name is an alias. */
5543 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
5544 choke me
5545 #else
5546 f = malloc_set_state;
5547 #endif
5548
5549 ;
5550 return 0;
5551 }
5552 _ACEOF
5553 rm -f conftest.$ac_objext conftest$ac_exeext
5554 if { (eval echo "$as_me:5554: \"$ac_link\"") >&5
5555 (eval $ac_link) 2>&5
5556 ac_status=$?
5557 echo "$as_me:5557: \$? = $ac_status" >&5
5558 (exit $ac_status); } &&
5559 { ac_try='test -s conftest$ac_exeext'
5560 { (eval echo "$as_me:5560: \"$ac_try\"") >&5
5561 (eval $ac_try) 2>&5
5562 ac_status=$?
5563 echo "$as_me:5563: \$? = $ac_status" >&5
5564 (exit $ac_status); }; }; then
5565 ac_cv_func_malloc_set_state=yes
5566 else
5567 echo "$as_me: failed program was:" >&5
5568 cat conftest.$ac_ext >&5
5569 ac_cv_func_malloc_set_state=no
5570 fi
5571 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5572 fi
5573 echo "$as_me:5573: result: $ac_cv_func_malloc_set_state" >&5
5574 echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6
5575 if test $ac_cv_func_malloc_set_state = yes; then
5576 :
5577 else
5578 doug_lea_malloc=no
5579 fi
5580
5581 echo "$as_me:5581: checking whether __after_morecore_hook exists" >&5
5582 echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6
5583 if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
5584 echo $ECHO_N "(cached) $ECHO_C" >&6
5585 else
5586 cat >conftest.$ac_ext <<_ACEOF
5587 #line 5587 "configure"
5588 #include "confdefs.h"
5589 extern void (* __after_morecore_hook)();
5590 int
5591 main ()
5592 {
5593 __after_morecore_hook = 0
5594 ;
5595 return 0;
5596 }
5597 _ACEOF
5598 rm -f conftest.$ac_objext conftest$ac_exeext
5599 if { (eval echo "$as_me:5599: \"$ac_link\"") >&5
5600 (eval $ac_link) 2>&5
5601 ac_status=$?
5602 echo "$as_me:5602: \$? = $ac_status" >&5
5603 (exit $ac_status); } &&
5604 { ac_try='test -s conftest$ac_exeext'
5605 { (eval echo "$as_me:5605: \"$ac_try\"") >&5
5606 (eval $ac_try) 2>&5
5607 ac_status=$?
5608 echo "$as_me:5608: \$? = $ac_status" >&5
5609 (exit $ac_status); }; }; then
5610 emacs_cv_var___after_morecore_hook=yes
5611 else
5612 echo "$as_me: failed program was:" >&5
5613 cat conftest.$ac_ext >&5
5614 emacs_cv_var___after_morecore_hook=no
5615 fi
5616 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5617 fi
5618 echo "$as_me:5618: result: $emacs_cv_var___after_morecore_hook" >&5
5619 echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6
5620 if test $emacs_cv_var___after_morecore_hook = no; then
5621 doug_lea_malloc=no
5622 fi
5623 if test "${system_malloc}" = "yes"; then
5624 GNU_MALLOC=no
5625 GNU_MALLOC_reason="
5626 (The GNU allocators don't work with this system configuration.)"
5627 fi
5628 if test "$doug_lea_malloc" = "yes" ; then
5629 if test "$GNU_MALLOC" = yes ; then
5630 GNU_MALLOC_reason="
5631 (Using Doug Lea's new malloc from the GNU C Library.)"
5632 fi
5633 cat >>confdefs.h <<\EOF
5634 #define DOUG_LEA_MALLOC 1
5635 EOF
5636
5637 fi
5638
5639 if test x"${REL_ALLOC}" = x; then
5640 REL_ALLOC=${GNU_MALLOC}
5641 fi
5642
5643 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5644
5645 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5646 inttypes.h stdint.h unistd.h
5647 do
5648 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5649 echo "$as_me:5649: checking for $ac_header" >&5
5650 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5651 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5652 echo $ECHO_N "(cached) $ECHO_C" >&6
5653 else
5654 cat >conftest.$ac_ext <<_ACEOF
5655 #line 5655 "configure"
5656 #include "confdefs.h"
5657 $ac_includes_default
5658 #include <$ac_header>
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 eval "$as_ac_Header=yes"
5673 else
5674 echo "$as_me: failed program was:" >&5
5675 cat conftest.$ac_ext >&5
5676 eval "$as_ac_Header=no"
5677 fi
5678 rm -f conftest.$ac_objext conftest.$ac_ext
5679 fi
5680 echo "$as_me:5680: result: `eval echo '${'$as_ac_Header'}'`" >&5
5681 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5682 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5683 cat >>confdefs.h <<EOF
5684 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5685 EOF
5686
5687 fi
5688 done
5689
5690 for ac_header in stdlib.h unistd.h
5691 do
5692 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5693 echo "$as_me:5693: checking for $ac_header" >&5
5694 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5695 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5696 echo $ECHO_N "(cached) $ECHO_C" >&6
5697 else
5698 cat >conftest.$ac_ext <<_ACEOF
5699 #line 5699 "configure"
5700 #include "confdefs.h"
5701 #include <$ac_header>
5702 _ACEOF
5703 if { (eval echo "$as_me:5703: \"$ac_cpp conftest.$ac_ext\"") >&5
5704 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5705 ac_status=$?
5706 egrep -v '^ *\+' conftest.er1 >conftest.err
5707 rm -f conftest.er1
5708 cat conftest.err >&5
5709 echo "$as_me:5709: \$? = $ac_status" >&5
5710 (exit $ac_status); } >/dev/null; then
5711 if test -s conftest.err; then
5712 ac_cpp_err=$ac_c_preproc_warn_flag
5713 else
5714 ac_cpp_err=
5715 fi
5716 else
5717 ac_cpp_err=yes
5718 fi
5719 if test -z "$ac_cpp_err"; then
5720 eval "$as_ac_Header=yes"
5721 else
5722 echo "$as_me: failed program was:" >&5
5723 cat conftest.$ac_ext >&5
5724 eval "$as_ac_Header=no"
5725 fi
5726 rm -f conftest.err conftest.$ac_ext
5727 fi
5728 echo "$as_me:5728: result: `eval echo '${'$as_ac_Header'}'`" >&5
5729 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5730 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5731 cat >>confdefs.h <<EOF
5732 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5733 EOF
5734
5735 fi
5736 done
5737
5738 for ac_func in getpagesize
5739 do
5740 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5741 echo "$as_me:5741: checking for $ac_func" >&5
5742 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5743 if eval "test \"\${$as_ac_var+set}\" = set"; then
5744 echo $ECHO_N "(cached) $ECHO_C" >&6
5745 else
5746 cat >conftest.$ac_ext <<_ACEOF
5747 #line 5747 "configure"
5748 #include "confdefs.h"
5749 /* System header to define __stub macros and hopefully few prototypes,
5750 which can conflict with char $ac_func (); below. */
5751 #include <assert.h>
5752 /* Override any gcc2 internal prototype to avoid an error. */
5753 #ifdef __cplusplus
5754 extern "C"
5755 #endif
5756 /* We use char because int might match the return type of a gcc2
5757 builtin and then its argument prototype would still apply. */
5758 char $ac_func ();
5759 char (*f) ();
5760
5761 int
5762 main ()
5763 {
5764 /* The GNU C library defines this for functions which it implements
5765 to always fail with ENOSYS. Some functions are actually named
5766 something starting with __ and the normal name is an alias. */
5767 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5768 choke me
5769 #else
5770 f = $ac_func;
5771 #endif
5772
5773 ;
5774 return 0;
5775 }
5776 _ACEOF
5777 rm -f conftest.$ac_objext conftest$ac_exeext
5778 if { (eval echo "$as_me:5778: \"$ac_link\"") >&5
5779 (eval $ac_link) 2>&5
5780 ac_status=$?
5781 echo "$as_me:5781: \$? = $ac_status" >&5
5782 (exit $ac_status); } &&
5783 { ac_try='test -s conftest$ac_exeext'
5784 { (eval echo "$as_me:5784: \"$ac_try\"") >&5
5785 (eval $ac_try) 2>&5
5786 ac_status=$?
5787 echo "$as_me:5787: \$? = $ac_status" >&5
5788 (exit $ac_status); }; }; then
5789 eval "$as_ac_var=yes"
5790 else
5791 echo "$as_me: failed program was:" >&5
5792 cat conftest.$ac_ext >&5
5793 eval "$as_ac_var=no"
5794 fi
5795 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5796 fi
5797 echo "$as_me:5797: result: `eval echo '${'$as_ac_var'}'`" >&5
5798 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5799 if test `eval echo '${'$as_ac_var'}'` = yes; then
5800 cat >>confdefs.h <<EOF
5801 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5802 EOF
5803
5804 fi
5805 done
5806
5807 echo "$as_me:5807: checking for working mmap" >&5
5808 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
5809 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
5810 echo $ECHO_N "(cached) $ECHO_C" >&6
5811 else
5812 if test "$cross_compiling" = yes; then
5813 ac_cv_func_mmap_fixed_mapped=no
5814 else
5815 cat >conftest.$ac_ext <<_ACEOF
5816 #line 5816 "configure"
5817 #include "confdefs.h"
5818 $ac_includes_default
5819 /* Thanks to Mike Haertel and Jim Avera for this test.
5820 Here is a matrix of mmap possibilities:
5821 mmap private not fixed
5822 mmap private fixed at somewhere currently unmapped
5823 mmap private fixed at somewhere already mapped
5824 mmap shared not fixed
5825 mmap shared fixed at somewhere currently unmapped
5826 mmap shared fixed at somewhere already mapped
5827 For private mappings, we should verify that changes cannot be read()
5828 back from the file, nor mmap's back from the file at a different
5829 address. (There have been systems where private was not correctly
5830 implemented like the infamous i386 svr4.0, and systems where the
5831 VM page cache was not coherent with the file system buffer cache
5832 like early versions of FreeBSD and possibly contemporary NetBSD.)
5833 For shared mappings, we should conversely verify that changes get
5834 propogated back to all the places they're supposed to be.
5835
5836 Grep wants private fixed already mapped.
5837 The main things grep needs to know about mmap are:
5838 * does it exist and is it safe to write into the mmap'd area
5839 * how to use it (BSD variants) */
5840
5841 #include <fcntl.h>
5842 #include <sys/mman.h>
5843
5844 #if !STDC_HEADERS && !HAVE_STDLIB_H
5845 char *malloc ();
5846 #endif
5847
5848 /* This mess was copied from the GNU getpagesize.h. */
5849 #if !HAVE_GETPAGESIZE
5850 /* Assume that all systems that can run configure have sys/param.h. */
5851 # if !HAVE_SYS_PARAM_H
5852 # define HAVE_SYS_PARAM_H 1
5853 # endif
5854
5855 # ifdef _SC_PAGESIZE
5856 # define getpagesize() sysconf(_SC_PAGESIZE)
5857 # else /* no _SC_PAGESIZE */
5858 # if HAVE_SYS_PARAM_H
5859 # include <sys/param.h>
5860 # ifdef EXEC_PAGESIZE
5861 # define getpagesize() EXEC_PAGESIZE
5862 # else /* no EXEC_PAGESIZE */
5863 # ifdef NBPG
5864 # define getpagesize() NBPG * CLSIZE
5865 # ifndef CLSIZE
5866 # define CLSIZE 1
5867 # endif /* no CLSIZE */
5868 # else /* no NBPG */
5869 # ifdef NBPC
5870 # define getpagesize() NBPC
5871 # else /* no NBPC */
5872 # ifdef PAGESIZE
5873 # define getpagesize() PAGESIZE
5874 # endif /* PAGESIZE */
5875 # endif /* no NBPC */
5876 # endif /* no NBPG */
5877 # endif /* no EXEC_PAGESIZE */
5878 # else /* no HAVE_SYS_PARAM_H */
5879 # define getpagesize() 8192 /* punt totally */
5880 # endif /* no HAVE_SYS_PARAM_H */
5881 # endif /* no _SC_PAGESIZE */
5882
5883 #endif /* no HAVE_GETPAGESIZE */
5884
5885 int
5886 main ()
5887 {
5888 char *data, *data2, *data3;
5889 int i, pagesize;
5890 int fd;
5891
5892 pagesize = getpagesize ();
5893
5894 /* First, make a file with some known garbage in it. */
5895 data = (char *) malloc (pagesize);
5896 if (!data)
5897 exit (1);
5898 for (i = 0; i < pagesize; ++i)
5899 *(data + i) = rand ();
5900 umask (0);
5901 fd = creat ("conftest.mmap", 0600);
5902 if (fd < 0)
5903 exit (1);
5904 if (write (fd, data, pagesize) != pagesize)
5905 exit (1);
5906 close (fd);
5907
5908 /* Next, try to mmap the file at a fixed address which already has
5909 something else allocated at it. If we can, also make sure that
5910 we see the same garbage. */
5911 fd = open ("conftest.mmap", O_RDWR);
5912 if (fd < 0)
5913 exit (1);
5914 data2 = (char *) malloc (2 * pagesize);
5915 if (!data2)
5916 exit (1);
5917 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5918 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
5919 MAP_PRIVATE | MAP_FIXED, fd, 0L))
5920 exit (1);
5921 for (i = 0; i < pagesize; ++i)
5922 if (*(data + i) != *(data2 + i))
5923 exit (1);
5924
5925 /* Finally, make sure that changes to the mapped area do not
5926 percolate back to the file as seen by read(). (This is a bug on
5927 some variants of i386 svr4.0.) */
5928 for (i = 0; i < pagesize; ++i)
5929 *(data2 + i) = *(data2 + i) + 1;
5930 data3 = (char *) malloc (pagesize);
5931 if (!data3)
5932 exit (1);
5933 if (read (fd, data3, pagesize) != pagesize)
5934 exit (1);
5935 for (i = 0; i < pagesize; ++i)
5936 if (*(data + i) != *(data3 + i))
5937 exit (1);
5938 close (fd);
5939 exit (0);
5940 }
5941 _ACEOF
5942 rm -f conftest$ac_exeext
5943 if { (eval echo "$as_me:5943: \"$ac_link\"") >&5
5944 (eval $ac_link) 2>&5
5945 ac_status=$?
5946 echo "$as_me:5946: \$? = $ac_status" >&5
5947 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5948 { (eval echo "$as_me:5948: \"$ac_try\"") >&5
5949 (eval $ac_try) 2>&5
5950 ac_status=$?
5951 echo "$as_me:5951: \$? = $ac_status" >&5
5952 (exit $ac_status); }; }; then
5953 ac_cv_func_mmap_fixed_mapped=yes
5954 else
5955 echo "$as_me: program exited with status $ac_status" >&5
5956 echo "$as_me: failed program was:" >&5
5957 cat conftest.$ac_ext >&5
5958 ac_cv_func_mmap_fixed_mapped=no
5959 fi
5960 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5961 fi
5962 fi
5963 echo "$as_me:5963: result: $ac_cv_func_mmap_fixed_mapped" >&5
5964 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
5965 if test $ac_cv_func_mmap_fixed_mapped = yes; then
5966
5967 cat >>confdefs.h <<\EOF
5968 #define HAVE_MMAP 1
5969 EOF
5970
5971 fi
5972 rm -f conftest.mmap
5973
5974 if test $use_mmap_for_buffers = yes; then
5975 REL_ALLOC=no
5976 fi
5977
5978 LIBS="$libsrc_libs $LIBS"
5979
5980 echo "$as_me:5980: checking for dnet_ntoa in -ldnet" >&5
5981 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
5982 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
5983 echo $ECHO_N "(cached) $ECHO_C" >&6
5984 else
5985 ac_check_lib_save_LIBS=$LIBS
5986 LIBS="-ldnet $LIBS"
5987 cat >conftest.$ac_ext <<_ACEOF
5988 #line 5988 "configure"
5989 #include "confdefs.h"
5990
5991 /* Override any gcc2 internal prototype to avoid an error. */
5992 #ifdef __cplusplus
5993 extern "C"
5994 #endif
5995 /* We use char because int might match the return type of a gcc2
5996 builtin and then its argument prototype would still apply. */
5997 char dnet_ntoa ();
5998 int
5999 main ()
6000 {
6001 dnet_ntoa ();
6002 ;
6003 return 0;
6004 }
6005 _ACEOF
6006 rm -f conftest.$ac_objext conftest$ac_exeext
6007 if { (eval echo "$as_me:6007: \"$ac_link\"") >&5
6008 (eval $ac_link) 2>&5
6009 ac_status=$?
6010 echo "$as_me:6010: \$? = $ac_status" >&5
6011 (exit $ac_status); } &&
6012 { ac_try='test -s conftest$ac_exeext'
6013 { (eval echo "$as_me:6013: \"$ac_try\"") >&5
6014 (eval $ac_try) 2>&5
6015 ac_status=$?
6016 echo "$as_me:6016: \$? = $ac_status" >&5
6017 (exit $ac_status); }; }; then
6018 ac_cv_lib_dnet_dnet_ntoa=yes
6019 else
6020 echo "$as_me: failed program was:" >&5
6021 cat conftest.$ac_ext >&5
6022 ac_cv_lib_dnet_dnet_ntoa=no
6023 fi
6024 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6025 LIBS=$ac_check_lib_save_LIBS
6026 fi
6027 echo "$as_me:6027: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6028 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
6029 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
6030 cat >>confdefs.h <<EOF
6031 #define HAVE_LIBDNET 1
6032 EOF
6033
6034 LIBS="-ldnet $LIBS"
6035
6036 fi
6037
6038 echo "$as_me:6038: checking for main in -lXbsd" >&5
6039 echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6
6040 if test "${ac_cv_lib_Xbsd_main+set}" = set; then
6041 echo $ECHO_N "(cached) $ECHO_C" >&6
6042 else
6043 ac_check_lib_save_LIBS=$LIBS
6044 LIBS="-lXbsd $LIBS"
6045 cat >conftest.$ac_ext <<_ACEOF
6046 #line 6046 "configure"
6047 #include "confdefs.h"
6048
6049 int
6050 main ()
6051 {
6052 main ();
6053 ;
6054 return 0;
6055 }
6056 _ACEOF
6057 rm -f conftest.$ac_objext conftest$ac_exeext
6058 if { (eval echo "$as_me:6058: \"$ac_link\"") >&5
6059 (eval $ac_link) 2>&5
6060 ac_status=$?
6061 echo "$as_me:6061: \$? = $ac_status" >&5
6062 (exit $ac_status); } &&
6063 { ac_try='test -s conftest$ac_exeext'
6064 { (eval echo "$as_me:6064: \"$ac_try\"") >&5
6065 (eval $ac_try) 2>&5
6066 ac_status=$?
6067 echo "$as_me:6067: \$? = $ac_status" >&5
6068 (exit $ac_status); }; }; then
6069 ac_cv_lib_Xbsd_main=yes
6070 else
6071 echo "$as_me: failed program was:" >&5
6072 cat conftest.$ac_ext >&5
6073 ac_cv_lib_Xbsd_main=no
6074 fi
6075 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6076 LIBS=$ac_check_lib_save_LIBS
6077 fi
6078 echo "$as_me:6078: result: $ac_cv_lib_Xbsd_main" >&5
6079 echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6
6080 if test $ac_cv_lib_Xbsd_main = yes; then
6081 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
6082 fi
6083
6084 echo "$as_me:6084: checking for cma_open in -lpthreads" >&5
6085 echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6
6086 if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
6087 echo $ECHO_N "(cached) $ECHO_C" >&6
6088 else
6089 ac_check_lib_save_LIBS=$LIBS
6090 LIBS="-lpthreads $LIBS"
6091 cat >conftest.$ac_ext <<_ACEOF
6092 #line 6092 "configure"
6093 #include "confdefs.h"
6094
6095 /* Override any gcc2 internal prototype to avoid an error. */
6096 #ifdef __cplusplus
6097 extern "C"
6098 #endif
6099 /* We use char because int might match the return type of a gcc2
6100 builtin and then its argument prototype would still apply. */
6101 char cma_open ();
6102 int
6103 main ()
6104 {
6105 cma_open ();
6106 ;
6107 return 0;
6108 }
6109 _ACEOF
6110 rm -f conftest.$ac_objext conftest$ac_exeext
6111 if { (eval echo "$as_me:6111: \"$ac_link\"") >&5
6112 (eval $ac_link) 2>&5
6113 ac_status=$?
6114 echo "$as_me:6114: \$? = $ac_status" >&5
6115 (exit $ac_status); } &&
6116 { ac_try='test -s conftest$ac_exeext'
6117 { (eval echo "$as_me:6117: \"$ac_try\"") >&5
6118 (eval $ac_try) 2>&5
6119 ac_status=$?
6120 echo "$as_me:6120: \$? = $ac_status" >&5
6121 (exit $ac_status); }; }; then
6122 ac_cv_lib_pthreads_cma_open=yes
6123 else
6124 echo "$as_me: failed program was:" >&5
6125 cat conftest.$ac_ext >&5
6126 ac_cv_lib_pthreads_cma_open=no
6127 fi
6128 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6129 LIBS=$ac_check_lib_save_LIBS
6130 fi
6131 echo "$as_me:6131: result: $ac_cv_lib_pthreads_cma_open" >&5
6132 echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6
6133 if test $ac_cv_lib_pthreads_cma_open = yes; then
6134 cat >>confdefs.h <<EOF
6135 #define HAVE_LIBPTHREADS 1
6136 EOF
6137
6138 LIBS="-lpthreads $LIBS"
6139
6140 fi
6141
6142 echo "$as_me:6142: checking for XFree86 in /usr/X386" >&5
6143 echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6
6144 if test -d /usr/X386/include; then
6145 HAVE_XFREE386=yes
6146 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
6147 else
6148 HAVE_XFREE386=no
6149 fi
6150 echo "$as_me:6150: result: $HAVE_XFREE386" >&5
6151 echo "${ECHO_T}$HAVE_XFREE386" >&6
6152
6153 # Change CFLAGS temporarily so that C_SWITCH_X_SITE gets used
6154 # for the tests that follow. We set it back to REAL_CFLAGS later on.
6155
6156 REAL_CPPFLAGS="$CPPFLAGS"
6157
6158 if test "${HAVE_X11}" = "yes"; then
6159 DEFS="$C_SWITCH_X_SITE $DEFS"
6160 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
6161 LIBS="$LIBX $LIBS"
6162 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
6163 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
6164
6165 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
6166 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
6167 # but it's more convenient here to set LD_RUN_PATH
6168 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
6169 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
6170 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
6171 export LD_RUN_PATH
6172 fi
6173
6174 if test "${opsys}" = "gnu-linux"; then
6175 echo "$as_me:6175: checking whether X on GNU/Linux needs -b to link" >&5
6176 echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6
6177 cat >conftest.$ac_ext <<_ACEOF
6178 #line 6178 "configure"
6179 #include "confdefs.h"
6180
6181 int
6182 main ()
6183 {
6184 XOpenDisplay ("foo");
6185 ;
6186 return 0;
6187 }
6188 _ACEOF
6189 rm -f conftest.$ac_objext conftest$ac_exeext
6190 if { (eval echo "$as_me:6190: \"$ac_link\"") >&5
6191 (eval $ac_link) 2>&5
6192 ac_status=$?
6193 echo "$as_me:6193: \$? = $ac_status" >&5
6194 (exit $ac_status); } &&
6195 { ac_try='test -s conftest$ac_exeext'
6196 { (eval echo "$as_me:6196: \"$ac_try\"") >&5
6197 (eval $ac_try) 2>&5
6198 ac_status=$?
6199 echo "$as_me:6199: \$? = $ac_status" >&5
6200 (exit $ac_status); }; }; then
6201 xlinux_first_failure=no
6202 else
6203 echo "$as_me: failed program was:" >&5
6204 cat conftest.$ac_ext >&5
6205 xlinux_first_failure=yes
6206 fi
6207 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6208 if test "${xlinux_first_failure}" = "yes"; then
6209 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
6210 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
6211 OLD_CPPFLAGS="$CPPFLAGS"
6212 OLD_LIBS="$LIBS"
6213 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
6214 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
6215 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
6216 LIBS="$LIBS -b i486-linuxaout"
6217 cat >conftest.$ac_ext <<_ACEOF
6218 #line 6218 "configure"
6219 #include "confdefs.h"
6220
6221 int
6222 main ()
6223 {
6224 XOpenDisplay ("foo");
6225 ;
6226 return 0;
6227 }
6228 _ACEOF
6229 rm -f conftest.$ac_objext conftest$ac_exeext
6230 if { (eval echo "$as_me:6230: \"$ac_link\"") >&5
6231 (eval $ac_link) 2>&5
6232 ac_status=$?
6233 echo "$as_me:6233: \$? = $ac_status" >&5
6234 (exit $ac_status); } &&
6235 { ac_try='test -s conftest$ac_exeext'
6236 { (eval echo "$as_me:6236: \"$ac_try\"") >&5
6237 (eval $ac_try) 2>&5
6238 ac_status=$?
6239 echo "$as_me:6239: \$? = $ac_status" >&5
6240 (exit $ac_status); }; }; then
6241 xlinux_second_failure=no
6242 else
6243 echo "$as_me: failed program was:" >&5
6244 cat conftest.$ac_ext >&5
6245 xlinux_second_failure=yes
6246 fi
6247 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6248 if test "${xlinux_second_failure}" = "yes"; then
6249 # If we get the same failure with -b, there is no use adding -b.
6250 # So take it out. This plays safe.
6251 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
6252 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
6253 CPPFLAGS="$OLD_CPPFLAGS"
6254 LIBS="$OLD_LIBS"
6255 echo "$as_me:6255: result: no" >&5
6256 echo "${ECHO_T}no" >&6
6257 else
6258 echo "$as_me:6258: result: yes" >&5
6259 echo "${ECHO_T}yes" >&6
6260 fi
6261 else
6262 echo "$as_me:6262: result: no" >&5
6263 echo "${ECHO_T}no" >&6
6264 fi
6265 fi
6266
6267 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
6268 # header files included from there.
6269 echo "$as_me:6269: checking for Xkb" >&5
6270 echo $ECHO_N "checking for Xkb... $ECHO_C" >&6
6271 cat >conftest.$ac_ext <<_ACEOF
6272 #line 6272 "configure"
6273 #include "confdefs.h"
6274 #include <X11/Xlib.h>
6275 #include <X11/XKBlib.h>
6276 int
6277 main ()
6278 {
6279 XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
6280 ;
6281 return 0;
6282 }
6283 _ACEOF
6284 rm -f conftest.$ac_objext conftest$ac_exeext
6285 if { (eval echo "$as_me:6285: \"$ac_link\"") >&5
6286 (eval $ac_link) 2>&5
6287 ac_status=$?
6288 echo "$as_me:6288: \$? = $ac_status" >&5
6289 (exit $ac_status); } &&
6290 { ac_try='test -s conftest$ac_exeext'
6291 { (eval echo "$as_me:6291: \"$ac_try\"") >&5
6292 (eval $ac_try) 2>&5
6293 ac_status=$?
6294 echo "$as_me:6294: \$? = $ac_status" >&5
6295 (exit $ac_status); }; }; then
6296 emacs_xkb=yes
6297 else
6298 echo "$as_me: failed program was:" >&5
6299 cat conftest.$ac_ext >&5
6300 emacs_xkb=no
6301 fi
6302 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6303 echo "$as_me:6303: result: $emacs_xkb" >&5
6304 echo "${ECHO_T}$emacs_xkb" >&6
6305 if test $emacs_xkb = yes; then
6306 cat >>confdefs.h <<\EOF
6307 #define HAVE_XKBGETKEYBOARD 1
6308 EOF
6309
6310 fi
6311
6312 for ac_func in XrmSetDatabase XScreenResourceString \
6313 XScreenNumberOfScreen XSetWMProtocols
6314 do
6315 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6316 echo "$as_me:6316: checking for $ac_func" >&5
6317 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6318 if eval "test \"\${$as_ac_var+set}\" = set"; then
6319 echo $ECHO_N "(cached) $ECHO_C" >&6
6320 else
6321 cat >conftest.$ac_ext <<_ACEOF
6322 #line 6322 "configure"
6323 #include "confdefs.h"
6324 /* System header to define __stub macros and hopefully few prototypes,
6325 which can conflict with char $ac_func (); below. */
6326 #include <assert.h>
6327 /* Override any gcc2 internal prototype to avoid an error. */
6328 #ifdef __cplusplus
6329 extern "C"
6330 #endif
6331 /* We use char because int might match the return type of a gcc2
6332 builtin and then its argument prototype would still apply. */
6333 char $ac_func ();
6334 char (*f) ();
6335
6336 int
6337 main ()
6338 {
6339 /* The GNU C library defines this for functions which it implements
6340 to always fail with ENOSYS. Some functions are actually named
6341 something starting with __ and the normal name is an alias. */
6342 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6343 choke me
6344 #else
6345 f = $ac_func;
6346 #endif
6347
6348 ;
6349 return 0;
6350 }
6351 _ACEOF
6352 rm -f conftest.$ac_objext conftest$ac_exeext
6353 if { (eval echo "$as_me:6353: \"$ac_link\"") >&5
6354 (eval $ac_link) 2>&5
6355 ac_status=$?
6356 echo "$as_me:6356: \$? = $ac_status" >&5
6357 (exit $ac_status); } &&
6358 { ac_try='test -s conftest$ac_exeext'
6359 { (eval echo "$as_me:6359: \"$ac_try\"") >&5
6360 (eval $ac_try) 2>&5
6361 ac_status=$?
6362 echo "$as_me:6362: \$? = $ac_status" >&5
6363 (exit $ac_status); }; }; then
6364 eval "$as_ac_var=yes"
6365 else
6366 echo "$as_me: failed program was:" >&5
6367 cat conftest.$ac_ext >&5
6368 eval "$as_ac_var=no"
6369 fi
6370 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6371 fi
6372 echo "$as_me:6372: result: `eval echo '${'$as_ac_var'}'`" >&5
6373 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6374 if test `eval echo '${'$as_ac_var'}'` = yes; then
6375 cat >>confdefs.h <<EOF
6376 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6377 EOF
6378
6379 fi
6380 done
6381
6382 fi
6383
6384 if test "${window_system}" = "x11"; then
6385 echo "$as_me:6385: checking X11 version 6" >&5
6386 echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6
6387 if test "${emacs_cv_x11_version_6+set}" = set; then
6388 echo $ECHO_N "(cached) $ECHO_C" >&6
6389 else
6390 cat >conftest.$ac_ext <<_ACEOF
6391 #line 6391 "configure"
6392 #include "confdefs.h"
6393 #include <X11/Xlib.h>
6394 int
6395 main ()
6396 {
6397 #if XlibSpecificationRelease < 6
6398 fail;
6399 #endif
6400
6401 ;
6402 return 0;
6403 }
6404 _ACEOF
6405 rm -f conftest.$ac_objext conftest$ac_exeext
6406 if { (eval echo "$as_me:6406: \"$ac_link\"") >&5
6407 (eval $ac_link) 2>&5
6408 ac_status=$?
6409 echo "$as_me:6409: \$? = $ac_status" >&5
6410 (exit $ac_status); } &&
6411 { ac_try='test -s conftest$ac_exeext'
6412 { (eval echo "$as_me:6412: \"$ac_try\"") >&5
6413 (eval $ac_try) 2>&5
6414 ac_status=$?
6415 echo "$as_me:6415: \$? = $ac_status" >&5
6416 (exit $ac_status); }; }; then
6417 emacs_cv_x11_version_6=yes
6418 else
6419 echo "$as_me: failed program was:" >&5
6420 cat conftest.$ac_ext >&5
6421 emacs_cv_x11_version_6=no
6422 fi
6423 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6424 fi
6425
6426 if test $emacs_cv_x11_version_6 = yes; then
6427 echo "$as_me:6427: result: 6 or newer" >&5
6428 echo "${ECHO_T}6 or newer" >&6
6429 cat >>confdefs.h <<\EOF
6430 #define HAVE_X11R6 1
6431 EOF
6432
6433 else
6434 echo "$as_me:6434: result: before 6" >&5
6435 echo "${ECHO_T}before 6" >&6
6436 fi
6437 fi
6438
6439 if test "${window_system}" = "x11"; then
6440 echo "$as_me:6440: checking X11 version 5" >&5
6441 echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6
6442 if test "${emacs_cv_x11_version_5+set}" = set; then
6443 echo $ECHO_N "(cached) $ECHO_C" >&6
6444 else
6445 cat >conftest.$ac_ext <<_ACEOF
6446 #line 6446 "configure"
6447 #include "confdefs.h"
6448 #include <X11/Xlib.h>
6449 int
6450 main ()
6451 {
6452 #if XlibSpecificationRelease < 5
6453 fail;
6454 #endif
6455
6456 ;
6457 return 0;
6458 }
6459 _ACEOF
6460 rm -f conftest.$ac_objext conftest$ac_exeext
6461 if { (eval echo "$as_me:6461: \"$ac_link\"") >&5
6462 (eval $ac_link) 2>&5
6463 ac_status=$?
6464 echo "$as_me:6464: \$? = $ac_status" >&5
6465 (exit $ac_status); } &&
6466 { ac_try='test -s conftest$ac_exeext'
6467 { (eval echo "$as_me:6467: \"$ac_try\"") >&5
6468 (eval $ac_try) 2>&5
6469 ac_status=$?
6470 echo "$as_me:6470: \$? = $ac_status" >&5
6471 (exit $ac_status); }; }; then
6472 emacs_cv_x11_version_5=yes
6473 else
6474 echo "$as_me: failed program was:" >&5
6475 cat conftest.$ac_ext >&5
6476 emacs_cv_x11_version_5=no
6477 fi
6478 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6479 fi
6480
6481 if test $emacs_cv_x11_version_5 = yes; then
6482 echo "$as_me:6482: result: 5 or newer" >&5
6483 echo "${ECHO_T}5 or newer" >&6
6484 HAVE_X11R5=yes
6485 cat >>confdefs.h <<\EOF
6486 #define HAVE_X11R5 1
6487 EOF
6488
6489 else
6490 HAVE_X11R5=no
6491 echo "$as_me:6491: result: before 5" >&5
6492 echo "${ECHO_T}before 5" >&6
6493 fi
6494 fi
6495
6496 if test x"${USE_X_TOOLKIT}" = xmaybe; then
6497 if test x"${HAVE_X11R5}" = xyes; then
6498 echo "$as_me:6498: checking X11 version 5 with Xaw" >&5
6499 echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6
6500 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
6501 echo $ECHO_N "(cached) $ECHO_C" >&6
6502 else
6503 cat >conftest.$ac_ext <<_ACEOF
6504 #line 6504 "configure"
6505 #include "confdefs.h"
6506
6507 #include <X11/Intrinsic.h>
6508 #include <X11/Xaw/Simple.h>
6509 int
6510 main ()
6511 {
6512
6513 ;
6514 return 0;
6515 }
6516 _ACEOF
6517 rm -f conftest.$ac_objext conftest$ac_exeext
6518 if { (eval echo "$as_me:6518: \"$ac_link\"") >&5
6519 (eval $ac_link) 2>&5
6520 ac_status=$?
6521 echo "$as_me:6521: \$? = $ac_status" >&5
6522 (exit $ac_status); } &&
6523 { ac_try='test -s conftest$ac_exeext'
6524 { (eval echo "$as_me:6524: \"$ac_try\"") >&5
6525 (eval $ac_try) 2>&5
6526 ac_status=$?
6527 echo "$as_me:6527: \$? = $ac_status" >&5
6528 (exit $ac_status); }; }; then
6529 emacs_cv_x11_version_5_with_xaw=yes
6530 else
6531 echo "$as_me: failed program was:" >&5
6532 cat conftest.$ac_ext >&5
6533 emacs_cv_x11_version_5_with_xaw=no
6534 fi
6535 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6536 fi
6537
6538 if test $emacs_cv_x11_version_5_with_xaw = yes; then
6539 echo "$as_me:6539: result: 5 or newer, with Xaw; use toolkit by default" >&5
6540 echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6
6541 USE_X_TOOLKIT=LUCID
6542 else
6543 echo "$as_me:6543: result: before 5 or no Xaw; do not use toolkit by default" >&5
6544 echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6
6545 USE_X_TOOLKIT=none
6546 fi
6547 else
6548 USE_X_TOOLKIT=none
6549 fi
6550 fi
6551
6552 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
6553
6554 if test "${USE_X_TOOLKIT}" != "none"; then
6555 echo "$as_me:6555: checking X11 toolkit version" >&5
6556 echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6
6557 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
6558 echo $ECHO_N "(cached) $ECHO_C" >&6
6559 else
6560 cat >conftest.$ac_ext <<_ACEOF
6561 #line 6561 "configure"
6562 #include "confdefs.h"
6563 #include <X11/Intrinsic.h>
6564 int
6565 main ()
6566 {
6567 #if XtSpecificationRelease < 6
6568 fail;
6569 #endif
6570
6571 ;
6572 return 0;
6573 }
6574 _ACEOF
6575 rm -f conftest.$ac_objext conftest$ac_exeext
6576 if { (eval echo "$as_me:6576: \"$ac_link\"") >&5
6577 (eval $ac_link) 2>&5
6578 ac_status=$?
6579 echo "$as_me:6579: \$? = $ac_status" >&5
6580 (exit $ac_status); } &&
6581 { ac_try='test -s conftest$ac_exeext'
6582 { (eval echo "$as_me:6582: \"$ac_try\"") >&5
6583 (eval $ac_try) 2>&5
6584 ac_status=$?
6585 echo "$as_me:6585: \$? = $ac_status" >&5
6586 (exit $ac_status); }; }; then
6587 emacs_cv_x11_toolkit_version_6=yes
6588 else
6589 echo "$as_me: failed program was:" >&5
6590 cat conftest.$ac_ext >&5
6591 emacs_cv_x11_toolkit_version_6=no
6592 fi
6593 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6594 fi
6595
6596 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
6597 if test $emacs_cv_x11_toolkit_version_6 = yes; then
6598 echo "$as_me:6598: result: 6 or newer" >&5
6599 echo "${ECHO_T}6 or newer" >&6
6600 cat >>confdefs.h <<\EOF
6601 #define HAVE_X11XTR6 1
6602 EOF
6603
6604 else
6605 echo "$as_me:6605: result: before 6" >&5
6606 echo "${ECHO_T}before 6" >&6
6607 fi
6608
6609 OLDLIBS="$LIBS"
6610 if test x$HAVE_X11XTR6 = xyes; then
6611 LIBS="-lXt -lSM -lICE $LIBS"
6612 else
6613 LIBS="-lXt $LIBS"
6614 fi
6615
6616 echo "$as_me:6616: checking for XmuConvertStandardSelection in -lXmu" >&5
6617 echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6
6618 if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
6619 echo $ECHO_N "(cached) $ECHO_C" >&6
6620 else
6621 ac_check_lib_save_LIBS=$LIBS
6622 LIBS="-lXmu $LIBS"
6623 cat >conftest.$ac_ext <<_ACEOF
6624 #line 6624 "configure"
6625 #include "confdefs.h"
6626
6627 /* Override any gcc2 internal prototype to avoid an error. */
6628 #ifdef __cplusplus
6629 extern "C"
6630 #endif
6631 /* We use char because int might match the return type of a gcc2
6632 builtin and then its argument prototype would still apply. */
6633 char XmuConvertStandardSelection ();
6634 int
6635 main ()
6636 {
6637 XmuConvertStandardSelection ();
6638 ;
6639 return 0;
6640 }
6641 _ACEOF
6642 rm -f conftest.$ac_objext conftest$ac_exeext
6643 if { (eval echo "$as_me:6643: \"$ac_link\"") >&5
6644 (eval $ac_link) 2>&5
6645 ac_status=$?
6646 echo "$as_me:6646: \$? = $ac_status" >&5
6647 (exit $ac_status); } &&
6648 { ac_try='test -s conftest$ac_exeext'
6649 { (eval echo "$as_me:6649: \"$ac_try\"") >&5
6650 (eval $ac_try) 2>&5
6651 ac_status=$?
6652 echo "$as_me:6652: \$? = $ac_status" >&5
6653 (exit $ac_status); }; }; then
6654 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
6655 else
6656 echo "$as_me: failed program was:" >&5
6657 cat conftest.$ac_ext >&5
6658 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
6659 fi
6660 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6661 LIBS=$ac_check_lib_save_LIBS
6662 fi
6663 echo "$as_me:6663: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
6664 echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6
6665 if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
6666 cat >>confdefs.h <<EOF
6667 #define HAVE_LIBXMU 1
6668 EOF
6669
6670 LIBS="-lXmu $LIBS"
6671
6672 fi
6673
6674 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
6675 fi
6676
6677 # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
6678 if test "${HAVE_X11}" = "yes"; then
6679 if test "${USE_X_TOOLKIT}" != "none"; then
6680
6681 echo "$as_me:6681: checking for XShapeQueryExtension in -lXext" >&5
6682 echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6
6683 if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
6684 echo $ECHO_N "(cached) $ECHO_C" >&6
6685 else
6686 ac_check_lib_save_LIBS=$LIBS
6687 LIBS="-lXext $LIBS"
6688 cat >conftest.$ac_ext <<_ACEOF
6689 #line 6689 "configure"
6690 #include "confdefs.h"
6691
6692 /* Override any gcc2 internal prototype to avoid an error. */
6693 #ifdef __cplusplus
6694 extern "C"
6695 #endif
6696 /* We use char because int might match the return type of a gcc2
6697 builtin and then its argument prototype would still apply. */
6698 char XShapeQueryExtension ();
6699 int
6700 main ()
6701 {
6702 XShapeQueryExtension ();
6703 ;
6704 return 0;
6705 }
6706 _ACEOF
6707 rm -f conftest.$ac_objext conftest$ac_exeext
6708 if { (eval echo "$as_me:6708: \"$ac_link\"") >&5
6709 (eval $ac_link) 2>&5
6710 ac_status=$?
6711 echo "$as_me:6711: \$? = $ac_status" >&5
6712 (exit $ac_status); } &&
6713 { ac_try='test -s conftest$ac_exeext'
6714 { (eval echo "$as_me:6714: \"$ac_try\"") >&5
6715 (eval $ac_try) 2>&5
6716 ac_status=$?
6717 echo "$as_me:6717: \$? = $ac_status" >&5
6718 (exit $ac_status); }; }; then
6719 ac_cv_lib_Xext_XShapeQueryExtension=yes
6720 else
6721 echo "$as_me: failed program was:" >&5
6722 cat conftest.$ac_ext >&5
6723 ac_cv_lib_Xext_XShapeQueryExtension=no
6724 fi
6725 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6726 LIBS=$ac_check_lib_save_LIBS
6727 fi
6728 echo "$as_me:6728: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
6729 echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6
6730 if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
6731 cat >>confdefs.h <<EOF
6732 #define HAVE_LIBXEXT 1
6733 EOF
6734
6735 LIBS="-lXext $LIBS"
6736
6737 fi
6738
6739 fi
6740 fi
6741
6742 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
6743 echo "$as_me:6743: checking for Motif version 2.1" >&5
6744 echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6
6745 if test "${emacs_cv_motif_version_2_1+set}" = set; then
6746 echo $ECHO_N "(cached) $ECHO_C" >&6
6747 else
6748 cat >conftest.$ac_ext <<_ACEOF
6749 #line 6749 "configure"
6750 #include "confdefs.h"
6751 #include <Xm/Xm.h>
6752 int
6753 main ()
6754 {
6755 #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
6756 int x = 5;
6757 #else
6758 Motif version prior to 2.1.
6759 #endif
6760 ;
6761 return 0;
6762 }
6763 _ACEOF
6764 rm -f conftest.$ac_objext
6765 if { (eval echo "$as_me:6765: \"$ac_compile\"") >&5
6766 (eval $ac_compile) 2>&5
6767 ac_status=$?
6768 echo "$as_me:6768: \$? = $ac_status" >&5
6769 (exit $ac_status); } &&
6770 { ac_try='test -s conftest.$ac_objext'
6771 { (eval echo "$as_me:6771: \"$ac_try\"") >&5
6772 (eval $ac_try) 2>&5
6773 ac_status=$?
6774 echo "$as_me:6774: \$? = $ac_status" >&5
6775 (exit $ac_status); }; }; then
6776 emacs_cv_motif_version_2_1=yes
6777 else
6778 echo "$as_me: failed program was:" >&5
6779 cat conftest.$ac_ext >&5
6780 emacs_cv_motif_version_2_1=no
6781 fi
6782 rm -f conftest.$ac_objext conftest.$ac_ext
6783 fi
6784 echo "$as_me:6784: result: $emacs_cv_motif_version_2_1" >&5
6785 echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6
6786 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
6787 if test $emacs_cv_motif_version_2_1 = yes; then
6788 HAVE_LIBXP=no
6789 cat >>confdefs.h <<\EOF
6790 #define HAVE_MOTIF_2_1 1
6791 EOF
6792
6793 echo "$as_me:6793: checking for XpCreateContext in -lXp" >&5
6794 echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6
6795 if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
6796 echo $ECHO_N "(cached) $ECHO_C" >&6
6797 else
6798 ac_check_lib_save_LIBS=$LIBS
6799 LIBS="-lXp $LIBS"
6800 cat >conftest.$ac_ext <<_ACEOF
6801 #line 6801 "configure"
6802 #include "confdefs.h"
6803
6804 /* Override any gcc2 internal prototype to avoid an error. */
6805 #ifdef __cplusplus
6806 extern "C"
6807 #endif
6808 /* We use char because int might match the return type of a gcc2
6809 builtin and then its argument prototype would still apply. */
6810 char XpCreateContext ();
6811 int
6812 main ()
6813 {
6814 XpCreateContext ();
6815 ;
6816 return 0;
6817 }
6818 _ACEOF
6819 rm -f conftest.$ac_objext conftest$ac_exeext
6820 if { (eval echo "$as_me:6820: \"$ac_link\"") >&5
6821 (eval $ac_link) 2>&5
6822 ac_status=$?
6823 echo "$as_me:6823: \$? = $ac_status" >&5
6824 (exit $ac_status); } &&
6825 { ac_try='test -s conftest$ac_exeext'
6826 { (eval echo "$as_me:6826: \"$ac_try\"") >&5
6827 (eval $ac_try) 2>&5
6828 ac_status=$?
6829 echo "$as_me:6829: \$? = $ac_status" >&5
6830 (exit $ac_status); }; }; then
6831 ac_cv_lib_Xp_XpCreateContext=yes
6832 else
6833 echo "$as_me: failed program was:" >&5
6834 cat conftest.$ac_ext >&5
6835 ac_cv_lib_Xp_XpCreateContext=no
6836 fi
6837 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6838 LIBS=$ac_check_lib_save_LIBS
6839 fi
6840 echo "$as_me:6840: result: $ac_cv_lib_Xp_XpCreateContext" >&5
6841 echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6
6842 if test $ac_cv_lib_Xp_XpCreateContext = yes; then
6843 HAVE_LIBXP=yes
6844 fi
6845
6846 if test ${HAVE_LIBXP} = yes; then
6847 cat >>confdefs.h <<\EOF
6848 #define HAVE_LIBXP 1
6849 EOF
6850
6851 fi
6852 fi
6853 fi
6854
6855 ### Is -lXaw3d available?
6856 HAVE_XAW3D=no
6857 if test "${HAVE_X11}" = "yes"; then
6858 if test "${USE_X_TOOLKIT}" != "none"; then
6859 echo "$as_me:6859: checking for X11/Xaw3d/Scrollbar.h" >&5
6860 echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6
6861 if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
6862 echo $ECHO_N "(cached) $ECHO_C" >&6
6863 else
6864 cat >conftest.$ac_ext <<_ACEOF
6865 #line 6865 "configure"
6866 #include "confdefs.h"
6867 #include <X11/Xaw3d/Scrollbar.h>
6868 _ACEOF
6869 if { (eval echo "$as_me:6869: \"$ac_cpp conftest.$ac_ext\"") >&5
6870 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6871 ac_status=$?
6872 egrep -v '^ *\+' conftest.er1 >conftest.err
6873 rm -f conftest.er1
6874 cat conftest.err >&5
6875 echo "$as_me:6875: \$? = $ac_status" >&5
6876 (exit $ac_status); } >/dev/null; then
6877 if test -s conftest.err; then
6878 ac_cpp_err=$ac_c_preproc_warn_flag
6879 else
6880 ac_cpp_err=
6881 fi
6882 else
6883 ac_cpp_err=yes
6884 fi
6885 if test -z "$ac_cpp_err"; then
6886 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
6887 else
6888 echo "$as_me: failed program was:" >&5
6889 cat conftest.$ac_ext >&5
6890 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
6891 fi
6892 rm -f conftest.err conftest.$ac_ext
6893 fi
6894 echo "$as_me:6894: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
6895 echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6
6896 if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
6897 echo "$as_me:6897: checking for XawScrollbarSetThumb in -lXaw3d" >&5
6898 echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6
6899 if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
6900 echo $ECHO_N "(cached) $ECHO_C" >&6
6901 else
6902 ac_check_lib_save_LIBS=$LIBS
6903 LIBS="-lXaw3d $LIBS"
6904 cat >conftest.$ac_ext <<_ACEOF
6905 #line 6905 "configure"
6906 #include "confdefs.h"
6907
6908 /* Override any gcc2 internal prototype to avoid an error. */
6909 #ifdef __cplusplus
6910 extern "C"
6911 #endif
6912 /* We use char because int might match the return type of a gcc2
6913 builtin and then its argument prototype would still apply. */
6914 char XawScrollbarSetThumb ();
6915 int
6916 main ()
6917 {
6918 XawScrollbarSetThumb ();
6919 ;
6920 return 0;
6921 }
6922 _ACEOF
6923 rm -f conftest.$ac_objext conftest$ac_exeext
6924 if { (eval echo "$as_me:6924: \"$ac_link\"") >&5
6925 (eval $ac_link) 2>&5
6926 ac_status=$?
6927 echo "$as_me:6927: \$? = $ac_status" >&5
6928 (exit $ac_status); } &&
6929 { ac_try='test -s conftest$ac_exeext'
6930 { (eval echo "$as_me:6930: \"$ac_try\"") >&5
6931 (eval $ac_try) 2>&5
6932 ac_status=$?
6933 echo "$as_me:6933: \$? = $ac_status" >&5
6934 (exit $ac_status); }; }; then
6935 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
6936 else
6937 echo "$as_me: failed program was:" >&5
6938 cat conftest.$ac_ext >&5
6939 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
6940 fi
6941 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6942 LIBS=$ac_check_lib_save_LIBS
6943 fi
6944 echo "$as_me:6944: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
6945 echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6
6946 if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
6947 HAVE_XAW3D=yes
6948 fi
6949
6950 fi
6951
6952 if test "${HAVE_XAW3D}" = "yes"; then
6953 cat >>confdefs.h <<\EOF
6954 #define HAVE_XAW3D 1
6955 EOF
6956
6957 fi
6958 fi
6959 fi
6960
6961 USE_TOOLKIT_SCROLL_BARS=no
6962 if test "${with_toolkit_scroll_bars}" != "no"; then
6963 if test "${USE_X_TOOLKIT}" != "none"; then
6964 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
6965 cat >>confdefs.h <<\EOF
6966 #define USE_TOOLKIT_SCROLL_BARS 1
6967 EOF
6968
6969 HAVE_XAW3D=no
6970 USE_TOOLKIT_SCROLL_BARS=yes
6971 elif test "${HAVE_XAW3D}" = "yes"; then
6972 cat >>confdefs.h <<\EOF
6973 #define USE_TOOLKIT_SCROLL_BARS 1
6974 EOF
6975
6976 USE_TOOLKIT_SCROLL_BARS=yes
6977 fi
6978 fi
6979 fi
6980
6981 if test "${with_xim}" != "no"; then
6982 cat >>confdefs.h <<\EOF
6983 #define USE_XIM 1
6984 EOF
6985
6986 fi
6987
6988 ### Use -lXpm if available, unless `--with-xpm=no'.
6989 HAVE_XPM=no
6990 if test "${HAVE_X11}" = "yes"; then
6991 if test "${with_xpm}" != "no"; then
6992 echo "$as_me:6992: checking for X11/xpm.h" >&5
6993 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
6994 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
6995 echo $ECHO_N "(cached) $ECHO_C" >&6
6996 else
6997 cat >conftest.$ac_ext <<_ACEOF
6998 #line 6998 "configure"
6999 #include "confdefs.h"
7000 #include <X11/xpm.h>
7001 _ACEOF
7002 if { (eval echo "$as_me:7002: \"$ac_cpp conftest.$ac_ext\"") >&5
7003 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7004 ac_status=$?
7005 egrep -v '^ *\+' conftest.er1 >conftest.err
7006 rm -f conftest.er1
7007 cat conftest.err >&5
7008 echo "$as_me:7008: \$? = $ac_status" >&5
7009 (exit $ac_status); } >/dev/null; then
7010 if test -s conftest.err; then
7011 ac_cpp_err=$ac_c_preproc_warn_flag
7012 else
7013 ac_cpp_err=
7014 fi
7015 else
7016 ac_cpp_err=yes
7017 fi
7018 if test -z "$ac_cpp_err"; then
7019 ac_cv_header_X11_xpm_h=yes
7020 else
7021 echo "$as_me: failed program was:" >&5
7022 cat conftest.$ac_ext >&5
7023 ac_cv_header_X11_xpm_h=no
7024 fi
7025 rm -f conftest.err conftest.$ac_ext
7026 fi
7027 echo "$as_me:7027: result: $ac_cv_header_X11_xpm_h" >&5
7028 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
7029 if test $ac_cv_header_X11_xpm_h = yes; then
7030 echo "$as_me:7030: checking for XpmReadFileToPixmap in -lXpm" >&5
7031 echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6
7032 if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
7033 echo $ECHO_N "(cached) $ECHO_C" >&6
7034 else
7035 ac_check_lib_save_LIBS=$LIBS
7036 LIBS="-lXpm -lX11 $LIBS"
7037 cat >conftest.$ac_ext <<_ACEOF
7038 #line 7038 "configure"
7039 #include "confdefs.h"
7040
7041 /* Override any gcc2 internal prototype to avoid an error. */
7042 #ifdef __cplusplus
7043 extern "C"
7044 #endif
7045 /* We use char because int might match the return type of a gcc2
7046 builtin and then its argument prototype would still apply. */
7047 char XpmReadFileToPixmap ();
7048 int
7049 main ()
7050 {
7051 XpmReadFileToPixmap ();
7052 ;
7053 return 0;
7054 }
7055 _ACEOF
7056 rm -f conftest.$ac_objext conftest$ac_exeext
7057 if { (eval echo "$as_me:7057: \"$ac_link\"") >&5
7058 (eval $ac_link) 2>&5
7059 ac_status=$?
7060 echo "$as_me:7060: \$? = $ac_status" >&5
7061 (exit $ac_status); } &&
7062 { ac_try='test -s conftest$ac_exeext'
7063 { (eval echo "$as_me:7063: \"$ac_try\"") >&5
7064 (eval $ac_try) 2>&5
7065 ac_status=$?
7066 echo "$as_me:7066: \$? = $ac_status" >&5
7067 (exit $ac_status); }; }; then
7068 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
7069 else
7070 echo "$as_me: failed program was:" >&5
7071 cat conftest.$ac_ext >&5
7072 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
7073 fi
7074 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7075 LIBS=$ac_check_lib_save_LIBS
7076 fi
7077 echo "$as_me:7077: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
7078 echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6
7079 if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
7080 HAVE_XPM=yes
7081 fi
7082
7083 fi
7084
7085 if test "${HAVE_XPM}" = "yes"; then
7086 echo "$as_me:7086: checking for XpmReturnAllocPixels preprocessor define" >&5
7087 echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6
7088 cat >conftest.$ac_ext <<_ACEOF
7089 #line 7089 "configure"
7090 #include "confdefs.h"
7091 #include "X11/xpm.h"
7092 #ifndef XpmReturnAllocPixels
7093 no_return_alloc_pixels
7094 #endif
7095
7096 _ACEOF
7097 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7098 egrep "no_return_alloc_pixels" >/dev/null 2>&1; then
7099 HAVE_XPM=no
7100 else
7101 HAVE_XPM=yes
7102 fi
7103 rm -f conftest*
7104
7105 if test "${HAVE_XPM}" = "yes"; then
7106 echo "$as_me:7106: result: yes" >&5
7107 echo "${ECHO_T}yes" >&6
7108 else
7109 echo "$as_me:7109: result: no" >&5
7110 echo "${ECHO_T}no" >&6
7111 fi
7112 fi
7113 fi
7114
7115 if test "${HAVE_XPM}" = "yes"; then
7116 cat >>confdefs.h <<\EOF
7117 #define HAVE_XPM 1
7118 EOF
7119
7120 fi
7121 fi
7122
7123 ### Use -ljpeg if available, unless `--with-jpeg=no'.
7124 HAVE_JPEG=no
7125 if test "${HAVE_X11}" = "yes"; then
7126 if test "${with_jpeg}" != "no"; then
7127 echo "$as_me:7127: checking for jerror.h" >&5
7128 echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
7129 if test "${ac_cv_header_jerror_h+set}" = set; then
7130 echo $ECHO_N "(cached) $ECHO_C" >&6
7131 else
7132 cat >conftest.$ac_ext <<_ACEOF
7133 #line 7133 "configure"
7134 #include "confdefs.h"
7135 #include <jerror.h>
7136 _ACEOF
7137 if { (eval echo "$as_me:7137: \"$ac_cpp conftest.$ac_ext\"") >&5
7138 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7139 ac_status=$?
7140 egrep -v '^ *\+' conftest.er1 >conftest.err
7141 rm -f conftest.er1
7142 cat conftest.err >&5
7143 echo "$as_me:7143: \$? = $ac_status" >&5
7144 (exit $ac_status); } >/dev/null; then
7145 if test -s conftest.err; then
7146 ac_cpp_err=$ac_c_preproc_warn_flag
7147 else
7148 ac_cpp_err=
7149 fi
7150 else
7151 ac_cpp_err=yes
7152 fi
7153 if test -z "$ac_cpp_err"; then
7154 ac_cv_header_jerror_h=yes
7155 else
7156 echo "$as_me: failed program was:" >&5
7157 cat conftest.$ac_ext >&5
7158 ac_cv_header_jerror_h=no
7159 fi
7160 rm -f conftest.err conftest.$ac_ext
7161 fi
7162 echo "$as_me:7162: result: $ac_cv_header_jerror_h" >&5
7163 echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
7164 if test $ac_cv_header_jerror_h = yes; then
7165 echo "$as_me:7165: checking for jpeg_destroy_compress in -ljpeg" >&5
7166 echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6
7167 if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
7168 echo $ECHO_N "(cached) $ECHO_C" >&6
7169 else
7170 ac_check_lib_save_LIBS=$LIBS
7171 LIBS="-ljpeg $LIBS"
7172 cat >conftest.$ac_ext <<_ACEOF
7173 #line 7173 "configure"
7174 #include "confdefs.h"
7175
7176 /* Override any gcc2 internal prototype to avoid an error. */
7177 #ifdef __cplusplus
7178 extern "C"
7179 #endif
7180 /* We use char because int might match the return type of a gcc2
7181 builtin and then its argument prototype would still apply. */
7182 char jpeg_destroy_compress ();
7183 int
7184 main ()
7185 {
7186 jpeg_destroy_compress ();
7187 ;
7188 return 0;
7189 }
7190 _ACEOF
7191 rm -f conftest.$ac_objext conftest$ac_exeext
7192 if { (eval echo "$as_me:7192: \"$ac_link\"") >&5
7193 (eval $ac_link) 2>&5
7194 ac_status=$?
7195 echo "$as_me:7195: \$? = $ac_status" >&5
7196 (exit $ac_status); } &&
7197 { ac_try='test -s conftest$ac_exeext'
7198 { (eval echo "$as_me:7198: \"$ac_try\"") >&5
7199 (eval $ac_try) 2>&5
7200 ac_status=$?
7201 echo "$as_me:7201: \$? = $ac_status" >&5
7202 (exit $ac_status); }; }; then
7203 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
7204 else
7205 echo "$as_me: failed program was:" >&5
7206 cat conftest.$ac_ext >&5
7207 ac_cv_lib_jpeg_jpeg_destroy_compress=no
7208 fi
7209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7210 LIBS=$ac_check_lib_save_LIBS
7211 fi
7212 echo "$as_me:7212: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
7213 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6
7214 if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
7215 HAVE_JPEG=yes
7216 fi
7217
7218 fi
7219
7220 fi
7221
7222 if test "${HAVE_JPEG}" = "yes"; then
7223 cat >>confdefs.h <<\EOF
7224 #define HAVE_JPEG 1
7225 EOF
7226
7227 cat >conftest.$ac_ext <<_ACEOF
7228 #line 7228 "configure"
7229 #include "confdefs.h"
7230 #include <jpeglib.h>
7231 version=JPEG_LIB_VERSION
7232
7233 _ACEOF
7234 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7235 egrep "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
7236 cat >>confdefs.h <<\EOF
7237 #define HAVE_JPEG 1
7238 EOF
7239
7240 else
7241 { echo "$as_me:7241: WARNING: libjpeg found, but not version 6b or later" >&5
7242 echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
7243 HAVE_JPEG=no
7244 fi
7245 rm -f conftest*
7246
7247 fi
7248 fi
7249
7250 ### Use -lpng if available, unless `--with-png=no'.
7251 HAVE_PNG=no
7252 if test "${HAVE_X11}" = "yes"; then
7253 if test "${with_png}" != "no"; then
7254 echo "$as_me:7254: checking for png.h" >&5
7255 echo $ECHO_N "checking for png.h... $ECHO_C" >&6
7256 if test "${ac_cv_header_png_h+set}" = set; then
7257 echo $ECHO_N "(cached) $ECHO_C" >&6
7258 else
7259 cat >conftest.$ac_ext <<_ACEOF
7260 #line 7260 "configure"
7261 #include "confdefs.h"
7262 #include <png.h>
7263 _ACEOF
7264 if { (eval echo "$as_me:7264: \"$ac_cpp conftest.$ac_ext\"") >&5
7265 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7266 ac_status=$?
7267 egrep -v '^ *\+' conftest.er1 >conftest.err
7268 rm -f conftest.er1
7269 cat conftest.err >&5
7270 echo "$as_me:7270: \$? = $ac_status" >&5
7271 (exit $ac_status); } >/dev/null; then
7272 if test -s conftest.err; then
7273 ac_cpp_err=$ac_c_preproc_warn_flag
7274 else
7275 ac_cpp_err=
7276 fi
7277 else
7278 ac_cpp_err=yes
7279 fi
7280 if test -z "$ac_cpp_err"; then
7281 ac_cv_header_png_h=yes
7282 else
7283 echo "$as_me: failed program was:" >&5
7284 cat conftest.$ac_ext >&5
7285 ac_cv_header_png_h=no
7286 fi
7287 rm -f conftest.err conftest.$ac_ext
7288 fi
7289 echo "$as_me:7289: result: $ac_cv_header_png_h" >&5
7290 echo "${ECHO_T}$ac_cv_header_png_h" >&6
7291 if test $ac_cv_header_png_h = yes; then
7292 echo "$as_me:7292: checking for png_get_channels in -lpng" >&5
7293 echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6
7294 if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
7295 echo $ECHO_N "(cached) $ECHO_C" >&6
7296 else
7297 ac_check_lib_save_LIBS=$LIBS
7298 LIBS="-lpng -lz -lm $LIBS"
7299 cat >conftest.$ac_ext <<_ACEOF
7300 #line 7300 "configure"
7301 #include "confdefs.h"
7302
7303 /* Override any gcc2 internal prototype to avoid an error. */
7304 #ifdef __cplusplus
7305 extern "C"
7306 #endif
7307 /* We use char because int might match the return type of a gcc2
7308 builtin and then its argument prototype would still apply. */
7309 char png_get_channels ();
7310 int
7311 main ()
7312 {
7313 png_get_channels ();
7314 ;
7315 return 0;
7316 }
7317 _ACEOF
7318 rm -f conftest.$ac_objext conftest$ac_exeext
7319 if { (eval echo "$as_me:7319: \"$ac_link\"") >&5
7320 (eval $ac_link) 2>&5
7321 ac_status=$?
7322 echo "$as_me:7322: \$? = $ac_status" >&5
7323 (exit $ac_status); } &&
7324 { ac_try='test -s conftest$ac_exeext'
7325 { (eval echo "$as_me:7325: \"$ac_try\"") >&5
7326 (eval $ac_try) 2>&5
7327 ac_status=$?
7328 echo "$as_me:7328: \$? = $ac_status" >&5
7329 (exit $ac_status); }; }; then
7330 ac_cv_lib_png_png_get_channels=yes
7331 else
7332 echo "$as_me: failed program was:" >&5
7333 cat conftest.$ac_ext >&5
7334 ac_cv_lib_png_png_get_channels=no
7335 fi
7336 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7337 LIBS=$ac_check_lib_save_LIBS
7338 fi
7339 echo "$as_me:7339: result: $ac_cv_lib_png_png_get_channels" >&5
7340 echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6
7341 if test $ac_cv_lib_png_png_get_channels = yes; then
7342 HAVE_PNG=yes
7343 fi
7344
7345 fi
7346
7347 fi
7348
7349 if test "${HAVE_PNG}" = "yes"; then
7350 cat >>confdefs.h <<\EOF
7351 #define HAVE_PNG 1
7352 EOF
7353
7354 fi
7355 fi
7356
7357 ### Use -ltiff if available, unless `--with-tiff=no'.
7358 HAVE_TIFF=no
7359 if test "${HAVE_X11}" = "yes"; then
7360 if test "${with_tiff}" != "no"; then
7361 echo "$as_me:7361: checking for tiffio.h" >&5
7362 echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
7363 if test "${ac_cv_header_tiffio_h+set}" = set; then
7364 echo $ECHO_N "(cached) $ECHO_C" >&6
7365 else
7366 cat >conftest.$ac_ext <<_ACEOF
7367 #line 7367 "configure"
7368 #include "confdefs.h"
7369 #include <tiffio.h>
7370 _ACEOF
7371 if { (eval echo "$as_me:7371: \"$ac_cpp conftest.$ac_ext\"") >&5
7372 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7373 ac_status=$?
7374 egrep -v '^ *\+' conftest.er1 >conftest.err
7375 rm -f conftest.er1
7376 cat conftest.err >&5
7377 echo "$as_me:7377: \$? = $ac_status" >&5
7378 (exit $ac_status); } >/dev/null; then
7379 if test -s conftest.err; then
7380 ac_cpp_err=$ac_c_preproc_warn_flag
7381 else
7382 ac_cpp_err=
7383 fi
7384 else
7385 ac_cpp_err=yes
7386 fi
7387 if test -z "$ac_cpp_err"; then
7388 ac_cv_header_tiffio_h=yes
7389 else
7390 echo "$as_me: failed program was:" >&5
7391 cat conftest.$ac_ext >&5
7392 ac_cv_header_tiffio_h=no
7393 fi
7394 rm -f conftest.err conftest.$ac_ext
7395 fi
7396 echo "$as_me:7396: result: $ac_cv_header_tiffio_h" >&5
7397 echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
7398 if test $ac_cv_header_tiffio_h = yes; then
7399 tifflibs="-lz -lm"
7400 # At least one tiff package requires the jpeg library.
7401 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
7402 echo "$as_me:7402: checking for TIFFGetVersion in -ltiff" >&5
7403 echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6
7404 if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
7405 echo $ECHO_N "(cached) $ECHO_C" >&6
7406 else
7407 ac_check_lib_save_LIBS=$LIBS
7408 LIBS="-ltiff $tifflibs $LIBS"
7409 cat >conftest.$ac_ext <<_ACEOF
7410 #line 7410 "configure"
7411 #include "confdefs.h"
7412
7413 /* Override any gcc2 internal prototype to avoid an error. */
7414 #ifdef __cplusplus
7415 extern "C"
7416 #endif
7417 /* We use char because int might match the return type of a gcc2
7418 builtin and then its argument prototype would still apply. */
7419 char TIFFGetVersion ();
7420 int
7421 main ()
7422 {
7423 TIFFGetVersion ();
7424 ;
7425 return 0;
7426 }
7427 _ACEOF
7428 rm -f conftest.$ac_objext conftest$ac_exeext
7429 if { (eval echo "$as_me:7429: \"$ac_link\"") >&5
7430 (eval $ac_link) 2>&5
7431 ac_status=$?
7432 echo "$as_me:7432: \$? = $ac_status" >&5
7433 (exit $ac_status); } &&
7434 { ac_try='test -s conftest$ac_exeext'
7435 { (eval echo "$as_me:7435: \"$ac_try\"") >&5
7436 (eval $ac_try) 2>&5
7437 ac_status=$?
7438 echo "$as_me:7438: \$? = $ac_status" >&5
7439 (exit $ac_status); }; }; then
7440 ac_cv_lib_tiff_TIFFGetVersion=yes
7441 else
7442 echo "$as_me: failed program was:" >&5
7443 cat conftest.$ac_ext >&5
7444 ac_cv_lib_tiff_TIFFGetVersion=no
7445 fi
7446 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7447 LIBS=$ac_check_lib_save_LIBS
7448 fi
7449 echo "$as_me:7449: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
7450 echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6
7451 if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
7452 HAVE_TIFF=yes
7453 fi
7454
7455 fi
7456
7457 fi
7458
7459 if test "${HAVE_TIFF}" = "yes"; then
7460 cat >>confdefs.h <<\EOF
7461 #define HAVE_TIFF 1
7462 EOF
7463
7464 fi
7465 fi
7466
7467 ### Use -lgif if available, unless `--with-gif=no'.
7468 HAVE_GIF=no
7469 if test "${HAVE_X11}" = "yes"; then
7470 if test "${with_gif}" != "no"; then
7471 echo "$as_me:7471: checking for gif_lib.h" >&5
7472 echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
7473 if test "${ac_cv_header_gif_lib_h+set}" = set; then
7474 echo $ECHO_N "(cached) $ECHO_C" >&6
7475 else
7476 cat >conftest.$ac_ext <<_ACEOF
7477 #line 7477 "configure"
7478 #include "confdefs.h"
7479 #include <gif_lib.h>
7480 _ACEOF
7481 if { (eval echo "$as_me:7481: \"$ac_cpp conftest.$ac_ext\"") >&5
7482 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7483 ac_status=$?
7484 egrep -v '^ *\+' conftest.er1 >conftest.err
7485 rm -f conftest.er1
7486 cat conftest.err >&5
7487 echo "$as_me:7487: \$? = $ac_status" >&5
7488 (exit $ac_status); } >/dev/null; then
7489 if test -s conftest.err; then
7490 ac_cpp_err=$ac_c_preproc_warn_flag
7491 else
7492 ac_cpp_err=
7493 fi
7494 else
7495 ac_cpp_err=yes
7496 fi
7497 if test -z "$ac_cpp_err"; then
7498 ac_cv_header_gif_lib_h=yes
7499 else
7500 echo "$as_me: failed program was:" >&5
7501 cat conftest.$ac_ext >&5
7502 ac_cv_header_gif_lib_h=no
7503 fi
7504 rm -f conftest.err conftest.$ac_ext
7505 fi
7506 echo "$as_me:7506: result: $ac_cv_header_gif_lib_h" >&5
7507 echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
7508 if test $ac_cv_header_gif_lib_h = yes; then
7509 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
7510 # Earlier versions can crash Emacs.
7511 echo "$as_me:7511: checking for EGifPutExtensionLast in -lungif" >&5
7512 echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6
7513 if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
7514 echo $ECHO_N "(cached) $ECHO_C" >&6
7515 else
7516 ac_check_lib_save_LIBS=$LIBS
7517 LIBS="-lungif $LIBS"
7518 cat >conftest.$ac_ext <<_ACEOF
7519 #line 7519 "configure"
7520 #include "confdefs.h"
7521
7522 /* Override any gcc2 internal prototype to avoid an error. */
7523 #ifdef __cplusplus
7524 extern "C"
7525 #endif
7526 /* We use char because int might match the return type of a gcc2
7527 builtin and then its argument prototype would still apply. */
7528 char EGifPutExtensionLast ();
7529 int
7530 main ()
7531 {
7532 EGifPutExtensionLast ();
7533 ;
7534 return 0;
7535 }
7536 _ACEOF
7537 rm -f conftest.$ac_objext conftest$ac_exeext
7538 if { (eval echo "$as_me:7538: \"$ac_link\"") >&5
7539 (eval $ac_link) 2>&5
7540 ac_status=$?
7541 echo "$as_me:7541: \$? = $ac_status" >&5
7542 (exit $ac_status); } &&
7543 { ac_try='test -s conftest$ac_exeext'
7544 { (eval echo "$as_me:7544: \"$ac_try\"") >&5
7545 (eval $ac_try) 2>&5
7546 ac_status=$?
7547 echo "$as_me:7547: \$? = $ac_status" >&5
7548 (exit $ac_status); }; }; then
7549 ac_cv_lib_ungif_EGifPutExtensionLast=yes
7550 else
7551 echo "$as_me: failed program was:" >&5
7552 cat conftest.$ac_ext >&5
7553 ac_cv_lib_ungif_EGifPutExtensionLast=no
7554 fi
7555 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7556 LIBS=$ac_check_lib_save_LIBS
7557 fi
7558 echo "$as_me:7558: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
7559 echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6
7560 if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
7561 HAVE_GIF=yes
7562 fi
7563
7564 fi
7565
7566 fi
7567
7568 if test "${HAVE_GIF}" = "yes"; then
7569 cat >>confdefs.h <<\EOF
7570 #define HAVE_GIF 1
7571 EOF
7572
7573 fi
7574 fi
7575
7576 ### Use session management (-lSM -lICE) if available
7577 HAVE_X_SM=no
7578 if test "${HAVE_X11}" = "yes"; then
7579 echo "$as_me:7579: checking for X11/SM/SMlib.h" >&5
7580 echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
7581 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
7582 echo $ECHO_N "(cached) $ECHO_C" >&6
7583 else
7584 cat >conftest.$ac_ext <<_ACEOF
7585 #line 7585 "configure"
7586 #include "confdefs.h"
7587 #include <X11/SM/SMlib.h>
7588 _ACEOF
7589 if { (eval echo "$as_me:7589: \"$ac_cpp conftest.$ac_ext\"") >&5
7590 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7591 ac_status=$?
7592 egrep -v '^ *\+' conftest.er1 >conftest.err
7593 rm -f conftest.er1
7594 cat conftest.err >&5
7595 echo "$as_me:7595: \$? = $ac_status" >&5
7596 (exit $ac_status); } >/dev/null; then
7597 if test -s conftest.err; then
7598 ac_cpp_err=$ac_c_preproc_warn_flag
7599 else
7600 ac_cpp_err=
7601 fi
7602 else
7603 ac_cpp_err=yes
7604 fi
7605 if test -z "$ac_cpp_err"; then
7606 ac_cv_header_X11_SM_SMlib_h=yes
7607 else
7608 echo "$as_me: failed program was:" >&5
7609 cat conftest.$ac_ext >&5
7610 ac_cv_header_X11_SM_SMlib_h=no
7611 fi
7612 rm -f conftest.err conftest.$ac_ext
7613 fi
7614 echo "$as_me:7614: result: $ac_cv_header_X11_SM_SMlib_h" >&5
7615 echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
7616 if test $ac_cv_header_X11_SM_SMlib_h = yes; then
7617 echo "$as_me:7617: checking for SmcOpenConnection in -lSM" >&5
7618 echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6
7619 if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
7620 echo $ECHO_N "(cached) $ECHO_C" >&6
7621 else
7622 ac_check_lib_save_LIBS=$LIBS
7623 LIBS="-lSM $LIBS"
7624 cat >conftest.$ac_ext <<_ACEOF
7625 #line 7625 "configure"
7626 #include "confdefs.h"
7627
7628 /* Override any gcc2 internal prototype to avoid an error. */
7629 #ifdef __cplusplus
7630 extern "C"
7631 #endif
7632 /* We use char because int might match the return type of a gcc2
7633 builtin and then its argument prototype would still apply. */
7634 char SmcOpenConnection ();
7635 int
7636 main ()
7637 {
7638 SmcOpenConnection ();
7639 ;
7640 return 0;
7641 }
7642 _ACEOF
7643 rm -f conftest.$ac_objext conftest$ac_exeext
7644 if { (eval echo "$as_me:7644: \"$ac_link\"") >&5
7645 (eval $ac_link) 2>&5
7646 ac_status=$?
7647 echo "$as_me:7647: \$? = $ac_status" >&5
7648 (exit $ac_status); } &&
7649 { ac_try='test -s conftest$ac_exeext'
7650 { (eval echo "$as_me:7650: \"$ac_try\"") >&5
7651 (eval $ac_try) 2>&5
7652 ac_status=$?
7653 echo "$as_me:7653: \$? = $ac_status" >&5
7654 (exit $ac_status); }; }; then
7655 ac_cv_lib_SM_SmcOpenConnection=yes
7656 else
7657 echo "$as_me: failed program was:" >&5
7658 cat conftest.$ac_ext >&5
7659 ac_cv_lib_SM_SmcOpenConnection=no
7660 fi
7661 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7662 LIBS=$ac_check_lib_save_LIBS
7663 fi
7664 echo "$as_me:7664: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
7665 echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6
7666 if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
7667 HAVE_X_SM=yes
7668 else
7669 -lICE
7670 fi
7671
7672 fi
7673
7674 if test "${HAVE_X_SM}" = "yes"; then
7675 cat >>confdefs.h <<\EOF
7676 #define HAVE_X_SM 1
7677 EOF
7678
7679 case "$LIBS" in
7680 *-lSM*) ;;
7681 *) LIBS="-lSM -lICE $LIBS" ;;
7682 esac
7683 fi
7684 fi
7685
7686 # If netdb.h doesn't declare h_errno, we must declare it by hand.
7687 echo "$as_me:7687: checking whether netdb declares h_errno" >&5
7688 echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6
7689 if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
7690 echo $ECHO_N "(cached) $ECHO_C" >&6
7691 else
7692 cat >conftest.$ac_ext <<_ACEOF
7693 #line 7693 "configure"
7694 #include "confdefs.h"
7695 #include <netdb.h>
7696 int
7697 main ()
7698 {
7699 return h_errno;
7700 ;
7701 return 0;
7702 }
7703 _ACEOF
7704 rm -f conftest.$ac_objext conftest$ac_exeext
7705 if { (eval echo "$as_me:7705: \"$ac_link\"") >&5
7706 (eval $ac_link) 2>&5
7707 ac_status=$?
7708 echo "$as_me:7708: \$? = $ac_status" >&5
7709 (exit $ac_status); } &&
7710 { ac_try='test -s conftest$ac_exeext'
7711 { (eval echo "$as_me:7711: \"$ac_try\"") >&5
7712 (eval $ac_try) 2>&5
7713 ac_status=$?
7714 echo "$as_me:7714: \$? = $ac_status" >&5
7715 (exit $ac_status); }; }; then
7716 emacs_cv_netdb_declares_h_errno=yes
7717 else
7718 echo "$as_me: failed program was:" >&5
7719 cat conftest.$ac_ext >&5
7720 emacs_cv_netdb_declares_h_errno=no
7721 fi
7722 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7723 fi
7724 echo "$as_me:7724: result: $emacs_cv_netdb_declares_h_errno" >&5
7725 echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6
7726 if test $emacs_cv_netdb_declares_h_errno = yes; then
7727 cat >>confdefs.h <<\EOF
7728 #define HAVE_H_ERRNO 1
7729 EOF
7730
7731 fi
7732
7733 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7734 # for constant arguments. Useless!
7735 echo "$as_me:7735: checking for working alloca.h" >&5
7736 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
7737 if test "${ac_cv_working_alloca_h+set}" = set; then
7738 echo $ECHO_N "(cached) $ECHO_C" >&6
7739 else
7740 cat >conftest.$ac_ext <<_ACEOF
7741 #line 7741 "configure"
7742 #include "confdefs.h"
7743 #include <alloca.h>
7744 int
7745 main ()
7746 {
7747 char *p = (char *) alloca (2 * sizeof (int));
7748 ;
7749 return 0;
7750 }
7751 _ACEOF
7752 rm -f conftest.$ac_objext conftest$ac_exeext
7753 if { (eval echo "$as_me:7753: \"$ac_link\"") >&5
7754 (eval $ac_link) 2>&5
7755 ac_status=$?
7756 echo "$as_me:7756: \$? = $ac_status" >&5
7757 (exit $ac_status); } &&
7758 { ac_try='test -s conftest$ac_exeext'
7759 { (eval echo "$as_me:7759: \"$ac_try\"") >&5
7760 (eval $ac_try) 2>&5
7761 ac_status=$?
7762 echo "$as_me:7762: \$? = $ac_status" >&5
7763 (exit $ac_status); }; }; then
7764 ac_cv_working_alloca_h=yes
7765 else
7766 echo "$as_me: failed program was:" >&5
7767 cat conftest.$ac_ext >&5
7768 ac_cv_working_alloca_h=no
7769 fi
7770 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7771 fi
7772 echo "$as_me:7772: result: $ac_cv_working_alloca_h" >&5
7773 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
7774 if test $ac_cv_working_alloca_h = yes; then
7775
7776 cat >>confdefs.h <<\EOF
7777 #define HAVE_ALLOCA_H 1
7778 EOF
7779
7780 fi
7781
7782 echo "$as_me:7782: checking for alloca" >&5
7783 echo $ECHO_N "checking for alloca... $ECHO_C" >&6
7784 if test "${ac_cv_func_alloca_works+set}" = set; then
7785 echo $ECHO_N "(cached) $ECHO_C" >&6
7786 else
7787 cat >conftest.$ac_ext <<_ACEOF
7788 #line 7788 "configure"
7789 #include "confdefs.h"
7790 #ifdef __GNUC__
7791 # define alloca __builtin_alloca
7792 #else
7793 # ifdef _MSC_VER
7794 # include <malloc.h>
7795 # define alloca _alloca
7796 # else
7797 # if HAVE_ALLOCA_H
7798 # include <alloca.h>
7799 # else
7800 # ifdef _AIX
7801 #pragma alloca
7802 # else
7803 # ifndef alloca /* predefined by HP cc +Olibcalls */
7804 char *alloca ();
7805 # endif
7806 # endif
7807 # endif
7808 # endif
7809 #endif
7810
7811 int
7812 main ()
7813 {
7814 char *p = (char *) alloca (1);
7815 ;
7816 return 0;
7817 }
7818 _ACEOF
7819 rm -f conftest.$ac_objext conftest$ac_exeext
7820 if { (eval echo "$as_me:7820: \"$ac_link\"") >&5
7821 (eval $ac_link) 2>&5
7822 ac_status=$?
7823 echo "$as_me:7823: \$? = $ac_status" >&5
7824 (exit $ac_status); } &&
7825 { ac_try='test -s conftest$ac_exeext'
7826 { (eval echo "$as_me:7826: \"$ac_try\"") >&5
7827 (eval $ac_try) 2>&5
7828 ac_status=$?
7829 echo "$as_me:7829: \$? = $ac_status" >&5
7830 (exit $ac_status); }; }; then
7831 ac_cv_func_alloca_works=yes
7832 else
7833 echo "$as_me: failed program was:" >&5
7834 cat conftest.$ac_ext >&5
7835 ac_cv_func_alloca_works=no
7836 fi
7837 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7838 fi
7839 echo "$as_me:7839: result: $ac_cv_func_alloca_works" >&5
7840 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
7841
7842 if test $ac_cv_func_alloca_works = yes; then
7843
7844 cat >>confdefs.h <<\EOF
7845 #define HAVE_ALLOCA 1
7846 EOF
7847
7848 else
7849 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7850 # that cause trouble. Some versions do not even contain alloca or
7851 # contain a buggy version. If you still want to use their alloca,
7852 # use ar to extract alloca.o from them instead of compiling alloca.c.
7853
7854 ALLOCA=alloca.$ac_objext
7855
7856 cat >>confdefs.h <<\EOF
7857 #define C_ALLOCA 1
7858 EOF
7859
7860 echo "$as_me:7860: checking whether \`alloca.c' needs Cray hooks" >&5
7861 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
7862 if test "${ac_cv_os_cray+set}" = set; then
7863 echo $ECHO_N "(cached) $ECHO_C" >&6
7864 else
7865 cat >conftest.$ac_ext <<_ACEOF
7866 #line 7866 "configure"
7867 #include "confdefs.h"
7868 #if defined(CRAY) && ! defined(CRAY2)
7869 webecray
7870 #else
7871 wenotbecray
7872 #endif
7873
7874 _ACEOF
7875 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7876 egrep "webecray" >/dev/null 2>&1; then
7877 ac_cv_os_cray=yes
7878 else
7879 ac_cv_os_cray=no
7880 fi
7881 rm -f conftest*
7882
7883 fi
7884 echo "$as_me:7884: result: $ac_cv_os_cray" >&5
7885 echo "${ECHO_T}$ac_cv_os_cray" >&6
7886 if test $ac_cv_os_cray = yes; then
7887 for ac_func in _getb67 GETB67 getb67; do
7888 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7889 echo "$as_me:7889: checking for $ac_func" >&5
7890 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7891 if eval "test \"\${$as_ac_var+set}\" = set"; then
7892 echo $ECHO_N "(cached) $ECHO_C" >&6
7893 else
7894 cat >conftest.$ac_ext <<_ACEOF
7895 #line 7895 "configure"
7896 #include "confdefs.h"
7897 /* System header to define __stub macros and hopefully few prototypes,
7898 which can conflict with char $ac_func (); below. */
7899 #include <assert.h>
7900 /* Override any gcc2 internal prototype to avoid an error. */
7901 #ifdef __cplusplus
7902 extern "C"
7903 #endif
7904 /* We use char because int might match the return type of a gcc2
7905 builtin and then its argument prototype would still apply. */
7906 char $ac_func ();
7907 char (*f) ();
7908
7909 int
7910 main ()
7911 {
7912 /* The GNU C library defines this for functions which it implements
7913 to always fail with ENOSYS. Some functions are actually named
7914 something starting with __ and the normal name is an alias. */
7915 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7916 choke me
7917 #else
7918 f = $ac_func;
7919 #endif
7920
7921 ;
7922 return 0;
7923 }
7924 _ACEOF
7925 rm -f conftest.$ac_objext conftest$ac_exeext
7926 if { (eval echo "$as_me:7926: \"$ac_link\"") >&5
7927 (eval $ac_link) 2>&5
7928 ac_status=$?
7929 echo "$as_me:7929: \$? = $ac_status" >&5
7930 (exit $ac_status); } &&
7931 { ac_try='test -s conftest$ac_exeext'
7932 { (eval echo "$as_me:7932: \"$ac_try\"") >&5
7933 (eval $ac_try) 2>&5
7934 ac_status=$?
7935 echo "$as_me:7935: \$? = $ac_status" >&5
7936 (exit $ac_status); }; }; then
7937 eval "$as_ac_var=yes"
7938 else
7939 echo "$as_me: failed program was:" >&5
7940 cat conftest.$ac_ext >&5
7941 eval "$as_ac_var=no"
7942 fi
7943 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7944 fi
7945 echo "$as_me:7945: result: `eval echo '${'$as_ac_var'}'`" >&5
7946 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7947 if test `eval echo '${'$as_ac_var'}'` = yes; then
7948
7949 cat >>confdefs.h <<EOF
7950 #define CRAY_STACKSEG_END $ac_func
7951 EOF
7952
7953 break
7954 fi
7955
7956 done
7957 fi
7958
7959 echo "$as_me:7959: checking stack direction for C alloca" >&5
7960 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
7961 if test "${ac_cv_c_stack_direction+set}" = set; then
7962 echo $ECHO_N "(cached) $ECHO_C" >&6
7963 else
7964 if test "$cross_compiling" = yes; then
7965 ac_cv_c_stack_direction=0
7966 else
7967 cat >conftest.$ac_ext <<_ACEOF
7968 #line 7968 "configure"
7969 #include "confdefs.h"
7970 int
7971 find_stack_direction ()
7972 {
7973 static char *addr = 0;
7974 auto char dummy;
7975 if (addr == 0)
7976 {
7977 addr = &dummy;
7978 return find_stack_direction ();
7979 }
7980 else
7981 return (&dummy > addr) ? 1 : -1;
7982 }
7983
7984 int
7985 main ()
7986 {
7987 exit (find_stack_direction () < 0);
7988 }
7989 _ACEOF
7990 rm -f conftest$ac_exeext
7991 if { (eval echo "$as_me:7991: \"$ac_link\"") >&5
7992 (eval $ac_link) 2>&5
7993 ac_status=$?
7994 echo "$as_me:7994: \$? = $ac_status" >&5
7995 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7996 { (eval echo "$as_me:7996: \"$ac_try\"") >&5
7997 (eval $ac_try) 2>&5
7998 ac_status=$?
7999 echo "$as_me:7999: \$? = $ac_status" >&5
8000 (exit $ac_status); }; }; then
8001 ac_cv_c_stack_direction=1
8002 else
8003 echo "$as_me: program exited with status $ac_status" >&5
8004 echo "$as_me: failed program was:" >&5
8005 cat conftest.$ac_ext >&5
8006 ac_cv_c_stack_direction=-1
8007 fi
8008 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8009 fi
8010 fi
8011 echo "$as_me:8011: result: $ac_cv_c_stack_direction" >&5
8012 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
8013
8014 cat >>confdefs.h <<EOF
8015 #define STACK_DIRECTION $ac_cv_c_stack_direction
8016 EOF
8017
8018 fi
8019
8020 # fmod, logb, and frexp are found in -lm on most systems.
8021 # On HPUX 9.01, -lm does not contain logb, so check for sqrt.
8022
8023 echo "$as_me:8023: checking for sqrt in -lm" >&5
8024 echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
8025 if test "${ac_cv_lib_m_sqrt+set}" = set; then
8026 echo $ECHO_N "(cached) $ECHO_C" >&6
8027 else
8028 ac_check_lib_save_LIBS=$LIBS
8029 LIBS="-lm $LIBS"
8030 cat >conftest.$ac_ext <<_ACEOF
8031 #line 8031 "configure"
8032 #include "confdefs.h"
8033
8034 /* Override any gcc2 internal prototype to avoid an error. */
8035 #ifdef __cplusplus
8036 extern "C"
8037 #endif
8038 /* We use char because int might match the return type of a gcc2
8039 builtin and then its argument prototype would still apply. */
8040 char sqrt ();
8041 int
8042 main ()
8043 {
8044 sqrt ();
8045 ;
8046 return 0;
8047 }
8048 _ACEOF
8049 rm -f conftest.$ac_objext conftest$ac_exeext
8050 if { (eval echo "$as_me:8050: \"$ac_link\"") >&5
8051 (eval $ac_link) 2>&5
8052 ac_status=$?
8053 echo "$as_me:8053: \$? = $ac_status" >&5
8054 (exit $ac_status); } &&
8055 { ac_try='test -s conftest$ac_exeext'
8056 { (eval echo "$as_me:8056: \"$ac_try\"") >&5
8057 (eval $ac_try) 2>&5
8058 ac_status=$?
8059 echo "$as_me:8059: \$? = $ac_status" >&5
8060 (exit $ac_status); }; }; then
8061 ac_cv_lib_m_sqrt=yes
8062 else
8063 echo "$as_me: failed program was:" >&5
8064 cat conftest.$ac_ext >&5
8065 ac_cv_lib_m_sqrt=no
8066 fi
8067 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8068 LIBS=$ac_check_lib_save_LIBS
8069 fi
8070 echo "$as_me:8070: result: $ac_cv_lib_m_sqrt" >&5
8071 echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
8072 if test $ac_cv_lib_m_sqrt = yes; then
8073 cat >>confdefs.h <<EOF
8074 #define HAVE_LIBM 1
8075 EOF
8076
8077 LIBS="-lm $LIBS"
8078
8079 fi
8080
8081 # Check for mail-locking functions in a "mail" library
8082
8083 echo "$as_me:8083: checking for maillock in -lmail" >&5
8084 echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6
8085 if test "${ac_cv_lib_mail_maillock+set}" = set; then
8086 echo $ECHO_N "(cached) $ECHO_C" >&6
8087 else
8088 ac_check_lib_save_LIBS=$LIBS
8089 LIBS="-lmail $LIBS"
8090 cat >conftest.$ac_ext <<_ACEOF
8091 #line 8091 "configure"
8092 #include "confdefs.h"
8093
8094 /* Override any gcc2 internal prototype to avoid an error. */
8095 #ifdef __cplusplus
8096 extern "C"
8097 #endif
8098 /* We use char because int might match the return type of a gcc2
8099 builtin and then its argument prototype would still apply. */
8100 char maillock ();
8101 int
8102 main ()
8103 {
8104 maillock ();
8105 ;
8106 return 0;
8107 }
8108 _ACEOF
8109 rm -f conftest.$ac_objext conftest$ac_exeext
8110 if { (eval echo "$as_me:8110: \"$ac_link\"") >&5
8111 (eval $ac_link) 2>&5
8112 ac_status=$?
8113 echo "$as_me:8113: \$? = $ac_status" >&5
8114 (exit $ac_status); } &&
8115 { ac_try='test -s conftest$ac_exeext'
8116 { (eval echo "$as_me:8116: \"$ac_try\"") >&5
8117 (eval $ac_try) 2>&5
8118 ac_status=$?
8119 echo "$as_me:8119: \$? = $ac_status" >&5
8120 (exit $ac_status); }; }; then
8121 ac_cv_lib_mail_maillock=yes
8122 else
8123 echo "$as_me: failed program was:" >&5
8124 cat conftest.$ac_ext >&5
8125 ac_cv_lib_mail_maillock=no
8126 fi
8127 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8128 LIBS=$ac_check_lib_save_LIBS
8129 fi
8130 echo "$as_me:8130: result: $ac_cv_lib_mail_maillock" >&5
8131 echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6
8132 if test $ac_cv_lib_mail_maillock = yes; then
8133 cat >>confdefs.h <<EOF
8134 #define HAVE_LIBMAIL 1
8135 EOF
8136
8137 LIBS="-lmail $LIBS"
8138
8139 fi
8140
8141 echo "$as_me:8141: checking for maillock in -llockfile" >&5
8142 echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6
8143 if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
8144 echo $ECHO_N "(cached) $ECHO_C" >&6
8145 else
8146 ac_check_lib_save_LIBS=$LIBS
8147 LIBS="-llockfile $LIBS"
8148 cat >conftest.$ac_ext <<_ACEOF
8149 #line 8149 "configure"
8150 #include "confdefs.h"
8151
8152 /* Override any gcc2 internal prototype to avoid an error. */
8153 #ifdef __cplusplus
8154 extern "C"
8155 #endif
8156 /* We use char because int might match the return type of a gcc2
8157 builtin and then its argument prototype would still apply. */
8158 char maillock ();
8159 int
8160 main ()
8161 {
8162 maillock ();
8163 ;
8164 return 0;
8165 }
8166 _ACEOF
8167 rm -f conftest.$ac_objext conftest$ac_exeext
8168 if { (eval echo "$as_me:8168: \"$ac_link\"") >&5
8169 (eval $ac_link) 2>&5
8170 ac_status=$?
8171 echo "$as_me:8171: \$? = $ac_status" >&5
8172 (exit $ac_status); } &&
8173 { ac_try='test -s conftest$ac_exeext'
8174 { (eval echo "$as_me:8174: \"$ac_try\"") >&5
8175 (eval $ac_try) 2>&5
8176 ac_status=$?
8177 echo "$as_me:8177: \$? = $ac_status" >&5
8178 (exit $ac_status); }; }; then
8179 ac_cv_lib_lockfile_maillock=yes
8180 else
8181 echo "$as_me: failed program was:" >&5
8182 cat conftest.$ac_ext >&5
8183 ac_cv_lib_lockfile_maillock=no
8184 fi
8185 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8186 LIBS=$ac_check_lib_save_LIBS
8187 fi
8188 echo "$as_me:8188: result: $ac_cv_lib_lockfile_maillock" >&5
8189 echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6
8190 if test $ac_cv_lib_lockfile_maillock = yes; then
8191 cat >>confdefs.h <<EOF
8192 #define HAVE_LIBLOCKFILE 1
8193 EOF
8194
8195 LIBS="-llockfile $LIBS"
8196
8197 fi
8198
8199 # If we have the shared liblockfile, assume we must use it for mail
8200 # locking (e.g. Debian). If we couldn't link against liblockfile
8201 # (no liblockfile.a installed), ensure that we don't need to.
8202 if test "$ac_cv_lib_lockfile_maillock" = no; then
8203 # Extract the first word of "liblockfile.so", so it can be a program name with args.
8204 set dummy liblockfile.so; ac_word=$2
8205 echo "$as_me:8205: checking for $ac_word" >&5
8206 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8207 if test "${ac_cv_prog_liblockfile+set}" = set; then
8208 echo $ECHO_N "(cached) $ECHO_C" >&6
8209 else
8210 if test -n "$liblockfile"; then
8211 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
8212 else
8213 ac_save_IFS=$IFS; IFS=$ac_path_separator
8214 ac_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
8215 for ac_dir in $ac_dummy; do
8216 IFS=$ac_save_IFS
8217 test -z "$ac_dir" && ac_dir=.
8218 $as_executable_p "$ac_dir/$ac_word" || continue
8219 ac_cv_prog_liblockfile="yes"
8220 echo "$as_me:8220: found $ac_dir/$ac_word" >&5
8221 break
8222 done
8223
8224 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
8225 fi
8226 fi
8227 liblockfile=$ac_cv_prog_liblockfile
8228 if test -n "$liblockfile"; then
8229 echo "$as_me:8229: result: $liblockfile" >&5
8230 echo "${ECHO_T}$liblockfile" >&6
8231 else
8232 echo "$as_me:8232: result: no" >&5
8233 echo "${ECHO_T}no" >&6
8234 fi
8235
8236 if test $ac_cv_prog_liblockfile = yes; then
8237 { { echo "$as_me:8237: error: Shared liblockfile found but can't link against it.
8238 This probably means that movemail could lose mail.
8239 There may be a \`development' package to install containing liblockfile." >&5
8240 echo "$as_me: error: Shared liblockfile found but can't link against it.
8241 This probably means that movemail could lose mail.
8242 There may be a \`development' package to install containing liblockfile." >&2;}
8243 { (exit 1); exit 1; }; }
8244 else cat >>confdefs.h <<\EOF
8245 #define LIBMAIL -llockfile
8246 EOF
8247
8248 fi
8249 else :
8250 fi
8251
8252 for ac_func in touchlock
8253 do
8254 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8255 echo "$as_me:8255: checking for $ac_func" >&5
8256 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8257 if eval "test \"\${$as_ac_var+set}\" = set"; then
8258 echo $ECHO_N "(cached) $ECHO_C" >&6
8259 else
8260 cat >conftest.$ac_ext <<_ACEOF
8261 #line 8261 "configure"
8262 #include "confdefs.h"
8263 /* System header to define __stub macros and hopefully few prototypes,
8264 which can conflict with char $ac_func (); below. */
8265 #include <assert.h>
8266 /* Override any gcc2 internal prototype to avoid an error. */
8267 #ifdef __cplusplus
8268 extern "C"
8269 #endif
8270 /* We use char because int might match the return type of a gcc2
8271 builtin and then its argument prototype would still apply. */
8272 char $ac_func ();
8273 char (*f) ();
8274
8275 int
8276 main ()
8277 {
8278 /* The GNU C library defines this for functions which it implements
8279 to always fail with ENOSYS. Some functions are actually named
8280 something starting with __ and the normal name is an alias. */
8281 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8282 choke me
8283 #else
8284 f = $ac_func;
8285 #endif
8286
8287 ;
8288 return 0;
8289 }
8290 _ACEOF
8291 rm -f conftest.$ac_objext conftest$ac_exeext
8292 if { (eval echo "$as_me:8292: \"$ac_link\"") >&5
8293 (eval $ac_link) 2>&5
8294 ac_status=$?
8295 echo "$as_me:8295: \$? = $ac_status" >&5
8296 (exit $ac_status); } &&
8297 { ac_try='test -s conftest$ac_exeext'
8298 { (eval echo "$as_me:8298: \"$ac_try\"") >&5
8299 (eval $ac_try) 2>&5
8300 ac_status=$?
8301 echo "$as_me:8301: \$? = $ac_status" >&5
8302 (exit $ac_status); }; }; then
8303 eval "$as_ac_var=yes"
8304 else
8305 echo "$as_me: failed program was:" >&5
8306 cat conftest.$ac_ext >&5
8307 eval "$as_ac_var=no"
8308 fi
8309 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8310 fi
8311 echo "$as_me:8311: result: `eval echo '${'$as_ac_var'}'`" >&5
8312 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8313 if test `eval echo '${'$as_ac_var'}'` = yes; then
8314 cat >>confdefs.h <<EOF
8315 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8316 EOF
8317
8318 fi
8319 done
8320
8321 for ac_header in maillock.h
8322 do
8323 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8324 echo "$as_me:8324: checking for $ac_header" >&5
8325 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8326 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8327 echo $ECHO_N "(cached) $ECHO_C" >&6
8328 else
8329 cat >conftest.$ac_ext <<_ACEOF
8330 #line 8330 "configure"
8331 #include "confdefs.h"
8332 #include <$ac_header>
8333 _ACEOF
8334 if { (eval echo "$as_me:8334: \"$ac_cpp conftest.$ac_ext\"") >&5
8335 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8336 ac_status=$?
8337 egrep -v '^ *\+' conftest.er1 >conftest.err
8338 rm -f conftest.er1
8339 cat conftest.err >&5
8340 echo "$as_me:8340: \$? = $ac_status" >&5
8341 (exit $ac_status); } >/dev/null; then
8342 if test -s conftest.err; then
8343 ac_cpp_err=$ac_c_preproc_warn_flag
8344 else
8345 ac_cpp_err=
8346 fi
8347 else
8348 ac_cpp_err=yes
8349 fi
8350 if test -z "$ac_cpp_err"; then
8351 eval "$as_ac_Header=yes"
8352 else
8353 echo "$as_me: failed program was:" >&5
8354 cat conftest.$ac_ext >&5
8355 eval "$as_ac_Header=no"
8356 fi
8357 rm -f conftest.err conftest.$ac_ext
8358 fi
8359 echo "$as_me:8359: result: `eval echo '${'$as_ac_Header'}'`" >&5
8360 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8361 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8362 cat >>confdefs.h <<EOF
8363 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8364 EOF
8365
8366 fi
8367 done
8368
8369 for ac_func in gethostname getdomainname getpeername dup2 \
8370 rename closedir mkdir rmdir sysinfo \
8371 random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
8372 strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
8373 utimes setrlimit setpgid getcwd getwd shutdown strftime getaddrinfo \
8374 __fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
8375 gai_strerror mkstemp
8376 do
8377 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8378 echo "$as_me:8378: checking for $ac_func" >&5
8379 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8380 if eval "test \"\${$as_ac_var+set}\" = set"; then
8381 echo $ECHO_N "(cached) $ECHO_C" >&6
8382 else
8383 cat >conftest.$ac_ext <<_ACEOF
8384 #line 8384 "configure"
8385 #include "confdefs.h"
8386 /* System header to define __stub macros and hopefully few prototypes,
8387 which can conflict with char $ac_func (); below. */
8388 #include <assert.h>
8389 /* Override any gcc2 internal prototype to avoid an error. */
8390 #ifdef __cplusplus
8391 extern "C"
8392 #endif
8393 /* We use char because int might match the return type of a gcc2
8394 builtin and then its argument prototype would still apply. */
8395 char $ac_func ();
8396 char (*f) ();
8397
8398 int
8399 main ()
8400 {
8401 /* The GNU C library defines this for functions which it implements
8402 to always fail with ENOSYS. Some functions are actually named
8403 something starting with __ and the normal name is an alias. */
8404 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8405 choke me
8406 #else
8407 f = $ac_func;
8408 #endif
8409
8410 ;
8411 return 0;
8412 }
8413 _ACEOF
8414 rm -f conftest.$ac_objext conftest$ac_exeext
8415 if { (eval echo "$as_me:8415: \"$ac_link\"") >&5
8416 (eval $ac_link) 2>&5
8417 ac_status=$?
8418 echo "$as_me:8418: \$? = $ac_status" >&5
8419 (exit $ac_status); } &&
8420 { ac_try='test -s conftest$ac_exeext'
8421 { (eval echo "$as_me:8421: \"$ac_try\"") >&5
8422 (eval $ac_try) 2>&5
8423 ac_status=$?
8424 echo "$as_me:8424: \$? = $ac_status" >&5
8425 (exit $ac_status); }; }; then
8426 eval "$as_ac_var=yes"
8427 else
8428 echo "$as_me: failed program was:" >&5
8429 cat conftest.$ac_ext >&5
8430 eval "$as_ac_var=no"
8431 fi
8432 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8433 fi
8434 echo "$as_me:8434: result: `eval echo '${'$as_ac_var'}'`" >&5
8435 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8436 if test `eval echo '${'$as_ac_var'}'` = yes; then
8437 cat >>confdefs.h <<EOF
8438 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8439 EOF
8440
8441 fi
8442 done
8443
8444 for ac_header in sys/time.h unistd.h
8445 do
8446 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8447 echo "$as_me:8447: checking for $ac_header" >&5
8448 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8449 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8450 echo $ECHO_N "(cached) $ECHO_C" >&6
8451 else
8452 cat >conftest.$ac_ext <<_ACEOF
8453 #line 8453 "configure"
8454 #include "confdefs.h"
8455 #include <$ac_header>
8456 _ACEOF
8457 if { (eval echo "$as_me:8457: \"$ac_cpp conftest.$ac_ext\"") >&5
8458 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8459 ac_status=$?
8460 egrep -v '^ *\+' conftest.er1 >conftest.err
8461 rm -f conftest.er1
8462 cat conftest.err >&5
8463 echo "$as_me:8463: \$? = $ac_status" >&5
8464 (exit $ac_status); } >/dev/null; then
8465 if test -s conftest.err; then
8466 ac_cpp_err=$ac_c_preproc_warn_flag
8467 else
8468 ac_cpp_err=
8469 fi
8470 else
8471 ac_cpp_err=yes
8472 fi
8473 if test -z "$ac_cpp_err"; then
8474 eval "$as_ac_Header=yes"
8475 else
8476 echo "$as_me: failed program was:" >&5
8477 cat conftest.$ac_ext >&5
8478 eval "$as_ac_Header=no"
8479 fi
8480 rm -f conftest.err conftest.$ac_ext
8481 fi
8482 echo "$as_me:8482: result: `eval echo '${'$as_ac_Header'}'`" >&5
8483 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8484 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8485 cat >>confdefs.h <<EOF
8486 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8487 EOF
8488
8489 fi
8490 done
8491
8492 for ac_func in alarm
8493 do
8494 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8495 echo "$as_me:8495: checking for $ac_func" >&5
8496 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8497 if eval "test \"\${$as_ac_var+set}\" = set"; then
8498 echo $ECHO_N "(cached) $ECHO_C" >&6
8499 else
8500 cat >conftest.$ac_ext <<_ACEOF
8501 #line 8501 "configure"
8502 #include "confdefs.h"
8503 /* System header to define __stub macros and hopefully few prototypes,
8504 which can conflict with char $ac_func (); below. */
8505 #include <assert.h>
8506 /* Override any gcc2 internal prototype to avoid an error. */
8507 #ifdef __cplusplus
8508 extern "C"
8509 #endif
8510 /* We use char because int might match the return type of a gcc2
8511 builtin and then its argument prototype would still apply. */
8512 char $ac_func ();
8513 char (*f) ();
8514
8515 int
8516 main ()
8517 {
8518 /* The GNU C library defines this for functions which it implements
8519 to always fail with ENOSYS. Some functions are actually named
8520 something starting with __ and the normal name is an alias. */
8521 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8522 choke me
8523 #else
8524 f = $ac_func;
8525 #endif
8526
8527 ;
8528 return 0;
8529 }
8530 _ACEOF
8531 rm -f conftest.$ac_objext conftest$ac_exeext
8532 if { (eval echo "$as_me:8532: \"$ac_link\"") >&5
8533 (eval $ac_link) 2>&5
8534 ac_status=$?
8535 echo "$as_me:8535: \$? = $ac_status" >&5
8536 (exit $ac_status); } &&
8537 { ac_try='test -s conftest$ac_exeext'
8538 { (eval echo "$as_me:8538: \"$ac_try\"") >&5
8539 (eval $ac_try) 2>&5
8540 ac_status=$?
8541 echo "$as_me:8541: \$? = $ac_status" >&5
8542 (exit $ac_status); }; }; then
8543 eval "$as_ac_var=yes"
8544 else
8545 echo "$as_me: failed program was:" >&5
8546 cat conftest.$ac_ext >&5
8547 eval "$as_ac_var=no"
8548 fi
8549 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8550 fi
8551 echo "$as_me:8551: result: `eval echo '${'$as_ac_var'}'`" >&5
8552 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8553 if test `eval echo '${'$as_ac_var'}'` = yes; then
8554 cat >>confdefs.h <<EOF
8555 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8556 EOF
8557
8558 fi
8559 done
8560
8561 echo "$as_me:8561: checking for working mktime" >&5
8562 echo $ECHO_N "checking for working mktime... $ECHO_C" >&6
8563 if test "${ac_cv_func_working_mktime+set}" = set; then
8564 echo $ECHO_N "(cached) $ECHO_C" >&6
8565 else
8566 if test "$cross_compiling" = yes; then
8567 ac_cv_func_working_mktime=no
8568 else
8569 cat >conftest.$ac_ext <<_ACEOF
8570 #line 8570 "configure"
8571 #include "confdefs.h"
8572 /* Test program from Paul Eggert and Tony Leneis. */
8573 #if TIME_WITH_SYS_TIME
8574 # include <sys/time.h>
8575 # include <time.h>
8576 #else
8577 # if HAVE_SYS_TIME_H
8578 # include <sys/time.h>
8579 # else
8580 # include <time.h>
8581 # endif
8582 #endif
8583
8584 #if HAVE_UNISTD_H
8585 # include <unistd.h>
8586 #endif
8587
8588 #if !HAVE_ALARM
8589 # define alarm(X) /* empty */
8590 #endif
8591
8592 /* Work around redefinition to rpl_putenv by other config tests. */
8593 #undef putenv
8594
8595 static time_t time_t_max;
8596
8597 /* Values we'll use to set the TZ environment variable. */
8598 static const char *const tz_strings[] = {
8599 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
8600 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
8601 };
8602 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
8603
8604 /* Fail if mktime fails to convert a date in the spring-forward gap.
8605 Based on a problem report from Andreas Jaeger. */
8606 static void
8607 spring_forward_gap ()
8608 {
8609 /* glibc (up to about 1998-10-07) failed this test. */
8610 struct tm tm;
8611
8612 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
8613 instead of "TZ=America/Vancouver" in order to detect the bug even
8614 on systems that don't support the Olson extension, or don't have the
8615 full zoneinfo tables installed. */
8616 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
8617
8618 tm.tm_year = 98;
8619 tm.tm_mon = 3;
8620 tm.tm_mday = 5;
8621 tm.tm_hour = 2;
8622 tm.tm_min = 0;
8623 tm.tm_sec = 0;
8624 tm.tm_isdst = -1;
8625 if (mktime (&tm) == (time_t)-1)
8626 exit (1);
8627 }
8628
8629 static void
8630 mktime_test (now)
8631 time_t now;
8632 {
8633 struct tm *lt;
8634 if ((lt = localtime (&now)) && mktime (lt) != now)
8635 exit (1);
8636 now = time_t_max - now;
8637 if ((lt = localtime (&now)) && mktime (lt) != now)
8638 exit (1);
8639 }
8640
8641 static void
8642 irix_6_4_bug ()
8643 {
8644 /* Based on code from Ariel Faigon. */
8645 struct tm tm;
8646 tm.tm_year = 96;
8647 tm.tm_mon = 3;
8648 tm.tm_mday = 0;
8649 tm.tm_hour = 0;
8650 tm.tm_min = 0;
8651 tm.tm_sec = 0;
8652 tm.tm_isdst = -1;
8653 mktime (&tm);
8654 if (tm.tm_mon != 2 || tm.tm_mday != 31)
8655 exit (1);
8656 }
8657
8658 static void
8659 bigtime_test (j)
8660 int j;
8661 {
8662 struct tm tm;
8663 time_t now;
8664 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
8665 now = mktime (&tm);
8666 if (now != (time_t) -1)
8667 {
8668 struct tm *lt = localtime (&now);
8669 if (! (lt
8670 && lt->tm_year == tm.tm_year
8671 && lt->tm_mon == tm.tm_mon
8672 && lt->tm_mday == tm.tm_mday
8673 && lt->tm_hour == tm.tm_hour
8674 && lt->tm_min == tm.tm_min
8675 && lt->tm_sec == tm.tm_sec
8676 && lt->tm_yday == tm.tm_yday
8677 && lt->tm_wday == tm.tm_wday
8678 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
8679 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
8680 exit (1);
8681 }
8682 }
8683
8684 int
8685 main ()
8686 {
8687 time_t t, delta;
8688 int i, j;
8689
8690 /* This test makes some buggy mktime implementations loop.
8691 Give up after 60 seconds; a mktime slower than that
8692 isn't worth using anyway. */
8693 alarm (60);
8694
8695 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
8696 continue;
8697 time_t_max--;
8698 delta = time_t_max / 997; /* a suitable prime number */
8699 for (i = 0; i < N_STRINGS; i++)
8700 {
8701 if (tz_strings[i])
8702 putenv (tz_strings[i]);
8703
8704 for (t = 0; t <= time_t_max - delta; t += delta)
8705 mktime_test (t);
8706 mktime_test ((time_t) 60 * 60);
8707 mktime_test ((time_t) 60 * 60 * 24);
8708
8709 for (j = 1; 0 < j; j *= 2)
8710 bigtime_test (j);
8711 bigtime_test (j - 1);
8712 }
8713 irix_6_4_bug ();
8714 spring_forward_gap ();
8715 exit (0);
8716 }
8717 _ACEOF
8718 rm -f conftest$ac_exeext
8719 if { (eval echo "$as_me:8719: \"$ac_link\"") >&5
8720 (eval $ac_link) 2>&5
8721 ac_status=$?
8722 echo "$as_me:8722: \$? = $ac_status" >&5
8723 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8724 { (eval echo "$as_me:8724: \"$ac_try\"") >&5
8725 (eval $ac_try) 2>&5
8726 ac_status=$?
8727 echo "$as_me:8727: \$? = $ac_status" >&5
8728 (exit $ac_status); }; }; then
8729 ac_cv_func_working_mktime=yes
8730 else
8731 echo "$as_me: program exited with status $ac_status" >&5
8732 echo "$as_me: failed program was:" >&5
8733 cat conftest.$ac_ext >&5
8734 ac_cv_func_working_mktime=no
8735 fi
8736 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8737 fi
8738 fi
8739 echo "$as_me:8739: result: $ac_cv_func_working_mktime" >&5
8740 echo "${ECHO_T}$ac_cv_func_working_mktime" >&6
8741 if test $ac_cv_func_working_mktime = no; then
8742 LIBOBJS="$LIBOBJS mktime.$ac_objext"
8743 fi
8744
8745 if test "$ac_cv_func_working_mktime" = no; then
8746 cat >>confdefs.h <<\EOF
8747 #define BROKEN_MKTIME 1
8748 EOF
8749
8750 fi
8751
8752 ac_have_func=no # yes means we've found a way to get the load average.
8753
8754 ac_save_LIBS=$LIBS
8755
8756 # Check for getloadavg, but be sure not to touch the cache variable.
8757 (echo "$as_me:8757: checking for getloadavg" >&5
8758 echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6
8759 if test "${ac_cv_func_getloadavg+set}" = set; then
8760 echo $ECHO_N "(cached) $ECHO_C" >&6
8761 else
8762 cat >conftest.$ac_ext <<_ACEOF
8763 #line 8763 "configure"
8764 #include "confdefs.h"
8765 /* System header to define __stub macros and hopefully few prototypes,
8766 which can conflict with char getloadavg (); below. */
8767 #include <assert.h>
8768 /* Override any gcc2 internal prototype to avoid an error. */
8769 #ifdef __cplusplus
8770 extern "C"
8771 #endif
8772 /* We use char because int might match the return type of a gcc2
8773 builtin and then its argument prototype would still apply. */
8774 char getloadavg ();
8775 char (*f) ();
8776
8777 int
8778 main ()
8779 {
8780 /* The GNU C library defines this for functions which it implements
8781 to always fail with ENOSYS. Some functions are actually named
8782 something starting with __ and the normal name is an alias. */
8783 #if defined (__stub_getloadavg) || defined (__stub___getloadavg)
8784 choke me
8785 #else
8786 f = getloadavg;
8787 #endif
8788
8789 ;
8790 return 0;
8791 }
8792 _ACEOF
8793 rm -f conftest.$ac_objext conftest$ac_exeext
8794 if { (eval echo "$as_me:8794: \"$ac_link\"") >&5
8795 (eval $ac_link) 2>&5
8796 ac_status=$?
8797 echo "$as_me:8797: \$? = $ac_status" >&5
8798 (exit $ac_status); } &&
8799 { ac_try='test -s conftest$ac_exeext'
8800 { (eval echo "$as_me:8800: \"$ac_try\"") >&5
8801 (eval $ac_try) 2>&5
8802 ac_status=$?
8803 echo "$as_me:8803: \$? = $ac_status" >&5
8804 (exit $ac_status); }; }; then
8805 ac_cv_func_getloadavg=yes
8806 else
8807 echo "$as_me: failed program was:" >&5
8808 cat conftest.$ac_ext >&5
8809 ac_cv_func_getloadavg=no
8810 fi
8811 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8812 fi
8813 echo "$as_me:8813: result: $ac_cv_func_getloadavg" >&5
8814 echo "${ECHO_T}$ac_cv_func_getloadavg" >&6
8815 if test $ac_cv_func_getloadavg = yes; then
8816 exit 0
8817 else
8818 exit 1
8819 fi
8820 ) && ac_have_func=yes
8821
8822 # On HPUX9, an unprivileged user can get load averages through this function.
8823
8824 for ac_func in pstat_getdynamic
8825 do
8826 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8827 echo "$as_me:8827: checking for $ac_func" >&5
8828 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8829 if eval "test \"\${$as_ac_var+set}\" = set"; then
8830 echo $ECHO_N "(cached) $ECHO_C" >&6
8831 else
8832 cat >conftest.$ac_ext <<_ACEOF
8833 #line 8833 "configure"
8834 #include "confdefs.h"
8835 /* System header to define __stub macros and hopefully few prototypes,
8836 which can conflict with char $ac_func (); below. */
8837 #include <assert.h>
8838 /* Override any gcc2 internal prototype to avoid an error. */
8839 #ifdef __cplusplus
8840 extern "C"
8841 #endif
8842 /* We use char because int might match the return type of a gcc2
8843 builtin and then its argument prototype would still apply. */
8844 char $ac_func ();
8845 char (*f) ();
8846
8847 int
8848 main ()
8849 {
8850 /* The GNU C library defines this for functions which it implements
8851 to always fail with ENOSYS. Some functions are actually named
8852 something starting with __ and the normal name is an alias. */
8853 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8854 choke me
8855 #else
8856 f = $ac_func;
8857 #endif
8858
8859 ;
8860 return 0;
8861 }
8862 _ACEOF
8863 rm -f conftest.$ac_objext conftest$ac_exeext
8864 if { (eval echo "$as_me:8864: \"$ac_link\"") >&5
8865 (eval $ac_link) 2>&5
8866 ac_status=$?
8867 echo "$as_me:8867: \$? = $ac_status" >&5
8868 (exit $ac_status); } &&
8869 { ac_try='test -s conftest$ac_exeext'
8870 { (eval echo "$as_me:8870: \"$ac_try\"") >&5
8871 (eval $ac_try) 2>&5
8872 ac_status=$?
8873 echo "$as_me:8873: \$? = $ac_status" >&5
8874 (exit $ac_status); }; }; then
8875 eval "$as_ac_var=yes"
8876 else
8877 echo "$as_me: failed program was:" >&5
8878 cat conftest.$ac_ext >&5
8879 eval "$as_ac_var=no"
8880 fi
8881 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8882 fi
8883 echo "$as_me:8883: result: `eval echo '${'$as_ac_var'}'`" >&5
8884 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8885 if test `eval echo '${'$as_ac_var'}'` = yes; then
8886 cat >>confdefs.h <<EOF
8887 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8888 EOF
8889
8890 fi
8891 done
8892
8893 # Solaris has libkstat which does not require root.
8894
8895 echo "$as_me:8895: checking for kstat_open in -lkstat" >&5
8896 echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
8897 if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
8898 echo $ECHO_N "(cached) $ECHO_C" >&6
8899 else
8900 ac_check_lib_save_LIBS=$LIBS
8901 LIBS="-lkstat $LIBS"
8902 cat >conftest.$ac_ext <<_ACEOF
8903 #line 8903 "configure"
8904 #include "confdefs.h"
8905
8906 /* Override any gcc2 internal prototype to avoid an error. */
8907 #ifdef __cplusplus
8908 extern "C"
8909 #endif
8910 /* We use char because int might match the return type of a gcc2
8911 builtin and then its argument prototype would still apply. */
8912 char kstat_open ();
8913 int
8914 main ()
8915 {
8916 kstat_open ();
8917 ;
8918 return 0;
8919 }
8920 _ACEOF
8921 rm -f conftest.$ac_objext conftest$ac_exeext
8922 if { (eval echo "$as_me:8922: \"$ac_link\"") >&5
8923 (eval $ac_link) 2>&5
8924 ac_status=$?
8925 echo "$as_me:8925: \$? = $ac_status" >&5
8926 (exit $ac_status); } &&
8927 { ac_try='test -s conftest$ac_exeext'
8928 { (eval echo "$as_me:8928: \"$ac_try\"") >&5
8929 (eval $ac_try) 2>&5
8930 ac_status=$?
8931 echo "$as_me:8931: \$? = $ac_status" >&5
8932 (exit $ac_status); }; }; then
8933 ac_cv_lib_kstat_kstat_open=yes
8934 else
8935 echo "$as_me: failed program was:" >&5
8936 cat conftest.$ac_ext >&5
8937 ac_cv_lib_kstat_kstat_open=no
8938 fi
8939 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8940 LIBS=$ac_check_lib_save_LIBS
8941 fi
8942 echo "$as_me:8942: result: $ac_cv_lib_kstat_kstat_open" >&5
8943 echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6
8944 if test $ac_cv_lib_kstat_kstat_open = yes; then
8945 cat >>confdefs.h <<EOF
8946 #define HAVE_LIBKSTAT 1
8947 EOF
8948
8949 LIBS="-lkstat $LIBS"
8950
8951 fi
8952
8953 test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
8954
8955 # Some systems with -lutil have (and need) -lkvm as well, some do not.
8956 # On Solaris, -lkvm requires nlist from -lelf, so check that first
8957 # to get the right answer into the cache.
8958 # For kstat on solaris, we need libelf to force the definition of SVR4 below.
8959 if test $ac_have_func = no; then
8960 echo "$as_me:8960: checking for elf_begin in -lelf" >&5
8961 echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
8962 if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
8963 echo $ECHO_N "(cached) $ECHO_C" >&6
8964 else
8965 ac_check_lib_save_LIBS=$LIBS
8966 LIBS="-lelf $LIBS"
8967 cat >conftest.$ac_ext <<_ACEOF
8968 #line 8968 "configure"
8969 #include "confdefs.h"
8970
8971 /* Override any gcc2 internal prototype to avoid an error. */
8972 #ifdef __cplusplus
8973 extern "C"
8974 #endif
8975 /* We use char because int might match the return type of a gcc2
8976 builtin and then its argument prototype would still apply. */
8977 char elf_begin ();
8978 int
8979 main ()
8980 {
8981 elf_begin ();
8982 ;
8983 return 0;
8984 }
8985 _ACEOF
8986 rm -f conftest.$ac_objext conftest$ac_exeext
8987 if { (eval echo "$as_me:8987: \"$ac_link\"") >&5
8988 (eval $ac_link) 2>&5
8989 ac_status=$?
8990 echo "$as_me:8990: \$? = $ac_status" >&5
8991 (exit $ac_status); } &&
8992 { ac_try='test -s conftest$ac_exeext'
8993 { (eval echo "$as_me:8993: \"$ac_try\"") >&5
8994 (eval $ac_try) 2>&5
8995 ac_status=$?
8996 echo "$as_me:8996: \$? = $ac_status" >&5
8997 (exit $ac_status); }; }; then
8998 ac_cv_lib_elf_elf_begin=yes
8999 else
9000 echo "$as_me: failed program was:" >&5
9001 cat conftest.$ac_ext >&5
9002 ac_cv_lib_elf_elf_begin=no
9003 fi
9004 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9005 LIBS=$ac_check_lib_save_LIBS
9006 fi
9007 echo "$as_me:9007: result: $ac_cv_lib_elf_elf_begin" >&5
9008 echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
9009 if test $ac_cv_lib_elf_elf_begin = yes; then
9010 LIBS="-lelf $LIBS"
9011 fi
9012
9013 fi
9014 if test $ac_have_func = no; then
9015 echo "$as_me:9015: checking for kvm_open in -lkvm" >&5
9016 echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6
9017 if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
9018 echo $ECHO_N "(cached) $ECHO_C" >&6
9019 else
9020 ac_check_lib_save_LIBS=$LIBS
9021 LIBS="-lkvm $LIBS"
9022 cat >conftest.$ac_ext <<_ACEOF
9023 #line 9023 "configure"
9024 #include "confdefs.h"
9025
9026 /* Override any gcc2 internal prototype to avoid an error. */
9027 #ifdef __cplusplus
9028 extern "C"
9029 #endif
9030 /* We use char because int might match the return type of a gcc2
9031 builtin and then its argument prototype would still apply. */
9032 char kvm_open ();
9033 int
9034 main ()
9035 {
9036 kvm_open ();
9037 ;
9038 return 0;
9039 }
9040 _ACEOF
9041 rm -f conftest.$ac_objext conftest$ac_exeext
9042 if { (eval echo "$as_me:9042: \"$ac_link\"") >&5
9043 (eval $ac_link) 2>&5
9044 ac_status=$?
9045 echo "$as_me:9045: \$? = $ac_status" >&5
9046 (exit $ac_status); } &&
9047 { ac_try='test -s conftest$ac_exeext'
9048 { (eval echo "$as_me:9048: \"$ac_try\"") >&5
9049 (eval $ac_try) 2>&5
9050 ac_status=$?
9051 echo "$as_me:9051: \$? = $ac_status" >&5
9052 (exit $ac_status); }; }; then
9053 ac_cv_lib_kvm_kvm_open=yes
9054 else
9055 echo "$as_me: failed program was:" >&5
9056 cat conftest.$ac_ext >&5
9057 ac_cv_lib_kvm_kvm_open=no
9058 fi
9059 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9060 LIBS=$ac_check_lib_save_LIBS
9061 fi
9062 echo "$as_me:9062: result: $ac_cv_lib_kvm_kvm_open" >&5
9063 echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6
9064 if test $ac_cv_lib_kvm_kvm_open = yes; then
9065 LIBS="-lkvm $LIBS"
9066 fi
9067
9068 # Check for the 4.4BSD definition of getloadavg.
9069 echo "$as_me:9069: checking for getloadavg in -lutil" >&5
9070 echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6
9071 if test "${ac_cv_lib_util_getloadavg+set}" = set; then
9072 echo $ECHO_N "(cached) $ECHO_C" >&6
9073 else
9074 ac_check_lib_save_LIBS=$LIBS
9075 LIBS="-lutil $LIBS"
9076 cat >conftest.$ac_ext <<_ACEOF
9077 #line 9077 "configure"
9078 #include "confdefs.h"
9079
9080 /* Override any gcc2 internal prototype to avoid an error. */
9081 #ifdef __cplusplus
9082 extern "C"
9083 #endif
9084 /* We use char because int might match the return type of a gcc2
9085 builtin and then its argument prototype would still apply. */
9086 char getloadavg ();
9087 int
9088 main ()
9089 {
9090 getloadavg ();
9091 ;
9092 return 0;
9093 }
9094 _ACEOF
9095 rm -f conftest.$ac_objext conftest$ac_exeext
9096 if { (eval echo "$as_me:9096: \"$ac_link\"") >&5
9097 (eval $ac_link) 2>&5
9098 ac_status=$?
9099 echo "$as_me:9099: \$? = $ac_status" >&5
9100 (exit $ac_status); } &&
9101 { ac_try='test -s conftest$ac_exeext'
9102 { (eval echo "$as_me:9102: \"$ac_try\"") >&5
9103 (eval $ac_try) 2>&5
9104 ac_status=$?
9105 echo "$as_me:9105: \$? = $ac_status" >&5
9106 (exit $ac_status); }; }; then
9107 ac_cv_lib_util_getloadavg=yes
9108 else
9109 echo "$as_me: failed program was:" >&5
9110 cat conftest.$ac_ext >&5
9111 ac_cv_lib_util_getloadavg=no
9112 fi
9113 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9114 LIBS=$ac_check_lib_save_LIBS
9115 fi
9116 echo "$as_me:9116: result: $ac_cv_lib_util_getloadavg" >&5
9117 echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6
9118 if test $ac_cv_lib_util_getloadavg = yes; then
9119 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
9120 fi
9121
9122 fi
9123
9124 if test $ac_have_func = no; then
9125 # There is a commonly available library for RS/6000 AIX.
9126 # Since it is not a standard part of AIX, it might be installed locally.
9127 ac_getloadavg_LIBS=$LIBS
9128 LIBS="-L/usr/local/lib $LIBS"
9129 echo "$as_me:9129: checking for getloadavg in -lgetloadavg" >&5
9130 echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6
9131 if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
9132 echo $ECHO_N "(cached) $ECHO_C" >&6
9133 else
9134 ac_check_lib_save_LIBS=$LIBS
9135 LIBS="-lgetloadavg $LIBS"
9136 cat >conftest.$ac_ext <<_ACEOF
9137 #line 9137 "configure"
9138 #include "confdefs.h"
9139
9140 /* Override any gcc2 internal prototype to avoid an error. */
9141 #ifdef __cplusplus
9142 extern "C"
9143 #endif
9144 /* We use char because int might match the return type of a gcc2
9145 builtin and then its argument prototype would still apply. */
9146 char getloadavg ();
9147 int
9148 main ()
9149 {
9150 getloadavg ();
9151 ;
9152 return 0;
9153 }
9154 _ACEOF
9155 rm -f conftest.$ac_objext conftest$ac_exeext
9156 if { (eval echo "$as_me:9156: \"$ac_link\"") >&5
9157 (eval $ac_link) 2>&5
9158 ac_status=$?
9159 echo "$as_me:9159: \$? = $ac_status" >&5
9160 (exit $ac_status); } &&
9161 { ac_try='test -s conftest$ac_exeext'
9162 { (eval echo "$as_me:9162: \"$ac_try\"") >&5
9163 (eval $ac_try) 2>&5
9164 ac_status=$?
9165 echo "$as_me:9165: \$? = $ac_status" >&5
9166 (exit $ac_status); }; }; then
9167 ac_cv_lib_getloadavg_getloadavg=yes
9168 else
9169 echo "$as_me: failed program was:" >&5
9170 cat conftest.$ac_ext >&5
9171 ac_cv_lib_getloadavg_getloadavg=no
9172 fi
9173 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9174 LIBS=$ac_check_lib_save_LIBS
9175 fi
9176 echo "$as_me:9176: result: $ac_cv_lib_getloadavg_getloadavg" >&5
9177 echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6
9178 if test $ac_cv_lib_getloadavg_getloadavg = yes; then
9179 LIBS="-lgetloadavg $LIBS"
9180 else
9181 LIBS=$ac_getloadavg_LIBS
9182 fi
9183
9184 fi
9185
9186 # Make sure it is really in the library, if we think we found it,
9187 # otherwise set up the replacement function.
9188
9189 for ac_func in getloadavg
9190 do
9191 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9192 echo "$as_me:9192: checking for $ac_func" >&5
9193 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9194 if eval "test \"\${$as_ac_var+set}\" = set"; then
9195 echo $ECHO_N "(cached) $ECHO_C" >&6
9196 else
9197 cat >conftest.$ac_ext <<_ACEOF
9198 #line 9198 "configure"
9199 #include "confdefs.h"
9200 /* System header to define __stub macros and hopefully few prototypes,
9201 which can conflict with char $ac_func (); below. */
9202 #include <assert.h>
9203 /* Override any gcc2 internal prototype to avoid an error. */
9204 #ifdef __cplusplus
9205 extern "C"
9206 #endif
9207 /* We use char because int might match the return type of a gcc2
9208 builtin and then its argument prototype would still apply. */
9209 char $ac_func ();
9210 char (*f) ();
9211
9212 int
9213 main ()
9214 {
9215 /* The GNU C library defines this for functions which it implements
9216 to always fail with ENOSYS. Some functions are actually named
9217 something starting with __ and the normal name is an alias. */
9218 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9219 choke me
9220 #else
9221 f = $ac_func;
9222 #endif
9223
9224 ;
9225 return 0;
9226 }
9227 _ACEOF
9228 rm -f conftest.$ac_objext conftest$ac_exeext
9229 if { (eval echo "$as_me:9229: \"$ac_link\"") >&5
9230 (eval $ac_link) 2>&5
9231 ac_status=$?
9232 echo "$as_me:9232: \$? = $ac_status" >&5
9233 (exit $ac_status); } &&
9234 { ac_try='test -s conftest$ac_exeext'
9235 { (eval echo "$as_me:9235: \"$ac_try\"") >&5
9236 (eval $ac_try) 2>&5
9237 ac_status=$?
9238 echo "$as_me:9238: \$? = $ac_status" >&5
9239 (exit $ac_status); }; }; then
9240 eval "$as_ac_var=yes"
9241 else
9242 echo "$as_me: failed program was:" >&5
9243 cat conftest.$ac_ext >&5
9244 eval "$as_ac_var=no"
9245 fi
9246 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9247 fi
9248 echo "$as_me:9248: result: `eval echo '${'$as_ac_var'}'`" >&5
9249 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9250 if test `eval echo '${'$as_ac_var'}'` = yes; then
9251 cat >>confdefs.h <<EOF
9252 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9253 EOF
9254
9255 else
9256 LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
9257
9258 cat >>confdefs.h <<\EOF
9259 #define C_GETLOADAVG 1
9260 EOF
9261
9262 # Figure out what our getloadavg.c needs.
9263 ac_have_func=no
9264 echo "$as_me:9264: checking for sys/dg_sys_info.h" >&5
9265 echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
9266 if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
9267 echo $ECHO_N "(cached) $ECHO_C" >&6
9268 else
9269 cat >conftest.$ac_ext <<_ACEOF
9270 #line 9270 "configure"
9271 #include "confdefs.h"
9272 #include <sys/dg_sys_info.h>
9273 _ACEOF
9274 if { (eval echo "$as_me:9274: \"$ac_cpp conftest.$ac_ext\"") >&5
9275 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9276 ac_status=$?
9277 egrep -v '^ *\+' conftest.er1 >conftest.err
9278 rm -f conftest.er1
9279 cat conftest.err >&5
9280 echo "$as_me:9280: \$? = $ac_status" >&5
9281 (exit $ac_status); } >/dev/null; then
9282 if test -s conftest.err; then
9283 ac_cpp_err=$ac_c_preproc_warn_flag
9284 else
9285 ac_cpp_err=
9286 fi
9287 else
9288 ac_cpp_err=yes
9289 fi
9290 if test -z "$ac_cpp_err"; then
9291 ac_cv_header_sys_dg_sys_info_h=yes
9292 else
9293 echo "$as_me: failed program was:" >&5
9294 cat conftest.$ac_ext >&5
9295 ac_cv_header_sys_dg_sys_info_h=no
9296 fi
9297 rm -f conftest.err conftest.$ac_ext
9298 fi
9299 echo "$as_me:9299: result: $ac_cv_header_sys_dg_sys_info_h" >&5
9300 echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
9301 if test $ac_cv_header_sys_dg_sys_info_h = yes; then
9302 ac_have_func=yes
9303
9304 cat >>confdefs.h <<\EOF
9305 #define DGUX 1
9306 EOF
9307
9308 echo "$as_me:9308: checking for dg_sys_info in -ldgc" >&5
9309 echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6
9310 if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
9311 echo $ECHO_N "(cached) $ECHO_C" >&6
9312 else
9313 ac_check_lib_save_LIBS=$LIBS
9314 LIBS="-ldgc $LIBS"
9315 cat >conftest.$ac_ext <<_ACEOF
9316 #line 9316 "configure"
9317 #include "confdefs.h"
9318
9319 /* Override any gcc2 internal prototype to avoid an error. */
9320 #ifdef __cplusplus
9321 extern "C"
9322 #endif
9323 /* We use char because int might match the return type of a gcc2
9324 builtin and then its argument prototype would still apply. */
9325 char dg_sys_info ();
9326 int
9327 main ()
9328 {
9329 dg_sys_info ();
9330 ;
9331 return 0;
9332 }
9333 _ACEOF
9334 rm -f conftest.$ac_objext conftest$ac_exeext
9335 if { (eval echo "$as_me:9335: \"$ac_link\"") >&5
9336 (eval $ac_link) 2>&5
9337 ac_status=$?
9338 echo "$as_me:9338: \$? = $ac_status" >&5
9339 (exit $ac_status); } &&
9340 { ac_try='test -s conftest$ac_exeext'
9341 { (eval echo "$as_me:9341: \"$ac_try\"") >&5
9342 (eval $ac_try) 2>&5
9343 ac_status=$?
9344 echo "$as_me:9344: \$? = $ac_status" >&5
9345 (exit $ac_status); }; }; then
9346 ac_cv_lib_dgc_dg_sys_info=yes
9347 else
9348 echo "$as_me: failed program was:" >&5
9349 cat conftest.$ac_ext >&5
9350 ac_cv_lib_dgc_dg_sys_info=no
9351 fi
9352 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9353 LIBS=$ac_check_lib_save_LIBS
9354 fi
9355 echo "$as_me:9355: result: $ac_cv_lib_dgc_dg_sys_info" >&5
9356 echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6
9357 if test $ac_cv_lib_dgc_dg_sys_info = yes; then
9358 cat >>confdefs.h <<EOF
9359 #define HAVE_LIBDGC 1
9360 EOF
9361
9362 LIBS="-ldgc $LIBS"
9363
9364 fi
9365
9366 fi
9367
9368 echo "$as_me:9368: checking for locale.h" >&5
9369 echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
9370 if test "${ac_cv_header_locale_h+set}" = set; then
9371 echo $ECHO_N "(cached) $ECHO_C" >&6
9372 else
9373 cat >conftest.$ac_ext <<_ACEOF
9374 #line 9374 "configure"
9375 #include "confdefs.h"
9376 #include <locale.h>
9377 _ACEOF
9378 if { (eval echo "$as_me:9378: \"$ac_cpp conftest.$ac_ext\"") >&5
9379 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9380 ac_status=$?
9381 egrep -v '^ *\+' conftest.er1 >conftest.err
9382 rm -f conftest.er1
9383 cat conftest.err >&5
9384 echo "$as_me:9384: \$? = $ac_status" >&5
9385 (exit $ac_status); } >/dev/null; then
9386 if test -s conftest.err; then
9387 ac_cpp_err=$ac_c_preproc_warn_flag
9388 else
9389 ac_cpp_err=
9390 fi
9391 else
9392 ac_cpp_err=yes
9393 fi
9394 if test -z "$ac_cpp_err"; then
9395 ac_cv_header_locale_h=yes
9396 else
9397 echo "$as_me: failed program was:" >&5
9398 cat conftest.$ac_ext >&5
9399 ac_cv_header_locale_h=no
9400 fi
9401 rm -f conftest.err conftest.$ac_ext
9402 fi
9403 echo "$as_me:9403: result: $ac_cv_header_locale_h" >&5
9404 echo "${ECHO_T}$ac_cv_header_locale_h" >&6
9405
9406 for ac_func in setlocale
9407 do
9408 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9409 echo "$as_me:9409: checking for $ac_func" >&5
9410 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9411 if eval "test \"\${$as_ac_var+set}\" = set"; then
9412 echo $ECHO_N "(cached) $ECHO_C" >&6
9413 else
9414 cat >conftest.$ac_ext <<_ACEOF
9415 #line 9415 "configure"
9416 #include "confdefs.h"
9417 /* System header to define __stub macros and hopefully few prototypes,
9418 which can conflict with char $ac_func (); below. */
9419 #include <assert.h>
9420 /* Override any gcc2 internal prototype to avoid an error. */
9421 #ifdef __cplusplus
9422 extern "C"
9423 #endif
9424 /* We use char because int might match the return type of a gcc2
9425 builtin and then its argument prototype would still apply. */
9426 char $ac_func ();
9427 char (*f) ();
9428
9429 int
9430 main ()
9431 {
9432 /* The GNU C library defines this for functions which it implements
9433 to always fail with ENOSYS. Some functions are actually named
9434 something starting with __ and the normal name is an alias. */
9435 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9436 choke me
9437 #else
9438 f = $ac_func;
9439 #endif
9440
9441 ;
9442 return 0;
9443 }
9444 _ACEOF
9445 rm -f conftest.$ac_objext conftest$ac_exeext
9446 if { (eval echo "$as_me:9446: \"$ac_link\"") >&5
9447 (eval $ac_link) 2>&5
9448 ac_status=$?
9449 echo "$as_me:9449: \$? = $ac_status" >&5
9450 (exit $ac_status); } &&
9451 { ac_try='test -s conftest$ac_exeext'
9452 { (eval echo "$as_me:9452: \"$ac_try\"") >&5
9453 (eval $ac_try) 2>&5
9454 ac_status=$?
9455 echo "$as_me:9455: \$? = $ac_status" >&5
9456 (exit $ac_status); }; }; then
9457 eval "$as_ac_var=yes"
9458 else
9459 echo "$as_me: failed program was:" >&5
9460 cat conftest.$ac_ext >&5
9461 eval "$as_ac_var=no"
9462 fi
9463 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9464 fi
9465 echo "$as_me:9465: result: `eval echo '${'$as_ac_var'}'`" >&5
9466 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9467 if test `eval echo '${'$as_ac_var'}'` = yes; then
9468 cat >>confdefs.h <<EOF
9469 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9470 EOF
9471
9472 fi
9473 done
9474
9475 # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
9476 # uses stabs), but it is still SVR4. We cannot check for <elf.h> because
9477 # Irix 4.0.5F has the header but not the library.
9478 if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
9479 ac_have_func=yes
9480
9481 cat >>confdefs.h <<\EOF
9482 #define SVR4 1
9483 EOF
9484
9485 fi
9486
9487 if test $ac_have_func = no; then
9488 echo "$as_me:9488: checking for inq_stats/cpustats.h" >&5
9489 echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
9490 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
9491 echo $ECHO_N "(cached) $ECHO_C" >&6
9492 else
9493 cat >conftest.$ac_ext <<_ACEOF
9494 #line 9494 "configure"
9495 #include "confdefs.h"
9496 #include <inq_stats/cpustats.h>
9497 _ACEOF
9498 if { (eval echo "$as_me:9498: \"$ac_cpp conftest.$ac_ext\"") >&5
9499 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9500 ac_status=$?
9501 egrep -v '^ *\+' conftest.er1 >conftest.err
9502 rm -f conftest.er1
9503 cat conftest.err >&5
9504 echo "$as_me:9504: \$? = $ac_status" >&5
9505 (exit $ac_status); } >/dev/null; then
9506 if test -s conftest.err; then
9507 ac_cpp_err=$ac_c_preproc_warn_flag
9508 else
9509 ac_cpp_err=
9510 fi
9511 else
9512 ac_cpp_err=yes
9513 fi
9514 if test -z "$ac_cpp_err"; then
9515 ac_cv_header_inq_stats_cpustats_h=yes
9516 else
9517 echo "$as_me: failed program was:" >&5
9518 cat conftest.$ac_ext >&5
9519 ac_cv_header_inq_stats_cpustats_h=no
9520 fi
9521 rm -f conftest.err conftest.$ac_ext
9522 fi
9523 echo "$as_me:9523: result: $ac_cv_header_inq_stats_cpustats_h" >&5
9524 echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
9525 if test $ac_cv_header_inq_stats_cpustats_h = yes; then
9526 ac_have_func=yes
9527
9528 cat >>confdefs.h <<\EOF
9529 #define UMAX 1
9530 EOF
9531
9532 cat >>confdefs.h <<\EOF
9533 #define UMAX4_3 1
9534 EOF
9535
9536 fi
9537
9538 fi
9539
9540 if test $ac_have_func = no; then
9541 echo "$as_me:9541: checking for sys/cpustats.h" >&5
9542 echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
9543 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
9544 echo $ECHO_N "(cached) $ECHO_C" >&6
9545 else
9546 cat >conftest.$ac_ext <<_ACEOF
9547 #line 9547 "configure"
9548 #include "confdefs.h"
9549 #include <sys/cpustats.h>
9550 _ACEOF
9551 if { (eval echo "$as_me:9551: \"$ac_cpp conftest.$ac_ext\"") >&5
9552 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9553 ac_status=$?
9554 egrep -v '^ *\+' conftest.er1 >conftest.err
9555 rm -f conftest.er1
9556 cat conftest.err >&5
9557 echo "$as_me:9557: \$? = $ac_status" >&5
9558 (exit $ac_status); } >/dev/null; then
9559 if test -s conftest.err; then
9560 ac_cpp_err=$ac_c_preproc_warn_flag
9561 else
9562 ac_cpp_err=
9563 fi
9564 else
9565 ac_cpp_err=yes
9566 fi
9567 if test -z "$ac_cpp_err"; then
9568 ac_cv_header_sys_cpustats_h=yes
9569 else
9570 echo "$as_me: failed program was:" >&5
9571 cat conftest.$ac_ext >&5
9572 ac_cv_header_sys_cpustats_h=no
9573 fi
9574 rm -f conftest.err conftest.$ac_ext
9575 fi
9576 echo "$as_me:9576: result: $ac_cv_header_sys_cpustats_h" >&5
9577 echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
9578 if test $ac_cv_header_sys_cpustats_h = yes; then
9579 ac_have_func=yes; cat >>confdefs.h <<\EOF
9580 #define UMAX 1
9581 EOF
9582
9583 fi
9584
9585 fi
9586
9587 if test $ac_have_func = no; then
9588
9589 for ac_header in mach/mach.h
9590 do
9591 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9592 echo "$as_me:9592: checking for $ac_header" >&5
9593 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9594 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9595 echo $ECHO_N "(cached) $ECHO_C" >&6
9596 else
9597 cat >conftest.$ac_ext <<_ACEOF
9598 #line 9598 "configure"
9599 #include "confdefs.h"
9600 #include <$ac_header>
9601 _ACEOF
9602 if { (eval echo "$as_me:9602: \"$ac_cpp conftest.$ac_ext\"") >&5
9603 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9604 ac_status=$?
9605 egrep -v '^ *\+' conftest.er1 >conftest.err
9606 rm -f conftest.er1
9607 cat conftest.err >&5
9608 echo "$as_me:9608: \$? = $ac_status" >&5
9609 (exit $ac_status); } >/dev/null; then
9610 if test -s conftest.err; then
9611 ac_cpp_err=$ac_c_preproc_warn_flag
9612 else
9613 ac_cpp_err=
9614 fi
9615 else
9616 ac_cpp_err=yes
9617 fi
9618 if test -z "$ac_cpp_err"; then
9619 eval "$as_ac_Header=yes"
9620 else
9621 echo "$as_me: failed program was:" >&5
9622 cat conftest.$ac_ext >&5
9623 eval "$as_ac_Header=no"
9624 fi
9625 rm -f conftest.err conftest.$ac_ext
9626 fi
9627 echo "$as_me:9627: result: `eval echo '${'$as_ac_Header'}'`" >&5
9628 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9629 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9630 cat >>confdefs.h <<EOF
9631 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9632 EOF
9633
9634 fi
9635 done
9636
9637 fi
9638
9639 for ac_header in nlist.h
9640 do
9641 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9642 echo "$as_me:9642: checking for $ac_header" >&5
9643 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9644 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9645 echo $ECHO_N "(cached) $ECHO_C" >&6
9646 else
9647 cat >conftest.$ac_ext <<_ACEOF
9648 #line 9648 "configure"
9649 #include "confdefs.h"
9650 #include <$ac_header>
9651 _ACEOF
9652 if { (eval echo "$as_me:9652: \"$ac_cpp conftest.$ac_ext\"") >&5
9653 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9654 ac_status=$?
9655 egrep -v '^ *\+' conftest.er1 >conftest.err
9656 rm -f conftest.er1
9657 cat conftest.err >&5
9658 echo "$as_me:9658: \$? = $ac_status" >&5
9659 (exit $ac_status); } >/dev/null; then
9660 if test -s conftest.err; then
9661 ac_cpp_err=$ac_c_preproc_warn_flag
9662 else
9663 ac_cpp_err=
9664 fi
9665 else
9666 ac_cpp_err=yes
9667 fi
9668 if test -z "$ac_cpp_err"; then
9669 eval "$as_ac_Header=yes"
9670 else
9671 echo "$as_me: failed program was:" >&5
9672 cat conftest.$ac_ext >&5
9673 eval "$as_ac_Header=no"
9674 fi
9675 rm -f conftest.err conftest.$ac_ext
9676 fi
9677 echo "$as_me:9677: result: `eval echo '${'$as_ac_Header'}'`" >&5
9678 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9679 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9680 cat >>confdefs.h <<EOF
9681 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9682 EOF
9683 echo "$as_me:9683: checking for struct nlist.n_un.n_name" >&5
9684 echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6
9685 if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
9686 echo $ECHO_N "(cached) $ECHO_C" >&6
9687 else
9688 cat >conftest.$ac_ext <<_ACEOF
9689 #line 9689 "configure"
9690 #include "confdefs.h"
9691 #include <nlist.h>
9692
9693 int
9694 main ()
9695 {
9696 static struct nlist ac_aggr;
9697 if (ac_aggr.n_un.n_name)
9698 return 0;
9699 ;
9700 return 0;
9701 }
9702 _ACEOF
9703 rm -f conftest.$ac_objext
9704 if { (eval echo "$as_me:9704: \"$ac_compile\"") >&5
9705 (eval $ac_compile) 2>&5
9706 ac_status=$?
9707 echo "$as_me:9707: \$? = $ac_status" >&5
9708 (exit $ac_status); } &&
9709 { ac_try='test -s conftest.$ac_objext'
9710 { (eval echo "$as_me:9710: \"$ac_try\"") >&5
9711 (eval $ac_try) 2>&5
9712 ac_status=$?
9713 echo "$as_me:9713: \$? = $ac_status" >&5
9714 (exit $ac_status); }; }; then
9715 ac_cv_member_struct_nlist_n_un_n_name=yes
9716 else
9717 echo "$as_me: failed program was:" >&5
9718 cat conftest.$ac_ext >&5
9719 ac_cv_member_struct_nlist_n_un_n_name=no
9720 fi
9721 rm -f conftest.$ac_objext conftest.$ac_ext
9722 fi
9723 echo "$as_me:9723: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
9724 echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6
9725 if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
9726
9727 cat >>confdefs.h <<EOF
9728 #define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
9729 EOF
9730
9731 cat >>confdefs.h <<\EOF
9732 #define NLIST_NAME_UNION 1
9733 EOF
9734
9735 fi
9736
9737 fi
9738 done
9739
9740 fi
9741 done
9742
9743 # Some definitions of getloadavg require that the program be installed setgid.
9744 echo "$as_me:9744: checking whether getloadavg requires setgid" >&5
9745 echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6
9746 if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
9747 echo $ECHO_N "(cached) $ECHO_C" >&6
9748 else
9749 cat >conftest.$ac_ext <<_ACEOF
9750 #line 9750 "configure"
9751 #include "confdefs.h"
9752 #include "$srcdir/getloadavg.c"
9753 #ifdef LDAV_PRIVILEGED
9754 Yowza Am I SETGID yet
9755 #endif
9756 _ACEOF
9757 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9758 egrep "Yowza Am I SETGID yet" >/dev/null 2>&1; then
9759 ac_cv_func_getloadavg_setgid=yes
9760 else
9761 ac_cv_func_getloadavg_setgid=no
9762 fi
9763 rm -f conftest*
9764
9765 fi
9766 echo "$as_me:9766: result: $ac_cv_func_getloadavg_setgid" >&5
9767 echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6
9768 if test $ac_cv_func_getloadavg_setgid = yes; then
9769 NEED_SETGID=true
9770
9771 cat >>confdefs.h <<\EOF
9772 #define GETLOADAVG_PRIVILEGED 1
9773 EOF
9774
9775 else
9776 NEED_SETGID=false
9777 fi
9778
9779 if test $ac_cv_func_getloadavg_setgid = yes; then
9780 echo "$as_me:9780: checking group of /dev/kmem" >&5
9781 echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6
9782 if test "${ac_cv_group_kmem+set}" = set; then
9783 echo $ECHO_N "(cached) $ECHO_C" >&6
9784 else
9785 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
9786 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
9787 # If we got an error (system does not support symlinks), try without -L.
9788 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
9789 ac_cv_group_kmem=`echo $ac_ls_output \
9790 | sed -ne 's/[ ][ ]*/ /g;
9791 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
9792 / /s/.* //;p;'`
9793
9794 fi
9795 echo "$as_me:9795: result: $ac_cv_group_kmem" >&5
9796 echo "${ECHO_T}$ac_cv_group_kmem" >&6
9797 KMEM_GROUP=$ac_cv_group_kmem
9798 fi
9799 if test "x$ac_save_LIBS" = x; then
9800 GETLOADAVG_LIBS=$LIBS
9801 else
9802 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
9803 fi
9804 LIBS=$ac_save_LIBS
9805
9806 echo "$as_me:9806: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9807 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9808 if test "${ac_cv_sys_largefile_source+set}" = set; then
9809 echo $ECHO_N "(cached) $ECHO_C" >&6
9810 else
9811 while :; do
9812 ac_cv_sys_largefile_source=no
9813 cat >conftest.$ac_ext <<_ACEOF
9814 #line 9814 "configure"
9815 #include "confdefs.h"
9816 #include <stdio.h>
9817 int
9818 main ()
9819 {
9820 return !fseeko;
9821 ;
9822 return 0;
9823 }
9824 _ACEOF
9825 rm -f conftest.$ac_objext
9826 if { (eval echo "$as_me:9826: \"$ac_compile\"") >&5
9827 (eval $ac_compile) 2>&5
9828 ac_status=$?
9829 echo "$as_me:9829: \$? = $ac_status" >&5
9830 (exit $ac_status); } &&
9831 { ac_try='test -s conftest.$ac_objext'
9832 { (eval echo "$as_me:9832: \"$ac_try\"") >&5
9833 (eval $ac_try) 2>&5
9834 ac_status=$?
9835 echo "$as_me:9835: \$? = $ac_status" >&5
9836 (exit $ac_status); }; }; then
9837 break
9838 else
9839 echo "$as_me: failed program was:" >&5
9840 cat conftest.$ac_ext >&5
9841 fi
9842 rm -f conftest.$ac_objext conftest.$ac_ext
9843 cat >conftest.$ac_ext <<_ACEOF
9844 #line 9844 "configure"
9845 #include "confdefs.h"
9846 #define _LARGEFILE_SOURCE 1
9847 #include <stdio.h>
9848 int
9849 main ()
9850 {
9851 return !fseeko;
9852 ;
9853 return 0;
9854 }
9855 _ACEOF
9856 rm -f conftest.$ac_objext
9857 if { (eval echo "$as_me:9857: \"$ac_compile\"") >&5
9858 (eval $ac_compile) 2>&5
9859 ac_status=$?
9860 echo "$as_me:9860: \$? = $ac_status" >&5
9861 (exit $ac_status); } &&
9862 { ac_try='test -s conftest.$ac_objext'
9863 { (eval echo "$as_me:9863: \"$ac_try\"") >&5
9864 (eval $ac_try) 2>&5
9865 ac_status=$?
9866 echo "$as_me:9866: \$? = $ac_status" >&5
9867 (exit $ac_status); }; }; then
9868 ac_cv_sys_largefile_source=1; break
9869 else
9870 echo "$as_me: failed program was:" >&5
9871 cat conftest.$ac_ext >&5
9872 fi
9873 rm -f conftest.$ac_objext conftest.$ac_ext
9874 break
9875 done
9876 fi
9877 echo "$as_me:9877: result: $ac_cv_sys_largefile_source" >&5
9878 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9879 if test "$ac_cv_sys_largefile_source" != no; then
9880
9881 cat >>confdefs.h <<EOF
9882 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9883 EOF
9884
9885 fi
9886 rm -f conftest*
9887
9888 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9889 # in glibc 2.1.3, but that breaks too many other things.
9890 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9891 echo "$as_me:9891: checking for fseeko" >&5
9892 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9893 if test "${ac_cv_func_fseeko+set}" = set; then
9894 echo $ECHO_N "(cached) $ECHO_C" >&6
9895 else
9896 cat >conftest.$ac_ext <<_ACEOF
9897 #line 9897 "configure"
9898 #include "confdefs.h"
9899 #include <stdio.h>
9900 int
9901 main ()
9902 {
9903 return fseeko && fseeko (stdin, 0, 0);
9904 ;
9905 return 0;
9906 }
9907 _ACEOF
9908 rm -f conftest.$ac_objext conftest$ac_exeext
9909 if { (eval echo "$as_me:9909: \"$ac_link\"") >&5
9910 (eval $ac_link) 2>&5
9911 ac_status=$?
9912 echo "$as_me:9912: \$? = $ac_status" >&5
9913 (exit $ac_status); } &&
9914 { ac_try='test -s conftest$ac_exeext'
9915 { (eval echo "$as_me:9915: \"$ac_try\"") >&5
9916 (eval $ac_try) 2>&5
9917 ac_status=$?
9918 echo "$as_me:9918: \$? = $ac_status" >&5
9919 (exit $ac_status); }; }; then
9920 ac_cv_func_fseeko=yes
9921 else
9922 echo "$as_me: failed program was:" >&5
9923 cat conftest.$ac_ext >&5
9924 ac_cv_func_fseeko=no
9925 fi
9926 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9927 fi
9928 echo "$as_me:9928: result: $ac_cv_func_fseeko" >&5
9929 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9930 if test $ac_cv_func_fseeko = yes; then
9931
9932 cat >>confdefs.h <<\EOF
9933 #define HAVE_FSEEKO 1
9934 EOF
9935
9936 fi
9937
9938 # UNIX98 PTYs.
9939
9940 for ac_func in grantpt
9941 do
9942 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9943 echo "$as_me:9943: checking for $ac_func" >&5
9944 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9945 if eval "test \"\${$as_ac_var+set}\" = set"; then
9946 echo $ECHO_N "(cached) $ECHO_C" >&6
9947 else
9948 cat >conftest.$ac_ext <<_ACEOF
9949 #line 9949 "configure"
9950 #include "confdefs.h"
9951 /* System header to define __stub macros and hopefully few prototypes,
9952 which can conflict with char $ac_func (); below. */
9953 #include <assert.h>
9954 /* Override any gcc2 internal prototype to avoid an error. */
9955 #ifdef __cplusplus
9956 extern "C"
9957 #endif
9958 /* We use char because int might match the return type of a gcc2
9959 builtin and then its argument prototype would still apply. */
9960 char $ac_func ();
9961 char (*f) ();
9962
9963 int
9964 main ()
9965 {
9966 /* The GNU C library defines this for functions which it implements
9967 to always fail with ENOSYS. Some functions are actually named
9968 something starting with __ and the normal name is an alias. */
9969 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9970 choke me
9971 #else
9972 f = $ac_func;
9973 #endif
9974
9975 ;
9976 return 0;
9977 }
9978 _ACEOF
9979 rm -f conftest.$ac_objext conftest$ac_exeext
9980 if { (eval echo "$as_me:9980: \"$ac_link\"") >&5
9981 (eval $ac_link) 2>&5
9982 ac_status=$?
9983 echo "$as_me:9983: \$? = $ac_status" >&5
9984 (exit $ac_status); } &&
9985 { ac_try='test -s conftest$ac_exeext'
9986 { (eval echo "$as_me:9986: \"$ac_try\"") >&5
9987 (eval $ac_try) 2>&5
9988 ac_status=$?
9989 echo "$as_me:9989: \$? = $ac_status" >&5
9990 (exit $ac_status); }; }; then
9991 eval "$as_ac_var=yes"
9992 else
9993 echo "$as_me: failed program was:" >&5
9994 cat conftest.$ac_ext >&5
9995 eval "$as_ac_var=no"
9996 fi
9997 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9998 fi
9999 echo "$as_me:9999: result: `eval echo '${'$as_ac_var'}'`" >&5
10000 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10001 if test `eval echo '${'$as_ac_var'}'` = yes; then
10002 cat >>confdefs.h <<EOF
10003 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10004 EOF
10005
10006 fi
10007 done
10008
10009 # PTY-related GNU extensions.
10010
10011 for ac_func in getpt
10012 do
10013 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10014 echo "$as_me:10014: checking for $ac_func" >&5
10015 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10016 if eval "test \"\${$as_ac_var+set}\" = set"; then
10017 echo $ECHO_N "(cached) $ECHO_C" >&6
10018 else
10019 cat >conftest.$ac_ext <<_ACEOF
10020 #line 10020 "configure"
10021 #include "confdefs.h"
10022 /* System header to define __stub macros and hopefully few prototypes,
10023 which can conflict with char $ac_func (); below. */
10024 #include <assert.h>
10025 /* Override any gcc2 internal prototype to avoid an error. */
10026 #ifdef __cplusplus
10027 extern "C"
10028 #endif
10029 /* We use char because int might match the return type of a gcc2
10030 builtin and then its argument prototype would still apply. */
10031 char $ac_func ();
10032 char (*f) ();
10033
10034 int
10035 main ()
10036 {
10037 /* The GNU C library defines this for functions which it implements
10038 to always fail with ENOSYS. Some functions are actually named
10039 something starting with __ and the normal name is an alias. */
10040 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10041 choke me
10042 #else
10043 f = $ac_func;
10044 #endif
10045
10046 ;
10047 return 0;
10048 }
10049 _ACEOF
10050 rm -f conftest.$ac_objext conftest$ac_exeext
10051 if { (eval echo "$as_me:10051: \"$ac_link\"") >&5
10052 (eval $ac_link) 2>&5
10053 ac_status=$?
10054 echo "$as_me:10054: \$? = $ac_status" >&5
10055 (exit $ac_status); } &&
10056 { ac_try='test -s conftest$ac_exeext'
10057 { (eval echo "$as_me:10057: \"$ac_try\"") >&5
10058 (eval $ac_try) 2>&5
10059 ac_status=$?
10060 echo "$as_me:10060: \$? = $ac_status" >&5
10061 (exit $ac_status); }; }; then
10062 eval "$as_ac_var=yes"
10063 else
10064 echo "$as_me: failed program was:" >&5
10065 cat conftest.$ac_ext >&5
10066 eval "$as_ac_var=no"
10067 fi
10068 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10069 fi
10070 echo "$as_me:10070: result: `eval echo '${'$as_ac_var'}'`" >&5
10071 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10072 if test `eval echo '${'$as_ac_var'}'` = yes; then
10073 cat >>confdefs.h <<EOF
10074 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10075 EOF
10076
10077 fi
10078 done
10079
10080 # Check this now, so that we will NOT find the above functions in ncurses.
10081 # That is because we have not set up to link ncurses in lib-src.
10082 # It's better to believe a function is not available
10083 # than to expect to find it in ncurses.
10084
10085 echo "$as_me:10085: checking for tparm in -lncurses" >&5
10086 echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6
10087 if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
10088 echo $ECHO_N "(cached) $ECHO_C" >&6
10089 else
10090 ac_check_lib_save_LIBS=$LIBS
10091 LIBS="-lncurses $LIBS"
10092 cat >conftest.$ac_ext <<_ACEOF
10093 #line 10093 "configure"
10094 #include "confdefs.h"
10095
10096 /* Override any gcc2 internal prototype to avoid an error. */
10097 #ifdef __cplusplus
10098 extern "C"
10099 #endif
10100 /* We use char because int might match the return type of a gcc2
10101 builtin and then its argument prototype would still apply. */
10102 char tparm ();
10103 int
10104 main ()
10105 {
10106 tparm ();
10107 ;
10108 return 0;
10109 }
10110 _ACEOF
10111 rm -f conftest.$ac_objext conftest$ac_exeext
10112 if { (eval echo "$as_me:10112: \"$ac_link\"") >&5
10113 (eval $ac_link) 2>&5
10114 ac_status=$?
10115 echo "$as_me:10115: \$? = $ac_status" >&5
10116 (exit $ac_status); } &&
10117 { ac_try='test -s conftest$ac_exeext'
10118 { (eval echo "$as_me:10118: \"$ac_try\"") >&5
10119 (eval $ac_try) 2>&5
10120 ac_status=$?
10121 echo "$as_me:10121: \$? = $ac_status" >&5
10122 (exit $ac_status); }; }; then
10123 ac_cv_lib_ncurses_tparm=yes
10124 else
10125 echo "$as_me: failed program was:" >&5
10126 cat conftest.$ac_ext >&5
10127 ac_cv_lib_ncurses_tparm=no
10128 fi
10129 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10130 LIBS=$ac_check_lib_save_LIBS
10131 fi
10132 echo "$as_me:10132: result: $ac_cv_lib_ncurses_tparm" >&5
10133 echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6
10134 if test $ac_cv_lib_ncurses_tparm = yes; then
10135 cat >>confdefs.h <<EOF
10136 #define HAVE_LIBNCURSES 1
10137 EOF
10138
10139 LIBS="-lncurses $LIBS"
10140
10141 fi
10142
10143 # Do we need the Hesiod library to provide the support routines?
10144 if test "$with_hesiod" = yes ; then
10145 # Don't set $LIBS here -- see comments above.
10146 resolv=no
10147 echo "$as_me:10147: checking for res_send" >&5
10148 echo $ECHO_N "checking for res_send... $ECHO_C" >&6
10149 if test "${ac_cv_func_res_send+set}" = set; then
10150 echo $ECHO_N "(cached) $ECHO_C" >&6
10151 else
10152 cat >conftest.$ac_ext <<_ACEOF
10153 #line 10153 "configure"
10154 #include "confdefs.h"
10155 /* System header to define __stub macros and hopefully few prototypes,
10156 which can conflict with char res_send (); below. */
10157 #include <assert.h>
10158 /* Override any gcc2 internal prototype to avoid an error. */
10159 #ifdef __cplusplus
10160 extern "C"
10161 #endif
10162 /* We use char because int might match the return type of a gcc2
10163 builtin and then its argument prototype would still apply. */
10164 char res_send ();
10165 char (*f) ();
10166
10167 int
10168 main ()
10169 {
10170 /* The GNU C library defines this for functions which it implements
10171 to always fail with ENOSYS. Some functions are actually named
10172 something starting with __ and the normal name is an alias. */
10173 #if defined (__stub_res_send) || defined (__stub___res_send)
10174 choke me
10175 #else
10176 f = res_send;
10177 #endif
10178
10179 ;
10180 return 0;
10181 }
10182 _ACEOF
10183 rm -f conftest.$ac_objext conftest$ac_exeext
10184 if { (eval echo "$as_me:10184: \"$ac_link\"") >&5
10185 (eval $ac_link) 2>&5
10186 ac_status=$?
10187 echo "$as_me:10187: \$? = $ac_status" >&5
10188 (exit $ac_status); } &&
10189 { ac_try='test -s conftest$ac_exeext'
10190 { (eval echo "$as_me:10190: \"$ac_try\"") >&5
10191 (eval $ac_try) 2>&5
10192 ac_status=$?
10193 echo "$as_me:10193: \$? = $ac_status" >&5
10194 (exit $ac_status); }; }; then
10195 ac_cv_func_res_send=yes
10196 else
10197 echo "$as_me: failed program was:" >&5
10198 cat conftest.$ac_ext >&5
10199 ac_cv_func_res_send=no
10200 fi
10201 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10202 fi
10203 echo "$as_me:10203: result: $ac_cv_func_res_send" >&5
10204 echo "${ECHO_T}$ac_cv_func_res_send" >&6
10205 if test $ac_cv_func_res_send = yes; then
10206 :
10207 else
10208 echo "$as_me:10208: checking for __res_send" >&5
10209 echo $ECHO_N "checking for __res_send... $ECHO_C" >&6
10210 if test "${ac_cv_func___res_send+set}" = set; then
10211 echo $ECHO_N "(cached) $ECHO_C" >&6
10212 else
10213 cat >conftest.$ac_ext <<_ACEOF
10214 #line 10214 "configure"
10215 #include "confdefs.h"
10216 /* System header to define __stub macros and hopefully few prototypes,
10217 which can conflict with char __res_send (); below. */
10218 #include <assert.h>
10219 /* Override any gcc2 internal prototype to avoid an error. */
10220 #ifdef __cplusplus
10221 extern "C"
10222 #endif
10223 /* We use char because int might match the return type of a gcc2
10224 builtin and then its argument prototype would still apply. */
10225 char __res_send ();
10226 char (*f) ();
10227
10228 int
10229 main ()
10230 {
10231 /* The GNU C library defines this for functions which it implements
10232 to always fail with ENOSYS. Some functions are actually named
10233 something starting with __ and the normal name is an alias. */
10234 #if defined (__stub___res_send) || defined (__stub_____res_send)
10235 choke me
10236 #else
10237 f = __res_send;
10238 #endif
10239
10240 ;
10241 return 0;
10242 }
10243 _ACEOF
10244 rm -f conftest.$ac_objext conftest$ac_exeext
10245 if { (eval echo "$as_me:10245: \"$ac_link\"") >&5
10246 (eval $ac_link) 2>&5
10247 ac_status=$?
10248 echo "$as_me:10248: \$? = $ac_status" >&5
10249 (exit $ac_status); } &&
10250 { ac_try='test -s conftest$ac_exeext'
10251 { (eval echo "$as_me:10251: \"$ac_try\"") >&5
10252 (eval $ac_try) 2>&5
10253 ac_status=$?
10254 echo "$as_me:10254: \$? = $ac_status" >&5
10255 (exit $ac_status); }; }; then
10256 ac_cv_func___res_send=yes
10257 else
10258 echo "$as_me: failed program was:" >&5
10259 cat conftest.$ac_ext >&5
10260 ac_cv_func___res_send=no
10261 fi
10262 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10263 fi
10264 echo "$as_me:10264: result: $ac_cv_func___res_send" >&5
10265 echo "${ECHO_T}$ac_cv_func___res_send" >&6
10266 if test $ac_cv_func___res_send = yes; then
10267 :
10268 else
10269 echo "$as_me:10269: checking for res_send in -lresolv" >&5
10270 echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6
10271 if test "${ac_cv_lib_resolv_res_send+set}" = set; then
10272 echo $ECHO_N "(cached) $ECHO_C" >&6
10273 else
10274 ac_check_lib_save_LIBS=$LIBS
10275 LIBS="-lresolv $LIBS"
10276 cat >conftest.$ac_ext <<_ACEOF
10277 #line 10277 "configure"
10278 #include "confdefs.h"
10279
10280 /* Override any gcc2 internal prototype to avoid an error. */
10281 #ifdef __cplusplus
10282 extern "C"
10283 #endif
10284 /* We use char because int might match the return type of a gcc2
10285 builtin and then its argument prototype would still apply. */
10286 char res_send ();
10287 int
10288 main ()
10289 {
10290 res_send ();
10291 ;
10292 return 0;
10293 }
10294 _ACEOF
10295 rm -f conftest.$ac_objext conftest$ac_exeext
10296 if { (eval echo "$as_me:10296: \"$ac_link\"") >&5
10297 (eval $ac_link) 2>&5
10298 ac_status=$?
10299 echo "$as_me:10299: \$? = $ac_status" >&5
10300 (exit $ac_status); } &&
10301 { ac_try='test -s conftest$ac_exeext'
10302 { (eval echo "$as_me:10302: \"$ac_try\"") >&5
10303 (eval $ac_try) 2>&5
10304 ac_status=$?
10305 echo "$as_me:10305: \$? = $ac_status" >&5
10306 (exit $ac_status); }; }; then
10307 ac_cv_lib_resolv_res_send=yes
10308 else
10309 echo "$as_me: failed program was:" >&5
10310 cat conftest.$ac_ext >&5
10311 ac_cv_lib_resolv_res_send=no
10312 fi
10313 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10314 LIBS=$ac_check_lib_save_LIBS
10315 fi
10316 echo "$as_me:10316: result: $ac_cv_lib_resolv_res_send" >&5
10317 echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6
10318 if test $ac_cv_lib_resolv_res_send = yes; then
10319 resolv=yes
10320 else
10321 echo "$as_me:10321: checking for __res_send in -lresolv" >&5
10322 echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6
10323 if test "${ac_cv_lib_resolv___res_send+set}" = set; then
10324 echo $ECHO_N "(cached) $ECHO_C" >&6
10325 else
10326 ac_check_lib_save_LIBS=$LIBS
10327 LIBS="-lresolv $LIBS"
10328 cat >conftest.$ac_ext <<_ACEOF
10329 #line 10329 "configure"
10330 #include "confdefs.h"
10331
10332 /* Override any gcc2 internal prototype to avoid an error. */
10333 #ifdef __cplusplus
10334 extern "C"
10335 #endif
10336 /* We use char because int might match the return type of a gcc2
10337 builtin and then its argument prototype would still apply. */
10338 char __res_send ();
10339 int
10340 main ()
10341 {
10342 __res_send ();
10343 ;
10344 return 0;
10345 }
10346 _ACEOF
10347 rm -f conftest.$ac_objext conftest$ac_exeext
10348 if { (eval echo "$as_me:10348: \"$ac_link\"") >&5
10349 (eval $ac_link) 2>&5
10350 ac_status=$?
10351 echo "$as_me:10351: \$? = $ac_status" >&5
10352 (exit $ac_status); } &&
10353 { ac_try='test -s conftest$ac_exeext'
10354 { (eval echo "$as_me:10354: \"$ac_try\"") >&5
10355 (eval $ac_try) 2>&5
10356 ac_status=$?
10357 echo "$as_me:10357: \$? = $ac_status" >&5
10358 (exit $ac_status); }; }; then
10359 ac_cv_lib_resolv___res_send=yes
10360 else
10361 echo "$as_me: failed program was:" >&5
10362 cat conftest.$ac_ext >&5
10363 ac_cv_lib_resolv___res_send=no
10364 fi
10365 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10366 LIBS=$ac_check_lib_save_LIBS
10367 fi
10368 echo "$as_me:10368: result: $ac_cv_lib_resolv___res_send" >&5
10369 echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6
10370 if test $ac_cv_lib_resolv___res_send = yes; then
10371 resolv=yes
10372 fi
10373
10374 fi
10375
10376 fi
10377
10378 fi
10379
10380 if test "$resolv" = yes ; then
10381 RESOLVLIB=-lresolv
10382 cat >>confdefs.h <<\EOF
10383 #define HAVE_LIBRESOLV 1
10384 EOF
10385
10386 else
10387 RESOLVLIB=
10388 fi
10389 echo "$as_me:10389: checking for hes_getmailhost" >&5
10390 echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6
10391 if test "${ac_cv_func_hes_getmailhost+set}" = set; then
10392 echo $ECHO_N "(cached) $ECHO_C" >&6
10393 else
10394 cat >conftest.$ac_ext <<_ACEOF
10395 #line 10395 "configure"
10396 #include "confdefs.h"
10397 /* System header to define __stub macros and hopefully few prototypes,
10398 which can conflict with char hes_getmailhost (); below. */
10399 #include <assert.h>
10400 /* Override any gcc2 internal prototype to avoid an error. */
10401 #ifdef __cplusplus
10402 extern "C"
10403 #endif
10404 /* We use char because int might match the return type of a gcc2
10405 builtin and then its argument prototype would still apply. */
10406 char hes_getmailhost ();
10407 char (*f) ();
10408
10409 int
10410 main ()
10411 {
10412 /* The GNU C library defines this for functions which it implements
10413 to always fail with ENOSYS. Some functions are actually named
10414 something starting with __ and the normal name is an alias. */
10415 #if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
10416 choke me
10417 #else
10418 f = hes_getmailhost;
10419 #endif
10420
10421 ;
10422 return 0;
10423 }
10424 _ACEOF
10425 rm -f conftest.$ac_objext conftest$ac_exeext
10426 if { (eval echo "$as_me:10426: \"$ac_link\"") >&5
10427 (eval $ac_link) 2>&5
10428 ac_status=$?
10429 echo "$as_me:10429: \$? = $ac_status" >&5
10430 (exit $ac_status); } &&
10431 { ac_try='test -s conftest$ac_exeext'
10432 { (eval echo "$as_me:10432: \"$ac_try\"") >&5
10433 (eval $ac_try) 2>&5
10434 ac_status=$?
10435 echo "$as_me:10435: \$? = $ac_status" >&5
10436 (exit $ac_status); }; }; then
10437 ac_cv_func_hes_getmailhost=yes
10438 else
10439 echo "$as_me: failed program was:" >&5
10440 cat conftest.$ac_ext >&5
10441 ac_cv_func_hes_getmailhost=no
10442 fi
10443 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10444 fi
10445 echo "$as_me:10445: result: $ac_cv_func_hes_getmailhost" >&5
10446 echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6
10447 if test $ac_cv_func_hes_getmailhost = yes; then
10448 :
10449 else
10450 echo "$as_me:10450: checking for hes_getmailhost in -lhesiod" >&5
10451 echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6
10452 if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
10453 echo $ECHO_N "(cached) $ECHO_C" >&6
10454 else
10455 ac_check_lib_save_LIBS=$LIBS
10456 LIBS="-lhesiod $RESOLVLIB $LIBS"
10457 cat >conftest.$ac_ext <<_ACEOF
10458 #line 10458 "configure"
10459 #include "confdefs.h"
10460
10461 /* Override any gcc2 internal prototype to avoid an error. */
10462 #ifdef __cplusplus
10463 extern "C"
10464 #endif
10465 /* We use char because int might match the return type of a gcc2
10466 builtin and then its argument prototype would still apply. */
10467 char hes_getmailhost ();
10468 int
10469 main ()
10470 {
10471 hes_getmailhost ();
10472 ;
10473 return 0;
10474 }
10475 _ACEOF
10476 rm -f conftest.$ac_objext conftest$ac_exeext
10477 if { (eval echo "$as_me:10477: \"$ac_link\"") >&5
10478 (eval $ac_link) 2>&5
10479 ac_status=$?
10480 echo "$as_me:10480: \$? = $ac_status" >&5
10481 (exit $ac_status); } &&
10482 { ac_try='test -s conftest$ac_exeext'
10483 { (eval echo "$as_me:10483: \"$ac_try\"") >&5
10484 (eval $ac_try) 2>&5
10485 ac_status=$?
10486 echo "$as_me:10486: \$? = $ac_status" >&5
10487 (exit $ac_status); }; }; then
10488 ac_cv_lib_hesiod_hes_getmailhost=yes
10489 else
10490 echo "$as_me: failed program was:" >&5
10491 cat conftest.$ac_ext >&5
10492 ac_cv_lib_hesiod_hes_getmailhost=no
10493 fi
10494 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10495 LIBS=$ac_check_lib_save_LIBS
10496 fi
10497 echo "$as_me:10497: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
10498 echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6
10499 if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
10500 cat >>confdefs.h <<\EOF
10501 #define HAVE_LIBHESIOD 1
10502 EOF
10503
10504 else
10505 :
10506 fi
10507
10508 fi
10509
10510 fi
10511
10512 # These tell us which Kerberos-related libraries to use.
10513 if test "${with_kerberos+set}" = set; then
10514
10515 echo "$as_me:10515: checking for com_err in -lcom_err" >&5
10516 echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
10517 if test "${ac_cv_lib_com_err_com_err+set}" = set; then
10518 echo $ECHO_N "(cached) $ECHO_C" >&6
10519 else
10520 ac_check_lib_save_LIBS=$LIBS
10521 LIBS="-lcom_err $LIBS"
10522 cat >conftest.$ac_ext <<_ACEOF
10523 #line 10523 "configure"
10524 #include "confdefs.h"
10525
10526 /* Override any gcc2 internal prototype to avoid an error. */
10527 #ifdef __cplusplus
10528 extern "C"
10529 #endif
10530 /* We use char because int might match the return type of a gcc2
10531 builtin and then its argument prototype would still apply. */
10532 char com_err ();
10533 int
10534 main ()
10535 {
10536 com_err ();
10537 ;
10538 return 0;
10539 }
10540 _ACEOF
10541 rm -f conftest.$ac_objext conftest$ac_exeext
10542 if { (eval echo "$as_me:10542: \"$ac_link\"") >&5
10543 (eval $ac_link) 2>&5
10544 ac_status=$?
10545 echo "$as_me:10545: \$? = $ac_status" >&5
10546 (exit $ac_status); } &&
10547 { ac_try='test -s conftest$ac_exeext'
10548 { (eval echo "$as_me:10548: \"$ac_try\"") >&5
10549 (eval $ac_try) 2>&5
10550 ac_status=$?
10551 echo "$as_me:10551: \$? = $ac_status" >&5
10552 (exit $ac_status); }; }; then
10553 ac_cv_lib_com_err_com_err=yes
10554 else
10555 echo "$as_me: failed program was:" >&5
10556 cat conftest.$ac_ext >&5
10557 ac_cv_lib_com_err_com_err=no
10558 fi
10559 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10560 LIBS=$ac_check_lib_save_LIBS
10561 fi
10562 echo "$as_me:10562: result: $ac_cv_lib_com_err_com_err" >&5
10563 echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
10564 if test $ac_cv_lib_com_err_com_err = yes; then
10565 cat >>confdefs.h <<EOF
10566 #define HAVE_LIBCOM_ERR 1
10567 EOF
10568
10569 LIBS="-lcom_err $LIBS"
10570
10571 fi
10572
10573 echo "$as_me:10573: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
10574 echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6
10575 if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
10576 echo $ECHO_N "(cached) $ECHO_C" >&6
10577 else
10578 ac_check_lib_save_LIBS=$LIBS
10579 LIBS="-lk5crypto $LIBS"
10580 cat >conftest.$ac_ext <<_ACEOF
10581 #line 10581 "configure"
10582 #include "confdefs.h"
10583
10584 /* Override any gcc2 internal prototype to avoid an error. */
10585 #ifdef __cplusplus
10586 extern "C"
10587 #endif
10588 /* We use char because int might match the return type of a gcc2
10589 builtin and then its argument prototype would still apply. */
10590 char mit_des_cbc_encrypt ();
10591 int
10592 main ()
10593 {
10594 mit_des_cbc_encrypt ();
10595 ;
10596 return 0;
10597 }
10598 _ACEOF
10599 rm -f conftest.$ac_objext conftest$ac_exeext
10600 if { (eval echo "$as_me:10600: \"$ac_link\"") >&5
10601 (eval $ac_link) 2>&5
10602 ac_status=$?
10603 echo "$as_me:10603: \$? = $ac_status" >&5
10604 (exit $ac_status); } &&
10605 { ac_try='test -s conftest$ac_exeext'
10606 { (eval echo "$as_me:10606: \"$ac_try\"") >&5
10607 (eval $ac_try) 2>&5
10608 ac_status=$?
10609 echo "$as_me:10609: \$? = $ac_status" >&5
10610 (exit $ac_status); }; }; then
10611 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
10612 else
10613 echo "$as_me: failed program was:" >&5
10614 cat conftest.$ac_ext >&5
10615 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
10616 fi
10617 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10618 LIBS=$ac_check_lib_save_LIBS
10619 fi
10620 echo "$as_me:10620: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
10621 echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6
10622 if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
10623 cat >>confdefs.h <<EOF
10624 #define HAVE_LIBK5CRYPTO 1
10625 EOF
10626
10627 LIBS="-lk5crypto $LIBS"
10628
10629 fi
10630
10631 echo "$as_me:10631: checking for mit_des_cbc_encrypt in -lcrypto" >&5
10632 echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6
10633 if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
10634 echo $ECHO_N "(cached) $ECHO_C" >&6
10635 else
10636 ac_check_lib_save_LIBS=$LIBS
10637 LIBS="-lcrypto $LIBS"
10638 cat >conftest.$ac_ext <<_ACEOF
10639 #line 10639 "configure"
10640 #include "confdefs.h"
10641
10642 /* Override any gcc2 internal prototype to avoid an error. */
10643 #ifdef __cplusplus
10644 extern "C"
10645 #endif
10646 /* We use char because int might match the return type of a gcc2
10647 builtin and then its argument prototype would still apply. */
10648 char mit_des_cbc_encrypt ();
10649 int
10650 main ()
10651 {
10652 mit_des_cbc_encrypt ();
10653 ;
10654 return 0;
10655 }
10656 _ACEOF
10657 rm -f conftest.$ac_objext conftest$ac_exeext
10658 if { (eval echo "$as_me:10658: \"$ac_link\"") >&5
10659 (eval $ac_link) 2>&5
10660 ac_status=$?
10661 echo "$as_me:10661: \$? = $ac_status" >&5
10662 (exit $ac_status); } &&
10663 { ac_try='test -s conftest$ac_exeext'
10664 { (eval echo "$as_me:10664: \"$ac_try\"") >&5
10665 (eval $ac_try) 2>&5
10666 ac_status=$?
10667 echo "$as_me:10667: \$? = $ac_status" >&5
10668 (exit $ac_status); }; }; then
10669 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
10670 else
10671 echo "$as_me: failed program was:" >&5
10672 cat conftest.$ac_ext >&5
10673 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
10674 fi
10675 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10676 LIBS=$ac_check_lib_save_LIBS
10677 fi
10678 echo "$as_me:10678: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
10679 echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6
10680 if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
10681 cat >>confdefs.h <<EOF
10682 #define HAVE_LIBCRYPTO 1
10683 EOF
10684
10685 LIBS="-lcrypto $LIBS"
10686
10687 fi
10688
10689 echo "$as_me:10689: checking for krb5_init_context in -lkrb5" >&5
10690 echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6
10691 if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
10692 echo $ECHO_N "(cached) $ECHO_C" >&6
10693 else
10694 ac_check_lib_save_LIBS=$LIBS
10695 LIBS="-lkrb5 $LIBS"
10696 cat >conftest.$ac_ext <<_ACEOF
10697 #line 10697 "configure"
10698 #include "confdefs.h"
10699
10700 /* Override any gcc2 internal prototype to avoid an error. */
10701 #ifdef __cplusplus
10702 extern "C"
10703 #endif
10704 /* We use char because int might match the return type of a gcc2
10705 builtin and then its argument prototype would still apply. */
10706 char krb5_init_context ();
10707 int
10708 main ()
10709 {
10710 krb5_init_context ();
10711 ;
10712 return 0;
10713 }
10714 _ACEOF
10715 rm -f conftest.$ac_objext conftest$ac_exeext
10716 if { (eval echo "$as_me:10716: \"$ac_link\"") >&5
10717 (eval $ac_link) 2>&5
10718 ac_status=$?
10719 echo "$as_me:10719: \$? = $ac_status" >&5
10720 (exit $ac_status); } &&
10721 { ac_try='test -s conftest$ac_exeext'
10722 { (eval echo "$as_me:10722: \"$ac_try\"") >&5
10723 (eval $ac_try) 2>&5
10724 ac_status=$?
10725 echo "$as_me:10725: \$? = $ac_status" >&5
10726 (exit $ac_status); }; }; then
10727 ac_cv_lib_krb5_krb5_init_context=yes
10728 else
10729 echo "$as_me: failed program was:" >&5
10730 cat conftest.$ac_ext >&5
10731 ac_cv_lib_krb5_krb5_init_context=no
10732 fi
10733 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10734 LIBS=$ac_check_lib_save_LIBS
10735 fi
10736 echo "$as_me:10736: result: $ac_cv_lib_krb5_krb5_init_context" >&5
10737 echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6
10738 if test $ac_cv_lib_krb5_krb5_init_context = yes; then
10739 cat >>confdefs.h <<EOF
10740 #define HAVE_LIBKRB5 1
10741 EOF
10742
10743 LIBS="-lkrb5 $LIBS"
10744
10745 fi
10746
10747 if test "${with_kerberos5+set}" != set; then
10748
10749 echo "$as_me:10749: checking for des_cbc_encrypt in -ldes425" >&5
10750 echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
10751 if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
10752 echo $ECHO_N "(cached) $ECHO_C" >&6
10753 else
10754 ac_check_lib_save_LIBS=$LIBS
10755 LIBS="-ldes425 $LIBS"
10756 cat >conftest.$ac_ext <<_ACEOF
10757 #line 10757 "configure"
10758 #include "confdefs.h"
10759
10760 /* Override any gcc2 internal prototype to avoid an error. */
10761 #ifdef __cplusplus
10762 extern "C"
10763 #endif
10764 /* We use char because int might match the return type of a gcc2
10765 builtin and then its argument prototype would still apply. */
10766 char des_cbc_encrypt ();
10767 int
10768 main ()
10769 {
10770 des_cbc_encrypt ();
10771 ;
10772 return 0;
10773 }
10774 _ACEOF
10775 rm -f conftest.$ac_objext conftest$ac_exeext
10776 if { (eval echo "$as_me:10776: \"$ac_link\"") >&5
10777 (eval $ac_link) 2>&5
10778 ac_status=$?
10779 echo "$as_me:10779: \$? = $ac_status" >&5
10780 (exit $ac_status); } &&
10781 { ac_try='test -s conftest$ac_exeext'
10782 { (eval echo "$as_me:10782: \"$ac_try\"") >&5
10783 (eval $ac_try) 2>&5
10784 ac_status=$?
10785 echo "$as_me:10785: \$? = $ac_status" >&5
10786 (exit $ac_status); }; }; then
10787 ac_cv_lib_des425_des_cbc_encrypt=yes
10788 else
10789 echo "$as_me: failed program was:" >&5
10790 cat conftest.$ac_ext >&5
10791 ac_cv_lib_des425_des_cbc_encrypt=no
10792 fi
10793 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10794 LIBS=$ac_check_lib_save_LIBS
10795 fi
10796 echo "$as_me:10796: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
10797 echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
10798 if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
10799 cat >>confdefs.h <<EOF
10800 #define HAVE_LIBDES425 1
10801 EOF
10802
10803 LIBS="-ldes425 $LIBS"
10804
10805 else
10806
10807 echo "$as_me:10807: checking for des_cbc_encrypt in -ldes" >&5
10808 echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
10809 if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
10810 echo $ECHO_N "(cached) $ECHO_C" >&6
10811 else
10812 ac_check_lib_save_LIBS=$LIBS
10813 LIBS="-ldes $LIBS"
10814 cat >conftest.$ac_ext <<_ACEOF
10815 #line 10815 "configure"
10816 #include "confdefs.h"
10817
10818 /* Override any gcc2 internal prototype to avoid an error. */
10819 #ifdef __cplusplus
10820 extern "C"
10821 #endif
10822 /* We use char because int might match the return type of a gcc2
10823 builtin and then its argument prototype would still apply. */
10824 char des_cbc_encrypt ();
10825 int
10826 main ()
10827 {
10828 des_cbc_encrypt ();
10829 ;
10830 return 0;
10831 }
10832 _ACEOF
10833 rm -f conftest.$ac_objext conftest$ac_exeext
10834 if { (eval echo "$as_me:10834: \"$ac_link\"") >&5
10835 (eval $ac_link) 2>&5
10836 ac_status=$?
10837 echo "$as_me:10837: \$? = $ac_status" >&5
10838 (exit $ac_status); } &&
10839 { ac_try='test -s conftest$ac_exeext'
10840 { (eval echo "$as_me:10840: \"$ac_try\"") >&5
10841 (eval $ac_try) 2>&5
10842 ac_status=$?
10843 echo "$as_me:10843: \$? = $ac_status" >&5
10844 (exit $ac_status); }; }; then
10845 ac_cv_lib_des_des_cbc_encrypt=yes
10846 else
10847 echo "$as_me: failed program was:" >&5
10848 cat conftest.$ac_ext >&5
10849 ac_cv_lib_des_des_cbc_encrypt=no
10850 fi
10851 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10852 LIBS=$ac_check_lib_save_LIBS
10853 fi
10854 echo "$as_me:10854: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
10855 echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
10856 if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
10857 cat >>confdefs.h <<EOF
10858 #define HAVE_LIBDES 1
10859 EOF
10860
10861 LIBS="-ldes $LIBS"
10862
10863 fi
10864
10865 fi
10866
10867 echo "$as_me:10867: checking for krb_get_cred in -lkrb4" >&5
10868 echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6
10869 if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
10870 echo $ECHO_N "(cached) $ECHO_C" >&6
10871 else
10872 ac_check_lib_save_LIBS=$LIBS
10873 LIBS="-lkrb4 $LIBS"
10874 cat >conftest.$ac_ext <<_ACEOF
10875 #line 10875 "configure"
10876 #include "confdefs.h"
10877
10878 /* Override any gcc2 internal prototype to avoid an error. */
10879 #ifdef __cplusplus
10880 extern "C"
10881 #endif
10882 /* We use char because int might match the return type of a gcc2
10883 builtin and then its argument prototype would still apply. */
10884 char krb_get_cred ();
10885 int
10886 main ()
10887 {
10888 krb_get_cred ();
10889 ;
10890 return 0;
10891 }
10892 _ACEOF
10893 rm -f conftest.$ac_objext conftest$ac_exeext
10894 if { (eval echo "$as_me:10894: \"$ac_link\"") >&5
10895 (eval $ac_link) 2>&5
10896 ac_status=$?
10897 echo "$as_me:10897: \$? = $ac_status" >&5
10898 (exit $ac_status); } &&
10899 { ac_try='test -s conftest$ac_exeext'
10900 { (eval echo "$as_me:10900: \"$ac_try\"") >&5
10901 (eval $ac_try) 2>&5
10902 ac_status=$?
10903 echo "$as_me:10903: \$? = $ac_status" >&5
10904 (exit $ac_status); }; }; then
10905 ac_cv_lib_krb4_krb_get_cred=yes
10906 else
10907 echo "$as_me: failed program was:" >&5
10908 cat conftest.$ac_ext >&5
10909 ac_cv_lib_krb4_krb_get_cred=no
10910 fi
10911 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10912 LIBS=$ac_check_lib_save_LIBS
10913 fi
10914 echo "$as_me:10914: result: $ac_cv_lib_krb4_krb_get_cred" >&5
10915 echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6
10916 if test $ac_cv_lib_krb4_krb_get_cred = yes; then
10917 cat >>confdefs.h <<EOF
10918 #define HAVE_LIBKRB4 1
10919 EOF
10920
10921 LIBS="-lkrb4 $LIBS"
10922
10923 else
10924
10925 echo "$as_me:10925: checking for krb_get_cred in -lkrb" >&5
10926 echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6
10927 if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
10928 echo $ECHO_N "(cached) $ECHO_C" >&6
10929 else
10930 ac_check_lib_save_LIBS=$LIBS
10931 LIBS="-lkrb $LIBS"
10932 cat >conftest.$ac_ext <<_ACEOF
10933 #line 10933 "configure"
10934 #include "confdefs.h"
10935
10936 /* Override any gcc2 internal prototype to avoid an error. */
10937 #ifdef __cplusplus
10938 extern "C"
10939 #endif
10940 /* We use char because int might match the return type of a gcc2
10941 builtin and then its argument prototype would still apply. */
10942 char krb_get_cred ();
10943 int
10944 main ()
10945 {
10946 krb_get_cred ();
10947 ;
10948 return 0;
10949 }
10950 _ACEOF
10951 rm -f conftest.$ac_objext conftest$ac_exeext
10952 if { (eval echo "$as_me:10952: \"$ac_link\"") >&5
10953 (eval $ac_link) 2>&5
10954 ac_status=$?
10955 echo "$as_me:10955: \$? = $ac_status" >&5
10956 (exit $ac_status); } &&
10957 { ac_try='test -s conftest$ac_exeext'
10958 { (eval echo "$as_me:10958: \"$ac_try\"") >&5
10959 (eval $ac_try) 2>&5
10960 ac_status=$?
10961 echo "$as_me:10961: \$? = $ac_status" >&5
10962 (exit $ac_status); }; }; then
10963 ac_cv_lib_krb_krb_get_cred=yes
10964 else
10965 echo "$as_me: failed program was:" >&5
10966 cat conftest.$ac_ext >&5
10967 ac_cv_lib_krb_krb_get_cred=no
10968 fi
10969 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10970 LIBS=$ac_check_lib_save_LIBS
10971 fi
10972 echo "$as_me:10972: result: $ac_cv_lib_krb_krb_get_cred" >&5
10973 echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6
10974 if test $ac_cv_lib_krb_krb_get_cred = yes; then
10975 cat >>confdefs.h <<EOF
10976 #define HAVE_LIBKRB 1
10977 EOF
10978
10979 LIBS="-lkrb $LIBS"
10980
10981 fi
10982
10983 fi
10984
10985 fi
10986
10987 if test "${with_kerberos5+set}" = set; then
10988
10989 for ac_header in krb5.h
10990 do
10991 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10992 echo "$as_me:10992: checking for $ac_header" >&5
10993 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10994 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10995 echo $ECHO_N "(cached) $ECHO_C" >&6
10996 else
10997 cat >conftest.$ac_ext <<_ACEOF
10998 #line 10998 "configure"
10999 #include "confdefs.h"
11000 #include <$ac_header>
11001 _ACEOF
11002 if { (eval echo "$as_me:11002: \"$ac_cpp conftest.$ac_ext\"") >&5
11003 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11004 ac_status=$?
11005 egrep -v '^ *\+' conftest.er1 >conftest.err
11006 rm -f conftest.er1
11007 cat conftest.err >&5
11008 echo "$as_me:11008: \$? = $ac_status" >&5
11009 (exit $ac_status); } >/dev/null; then
11010 if test -s conftest.err; then
11011 ac_cpp_err=$ac_c_preproc_warn_flag
11012 else
11013 ac_cpp_err=
11014 fi
11015 else
11016 ac_cpp_err=yes
11017 fi
11018 if test -z "$ac_cpp_err"; then
11019 eval "$as_ac_Header=yes"
11020 else
11021 echo "$as_me: failed program was:" >&5
11022 cat conftest.$ac_ext >&5
11023 eval "$as_ac_Header=no"
11024 fi
11025 rm -f conftest.err conftest.$ac_ext
11026 fi
11027 echo "$as_me:11027: result: `eval echo '${'$as_ac_Header'}'`" >&5
11028 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11029 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11030 cat >>confdefs.h <<EOF
11031 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11032 EOF
11033
11034 fi
11035 done
11036
11037 else
11038
11039 for ac_header in des.h
11040 do
11041 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11042 echo "$as_me:11042: checking for $ac_header" >&5
11043 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11044 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11045 echo $ECHO_N "(cached) $ECHO_C" >&6
11046 else
11047 cat >conftest.$ac_ext <<_ACEOF
11048 #line 11048 "configure"
11049 #include "confdefs.h"
11050 #include <$ac_header>
11051 _ACEOF
11052 if { (eval echo "$as_me:11052: \"$ac_cpp conftest.$ac_ext\"") >&5
11053 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11054 ac_status=$?
11055 egrep -v '^ *\+' conftest.er1 >conftest.err
11056 rm -f conftest.er1
11057 cat conftest.err >&5
11058 echo "$as_me:11058: \$? = $ac_status" >&5
11059 (exit $ac_status); } >/dev/null; then
11060 if test -s conftest.err; then
11061 ac_cpp_err=$ac_c_preproc_warn_flag
11062 else
11063 ac_cpp_err=
11064 fi
11065 else
11066 ac_cpp_err=yes
11067 fi
11068 if test -z "$ac_cpp_err"; then
11069 eval "$as_ac_Header=yes"
11070 else
11071 echo "$as_me: failed program was:" >&5
11072 cat conftest.$ac_ext >&5
11073 eval "$as_ac_Header=no"
11074 fi
11075 rm -f conftest.err conftest.$ac_ext
11076 fi
11077 echo "$as_me:11077: result: `eval echo '${'$as_ac_Header'}'`" >&5
11078 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11079 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11080 cat >>confdefs.h <<EOF
11081 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11082 EOF
11083
11084 else
11085
11086 for ac_header in kerberosIV/des.h
11087 do
11088 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11089 echo "$as_me:11089: checking for $ac_header" >&5
11090 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11091 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11092 echo $ECHO_N "(cached) $ECHO_C" >&6
11093 else
11094 cat >conftest.$ac_ext <<_ACEOF
11095 #line 11095 "configure"
11096 #include "confdefs.h"
11097 #include <$ac_header>
11098 _ACEOF
11099 if { (eval echo "$as_me:11099: \"$ac_cpp conftest.$ac_ext\"") >&5
11100 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11101 ac_status=$?
11102 egrep -v '^ *\+' conftest.er1 >conftest.err
11103 rm -f conftest.er1
11104 cat conftest.err >&5
11105 echo "$as_me:11105: \$? = $ac_status" >&5
11106 (exit $ac_status); } >/dev/null; then
11107 if test -s conftest.err; then
11108 ac_cpp_err=$ac_c_preproc_warn_flag
11109 else
11110 ac_cpp_err=
11111 fi
11112 else
11113 ac_cpp_err=yes
11114 fi
11115 if test -z "$ac_cpp_err"; then
11116 eval "$as_ac_Header=yes"
11117 else
11118 echo "$as_me: failed program was:" >&5
11119 cat conftest.$ac_ext >&5
11120 eval "$as_ac_Header=no"
11121 fi
11122 rm -f conftest.err conftest.$ac_ext
11123 fi
11124 echo "$as_me:11124: result: `eval echo '${'$as_ac_Header'}'`" >&5
11125 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11126 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11127 cat >>confdefs.h <<EOF
11128 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11129 EOF
11130
11131 else
11132
11133 for ac_header in kerberos/des.h
11134 do
11135 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11136 echo "$as_me:11136: checking for $ac_header" >&5
11137 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11138 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11139 echo $ECHO_N "(cached) $ECHO_C" >&6
11140 else
11141 cat >conftest.$ac_ext <<_ACEOF
11142 #line 11142 "configure"
11143 #include "confdefs.h"
11144 #include <$ac_header>
11145 _ACEOF
11146 if { (eval echo "$as_me:11146: \"$ac_cpp conftest.$ac_ext\"") >&5
11147 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11148 ac_status=$?
11149 egrep -v '^ *\+' conftest.er1 >conftest.err
11150 rm -f conftest.er1
11151 cat conftest.err >&5
11152 echo "$as_me:11152: \$? = $ac_status" >&5
11153 (exit $ac_status); } >/dev/null; then
11154 if test -s conftest.err; then
11155 ac_cpp_err=$ac_c_preproc_warn_flag
11156 else
11157 ac_cpp_err=
11158 fi
11159 else
11160 ac_cpp_err=yes
11161 fi
11162 if test -z "$ac_cpp_err"; then
11163 eval "$as_ac_Header=yes"
11164 else
11165 echo "$as_me: failed program was:" >&5
11166 cat conftest.$ac_ext >&5
11167 eval "$as_ac_Header=no"
11168 fi
11169 rm -f conftest.err conftest.$ac_ext
11170 fi
11171 echo "$as_me:11171: result: `eval echo '${'$as_ac_Header'}'`" >&5
11172 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11173 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11174 cat >>confdefs.h <<EOF
11175 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11176 EOF
11177
11178 fi
11179 done
11180
11181 fi
11182 done
11183
11184 fi
11185 done
11186
11187 for ac_header in krb.h
11188 do
11189 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11190 echo "$as_me:11190: checking for $ac_header" >&5
11191 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11192 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11193 echo $ECHO_N "(cached) $ECHO_C" >&6
11194 else
11195 cat >conftest.$ac_ext <<_ACEOF
11196 #line 11196 "configure"
11197 #include "confdefs.h"
11198 #include <$ac_header>
11199 _ACEOF
11200 if { (eval echo "$as_me:11200: \"$ac_cpp conftest.$ac_ext\"") >&5
11201 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11202 ac_status=$?
11203 egrep -v '^ *\+' conftest.er1 >conftest.err
11204 rm -f conftest.er1
11205 cat conftest.err >&5
11206 echo "$as_me:11206: \$? = $ac_status" >&5
11207 (exit $ac_status); } >/dev/null; then
11208 if test -s conftest.err; then
11209 ac_cpp_err=$ac_c_preproc_warn_flag
11210 else
11211 ac_cpp_err=
11212 fi
11213 else
11214 ac_cpp_err=yes
11215 fi
11216 if test -z "$ac_cpp_err"; then
11217 eval "$as_ac_Header=yes"
11218 else
11219 echo "$as_me: failed program was:" >&5
11220 cat conftest.$ac_ext >&5
11221 eval "$as_ac_Header=no"
11222 fi
11223 rm -f conftest.err conftest.$ac_ext
11224 fi
11225 echo "$as_me:11225: result: `eval echo '${'$as_ac_Header'}'`" >&5
11226 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11227 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11228 cat >>confdefs.h <<EOF
11229 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11230 EOF
11231
11232 else
11233
11234 for ac_header in kerberosIV/krb.h
11235 do
11236 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11237 echo "$as_me:11237: checking for $ac_header" >&5
11238 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11239 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11240 echo $ECHO_N "(cached) $ECHO_C" >&6
11241 else
11242 cat >conftest.$ac_ext <<_ACEOF
11243 #line 11243 "configure"
11244 #include "confdefs.h"
11245 #include <$ac_header>
11246 _ACEOF
11247 if { (eval echo "$as_me:11247: \"$ac_cpp conftest.$ac_ext\"") >&5
11248 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11249 ac_status=$?
11250 egrep -v '^ *\+' conftest.er1 >conftest.err
11251 rm -f conftest.er1
11252 cat conftest.err >&5
11253 echo "$as_me:11253: \$? = $ac_status" >&5
11254 (exit $ac_status); } >/dev/null; then
11255 if test -s conftest.err; then
11256 ac_cpp_err=$ac_c_preproc_warn_flag
11257 else
11258 ac_cpp_err=
11259 fi
11260 else
11261 ac_cpp_err=yes
11262 fi
11263 if test -z "$ac_cpp_err"; then
11264 eval "$as_ac_Header=yes"
11265 else
11266 echo "$as_me: failed program was:" >&5
11267 cat conftest.$ac_ext >&5
11268 eval "$as_ac_Header=no"
11269 fi
11270 rm -f conftest.err conftest.$ac_ext
11271 fi
11272 echo "$as_me:11272: result: `eval echo '${'$as_ac_Header'}'`" >&5
11273 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11274 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11275 cat >>confdefs.h <<EOF
11276 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11277 EOF
11278
11279 else
11280
11281 for ac_header in kerberos/krb.h
11282 do
11283 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11284 echo "$as_me:11284: checking for $ac_header" >&5
11285 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11286 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11287 echo $ECHO_N "(cached) $ECHO_C" >&6
11288 else
11289 cat >conftest.$ac_ext <<_ACEOF
11290 #line 11290 "configure"
11291 #include "confdefs.h"
11292 #include <$ac_header>
11293 _ACEOF
11294 if { (eval echo "$as_me:11294: \"$ac_cpp conftest.$ac_ext\"") >&5
11295 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11296 ac_status=$?
11297 egrep -v '^ *\+' conftest.er1 >conftest.err
11298 rm -f conftest.er1
11299 cat conftest.err >&5
11300 echo "$as_me:11300: \$? = $ac_status" >&5
11301 (exit $ac_status); } >/dev/null; then
11302 if test -s conftest.err; then
11303 ac_cpp_err=$ac_c_preproc_warn_flag
11304 else
11305 ac_cpp_err=
11306 fi
11307 else
11308 ac_cpp_err=yes
11309 fi
11310 if test -z "$ac_cpp_err"; then
11311 eval "$as_ac_Header=yes"
11312 else
11313 echo "$as_me: failed program was:" >&5
11314 cat conftest.$ac_ext >&5
11315 eval "$as_ac_Header=no"
11316 fi
11317 rm -f conftest.err conftest.$ac_ext
11318 fi
11319 echo "$as_me:11319: result: `eval echo '${'$as_ac_Header'}'`" >&5
11320 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11321 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11322 cat >>confdefs.h <<EOF
11323 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11324 EOF
11325
11326 fi
11327 done
11328
11329 fi
11330 done
11331
11332 fi
11333 done
11334
11335 fi
11336
11337 for ac_header in com_err.h
11338 do
11339 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11340 echo "$as_me:11340: checking for $ac_header" >&5
11341 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11342 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11343 echo $ECHO_N "(cached) $ECHO_C" >&6
11344 else
11345 cat >conftest.$ac_ext <<_ACEOF
11346 #line 11346 "configure"
11347 #include "confdefs.h"
11348 #include <$ac_header>
11349 _ACEOF
11350 if { (eval echo "$as_me:11350: \"$ac_cpp conftest.$ac_ext\"") >&5
11351 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11352 ac_status=$?
11353 egrep -v '^ *\+' conftest.er1 >conftest.err
11354 rm -f conftest.er1
11355 cat conftest.err >&5
11356 echo "$as_me:11356: \$? = $ac_status" >&5
11357 (exit $ac_status); } >/dev/null; then
11358 if test -s conftest.err; then
11359 ac_cpp_err=$ac_c_preproc_warn_flag
11360 else
11361 ac_cpp_err=
11362 fi
11363 else
11364 ac_cpp_err=yes
11365 fi
11366 if test -z "$ac_cpp_err"; then
11367 eval "$as_ac_Header=yes"
11368 else
11369 echo "$as_me: failed program was:" >&5
11370 cat conftest.$ac_ext >&5
11371 eval "$as_ac_Header=no"
11372 fi
11373 rm -f conftest.err conftest.$ac_ext
11374 fi
11375 echo "$as_me:11375: result: `eval echo '${'$as_ac_Header'}'`" >&5
11376 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11377 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11378 cat >>confdefs.h <<EOF
11379 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11380 EOF
11381
11382 fi
11383 done
11384
11385 fi
11386
11387 # Solaris requires -lintl if you want strerror (which calls dgettext)
11388 # to return localized messages.
11389
11390 echo "$as_me:11390: checking for dgettext in -lintl" >&5
11391 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
11392 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
11393 echo $ECHO_N "(cached) $ECHO_C" >&6
11394 else
11395 ac_check_lib_save_LIBS=$LIBS
11396 LIBS="-lintl $LIBS"
11397 cat >conftest.$ac_ext <<_ACEOF
11398 #line 11398 "configure"
11399 #include "confdefs.h"
11400
11401 /* Override any gcc2 internal prototype to avoid an error. */
11402 #ifdef __cplusplus
11403 extern "C"
11404 #endif
11405 /* We use char because int might match the return type of a gcc2
11406 builtin and then its argument prototype would still apply. */
11407 char dgettext ();
11408 int
11409 main ()
11410 {
11411 dgettext ();
11412 ;
11413 return 0;
11414 }
11415 _ACEOF
11416 rm -f conftest.$ac_objext conftest$ac_exeext
11417 if { (eval echo "$as_me:11417: \"$ac_link\"") >&5
11418 (eval $ac_link) 2>&5
11419 ac_status=$?
11420 echo "$as_me:11420: \$? = $ac_status" >&5
11421 (exit $ac_status); } &&
11422 { ac_try='test -s conftest$ac_exeext'
11423 { (eval echo "$as_me:11423: \"$ac_try\"") >&5
11424 (eval $ac_try) 2>&5
11425 ac_status=$?
11426 echo "$as_me:11426: \$? = $ac_status" >&5
11427 (exit $ac_status); }; }; then
11428 ac_cv_lib_intl_dgettext=yes
11429 else
11430 echo "$as_me: failed program was:" >&5
11431 cat conftest.$ac_ext >&5
11432 ac_cv_lib_intl_dgettext=no
11433 fi
11434 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11435 LIBS=$ac_check_lib_save_LIBS
11436 fi
11437 echo "$as_me:11437: result: $ac_cv_lib_intl_dgettext" >&5
11438 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
11439 if test $ac_cv_lib_intl_dgettext = yes; then
11440 cat >>confdefs.h <<EOF
11441 #define HAVE_LIBINTL 1
11442 EOF
11443
11444 LIBS="-lintl $LIBS"
11445
11446 fi
11447
11448 echo "$as_me:11448: checking whether localtime caches TZ" >&5
11449 echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6
11450 if test "${emacs_cv_localtime_cache+set}" = set; then
11451 echo $ECHO_N "(cached) $ECHO_C" >&6
11452 else
11453 if test x$ac_cv_func_tzset = xyes; then
11454 if test "$cross_compiling" = yes; then
11455 # If we have tzset, assume the worst when cross-compiling.
11456 emacs_cv_localtime_cache=yes
11457 else
11458 cat >conftest.$ac_ext <<_ACEOF
11459 #line 11459 "configure"
11460 #include "confdefs.h"
11461 #include <time.h>
11462 extern char **environ;
11463 unset_TZ ()
11464 {
11465 char **from, **to;
11466 for (to = from = environ; (*to = *from); from++)
11467 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11468 to++;
11469 }
11470 char TZ_GMT0[] = "TZ=GMT0";
11471 char TZ_PST8[] = "TZ=PST8";
11472 main()
11473 {
11474 time_t now = time ((time_t *) 0);
11475 int hour_GMT0, hour_unset;
11476 if (putenv (TZ_GMT0) != 0)
11477 exit (1);
11478 hour_GMT0 = localtime (&now)->tm_hour;
11479 unset_TZ ();
11480 hour_unset = localtime (&now)->tm_hour;
11481 if (putenv (TZ_PST8) != 0)
11482 exit (1);
11483 if (localtime (&now)->tm_hour == hour_GMT0)
11484 exit (1);
11485 unset_TZ ();
11486 if (localtime (&now)->tm_hour != hour_unset)
11487 exit (1);
11488 exit (0);
11489 }
11490 _ACEOF
11491 rm -f conftest$ac_exeext
11492 if { (eval echo "$as_me:11492: \"$ac_link\"") >&5
11493 (eval $ac_link) 2>&5
11494 ac_status=$?
11495 echo "$as_me:11495: \$? = $ac_status" >&5
11496 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11497 { (eval echo "$as_me:11497: \"$ac_try\"") >&5
11498 (eval $ac_try) 2>&5
11499 ac_status=$?
11500 echo "$as_me:11500: \$? = $ac_status" >&5
11501 (exit $ac_status); }; }; then
11502 emacs_cv_localtime_cache=no
11503 else
11504 echo "$as_me: program exited with status $ac_status" >&5
11505 echo "$as_me: failed program was:" >&5
11506 cat conftest.$ac_ext >&5
11507 emacs_cv_localtime_cache=yes
11508 fi
11509 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11510 fi
11511 else
11512 # If we lack tzset, report that localtime does not cache TZ,
11513 # since we can't invalidate the cache if we don't have tzset.
11514 emacs_cv_localtime_cache=no
11515 fi
11516 fi
11517 echo "$as_me:11517: result: $emacs_cv_localtime_cache" >&5
11518 echo "${ECHO_T}$emacs_cv_localtime_cache" >&6
11519 if test $emacs_cv_localtime_cache = yes; then
11520 cat >>confdefs.h <<\EOF
11521 #define LOCALTIME_CACHE 1
11522 EOF
11523
11524 fi
11525
11526 if test "x$HAVE_TIMEVAL" = xyes; then
11527
11528 for ac_func in gettimeofday
11529 do
11530 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11531 echo "$as_me:11531: checking for $ac_func" >&5
11532 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11533 if eval "test \"\${$as_ac_var+set}\" = set"; then
11534 echo $ECHO_N "(cached) $ECHO_C" >&6
11535 else
11536 cat >conftest.$ac_ext <<_ACEOF
11537 #line 11537 "configure"
11538 #include "confdefs.h"
11539 /* System header to define __stub macros and hopefully few prototypes,
11540 which can conflict with char $ac_func (); below. */
11541 #include <assert.h>
11542 /* Override any gcc2 internal prototype to avoid an error. */
11543 #ifdef __cplusplus
11544 extern "C"
11545 #endif
11546 /* We use char because int might match the return type of a gcc2
11547 builtin and then its argument prototype would still apply. */
11548 char $ac_func ();
11549 char (*f) ();
11550
11551 int
11552 main ()
11553 {
11554 /* The GNU C library defines this for functions which it implements
11555 to always fail with ENOSYS. Some functions are actually named
11556 something starting with __ and the normal name is an alias. */
11557 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11558 choke me
11559 #else
11560 f = $ac_func;
11561 #endif
11562
11563 ;
11564 return 0;
11565 }
11566 _ACEOF
11567 rm -f conftest.$ac_objext conftest$ac_exeext
11568 if { (eval echo "$as_me:11568: \"$ac_link\"") >&5
11569 (eval $ac_link) 2>&5
11570 ac_status=$?
11571 echo "$as_me:11571: \$? = $ac_status" >&5
11572 (exit $ac_status); } &&
11573 { ac_try='test -s conftest$ac_exeext'
11574 { (eval echo "$as_me:11574: \"$ac_try\"") >&5
11575 (eval $ac_try) 2>&5
11576 ac_status=$?
11577 echo "$as_me:11577: \$? = $ac_status" >&5
11578 (exit $ac_status); }; }; then
11579 eval "$as_ac_var=yes"
11580 else
11581 echo "$as_me: failed program was:" >&5
11582 cat conftest.$ac_ext >&5
11583 eval "$as_ac_var=no"
11584 fi
11585 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11586 fi
11587 echo "$as_me:11587: result: `eval echo '${'$as_ac_var'}'`" >&5
11588 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11589 if test `eval echo '${'$as_ac_var'}'` = yes; then
11590 cat >>confdefs.h <<EOF
11591 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11592 EOF
11593
11594 fi
11595 done
11596
11597 echo "$as_me:11597: checking whether gettimeofday can accept two arguments" >&5
11598 echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6
11599 if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
11600 echo $ECHO_N "(cached) $ECHO_C" >&6
11601 else
11602 cat >conftest.$ac_ext <<_ACEOF
11603 #line 11603 "configure"
11604 #include "confdefs.h"
11605
11606 #ifdef TIME_WITH_SYS_TIME
11607 #include <sys/time.h>
11608 #include <time.h>
11609 #else
11610 #ifdef HAVE_SYS_TIME_H
11611 #include <sys/time.h>
11612 #else
11613 #include <time.h>
11614 #endif
11615 #endif
11616 int
11617 main ()
11618 {
11619 struct timeval time;
11620 gettimeofday (&time, 0);
11621 ;
11622 return 0;
11623 }
11624 _ACEOF
11625 rm -f conftest.$ac_objext
11626 if { (eval echo "$as_me:11626: \"$ac_compile\"") >&5
11627 (eval $ac_compile) 2>&5
11628 ac_status=$?
11629 echo "$as_me:11629: \$? = $ac_status" >&5
11630 (exit $ac_status); } &&
11631 { ac_try='test -s conftest.$ac_objext'
11632 { (eval echo "$as_me:11632: \"$ac_try\"") >&5
11633 (eval $ac_try) 2>&5
11634 ac_status=$?
11635 echo "$as_me:11635: \$? = $ac_status" >&5
11636 (exit $ac_status); }; }; then
11637 emacs_cv_gettimeofday_two_arguments=yes
11638 else
11639 echo "$as_me: failed program was:" >&5
11640 cat conftest.$ac_ext >&5
11641 emacs_cv_gettimeofday_two_arguments=no
11642 fi
11643 rm -f conftest.$ac_objext conftest.$ac_ext
11644 fi
11645 echo "$as_me:11645: result: $emacs_cv_gettimeofday_two_arguments" >&5
11646 echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6
11647 if test $emacs_cv_gettimeofday_two_arguments = no; then
11648 cat >>confdefs.h <<\EOF
11649 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11650 EOF
11651
11652 fi
11653 fi
11654
11655 if test "$ac_cv_func_gettimeofday" = yes; then
11656 echo "$as_me:11656: checking for struct timezone" >&5
11657 echo $ECHO_N "checking for struct timezone... $ECHO_C" >&6
11658 if test "${emacs_cv_struct_timezone+set}" = set; then
11659 echo $ECHO_N "(cached) $ECHO_C" >&6
11660 else
11661 cat >conftest.$ac_ext <<_ACEOF
11662 #line 11662 "configure"
11663 #include "confdefs.h"
11664 #include <sys/time.h>
11665 int
11666 main ()
11667 {
11668 struct timezone tz;
11669 ;
11670 return 0;
11671 }
11672 _ACEOF
11673 rm -f conftest.$ac_objext
11674 if { (eval echo "$as_me:11674: \"$ac_compile\"") >&5
11675 (eval $ac_compile) 2>&5
11676 ac_status=$?
11677 echo "$as_me:11677: \$? = $ac_status" >&5
11678 (exit $ac_status); } &&
11679 { ac_try='test -s conftest.$ac_objext'
11680 { (eval echo "$as_me:11680: \"$ac_try\"") >&5
11681 (eval $ac_try) 2>&5
11682 ac_status=$?
11683 echo "$as_me:11683: \$? = $ac_status" >&5
11684 (exit $ac_status); }; }; then
11685 if test "$cross_compiling" = yes; then
11686 emacs_cv_struct_timezone=yes
11687 else
11688 cat >conftest.$ac_ext <<_ACEOF
11689 #line 11689 "configure"
11690 #include "confdefs.h"
11691
11692 #ifdef TIME_WITH_SYS_TIME
11693 #include <sys/time.h>
11694 #include <time.h>
11695 #else
11696 #ifdef HAVE_SYS_TIME_H
11697 #include <sys/time.h>
11698 #else
11699 #include <time.h>
11700 #endif
11701 #endif
11702 main () {
11703 struct timeval time;
11704 struct timezone dummy;
11705 exit (gettimeofday (&time, &dummy));
11706 }
11707 _ACEOF
11708 rm -f conftest$ac_exeext
11709 if { (eval echo "$as_me:11709: \"$ac_link\"") >&5
11710 (eval $ac_link) 2>&5
11711 ac_status=$?
11712 echo "$as_me:11712: \$? = $ac_status" >&5
11713 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11714 { (eval echo "$as_me:11714: \"$ac_try\"") >&5
11715 (eval $ac_try) 2>&5
11716 ac_status=$?
11717 echo "$as_me:11717: \$? = $ac_status" >&5
11718 (exit $ac_status); }; }; then
11719 emacs_cv_struct_timezone=yes
11720 else
11721 echo "$as_me: program exited with status $ac_status" >&5
11722 echo "$as_me: failed program was:" >&5
11723 cat conftest.$ac_ext >&5
11724 emacs_cv_struct_timezone=no
11725 fi
11726 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11727 fi
11728 else
11729 echo "$as_me: failed program was:" >&5
11730 cat conftest.$ac_ext >&5
11731 emacs_cv_struct_timezone=no
11732 fi
11733 rm -f conftest.$ac_objext conftest.$ac_ext
11734 fi
11735 echo "$as_me:11735: result: $emacs_cv_struct_timezone" >&5
11736 echo "${ECHO_T}$emacs_cv_struct_timezone" >&6
11737 fi
11738
11739 ok_so_far=yes
11740 echo "$as_me:11740: checking for socket" >&5
11741 echo $ECHO_N "checking for socket... $ECHO_C" >&6
11742 if test "${ac_cv_func_socket+set}" = set; then
11743 echo $ECHO_N "(cached) $ECHO_C" >&6
11744 else
11745 cat >conftest.$ac_ext <<_ACEOF
11746 #line 11746 "configure"
11747 #include "confdefs.h"
11748 /* System header to define __stub macros and hopefully few prototypes,
11749 which can conflict with char socket (); below. */
11750 #include <assert.h>
11751 /* Override any gcc2 internal prototype to avoid an error. */
11752 #ifdef __cplusplus
11753 extern "C"
11754 #endif
11755 /* We use char because int might match the return type of a gcc2
11756 builtin and then its argument prototype would still apply. */
11757 char socket ();
11758 char (*f) ();
11759
11760 int
11761 main ()
11762 {
11763 /* The GNU C library defines this for functions which it implements
11764 to always fail with ENOSYS. Some functions are actually named
11765 something starting with __ and the normal name is an alias. */
11766 #if defined (__stub_socket) || defined (__stub___socket)
11767 choke me
11768 #else
11769 f = socket;
11770 #endif
11771
11772 ;
11773 return 0;
11774 }
11775 _ACEOF
11776 rm -f conftest.$ac_objext conftest$ac_exeext
11777 if { (eval echo "$as_me:11777: \"$ac_link\"") >&5
11778 (eval $ac_link) 2>&5
11779 ac_status=$?
11780 echo "$as_me:11780: \$? = $ac_status" >&5
11781 (exit $ac_status); } &&
11782 { ac_try='test -s conftest$ac_exeext'
11783 { (eval echo "$as_me:11783: \"$ac_try\"") >&5
11784 (eval $ac_try) 2>&5
11785 ac_status=$?
11786 echo "$as_me:11786: \$? = $ac_status" >&5
11787 (exit $ac_status); }; }; then
11788 ac_cv_func_socket=yes
11789 else
11790 echo "$as_me: failed program was:" >&5
11791 cat conftest.$ac_ext >&5
11792 ac_cv_func_socket=no
11793 fi
11794 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11795 fi
11796 echo "$as_me:11796: result: $ac_cv_func_socket" >&5
11797 echo "${ECHO_T}$ac_cv_func_socket" >&6
11798 if test $ac_cv_func_socket = yes; then
11799 :
11800 else
11801 ok_so_far=no
11802 fi
11803
11804 if test $ok_so_far = yes; then
11805 echo "$as_me:11805: checking for netinet/in.h" >&5
11806 echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
11807 if test "${ac_cv_header_netinet_in_h+set}" = set; then
11808 echo $ECHO_N "(cached) $ECHO_C" >&6
11809 else
11810 cat >conftest.$ac_ext <<_ACEOF
11811 #line 11811 "configure"
11812 #include "confdefs.h"
11813 #include <netinet/in.h>
11814 _ACEOF
11815 if { (eval echo "$as_me:11815: \"$ac_cpp conftest.$ac_ext\"") >&5
11816 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11817 ac_status=$?
11818 egrep -v '^ *\+' conftest.er1 >conftest.err
11819 rm -f conftest.er1
11820 cat conftest.err >&5
11821 echo "$as_me:11821: \$? = $ac_status" >&5
11822 (exit $ac_status); } >/dev/null; then
11823 if test -s conftest.err; then
11824 ac_cpp_err=$ac_c_preproc_warn_flag
11825 else
11826 ac_cpp_err=
11827 fi
11828 else
11829 ac_cpp_err=yes
11830 fi
11831 if test -z "$ac_cpp_err"; then
11832 ac_cv_header_netinet_in_h=yes
11833 else
11834 echo "$as_me: failed program was:" >&5
11835 cat conftest.$ac_ext >&5
11836 ac_cv_header_netinet_in_h=no
11837 fi
11838 rm -f conftest.err conftest.$ac_ext
11839 fi
11840 echo "$as_me:11840: result: $ac_cv_header_netinet_in_h" >&5
11841 echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
11842 if test $ac_cv_header_netinet_in_h = yes; then
11843 :
11844 else
11845 ok_so_far=no
11846 fi
11847
11848 fi
11849 if test $ok_so_far = yes; then
11850 echo "$as_me:11850: checking for arpa/inet.h" >&5
11851 echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
11852 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
11853 echo $ECHO_N "(cached) $ECHO_C" >&6
11854 else
11855 cat >conftest.$ac_ext <<_ACEOF
11856 #line 11856 "configure"
11857 #include "confdefs.h"
11858 #include <arpa/inet.h>
11859 _ACEOF
11860 if { (eval echo "$as_me:11860: \"$ac_cpp conftest.$ac_ext\"") >&5
11861 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11862 ac_status=$?
11863 egrep -v '^ *\+' conftest.er1 >conftest.err
11864 rm -f conftest.er1
11865 cat conftest.err >&5
11866 echo "$as_me:11866: \$? = $ac_status" >&5
11867 (exit $ac_status); } >/dev/null; then
11868 if test -s conftest.err; then
11869 ac_cpp_err=$ac_c_preproc_warn_flag
11870 else
11871 ac_cpp_err=
11872 fi
11873 else
11874 ac_cpp_err=yes
11875 fi
11876 if test -z "$ac_cpp_err"; then
11877 ac_cv_header_arpa_inet_h=yes
11878 else
11879 echo "$as_me: failed program was:" >&5
11880 cat conftest.$ac_ext >&5
11881 ac_cv_header_arpa_inet_h=no
11882 fi
11883 rm -f conftest.err conftest.$ac_ext
11884 fi
11885 echo "$as_me:11885: result: $ac_cv_header_arpa_inet_h" >&5
11886 echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
11887 if test $ac_cv_header_arpa_inet_h = yes; then
11888 :
11889 else
11890 ok_so_far=no
11891 fi
11892
11893 fi
11894 if test $ok_so_far = yes; then
11895 cat >>confdefs.h <<\EOF
11896 #define HAVE_INET_SOCKETS 1
11897 EOF
11898
11899 fi
11900
11901 if test -f /usr/lpp/X11/bin/smt.exp; then
11902 cat >>confdefs.h <<\EOF
11903 #define HAVE_AIX_SMT_EXP 1
11904 EOF
11905
11906 fi
11907
11908 echo "$as_me:11908: checking whether system supports dynamic ptys" >&5
11909 echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6
11910 if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
11911 echo "$as_me:11911: result: yes" >&5
11912 echo "${ECHO_T}yes" >&6
11913 cat >>confdefs.h <<\EOF
11914 #define HAVE_DEV_PTMX 1
11915 EOF
11916
11917 else
11918 echo "$as_me:11918: result: no" >&5
11919 echo "${ECHO_T}no" >&6
11920 fi
11921
11922 echo "$as_me:11922: checking for pid_t" >&5
11923 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
11924 if test "${ac_cv_type_pid_t+set}" = set; then
11925 echo $ECHO_N "(cached) $ECHO_C" >&6
11926 else
11927 cat >conftest.$ac_ext <<_ACEOF
11928 #line 11928 "configure"
11929 #include "confdefs.h"
11930 $ac_includes_default
11931 int
11932 main ()
11933 {
11934 if ((pid_t *) 0)
11935 return 0;
11936 if (sizeof (pid_t))
11937 return 0;
11938 ;
11939 return 0;
11940 }
11941 _ACEOF
11942 rm -f conftest.$ac_objext
11943 if { (eval echo "$as_me:11943: \"$ac_compile\"") >&5
11944 (eval $ac_compile) 2>&5
11945 ac_status=$?
11946 echo "$as_me:11946: \$? = $ac_status" >&5
11947 (exit $ac_status); } &&
11948 { ac_try='test -s conftest.$ac_objext'
11949 { (eval echo "$as_me:11949: \"$ac_try\"") >&5
11950 (eval $ac_try) 2>&5
11951 ac_status=$?
11952 echo "$as_me:11952: \$? = $ac_status" >&5
11953 (exit $ac_status); }; }; then
11954 ac_cv_type_pid_t=yes
11955 else
11956 echo "$as_me: failed program was:" >&5
11957 cat conftest.$ac_ext >&5
11958 ac_cv_type_pid_t=no
11959 fi
11960 rm -f conftest.$ac_objext conftest.$ac_ext
11961 fi
11962 echo "$as_me:11962: result: $ac_cv_type_pid_t" >&5
11963 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
11964 if test $ac_cv_type_pid_t = yes; then
11965 :
11966 else
11967
11968 cat >>confdefs.h <<EOF
11969 #define pid_t int
11970 EOF
11971
11972 fi
11973
11974 for ac_header in unistd.h vfork.h
11975 do
11976 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11977 echo "$as_me:11977: checking for $ac_header" >&5
11978 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11979 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11980 echo $ECHO_N "(cached) $ECHO_C" >&6
11981 else
11982 cat >conftest.$ac_ext <<_ACEOF
11983 #line 11983 "configure"
11984 #include "confdefs.h"
11985 #include <$ac_header>
11986 _ACEOF
11987 if { (eval echo "$as_me:11987: \"$ac_cpp conftest.$ac_ext\"") >&5
11988 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11989 ac_status=$?
11990 egrep -v '^ *\+' conftest.er1 >conftest.err
11991 rm -f conftest.er1
11992 cat conftest.err >&5
11993 echo "$as_me:11993: \$? = $ac_status" >&5
11994 (exit $ac_status); } >/dev/null; then
11995 if test -s conftest.err; then
11996 ac_cpp_err=$ac_c_preproc_warn_flag
11997 else
11998 ac_cpp_err=
11999 fi
12000 else
12001 ac_cpp_err=yes
12002 fi
12003 if test -z "$ac_cpp_err"; then
12004 eval "$as_ac_Header=yes"
12005 else
12006 echo "$as_me: failed program was:" >&5
12007 cat conftest.$ac_ext >&5
12008 eval "$as_ac_Header=no"
12009 fi
12010 rm -f conftest.err conftest.$ac_ext
12011 fi
12012 echo "$as_me:12012: result: `eval echo '${'$as_ac_Header'}'`" >&5
12013 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12014 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12015 cat >>confdefs.h <<EOF
12016 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12017 EOF
12018
12019 fi
12020 done
12021
12022 for ac_func in fork vfork
12023 do
12024 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12025 echo "$as_me:12025: checking for $ac_func" >&5
12026 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12027 if eval "test \"\${$as_ac_var+set}\" = set"; then
12028 echo $ECHO_N "(cached) $ECHO_C" >&6
12029 else
12030 cat >conftest.$ac_ext <<_ACEOF
12031 #line 12031 "configure"
12032 #include "confdefs.h"
12033 /* System header to define __stub macros and hopefully few prototypes,
12034 which can conflict with char $ac_func (); below. */
12035 #include <assert.h>
12036 /* Override any gcc2 internal prototype to avoid an error. */
12037 #ifdef __cplusplus
12038 extern "C"
12039 #endif
12040 /* We use char because int might match the return type of a gcc2
12041 builtin and then its argument prototype would still apply. */
12042 char $ac_func ();
12043 char (*f) ();
12044
12045 int
12046 main ()
12047 {
12048 /* The GNU C library defines this for functions which it implements
12049 to always fail with ENOSYS. Some functions are actually named
12050 something starting with __ and the normal name is an alias. */
12051 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12052 choke me
12053 #else
12054 f = $ac_func;
12055 #endif
12056
12057 ;
12058 return 0;
12059 }
12060 _ACEOF
12061 rm -f conftest.$ac_objext conftest$ac_exeext
12062 if { (eval echo "$as_me:12062: \"$ac_link\"") >&5
12063 (eval $ac_link) 2>&5
12064 ac_status=$?
12065 echo "$as_me:12065: \$? = $ac_status" >&5
12066 (exit $ac_status); } &&
12067 { ac_try='test -s conftest$ac_exeext'
12068 { (eval echo "$as_me:12068: \"$ac_try\"") >&5
12069 (eval $ac_try) 2>&5
12070 ac_status=$?
12071 echo "$as_me:12071: \$? = $ac_status" >&5
12072 (exit $ac_status); }; }; then
12073 eval "$as_ac_var=yes"
12074 else
12075 echo "$as_me: failed program was:" >&5
12076 cat conftest.$ac_ext >&5
12077 eval "$as_ac_var=no"
12078 fi
12079 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12080 fi
12081 echo "$as_me:12081: result: `eval echo '${'$as_ac_var'}'`" >&5
12082 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12083 if test `eval echo '${'$as_ac_var'}'` = yes; then
12084 cat >>confdefs.h <<EOF
12085 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12086 EOF
12087
12088 fi
12089 done
12090
12091 ac_cv_func_fork_works=$ac_cv_func_fork
12092 if test "x$ac_cv_func_fork" = xyes; then
12093 echo "$as_me:12093: checking for working fork" >&5
12094 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
12095 if test "${ac_cv_func_fork_works+set}" = set; then
12096 echo $ECHO_N "(cached) $ECHO_C" >&6
12097 else
12098 if test "$cross_compiling" = yes; then
12099 ac_cv_func_fork_works=cross
12100 else
12101 cat >conftest.$ac_ext <<_ACEOF
12102 /* By Rüdiger Kuhlmann. */
12103 #include <sys/types.h>
12104 #if HAVE_UNISTD_H
12105 # include <unistd.h>
12106 #endif
12107 /* Some systems only have a dummy stub for fork() */
12108 int main ()
12109 {
12110 if (fork() < 0)
12111 exit (1);
12112 exit (0);
12113 }
12114 _ACEOF
12115 rm -f conftest$ac_exeext
12116 if { (eval echo "$as_me:12116: \"$ac_link\"") >&5
12117 (eval $ac_link) 2>&5
12118 ac_status=$?
12119 echo "$as_me:12119: \$? = $ac_status" >&5
12120 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12121 { (eval echo "$as_me:12121: \"$ac_try\"") >&5
12122 (eval $ac_try) 2>&5
12123 ac_status=$?
12124 echo "$as_me:12124: \$? = $ac_status" >&5
12125 (exit $ac_status); }; }; then
12126 ac_cv_func_fork_works=yes
12127 else
12128 echo "$as_me: program exited with status $ac_status" >&5
12129 echo "$as_me: failed program was:" >&5
12130 cat conftest.$ac_ext >&5
12131 ac_cv_func_fork_works=no
12132 fi
12133 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12134 fi
12135 fi
12136 echo "$as_me:12136: result: $ac_cv_func_fork_works" >&5
12137 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
12138
12139 fi
12140 if test "x$ac_cv_func_fork_works" = xcross; then
12141 case $host in
12142 *-*-amigaos* | *-*-msdosdjgpp*)
12143 # Override, as these systems have only a dummy fork() stub
12144 ac_cv_func_fork_works=no
12145 ;;
12146 *)
12147 ac_cv_func_fork_works=yes
12148 ;;
12149 esac
12150 { echo "$as_me:12150: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
12151 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
12152 fi
12153 ac_cv_func_vfork_works=$ac_cv_func_vfork
12154 if test "x$ac_cv_func_vfork" = xyes; then
12155 echo "$as_me:12155: checking for working vfork" >&5
12156 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
12157 if test "${ac_cv_func_vfork_works+set}" = set; then
12158 echo $ECHO_N "(cached) $ECHO_C" >&6
12159 else
12160 if test "$cross_compiling" = yes; then
12161 ac_cv_func_vfork_works=cross
12162 else
12163 cat >conftest.$ac_ext <<_ACEOF
12164 #line 12164 "configure"
12165 #include "confdefs.h"
12166 /* Thanks to Paul Eggert for this test. */
12167 #include <stdio.h>
12168 #include <sys/types.h>
12169 #include <sys/stat.h>
12170 #if HAVE_UNISTD_H
12171 # include <unistd.h>
12172 #endif
12173 #if HAVE_VFORK_H
12174 # include <vfork.h>
12175 #endif
12176 /* On some sparc systems, changes by the child to local and incoming
12177 argument registers are propagated back to the parent. The compiler
12178 is told about this with #include <vfork.h>, but some compilers
12179 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
12180 static variable whose address is put into a register that is
12181 clobbered by the vfork. */
12182 static
12183 #ifdef __cplusplus
12184 sparc_address_test (int arg)
12185 # else
12186 sparc_address_test (arg) int arg;
12187 #endif
12188 {
12189 static pid_t child;
12190 if (!child) {
12191 child = vfork ();
12192 if (child < 0) {
12193 perror ("vfork");
12194 _exit(2);
12195 }
12196 if (!child) {
12197 arg = getpid();
12198 write(-1, "", 0);
12199 _exit (arg);
12200 }
12201 }
12202 }
12203
12204 int
12205 main ()
12206 {
12207 pid_t parent = getpid ();
12208 pid_t child;
12209
12210 sparc_address_test ();
12211
12212 child = vfork ();
12213
12214 if (child == 0) {
12215 /* Here is another test for sparc vfork register problems. This
12216 test uses lots of local variables, at least as many local
12217 variables as main has allocated so far including compiler
12218 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
12219 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
12220 reuse the register of parent for one of the local variables,
12221 since it will think that parent can't possibly be used any more
12222 in this routine. Assigning to the local variable will thus
12223 munge parent in the parent process. */
12224 pid_t
12225 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12226 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12227 /* Convince the compiler that p..p7 are live; otherwise, it might
12228 use the same hardware register for all 8 local variables. */
12229 if (p != p1 || p != p2 || p != p3 || p != p4
12230 || p != p5 || p != p6 || p != p7)
12231 _exit(1);
12232
12233 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
12234 from child file descriptors. If the child closes a descriptor
12235 before it execs or exits, this munges the parent's descriptor
12236 as well. Test for this by closing stdout in the child. */
12237 _exit(close(fileno(stdout)) != 0);
12238 } else {
12239 int status;
12240 struct stat st;
12241
12242 while (wait(&status) != child)
12243 ;
12244 exit(
12245 /* Was there some problem with vforking? */
12246 child < 0
12247
12248 /* Did the child fail? (This shouldn't happen.) */
12249 || status
12250
12251 /* Did the vfork/compiler bug occur? */
12252 || parent != getpid()
12253
12254 /* Did the file descriptor bug occur? */
12255 || fstat(fileno(stdout), &st) != 0
12256 );
12257 }
12258 }
12259 _ACEOF
12260 rm -f conftest$ac_exeext
12261 if { (eval echo "$as_me:12261: \"$ac_link\"") >&5
12262 (eval $ac_link) 2>&5
12263 ac_status=$?
12264 echo "$as_me:12264: \$? = $ac_status" >&5
12265 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12266 { (eval echo "$as_me:12266: \"$ac_try\"") >&5
12267 (eval $ac_try) 2>&5
12268 ac_status=$?
12269 echo "$as_me:12269: \$? = $ac_status" >&5
12270 (exit $ac_status); }; }; then
12271 ac_cv_func_vfork_works=yes
12272 else
12273 echo "$as_me: program exited with status $ac_status" >&5
12274 echo "$as_me: failed program was:" >&5
12275 cat conftest.$ac_ext >&5
12276 ac_cv_func_vfork_works=no
12277 fi
12278 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12279 fi
12280 fi
12281 echo "$as_me:12281: result: $ac_cv_func_vfork_works" >&5
12282 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
12283
12284 fi;
12285 if test "x$ac_cv_func_fork_works" = xcross; then
12286 ac_cv_func_vfork_works=ac_cv_func_vfork
12287 { echo "$as_me:12287: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
12288 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
12289 fi
12290
12291 if test "x$ac_cv_func_vfork_works" = xyes; then
12292
12293 cat >>confdefs.h <<\EOF
12294 #define HAVE_WORKING_VFORK 1
12295 EOF
12296
12297 else
12298
12299 cat >>confdefs.h <<\EOF
12300 #define vfork fork
12301 EOF
12302
12303 fi
12304 if test "x$ac_cv_func_fork_works" = xyes; then
12305
12306 cat >>confdefs.h <<\EOF
12307 #define HAVE_WORKING_FORK 1
12308 EOF
12309
12310 fi
12311
12312 # Fixme: This should be replaced when we have autoconf 2.14.
12313 echo "$as_me:12313: checking for size_t" >&5
12314 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
12315 if test "${ac_cv_type_size_t+set}" = set; then
12316 echo $ECHO_N "(cached) $ECHO_C" >&6
12317 else
12318 cat >conftest.$ac_ext <<_ACEOF
12319 #line 12319 "configure"
12320 #include "confdefs.h"
12321 $ac_includes_default
12322 int
12323 main ()
12324 {
12325 if ((size_t *) 0)
12326 return 0;
12327 if (sizeof (size_t))
12328 return 0;
12329 ;
12330 return 0;
12331 }
12332 _ACEOF
12333 rm -f conftest.$ac_objext
12334 if { (eval echo "$as_me:12334: \"$ac_compile\"") >&5
12335 (eval $ac_compile) 2>&5
12336 ac_status=$?
12337 echo "$as_me:12337: \$? = $ac_status" >&5
12338 (exit $ac_status); } &&
12339 { ac_try='test -s conftest.$ac_objext'
12340 { (eval echo "$as_me:12340: \"$ac_try\"") >&5
12341 (eval $ac_try) 2>&5
12342 ac_status=$?
12343 echo "$as_me:12343: \$? = $ac_status" >&5
12344 (exit $ac_status); }; }; then
12345 ac_cv_type_size_t=yes
12346 else
12347 echo "$as_me: failed program was:" >&5
12348 cat conftest.$ac_ext >&5
12349 ac_cv_type_size_t=no
12350 fi
12351 rm -f conftest.$ac_objext conftest.$ac_ext
12352 fi
12353 echo "$as_me:12353: result: $ac_cv_type_size_t" >&5
12354 echo "${ECHO_T}$ac_cv_type_size_t" >&6
12355 if test $ac_cv_type_size_t = yes; then
12356 :
12357 else
12358
12359 cat >>confdefs.h <<EOF
12360 #define size_t unsigned
12361 EOF
12362
12363 fi
12364
12365 # Set up the CFLAGS for real compilation, so we can substitute it.
12366 CFLAGS="$REAL_CFLAGS"
12367 CPPFLAGS="$REAL_CPPFLAGS"
12368
12369 #### Find out which version of Emacs this is.
12370 version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
12371 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
12372 if test x"${version}" = x; then
12373 { { echo "$as_me:12373: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
12374 echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
12375 { (exit 1); exit 1; }; }
12376 fi
12377
12378 ### Specify what sort of things we'll be editing into Makefile and config.h.
12379 ### Use configuration here uncanonicalized to avoid exceeding size limits.
12380
12381 cat >>confdefs.h <<EOF
12382 #define EMACS_CONFIGURATION "${canonical}"
12383 EOF
12384
12385 cat >>confdefs.h <<EOF
12386 #define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
12387 EOF
12388
12389 cat >>confdefs.h <<EOF
12390 #define config_machfile "${machfile}"
12391 EOF
12392
12393 cat >>confdefs.h <<EOF
12394 #define config_opsysfile "${opsysfile}"
12395 EOF
12396
12397 cat >>confdefs.h <<EOF
12398 #define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
12399 EOF
12400
12401 cat >>confdefs.h <<EOF
12402 #define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
12403 EOF
12404
12405 cat >>confdefs.h <<EOF
12406 #define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
12407 EOF
12408
12409 cat >>confdefs.h <<EOF
12410 #define UNEXEC_SRC ${UNEXEC_SRC}
12411 EOF
12412
12413 if test "${HAVE_X_WINDOWS}" = "yes" ; then
12414 cat >>confdefs.h <<\EOF
12415 #define HAVE_X_WINDOWS 1
12416 EOF
12417
12418 fi
12419 if test "${USE_X_TOOLKIT}" != "none" ; then
12420 cat >>confdefs.h <<\EOF
12421 #define USE_X_TOOLKIT 1
12422 EOF
12423
12424 fi
12425 if test "${HAVE_X11}" = "yes" ; then
12426 cat >>confdefs.h <<\EOF
12427 #define HAVE_X11 1
12428 EOF
12429
12430 fi
12431 if test "${HAVE_XFREE386}" = "yes" ; then
12432 cat >>confdefs.h <<\EOF
12433 #define HAVE_XFREE386 1
12434 EOF
12435
12436 fi
12437 if test "${HAVE_MENUS}" = "yes" ; then
12438 cat >>confdefs.h <<\EOF
12439 #define HAVE_MENUS 1
12440 EOF
12441
12442 fi
12443 if test "${GNU_MALLOC}" = "yes" ; then
12444 cat >>confdefs.h <<\EOF
12445 #define GNU_MALLOC 1
12446 EOF
12447
12448 fi
12449 if test "${REL_ALLOC}" = "yes" ; then
12450 cat >>confdefs.h <<\EOF
12451 #define REL_ALLOC 1
12452 EOF
12453
12454 fi
12455
12456 for ac_header in nlist.h
12457 do
12458 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12459 echo "$as_me:12459: checking for $ac_header" >&5
12460 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12461 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12462 echo $ECHO_N "(cached) $ECHO_C" >&6
12463 else
12464 cat >conftest.$ac_ext <<_ACEOF
12465 #line 12465 "configure"
12466 #include "confdefs.h"
12467 #include <$ac_header>
12468 _ACEOF
12469 if { (eval echo "$as_me:12469: \"$ac_cpp conftest.$ac_ext\"") >&5
12470 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12471 ac_status=$?
12472 egrep -v '^ *\+' conftest.er1 >conftest.err
12473 rm -f conftest.er1
12474 cat conftest.err >&5
12475 echo "$as_me:12475: \$? = $ac_status" >&5
12476 (exit $ac_status); } >/dev/null; then
12477 if test -s conftest.err; then
12478 ac_cpp_err=$ac_c_preproc_warn_flag
12479 else
12480 ac_cpp_err=
12481 fi
12482 else
12483 ac_cpp_err=yes
12484 fi
12485 if test -z "$ac_cpp_err"; then
12486 eval "$as_ac_Header=yes"
12487 else
12488 echo "$as_me: failed program was:" >&5
12489 cat conftest.$ac_ext >&5
12490 eval "$as_ac_Header=no"
12491 fi
12492 rm -f conftest.err conftest.$ac_ext
12493 fi
12494 echo "$as_me:12494: result: `eval echo '${'$as_ac_Header'}'`" >&5
12495 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12496 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12497 cat >>confdefs.h <<EOF
12498 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12499 EOF
12500
12501 cat >>confdefs.h <<\EOF
12502 #define NLIST_STRUCT 1
12503 EOF
12504
12505 fi
12506 done
12507
12508 #### Report on what we decided to do.
12509 echo "
12510 Configured for \`${canonical}'.
12511
12512 Where should the build process find the source code? ${srcdir}
12513 What operating system and machine description files should Emacs use?
12514 \`${opsysfile}' and \`${machfile}'
12515 What compiler should emacs be built with? ${CC} ${CFLAGS}
12516 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
12517 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
12518 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
12519 What window system should Emacs use? ${window_system}
12520 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
12521
12522 if test -n "${x_includes}"; then
12523 echo " Where do we find X Windows header files? ${x_includes}"
12524 else
12525 echo " Where do we find X Windows header files? Standard dirs"
12526 fi
12527 if test -n "${x_libraries}"; then
12528 echo " Where do we find X Windows libraries? ${x_libraries}"
12529 else
12530 echo " Where do we find X Windows libraries? Standard dirs"
12531 fi
12532
12533 echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
12534 echo " Does Emacs use -lXpm? ${HAVE_XPM}"
12535 echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
12536 echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
12537 echo " Does Emacs use -lungif? ${HAVE_GIF}"
12538 echo " Does Emacs use -lpng? ${HAVE_PNG}"
12539 echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
12540 echo
12541
12542 # Remove any trailing slashes in these variables.
12543 test "${prefix}" != NONE &&
12544 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
12545 test "${exec_prefix}" != NONE &&
12546 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
12547
12548 ## Check if the C preprocessor will convert `..' to `. .'. If so, set
12549 ## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
12550 ## from Makefile.c can correctly provide the arg `-traditional' to the
12551 ## C preprocessor.
12552
12553 cat >conftest.$ac_ext <<_ACEOF
12554 #line 12554 "configure"
12555 #include "confdefs.h"
12556 yes..yes
12557 _ACEOF
12558 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12559 egrep "yes..yes" >/dev/null 2>&1; then
12560 CPP_NEED_TRADITIONAL=no
12561 else
12562 CPP_NEED_TRADITIONAL=yes
12563 fi
12564 rm -f conftest*
12565
12566 ac_config_files="$ac_config_files Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in lisp/Makefile lispref/Makefile lispintro/Makefile leim/Makefile"
12567 ac_config_commands="$ac_config_commands default"
12568 cat >confcache <<\_ACEOF
12569 # This file is a shell script that caches the results of configure
12570 # tests run on this system so they can be shared between configure
12571 # scripts and configure runs, see configure's option --config-cache.
12572 # It is not useful on other systems. If it contains results you don't
12573 # want to keep, you may remove or edit it.
12574 #
12575 # config.status only pays attention to the cache file if you give it
12576 # the --recheck option to rerun configure.
12577 #
12578 # `ac_cv_env_foo' variables (set or unset) will be overriden when
12579 # loading this file, other *unset* `ac_cv_foo' will be assigned the
12580 # following values.
12581
12582 _ACEOF
12583
12584 # The following way of writing the cache mishandles newlines in values,
12585 # but we know of no workaround that is simple, portable, and efficient.
12586 # So, don't put newlines in cache variables' values.
12587 # Ultrix sh set writes to stderr and can't be redirected directly,
12588 # and sets the high bit in the cache file unless we assign to the vars.
12589 {
12590 (set) 2>&1 |
12591 case `(ac_space=' '; set | grep ac_space) 2>&1` in
12592 *ac_space=\ *)
12593 # `set' does not quote correctly, so add quotes (double-quote
12594 # substitution turns \\\\ into \\, and sed turns \\ into \).
12595 sed -n \
12596 "s/'/'\\\\''/g;
12597 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
12598 ;;
12599 *)
12600 # `set' quotes correctly as required by POSIX, so do not add quotes.
12601 sed -n \
12602 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
12603 ;;
12604 esac;
12605 } |
12606 sed '
12607 t clear
12608 : clear
12609 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
12610 t end
12611 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
12612 : end' >>confcache
12613 if cmp -s $cache_file confcache; then :; else
12614 if test -w $cache_file; then
12615 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
12616 cat confcache >$cache_file
12617 else
12618 echo "not updating unwritable cache $cache_file"
12619 fi
12620 fi
12621 rm -f confcache
12622
12623 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12624 # Let make expand exec_prefix.
12625 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12626
12627 # VPATH may cause trouble with some makes, so we remove $(srcdir),
12628 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
12629 # trailing colons and then remove the whole line if VPATH becomes empty
12630 # (actually we leave an empty line to preserve line numbers).
12631 if test "x$srcdir" = x.; then
12632 ac_vpsub='/^[ ]*VPATH[ ]*=/{
12633 s/:*\$(srcdir):*/:/;
12634 s/:*\${srcdir}:*/:/;
12635 s/:*@srcdir@:*/:/;
12636 s/^\([^=]*=[ ]*\):*/\1/;
12637 s/:*$//;
12638 s/^[^=]*=[ ]*$//;
12639 }'
12640 fi
12641
12642 DEFS=-DHAVE_CONFIG_H
12643
12644 : ${CONFIG_STATUS=./config.status}
12645 ac_clean_files_save=$ac_clean_files
12646 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
12647 { echo "$as_me:12647: creating $CONFIG_STATUS" >&5
12648 echo "$as_me: creating $CONFIG_STATUS" >&6;}
12649 cat >$CONFIG_STATUS <<_ACEOF
12650 #! $SHELL
12651 # Generated automatically by configure.
12652 # Run this file to recreate the current configuration.
12653 # Compiler output produced by configure, useful for debugging
12654 # configure, is in config.log if it exists.
12655
12656 debug=false
12657 SHELL=\${CONFIG_SHELL-$SHELL}
12658 ac_cs_invocation="\$0 \$@"
12659
12660 _ACEOF
12661
12662 cat >>$CONFIG_STATUS <<\_ACEOF
12663 # Be Bourne compatible
12664 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
12665 emulate sh
12666 NULLCMD=:
12667 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
12668 set -o posix
12669 fi
12670
12671 # Name of the executable.
12672 as_me=`echo "$0" |sed 's,.*[\\/],,'`
12673
12674 if expr a : '\(a\)' >/dev/null 2>&1; then
12675 as_expr=expr
12676 else
12677 as_expr=false
12678 fi
12679
12680 rm -f conf$$ conf$$.exe conf$$.file
12681 echo >conf$$.file
12682 if ln -s conf$$.file conf$$ 2>/dev/null; then
12683 # We could just check for DJGPP; but this test a) works b) is more generic
12684 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
12685 if test -f conf$$.exe; then
12686 # Don't use ln at all; we don't have any links
12687 as_ln_s='cp -p'
12688 else
12689 as_ln_s='ln -s'
12690 fi
12691 elif ln conf$$.file conf$$ 2>/dev/null; then
12692 as_ln_s=ln
12693 else
12694 as_ln_s='cp -p'
12695 fi
12696 rm -f conf$$ conf$$.exe conf$$.file
12697
12698 as_executable_p="test -f"
12699
12700 # Support unset when possible.
12701 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
12702 as_unset=unset
12703 else
12704 as_unset=false
12705 fi
12706
12707 # NLS nuisances.
12708 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
12709 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
12710 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
12711 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
12712 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
12713 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
12714 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
12715 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
12716
12717 # IFS
12718 # We need space, tab and new line, in precisely that order.
12719 as_nl='
12720 '
12721 IFS=" $as_nl"
12722
12723 # CDPATH.
12724 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
12725
12726 exec 6>&1
12727
12728 _ACEOF
12729
12730 # Files that config.status was made for.
12731 if test -n "$ac_config_files"; then
12732 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
12733 fi
12734
12735 if test -n "$ac_config_headers"; then
12736 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
12737 fi
12738
12739 if test -n "$ac_config_links"; then
12740 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
12741 fi
12742
12743 if test -n "$ac_config_commands"; then
12744 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
12745 fi
12746
12747 cat >>$CONFIG_STATUS <<\EOF
12748
12749 ac_cs_usage="\
12750 \`$as_me' instantiates files from templates according to the
12751 current configuration.
12752
12753 Usage: $0 [OPTIONS] [FILE]...
12754
12755 -h, --help print this help, then exit
12756 -V, --version print version number, then exit
12757 -d, --debug don't remove temporary files
12758 --recheck update $as_me by reconfiguring in the same conditions
12759 --file=FILE[:TEMPLATE]
12760 instantiate the configuration file FILE
12761 --header=FILE[:TEMPLATE]
12762 instantiate the configuration header FILE
12763
12764 Configuration files:
12765 $config_files
12766
12767 Configuration headers:
12768 $config_headers
12769
12770 Configuration commands:
12771 $config_commands
12772
12773 Report bugs to <bug-autoconf@gnu.org>."
12774 EOF
12775
12776 cat >>$CONFIG_STATUS <<EOF
12777 ac_cs_version="\\
12778 config.status
12779 configured by $0, generated by GNU Autoconf 2.52,
12780 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
12781
12782 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
12783 Free Software Foundation, Inc.
12784 This config.status script is free software; the Free Software Foundation
12785 gives unlimited permission to copy, distribute and modify it."
12786 srcdir=$srcdir
12787 INSTALL="$INSTALL"
12788 EOF
12789
12790 cat >>$CONFIG_STATUS <<\EOF
12791 # If no file are specified by the user, then we need to provide default
12792 # value. By we need to know if files were specified by the user.
12793 ac_need_defaults=:
12794 while test $# != 0
12795 do
12796 case $1 in
12797 --*=*)
12798 ac_option=`expr "x$1" : 'x\([^=]*\)='`
12799 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
12800 shift
12801 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
12802 shift
12803 ;;
12804 -*);;
12805 *) # This is not an option, so the user has probably given explicit
12806 # arguments.
12807 ac_need_defaults=false;;
12808 esac
12809
12810 case $1 in
12811 # Handling of the options.
12812 EOF
12813 cat >>$CONFIG_STATUS <<EOF
12814 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12815 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
12816 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
12817 EOF
12818 cat >>$CONFIG_STATUS <<\EOF
12819 --version | --vers* | -V )
12820 echo "$ac_cs_version"; exit 0 ;;
12821 --he | --h)
12822 # Conflict between --help and --header
12823 { { echo "$as_me:12823: error: ambiguous option: $1
12824 Try \`$0 --help' for more information." >&5
12825 echo "$as_me: error: ambiguous option: $1
12826 Try \`$0 --help' for more information." >&2;}
12827 { (exit 1); exit 1; }; };;
12828 --help | --hel | -h )
12829 echo "$ac_cs_usage"; exit 0 ;;
12830 --debug | --d* | -d )
12831 debug=: ;;
12832 --file | --fil | --fi | --f )
12833 shift
12834 CONFIG_FILES="$CONFIG_FILES $1"
12835 ac_need_defaults=false;;
12836 --header | --heade | --head | --hea )
12837 shift
12838 CONFIG_HEADERS="$CONFIG_HEADERS $1"
12839 ac_need_defaults=false;;
12840
12841 # This is an error.
12842 -*) { { echo "$as_me:12842: error: unrecognized option: $1
12843 Try \`$0 --help' for more information." >&5
12844 echo "$as_me: error: unrecognized option: $1
12845 Try \`$0 --help' for more information." >&2;}
12846 { (exit 1); exit 1; }; } ;;
12847
12848 *) ac_config_targets="$ac_config_targets $1" ;;
12849
12850 esac
12851 shift
12852 done
12853
12854 exec 5>>config.log
12855 cat >&5 << _ACEOF
12856
12857 ## ----------------------- ##
12858 ## Running config.status. ##
12859 ## ----------------------- ##
12860
12861 This file was extended by $as_me 2.52, executed with
12862 CONFIG_FILES = $CONFIG_FILES
12863 CONFIG_HEADERS = $CONFIG_HEADERS
12864 CONFIG_LINKS = $CONFIG_LINKS
12865 CONFIG_COMMANDS = $CONFIG_COMMANDS
12866 > $ac_cs_invocation
12867 on `(hostname || uname -n) 2>/dev/null | sed 1q`
12868
12869 _ACEOF
12870 EOF
12871
12872 cat >>$CONFIG_STATUS <<EOF
12873 #
12874 # INIT-COMMANDS section.
12875 #
12876
12877 GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
12878
12879 EOF
12880
12881 cat >>$CONFIG_STATUS <<\EOF
12882 for ac_config_target in $ac_config_targets
12883 do
12884 case "$ac_config_target" in
12885 # Handling of arguments.
12886 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
12887 "lib-src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
12888 "oldXMenu/Makefile" ) CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
12889 "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
12890 "lwlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
12891 "src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
12892 "lisp/Makefile" ) CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
12893 "lispref/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispref/Makefile" ;;
12894 "lispintro/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispintro/Makefile" ;;
12895 "leim/Makefile" ) CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
12896 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
12897 "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
12898 *) { { echo "$as_me:12898: error: invalid argument: $ac_config_target" >&5
12899 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
12900 { (exit 1); exit 1; }; };;
12901 esac
12902 done
12903
12904 # If the user did not use the arguments to specify the items to instantiate,
12905 # then the envvar interface is used. Set only those that are not.
12906 # We use the long form for the default assignment because of an extremely
12907 # bizarre bug on SunOS 4.1.3.
12908 if $ac_need_defaults; then
12909 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
12910 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
12911 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
12912 fi
12913
12914 # Create a temporary directory, and hook for its removal unless debugging.
12915 $debug ||
12916 {
12917 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
12918 trap '{ (exit 1); exit 1; }' 1 2 13 15
12919 }
12920
12921 # Create a (secure) tmp directory for tmp files.
12922 : ${TMPDIR=/tmp}
12923 {
12924 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
12925 test -n "$tmp" && test -d "$tmp"
12926 } ||
12927 {
12928 tmp=$TMPDIR/cs$$-$RANDOM
12929 (umask 077 && mkdir $tmp)
12930 } ||
12931 {
12932 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
12933 { (exit 1); exit 1; }
12934 }
12935
12936 EOF
12937
12938 cat >>$CONFIG_STATUS <<EOF
12939
12940 #
12941 # CONFIG_FILES section.
12942 #
12943
12944 # No need to generate the scripts if there are no CONFIG_FILES.
12945 # This happens for instance when ./config.status config.h
12946 if test -n "\$CONFIG_FILES"; then
12947 # Protect against being on the right side of a sed subst in config.status.
12948 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
12949 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
12950 s,@SHELL@,$SHELL,;t t
12951 s,@exec_prefix@,$exec_prefix,;t t
12952 s,@prefix@,$prefix,;t t
12953 s,@program_transform_name@,$program_transform_name,;t t
12954 s,@bindir@,$bindir,;t t
12955 s,@sbindir@,$sbindir,;t t
12956 s,@libexecdir@,$libexecdir,;t t
12957 s,@datadir@,$datadir,;t t
12958 s,@sysconfdir@,$sysconfdir,;t t
12959 s,@sharedstatedir@,$sharedstatedir,;t t
12960 s,@localstatedir@,$localstatedir,;t t
12961 s,@libdir@,$libdir,;t t
12962 s,@includedir@,$includedir,;t t
12963 s,@oldincludedir@,$oldincludedir,;t t
12964 s,@infodir@,$infodir,;t t
12965 s,@mandir@,$mandir,;t t
12966 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
12967 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
12968 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
12969 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
12970 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
12971 s,@build_alias@,$build_alias,;t t
12972 s,@host_alias@,$host_alias,;t t
12973 s,@target_alias@,$target_alias,;t t
12974 s,@ECHO_C@,$ECHO_C,;t t
12975 s,@ECHO_N@,$ECHO_N,;t t
12976 s,@ECHO_T@,$ECHO_T,;t t
12977 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
12978 s,@DEFS@,$DEFS,;t t
12979 s,@LIBS@,$LIBS,;t t
12980 s,@build@,$build,;t t
12981 s,@build_cpu@,$build_cpu,;t t
12982 s,@build_vendor@,$build_vendor,;t t
12983 s,@build_os@,$build_os,;t t
12984 s,@host@,$host,;t t
12985 s,@host_cpu@,$host_cpu,;t t
12986 s,@host_vendor@,$host_vendor,;t t
12987 s,@host_os@,$host_os,;t t
12988 s,@CC@,$CC,;t t
12989 s,@CFLAGS@,$CFLAGS,;t t
12990 s,@LDFLAGS@,$LDFLAGS,;t t
12991 s,@CPPFLAGS@,$CPPFLAGS,;t t
12992 s,@ac_ct_CC@,$ac_ct_CC,;t t
12993 s,@EXEEXT@,$EXEEXT,;t t
12994 s,@OBJEXT@,$OBJEXT,;t t
12995 s,@LN_S@,$LN_S,;t t
12996 s,@CPP@,$CPP,;t t
12997 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
12998 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
12999 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
13000 s,@YACC@,$YACC,;t t
13001 s,@RANLIB@,$RANLIB,;t t
13002 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
13003 s,@LIBSOUND@,$LIBSOUND,;t t
13004 s,@SET_MAKE@,$SET_MAKE,;t t
13005 s,@ALLOCA@,$ALLOCA,;t t
13006 s,@liblockfile@,$liblockfile,;t t
13007 s,@LIBOBJS@,$LIBOBJS,;t t
13008 s,@NEED_SETGID@,$NEED_SETGID,;t t
13009 s,@KMEM_GROUP@,$KMEM_GROUP,;t t
13010 s,@GETLOADAVG_LIBS@,$GETLOADAVG_LIBS,;t t
13011 s,@version@,$version,;t t
13012 s,@configuration@,$configuration,;t t
13013 s,@canonical@,$canonical,;t t
13014 s,@srcdir@,$srcdir,;t t
13015 s,@lispdir@,$lispdir,;t t
13016 s,@locallisppath@,$locallisppath,;t t
13017 s,@lisppath@,$lisppath,;t t
13018 s,@x_default_search_path@,$x_default_search_path,;t t
13019 s,@etcdir@,$etcdir,;t t
13020 s,@archlibdir@,$archlibdir,;t t
13021 s,@docdir@,$docdir,;t t
13022 s,@bitmapdir@,$bitmapdir,;t t
13023 s,@c_switch_system@,$c_switch_system,;t t
13024 s,@c_switch_machine@,$c_switch_machine,;t t
13025 s,@LD_SWITCH_X_SITE@,$LD_SWITCH_X_SITE,;t t
13026 s,@LD_SWITCH_X_SITE_AUX@,$LD_SWITCH_X_SITE_AUX,;t t
13027 s,@C_SWITCH_X_SITE@,$C_SWITCH_X_SITE,;t t
13028 s,@X_TOOLKIT_TYPE@,$X_TOOLKIT_TYPE,;t t
13029 s,@machfile@,$machfile,;t t
13030 s,@opsysfile@,$opsysfile,;t t
13031 CEOF
13032
13033 EOF
13034
13035 cat >>$CONFIG_STATUS <<\EOF
13036 # Split the substitutions into bite-sized pieces for seds with
13037 # small command number limits, like on Digital OSF/1 and HP-UX.
13038 ac_max_sed_lines=48
13039 ac_sed_frag=1 # Number of current file.
13040 ac_beg=1 # First line for current file.
13041 ac_end=$ac_max_sed_lines # Line after last line for current file.
13042 ac_more_lines=:
13043 ac_sed_cmds=
13044 while $ac_more_lines; do
13045 if test $ac_beg -gt 1; then
13046 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
13047 else
13048 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
13049 fi
13050 if test ! -s $tmp/subs.frag; then
13051 ac_more_lines=false
13052 else
13053 # The purpose of the label and of the branching condition is to
13054 # speed up the sed processing (if there are no `@' at all, there
13055 # is no need to browse any of the substitutions).
13056 # These are the two extra sed commands mentioned above.
13057 (echo ':t
13058 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
13059 if test -z "$ac_sed_cmds"; then
13060 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
13061 else
13062 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
13063 fi
13064 ac_sed_frag=`expr $ac_sed_frag + 1`
13065 ac_beg=$ac_end
13066 ac_end=`expr $ac_end + $ac_max_sed_lines`
13067 fi
13068 done
13069 if test -z "$ac_sed_cmds"; then
13070 ac_sed_cmds=cat
13071 fi
13072 fi # test -n "$CONFIG_FILES"
13073
13074 EOF
13075 cat >>$CONFIG_STATUS <<\EOF
13076 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
13077 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13078 case $ac_file in
13079 - | *:- | *:-:* ) # input from stdin
13080 cat >$tmp/stdin
13081 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13082 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13083 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13084 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13085 * ) ac_file_in=$ac_file.in ;;
13086 esac
13087
13088 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
13089 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13090 X"$ac_file" : 'X\(//\)[^/]' \| \
13091 X"$ac_file" : 'X\(//\)$' \| \
13092 X"$ac_file" : 'X\(/\)' \| \
13093 . : '\(.\)' 2>/dev/null ||
13094 echo X"$ac_file" |
13095 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13096 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13097 /^X\(\/\/\)$/{ s//\1/; q; }
13098 /^X\(\/\).*/{ s//\1/; q; }
13099 s/.*/./; q'`
13100 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13101 { case "$ac_dir" in
13102 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
13103 *) as_incr_dir=.;;
13104 esac
13105 as_dummy="$ac_dir"
13106 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
13107 case $as_mkdir_dir in
13108 # Skip DOS drivespec
13109 ?:) as_incr_dir=$as_mkdir_dir ;;
13110 *)
13111 as_incr_dir=$as_incr_dir/$as_mkdir_dir
13112 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
13113 ;;
13114 esac
13115 done; }
13116
13117 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
13118 # A "../" for each directory in $ac_dir_suffix.
13119 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
13120 else
13121 ac_dir_suffix= ac_dots=
13122 fi
13123
13124 case $srcdir in
13125 .) ac_srcdir=.
13126 if test -z "$ac_dots"; then
13127 ac_top_srcdir=.
13128 else
13129 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
13130 fi ;;
13131 [\\/]* | ?:[\\/]* )
13132 ac_srcdir=$srcdir$ac_dir_suffix;
13133 ac_top_srcdir=$srcdir ;;
13134 *) # Relative path.
13135 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
13136 ac_top_srcdir=$ac_dots$srcdir ;;
13137 esac
13138
13139 case $INSTALL in
13140 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
13141 *) ac_INSTALL=$ac_dots$INSTALL ;;
13142 esac
13143
13144 if test x"$ac_file" != x-; then
13145 { echo "$as_me:13145: creating $ac_file" >&5
13146 echo "$as_me: creating $ac_file" >&6;}
13147 rm -f "$ac_file"
13148 fi
13149 # Let's still pretend it is `configure' which instantiates (i.e., don't
13150 # use $as_me), people would be surprised to read:
13151 # /* config.h. Generated automatically by config.status. */
13152 configure_input="Generated automatically from `echo $ac_file_in |
13153 sed 's,.*/,,'` by configure."
13154
13155 # First look for the input files in the build tree, otherwise in the
13156 # src tree.
13157 ac_file_inputs=`IFS=:
13158 for f in $ac_file_in; do
13159 case $f in
13160 -) echo $tmp/stdin ;;
13161 [\\/$]*)
13162 # Absolute (can't be DOS-style, as IFS=:)
13163 test -f "$f" || { { echo "$as_me:13163: error: cannot find input file: $f" >&5
13164 echo "$as_me: error: cannot find input file: $f" >&2;}
13165 { (exit 1); exit 1; }; }
13166 echo $f;;
13167 *) # Relative
13168 if test -f "$f"; then
13169 # Build tree
13170 echo $f
13171 elif test -f "$srcdir/$f"; then
13172 # Source tree
13173 echo $srcdir/$f
13174 else
13175 # /dev/null tree
13176 { { echo "$as_me:13176: error: cannot find input file: $f" >&5
13177 echo "$as_me: error: cannot find input file: $f" >&2;}
13178 { (exit 1); exit 1; }; }
13179 fi;;
13180 esac
13181 done` || { (exit 1); exit 1; }
13182 EOF
13183 cat >>$CONFIG_STATUS <<EOF
13184 sed "$ac_vpsub
13185 $extrasub
13186 EOF
13187 cat >>$CONFIG_STATUS <<\EOF
13188 :t
13189 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
13190 s,@configure_input@,$configure_input,;t t
13191 s,@srcdir@,$ac_srcdir,;t t
13192 s,@top_srcdir@,$ac_top_srcdir,;t t
13193 s,@INSTALL@,$ac_INSTALL,;t t
13194 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
13195 rm -f $tmp/stdin
13196 if test x"$ac_file" != x-; then
13197 mv $tmp/out $ac_file
13198 else
13199 cat $tmp/out
13200 rm -f $tmp/out
13201 fi
13202
13203 done
13204 EOF
13205 cat >>$CONFIG_STATUS <<\EOF
13206
13207 #
13208 # CONFIG_HEADER section.
13209 #
13210
13211 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13212 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13213 #
13214 # ac_d sets the value in "#define NAME VALUE" lines.
13215 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
13216 ac_dB='[ ].*$,\1#\2'
13217 ac_dC=' '
13218 ac_dD=',;t'
13219 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13220 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
13221 ac_uB='$,\1#\2define\3'
13222 ac_uC=' '
13223 ac_uD=',;t'
13224
13225 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
13226 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13227 case $ac_file in
13228 - | *:- | *:-:* ) # input from stdin
13229 cat >$tmp/stdin
13230 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13231 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13232 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13233 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13234 * ) ac_file_in=$ac_file.in ;;
13235 esac
13236
13237 test x"$ac_file" != x- && { echo "$as_me:13237: creating $ac_file" >&5
13238 echo "$as_me: creating $ac_file" >&6;}
13239
13240 # First look for the input files in the build tree, otherwise in the
13241 # src tree.
13242 ac_file_inputs=`IFS=:
13243 for f in $ac_file_in; do
13244 case $f in
13245 -) echo $tmp/stdin ;;
13246 [\\/$]*)
13247 # Absolute (can't be DOS-style, as IFS=:)
13248 test -f "$f" || { { echo "$as_me:13248: error: cannot find input file: $f" >&5
13249 echo "$as_me: error: cannot find input file: $f" >&2;}
13250 { (exit 1); exit 1; }; }
13251 echo $f;;
13252 *) # Relative
13253 if test -f "$f"; then
13254 # Build tree
13255 echo $f
13256 elif test -f "$srcdir/$f"; then
13257 # Source tree
13258 echo $srcdir/$f
13259 else
13260 # /dev/null tree
13261 { { echo "$as_me:13261: error: cannot find input file: $f" >&5
13262 echo "$as_me: error: cannot find input file: $f" >&2;}
13263 { (exit 1); exit 1; }; }
13264 fi;;
13265 esac
13266 done` || { (exit 1); exit 1; }
13267 # Remove the trailing spaces.
13268 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
13269
13270 EOF
13271
13272 # Transform confdefs.h into two sed scripts, `conftest.defines' and
13273 # `conftest.undefs', that substitutes the proper values into
13274 # config.h.in to produce config.h. The first handles `#define'
13275 # templates, and the second `#undef' templates.
13276 # And first: Protect against being on the right side of a sed subst in
13277 # config.status. Protect against being in an unquoted here document
13278 # in config.status.
13279 rm -f conftest.defines conftest.undefs
13280 # Using a here document instead of a string reduces the quoting nightmare.
13281 # Putting comments in sed scripts is not portable.
13282 #
13283 # `end' is used to avoid that the second main sed command (meant for
13284 # 0-ary CPP macros) applies to n-ary macro definitions.
13285 # See the Autoconf documentation for `clear'.
13286 cat >confdef2sed.sed <<\EOF
13287 s/[\\&,]/\\&/g
13288 s,[\\$`],\\&,g
13289 t clear
13290 : clear
13291 s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
13292 t end
13293 s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
13294 : end
13295 EOF
13296 # If some macros were called several times there might be several times
13297 # the same #defines, which is useless. Nevertheless, we may not want to
13298 # sort them, since we want the *last* AC-DEFINE to be honored.
13299 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
13300 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
13301 rm -f confdef2sed.sed
13302
13303 # This sed command replaces #undef with comments. This is necessary, for
13304 # example, in the case of _POSIX_SOURCE, which is predefined and required
13305 # on some systems where configure will not decide to define it.
13306 cat >>conftest.undefs <<\EOF
13307 s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
13308 EOF
13309
13310 # Break up conftest.defines because some shells have a limit on the size
13311 # of here documents, and old seds have small limits too (100 cmds).
13312 echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
13313 echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
13314 echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
13315 echo ' :' >>$CONFIG_STATUS
13316 rm -f conftest.tail
13317 while grep . conftest.defines >/dev/null
13318 do
13319 # Write a limited-size here document to $tmp/defines.sed.
13320 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
13321 # Speed up: don't consider the non `#define' lines.
13322 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
13323 # Work around the forget-to-reset-the-flag bug.
13324 echo 't clr' >>$CONFIG_STATUS
13325 echo ': clr' >>$CONFIG_STATUS
13326 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
13327 echo 'CEOF
13328 sed -f $tmp/defines.sed $tmp/in >$tmp/out
13329 rm -f $tmp/in
13330 mv $tmp/out $tmp/in
13331 ' >>$CONFIG_STATUS
13332 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
13333 rm -f conftest.defines
13334 mv conftest.tail conftest.defines
13335 done
13336 rm -f conftest.defines
13337 echo ' fi # egrep' >>$CONFIG_STATUS
13338 echo >>$CONFIG_STATUS
13339
13340 # Break up conftest.undefs because some shells have a limit on the size
13341 # of here documents, and old seds have small limits too (100 cmds).
13342 echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
13343 rm -f conftest.tail
13344 while grep . conftest.undefs >/dev/null
13345 do
13346 # Write a limited-size here document to $tmp/undefs.sed.
13347 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
13348 # Speed up: don't consider the non `#undef'
13349 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
13350 # Work around the forget-to-reset-the-flag bug.
13351 echo 't clr' >>$CONFIG_STATUS
13352 echo ': clr' >>$CONFIG_STATUS
13353 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
13354 echo 'CEOF
13355 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
13356 rm -f $tmp/in
13357 mv $tmp/out $tmp/in
13358 ' >>$CONFIG_STATUS
13359 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
13360 rm -f conftest.undefs
13361 mv conftest.tail conftest.undefs
13362 done
13363 rm -f conftest.undefs
13364
13365 cat >>$CONFIG_STATUS <<\EOF
13366 # Let's still pretend it is `configure' which instantiates (i.e., don't
13367 # use $as_me), people would be surprised to read:
13368 # /* config.h. Generated automatically by config.status. */
13369 if test x"$ac_file" = x-; then
13370 echo "/* Generated automatically by configure. */" >$tmp/config.h
13371 else
13372 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
13373 fi
13374 cat $tmp/in >>$tmp/config.h
13375 rm -f $tmp/in
13376 if test x"$ac_file" != x-; then
13377 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
13378 { echo "$as_me:13378: $ac_file is unchanged" >&5
13379 echo "$as_me: $ac_file is unchanged" >&6;}
13380 else
13381 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13382 X"$ac_file" : 'X\(//\)[^/]' \| \
13383 X"$ac_file" : 'X\(//\)$' \| \
13384 X"$ac_file" : 'X\(/\)' \| \
13385 . : '\(.\)' 2>/dev/null ||
13386 echo X"$ac_file" |
13387 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13388 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13389 /^X\(\/\/\)$/{ s//\1/; q; }
13390 /^X\(\/\).*/{ s//\1/; q; }
13391 s/.*/./; q'`
13392 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13393 { case "$ac_dir" in
13394 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
13395 *) as_incr_dir=.;;
13396 esac
13397 as_dummy="$ac_dir"
13398 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
13399 case $as_mkdir_dir in
13400 # Skip DOS drivespec
13401 ?:) as_incr_dir=$as_mkdir_dir ;;
13402 *)
13403 as_incr_dir=$as_incr_dir/$as_mkdir_dir
13404 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
13405 ;;
13406 esac
13407 done; }
13408
13409 fi
13410 rm -f $ac_file
13411 mv $tmp/config.h $ac_file
13412 fi
13413 else
13414 cat $tmp/config.h
13415 rm -f $tmp/config.h
13416 fi
13417 done
13418 EOF
13419 cat >>$CONFIG_STATUS <<\EOF
13420
13421 #
13422 # CONFIG_COMMANDS section.
13423 #
13424 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
13425 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
13426 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
13427
13428 case $ac_dest in
13429 default )
13430
13431 ### Make the necessary directories, if they don't exist.
13432 for dir in etc lisp ; do
13433 test -d ${dir} || mkdir ${dir}
13434 done
13435
13436 # Build src/Makefile from ${srcdir}/src/Makefile.c
13437 # and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
13438 # This must be done after src/config.h is built, since we rely on that file.
13439
13440 # Now get this: Some word that is part of the ${srcdir} directory name
13441 # or the ${configuration} value might, just might, happen to be an
13442 # identifier like `sun4' or `i386' or something, and be predefined by
13443 # the C preprocessor to some helpful value like 1, or maybe the empty
13444 # string. Needless to say consequent macro substitutions are less
13445 # than conducive to the makefile finding the correct directory.
13446 undefs="`echo $top_srcdir $configuration $canonical |
13447 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
13448 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
13449 `"
13450
13451 echo creating src/epaths.h
13452 ${MAKE-make} epaths-force
13453
13454 # As of 2000-11-19, newest development versions of GNU cpp preprocess
13455 # `..' to `. .' unless invoked with -traditional
13456
13457 if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
13458 CPPFLAGS="$CPPFLAGS -traditional"
13459 fi
13460
13461 echo creating lib-src/Makefile
13462 ( cd lib-src
13463 rm -f junk.c junk1.c junk2.c
13464 sed -e '/start of cpp stuff/q' \
13465 < Makefile.c > junk1.c
13466 sed -e '1,/start of cpp stuff/d'\
13467 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
13468 < Makefile.c > junk.c
13469 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
13470 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
13471 cat junk1.c junk2.c > Makefile.new
13472 rm -f junk.c junk1.c junk2.c
13473 chmod 444 Makefile.new
13474 mv -f Makefile.new Makefile
13475 )
13476
13477 echo creating src/Makefile
13478 ( cd src
13479 rm -f junk.c junk1.c junk2.c
13480 sed -e '/start of cpp stuff/q' \
13481 < Makefile.c > junk1.c
13482 sed -e '1,/start of cpp stuff/d'\
13483 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
13484 < Makefile.c > junk.c
13485 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
13486 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
13487 cat junk1.c junk2.c > Makefile.new
13488 rm -f junk.c junk1.c junk2.c
13489 chmod 444 Makefile.new
13490 mv -f Makefile.new Makefile
13491 )
13492
13493 if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
13494 echo creating src/.gdbinit
13495 echo source $srcdir/src/.gdbinit > src/.gdbinit
13496 fi
13497
13498 # This is how we know whether to re-run configure in certain cases.
13499 touch src/config.stamp
13500
13501 ;;
13502 esac
13503 done
13504 EOF
13505
13506 cat >>$CONFIG_STATUS <<\EOF
13507
13508 { (exit 0); exit 0; }
13509 EOF
13510 chmod +x $CONFIG_STATUS
13511 ac_clean_files=$ac_clean_files_save
13512
13513 # configure is writing to config.log, and then calls config.status.
13514 # config.status does its own redirection, appending to config.log.
13515 # Unfortunately, on DOS this fails, as config.log is still kept open
13516 # by configure, so config.status won't be able to write to it; its
13517 # output is simply discarded. So we exec the FD to /dev/null,
13518 # effectively closing config.log, so it can be properly (re)opened and
13519 # appended to by config.status. When coming back to configure, we
13520 # need to make the FD available again.
13521 if test "$no_create" != yes; then
13522 ac_cs_success=:
13523 exec 5>/dev/null
13524 $SHELL $CONFIG_STATUS || ac_cs_success=false
13525 exec 5>>config.log
13526 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
13527 # would make configure fail if this is the last instruction.
13528 $ac_cs_success || { (exit 1); exit 1; }
13529 fi
13530