(struct sound_device): Function pointer field "write"
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
925c2f3f 3# Generated by Autoconf 2.52.
ba4481b5 4#
925c2f3f 5# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
503d2be0 6# Free Software Foundation, Inc.
ba4481b5
DL
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
8799b3e4 9
925c2f3f
EZ
10# Avoid depending upon Character Ranges.
11as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14as_cr_digits='0123456789'
15as_cr_alnum=$as_cr_Letters$as_cr_digits
8799b3e4 16
925c2f3f
EZ
17# Sed expression to map a string onto a valid variable name.
18as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
8799b3e4 19
925c2f3f
EZ
20# Sed expression to map a string onto a valid CPP name.
21as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
503d2be0
AS
22
23# Be Bourne compatible
24if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25 emulate sh
26 NULLCMD=:
27elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28 set -o posix
29fi
30
31# Name of the executable.
925c2f3f 32as_me=`echo "$0" |sed 's,.*[\\/],,'`
503d2be0
AS
33
34if expr a : '\(a\)' >/dev/null 2>&1; then
35 as_expr=expr
36else
37 as_expr=false
38fi
39
40rm -f conf$$ conf$$.exe conf$$.file
41echo >conf$$.file
42if 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
51elif ln conf$$.file conf$$ 2>/dev/null; then
52 as_ln_s=ln
53else
54 as_ln_s='cp -p'
55fi
56rm -f conf$$ conf$$.exe conf$$.file
57
58as_executable_p="test -f"
59
925c2f3f
EZ
60# Support unset when possible.
61if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
62 as_unset=unset
63else
64 as_unset=false
65fi
503d2be0 66
925c2f3f
EZ
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; }
503d2be0
AS
76
77# IFS
78# We need space, tab and new line, in precisely that order.
79as_nl='
80'
81IFS=" $as_nl"
82
83# CDPATH.
925c2f3f 84$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
503d2be0
AS
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.
89ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
90
91exec 6>&1
92
93#
94# Initializations.
95#
ba4481b5 96ac_default_prefix=/usr/local
503d2be0
AS
97cross_compiling=no
98subdirs=
925c2f3f 99MFLAGS= MAKEFLAGS=
503d2be0
AS
100SHELL=${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
107ac_unique_file="src/lisp.h"
108# Factoring default headers for most tests.
109ac_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"
ba4481b5
DL
144
145# Initialize some variables set by options.
503d2be0
AS
146ac_init_help=
147ac_init_version=false
ba4481b5
DL
148# The variables have the same names as the options, with
149# dashes changed to underlines.
503d2be0 150cache_file=/dev/null
ba4481b5 151exec_prefix=NONE
ba4481b5 152no_create=
ba4481b5
DL
153no_recursion=
154prefix=NONE
155program_prefix=NONE
156program_suffix=NONE
157program_transform_name=s,x,x,
158silent=
159site=
160srcdir=
ba4481b5
DL
161verbose=
162x_includes=NONE
163x_libraries=NONE
503d2be0
AS
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.
ba4481b5
DL
170bindir='${exec_prefix}/bin'
171sbindir='${exec_prefix}/sbin'
172libexecdir='${exec_prefix}/libexec'
173datadir='${prefix}/share'
174sysconfdir='${prefix}/etc'
175sharedstatedir='${prefix}/com'
176localstatedir='${prefix}/var'
177libdir='${exec_prefix}/lib'
178includedir='${prefix}/include'
179oldincludedir='/usr/include'
180infodir='${prefix}/info'
181mandir='${prefix}/man'
182
925c2f3f
EZ
183# Identity of this package.
184PACKAGE_NAME=
185PACKAGE_TARNAME=
186PACKAGE_VERSION=
187PACKAGE_STRING=
188PACKAGE_BUGREPORT=
189
ba4481b5
DL
190ac_prev=
191for ac_option
192do
ba4481b5
DL
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
503d2be0 200 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
ba4481b5
DL
201
202 # Accept the important Cygnus configure options, so we can diagnose typos.
203
503d2be0 204 case $ac_option in
ba4481b5
DL
205
206 -bindir | --bindir | --bindi | --bind | --bin | --bi)
207 ac_prev=bindir ;;
208 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 209 bindir=$ac_optarg ;;
ba4481b5
DL
210
211 -build | --build | --buil | --bui | --bu)
503d2be0 212 ac_prev=build_alias ;;
ba4481b5 213 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 214 build_alias=$ac_optarg ;;
ba4481b5
DL
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=*)
503d2be0
AS
221 cache_file=$ac_optarg ;;
222
223 --config-cache | -C)
224 cache_file=config.cache ;;
ba4481b5
DL
225
226 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
227 ac_prev=datadir ;;
228 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
229 | --da=*)
503d2be0 230 datadir=$ac_optarg ;;
ba4481b5
DL
231
232 -disable-* | --disable-*)
503d2be0 233 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 234 # Reject names that are not valid shell variable names.
503d2be0
AS
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" ;;
ba4481b5
DL
240
241 -enable-* | --enable-*)
503d2be0 242 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 243 # Reject names that are not valid shell variable names.
503d2be0
AS
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"`;;
ba4481b5
DL
250 *) ac_optarg=yes ;;
251 esac
503d2be0 252 eval "enable_$ac_feature='$ac_optarg'" ;;
ba4481b5
DL
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=*)
503d2be0 261 exec_prefix=$ac_optarg ;;
ba4481b5
DL
262
263 -gas | --gas | --ga | --g)
264 # Obsolete; use --with-gas.
265 with_gas=yes ;;
266
503d2be0
AS
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 ;;
ba4481b5
DL
273
274 -host | --host | --hos | --ho)
503d2be0 275 ac_prev=host_alias ;;
ba4481b5 276 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 277 host_alias=$ac_optarg ;;
ba4481b5
DL
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=*)
503d2be0 284 includedir=$ac_optarg ;;
ba4481b5
DL
285
286 -infodir | --infodir | --infodi | --infod | --info | --inf)
287 ac_prev=infodir ;;
288 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 289 infodir=$ac_optarg ;;
ba4481b5
DL
290
291 -libdir | --libdir | --libdi | --libd)
292 ac_prev=libdir ;;
293 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 294 libdir=$ac_optarg ;;
ba4481b5
DL
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=*)
503d2be0 301 libexecdir=$ac_optarg ;;
ba4481b5
DL
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=*)
503d2be0 310 localstatedir=$ac_optarg ;;
ba4481b5
DL
311
312 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
313 ac_prev=mandir ;;
314 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 315 mandir=$ac_optarg ;;
ba4481b5
DL
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 \
925c2f3f 322 | --no-cr | --no-c)
ba4481b5
DL
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=*)
503d2be0 336 oldincludedir=$ac_optarg ;;
ba4481b5
DL
337
338 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
339 ac_prev=prefix ;;
340 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 341 prefix=$ac_optarg ;;
ba4481b5
DL
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=*)
503d2be0 348 program_prefix=$ac_optarg ;;
ba4481b5
DL
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=*)
503d2be0 355 program_suffix=$ac_optarg ;;
ba4481b5
DL
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=*)
503d2be0 372 program_transform_name=$ac_optarg ;;
ba4481b5
DL
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=*)
503d2be0 382 sbindir=$ac_optarg ;;
ba4481b5
DL
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=*)
503d2be0 393 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
394
395 -site | --site | --sit)
396 ac_prev=site ;;
397 -site=* | --site=* | --sit=*)
503d2be0 398 site=$ac_optarg ;;
ba4481b5
DL
399
400 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
401 ac_prev=srcdir ;;
402 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 403 srcdir=$ac_optarg ;;
ba4481b5
DL
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=*)
503d2be0 410 sysconfdir=$ac_optarg ;;
ba4481b5
DL
411
412 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 413 ac_prev=target_alias ;;
ba4481b5 414 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 415 target_alias=$ac_optarg ;;
ba4481b5
DL
416
417 -v | -verbose | --verbose | --verbos | --verbo | --verb)
418 verbose=yes ;;
419
503d2be0
AS
420 -version | --version | --versio | --versi | --vers | -V)
421 ac_init_version=: ;;
ba4481b5
DL
422
423 -with-* | --with-*)
503d2be0 424 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 425 # Reject names that are not valid shell variable names.
503d2be0
AS
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; }; }
ba4481b5 429 ac_package=`echo $ac_package| sed 's/-/_/g'`
503d2be0
AS
430 case $ac_option in
431 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
ba4481b5
DL
432 *) ac_optarg=yes ;;
433 esac
503d2be0 434 eval "with_$ac_package='$ac_optarg'" ;;
ba4481b5
DL
435
436 -without-* | --without-*)
503d2be0 437 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 438 # Reject names that are not valid shell variable names.
503d2be0
AS
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" ;;
ba4481b5
DL
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=*)
503d2be0 454 x_includes=$ac_optarg ;;
ba4481b5
DL
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=*)
503d2be0 461 x_libraries=$ac_optarg ;;
ba4481b5 462
503d2be0
AS
463 -*) { echo "$as_me: error: unrecognized option: $ac_option
464Try \`$0 --help' for more information." >&2
465 { (exit 1); exit 1; }; }
ba4481b5
DL
466 ;;
467
503d2be0
AS
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
ba4481b5 478 *)
503d2be0
AS
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}
ba4481b5
DL
484 ;;
485
486 esac
487done
488
489if test -n "$ac_prev"; then
503d2be0
AS
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; }; }
ba4481b5 493fi
ba4481b5 494
503d2be0
AS
495# Be sure to have absolute paths.
496for ac_var in exec_prefix prefix
497do
498 eval ac_val=$`echo $ac_var`
499 case $ac_val in
500 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
925c2f3f 501 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503d2be0
AS
502 { (exit 1); exit 1; }; };;
503 esac
504done
ba4481b5 505
503d2be0
AS
506# Be sure to have absolute paths.
507for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
508 localstatedir libdir includedir oldincludedir infodir mandir
ba4481b5 509do
503d2be0
AS
510 eval ac_val=$`echo $ac_var`
511 case $ac_val in
512 [\\/$]* | ?:[\\/]* ) ;;
925c2f3f 513 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503d2be0 514 { (exit 1); exit 1; }; };;
ba4481b5
DL
515 esac
516done
517
503d2be0
AS
518# There might be people who depend on the old broken behavior: `$host'
519# used to hold the argument of --host etc.
520build=$build_alias
521host=$host_alias
522target=$target_alias
523
925c2f3f 524# FIXME: should be removed in autoconf 3.0.
503d2be0
AS
525if 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
533fi
ba4481b5 534
503d2be0
AS
535ac_tool_prefix=
536test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 537
503d2be0 538test "$silent" = yes && exec 6>/dev/null
ba4481b5
DL
539
540# Find the source files, if location was not specified.
541if test -z "$srcdir"; then
542 ac_srcdir_defaulted=yes
543 # Try the directory containing this script, then its parent.
925c2f3f
EZ
544 ac_prog=$0
545 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
546 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
ba4481b5
DL
547 srcdir=$ac_confdir
548 if test ! -r $srcdir/$ac_unique_file; then
549 srcdir=..
550 fi
551else
552 ac_srcdir_defaulted=no
553fi
554if test ! -r $srcdir/$ac_unique_file; then
555 if test "$ac_srcdir_defaulted" = yes; then
925c2f3f 556 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
503d2be0 557 { (exit 1); exit 1; }; }
ba4481b5 558 else
925c2f3f 559 { echo "$as_me: error: cannot find sources in $srcdir" >&2
503d2be0 560 { (exit 1); exit 1; }; }
ba4481b5
DL
561 fi
562fi
503d2be0
AS
563srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
564ac_env_build_alias_set=${build_alias+set}
565ac_env_build_alias_value=$build_alias
566ac_cv_env_build_alias_set=${build_alias+set}
567ac_cv_env_build_alias_value=$build_alias
568ac_env_host_alias_set=${host_alias+set}
569ac_env_host_alias_value=$host_alias
570ac_cv_env_host_alias_set=${host_alias+set}
571ac_cv_env_host_alias_value=$host_alias
572ac_env_target_alias_set=${target_alias+set}
573ac_env_target_alias_value=$target_alias
574ac_cv_env_target_alias_set=${target_alias+set}
575ac_cv_env_target_alias_value=$target_alias
576ac_env_CC_set=${CC+set}
577ac_env_CC_value=$CC
578ac_cv_env_CC_set=${CC+set}
579ac_cv_env_CC_value=$CC
580ac_env_CFLAGS_set=${CFLAGS+set}
581ac_env_CFLAGS_value=$CFLAGS
582ac_cv_env_CFLAGS_set=${CFLAGS+set}
583ac_cv_env_CFLAGS_value=$CFLAGS
584ac_env_LDFLAGS_set=${LDFLAGS+set}
585ac_env_LDFLAGS_value=$LDFLAGS
586ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
587ac_cv_env_LDFLAGS_value=$LDFLAGS
588ac_env_CPPFLAGS_set=${CPPFLAGS+set}
589ac_env_CPPFLAGS_value=$CPPFLAGS
590ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
591ac_cv_env_CPPFLAGS_value=$CPPFLAGS
592ac_env_CPP_set=${CPP+set}
593ac_env_CPP_value=$CPP
594ac_cv_env_CPP_set=${CPP+set}
595ac_cv_env_CPP_value=$CPP
596
597#
598# Report the --help message.
599#
600if 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.
925c2f3f 603 cat <<EOF
503d2be0
AS
604\`configure' configures this package to adapt to many kinds of systems.
605
606Usage: $0 [OPTION]... [VAR=VALUE]...
607
608To assign environment variables (e.g., CC, CFLAGS...), specify them as
609VAR=VALUE. See below for descriptions of some of the useful variables.
610
611Defaults for the options are specified in brackets.
612
613Configuration:
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
925c2f3f 624EOF
503d2be0 625
925c2f3f 626 cat <<EOF
503d2be0
AS
627Installation 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
633By default, \`make install' will install all the files in
634\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
635an installation prefix other than \`$ac_default_prefix' using \`--prefix',
636for instance \`--prefix=\$HOME'.
637
638For better control, use the options below.
639
640Fine 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]
925c2f3f 653EOF
503d2be0 654
925c2f3f 655 cat <<\EOF
503d2be0 656
ba5da88a
PJ
657Program 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
503d2be0
AS
662X features:
663 --x-includes=DIR X include files are in DIR
664 --x-libraries=DIR X library files are in DIR
665
666System types:
667 --build=BUILD configure for building on BUILD [guessed]
925c2f3f
EZ
668 --host=HOST build programs to run on HOST [BUILD]
669EOF
503d2be0
AS
670fi
671
672if test -n "$ac_init_help"; then
673
925c2f3f 674 cat <<\EOF
503d2be0
AS
675
676Optional 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
681Optional Packages:
682 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
683 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
98418dba 684 --with-game-dir use a shared game directory if possible
6ef02752 685 --with-game-user use specified user for game directory
503d2be0
AS
686 --without-gcc don't use GCC to compile Emacs if GCC is found
687 --without-pop don't support POP mail retrieval with movemail
688 --with-kerberos support Kerberos-authenticated POP
689 --with-kerberos5 support Kerberos version 5 authenticated POP
690 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 691 --without-sound don't compile with sound support
503d2be0
AS
692 --with-x-toolkit=KIT use an X toolkit (KIT = yes/lucid/athena/motif/no)
693 --with-xpm use -lXpm for displaying XPM images
694 --with-jpeg use -ljpeg for displaying JPEG images
695 --with-tiff use -ltiff for displaying TIFF images
696 --with-gif use -lungif for displaying GIF images
697 --with-png use -lpng for displaying PNG images
698 --without-toolkit-scroll-bars
cc227489
MB
699 don't use Motif or Xaw3d scroll bars
700 --without-xim don't use X11 XIM
e0f712ba 701 --without-carbon don't use Carbon GUI on Mac OS X
503d2be0
AS
702 --with-x use the X Window System
703
704Some influential environment variables:
705 CC C compiler command
706 CFLAGS C compiler flags
707 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
708 nonstandard directory <lib dir>
709 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
710 headers in a nonstandard directory <include dir>
711 CPP C preprocessor
712
713Use these variables to override the choices made by `configure' or to help
714it to find libraries and programs with nonstandard names/locations.
715
925c2f3f 716EOF
503d2be0
AS
717fi
718
719if test "$ac_init_help" = "recursive"; then
720 # If there are subdirs, report their specific --help.
721 ac_popdir=`pwd`
925c2f3f
EZ
722 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
723 cd $ac_subdir
724 # A "../" for each directory in /$ac_subdir.
725 ac_dots=`echo $ac_subdir |
726 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
727
728 case $srcdir in
729 .) # No --srcdir option. We are building in place.
730 ac_sub_srcdir=$srcdir ;;
731 [\\/]* | ?:[\\/]* ) # Absolute path.
732 ac_sub_srcdir=$srcdir/$ac_subdir ;;
733 *) # Relative path.
734 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
735 esac
503d2be0
AS
736
737 # Check for guested configure; otherwise get Cygnus style configure.
925c2f3f 738 if test -f $ac_sub_srcdir/configure.gnu; then
503d2be0 739 echo
925c2f3f
EZ
740 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
741 elif test -f $ac_sub_srcdir/configure; then
503d2be0 742 echo
925c2f3f
EZ
743 $SHELL $ac_sub_srcdir/configure --help=recursive
744 elif test -f $ac_sub_srcdir/configure.ac ||
745 test -f $ac_sub_srcdir/configure.in; then
503d2be0
AS
746 echo
747 $ac_configure --help
748 else
925c2f3f 749 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
503d2be0
AS
750 fi
751 cd $ac_popdir
752 done
753fi
754
755test -n "$ac_init_help" && exit 0
756if $ac_init_version; then
925c2f3f 757 cat <<\EOF
503d2be0 758
925c2f3f 759Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
503d2be0
AS
760Free Software Foundation, Inc.
761This configure script is free software; the Free Software Foundation
762gives unlimited permission to copy, distribute and modify it.
925c2f3f 763EOF
503d2be0
AS
764 exit 0
765fi
766exec 5>config.log
925c2f3f 767cat >&5 <<EOF
503d2be0
AS
768This file contains any messages produced by compilers while
769running configure, to aid debugging if configure makes a mistake.
770
771It was created by $as_me, which was
925c2f3f 772generated by GNU Autoconf 2.52. Invocation command line was
503d2be0
AS
773
774 $ $0 $@
775
925c2f3f 776EOF
503d2be0
AS
777{
778cat <<_ASUNAME
925c2f3f
EZ
779## ---------- ##
780## Platform. ##
781## ---------- ##
503d2be0
AS
782
783hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
784uname -m = `(uname -m) 2>/dev/null || echo unknown`
785uname -r = `(uname -r) 2>/dev/null || echo unknown`
786uname -s = `(uname -s) 2>/dev/null || echo unknown`
787uname -v = `(uname -v) 2>/dev/null || echo unknown`
788
789/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
790/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
791
792/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
793/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
794/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
795hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
796/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
797/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
798/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
799
925c2f3f 800PATH = $PATH
98418dba 801
925c2f3f 802_ASUNAME
503d2be0
AS
803} >&5
804
925c2f3f
EZ
805cat >&5 <<EOF
806## ------------ ##
807## Core tests. ##
808## ------------ ##
503d2be0 809
925c2f3f 810EOF
503d2be0
AS
811
812# Keep a trace of the command line.
813# Strip out --no-create and --no-recursion so they do not pile up.
814# Also quote any args containing shell meta-characters.
815ac_configure_args=
816ac_sep=
817for ac_arg
818do
819 case $ac_arg in
820 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
925c2f3f 821 | --no-cr | --no-c) ;;
503d2be0 822 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
925c2f3f 823 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
503d2be0 824 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
925c2f3f
EZ
825 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
826 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
827 ac_sep=" " ;;
828 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
829 ac_sep=" " ;;
503d2be0
AS
830 esac
831 # Get rid of the leading space.
832done
833
834# When interrupted or exit'd, cleanup temporary files, and complete
835# config.log. We remove comments because anyway the quotes in there
836# would cause problems or look ugly.
837trap 'exit_status=$?
838 # Save into config.log some information that might help in debugging.
925c2f3f
EZ
839 echo >&5
840 echo "## ----------------- ##" >&5
841 echo "## Cache variables. ##" >&5
842 echo "## ----------------- ##" >&5
843 echo >&5
844 # The following way of writing the cache mishandles newlines in values,
503d2be0
AS
845{
846 (set) 2>&1 |
847 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
848 *ac_space=\ *)
849 sed -n \
850 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
851 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
852 ;;
853 *)
854 sed -n \
855 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
856 ;;
857 esac;
925c2f3f
EZ
858} >&5
859 sed "/^$/d" confdefs.h >conftest.log
860 if test -s conftest.log; then
861 echo >&5
862 echo "## ------------ ##" >&5
863 echo "## confdefs.h. ##" >&5
864 echo "## ------------ ##" >&5
865 echo >&5
866 cat conftest.log >&5
867 fi
868 (echo; echo) >&5
869 test "$ac_signal" != 0 &&
870 echo "$as_me: caught signal $ac_signal" >&5
871 echo "$as_me: exit $exit_status" >&5
872 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
503d2be0
AS
873 exit $exit_status
874 ' 0
875for ac_signal in 1 2 13 15; do
876 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
877done
878ac_signal=0
879
880# confdefs.h avoids OS command line length limits that DEFS can exceed.
881rm -rf conftest* confdefs.h
882# AIX cpp loses on an empty file, so make sure it contains at least a newline.
883echo >confdefs.h
ba4481b5 884
503d2be0 885# Let the site file select an alternate cache file if it wants to.
ba4481b5
DL
886# Prefer explicitly selected file to automatically selected ones.
887if test -z "$CONFIG_SITE"; then
888 if test "x$prefix" != xNONE; then
889 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
890 else
891 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
892 fi
893fi
894for ac_site_file in $CONFIG_SITE; do
895 if test -r "$ac_site_file"; then
925c2f3f 896 { echo "$as_me:896: loading site script $ac_site_file" >&5
503d2be0 897echo "$as_me: loading site script $ac_site_file" >&6;}
925c2f3f 898 cat "$ac_site_file" >&5
ba4481b5
DL
899 . "$ac_site_file"
900 fi
901done
902
903if test -r "$cache_file"; then
503d2be0
AS
904 # Some versions of bash will fail to source /dev/null (special
905 # files actually), so we avoid doing that.
906 if test -f "$cache_file"; then
925c2f3f 907 { echo "$as_me:907: loading cache $cache_file" >&5
503d2be0
AS
908echo "$as_me: loading cache $cache_file" >&6;}
909 case $cache_file in
910 [\\/]* | ?:[\\/]* ) . $cache_file;;
911 *) . ./$cache_file;;
912 esac
913 fi
ba4481b5 914else
925c2f3f 915 { echo "$as_me:915: creating cache $cache_file" >&5
503d2be0
AS
916echo "$as_me: creating cache $cache_file" >&6;}
917 >$cache_file
918fi
919
920# Check that the precious variables saved in the cache have kept the same
921# value.
922ac_cache_corrupted=false
923for ac_var in `(set) 2>&1 |
924 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
925 eval ac_old_set=\$ac_cv_env_${ac_var}_set
926 eval ac_new_set=\$ac_env_${ac_var}_set
927 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
928 eval ac_new_val="\$ac_env_${ac_var}_value"
929 case $ac_old_set,$ac_new_set in
930 set,)
925c2f3f 931 { echo "$as_me:931: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
932echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
933 ac_cache_corrupted=: ;;
934 ,set)
925c2f3f 935 { echo "$as_me:935: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
936echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
937 ac_cache_corrupted=: ;;
938 ,);;
939 *)
940 if test "x$ac_old_val" != "x$ac_new_val"; then
925c2f3f 941 { echo "$as_me:941: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 942echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
925c2f3f 943 { echo "$as_me:943: former value: $ac_old_val" >&5
503d2be0 944echo "$as_me: former value: $ac_old_val" >&2;}
925c2f3f 945 { echo "$as_me:945: current value: $ac_new_val" >&5
503d2be0
AS
946echo "$as_me: current value: $ac_new_val" >&2;}
947 ac_cache_corrupted=:
948 fi;;
949 esac
925c2f3f
EZ
950 # Pass precious variables to config.status. It doesn't matter if
951 # we pass some twice (in addition to the command line arguments).
503d2be0
AS
952 if test "$ac_new_set" = set; then
953 case $ac_new_val in
954 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
925c2f3f
EZ
955 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
956 ac_configure_args="$ac_configure_args '$ac_arg'"
957 ;;
958 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
959 ;;
503d2be0
AS
960 esac
961 fi
962done
963if $ac_cache_corrupted; then
925c2f3f 964 { echo "$as_me:964: error: changes in the environment can compromise the build" >&5
503d2be0 965echo "$as_me: error: changes in the environment can compromise the build" >&2;}
925c2f3f 966 { { echo "$as_me:966: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
967echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
968 { (exit 1); exit 1; }; }
ba4481b5
DL
969fi
970
971ac_ext=c
ba4481b5 972ac_cpp='$CPP $CPPFLAGS'
503d2be0
AS
973ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
974ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
975ac_compiler_gnu=$ac_cv_c_compiler_gnu
976
925c2f3f
EZ
977case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
978 *c*,-n*) ECHO_N= ECHO_C='
979' ECHO_T=' ' ;;
980 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
981 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
982esac
983echo "#! $SHELL" >conftest.sh
984echo "exit 0" >>conftest.sh
985chmod +x conftest.sh
986if { (echo "$as_me:986: PATH=\".;.\"; conftest.sh") >&5
987 (PATH=".;."; conftest.sh) 2>&5
988 ac_status=$?
989 echo "$as_me:989: \$? = $ac_status" >&5
990 (exit $ac_status); }; then
991 ac_path_separator=';'
992else
993 ac_path_separator=:
994fi
995PATH_SEPARATOR="$ac_path_separator"
996rm -f conftest.sh
ba4481b5 997
8799b3e4 998ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 999
ba5da88a
PJ
1000test "$program_prefix" != NONE &&
1001 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1002# Use a double $ so make ignores it.
1003test "$program_suffix" != NONE &&
1004 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1005# Double any \ or $. echo might interpret backslashes.
1006# By default was `s,x,x', remove it if useless.
1007cat <<\_ACEOF >conftest.sed
1008s/[\\$]/&&/g;s/;s,x,x,$//
1009_ACEOF
1010program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1011rm conftest.sed
1012
ba4481b5
DL
1013lispdir='${datadir}/emacs/${version}/lisp'
1014locallisppath='${datadir}/emacs/${version}/site-lisp:'\
1015'${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
1016lisppath='${locallisppath}:${lispdir}'
1017etcdir='${datadir}/emacs/${version}/etc'
1018archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1019docdir='${datadir}/emacs/${version}/etc'
98418dba
CW
1020gamedir=yes
1021
98418dba
CW
1022# Check whether --with-game-dir or --without-game-dir was given.
1023if test "${with_game_dir+set}" = set; then
1024 withval="$with_game_dir"
8799b3e4
CW
1025
1026 gamedir="$withval"
98418dba
CW
1027
1028fi;
8799b3e4
CW
1029if test "$gamedir" = yes; then
1030 gamedir="${localstatedir}/games/emacs"
1031fi
1032eval tgamedir=\"$gamedir\"
1033if test "$gamedir" != no; then
1034
925c2f3f 1035cat >>confdefs.h <<EOF
8799b3e4 1036#define HAVE_SHARED_GAME_DIR "$tgamedir"
925c2f3f 1037EOF
8799b3e4
CW
1038
1039fi
98418dba
CW
1040
1041gameuser=games
1042
1043# Check whether --with-game-user or --without-game-user was given.
1044if test "${with_game_user+set}" = set; then
1045 withval="$with_game_user"
1046 gameuser="$withval"
1047fi;
1048
ba4481b5
DL
1049# Check whether --with-gcc or --without-gcc was given.
1050if test "${with_gcc+set}" = set; then
1051 withval="$with_gcc"
503d2be0
AS
1052
1053fi;
ba4481b5
DL
1054
1055# Check whether --with-pop or --without-pop was given.
1056if test "${with_pop+set}" = set; then
1057 withval="$with_pop"
243cf185 1058 if test "$withval" = yes; then
925c2f3f 1059 cat >>confdefs.h <<\EOF
ba4481b5 1060#define MAIL_USE_POP 1
925c2f3f 1061EOF
ba4481b5 1062
243cf185
DL
1063else :
1064fi
3d9fec71 1065else
925c2f3f 1066 cat >>confdefs.h <<\EOF
3d9fec71 1067#define MAIL_USE_POP 1
925c2f3f 1068EOF
3d9fec71 1069
503d2be0 1070fi;
ba4481b5 1071
a21616bd
KR
1072# Check whether --with-kerberos or --without-kerberos was given.
1073if test "${with_kerberos+set}" = set; then
1074 withval="$with_kerberos"
925c2f3f 1075 cat >>confdefs.h <<\EOF
a21616bd 1076#define KERBEROS 1
925c2f3f 1077EOF
a21616bd 1078
503d2be0 1079fi;
a21616bd
KR
1080
1081# Check whether --with-kerberos5 or --without-kerberos5 was given.
1082if test "${with_kerberos5+set}" = set; then
1083 withval="$with_kerberos5"
1084 if test "${with_kerberos5+set}" = set; then
1085 if test "${with_kerberos+set}" != set; then
1086 with_kerberos=yes
925c2f3f 1087 cat >>confdefs.h <<\EOF
a21616bd 1088#define KERBEROS 1
925c2f3f 1089EOF
a21616bd
KR
1090
1091 fi
1092fi
b936fae4 1093
925c2f3f 1094cat >>confdefs.h <<\EOF
a21616bd 1095#define KERBEROS5 1
925c2f3f 1096EOF
a21616bd 1097
503d2be0 1098fi;
a21616bd 1099
ba4481b5
DL
1100# Check whether --with-hesiod or --without-hesiod was given.
1101if test "${with_hesiod+set}" = set; then
1102 withval="$with_hesiod"
b936fae4 1103
925c2f3f 1104cat >>confdefs.h <<\EOF
ba4481b5 1105#define HESIOD 1
925c2f3f 1106EOF
ba4481b5 1107
503d2be0 1108fi;
ba4481b5 1109
2c9dccc9
PJ
1110# Check whether --with-sound or --without-sound was given.
1111if test "${with_sound+set}" = set; then
1112 withval="$with_sound"
1113
1114fi;
1115
ba4481b5
DL
1116# Check whether --with-x-toolkit or --without-x-toolkit was given.
1117if test "${with_x_toolkit+set}" = set; then
1118 withval="$with_x_toolkit"
1119 case "${withval}" in
1120 y | ye | yes ) val=athena ;;
1121 n | no ) val=no ;;
1122 l | lu | luc | luci | lucid ) val=lucid ;;
1123 a | at | ath | athe | athen | athena ) val=athena ;;
1124 m | mo | mot | moti | motif ) val=motif ;;
1125 * )
925c2f3f 1126{ { echo "$as_me:1126: error: \`--with-x-toolkit=$withval' is invalid\;
ba4481b5 1127this option's value should be \`yes', \`no', \`lucid', \`athena', or \`motif'.
503d2be0
AS
1128Currently, \`yes', \`athena' and \`lucid' are synonyms." >&5
1129echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid\;
1130this option's value should be \`yes', \`no', \`lucid', \`athena', or \`motif'.
1131Currently, \`yes', \`athena' and \`lucid' are synonyms." >&2;}
1132 { (exit 1); exit 1; }; }
ba4481b5
DL
1133 ;;
1134 esac
1135 with_x_toolkit=$val
1136
503d2be0 1137fi;
ba4481b5
DL
1138
1139# Check whether --with-xpm or --without-xpm was given.
1140if test "${with_xpm+set}" = set; then
1141 withval="$with_xpm"
503d2be0
AS
1142
1143fi;
ba4481b5
DL
1144
1145# Check whether --with-jpeg or --without-jpeg was given.
1146if test "${with_jpeg+set}" = set; then
1147 withval="$with_jpeg"
503d2be0
AS
1148
1149fi;
ba4481b5
DL
1150
1151# Check whether --with-tiff or --without-tiff was given.
1152if test "${with_tiff+set}" = set; then
1153 withval="$with_tiff"
503d2be0
AS
1154
1155fi;
ba4481b5
DL
1156
1157# Check whether --with-gif or --without-gif was given.
1158if test "${with_gif+set}" = set; then
1159 withval="$with_gif"
503d2be0
AS
1160
1161fi;
ba4481b5
DL
1162
1163# Check whether --with-png or --without-png was given.
1164if test "${with_png+set}" = set; then
1165 withval="$with_png"
503d2be0
AS
1166
1167fi;
ba4481b5
DL
1168
1169# Check whether --with-toolkit-scroll-bars or --without-toolkit-scroll-bars was given.
1170if test "${with_toolkit_scroll_bars+set}" = set; then
1171 withval="$with_toolkit_scroll_bars"
503d2be0
AS
1172
1173fi;
ba4481b5 1174
1d36487c
GM
1175# Check whether --with-xim or --without-xim was given.
1176if test "${with_xim+set}" = set; then
1177 withval="$with_xim"
1d36487c 1178
503d2be0 1179fi;
ba4481b5 1180
e0f712ba
AC
1181# Check whether --with-carbon or --without-carbon was given.
1182if test "${with_carbon+set}" = set; then
1183 withval="$with_carbon"
1184
1185fi;
1186
ba4481b5 1187#### Make srcdir absolute, if it isn't already. It's important to
17494071 1188#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
1189#### give you automounter prefixes, which can go away. We do all this
1190#### so Emacs can find its files when run uninstalled.
17494071
GM
1191## Make sure CDPATH doesn't affect cd (in case PWD is relative).
1192unset CDPATH
ba4481b5
DL
1193case "${srcdir}" in
1194 /* ) ;;
1195 . )
1196 ## We may be able to use the $PWD environment variable to make this
1197 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
1198 ## Note: we used to use ${PWD} at the end instead of `pwd`,
1199 ## but that tested only for a well-formed and valid PWD,
1200 ## it did not object when PWD was well-formed and valid but just wrong.
1201 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
1202 then
1203 srcdir="$PWD"
1204 else
1205 srcdir="`(cd ${srcdir}; pwd)`"
1206 fi
1207 ;;
1208 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
1209esac
1210
1211#### Check if the source directory already has a configured system in it.
1212if test `pwd` != `(cd ${srcdir} && pwd)` \
1213 && test -f "${srcdir}/src/config.h" ; then
925c2f3f 1214 { echo "$as_me:1214: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
1215 as a build directory right now; it has been configured in its own
1216 right. To configure in another directory as well, you MUST
1217 use GNU make. If you do not have GNU make, then you must
1218 now do \`make distclean' in ${srcdir},
1219 and then run $0 again." >&5
1220echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
1221 as a build directory right now; it has been configured in its own
1222 right. To configure in another directory as well, you MUST
1223 use GNU make. If you do not have GNU make, then you must
1224 now do \`make distclean' in ${srcdir},
503d2be0 1225 and then run $0 again." >&2;}
ba4481b5
DL
1226
1227 extrasub='/^VPATH[ ]*=/c\
1228vpath %.c $(srcdir)\
1229vpath %.h $(srcdir)\
1230vpath %.y $(srcdir)\
1231vpath %.l $(srcdir)\
1232vpath %.s $(srcdir)\
1233vpath %.in $(srcdir)\
1234vpath %.texi $(srcdir)'
1235fi
1236
1237#### Given the configuration name, set machfile and opsysfile to the
1238#### names of the m/*.h and s/*.h files we should use.
1239
1240### Canonicalize the configuration name.
1241
1242ac_aux_dir=
1243for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1244 if test -f $ac_dir/install-sh; then
1245 ac_aux_dir=$ac_dir
1246 ac_install_sh="$ac_aux_dir/install-sh -c"
1247 break
1248 elif test -f $ac_dir/install.sh; then
1249 ac_aux_dir=$ac_dir
1250 ac_install_sh="$ac_aux_dir/install.sh -c"
1251 break
503d2be0
AS
1252 elif test -f $ac_dir/shtool; then
1253 ac_aux_dir=$ac_dir
1254 ac_install_sh="$ac_aux_dir/shtool install -c"
1255 break
ba4481b5
DL
1256 fi
1257done
1258if test -z "$ac_aux_dir"; then
925c2f3f 1259 { { echo "$as_me:1259: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
503d2be0
AS
1260echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1261 { (exit 1); exit 1; }; }
ba4481b5 1262fi
503d2be0
AS
1263ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1264ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1265ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ba4481b5
DL
1266
1267# Make sure we can run config.sub.
503d2be0 1268$ac_config_sub sun4 >/dev/null 2>&1 ||
925c2f3f 1269 { { echo "$as_me:1269: error: cannot run $ac_config_sub" >&5
503d2be0
AS
1270echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1271 { (exit 1); exit 1; }; }
1272
925c2f3f 1273echo "$as_me:1273: checking build system type" >&5
503d2be0
AS
1274echo $ECHO_N "checking build system type... $ECHO_C" >&6
1275if test "${ac_cv_build+set}" = set; then
1276 echo $ECHO_N "(cached) $ECHO_C" >&6
1277else
1278 ac_cv_build_alias=$build_alias
1279test -z "$ac_cv_build_alias" &&
1280 ac_cv_build_alias=`$ac_config_guess`
1281test -z "$ac_cv_build_alias" &&
925c2f3f 1282 { { echo "$as_me:1282: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
1283echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1284 { (exit 1); exit 1; }; }
1285ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
925c2f3f
EZ
1286 { { echo "$as_me:1286: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1287echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
503d2be0
AS
1288 { (exit 1); exit 1; }; }
1289
1290fi
925c2f3f 1291echo "$as_me:1291: result: $ac_cv_build" >&5
503d2be0
AS
1292echo "${ECHO_T}$ac_cv_build" >&6
1293build=$ac_cv_build
1294build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1295build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1296build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1297
925c2f3f 1298echo "$as_me:1298: checking host system type" >&5
503d2be0
AS
1299echo $ECHO_N "checking host system type... $ECHO_C" >&6
1300if test "${ac_cv_host+set}" = set; then
1301 echo $ECHO_N "(cached) $ECHO_C" >&6
1302else
1303 ac_cv_host_alias=$host_alias
1304test -z "$ac_cv_host_alias" &&
1305 ac_cv_host_alias=$ac_cv_build_alias
1306ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
925c2f3f 1307 { { echo "$as_me:1307: error: $ac_config_sub $ac_cv_host_alias failed" >&5
503d2be0
AS
1308echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1309 { (exit 1); exit 1; }; }
1310
1311fi
925c2f3f 1312echo "$as_me:1312: result: $ac_cv_host" >&5
503d2be0
AS
1313echo "${ECHO_T}$ac_cv_host" >&6
1314host=$ac_cv_host
1315host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1316host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1317host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ba4481b5
DL
1318
1319canonical=$host
531a3336 1320configuration=${host_alias-$host}
ba4481b5 1321
ba4481b5
DL
1322### If you add support for a new configuration, add code to this
1323### switch statement to recognize your configuration name and select
1324### the appropriate operating system and machine description files.
1325
1326### You would hope that you could choose an m/*.h file pretty much
1327### based on the machine portion of the configuration name, and an s-
1328### file based on the operating system portion. However, it turns out
1329### that each m/*.h file is pretty manufacturer-specific - for
1330### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
1331### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
1332### machines. So we basically have to have a special case for each
1333### configuration name.
1334###
1335### As far as handling version numbers on operating systems is
1336### concerned, make sure things will fail in a fixable way. If
1337### /etc/MACHINES doesn't say anything about version numbers, be
1338### prepared to handle anything reasonably. If version numbers
1339### matter, be sure /etc/MACHINES says something about it.
1340###
1341### Eric Raymond says we should accept strings like "sysvr4" to mean
1342### "System V Release 4"; he writes, "The old convention encouraged
1343### confusion between `system' and `release' levels'."
1344
1345machine='' opsys='' unported=no
1346case "${canonical}" in
1347
1096bcc0
GM
1348 ## FreeBSD ports
1349 *-*-freebsd* )
1350 opsys=freebsd
1351 case "${canonical}" in
1352 alpha*-*-freebsd*) machine=alpha ;;
1353 i[3456]86-*-freebsd*) machine=intel386 ;;
1354 esac
1355 ;;
1356
ba4481b5
DL
1357 ## NetBSD ports
1358 *-*-netbsd* )
1359 opsys=netbsd
1360 case "${canonical}" in
1361 alpha*-*-netbsd*) machine=alpha ;;
1362 i[3456]86-*-netbsd*) machine=intel386 ;;
1363 m68k-*-netbsd*)
1364 # This is somewhat bogus.
1365 machine=hp9000s300 ;;
1366 powerpc-apple-netbsd*) machine=macppc ;;
1367 mips-*-netbsd*) machine=pmax ;;
2df636f4 1368 mipsel-*-netbsd*) machine=pmax ;;
97836269 1369 mipseb-*-netbsd*) machine=pmax ;;
ba4481b5 1370 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 1371 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 1372 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 1373 vax-*-netbsd*) machine=vax ;;
2df636f4 1374 arm-*-netbsd*) machine=arm ;;
ba4481b5
DL
1375 esac
1376 ;;
1377
1378 ## OpenBSD ports
1379 *-*-openbsd* )
1380 opsys=openbsd
1381 case "${canonical}" in
1382 alpha*-*-openbsd*) machine=alpha ;;
1383 i386-*-openbsd*) machine=intel386 ;;
1384 m68k-*-openbsd*) machine=hp9000s300 ;;
1385 mipsel-*-openbsd*) machine=pmax ;;
1386 ns32k-*-openbsd*) machine=ns32000 ;;
1387 sparc-*-openbsd*) machine=sparc ;;
1388 vax-*-openbsd*) machine=vax ;;
1389 esac
1390 ;;
1391
1392 ## Acorn RISCiX:
1393 arm-acorn-riscix1.1* )
1394 machine=acorn opsys=riscix1-1
1395 ;;
1396 arm-acorn-riscix1.2* | arm-acorn-riscix )
1397 ## This name is riscix12 instead of riscix1.2
1398 ## to avoid a file name conflict on MSDOS.
1399 machine=acorn opsys=riscix12
1400 ;;
1401
1402 ## BSDI ports
1403 *-*-bsdi* )
1404 opsys=bsdi
1405 case "${canonical}" in
1406 i[345]86-*-bsdi*) machine=intel386 ;;
1407 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 1408 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
1409 esac
1410 case "${canonical}" in
1411 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
1412 *-*-bsdi2.0* ) opsys=bsdos2 ;;
1413 *-*-bsdi2* ) opsys=bsdos2-1 ;;
1414 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 1415 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
1416 esac
1417 ;;
1418
1419 ## Alliant machines
1420 ## Strictly speaking, we need the version of the alliant operating
1421 ## system to choose the right machine file, but currently the
1422 ## configuration name doesn't tell us enough to choose the right
1423 ## one; we need to give alliants their own operating system name to
1424 ## do this right. When someone cares, they can help us.
1425 fx80-alliant-* )
1426 machine=alliant4 opsys=bsd4-2
1427 ;;
1428 i860-alliant-* )
1429 machine=alliant-2800 opsys=bsd4-3
1430 ;;
1431
1432 ## Alpha (DEC) machines.
1433 alpha*-dec-osf* )
1434 machine=alpha opsys=osf1
1435 # This is needed to find X11R6.1 libraries for certain tests.
1436 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
1437 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
1438 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
1439 # due to non-traditional preprocessing with the current compiler
1440 # defaults. OSF 4 can also have that compiler version, and there
1441 # seems always to have been a usable /usr/bin/cpp.
1442 NON_GNU_CPP=/usr/bin/cpp
ca512671 1443 case "${canonical}" in
a55b799a 1444 alpha*-dec-osf[5-9]*)
bb17930d 1445 opsys=osf5-0 ;;
ca512671 1446 esac
ba4481b5
DL
1447 ;;
1448
1449 alpha*-*-linux-gnu* )
1450 machine=alpha opsys=gnu-linux
1451 ;;
1452
c4bb2108
DL
1453 arm*-*-linux-gnu* )
1454 machine=arm opsys=gnu-linux
1455 ;;
1456
1457 ppc-*-linux | \
1458 powerpc-*-linux* )
3aeecf97 1459 machine=macppc opsys=gnu-linux
c4bb2108
DL
1460 ;;
1461
ba4481b5
DL
1462 ## Altos 3068
1463 m68*-altos-sysv* )
1464 machine=altos opsys=usg5-2
1465 ;;
1466
1467 ## Amdahl UTS
1468 580-amdahl-sysv* )
1469 machine=amdahl opsys=usg5-2-2
1470 ;;
1471
1472 ## Apollo, Domain/OS
1473 m68*-apollo-* )
1474 machine=apollo opsys=bsd4-3
1475 ;;
1476
1477 ## AT&T 3b2, 3b5, 3b15, 3b20
1478 we32k-att-sysv* )
1479 machine=att3b opsys=usg5-2-2
1480 ;;
1481
1482 ## AT&T 3b1 - The Mighty Unix PC!
1483 m68*-att-sysv* )
1484 machine=7300 opsys=usg5-2-2
1485 ;;
1486
1487 ## Bull dpx20
1488 rs6000-bull-bosx* )
1489 machine=ibmrs6000 opsys=aix3-2
1490 ;;
1491
1492 ## Bull dpx2
1493 m68*-bull-sysv3* )
1494 machine=dpx2 opsys=usg5-3
1495 ;;
1496
1497 ## Bull sps7
1498 m68*-bull-sysv2* )
1499 machine=sps7 opsys=usg5-2
1500 ;;
1501
1502 ## CCI 5/32, 6/32 -- see "Tahoe".
1503
1504 ## Celerity
1505 ## I don't know what configuration name to use for this; config.sub
1506 ## doesn't seem to know anything about it. Hey, Celerity users, get
1507 ## in touch with us!
1508 celerity-celerity-bsd* )
1509 machine=celerity opsys=bsd4-2
1510 ;;
1511
1512 ## Clipper
1513 ## What operating systems does this chip run that Emacs has been
1514 ## tested on?
1515 clipper-* )
1516 machine=clipper
1517 ## We'll use the catch-all code at the bottom to guess the
1518 ## operating system.
1519 ;;
1520
df645f7c
AS
1521 ## Compaq Nonstop
1522 mips-compaq-nonstopux* )
1523 machine=nonstopux opsys=nonstopux
1524 ;;
1525
ba4481b5
DL
1526 ## Convex
1527 *-convex-bsd* | *-convex-convexos* )
1528 machine=convex opsys=bsd4-3
1529 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
1530 NON_GNU_CPP="cc -E -P"
1531 ;;
1532
1533 ## Cubix QBx/386
1534 i[3456]86-cubix-sysv* )
1535 machine=intel386 opsys=usg5-3
1536 ;;
1537
1538 ## Cydra 5
1539 cydra*-cydrome-sysv* )
1540 machine=cydra5 opsys=usg5-3
1541 ;;
1542
1543 ## Data General AViiON Machines
1544 ## DG changed naming conventions with the release of 5.4.4.10, they
1545 ## dropped the initial 5.4 but left the intervening R. Because of the
1546 ## R this shouldn't conflict with older versions of the OS (which I
1547 ## think were named like dgux4.*). In addition, DG new AViiONs series
1548 ## uses either Motorola M88k or Intel Pentium CPUs.
1549 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
1550 machine=aviion opsys=dgux4
1551 ;;
1552 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
1553 ## This name is dgux5-4-3 instead of dgux5-4r3
1554 ## to avoid a file name conflict on MSDOS.
1555 machine=aviion opsys=dgux5-4-3
1556 ;;
1557 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
1558 machine=aviion opsys=dgux5-4r2
1559 ;;
1560 m88k-dg-dgux* )
1561 machine=aviion opsys=dgux
1562 ;;
1563
1564 ## Data General AViiON Intel (x86) Machines
1565 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
1566 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
1567 i[345]86-dg-dguxR4* )
1568 machine=aviion-intel opsys=dgux4
1569 ;;
1570
1571 ## DECstations
1572 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1573 machine=pmax opsys=bsd4-2
1574 ;;
1575 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1576 machine=pmax opsys=bsd4-3
1577 ;;
1578 mips-dec-ultrix* )
1579 machine=pmax opsys=ultrix4-3
1580 ;;
1581 mips-dec-osf* )
1582 machine=pmax opsys=osf1
1583 ;;
1584 mips-dec-mach_bsd4.3* )
1585 machine=pmax opsys=mach-bsd4-3
1586 ;;
1587
1588 ## Motorola Delta machines
1589 m68k-motorola-sysv* | m68000-motorola-sysv* )
1590 machine=delta opsys=usg5-3
1591 if test -z "`type gnucc | grep 'not found'`"
1592 then
1593 if test -s /etc/167config
1594 then CC="gnucc -m68040"
1595 else CC="gnucc -m68881"
1596 fi
1597 else
1598 if test -z "`type gcc | grep 'not found'`"
1599 then CC=gcc
1600 else CC=cc
1601 fi
1602 fi
1603 ;;
1604 m88k-motorola-sysv4* )
1605 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1606 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1607 # I hope there are not other 4.0 versions for this machine
1608 # which really need usg5-4 instead.
1609 machine=delta88k opsys=usg5-4-2
1610 ;;
1611 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1612 machine=delta88k opsys=usg5-3
1613 ;;
1614
1615 ## Dual machines
1616 m68*-dual-sysv* )
1617 machine=dual opsys=usg5-2
1618 ;;
1619 m68*-dual-uniplus* )
1620 machine=dual opsys=unipl5-2
1621 ;;
1622
1623 ## Elxsi 6400
1624 elxsi-elxsi-sysv* )
1625 machine=elxsi opsys=usg5-2
1626 ;;
1627
1628 ## Encore machines
1629 ns16k-encore-bsd* )
1630 machine=ns16000 opsys=umax
1631 ;;
1632
65171e3a
DL
1633 ## The GEC 63 - apparently, this port isn't really finished yet.
1634 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
1635
1636 ## Gould Power Node and NP1
1637 pn-gould-bsd4.2* )
1638 machine=gould opsys=bsd4-2
1639 ;;
1640 pn-gould-bsd4.3* )
1641 machine=gould opsys=bsd4-3
1642 ;;
1643 np1-gould-bsd* )
1644 machine=gould-np1 opsys=bsd4-3
1645 ;;
1646
1647 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
1648 ## as far as Emacs is concerned).
1649 m88k-harris-cxux* )
1650 # Build needs to be different on 7.0 and later releases
1651 case "`uname -r`" in
1652 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
1653 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
1654 esac
1655 NON_GNU_CPP="/lib/cpp"
1656 ;;
1657 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
1658 m68k-harris-cxux* )
1659 machine=nh3000 opsys=cxux
1660 ;;
1661 ## Harris power pc NightHawk running Power UNIX (Series 6000)
1662 powerpc-harris-powerunix )
1663 machine=nh6000 opsys=powerunix
1664 NON_GNU_CPP="cc -Xo -E -P"
1665 ;;
1666 ## SR2001/SR2201 running HI-UX/MPP
1667 hppa1.1-hitachi-hiuxmpp* )
1668 machine=sr2k opsys=hiuxmpp
1669 ;;
89a336fa
GM
1670 hppa1.1-hitachi-hiuxwe2* )
1671 machine=sr2k opsys=hiuxwe2
1672 ;;
ba4481b5
DL
1673 ## Honeywell XPS100
1674 xps*-honeywell-sysv* )
1675 machine=xps100 opsys=usg5-2
1676 ;;
1677
1678 ## HP 9000 series 200 or 300
1679 m68*-hp-bsd* )
1680 machine=hp9000s300 opsys=bsd4-3
1681 ;;
1682 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
1683 m68*-hp-hpux* )
1684 case "`uname -r`" in
1685 ## Someone's system reports A.B8.05 for this.
1686 ## I wonder what other possibilities there are.
1687 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
1688 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
1689 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
1690 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
1691 *) machine=hp9000s300 opsys=hpux ;;
1692 esac
1693 ;;
1694
1695 ## HP 9000 series 700 and 800, running HP/UX
1696 hppa*-hp-hpux7* )
1697 machine=hp800 opsys=hpux
1698 ;;
1699 hppa*-hp-hpux8* )
1700 machine=hp800 opsys=hpux8
1701 ;;
1702 hppa*-hp-hpux9shr* )
1703 machine=hp800 opsys=hpux9shr
1704 ;;
1705 hppa*-hp-hpux9* )
1706 machine=hp800 opsys=hpux9
1707 ;;
cc227489 1708 hppa*-hp-hpux10* )
ba4481b5
DL
1709 machine=hp800 opsys=hpux10
1710 ;;
cc227489
MB
1711 hppa*-hp-hpux1[1-9]* )
1712 machine=hp800 opsys=hpux11
1713 ;;
ba4481b5 1714
409d9577
GM
1715 hppa*-*-linux-gnu* )
1716 machine=hp800 opsys=gnu-linux
1717 ;;
1718
ba4481b5
DL
1719 ## HP 9000 series 700 and 800, running HP/UX
1720 hppa*-hp-hpux* )
1721 ## Cross-compilation? Nah!
1722 case "`uname -r`" in
1723 ## Someone's system reports A.B8.05 for this.
1724 ## I wonder what other possibilities there are.
1725 *.B8.* ) machine=hp800 opsys=hpux8 ;;
1726 *.08.* ) machine=hp800 opsys=hpux8 ;;
1727 *.09.* ) machine=hp800 opsys=hpux9 ;;
1728 *) machine=hp800 opsys=hpux10 ;;
1729 esac
1730 ;;
1731 hppa*-*-nextstep* )
1732 machine=hp800 opsys=nextstep
1733 ;;
1734
1735 ## Orion machines
1736 orion-orion-bsd* )
1737 machine=orion opsys=bsd4-2
1738 ;;
1739 clipper-orion-bsd* )
1740 machine=orion105 opsys=bsd4-2
1741 ;;
1742
1743 ## IBM machines
1744 i[3456]86-ibm-aix1.1* )
1745 machine=ibmps2-aix opsys=usg5-2-2
1746 ;;
1747 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
1748 machine=ibmps2-aix opsys=usg5-3
1749 ;;
1750 i370-ibm-aix*)
1751 machine=ibm370aix opsys=usg5-3
1752 ;;
138f0859
GM
1753 s390-*-linux-gnu)
1754 machine=ibms390 opsys=gnu-linux
1755 ;;
ba4481b5
DL
1756 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
1757 machine=ibmrs6000 opsys=aix3-1
1758 ;;
1759 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
1760 machine=ibmrs6000 opsys=aix3-2-5
1761 ;;
1762 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
1763 machine=ibmrs6000 opsys=aix4-1
1764 ;;
1765 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
1766 machine=ibmrs6000 opsys=aix4-2
1767 ;;
d6b82250
EZ
1768 rs6000-ibm-aix5.1* | powerpc-ibm-aix5.1* )
1769 machine=ibmrs6000 opsys=aix4-2
1770 ;;
ba4481b5
DL
1771 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
1772 machine=ibmrs6000 opsys=aix4
1773 ;;
1774 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
1775 machine=ibmrs6000 opsys=aix4-1
1776 ;;
1777 rs6000-ibm-aix* | powerpc-ibm-aix* )
1778 machine=ibmrs6000 opsys=aix3-2
1779 ;;
1780 romp-ibm-bsd4.3* )
1781 machine=ibmrt opsys=bsd4-3
1782 ;;
1783 romp-ibm-bsd4.2* )
1784 machine=ibmrt opsys=bsd4-2
1785 ;;
1786 romp-ibm-aos4.3* )
1787 machine=ibmrt opsys=bsd4-3
1788 ;;
1789 romp-ibm-aos4.2* )
1790 machine=ibmrt opsys=bsd4-2
1791 ;;
1792 romp-ibm-aos* )
1793 machine=ibmrt opsys=bsd4-3
1794 ;;
1795 romp-ibm-bsd* )
1796 machine=ibmrt opsys=bsd4-3
1797 ;;
1798 romp-ibm-aix* )
1799 machine=ibmrt-aix opsys=usg5-2-2
1800 ;;
1801
1802 ## Integrated Solutions `Optimum V'
1803 m68*-isi-bsd4.2* )
1804 machine=isi-ov opsys=bsd4-2
1805 ;;
1806 m68*-isi-bsd4.3* )
1807 machine=isi-ov opsys=bsd4-3
1808 ;;
1809
1810 ## Intel 386 machines where we do care about the manufacturer
1811 i[3456]86-intsys-sysv* )
1812 machine=is386 opsys=usg5-2-2
1813 ;;
1814
1815 ## Prime EXL
1816 i[3456]86-prime-sysv* )
1817 machine=i386 opsys=usg5-3
1818 ;;
1819
1820 ## Sequent Symmetry running Dynix
1821 i[3456]86-sequent-bsd* )
1822 machine=symmetry opsys=bsd4-3
1823 ;;
1824
1825 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
1826 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
1827 machine=sequent-ptx opsys=ptx4
1828 NON_GNU_CPP=/lib/cpp
1829 ;;
1830
1831 ## Sequent Symmetry running DYNIX/ptx
1832 ## Use the old cpp rather than the newer ANSI one.
1833 i[3456]86-sequent-ptx* )
1834 machine=sequent-ptx opsys=ptx
1835 NON_GNU_CPP="/lib/cpp"
1836 ;;
1837
1838 ## ncr machine running svr4.3.
1839 i[3456]86-ncr-sysv4.3 )
1840 machine=ncr386 opsys=usg5-4-3
1841 ;;
1842
1843 ## Unspecified sysv on an ncr machine defaults to svr4.2.
1844 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
1845 i[3456]86-ncr-sysv* )
1846 machine=ncr386 opsys=usg5-4-2
1847 ;;
1848
1849 ## Intel Paragon OSF/1
1850 i860-intel-osf1* )
1851 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
1852 ;;
1853
1854 ## Intel 860
1855 i860-*-sysv4* )
1856 machine=i860 opsys=usg5-4
1857 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
1858 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
1859 ;;
1860
c76e04a8
GM
1861 ## Macintosh PowerPC
1862 powerpc*-*-linux-gnu* )
1863 machine=macppc opsys=gnu-linux
1864 ;;
1865
ba4481b5
DL
1866 ## Masscomp machines
1867 m68*-masscomp-rtu* )
1868 machine=masscomp opsys=rtu
1869 ;;
1870
1871 ## Megatest machines
1872 m68*-megatest-bsd* )
1873 machine=mega68 opsys=bsd4-2
1874 ;;
1875
1876 ## Workstations sold by MIPS
1877 ## This is not necessarily all workstations using the MIPS processor -
1878 ## Irises are produced by SGI, and DECstations by DEC.
1879
1880 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
1881 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
1882 ## it gives for choosing between the alternatives seems to be "Use
1883 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
1884 ## the BSD world." I'll assume that these are instructions for
1885 ## handling two odd situations, and that every other situation
1886 ## should use mips.h and usg5-2-2, they being listed first.
1887 mips-mips-usg* )
1888 machine=mips4
1889 ## Fall through to the general code at the bottom to decide on the OS.
1890 ;;
1891 mips-mips-riscos4* )
1892 machine=mips4 opsys=bsd4-3
1893 NON_GNU_CC="cc -systype bsd43"
1894 NON_GNU_CPP="cc -systype bsd43 -E"
1895 ;;
1896 mips-mips-riscos5* )
1897 machine=mips4 opsys=riscos5
1898 NON_GNU_CC="cc -systype bsd43"
1899 NON_GNU_CPP="cc -systype bsd43 -E"
1900 ;;
1901 mips-mips-bsd* )
1902 machine=mips opsys=bsd4-3
1903 ;;
1904 mips-mips-* )
1905 machine=mips opsys=usg5-2-2
1906 ;;
1907
1908 ## NeXT
1909 m68*-next-* | m68k-*-nextstep* )
1910 machine=m68k opsys=nextstep
1911 ;;
1912
1913 ## The complete machine from National Semiconductor
1914 ns32k-ns-genix* )
1915 machine=ns32000 opsys=usg5-2
1916 ;;
1917
1918 ## NCR machines
1919 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
1920 machine=tower32 opsys=usg5-2-2
1921 ;;
1922 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
1923 machine=tower32v3 opsys=usg5-3
1924 ;;
1925
1926 ## NEC EWS4800
1927 mips-nec-sysv4*)
1928 machine=ews4800 opsys=ux4800
1929 ;;
1930
1931 ## Nixdorf Targon 31
1932 m68*-nixdorf-sysv* )
1933 machine=targon31 opsys=usg5-2-2
1934 ;;
1935
1936 ## Nu (TI or LMI)
1937 m68*-nu-sysv* )
1938 machine=nu opsys=usg5-2
1939 ;;
1940
1941 ## Plexus
1942 m68*-plexus-sysv* )
1943 machine=plexus opsys=usg5-2
1944 ;;
1945
1946 ## PowerPC reference platform
1947 powerpcle-*-solaris2* )
1948 machine=prep
1949 opsys=sol2-5
1950 ;;
1951
1952 ## Pyramid machines
1953 ## I don't really have any idea what sort of processor the Pyramid has,
1954 ## so I'm assuming it is its own architecture.
1955 pyramid-pyramid-bsd* )
1956 machine=pyramid opsys=bsd4-2
1957 ;;
1958
1959 ## Sequent Balance
1960 ns32k-sequent-bsd4.2* )
1961 machine=sequent opsys=bsd4-2
1962 ;;
1963 ns32k-sequent-bsd4.3* )
1964 machine=sequent opsys=bsd4-3
1965 ;;
1966
1967 ## Siemens Nixdorf
1968 mips-siemens-sysv* | mips-sni-sysv*)
1969 machine=mips-siemens opsys=usg5-4
1970 NON_GNU_CC=/usr/ccs/bin/cc
1971 NON_GNU_CPP=/usr/ccs/lib/cpp
1972 ;;
1973
1974 ## Silicon Graphics machines
1975 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
1976 m68*-sgi-iris3.5* )
1977 machine=irist opsys=iris3-5
1978 ;;
1979 m68*-sgi-iris3.6* | m68*-sgi-iris*)
1980 machine=irist opsys=iris3-6
1981 ;;
1982 ## Iris 4D
1983 mips-sgi-irix3* )
1984 machine=iris4d opsys=irix3-3
1985 ;;
1986 mips-sgi-irix4* )
1987 machine=iris4d opsys=irix4-0
1988 ;;
1989 mips-sgi-irix6.5 )
1990 machine=iris4d opsys=irix6-5
946173ad
DL
1991 # Without defining _LANGUAGE_C, things get masked out in the headers
1992 # so that, for instance, grepping for `free' in stdlib.h fails and
1993 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
1994 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 1995 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
1996 ;;
1997 mips-sgi-irix6* )
1998 machine=iris4d opsys=irix6-0
c4bb2108 1999 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2000 # but presumably it does no harm.
2001 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2002 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2003 NON_GCC_TEST_OPTIONS=-32
2004 ;;
2005 mips-sgi-irix5.[01]* )
2006 machine=iris4d opsys=irix5-0
2007 ;;
2008 mips-sgi-irix5* | mips-sgi-irix* )
2009 machine=iris4d opsys=irix5-2
2010 ;;
2011
2012 ## SONY machines
2013 m68*-sony-bsd4.2* )
2014 machine=news opsys=bsd4-2
2015 ;;
2016 m68*-sony-bsd4.3* )
2017 machine=news opsys=bsd4-3
2018 ;;
2019 m68*-sony-newsos3* | m68*-sony-news3*)
2020 machine=news opsys=bsd4-3
2021 ;;
2022 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2023 machine=news-risc opsys=bsd4-3
2024 ;;
2025 mips-sony-newsos6* )
2026 machine=news-r6 opsys=newsos6
2027 ;;
2028 mips-sony-news* )
2029 machine=news-risc opsys=newsos5
2030 ;;
2031
2032 ## Stride
2033 m68*-stride-sysv* )
2034 machine=stride opsys=usg5-2
2035 ;;
2036
2037 ## Suns
2038 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2039 machine=sparc opsys=gnu-linux
2040 ;;
2041
d054101f 2042 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2043 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2044 | rs6000-*-solaris2*)
2045 case "${canonical}" in
2046 m68*-sunos1* ) machine=sun1 ;;
2047 m68*-sunos2* ) machine=sun2 ;;
2048 m68* ) machine=sun3 ;;
2049 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
2050 i[3456]86-*-* ) machine=intel386 ;;
2051 powerpcle* ) machine=powerpcle ;;
2052 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2053 sparc* ) machine=sparc ;;
2054 * ) unported=yes ;;
2055 esac
2056 case "${canonical}" in
2057 ## The Sun386 didn't get past 4.0.
2058 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2059 *-sunos4.0* ) opsys=sunos4-0 ;;
2060 *-sunos4.1.[3-9]*noshare )
2061 ## This name is sunos413 instead of sunos4-1-3
2062 ## to avoid a file name conflict on MSDOS.
2063 opsys=sunos413
2064 NON_GNU_CPP=/usr/lib/cpp
2065 NON_GCC_TEST_OPTIONS=-Bstatic
2066 GCC_TEST_OPTIONS=-static
2067 ;;
2068 *-sunos4.1.[3-9]* | *-sunos4shr*)
2069 opsys=sunos4shr
2070 NON_GNU_CPP=/usr/lib/cpp
2071 ;;
2072 *-sunos4* | *-sunos )
2073 opsys=sunos4-1
2074 NON_GCC_TEST_OPTIONS=-Bstatic
2075 GCC_TEST_OPTIONS=-static
2076 ;;
2077 *-sunos5.3* | *-solaris2.3* )
2078 opsys=sol2-3
2079 NON_GNU_CPP=/usr/ccs/lib/cpp
2080 ;;
2081 *-sunos5.4* | *-solaris2.4* )
2082 opsys=sol2-4
2083 NON_GNU_CPP=/usr/ccs/lib/cpp
2084 RANLIB="ar -ts"
2085 ;;
2086 *-sunos5.5* | *-solaris2.5* )
2087 opsys=sol2-5
2088 NON_GNU_CPP=/usr/ccs/lib/cpp
2089 RANLIB="ar -ts"
2090 ;;
2091 *-sunos5* | *-solaris* )
2092 opsys=sol2-5
2093 NON_GNU_CPP=/usr/ccs/lib/cpp
2094 ;;
2095 * ) opsys=bsd4-2 ;;
2096 esac
2097 ## Watch out for a compiler that we know will not work.
2098 case "${canonical}" in
2099 *-solaris* | *-sunos5* )
2100 if [ "x$CC" = x/usr/ucb/cc ]; then
2101 ## /usr/ucb/cc doesn't work;
2102 ## we should find some other compiler that does work.
2103 unset CC
2104 fi
2105 ;;
2106 *) ;;
2107 esac
2108 ;;
2109 sparc-*-nextstep* )
2110 machine=sparc opsys=nextstep
2111 ;;
2112
2113 ## Tadpole 68k
2114 m68*-tadpole-sysv* )
2115 machine=tad68k opsys=usg5-3
2116 ;;
2117
2118 ## Tahoe machines
2119 tahoe-tahoe-bsd4.2* )
2120 machine=tahoe opsys=bsd4-2
2121 ;;
2122 tahoe-tahoe-bsd4.3* )
2123 machine=tahoe opsys=bsd4-3
2124 ;;
2125
2126 ## Tandem Integrity S2
2127 mips-tandem-sysv* )
2128 machine=tandem-s2 opsys=usg5-3
2129 ;;
2130
2131 ## Tektronix XD88
2132 m88k-tektronix-sysv3* )
2133 machine=tekxd88 opsys=usg5-3
2134 ;;
2135
2136 ## Tektronix 16000 box (6130?)
2137 ns16k-tektronix-bsd* )
2138 machine=ns16000 opsys=bsd4-2
2139 ;;
2140 ## Tektronix 4300
2141 ## src/m/tek4300.h hints that this is a m68k machine.
2142 m68*-tektronix-bsd* )
2143 machine=tek4300 opsys=bsd4-3
2144 ;;
2145
2146 ## Titan P2 or P3
2147 ## We seem to have lost the machine-description file titan.h!
2148 titan-titan-sysv* )
2149 machine=titan opsys=usg5-3
2150 ;;
2151
2152 ## Ustation E30 (SS5E)
2153 m68*-unisys-uniplus* )
2154 machine=ustation opsystem=unipl5-2
2155 ;;
2156
2157 ## Vaxen.
2158 vax-dec-* )
2159 machine=vax
2160 case "${canonical}" in
2161 *-bsd4.1* ) opsys=bsd4-1 ;;
2162 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
2163 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
2164 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
2165 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
2166 *-vms* ) opsys=vms ;;
2167 * ) unported=yes
2168 esac
2169 ;;
2170
2171 ## Whitechapel MG1
2172 ns16k-whitechapel-* )
2173 machine=mg1
2174 ## We don't know what sort of OS runs on these; we'll let the
2175 ## operating system guessing code below try.
2176 ;;
2177
2178 ## Wicat
2179 m68*-wicat-sysv* )
2180 machine=wicat opsys=usg5-2
2181 ;;
2182
f4988be7
GM
2183 ## IA-64
2184 ia64*-*-linux* )
2185 machine=ia64 opsys=gnu-linux
2186 ;;
2187
ba4481b5
DL
2188 ## Intel 386 machines where we don't care about the manufacturer
2189 i[3456]86-*-* )
2190 machine=intel386
2191 case "${canonical}" in
9f817ea4 2192 *-lynxos* ) opsys=lynxos ;;
ba4481b5
DL
2193 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
2194 *-isc2.2* ) opsys=isc2-2 ;;
2195 *-isc4.0* ) opsys=isc4-0 ;;
2196 *-isc4.* ) opsys=isc4-1
2197 GCC_TEST_OPTIONS=-posix
2198 NON_GCC_TEST_OPTIONS=-Xp
2199 ;;
2200 *-isc* ) opsys=isc3-0 ;;
2201 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
2202 *-esix* ) opsys=esix ;;
2203 *-xenix* ) opsys=xenix ;;
2204 *-linux-gnu* ) opsys=gnu-linux ;;
2205 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 2206 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
2207 NON_GNU_CPP=/lib/cpp
2208 # Prevent -belf from being passed to $CPP.
2209 # /lib/cpp does not accept it.
2210 OVERRIDE_CPPFLAGS=" "
2211 ;;
2212 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2213 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
2214 *-nextstep* ) opsys=nextstep ;;
2215 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2216 esac
2217 ;;
2218
2219 ## m68k Linux-based GNU system
2220 m68k-*-linux-gnu* )
2221 machine=m68k opsys=gnu-linux
2222 ;;
2223
2224 ## Mips Linux-based GNU system
2225 mips-*-linux-gnu* )
2226 machine=mips opsys=gnu-linux
2227 ;;
2228
2229 ## UXP/DS
2230 sparc-fujitsu-sysv4* )
2231 machine=sparc opsys=uxpds
2232 NON_GNU_CPP=/usr/ccs/lib/cpp
2233 RANLIB="ar -ts"
2234 ;;
2235
2236 ## UXP/V
2237 f301-fujitsu-uxpv4.1)
2238 machine=f301 opsys=uxpv
2239 ;;
2240
e0f712ba
AC
2241 ## Darwin / Mac OS X
2242 powerpc-apple-darwin* )
2243 machine=powermac opsys=darwin
2244 # Define CPP as follows to make autoconf work correctly.
2245 CPP="cc -E -traditional-cpp"
2246 ;;
2247
598a2813
AS
2248 ## AMD x86-64 Linux-based GNU system
2249 x86_64-*-linux-gnu* )
2250 machine=amdx86-64 opsys=gnu-linux
2251 ;;
2252
ba4481b5
DL
2253 * )
2254 unported=yes
2255 ;;
2256esac
2257
2258### If the code above didn't choose an operating system, just choose
2259### an operating system based on the configuration name. You really
2260### only want to use this when you have no idea what the right
2261### operating system is; if you know what operating systems a machine
2262### runs, it's cleaner to make it explicit in the case statement
2263### above.
2264if test x"${opsys}" = x; then
2265 case "${canonical}" in
2266 *-gnu* ) opsys=gnu ;;
2267 *-bsd4.[01] ) opsys=bsd4-1 ;;
2268 *-bsd4.2 ) opsys=bsd4-2 ;;
2269 *-bsd4.3 ) opsys=bsd4-3 ;;
2270 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
2271 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
2272 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
2273 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
2274 *-sysv4.2uw* ) opsys=unixware ;;
2275 *-sysv4.1* | *-sysvr4.1* )
2276 NON_GNU_CPP=/usr/lib/cpp
2277 opsys=usg5-4 ;;
2278 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2279 if [ x$NON_GNU_CPP = x ]; then
2280 if [ -f /usr/ccs/lib/cpp ]; then
2281 NON_GNU_CPP=/usr/ccs/lib/cpp
2282 else
2283 NON_GNU_CPP=/lib/cpp
2284 fi
2285 fi
2286 opsys=usg5-4-2 ;;
2287 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2288 * )
2289 unported=yes
2290 ;;
2291 esac
2292fi
2293
ba4481b5 2294if test $unported = yes; then
598a2813 2295 { { echo "$as_me:2294: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2296Check \`etc/MACHINES' for recognized configuration names." >&5
2297echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2298Check \`etc/MACHINES' for recognized configuration names." >&2;}
2299 { (exit 1); exit 1; }; }
ba4481b5
DL
2300fi
2301
2302machfile="m/${machine}.h"
2303opsysfile="s/${opsys}.h"
2304
ba4481b5
DL
2305#### Choose a compiler.
2306test -n "$CC" && cc_specified=yes
2307
2308# Save the value of CFLAGS that the user specified.
2309SPECIFIED_CFLAGS="$CFLAGS"
2310
2311case ${with_gcc} in
2312 "yes" ) CC="gcc" GCC=yes ;;
2313 "no" ) : ${CC=cc} ;;
503d2be0
AS
2314 * )
2315esac
2316ac_ext=c
2317ac_cpp='$CPP $CPPFLAGS'
2318ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2319ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2320ac_compiler_gnu=$ac_cv_c_compiler_gnu
2321if test -n "$ac_tool_prefix"; then
2322 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2323set dummy ${ac_tool_prefix}gcc; ac_word=$2
598a2813 2324echo "$as_me:2323: checking for $ac_word" >&5
503d2be0
AS
2325echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2326if test "${ac_cv_prog_CC+set}" = set; then
2327 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2328else
2329 if test -n "$CC"; then
2330 ac_cv_prog_CC="$CC" # Let the user override the test.
2331else
925c2f3f
EZ
2332 ac_save_IFS=$IFS; IFS=$ac_path_separator
2333ac_dummy="$PATH"
2334for ac_dir in $ac_dummy; do
2335 IFS=$ac_save_IFS
2336 test -z "$ac_dir" && ac_dir=.
2337 $as_executable_p "$ac_dir/$ac_word" || continue
2338ac_cv_prog_CC="${ac_tool_prefix}gcc"
598a2813 2339echo "$as_me:2338: found $ac_dir/$ac_word" >&5
925c2f3f 2340break
503d2be0
AS
2341done
2342
ba4481b5
DL
2343fi
2344fi
503d2be0 2345CC=$ac_cv_prog_CC
ba4481b5 2346if test -n "$CC"; then
598a2813 2347 echo "$as_me:2346: result: $CC" >&5
503d2be0
AS
2348echo "${ECHO_T}$CC" >&6
2349else
598a2813 2350 echo "$as_me:2349: result: no" >&5
503d2be0
AS
2351echo "${ECHO_T}no" >&6
2352fi
2353
2354fi
2355if test -z "$ac_cv_prog_CC"; then
2356 ac_ct_CC=$CC
2357 # Extract the first word of "gcc", so it can be a program name with args.
2358set dummy gcc; ac_word=$2
598a2813 2359echo "$as_me:2358: checking for $ac_word" >&5
503d2be0
AS
2360echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2361if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2362 echo $ECHO_N "(cached) $ECHO_C" >&6
2363else
2364 if test -n "$ac_ct_CC"; then
2365 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2366else
925c2f3f
EZ
2367 ac_save_IFS=$IFS; IFS=$ac_path_separator
2368ac_dummy="$PATH"
2369for ac_dir in $ac_dummy; do
2370 IFS=$ac_save_IFS
2371 test -z "$ac_dir" && ac_dir=.
2372 $as_executable_p "$ac_dir/$ac_word" || continue
2373ac_cv_prog_ac_ct_CC="gcc"
598a2813 2374echo "$as_me:2373: found $ac_dir/$ac_word" >&5
925c2f3f 2375break
503d2be0
AS
2376done
2377
2378fi
2379fi
2380ac_ct_CC=$ac_cv_prog_ac_ct_CC
2381if test -n "$ac_ct_CC"; then
598a2813 2382 echo "$as_me:2381: result: $ac_ct_CC" >&5
503d2be0 2383echo "${ECHO_T}$ac_ct_CC" >&6
ba4481b5 2384else
598a2813 2385 echo "$as_me:2384: result: no" >&5
503d2be0
AS
2386echo "${ECHO_T}no" >&6
2387fi
2388
2389 CC=$ac_ct_CC
2390else
2391 CC="$ac_cv_prog_CC"
ba4481b5
DL
2392fi
2393
2394if test -z "$CC"; then
503d2be0
AS
2395 if test -n "$ac_tool_prefix"; then
2396 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2397set dummy ${ac_tool_prefix}cc; ac_word=$2
598a2813 2398echo "$as_me:2397: checking for $ac_word" >&5
503d2be0
AS
2399echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2400if test "${ac_cv_prog_CC+set}" = set; then
2401 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2402else
2403 if test -n "$CC"; then
2404 ac_cv_prog_CC="$CC" # Let the user override the test.
2405else
925c2f3f
EZ
2406 ac_save_IFS=$IFS; IFS=$ac_path_separator
2407ac_dummy="$PATH"
2408for ac_dir in $ac_dummy; do
2409 IFS=$ac_save_IFS
2410 test -z "$ac_dir" && ac_dir=.
2411 $as_executable_p "$ac_dir/$ac_word" || continue
2412ac_cv_prog_CC="${ac_tool_prefix}cc"
598a2813 2413echo "$as_me:2412: found $ac_dir/$ac_word" >&5
925c2f3f 2414break
503d2be0
AS
2415done
2416
2417fi
2418fi
2419CC=$ac_cv_prog_CC
2420if test -n "$CC"; then
598a2813 2421 echo "$as_me:2420: result: $CC" >&5
503d2be0
AS
2422echo "${ECHO_T}$CC" >&6
2423else
598a2813 2424 echo "$as_me:2423: result: no" >&5
503d2be0
AS
2425echo "${ECHO_T}no" >&6
2426fi
2427
2428fi
2429if test -z "$ac_cv_prog_CC"; then
2430 ac_ct_CC=$CC
2431 # Extract the first word of "cc", so it can be a program name with args.
2432set dummy cc; ac_word=$2
598a2813 2433echo "$as_me:2432: checking for $ac_word" >&5
503d2be0
AS
2434echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2435if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2436 echo $ECHO_N "(cached) $ECHO_C" >&6
2437else
2438 if test -n "$ac_ct_CC"; then
2439 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2440else
925c2f3f
EZ
2441 ac_save_IFS=$IFS; IFS=$ac_path_separator
2442ac_dummy="$PATH"
2443for ac_dir in $ac_dummy; do
2444 IFS=$ac_save_IFS
2445 test -z "$ac_dir" && ac_dir=.
2446 $as_executable_p "$ac_dir/$ac_word" || continue
2447ac_cv_prog_ac_ct_CC="cc"
598a2813 2448echo "$as_me:2447: found $ac_dir/$ac_word" >&5
925c2f3f 2449break
503d2be0
AS
2450done
2451
2452fi
2453fi
2454ac_ct_CC=$ac_cv_prog_ac_ct_CC
2455if test -n "$ac_ct_CC"; then
598a2813 2456 echo "$as_me:2455: result: $ac_ct_CC" >&5
503d2be0
AS
2457echo "${ECHO_T}$ac_ct_CC" >&6
2458else
598a2813 2459 echo "$as_me:2458: result: no" >&5
503d2be0
AS
2460echo "${ECHO_T}no" >&6
2461fi
2462
2463 CC=$ac_ct_CC
2464else
2465 CC="$ac_cv_prog_CC"
2466fi
2467
2468fi
2469if test -z "$CC"; then
2470 # Extract the first word of "cc", so it can be a program name with args.
2471set dummy cc; ac_word=$2
598a2813 2472echo "$as_me:2471: checking for $ac_word" >&5
503d2be0
AS
2473echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2474if test "${ac_cv_prog_CC+set}" = set; then
2475 echo $ECHO_N "(cached) $ECHO_C" >&6
2476else
2477 if test -n "$CC"; then
2478 ac_cv_prog_CC="$CC" # Let the user override the test.
2479else
2480 ac_prog_rejected=no
925c2f3f
EZ
2481 ac_save_IFS=$IFS; IFS=$ac_path_separator
2482ac_dummy="$PATH"
2483for ac_dir in $ac_dummy; do
2484 IFS=$ac_save_IFS
2485 test -z "$ac_dir" && ac_dir=.
2486 $as_executable_p "$ac_dir/$ac_word" || continue
2487if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2488 ac_prog_rejected=yes
2489 continue
2490fi
2491ac_cv_prog_CC="cc"
598a2813 2492echo "$as_me:2491: found $ac_dir/$ac_word" >&5
925c2f3f 2493break
503d2be0
AS
2494done
2495
ba4481b5
DL
2496if test $ac_prog_rejected = yes; then
2497 # We found a bogon in the path, so make sure we never use it.
2498 set dummy $ac_cv_prog_CC
2499 shift
503d2be0 2500 if test $# != 0; then
ba4481b5
DL
2501 # We chose a different compiler from the bogus one.
2502 # However, it has the same basename, so the bogon will be chosen
2503 # first if we set CC to just the basename; use the full file name.
2504 shift
925c2f3f 2505 set dummy "$ac_dir/$ac_word" ${1+"$@"}
ba4481b5
DL
2506 shift
2507 ac_cv_prog_CC="$@"
2508 fi
2509fi
2510fi
2511fi
503d2be0 2512CC=$ac_cv_prog_CC
ba4481b5 2513if test -n "$CC"; then
598a2813 2514 echo "$as_me:2513: result: $CC" >&5
503d2be0 2515echo "${ECHO_T}$CC" >&6
ba4481b5 2516else
598a2813 2517 echo "$as_me:2516: result: no" >&5
503d2be0 2518echo "${ECHO_T}no" >&6
ba4481b5
DL
2519fi
2520
503d2be0
AS
2521fi
2522if test -z "$CC"; then
2523 if test -n "$ac_tool_prefix"; then
2524 for ac_prog in cl
2525 do
2526 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2527set dummy $ac_tool_prefix$ac_prog; ac_word=$2
598a2813 2528echo "$as_me:2527: checking for $ac_word" >&5
503d2be0
AS
2529echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2530if test "${ac_cv_prog_CC+set}" = set; then
2531 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2532else
2533 if test -n "$CC"; then
2534 ac_cv_prog_CC="$CC" # Let the user override the test.
2535else
925c2f3f
EZ
2536 ac_save_IFS=$IFS; IFS=$ac_path_separator
2537ac_dummy="$PATH"
2538for ac_dir in $ac_dummy; do
2539 IFS=$ac_save_IFS
2540 test -z "$ac_dir" && ac_dir=.
2541 $as_executable_p "$ac_dir/$ac_word" || continue
2542ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
598a2813 2543echo "$as_me:2542: found $ac_dir/$ac_word" >&5
925c2f3f 2544break
503d2be0
AS
2545done
2546
c4bb2108
DL
2547fi
2548fi
503d2be0 2549CC=$ac_cv_prog_CC
c4bb2108 2550if test -n "$CC"; then
598a2813 2551 echo "$as_me:2550: result: $CC" >&5
503d2be0 2552echo "${ECHO_T}$CC" >&6
c4bb2108 2553else
598a2813 2554 echo "$as_me:2553: result: no" >&5
503d2be0
AS
2555echo "${ECHO_T}no" >&6
2556fi
2557
2558 test -n "$CC" && break
2559 done
2560fi
2561if test -z "$CC"; then
2562 ac_ct_CC=$CC
2563 for ac_prog in cl
2564do
2565 # Extract the first word of "$ac_prog", so it can be a program name with args.
2566set dummy $ac_prog; ac_word=$2
598a2813 2567echo "$as_me:2566: checking for $ac_word" >&5
503d2be0
AS
2568echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2569if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2570 echo $ECHO_N "(cached) $ECHO_C" >&6
2571else
2572 if test -n "$ac_ct_CC"; then
2573 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2574else
925c2f3f
EZ
2575 ac_save_IFS=$IFS; IFS=$ac_path_separator
2576ac_dummy="$PATH"
2577for ac_dir in $ac_dummy; do
2578 IFS=$ac_save_IFS
2579 test -z "$ac_dir" && ac_dir=.
2580 $as_executable_p "$ac_dir/$ac_word" || continue
2581ac_cv_prog_ac_ct_CC="$ac_prog"
598a2813 2582echo "$as_me:2581: found $ac_dir/$ac_word" >&5
925c2f3f 2583break
503d2be0
AS
2584done
2585
c4bb2108 2586fi
503d2be0
AS
2587fi
2588ac_ct_CC=$ac_cv_prog_ac_ct_CC
2589if test -n "$ac_ct_CC"; then
598a2813 2590 echo "$as_me:2589: result: $ac_ct_CC" >&5
503d2be0
AS
2591echo "${ECHO_T}$ac_ct_CC" >&6
2592else
598a2813 2593 echo "$as_me:2592: result: no" >&5
503d2be0 2594echo "${ECHO_T}no" >&6
ba4481b5
DL
2595fi
2596
503d2be0
AS
2597 test -n "$ac_ct_CC" && break
2598done
ba4481b5 2599
503d2be0
AS
2600 CC=$ac_ct_CC
2601fi
2602
2603fi
ba4481b5 2604
598a2813 2605test -z "$CC" && { { echo "$as_me:2604: error: no acceptable cc found in \$PATH" >&5
925c2f3f 2606echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
503d2be0 2607 { (exit 1); exit 1; }; }
c4bb2108 2608
503d2be0 2609# Provide some information about the compiler.
598a2813 2610echo "$as_me:2609:" \
503d2be0
AS
2611 "checking for C compiler version" >&5
2612ac_compiler=`set X $ac_compile; echo $2`
598a2813 2613{ (eval echo "$as_me:2612: \"$ac_compiler --version </dev/null >&5\"") >&5
503d2be0
AS
2614 (eval $ac_compiler --version </dev/null >&5) 2>&5
2615 ac_status=$?
598a2813 2616 echo "$as_me:2615: \$? = $ac_status" >&5
503d2be0 2617 (exit $ac_status); }
598a2813 2618{ (eval echo "$as_me:2617: \"$ac_compiler -v </dev/null >&5\"") >&5
503d2be0
AS
2619 (eval $ac_compiler -v </dev/null >&5) 2>&5
2620 ac_status=$?
598a2813 2621 echo "$as_me:2620: \$? = $ac_status" >&5
503d2be0 2622 (exit $ac_status); }
598a2813 2623{ (eval echo "$as_me:2622: \"$ac_compiler -V </dev/null >&5\"") >&5
503d2be0
AS
2624 (eval $ac_compiler -V </dev/null >&5) 2>&5
2625 ac_status=$?
598a2813 2626 echo "$as_me:2625: \$? = $ac_status" >&5
503d2be0
AS
2627 (exit $ac_status); }
2628
2629cat >conftest.$ac_ext <<_ACEOF
925c2f3f 2630#line 2624 "configure"
ba4481b5 2631#include "confdefs.h"
c4bb2108 2632
503d2be0
AS
2633int
2634main ()
2635{
2636
2637 ;
2638 return 0;
2639}
2640_ACEOF
2641ac_clean_files_save=$ac_clean_files
2642ac_clean_files="$ac_clean_files a.out a.exe"
2643# Try to create an executable without -o first, disregard a.out.
2644# It will help us diagnose broken compilers, and finding out an intuition
2645# of exeext.
598a2813 2646echo "$as_me:2645: checking for C compiler default output" >&5
503d2be0
AS
2647echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2648ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
598a2813 2649if { (eval echo "$as_me:2648: \"$ac_link_default\"") >&5
503d2be0
AS
2650 (eval $ac_link_default) 2>&5
2651 ac_status=$?
598a2813 2652 echo "$as_me:2651: \$? = $ac_status" >&5
503d2be0
AS
2653 (exit $ac_status); }; then
2654 # Find the output, starting from the most likely. This scheme is
2655# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2656# resort.
925c2f3f 2657for ac_file in `ls a.exe conftest.exe 2>/dev/null;
503d2be0
AS
2658 ls a.out conftest 2>/dev/null;
2659 ls a.* conftest.* 2>/dev/null`; do
2660 case $ac_file in
925c2f3f 2661 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
503d2be0
AS
2662 a.out ) # We found the default executable, but exeext='' is most
2663 # certainly right.
2664 break;;
2665 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2666 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2667 export ac_cv_exeext
2668 break;;
2669 * ) break;;
2670 esac
2671done
2672else
2673 echo "$as_me: failed program was:" >&5
2674cat conftest.$ac_ext >&5
598a2813 2675{ { echo "$as_me:2674: error: C compiler cannot create executables" >&5
503d2be0
AS
2676echo "$as_me: error: C compiler cannot create executables" >&2;}
2677 { (exit 77); exit 77; }; }
2678fi
2679
2680ac_exeext=$ac_cv_exeext
598a2813 2681echo "$as_me:2680: result: $ac_file" >&5
503d2be0
AS
2682echo "${ECHO_T}$ac_file" >&6
2683
2684# Check the compiler produces executables we can run. If not, either
2685# the compiler is broken, or we cross compile.
598a2813 2686echo "$as_me:2685: checking whether the C compiler works" >&5
503d2be0
AS
2687echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2688# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2689# If not cross compiling, check that we can run a simple program.
2690if test "$cross_compiling" != yes; then
2691 if { ac_try='./$ac_file'
598a2813 2692 { (eval echo "$as_me:2691: \"$ac_try\"") >&5
503d2be0
AS
2693 (eval $ac_try) 2>&5
2694 ac_status=$?
598a2813 2695 echo "$as_me:2694: \$? = $ac_status" >&5
503d2be0
AS
2696 (exit $ac_status); }; }; then
2697 cross_compiling=no
ba4481b5 2698 else
503d2be0
AS
2699 if test "$cross_compiling" = maybe; then
2700 cross_compiling=yes
2701 else
598a2813 2702 { { echo "$as_me:2701: error: cannot run C compiled programs.
503d2be0
AS
2703If you meant to cross compile, use \`--host'." >&5
2704echo "$as_me: error: cannot run C compiled programs.
2705If you meant to cross compile, use \`--host'." >&2;}
2706 { (exit 1); exit 1; }; }
2707 fi
ba4481b5 2708 fi
503d2be0 2709fi
598a2813 2710echo "$as_me:2709: result: yes" >&5
503d2be0
AS
2711echo "${ECHO_T}yes" >&6
2712
2713rm -f a.out a.exe conftest$ac_cv_exeext
2714ac_clean_files=$ac_clean_files_save
2715# Check the compiler produces executables we can run. If not, either
2716# the compiler is broken, or we cross compile.
598a2813 2717echo "$as_me:2716: checking whether we are cross compiling" >&5
503d2be0 2718echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
598a2813 2719echo "$as_me:2718: result: $cross_compiling" >&5
503d2be0
AS
2720echo "${ECHO_T}$cross_compiling" >&6
2721
598a2813 2722echo "$as_me:2721: checking for executable suffix" >&5
925c2f3f 2723echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
598a2813 2724if { (eval echo "$as_me:2723: \"$ac_link\"") >&5
503d2be0
AS
2725 (eval $ac_link) 2>&5
2726 ac_status=$?
598a2813 2727 echo "$as_me:2726: \$? = $ac_status" >&5
503d2be0
AS
2728 (exit $ac_status); }; then
2729 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2730# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2731# work properly (i.e., refer to `conftest.exe'), while it won't with
2732# `rm'.
2733for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2734 case $ac_file in
8799b3e4 2735 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
503d2be0
AS
2736 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2737 export ac_cv_exeext
2738 break;;
2739 * ) break;;
2740 esac
2741done
ba4481b5 2742else
598a2813 2743 { { echo "$as_me:2742: error: cannot compute EXEEXT: cannot compile and link" >&5
925c2f3f 2744echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
503d2be0 2745 { (exit 1); exit 1; }; }
ba4481b5 2746fi
ba4481b5 2747
503d2be0 2748rm -f conftest$ac_cv_exeext
598a2813 2749echo "$as_me:2748: result: $ac_cv_exeext" >&5
503d2be0 2750echo "${ECHO_T}$ac_cv_exeext" >&6
ba4481b5 2751
503d2be0
AS
2752rm -f conftest.$ac_ext
2753EXEEXT=$ac_cv_exeext
2754ac_exeext=$EXEEXT
598a2813 2755echo "$as_me:2754: checking for object suffix" >&5
925c2f3f 2756echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
503d2be0
AS
2757if test "${ac_cv_objext+set}" = set; then
2758 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 2759else
503d2be0 2760 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 2761#line 2755 "configure"
503d2be0 2762#include "confdefs.h"
ba4481b5 2763
503d2be0
AS
2764int
2765main ()
2766{
ba4481b5 2767
503d2be0
AS
2768 ;
2769 return 0;
2770}
2771_ACEOF
2772rm -f conftest.o conftest.obj
598a2813 2773if { (eval echo "$as_me:2772: \"$ac_compile\"") >&5
503d2be0
AS
2774 (eval $ac_compile) 2>&5
2775 ac_status=$?
598a2813 2776 echo "$as_me:2775: \$? = $ac_status" >&5
503d2be0
AS
2777 (exit $ac_status); }; then
2778 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2779 case $ac_file in
8799b3e4 2780 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
503d2be0
AS
2781 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2782 break;;
2783 esac
2784done
c4bb2108 2785else
503d2be0
AS
2786 echo "$as_me: failed program was:" >&5
2787cat conftest.$ac_ext >&5
598a2813 2788{ { echo "$as_me:2787: error: cannot compute OBJEXT: cannot compile" >&5
925c2f3f 2789echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
503d2be0 2790 { (exit 1); exit 1; }; }
c4bb2108
DL
2791fi
2792
503d2be0
AS
2793rm -f conftest.$ac_cv_objext conftest.$ac_ext
2794fi
598a2813 2795echo "$as_me:2794: result: $ac_cv_objext" >&5
503d2be0
AS
2796echo "${ECHO_T}$ac_cv_objext" >&6
2797OBJEXT=$ac_cv_objext
2798ac_objext=$OBJEXT
598a2813 2799echo "$as_me:2798: checking whether we are using the GNU C compiler" >&5
503d2be0
AS
2800echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2801if test "${ac_cv_c_compiler_gnu+set}" = set; then
2802 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 2803else
503d2be0 2804 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 2805#line 2799 "configure"
503d2be0
AS
2806#include "confdefs.h"
2807
2808int
2809main ()
2810{
2811#ifndef __GNUC__
2812 choke me
2813#endif
2814
2815 ;
2816 return 0;
2817}
2818_ACEOF
2819rm -f conftest.$ac_objext
598a2813 2820if { (eval echo "$as_me:2819: \"$ac_compile\"") >&5
503d2be0
AS
2821 (eval $ac_compile) 2>&5
2822 ac_status=$?
598a2813 2823 echo "$as_me:2822: \$? = $ac_status" >&5
503d2be0
AS
2824 (exit $ac_status); } &&
2825 { ac_try='test -s conftest.$ac_objext'
598a2813 2826 { (eval echo "$as_me:2825: \"$ac_try\"") >&5
503d2be0
AS
2827 (eval $ac_try) 2>&5
2828 ac_status=$?
598a2813 2829 echo "$as_me:2828: \$? = $ac_status" >&5
503d2be0
AS
2830 (exit $ac_status); }; }; then
2831 ac_compiler_gnu=yes
2832else
2833 echo "$as_me: failed program was:" >&5
2834cat conftest.$ac_ext >&5
2835ac_compiler_gnu=no
2836fi
2837rm -f conftest.$ac_objext conftest.$ac_ext
2838ac_cv_c_compiler_gnu=$ac_compiler_gnu
2839
2840fi
598a2813 2841echo "$as_me:2840: result: $ac_cv_c_compiler_gnu" >&5
503d2be0
AS
2842echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2843GCC=`test $ac_compiler_gnu = yes && echo yes`
2844ac_test_CFLAGS=${CFLAGS+set}
2845ac_save_CFLAGS=$CFLAGS
2846CFLAGS="-g"
598a2813 2847echo "$as_me:2846: checking whether $CC accepts -g" >&5
503d2be0
AS
2848echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2849if test "${ac_cv_prog_cc_g+set}" = set; then
2850 echo $ECHO_N "(cached) $ECHO_C" >&6
2851else
2852 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 2853#line 2847 "configure"
503d2be0
AS
2854#include "confdefs.h"
2855
2856int
2857main ()
2858{
2859
2860 ;
2861 return 0;
2862}
2863_ACEOF
2864rm -f conftest.$ac_objext
598a2813 2865if { (eval echo "$as_me:2864: \"$ac_compile\"") >&5
503d2be0
AS
2866 (eval $ac_compile) 2>&5
2867 ac_status=$?
598a2813 2868 echo "$as_me:2867: \$? = $ac_status" >&5
503d2be0
AS
2869 (exit $ac_status); } &&
2870 { ac_try='test -s conftest.$ac_objext'
598a2813 2871 { (eval echo "$as_me:2870: \"$ac_try\"") >&5
503d2be0
AS
2872 (eval $ac_try) 2>&5
2873 ac_status=$?
598a2813 2874 echo "$as_me:2873: \$? = $ac_status" >&5
503d2be0 2875 (exit $ac_status); }; }; then
ba4481b5
DL
2876 ac_cv_prog_cc_g=yes
2877else
503d2be0
AS
2878 echo "$as_me: failed program was:" >&5
2879cat conftest.$ac_ext >&5
2880ac_cv_prog_cc_g=no
ba4481b5 2881fi
503d2be0 2882rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 2883fi
598a2813 2884echo "$as_me:2883: result: $ac_cv_prog_cc_g" >&5
503d2be0 2885echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c4bb2108 2886if test "$ac_test_CFLAGS" = set; then
503d2be0 2887 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
2888elif test $ac_cv_prog_cc_g = yes; then
2889 if test "$GCC" = yes; then
ba4481b5
DL
2890 CFLAGS="-g -O2"
2891 else
c4bb2108 2892 CFLAGS="-g"
ba4481b5 2893 fi
22afa6e8 2894else
c4bb2108
DL
2895 if test "$GCC" = yes; then
2896 CFLAGS="-O2"
2897 else
2898 CFLAGS=
2899 fi
ba4481b5 2900fi
503d2be0
AS
2901# Some people use a C++ compiler to compile C. Since we use `exit',
2902# in C++ we need to declare it. In case someone uses the same compiler
2903# for both compiling C and C++ we need to have the C++ compiler decide
2904# the declaration of exit, since it's the most demanding environment.
2905cat >conftest.$ac_ext <<_ACEOF
2906#ifndef __cplusplus
2907 choke me
2908#endif
2909_ACEOF
2910rm -f conftest.$ac_objext
598a2813 2911if { (eval echo "$as_me:2910: \"$ac_compile\"") >&5
503d2be0
AS
2912 (eval $ac_compile) 2>&5
2913 ac_status=$?
598a2813 2914 echo "$as_me:2913: \$? = $ac_status" >&5
503d2be0
AS
2915 (exit $ac_status); } &&
2916 { ac_try='test -s conftest.$ac_objext'
598a2813 2917 { (eval echo "$as_me:2916: \"$ac_try\"") >&5
503d2be0
AS
2918 (eval $ac_try) 2>&5
2919 ac_status=$?
598a2813 2920 echo "$as_me:2919: \$? = $ac_status" >&5
503d2be0
AS
2921 (exit $ac_status); }; }; then
2922 for ac_declaration in \
2923 ''\
2924 '#include <stdlib.h>' \
2925 'extern "C" void std::exit (int) throw (); using std::exit;' \
2926 'extern "C" void std::exit (int); using std::exit;' \
2927 'extern "C" void exit (int) throw ();' \
2928 'extern "C" void exit (int);' \
2929 'void exit (int);'
2930do
2931 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 2932#line 2926 "configure"
503d2be0
AS
2933#include "confdefs.h"
2934#include <stdlib.h>
2935$ac_declaration
2936int
2937main ()
2938{
2939exit (42);
2940 ;
2941 return 0;
2942}
2943_ACEOF
2944rm -f conftest.$ac_objext
598a2813 2945if { (eval echo "$as_me:2944: \"$ac_compile\"") >&5
503d2be0
AS
2946 (eval $ac_compile) 2>&5
2947 ac_status=$?
598a2813 2948 echo "$as_me:2947: \$? = $ac_status" >&5
503d2be0
AS
2949 (exit $ac_status); } &&
2950 { ac_try='test -s conftest.$ac_objext'
598a2813 2951 { (eval echo "$as_me:2950: \"$ac_try\"") >&5
503d2be0
AS
2952 (eval $ac_try) 2>&5
2953 ac_status=$?
598a2813 2954 echo "$as_me:2953: \$? = $ac_status" >&5
503d2be0
AS
2955 (exit $ac_status); }; }; then
2956 :
2957else
2958 echo "$as_me: failed program was:" >&5
2959cat conftest.$ac_ext >&5
2960continue
2961fi
2962rm -f conftest.$ac_objext conftest.$ac_ext
2963 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 2964#line 2958 "configure"
503d2be0
AS
2965#include "confdefs.h"
2966$ac_declaration
2967int
2968main ()
2969{
2970exit (42);
2971 ;
2972 return 0;
2973}
2974_ACEOF
2975rm -f conftest.$ac_objext
598a2813 2976if { (eval echo "$as_me:2975: \"$ac_compile\"") >&5
503d2be0
AS
2977 (eval $ac_compile) 2>&5
2978 ac_status=$?
598a2813 2979 echo "$as_me:2978: \$? = $ac_status" >&5
503d2be0
AS
2980 (exit $ac_status); } &&
2981 { ac_try='test -s conftest.$ac_objext'
598a2813 2982 { (eval echo "$as_me:2981: \"$ac_try\"") >&5
503d2be0
AS
2983 (eval $ac_try) 2>&5
2984 ac_status=$?
598a2813 2985 echo "$as_me:2984: \$? = $ac_status" >&5
503d2be0
AS
2986 (exit $ac_status); }; }; then
2987 break
2988else
2989 echo "$as_me: failed program was:" >&5
2990cat conftest.$ac_ext >&5
2991fi
2992rm -f conftest.$ac_objext conftest.$ac_ext
2993done
2994rm -f conftest*
2995if test -n "$ac_declaration"; then
2996 echo '#ifdef __cplusplus' >>confdefs.h
2997 echo $ac_declaration >>confdefs.h
2998 echo '#endif' >>confdefs.h
2999fi
ba4481b5 3000
503d2be0
AS
3001else
3002 echo "$as_me: failed program was:" >&5
3003cat conftest.$ac_ext >&5
3004fi
3005rm -f conftest.$ac_objext conftest.$ac_ext
3006ac_ext=c
3007ac_cpp='$CPP $CPPFLAGS'
3008ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3009ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3010ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
3011
3012# On Suns, sometimes $CPP names a directory.
3013if test -n "$CPP" && test -d "$CPP"; then
3014 CPP=
3015fi
3016
3017#### Some systems specify a CPP to use unless we are using GCC.
3018#### Now that we know whether we are using GCC, we can decide whether
3019#### to use that one.
3020if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3021then
3022 CPP="$NON_GNU_CPP"
3023fi
3024
3025#### Some systems specify a CC to use unless we are using GCC.
3026#### Now that we know whether we are using GCC, we can decide whether
3027#### to use that one.
3028if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3029 test x$cc_specified != xyes
3030then
3031 CC="$NON_GNU_CC"
3032fi
3033
3034if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3035then
3036 CC="$CC $GCC_TEST_OPTIONS"
3037fi
3038
3039if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3040then
3041 CC="$CC $NON_GCC_TEST_OPTIONS"
3042fi
3043
3044if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
3045then
3046 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
3047fi
3048
3049if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
3050then
3051 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
3052fi
3053
3054#### Some other nice autoconf tests. If you add a test here which
3055#### should make an entry in src/config.h, don't forget to add an
3056#### #undef clause to src/config.h.in for autoconf to modify.
3057
598a2813 3058echo "$as_me:3057: checking whether ln -s works" >&5
503d2be0
AS
3059echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3060LN_S=$as_ln_s
3061if test "$LN_S" = "ln -s"; then
598a2813 3062 echo "$as_me:3061: result: yes" >&5
503d2be0 3063echo "${ECHO_T}yes" >&6
ba4481b5 3064else
598a2813 3065 echo "$as_me:3064: result: no, using $LN_S" >&5
503d2be0 3066echo "${ECHO_T}no, using $LN_S" >&6
ba4481b5
DL
3067fi
3068
503d2be0
AS
3069ac_ext=c
3070ac_cpp='$CPP $CPPFLAGS'
3071ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3072ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3073ac_compiler_gnu=$ac_cv_c_compiler_gnu
598a2813 3074echo "$as_me:3073: checking how to run the C preprocessor" >&5
503d2be0 3075echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
ba4481b5
DL
3076# On Suns, sometimes $CPP names a directory.
3077if test -n "$CPP" && test -d "$CPP"; then
3078 CPP=
3079fi
3080if test -z "$CPP"; then
503d2be0
AS
3081 if test "${ac_cv_prog_CPP+set}" = set; then
3082 echo $ECHO_N "(cached) $ECHO_C" >&6
3083else
3084 # Double quotes because CPP needs to be expanded
3085 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3086 do
3087 ac_preproc_ok=false
3088for ac_c_preproc_warn_flag in '' yes
3089do
3090 # Use a header file that comes with gcc, so configuring glibc
3091 # with a fresh cross-compiler works.
ba4481b5 3092 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
3093 # not just through cpp. "Syntax error" is here to catch this case.
3094 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 3095#line 3089 "configure"
ba4481b5
DL
3096#include "confdefs.h"
3097#include <assert.h>
503d2be0
AS
3098 Syntax error
3099_ACEOF
598a2813 3100if { (eval echo "$as_me:3099: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3101 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3102 ac_status=$?
3103 egrep -v '^ *\+' conftest.er1 >conftest.err
3104 rm -f conftest.er1
3105 cat conftest.err >&5
598a2813 3106 echo "$as_me:3105: \$? = $ac_status" >&5
503d2be0
AS
3107 (exit $ac_status); } >/dev/null; then
3108 if test -s conftest.err; then
3109 ac_cpp_err=$ac_c_preproc_warn_flag
3110 else
3111 ac_cpp_err=
3112 fi
3113else
3114 ac_cpp_err=yes
3115fi
3116if test -z "$ac_cpp_err"; then
ba4481b5
DL
3117 :
3118else
503d2be0 3119 echo "$as_me: failed program was:" >&5
ba4481b5 3120 cat conftest.$ac_ext >&5
503d2be0
AS
3121 # Broken: fails on valid input.
3122continue
3123fi
3124rm -f conftest.err conftest.$ac_ext
3125
3126 # OK, works on sane cases. Now check whether non-existent headers
3127 # can be detected and how.
3128 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 3129#line 3123 "configure"
503d2be0
AS
3130#include "confdefs.h"
3131#include <ac_nonexistent.h>
3132_ACEOF
598a2813 3133if { (eval echo "$as_me:3132: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3134 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3135 ac_status=$?
3136 egrep -v '^ *\+' conftest.er1 >conftest.err
3137 rm -f conftest.er1
3138 cat conftest.err >&5
598a2813 3139 echo "$as_me:3138: \$? = $ac_status" >&5
503d2be0
AS
3140 (exit $ac_status); } >/dev/null; then
3141 if test -s conftest.err; then
3142 ac_cpp_err=$ac_c_preproc_warn_flag
3143 else
3144 ac_cpp_err=
3145 fi
3146else
3147 ac_cpp_err=yes
3148fi
3149if test -z "$ac_cpp_err"; then
3150 # Broken: success on invalid input.
3151continue
c4bb2108 3152else
503d2be0 3153 echo "$as_me: failed program was:" >&5
c4bb2108 3154 cat conftest.$ac_ext >&5
503d2be0
AS
3155 # Passes both tests.
3156ac_preproc_ok=:
3157break
3158fi
3159rm -f conftest.err conftest.$ac_ext
3160
3161done
3162# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3163rm -f conftest.err conftest.$ac_ext
3164if $ac_preproc_ok; then
3165 break
3166fi
3167
3168 done
3169 ac_cv_prog_CPP=$CPP
3170
3171fi
3172 CPP=$ac_cv_prog_CPP
3173else
3174 ac_cv_prog_CPP=$CPP
3175fi
598a2813 3176echo "$as_me:3175: result: $CPP" >&5
503d2be0
AS
3177echo "${ECHO_T}$CPP" >&6
3178ac_preproc_ok=false
3179for ac_c_preproc_warn_flag in '' yes
3180do
3181 # Use a header file that comes with gcc, so configuring glibc
3182 # with a fresh cross-compiler works.
3183 # On the NeXT, cc -E runs the code through the compiler's parser,
3184 # not just through cpp. "Syntax error" is here to catch this case.
3185 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 3186#line 3180 "configure"
c4bb2108
DL
3187#include "confdefs.h"
3188#include <assert.h>
503d2be0
AS
3189 Syntax error
3190_ACEOF
598a2813 3191if { (eval echo "$as_me:3190: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3192 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3193 ac_status=$?
3194 egrep -v '^ *\+' conftest.er1 >conftest.err
3195 rm -f conftest.er1
3196 cat conftest.err >&5
598a2813 3197 echo "$as_me:3196: \$? = $ac_status" >&5
503d2be0
AS
3198 (exit $ac_status); } >/dev/null; then
3199 if test -s conftest.err; then
3200 ac_cpp_err=$ac_c_preproc_warn_flag
3201 else
3202 ac_cpp_err=
3203 fi
3204else
3205 ac_cpp_err=yes
3206fi
3207if test -z "$ac_cpp_err"; then
ba4481b5
DL
3208 :
3209else
503d2be0 3210 echo "$as_me: failed program was:" >&5
ba4481b5 3211 cat conftest.$ac_ext >&5
503d2be0
AS
3212 # Broken: fails on valid input.
3213continue
3214fi
3215rm -f conftest.err conftest.$ac_ext
3216
3217 # OK, works on sane cases. Now check whether non-existent headers
3218 # can be detected and how.
3219 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 3220#line 3214 "configure"
503d2be0
AS
3221#include "confdefs.h"
3222#include <ac_nonexistent.h>
3223_ACEOF
598a2813 3224if { (eval echo "$as_me:3223: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3225 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3226 ac_status=$?
3227 egrep -v '^ *\+' conftest.er1 >conftest.err
3228 rm -f conftest.er1
3229 cat conftest.err >&5
598a2813 3230 echo "$as_me:3229: \$? = $ac_status" >&5
503d2be0
AS
3231 (exit $ac_status); } >/dev/null; then
3232 if test -s conftest.err; then
3233 ac_cpp_err=$ac_c_preproc_warn_flag
3234 else
3235 ac_cpp_err=
3236 fi
3237else
3238 ac_cpp_err=yes
c4bb2108 3239fi
503d2be0
AS
3240if test -z "$ac_cpp_err"; then
3241 # Broken: success on invalid input.
3242continue
3243else
3244 echo "$as_me: failed program was:" >&5
3245 cat conftest.$ac_ext >&5
3246 # Passes both tests.
3247ac_preproc_ok=:
3248break
ba4481b5 3249fi
503d2be0
AS
3250rm -f conftest.err conftest.$ac_ext
3251
3252done
3253# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3254rm -f conftest.err conftest.$ac_ext
3255if $ac_preproc_ok; then
3256 :
ba4481b5 3257else
598a2813 3258 { { echo "$as_me:3257: error: C preprocessor \"$CPP\" fails sanity check" >&5
503d2be0
AS
3259echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3260 { (exit 1); exit 1; }; }
ba4481b5 3261fi
503d2be0
AS
3262
3263ac_ext=c
3264ac_cpp='$CPP $CPPFLAGS'
3265ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3266ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3267ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
3268
3269# Find a good install program. We prefer a C program (faster),
3270# so one script is as good as another. But avoid the broken or
3271# incompatible versions:
3272# SysV /etc/install, /usr/sbin/install
3273# SunOS /usr/etc/install
3274# IRIX /sbin/install
3275# AIX /bin/install
503d2be0 3276# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 3277# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
3278# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3279# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3280# ./install, which can be erroneously created by make from ./install.sh.
598a2813 3281echo "$as_me:3280: checking for a BSD compatible install" >&5
925c2f3f 3282echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
ba4481b5 3283if test -z "$INSTALL"; then
503d2be0
AS
3284if test "${ac_cv_path_install+set}" = set; then
3285 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3286else
925c2f3f
EZ
3287 ac_save_IFS=$IFS; IFS=$ac_path_separator
3288 for ac_dir in $PATH; do
3289 IFS=$ac_save_IFS
3290 # Account for people who put trailing slashes in PATH elements.
3291 case $ac_dir/ in
3292 / | ./ | .// | /cC/* \
3293 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3294 | /usr/ucb/* ) ;;
3295 *)
3296 # OSF1 and SCO ODT 3.0 have their own names for install.
3297 # Don't use installbsd from OSF since it installs stuff as root
3298 # by default.
3299 for ac_prog in ginstall scoinst install; do
3300 if $as_executable_p "$ac_dir/$ac_prog"; then
3301 if test $ac_prog = install &&
3302 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3303 # AIX install. It has an incompatible calling convention.
3304 :
3305 elif test $ac_prog = install &&
3306 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3307 # program-specific install script used by HP pwplus--don't use.
3308 :
3309 else
3310 ac_cv_path_install="$ac_dir/$ac_prog -c"
3311 break 2
3312 fi
3313 fi
ba4481b5 3314 done
925c2f3f
EZ
3315 ;;
3316 esac
3317 done
ba4481b5
DL
3318
3319fi
3320 if test "${ac_cv_path_install+set}" = set; then
503d2be0 3321 INSTALL=$ac_cv_path_install
ba4481b5
DL
3322 else
3323 # As a last resort, use the slow shell script. We don't cache a
3324 # path for INSTALL within a source directory, because that will
3325 # break other packages using the cache if that directory is
3326 # removed, or if the path is relative.
503d2be0 3327 INSTALL=$ac_install_sh
ba4481b5
DL
3328 fi
3329fi
598a2813 3330echo "$as_me:3329: result: $INSTALL" >&5
503d2be0 3331echo "${ECHO_T}$INSTALL" >&6
ba4481b5
DL
3332
3333# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3334# It thinks the first close brace ends the variable substitution.
3335test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3336
503d2be0 3337test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 3338
ba4481b5
DL
3339test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3340
3341for ac_prog in 'bison -y' byacc
3342do
503d2be0 3343 # Extract the first word of "$ac_prog", so it can be a program name with args.
ba4481b5 3344set dummy $ac_prog; ac_word=$2
598a2813 3345echo "$as_me:3344: checking for $ac_word" >&5
503d2be0
AS
3346echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3347if test "${ac_cv_prog_YACC+set}" = set; then
3348 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3349else
3350 if test -n "$YACC"; then
3351 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3352else
925c2f3f
EZ
3353 ac_save_IFS=$IFS; IFS=$ac_path_separator
3354ac_dummy="$PATH"
3355for ac_dir in $ac_dummy; do
3356 IFS=$ac_save_IFS
3357 test -z "$ac_dir" && ac_dir=.
3358 $as_executable_p "$ac_dir/$ac_word" || continue
3359ac_cv_prog_YACC="$ac_prog"
598a2813 3360echo "$as_me:3359: found $ac_dir/$ac_word" >&5
925c2f3f 3361break
503d2be0
AS
3362done
3363
ba4481b5
DL
3364fi
3365fi
503d2be0 3366YACC=$ac_cv_prog_YACC
ba4481b5 3367if test -n "$YACC"; then
598a2813 3368 echo "$as_me:3367: result: $YACC" >&5
503d2be0 3369echo "${ECHO_T}$YACC" >&6
ba4481b5 3370else
598a2813 3371 echo "$as_me:3370: result: no" >&5
503d2be0 3372echo "${ECHO_T}no" >&6
ba4481b5
DL
3373fi
3374
503d2be0 3375 test -n "$YACC" && break
ba4481b5
DL
3376done
3377test -n "$YACC" || YACC="yacc"
3378
7397acc4 3379if test "x$RANLIB" = x; then
503d2be0
AS
3380 if test -n "$ac_tool_prefix"; then
3381 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3382set dummy ${ac_tool_prefix}ranlib; ac_word=$2
598a2813 3383echo "$as_me:3382: checking for $ac_word" >&5
503d2be0
AS
3384echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3385if test "${ac_cv_prog_RANLIB+set}" = set; then
3386 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
3387else
3388 if test -n "$RANLIB"; then
3389 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3390else
925c2f3f
EZ
3391 ac_save_IFS=$IFS; IFS=$ac_path_separator
3392ac_dummy="$PATH"
3393for ac_dir in $ac_dummy; do
3394 IFS=$ac_save_IFS
3395 test -z "$ac_dir" && ac_dir=.
3396 $as_executable_p "$ac_dir/$ac_word" || continue
3397ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
598a2813 3398echo "$as_me:3397: found $ac_dir/$ac_word" >&5
925c2f3f 3399break
503d2be0
AS
3400done
3401
7397acc4
DL
3402fi
3403fi
503d2be0 3404RANLIB=$ac_cv_prog_RANLIB
7397acc4 3405if test -n "$RANLIB"; then
598a2813 3406 echo "$as_me:3405: result: $RANLIB" >&5
503d2be0
AS
3407echo "${ECHO_T}$RANLIB" >&6
3408else
598a2813 3409 echo "$as_me:3408: result: no" >&5
503d2be0
AS
3410echo "${ECHO_T}no" >&6
3411fi
3412
3413fi
3414if test -z "$ac_cv_prog_RANLIB"; then
3415 ac_ct_RANLIB=$RANLIB
3416 # Extract the first word of "ranlib", so it can be a program name with args.
3417set dummy ranlib; ac_word=$2
598a2813 3418echo "$as_me:3417: checking for $ac_word" >&5
503d2be0
AS
3419echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3420if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3421 echo $ECHO_N "(cached) $ECHO_C" >&6
3422else
3423 if test -n "$ac_ct_RANLIB"; then
3424 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3425else
925c2f3f
EZ
3426 ac_save_IFS=$IFS; IFS=$ac_path_separator
3427ac_dummy="$PATH"
3428for ac_dir in $ac_dummy; do
3429 IFS=$ac_save_IFS
3430 test -z "$ac_dir" && ac_dir=.
3431 $as_executable_p "$ac_dir/$ac_word" || continue
3432ac_cv_prog_ac_ct_RANLIB="ranlib"
598a2813 3433echo "$as_me:3432: found $ac_dir/$ac_word" >&5
925c2f3f 3434break
503d2be0
AS
3435done
3436
3437 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3438fi
3439fi
3440ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3441if test -n "$ac_ct_RANLIB"; then
598a2813 3442 echo "$as_me:3441: result: $ac_ct_RANLIB" >&5
503d2be0
AS
3443echo "${ECHO_T}$ac_ct_RANLIB" >&6
3444else
598a2813 3445 echo "$as_me:3444: result: no" >&5
503d2be0
AS
3446echo "${ECHO_T}no" >&6
3447fi
3448
3449 RANLIB=$ac_ct_RANLIB
7397acc4 3450else
503d2be0 3451 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
3452fi
3453
3454fi
ba4481b5 3455
598a2813 3456echo "$as_me:3455: checking for AIX" >&5
503d2be0
AS
3457echo $ECHO_N "checking for AIX... $ECHO_C" >&6
3458cat >conftest.$ac_ext <<_ACEOF
925c2f3f 3459#line 3453 "configure"
ba4481b5
DL
3460#include "confdefs.h"
3461#ifdef _AIX
3462 yes
3463#endif
3464
503d2be0 3465_ACEOF
ba4481b5
DL
3466if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3467 egrep "yes" >/dev/null 2>&1; then
598a2813 3468 echo "$as_me:3467: result: yes" >&5
503d2be0 3469echo "${ECHO_T}yes" >&6
925c2f3f 3470cat >>confdefs.h <<\EOF
ba4481b5 3471#define _ALL_SOURCE 1
925c2f3f 3472EOF
ba4481b5
DL
3473
3474else
598a2813 3475 echo "$as_me:3474: result: no" >&5
503d2be0 3476echo "${ECHO_T}no" >&6
ba4481b5
DL
3477fi
3478rm -f conftest*
3479
3b33a005
DL
3480#### Extract some information from the operating system and machine files.
3481
598a2813 3482{ echo "$as_me:3481: checking the machine- and system-dependent files to find out
3b33a005 3483 - which libraries the lib-src programs will want, and
503d2be0
AS
3484 - whether the GNU malloc routines are usable..." >&5
3485echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 3486 - which libraries the lib-src programs will want, and
503d2be0 3487 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
3488
3489### First figure out CFLAGS (which we use for running the compiler here)
3490### and REAL_CFLAGS (which we use for real compilation).
3491### The two are the same except on a few systems, where they are made
3492### different to work around various lossages. For example,
3493### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
3494### as implying static linking.
3495
3496### If the CFLAGS env var is specified, we use that value
3497### instead of the default.
3498
3499### It's not important that this name contain the PID; you can't run
3500### two configures in the same directory and have anything work
3501### anyway.
3502tempcname="conftest.c"
3503
3504echo '
3505#include "'${srcdir}'/src/'${opsysfile}'"
3506#include "'${srcdir}'/src/'${machfile}'"
3507#ifndef LIBS_MACHINE
3508#define LIBS_MACHINE
3509#endif
3510#ifndef LIBS_SYSTEM
3511#define LIBS_SYSTEM
3512#endif
3513#ifndef C_SWITCH_SYSTEM
3514#define C_SWITCH_SYSTEM
3515#endif
3516#ifndef C_SWITCH_MACHINE
3517#define C_SWITCH_MACHINE
3518#endif
3519configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
3520configure___ c_switch_system=C_SWITCH_SYSTEM
3521configure___ c_switch_machine=C_SWITCH_MACHINE
3522
3523#ifndef LIB_X11_LIB
3524#define LIB_X11_LIB -lX11
3525#endif
3526
3527#ifndef LIBX11_MACHINE
3528#define LIBX11_MACHINE
3529#endif
3530
3531#ifndef LIBX11_SYSTEM
3532#define LIBX11_SYSTEM
3533#endif
3534configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
3535
3536#ifdef UNEXEC
3537configure___ unexec=UNEXEC
3538#else
3539configure___ unexec=unexec.o
3540#endif
3541
3542#ifdef SYSTEM_MALLOC
3543configure___ system_malloc=yes
3544#else
3545configure___ system_malloc=no
3546#endif
3547
ef9e4345
GM
3548#ifdef USE_MMAP_FOR_BUFFERS
3549configure___ use_mmap_for_buffers=yes
73b77ee5 3550#else
ef9e4345 3551configure___ use_mmap_for_buffers=no
73b77ee5
GM
3552#endif
3553
3b33a005
DL
3554#ifndef C_DEBUG_SWITCH
3555#define C_DEBUG_SWITCH -g
3556#endif
3557
3558#ifndef C_OPTIMIZE_SWITCH
3559#ifdef __GNUC__
3560#define C_OPTIMIZE_SWITCH -O2
3561#else
3562#define C_OPTIMIZE_SWITCH -O
3563#endif
3564#endif
3565
3566#ifndef LD_SWITCH_MACHINE
3567#define LD_SWITCH_MACHINE
3568#endif
3569
3570#ifndef LD_SWITCH_SYSTEM
3571#define LD_SWITCH_SYSTEM
3572#endif
3573
3574#ifndef LD_SWITCH_X_SITE_AUX
3575#define LD_SWITCH_X_SITE_AUX
503d2be0 3576#endif
3b33a005
DL
3577
3578configure___ ld_switch_system=LD_SWITCH_SYSTEM
3579configure___ ld_switch_machine=LD_SWITCH_MACHINE
3580
3581#ifdef THIS_IS_CONFIGURE
3582
3583/* Get the CFLAGS for tests in configure. */
3584#ifdef __GNUC__
3585configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3586#else
3587configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3588#endif
3589
3590#else /* not THIS_IS_CONFIGURE */
3591
3592/* Get the CFLAGS for real compilation. */
3593#ifdef __GNUC__
3594configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3595#else
3596configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3597#endif
3598
3599#endif /* not THIS_IS_CONFIGURE */
3600' > ${tempcname}
3601
3602# The value of CPP is a quoted variable reference, so we need to do this
3603# to get its actual value...
3604CPP=`eval "echo $CPP"`
3605eval `${CPP} -Isrc ${tempcname} \
3606 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3607if test "x$SPECIFIED_CFLAGS" = x; then
3608 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
3609 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3610else
3611 REAL_CFLAGS="$CFLAGS"
3612fi
3613rm ${tempcname}
3614
3615ac_link="$ac_link $ld_switch_machine $ld_switch_system"
3616
3617### Make sure subsequent tests use flags consistent with the build flags.
3618
3619if test x"${OVERRIDE_CPPFLAGS}" != x; then
3620 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
3621else
3622 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
3623fi
3624
503d2be0 3625# Check whether --enable-largefile or --disable-largefile was given.
f4988be7
GM
3626if test "${enable_largefile+set}" = set; then
3627 enableval="$enable_largefile"
f4988be7 3628
503d2be0
AS
3629fi;
3630if test "$enable_largefile" != no; then
f4988be7 3631
598a2813 3632 echo "$as_me:3631: checking for special C compiler options needed for large files" >&5
503d2be0
AS
3633echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
3634if test "${ac_cv_sys_largefile_CC+set}" = set; then
3635 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3636else
f4988be7 3637 ac_cv_sys_largefile_CC=no
503d2be0
AS
3638 if test "$GCC" != yes; then
3639 ac_save_CC=$CC
3640 while :; do
3641 # IRIX 6.2 and later do not support large files by default,
3642 # so use the C compiler's -n32 option if that helps.
3643 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 3644#line 3638 "configure"
b192d653 3645#include "confdefs.h"
f4988be7 3646#include <sys/types.h>
503d2be0
AS
3647 /* Check that off_t can represent 2**63 - 1 correctly.
3648 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3649 since some C++ compilers masquerading as C compilers
3650 incorrectly reject 9223372036854775807. */
3651#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3652 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3653 && LARGE_OFF_T % 2147483647 == 1)
3654 ? 1 : -1];
3655int
3656main ()
3657{
f4988be7 3658
503d2be0
AS
3659 ;
3660 return 0;
3661}
3662_ACEOF
3663 rm -f conftest.$ac_objext
598a2813 3664if { (eval echo "$as_me:3663: \"$ac_compile\"") >&5
503d2be0
AS
3665 (eval $ac_compile) 2>&5
3666 ac_status=$?
598a2813 3667 echo "$as_me:3666: \$? = $ac_status" >&5
503d2be0
AS
3668 (exit $ac_status); } &&
3669 { ac_try='test -s conftest.$ac_objext'
598a2813 3670 { (eval echo "$as_me:3669: \"$ac_try\"") >&5
503d2be0
AS
3671 (eval $ac_try) 2>&5
3672 ac_status=$?
598a2813 3673 echo "$as_me:3672: \$? = $ac_status" >&5
503d2be0
AS
3674 (exit $ac_status); }; }; then
3675 break
b192d653 3676else
503d2be0
AS
3677 echo "$as_me: failed program was:" >&5
3678cat conftest.$ac_ext >&5
3679fi
3680rm -f conftest.$ac_objext
3681 CC="$CC -n32"
3682 rm -f conftest.$ac_objext
598a2813 3683if { (eval echo "$as_me:3682: \"$ac_compile\"") >&5
503d2be0
AS
3684 (eval $ac_compile) 2>&5
3685 ac_status=$?
598a2813 3686 echo "$as_me:3685: \$? = $ac_status" >&5
503d2be0
AS
3687 (exit $ac_status); } &&
3688 { ac_try='test -s conftest.$ac_objext'
598a2813 3689 { (eval echo "$as_me:3688: \"$ac_try\"") >&5
503d2be0
AS
3690 (eval $ac_try) 2>&5
3691 ac_status=$?
598a2813 3692 echo "$as_me:3691: \$? = $ac_status" >&5
503d2be0
AS
3693 (exit $ac_status); }; }; then
3694 ac_cv_sys_largefile_CC=' -n32'; break
3695else
3696 echo "$as_me: failed program was:" >&5
3697cat conftest.$ac_ext >&5
3698fi
3699rm -f conftest.$ac_objext
3700 break
3701 done
3702 CC=$ac_save_CC
3703 rm -f conftest.$ac_ext
3704 fi
b192d653 3705fi
598a2813 3706echo "$as_me:3705: result: $ac_cv_sys_largefile_CC" >&5
503d2be0
AS
3707echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
3708 if test "$ac_cv_sys_largefile_CC" != no; then
3709 CC=$CC$ac_cv_sys_largefile_CC
3710 fi
b192d653 3711
598a2813 3712 echo "$as_me:3711: checking for _FILE_OFFSET_BITS value needed for large files" >&5
503d2be0
AS
3713echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
3714if test "${ac_cv_sys_file_offset_bits+set}" = set; then
3715 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3716else
503d2be0 3717 while :; do
f4988be7 3718 ac_cv_sys_file_offset_bits=no
503d2be0 3719 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 3720#line 3714 "configure"
f4988be7
GM
3721#include "confdefs.h"
3722#include <sys/types.h>
503d2be0
AS
3723 /* Check that off_t can represent 2**63 - 1 correctly.
3724 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3725 since some C++ compilers masquerading as C compilers
3726 incorrectly reject 9223372036854775807. */
3727#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3728 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3729 && LARGE_OFF_T % 2147483647 == 1)
3730 ? 1 : -1];
3731int
3732main ()
3733{
f4988be7 3734
503d2be0
AS
3735 ;
3736 return 0;
3737}
3738_ACEOF
3739rm -f conftest.$ac_objext
598a2813 3740if { (eval echo "$as_me:3739: \"$ac_compile\"") >&5
503d2be0
AS
3741 (eval $ac_compile) 2>&5
3742 ac_status=$?
598a2813 3743 echo "$as_me:3742: \$? = $ac_status" >&5
503d2be0
AS
3744 (exit $ac_status); } &&
3745 { ac_try='test -s conftest.$ac_objext'
598a2813 3746 { (eval echo "$as_me:3745: \"$ac_try\"") >&5
503d2be0
AS
3747 (eval $ac_try) 2>&5
3748 ac_status=$?
598a2813 3749 echo "$as_me:3748: \$? = $ac_status" >&5
503d2be0
AS
3750 (exit $ac_status); }; }; then
3751 break
f4988be7 3752else
503d2be0
AS
3753 echo "$as_me: failed program was:" >&5
3754cat conftest.$ac_ext >&5
3755fi
3756rm -f conftest.$ac_objext conftest.$ac_ext
3757 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 3758#line 3752 "configure"
ba4481b5 3759#include "confdefs.h"
f4988be7
GM
3760#define _FILE_OFFSET_BITS 64
3761#include <sys/types.h>
503d2be0
AS
3762 /* Check that off_t can represent 2**63 - 1 correctly.
3763 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3764 since some C++ compilers masquerading as C compilers
3765 incorrectly reject 9223372036854775807. */
3766#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3767 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3768 && LARGE_OFF_T % 2147483647 == 1)
3769 ? 1 : -1];
3770int
3771main ()
3772{
3773
3774 ;
3775 return 0;
3776}
3777_ACEOF
3778rm -f conftest.$ac_objext
598a2813 3779if { (eval echo "$as_me:3778: \"$ac_compile\"") >&5
503d2be0
AS
3780 (eval $ac_compile) 2>&5
3781 ac_status=$?
598a2813 3782 echo "$as_me:3781: \$? = $ac_status" >&5
503d2be0
AS
3783 (exit $ac_status); } &&
3784 { ac_try='test -s conftest.$ac_objext'
598a2813 3785 { (eval echo "$as_me:3784: \"$ac_try\"") >&5
503d2be0
AS
3786 (eval $ac_try) 2>&5
3787 ac_status=$?
598a2813 3788 echo "$as_me:3787: \$? = $ac_status" >&5
503d2be0
AS
3789 (exit $ac_status); }; }; then
3790 ac_cv_sys_file_offset_bits=64; break
3791else
3792 echo "$as_me: failed program was:" >&5
3793cat conftest.$ac_ext >&5
3794fi
3795rm -f conftest.$ac_objext conftest.$ac_ext
3796 break
3797done
ba4481b5 3798fi
598a2813 3799echo "$as_me:3798: result: $ac_cv_sys_file_offset_bits" >&5
503d2be0
AS
3800echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
3801if test "$ac_cv_sys_file_offset_bits" != no; then
ba4481b5 3802
925c2f3f 3803cat >>confdefs.h <<EOF
f4988be7 3804#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
925c2f3f 3805EOF
f4988be7 3806
503d2be0
AS
3807fi
3808rm -f conftest*
598a2813 3809 echo "$as_me:3808: checking for _LARGE_FILES value needed for large files" >&5
503d2be0
AS
3810echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
3811if test "${ac_cv_sys_large_files+set}" = set; then
3812 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3813else
503d2be0 3814 while :; do
f4988be7 3815 ac_cv_sys_large_files=no
503d2be0 3816 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 3817#line 3811 "configure"
f4988be7 3818#include "confdefs.h"
503d2be0
AS
3819#include <sys/types.h>
3820 /* Check that off_t can represent 2**63 - 1 correctly.
3821 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3822 since some C++ compilers masquerading as C compilers
3823 incorrectly reject 9223372036854775807. */
3824#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3825 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3826 && LARGE_OFF_T % 2147483647 == 1)
3827 ? 1 : -1];
3828int
3829main ()
3830{
ba4481b5 3831
503d2be0
AS
3832 ;
3833 return 0;
3834}
3835_ACEOF
3836rm -f conftest.$ac_objext
598a2813 3837if { (eval echo "$as_me:3836: \"$ac_compile\"") >&5
503d2be0
AS
3838 (eval $ac_compile) 2>&5
3839 ac_status=$?
598a2813 3840 echo "$as_me:3839: \$? = $ac_status" >&5
503d2be0
AS
3841 (exit $ac_status); } &&
3842 { ac_try='test -s conftest.$ac_objext'
598a2813 3843 { (eval echo "$as_me:3842: \"$ac_try\"") >&5
503d2be0
AS
3844 (eval $ac_try) 2>&5
3845 ac_status=$?
598a2813 3846 echo "$as_me:3845: \$? = $ac_status" >&5
503d2be0
AS
3847 (exit $ac_status); }; }; then
3848 break
ba4481b5 3849else
503d2be0
AS
3850 echo "$as_me: failed program was:" >&5
3851cat conftest.$ac_ext >&5
3852fi
3853rm -f conftest.$ac_objext conftest.$ac_ext
3854 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 3855#line 3849 "configure"
ba4481b5 3856#include "confdefs.h"
f4988be7 3857#define _LARGE_FILES 1
503d2be0
AS
3858#include <sys/types.h>
3859 /* Check that off_t can represent 2**63 - 1 correctly.
3860 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3861 since some C++ compilers masquerading as C compilers
3862 incorrectly reject 9223372036854775807. */
3863#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3864 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3865 && LARGE_OFF_T % 2147483647 == 1)
3866 ? 1 : -1];
3867int
3868main ()
3869{
f4988be7 3870
503d2be0
AS
3871 ;
3872 return 0;
3873}
3874_ACEOF
3875rm -f conftest.$ac_objext
598a2813 3876if { (eval echo "$as_me:3875: \"$ac_compile\"") >&5
503d2be0
AS
3877 (eval $ac_compile) 2>&5
3878 ac_status=$?
598a2813 3879 echo "$as_me:3878: \$? = $ac_status" >&5
503d2be0
AS
3880 (exit $ac_status); } &&
3881 { ac_try='test -s conftest.$ac_objext'
598a2813 3882 { (eval echo "$as_me:3881: \"$ac_try\"") >&5
503d2be0
AS
3883 (eval $ac_try) 2>&5
3884 ac_status=$?
598a2813 3885 echo "$as_me:3884: \$? = $ac_status" >&5
503d2be0
AS
3886 (exit $ac_status); }; }; then
3887 ac_cv_sys_large_files=1; break
3888else
3889 echo "$as_me: failed program was:" >&5
3890cat conftest.$ac_ext >&5
3891fi
3892rm -f conftest.$ac_objext conftest.$ac_ext
3893 break
3894done
ba4481b5 3895fi
598a2813 3896echo "$as_me:3895: result: $ac_cv_sys_large_files" >&5
503d2be0
AS
3897echo "${ECHO_T}$ac_cv_sys_large_files" >&6
3898if test "$ac_cv_sys_large_files" != no; then
ba4481b5 3899
925c2f3f 3900cat >>confdefs.h <<EOF
f4988be7 3901#define _LARGE_FILES $ac_cv_sys_large_files
925c2f3f 3902EOF
ba4481b5 3903
503d2be0
AS
3904fi
3905rm -f conftest*
3906fi
ba4481b5 3907
2c9dccc9
PJ
3908if test "${with_sound}" != "no"; then
3909 # Sound support for GNU/Linux and the free BSDs.
98418dba
CW
3910
3911for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
3912do
3913as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
598a2813 3914echo "$as_me:3913: checking for $ac_header" >&5
98418dba
CW
3915echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3916if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 3917 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 3918else
925c2f3f
EZ
3919 cat >conftest.$ac_ext <<_ACEOF
3920#line 3914 "configure"
f4988be7 3921#include "confdefs.h"
98418dba 3922#include <$ac_header>
503d2be0 3923_ACEOF
598a2813 3924if { (eval echo "$as_me:3923: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 3925 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 3926 ac_status=$?
98418dba
CW
3927 egrep -v '^ *\+' conftest.er1 >conftest.err
3928 rm -f conftest.er1
3929 cat conftest.err >&5
598a2813 3930 echo "$as_me:3929: \$? = $ac_status" >&5
98418dba
CW
3931 (exit $ac_status); } >/dev/null; then
3932 if test -s conftest.err; then
3933 ac_cpp_err=$ac_c_preproc_warn_flag
3934 else
3935 ac_cpp_err=
3936 fi
3937else
3938 ac_cpp_err=yes
3939fi
3940if test -z "$ac_cpp_err"; then
925c2f3f 3941 eval "$as_ac_Header=yes"
f4988be7 3942else
503d2be0 3943 echo "$as_me: failed program was:" >&5
98418dba 3944 cat conftest.$ac_ext >&5
925c2f3f 3945 eval "$as_ac_Header=no"
f4988be7 3946fi
98418dba 3947rm -f conftest.err conftest.$ac_ext
f4988be7 3948fi
598a2813 3949echo "$as_me:3948: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 3950echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 3951if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 3952 cat >>confdefs.h <<EOF
98418dba 3953#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 3954EOF
f4988be7
GM
3955
3956fi
98418dba
CW
3957done
3958
3959 # Emulation library used on NetBSD.
598a2813 3960 echo "$as_me:3959: checking for _oss_ioctl in -lossaudio" >&5
98418dba
CW
3961echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6
3962if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 3963 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 3964else
98418dba
CW
3965 ac_check_lib_save_LIBS=$LIBS
3966LIBS="-lossaudio $LIBS"
3967cat >conftest.$ac_ext <<_ACEOF
925c2f3f 3968#line 3962 "configure"
f4988be7 3969#include "confdefs.h"
98418dba
CW
3970
3971/* Override any gcc2 internal prototype to avoid an error. */
3972#ifdef __cplusplus
3973extern "C"
f4988be7 3974#endif
98418dba
CW
3975/* We use char because int might match the return type of a gcc2
3976 builtin and then its argument prototype would still apply. */
3977char _oss_ioctl ();
503d2be0
AS
3978int
3979main ()
3980{
98418dba 3981_oss_ioctl ();
503d2be0
AS
3982 ;
3983 return 0;
3984}
3985_ACEOF
98418dba 3986rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 3987if { (eval echo "$as_me:3986: \"$ac_link\"") >&5
98418dba 3988 (eval $ac_link) 2>&5
503d2be0 3989 ac_status=$?
598a2813 3990 echo "$as_me:3989: \$? = $ac_status" >&5
503d2be0 3991 (exit $ac_status); } &&
98418dba 3992 { ac_try='test -s conftest$ac_exeext'
598a2813 3993 { (eval echo "$as_me:3992: \"$ac_try\"") >&5
503d2be0
AS
3994 (eval $ac_try) 2>&5
3995 ac_status=$?
598a2813 3996 echo "$as_me:3995: \$? = $ac_status" >&5
503d2be0 3997 (exit $ac_status); }; }; then
98418dba 3998 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 3999else
503d2be0
AS
4000 echo "$as_me: failed program was:" >&5
4001cat conftest.$ac_ext >&5
98418dba 4002ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 4003fi
98418dba
CW
4004rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4005LIBS=$ac_check_lib_save_LIBS
f4988be7 4006fi
598a2813 4007echo "$as_me:4006: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
98418dba
CW
4008echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6
4009if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
4010 LIBSOUND=-lossaudio
4011else
4012 LIBSOUND=
4013fi
4014
f4988be7
GM
4015fi
4016
98418dba
CW
4017for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
4018 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
4019 termcap.h stdio_ext.h fcntl.h term.h strings.h coff.h
4020do
4021as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
598a2813 4022echo "$as_me:4021: checking for $ac_header" >&5
98418dba
CW
4023echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4024if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 4025 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4026else
925c2f3f
EZ
4027 cat >conftest.$ac_ext <<_ACEOF
4028#line 4022 "configure"
34ec9ebe 4029#include "confdefs.h"
98418dba 4030#include <$ac_header>
503d2be0 4031_ACEOF
598a2813 4032if { (eval echo "$as_me:4031: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 4033 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 4034 ac_status=$?
98418dba
CW
4035 egrep -v '^ *\+' conftest.er1 >conftest.err
4036 rm -f conftest.er1
4037 cat conftest.err >&5
598a2813 4038 echo "$as_me:4037: \$? = $ac_status" >&5
98418dba
CW
4039 (exit $ac_status); } >/dev/null; then
4040 if test -s conftest.err; then
4041 ac_cpp_err=$ac_c_preproc_warn_flag
4042 else
4043 ac_cpp_err=
4044 fi
4045else
4046 ac_cpp_err=yes
4047fi
4048if test -z "$ac_cpp_err"; then
925c2f3f 4049 eval "$as_ac_Header=yes"
34ec9ebe 4050else
503d2be0 4051 echo "$as_me: failed program was:" >&5
98418dba 4052 cat conftest.$ac_ext >&5
925c2f3f 4053 eval "$as_ac_Header=no"
34ec9ebe 4054fi
98418dba 4055rm -f conftest.err conftest.$ac_ext
34ec9ebe 4056fi
598a2813 4057echo "$as_me:4056: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 4058echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 4059if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 4060 cat >>confdefs.h <<EOF
98418dba 4061#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 4062EOF
34ec9ebe 4063
98418dba 4064fi
98418dba
CW
4065done
4066
598a2813 4067echo "$as_me:4066: checking for ANSI C header files" >&5
98418dba
CW
4068echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4069if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 4070 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4071else
503d2be0 4072 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4073#line 4067 "configure"
ba4481b5 4074#include "confdefs.h"
98418dba
CW
4075#include <stdlib.h>
4076#include <stdarg.h>
4077#include <string.h>
4078#include <float.h>
4079
4080_ACEOF
598a2813 4081if { (eval echo "$as_me:4080: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 4082 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 4083 ac_status=$?
98418dba
CW
4084 egrep -v '^ *\+' conftest.er1 >conftest.err
4085 rm -f conftest.er1
4086 cat conftest.err >&5
598a2813 4087 echo "$as_me:4086: \$? = $ac_status" >&5
98418dba
CW
4088 (exit $ac_status); } >/dev/null; then
4089 if test -s conftest.err; then
4090 ac_cpp_err=$ac_c_preproc_warn_flag
4091 else
4092 ac_cpp_err=
4093 fi
4094else
4095 ac_cpp_err=yes
4096fi
4097if test -z "$ac_cpp_err"; then
4098 ac_cv_header_stdc=yes
ba4481b5 4099else
503d2be0 4100 echo "$as_me: failed program was:" >&5
98418dba
CW
4101 cat conftest.$ac_ext >&5
4102 ac_cv_header_stdc=no
ba4481b5 4103fi
98418dba
CW
4104rm -f conftest.err conftest.$ac_ext
4105
4106if test $ac_cv_header_stdc = yes; then
4107 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4108 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4109#line 4103 "configure"
98418dba
CW
4110#include "confdefs.h"
4111#include <string.h>
4112
4113_ACEOF
4114if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4115 egrep "memchr" >/dev/null 2>&1; then
4116 :
4117else
4118 ac_cv_header_stdc=no
ba4481b5 4119fi
98418dba 4120rm -f conftest*
ba4481b5
DL
4121
4122fi
4123
98418dba
CW
4124if test $ac_cv_header_stdc = yes; then
4125 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4126 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4127#line 4121 "configure"
98418dba
CW
4128#include "confdefs.h"
4129#include <stdlib.h>
4130
4131_ACEOF
4132if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4133 egrep "free" >/dev/null 2>&1; then
4134 :
4135else
4136 ac_cv_header_stdc=no
4137fi
4138rm -f conftest*
4139
4140fi
4141
4142if test $ac_cv_header_stdc = yes; then
4143 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4144 if test "$cross_compiling" = yes; then
4145 :
d42122a3 4146else
503d2be0 4147 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4148#line 4142 "configure"
d42122a3 4149#include "confdefs.h"
98418dba
CW
4150#include <ctype.h>
4151#if ((' ' & 0x0FF) == 0x020)
4152# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4153# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4154#else
4155# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4156 || ('j' <= (c) && (c) <= 'r') \
4157 || ('s' <= (c) && (c) <= 'z'))
4158# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4159#endif
4160
4161#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
4162int
4163main ()
4164{
98418dba
CW
4165 int i;
4166 for (i = 0; i < 256; i++)
4167 if (XOR (islower (i), ISLOWER (i))
4168 || toupper (i) != TOUPPER (i))
4169 exit(2);
4170 exit (0);
503d2be0
AS
4171}
4172_ACEOF
98418dba 4173rm -f conftest$ac_exeext
598a2813 4174if { (eval echo "$as_me:4173: \"$ac_link\"") >&5
98418dba 4175 (eval $ac_link) 2>&5
503d2be0 4176 ac_status=$?
598a2813 4177 echo "$as_me:4176: \$? = $ac_status" >&5
98418dba 4178 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
598a2813 4179 { (eval echo "$as_me:4178: \"$ac_try\"") >&5
503d2be0
AS
4180 (eval $ac_try) 2>&5
4181 ac_status=$?
598a2813 4182 echo "$as_me:4181: \$? = $ac_status" >&5
503d2be0 4183 (exit $ac_status); }; }; then
98418dba 4184 :
d42122a3 4185else
98418dba
CW
4186 echo "$as_me: program exited with status $ac_status" >&5
4187echo "$as_me: failed program was:" >&5
503d2be0 4188cat conftest.$ac_ext >&5
98418dba 4189ac_cv_header_stdc=no
d42122a3 4190fi
98418dba 4191rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 4192fi
98418dba
CW
4193fi
4194fi
598a2813 4195echo "$as_me:4194: result: $ac_cv_header_stdc" >&5
98418dba
CW
4196echo "${ECHO_T}$ac_cv_header_stdc" >&6
4197if test $ac_cv_header_stdc = yes; then
4198
925c2f3f 4199cat >>confdefs.h <<\EOF
98418dba 4200#define STDC_HEADERS 1
925c2f3f 4201EOF
d42122a3
DL
4202
4203fi
4204
598a2813 4205echo "$as_me:4204: checking whether time.h and sys/time.h may both be included" >&5
98418dba
CW
4206echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
4207if test "${ac_cv_header_time+set}" = set; then
503d2be0 4208 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4209else
503d2be0 4210 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4211#line 4205 "configure"
ba4481b5
DL
4212#include "confdefs.h"
4213#include <sys/types.h>
98418dba 4214#include <sys/time.h>
ba4481b5 4215#include <time.h>
503d2be0
AS
4216
4217int
4218main ()
4219{
98418dba
CW
4220if ((struct tm *) 0)
4221return 0;
503d2be0
AS
4222 ;
4223 return 0;
4224}
4225_ACEOF
4226rm -f conftest.$ac_objext
598a2813 4227if { (eval echo "$as_me:4226: \"$ac_compile\"") >&5
503d2be0
AS
4228 (eval $ac_compile) 2>&5
4229 ac_status=$?
598a2813 4230 echo "$as_me:4229: \$? = $ac_status" >&5
503d2be0
AS
4231 (exit $ac_status); } &&
4232 { ac_try='test -s conftest.$ac_objext'
598a2813 4233 { (eval echo "$as_me:4232: \"$ac_try\"") >&5
503d2be0
AS
4234 (eval $ac_try) 2>&5
4235 ac_status=$?
598a2813 4236 echo "$as_me:4235: \$? = $ac_status" >&5
503d2be0 4237 (exit $ac_status); }; }; then
98418dba 4238 ac_cv_header_time=yes
ba4481b5 4239else
503d2be0
AS
4240 echo "$as_me: failed program was:" >&5
4241cat conftest.$ac_ext >&5
98418dba 4242ac_cv_header_time=no
ba4481b5 4243fi
503d2be0 4244rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 4245fi
598a2813 4246echo "$as_me:4245: result: $ac_cv_header_time" >&5
98418dba
CW
4247echo "${ECHO_T}$ac_cv_header_time" >&6
4248if test $ac_cv_header_time = yes; then
503d2be0 4249
925c2f3f 4250cat >>confdefs.h <<\EOF
98418dba 4251#define TIME_WITH_SYS_TIME 1
925c2f3f 4252EOF
ba4481b5
DL
4253
4254fi
4255
598a2813 4256echo "$as_me:4255: checking for sys_siglist declaration in signal.h or unistd.h" >&5
98418dba
CW
4257echo $ECHO_N "checking for sys_siglist declaration in signal.h or unistd.h... $ECHO_C" >&6
4258if test "${ac_cv_decl_sys_siglist+set}" = set; then
503d2be0 4259 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4260else
503d2be0 4261 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4262#line 4256 "configure"
ba4481b5
DL
4263#include "confdefs.h"
4264#include <sys/types.h>
98418dba
CW
4265#include <signal.h>
4266/* NetBSD declares sys_siglist in unistd.h. */
4267#if HAVE_UNISTD_H
4268# include <unistd.h>
4269#endif
503d2be0
AS
4270
4271int
4272main ()
4273{
98418dba 4274char *msg = *(sys_siglist + 1);
503d2be0
AS
4275 ;
4276 return 0;
4277}
4278_ACEOF
4279rm -f conftest.$ac_objext
598a2813 4280if { (eval echo "$as_me:4279: \"$ac_compile\"") >&5
503d2be0
AS
4281 (eval $ac_compile) 2>&5
4282 ac_status=$?
598a2813 4283 echo "$as_me:4282: \$? = $ac_status" >&5
503d2be0
AS
4284 (exit $ac_status); } &&
4285 { ac_try='test -s conftest.$ac_objext'
598a2813 4286 { (eval echo "$as_me:4285: \"$ac_try\"") >&5
503d2be0
AS
4287 (eval $ac_try) 2>&5
4288 ac_status=$?
598a2813 4289 echo "$as_me:4288: \$? = $ac_status" >&5
503d2be0 4290 (exit $ac_status); }; }; then
98418dba 4291 ac_cv_decl_sys_siglist=yes
ba4481b5 4292else
503d2be0
AS
4293 echo "$as_me: failed program was:" >&5
4294cat conftest.$ac_ext >&5
98418dba 4295ac_cv_decl_sys_siglist=no
ba4481b5 4296fi
503d2be0
AS
4297rm -f conftest.$ac_objext conftest.$ac_ext
4298fi
598a2813 4299echo "$as_me:4298: result: $ac_cv_decl_sys_siglist" >&5
98418dba
CW
4300echo "${ECHO_T}$ac_cv_decl_sys_siglist" >&6
4301if test $ac_cv_decl_sys_siglist = yes; then
503d2be0 4302
925c2f3f 4303cat >>confdefs.h <<\EOF
98418dba 4304#define SYS_SIGLIST_DECLARED 1
925c2f3f 4305EOF
503d2be0 4306
ba4481b5
DL
4307fi
4308
598a2813 4309echo "$as_me:4308: checking for sys/wait.h that is POSIX.1 compatible" >&5
98418dba
CW
4310echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
4311if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 4312 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4313else
503d2be0 4314 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4315#line 4309 "configure"
ba4481b5 4316#include "confdefs.h"
98418dba
CW
4317#include <sys/types.h>
4318#include <sys/wait.h>
4319#ifndef WEXITSTATUS
4320# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4321#endif
4322#ifndef WIFEXITED
4323# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 4324#endif
503d2be0
AS
4325
4326int
4327main ()
4328{
98418dba
CW
4329 int s;
4330 wait (&s);
4331 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
4332 ;
4333 return 0;
4334}
4335_ACEOF
98418dba 4336rm -f conftest.$ac_objext
598a2813 4337if { (eval echo "$as_me:4336: \"$ac_compile\"") >&5
98418dba 4338 (eval $ac_compile) 2>&5
503d2be0 4339 ac_status=$?
598a2813 4340 echo "$as_me:4339: \$? = $ac_status" >&5
503d2be0 4341 (exit $ac_status); } &&
98418dba 4342 { ac_try='test -s conftest.$ac_objext'
598a2813 4343 { (eval echo "$as_me:4342: \"$ac_try\"") >&5
503d2be0
AS
4344 (eval $ac_try) 2>&5
4345 ac_status=$?
598a2813 4346 echo "$as_me:4345: \$? = $ac_status" >&5
503d2be0 4347 (exit $ac_status); }; }; then
98418dba 4348 ac_cv_header_sys_wait_h=yes
ba4481b5 4349else
503d2be0
AS
4350 echo "$as_me: failed program was:" >&5
4351cat conftest.$ac_ext >&5
98418dba 4352ac_cv_header_sys_wait_h=no
ba4481b5 4353fi
98418dba 4354rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 4355fi
598a2813 4356echo "$as_me:4355: result: $ac_cv_header_sys_wait_h" >&5
98418dba
CW
4357echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
4358if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 4359
925c2f3f 4360cat >>confdefs.h <<\EOF
98418dba 4361#define HAVE_SYS_WAIT_H 1
925c2f3f 4362EOF
ba4481b5 4363
ba4481b5
DL
4364fi
4365
598a2813 4366echo "$as_me:4365: checking for struct utimbuf" >&5
98418dba
CW
4367echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
4368if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 4369 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 4370else
503d2be0 4371 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4372#line 4366 "configure"
1113b624 4373#include "confdefs.h"
98418dba
CW
4374#ifdef TIME_WITH_SYS_TIME
4375#include <sys/time.h>
4376#include <time.h>
4377#else
4378#ifdef HAVE_SYS_TIME_H
4379#include <sys/time.h>
4380#else
1113b624 4381#include <time.h>
98418dba
CW
4382#endif
4383#endif
4384#ifdef HAVE_UTIME_H
4385#include <utime.h>
4386#endif
503d2be0
AS
4387int
4388main ()
4389{
98418dba 4390static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
4391 ;
4392 return 0;
4393}
4394_ACEOF
98418dba 4395rm -f conftest.$ac_objext
598a2813 4396if { (eval echo "$as_me:4395: \"$ac_compile\"") >&5
98418dba 4397 (eval $ac_compile) 2>&5
503d2be0 4398 ac_status=$?
598a2813 4399 echo "$as_me:4398: \$? = $ac_status" >&5
503d2be0 4400 (exit $ac_status); } &&
98418dba 4401 { ac_try='test -s conftest.$ac_objext'
598a2813 4402 { (eval echo "$as_me:4401: \"$ac_try\"") >&5
503d2be0
AS
4403 (eval $ac_try) 2>&5
4404 ac_status=$?
598a2813 4405 echo "$as_me:4404: \$? = $ac_status" >&5
503d2be0 4406 (exit $ac_status); }; }; then
98418dba 4407 emacs_cv_struct_utimbuf=yes
1113b624 4408else
503d2be0
AS
4409 echo "$as_me: failed program was:" >&5
4410cat conftest.$ac_ext >&5
98418dba 4411emacs_cv_struct_utimbuf=no
1113b624 4412fi
98418dba 4413rm -f conftest.$ac_objext conftest.$ac_ext
1113b624 4414fi
598a2813 4415echo "$as_me:4414: result: $emacs_cv_struct_utimbuf" >&5
98418dba
CW
4416echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6
4417if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 4418
925c2f3f 4419cat >>confdefs.h <<\EOF
98418dba 4420#define HAVE_STRUCT_UTIMBUF 1
925c2f3f 4421EOF
1113b624
PE
4422
4423fi
ba4481b5 4424
598a2813 4425echo "$as_me:4424: checking return type of signal handlers" >&5
98418dba
CW
4426echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4427if test "${ac_cv_type_signal+set}" = set; then
503d2be0 4428 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 4429else
98418dba 4430 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4431#line 4425 "configure"
7397acc4 4432#include "confdefs.h"
7397acc4 4433#include <sys/types.h>
98418dba
CW
4434#include <signal.h>
4435#ifdef signal
4436# undef signal
4437#endif
4438#ifdef __cplusplus
4439extern "C" void (*signal (int, void (*)(int)))(int);
4440#else
4441void (*signal ()) ();
4442#endif
4443
503d2be0
AS
4444int
4445main ()
4446{
98418dba 4447int i;
503d2be0
AS
4448 ;
4449 return 0;
4450}
4451_ACEOF
98418dba 4452rm -f conftest.$ac_objext
598a2813 4453if { (eval echo "$as_me:4452: \"$ac_compile\"") >&5
503d2be0
AS
4454 (eval $ac_compile) 2>&5
4455 ac_status=$?
598a2813 4456 echo "$as_me:4455: \$? = $ac_status" >&5
503d2be0
AS
4457 (exit $ac_status); } &&
4458 { ac_try='test -s conftest.$ac_objext'
598a2813 4459 { (eval echo "$as_me:4458: \"$ac_try\"") >&5
503d2be0
AS
4460 (eval $ac_try) 2>&5
4461 ac_status=$?
598a2813 4462 echo "$as_me:4461: \$? = $ac_status" >&5
503d2be0 4463 (exit $ac_status); }; }; then
98418dba 4464 ac_cv_type_signal=void
503d2be0
AS
4465else
4466 echo "$as_me: failed program was:" >&5
4467cat conftest.$ac_ext >&5
98418dba 4468ac_cv_type_signal=int
503d2be0 4469fi
98418dba 4470rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 4471fi
598a2813 4472echo "$as_me:4471: result: $ac_cv_type_signal" >&5
98418dba 4473echo "${ECHO_T}$ac_cv_type_signal" >&6
7397acc4 4474
925c2f3f 4475cat >>confdefs.h <<EOF
98418dba 4476#define RETSIGTYPE $ac_cv_type_signal
925c2f3f 4477EOF
503d2be0 4478
598a2813 4479echo "$as_me:4478: checking for speed_t" >&5
98418dba
CW
4480echo $ECHO_N "checking for speed_t... $ECHO_C" >&6
4481if test "${emacs_cv_speed_t+set}" = set; then
4482 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 4483else
98418dba 4484 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4485#line 4479 "configure"
98418dba
CW
4486#include "confdefs.h"
4487#include <termios.h>
98418dba
CW
4488int
4489main ()
4490{
4491speed_t x = 1;
4492 ;
4493 return 0;
4494}
4495_ACEOF
4496rm -f conftest.$ac_objext
598a2813 4497if { (eval echo "$as_me:4496: \"$ac_compile\"") >&5
98418dba
CW
4498 (eval $ac_compile) 2>&5
4499 ac_status=$?
598a2813 4500 echo "$as_me:4499: \$? = $ac_status" >&5
98418dba
CW
4501 (exit $ac_status); } &&
4502 { ac_try='test -s conftest.$ac_objext'
598a2813 4503 { (eval echo "$as_me:4502: \"$ac_try\"") >&5
98418dba
CW
4504 (eval $ac_try) 2>&5
4505 ac_status=$?
598a2813 4506 echo "$as_me:4505: \$? = $ac_status" >&5
98418dba
CW
4507 (exit $ac_status); }; }; then
4508 emacs_cv_speed_t=yes
4509else
4510 echo "$as_me: failed program was:" >&5
4511cat conftest.$ac_ext >&5
4512emacs_cv_speed_t=no
4513fi
4514rm -f conftest.$ac_objext conftest.$ac_ext
4515fi
598a2813 4516echo "$as_me:4515: result: $emacs_cv_speed_t" >&5
98418dba
CW
4517echo "${ECHO_T}$emacs_cv_speed_t" >&6
4518if test $emacs_cv_speed_t = yes; then
b936fae4 4519
925c2f3f 4520cat >>confdefs.h <<\EOF
98418dba 4521#define HAVE_SPEED_T 1
925c2f3f 4522EOF
98418dba 4523
7397acc4
DL
4524fi
4525
598a2813 4526echo "$as_me:4525: checking for struct timeval" >&5
98418dba
CW
4527echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
4528if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 4529 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 4530else
503d2be0 4531 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4532#line 4526 "configure"
7397acc4 4533#include "confdefs.h"
98418dba
CW
4534#ifdef TIME_WITH_SYS_TIME
4535#include <sys/time.h>
4536#include <time.h>
4537#else
4538#ifdef HAVE_SYS_TIME_H
4539#include <sys/time.h>
4540#else
4541#include <time.h>
4542#endif
4543#endif
503d2be0
AS
4544int
4545main ()
4546{
98418dba 4547static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
4548 ;
4549 return 0;
4550}
4551_ACEOF
4552rm -f conftest.$ac_objext
598a2813 4553if { (eval echo "$as_me:4552: \"$ac_compile\"") >&5
503d2be0
AS
4554 (eval $ac_compile) 2>&5
4555 ac_status=$?
598a2813 4556 echo "$as_me:4555: \$? = $ac_status" >&5
503d2be0
AS
4557 (exit $ac_status); } &&
4558 { ac_try='test -s conftest.$ac_objext'
598a2813 4559 { (eval echo "$as_me:4558: \"$ac_try\"") >&5
503d2be0
AS
4560 (eval $ac_try) 2>&5
4561 ac_status=$?
598a2813 4562 echo "$as_me:4561: \$? = $ac_status" >&5
503d2be0 4563 (exit $ac_status); }; }; then
98418dba 4564 emacs_cv_struct_timeval=yes
7397acc4 4565else
503d2be0
AS
4566 echo "$as_me: failed program was:" >&5
4567cat conftest.$ac_ext >&5
98418dba 4568emacs_cv_struct_timeval=no
7397acc4 4569fi
503d2be0 4570rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 4571fi
598a2813 4572echo "$as_me:4571: result: $emacs_cv_struct_timeval" >&5
98418dba
CW
4573echo "${ECHO_T}$emacs_cv_struct_timeval" >&6
4574HAVE_TIMEVAL=$emacs_cv_struct_timeval
4575if test $emacs_cv_struct_timeval = yes; then
b936fae4 4576
925c2f3f 4577cat >>confdefs.h <<\EOF
98418dba 4578#define HAVE_TIMEVAL 1
925c2f3f 4579EOF
7397acc4
DL
4580
4581fi
4582
598a2813 4583echo "$as_me:4582: checking for struct exception" >&5
98418dba
CW
4584echo $ECHO_N "checking for struct exception... $ECHO_C" >&6
4585if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 4586 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4587else
503d2be0 4588 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4589#line 4583 "configure"
ba4481b5 4590#include "confdefs.h"
98418dba 4591#include <math.h>
503d2be0
AS
4592int
4593main ()
4594{
98418dba 4595static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
4596 ;
4597 return 0;
ba4481b5 4598}
503d2be0
AS
4599_ACEOF
4600rm -f conftest.$ac_objext
598a2813 4601if { (eval echo "$as_me:4600: \"$ac_compile\"") >&5
503d2be0
AS
4602 (eval $ac_compile) 2>&5
4603 ac_status=$?
598a2813 4604 echo "$as_me:4603: \$? = $ac_status" >&5
503d2be0
AS
4605 (exit $ac_status); } &&
4606 { ac_try='test -s conftest.$ac_objext'
598a2813 4607 { (eval echo "$as_me:4606: \"$ac_try\"") >&5
503d2be0
AS
4608 (eval $ac_try) 2>&5
4609 ac_status=$?
598a2813 4610 echo "$as_me:4609: \$? = $ac_status" >&5
503d2be0 4611 (exit $ac_status); }; }; then
98418dba 4612 emacs_cv_struct_exception=yes
ba4481b5 4613else
503d2be0
AS
4614 echo "$as_me: failed program was:" >&5
4615cat conftest.$ac_ext >&5
98418dba 4616emacs_cv_struct_exception=no
ba4481b5 4617fi
503d2be0 4618rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 4619fi
598a2813 4620echo "$as_me:4619: result: $emacs_cv_struct_exception" >&5
98418dba
CW
4621echo "${ECHO_T}$emacs_cv_struct_exception" >&6
4622HAVE_EXCEPTION=$emacs_cv_struct_exception
4623if test $emacs_cv_struct_exception != yes; then
b936fae4 4624
925c2f3f 4625cat >>confdefs.h <<\EOF
98418dba 4626#define NO_MATHERR 1
925c2f3f 4627EOF
ba4481b5
DL
4628
4629fi
4630
598a2813 4631echo "$as_me:4630: checking whether struct tm is in sys/time.h or time.h" >&5
98418dba
CW
4632echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
4633if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 4634 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 4635else
503d2be0 4636 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4637#line 4631 "configure"
7397acc4 4638#include "confdefs.h"
98418dba
CW
4639#include <sys/types.h>
4640#include <time.h>
7397acc4 4641
503d2be0
AS
4642int
4643main ()
4644{
98418dba 4645struct tm *tp; tp->tm_sec;
503d2be0
AS
4646 ;
4647 return 0;
4648}
4649_ACEOF
4650rm -f conftest.$ac_objext
598a2813 4651if { (eval echo "$as_me:4650: \"$ac_compile\"") >&5
503d2be0
AS
4652 (eval $ac_compile) 2>&5
4653 ac_status=$?
598a2813 4654 echo "$as_me:4653: \$? = $ac_status" >&5
503d2be0
AS
4655 (exit $ac_status); } &&
4656 { ac_try='test -s conftest.$ac_objext'
598a2813 4657 { (eval echo "$as_me:4656: \"$ac_try\"") >&5
503d2be0
AS
4658 (eval $ac_try) 2>&5
4659 ac_status=$?
598a2813 4660 echo "$as_me:4659: \$? = $ac_status" >&5
503d2be0 4661 (exit $ac_status); }; }; then
98418dba 4662 ac_cv_struct_tm=time.h
7397acc4 4663else
503d2be0
AS
4664 echo "$as_me: failed program was:" >&5
4665cat conftest.$ac_ext >&5
98418dba 4666ac_cv_struct_tm=sys/time.h
7397acc4 4667fi
503d2be0 4668rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 4669fi
598a2813 4670echo "$as_me:4669: result: $ac_cv_struct_tm" >&5
98418dba
CW
4671echo "${ECHO_T}$ac_cv_struct_tm" >&6
4672if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 4673
925c2f3f 4674cat >>confdefs.h <<\EOF
98418dba 4675#define TM_IN_SYS_TIME 1
925c2f3f 4676EOF
7397acc4
DL
4677
4678fi
ba4481b5 4679
598a2813 4680echo "$as_me:4679: checking for struct tm.tm_zone" >&5
98418dba
CW
4681echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
4682if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 4683 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4684else
98418dba 4685 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4686#line 4680 "configure"
98418dba
CW
4687#include "confdefs.h"
4688#include <sys/types.h>
4689#include <$ac_cv_struct_tm>
ba4481b5 4690
98418dba
CW
4691int
4692main ()
4693{
4694static struct tm ac_aggr;
4695if (ac_aggr.tm_zone)
4696return 0;
4697 ;
4698 return 0;
4699}
4700_ACEOF
4701rm -f conftest.$ac_objext
598a2813 4702if { (eval echo "$as_me:4701: \"$ac_compile\"") >&5
98418dba
CW
4703 (eval $ac_compile) 2>&5
4704 ac_status=$?
598a2813 4705 echo "$as_me:4704: \$? = $ac_status" >&5
98418dba
CW
4706 (exit $ac_status); } &&
4707 { ac_try='test -s conftest.$ac_objext'
598a2813 4708 { (eval echo "$as_me:4707: \"$ac_try\"") >&5
98418dba
CW
4709 (eval $ac_try) 2>&5
4710 ac_status=$?
598a2813 4711 echo "$as_me:4710: \$? = $ac_status" >&5
98418dba
CW
4712 (exit $ac_status); }; }; then
4713 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 4714else
98418dba
CW
4715 echo "$as_me: failed program was:" >&5
4716cat conftest.$ac_ext >&5
4717ac_cv_member_struct_tm_tm_zone=no
ba4481b5 4718fi
98418dba 4719rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 4720fi
598a2813 4721echo "$as_me:4720: result: $ac_cv_member_struct_tm_tm_zone" >&5
98418dba
CW
4722echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
4723if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 4724
925c2f3f 4725cat >>confdefs.h <<EOF
98418dba 4726#define HAVE_STRUCT_TM_TM_ZONE 1
925c2f3f 4727EOF
ba4481b5 4728
98418dba 4729fi
ba4481b5 4730
98418dba 4731if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 4732
925c2f3f 4733cat >>confdefs.h <<\EOF
98418dba 4734#define HAVE_TM_ZONE 1
925c2f3f 4735EOF
ba4481b5 4736
ba4481b5 4737else
598a2813 4738 echo "$as_me:4737: checking for tzname" >&5
98418dba
CW
4739echo $ECHO_N "checking for tzname... $ECHO_C" >&6
4740if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 4741 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4742else
98418dba 4743 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4744#line 4738 "configure"
98418dba
CW
4745#include "confdefs.h"
4746#include <time.h>
4747#ifndef tzname /* For SGI. */
4748extern char *tzname[]; /* RS6000 and others reject char **tzname. */
4749#endif
4750
98418dba
CW
4751int
4752main ()
4753{
4754atoi(*tzname);
4755 ;
4756 return 0;
4757}
4758_ACEOF
4759rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 4760if { (eval echo "$as_me:4759: \"$ac_link\"") >&5
98418dba
CW
4761 (eval $ac_link) 2>&5
4762 ac_status=$?
598a2813 4763 echo "$as_me:4762: \$? = $ac_status" >&5
98418dba
CW
4764 (exit $ac_status); } &&
4765 { ac_try='test -s conftest$ac_exeext'
598a2813 4766 { (eval echo "$as_me:4765: \"$ac_try\"") >&5
98418dba
CW
4767 (eval $ac_try) 2>&5
4768 ac_status=$?
598a2813 4769 echo "$as_me:4768: \$? = $ac_status" >&5
98418dba
CW
4770 (exit $ac_status); }; }; then
4771 ac_cv_var_tzname=yes
4772else
4773 echo "$as_me: failed program was:" >&5
4774cat conftest.$ac_ext >&5
4775ac_cv_var_tzname=no
ba4481b5 4776fi
98418dba
CW
4777rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4778fi
598a2813 4779echo "$as_me:4778: result: $ac_cv_var_tzname" >&5
98418dba
CW
4780echo "${ECHO_T}$ac_cv_var_tzname" >&6
4781 if test $ac_cv_var_tzname = yes; then
ba4481b5 4782
925c2f3f 4783cat >>confdefs.h <<\EOF
98418dba 4784#define HAVE_TZNAME 1
925c2f3f 4785EOF
503d2be0 4786
98418dba
CW
4787 fi
4788fi
503d2be0 4789
598a2813 4790echo "$as_me:4789: checking for struct tm.tm_gmtoff" >&5
b936fae4
AS
4791echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6
4792if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
4793 echo $ECHO_N "(cached) $ECHO_C" >&6
4794else
4795 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4796#line 4790 "configure"
98418dba
CW
4797#include "confdefs.h"
4798#include <time.h>
b936fae4 4799
98418dba
CW
4800int
4801main ()
4802{
b936fae4
AS
4803static struct tm ac_aggr;
4804if (ac_aggr.tm_gmtoff)
4805return 0;
98418dba
CW
4806 ;
4807 return 0;
4808}
4809_ACEOF
b936fae4 4810rm -f conftest.$ac_objext
598a2813 4811if { (eval echo "$as_me:4810: \"$ac_compile\"") >&5
b936fae4 4812 (eval $ac_compile) 2>&5
98418dba 4813 ac_status=$?
598a2813 4814 echo "$as_me:4813: \$? = $ac_status" >&5
98418dba 4815 (exit $ac_status); } &&
b936fae4 4816 { ac_try='test -s conftest.$ac_objext'
598a2813 4817 { (eval echo "$as_me:4816: \"$ac_try\"") >&5
98418dba
CW
4818 (eval $ac_try) 2>&5
4819 ac_status=$?
598a2813 4820 echo "$as_me:4819: \$? = $ac_status" >&5
98418dba 4821 (exit $ac_status); }; }; then
b936fae4 4822 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
4823else
4824 echo "$as_me: failed program was:" >&5
4825cat conftest.$ac_ext >&5
b936fae4 4826ac_cv_member_struct_tm_tm_gmtoff=no
98418dba 4827fi
b936fae4 4828rm -f conftest.$ac_objext conftest.$ac_ext
98418dba 4829fi
598a2813 4830echo "$as_me:4829: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
b936fae4
AS
4831echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6
4832if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
4833
925c2f3f 4834cat >>confdefs.h <<\EOF
98418dba 4835#define HAVE_TM_GMTOFF 1
925c2f3f 4836EOF
503d2be0 4837
98418dba 4838fi
503d2be0 4839
598a2813 4840echo "$as_me:4839: checking for $CC option to accept ANSI C" >&5
8799b3e4
CW
4841echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
4842if test "${ac_cv_prog_cc_stdc+set}" = set; then
4843 echo $ECHO_N "(cached) $ECHO_C" >&6
4844else
4845 ac_cv_prog_cc_stdc=no
4846ac_save_CC=$CC
4847cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4848#line 4842 "configure"
8799b3e4
CW
4849#include "confdefs.h"
4850#include <stdarg.h>
4851#include <stdio.h>
4852#include <sys/types.h>
4853#include <sys/stat.h>
4854/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4855struct buf { int x; };
4856FILE * (*rcsopen) (struct buf *, struct stat *, int);
4857static char *e (p, i)
4858 char **p;
4859 int i;
4860{
4861 return p[i];
4862}
4863static char *f (char * (*g) (char **, int), char **p, ...)
4864{
4865 char *s;
4866 va_list v;
4867 va_start (v,p);
4868 s = g (p, va_arg (v,int));
4869 va_end (v);
4870 return s;
4871}
4872int test (int i, double x);
4873struct s1 {int (*f) (int a);};
4874struct s2 {int (*f) (double a);};
4875int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4876int argc;
4877char **argv;
8799b3e4
CW
4878int
4879main ()
4880{
4881return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4882 ;
4883 return 0;
4884}
4885_ACEOF
4886# Don't try gcc -ansi; that turns off useful extensions and
4887# breaks some systems' header files.
4888# AIX -qlanglvl=ansi
4889# Ultrix and OSF/1 -std1
4890# HP-UX 10.20 and later -Ae
4891# HP-UX older versions -Aa -D_HPUX_SOURCE
4892# SVR4 -Xc -D__EXTENSIONS__
4893for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4894do
4895 CC="$ac_save_CC $ac_arg"
4896 rm -f conftest.$ac_objext
598a2813 4897if { (eval echo "$as_me:4896: \"$ac_compile\"") >&5
8799b3e4
CW
4898 (eval $ac_compile) 2>&5
4899 ac_status=$?
598a2813 4900 echo "$as_me:4899: \$? = $ac_status" >&5
8799b3e4
CW
4901 (exit $ac_status); } &&
4902 { ac_try='test -s conftest.$ac_objext'
598a2813 4903 { (eval echo "$as_me:4902: \"$ac_try\"") >&5
8799b3e4
CW
4904 (eval $ac_try) 2>&5
4905 ac_status=$?
598a2813 4906 echo "$as_me:4905: \$? = $ac_status" >&5
8799b3e4
CW
4907 (exit $ac_status); }; }; then
4908 ac_cv_prog_cc_stdc=$ac_arg
4909break
4910else
4911 echo "$as_me: failed program was:" >&5
4912cat conftest.$ac_ext >&5
4913fi
4914rm -f conftest.$ac_objext
4915done
4916rm -f conftest.$ac_ext conftest.$ac_objext
4917CC=$ac_save_CC
4918
4919fi
4920
4921case "x$ac_cv_prog_cc_stdc" in
4922 x|xno)
598a2813 4923 echo "$as_me:4922: result: none needed" >&5
8799b3e4
CW
4924echo "${ECHO_T}none needed" >&6 ;;
4925 *)
598a2813 4926 echo "$as_me:4925: result: $ac_cv_prog_cc_stdc" >&5
8799b3e4
CW
4927echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
4928 CC="$CC $ac_cv_prog_cc_stdc" ;;
4929esac
4930
598a2813 4931echo "$as_me:4930: checking for function prototypes" >&5
98418dba
CW
4932echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
4933if test "$ac_cv_prog_cc_stdc" != no; then
598a2813 4934 echo "$as_me:4933: result: yes" >&5
98418dba
CW
4935echo "${ECHO_T}yes" >&6
4936
925c2f3f 4937cat >>confdefs.h <<\EOF
98418dba 4938#define PROTOTYPES 1
925c2f3f 4939EOF
98418dba
CW
4940
4941else
598a2813 4942 echo "$as_me:4941: result: no" >&5
98418dba
CW
4943echo "${ECHO_T}no" >&6
4944fi
4945
598a2813 4946echo "$as_me:4945: checking for working volatile" >&5
98418dba
CW
4947echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
4948if test "${ac_cv_c_volatile+set}" = set; then
4949 echo $ECHO_N "(cached) $ECHO_C" >&6
4950else
4951 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4952#line 4946 "configure"
98418dba
CW
4953#include "confdefs.h"
4954
98418dba
CW
4955int
4956main ()
4957{
4958
4959volatile int x;
4960int * volatile y;
4961 ;
4962 return 0;
4963}
4964_ACEOF
4965rm -f conftest.$ac_objext
598a2813 4966if { (eval echo "$as_me:4965: \"$ac_compile\"") >&5
98418dba
CW
4967 (eval $ac_compile) 2>&5
4968 ac_status=$?
598a2813 4969 echo "$as_me:4968: \$? = $ac_status" >&5
98418dba
CW
4970 (exit $ac_status); } &&
4971 { ac_try='test -s conftest.$ac_objext'
598a2813 4972 { (eval echo "$as_me:4971: \"$ac_try\"") >&5
98418dba
CW
4973 (eval $ac_try) 2>&5
4974 ac_status=$?
598a2813 4975 echo "$as_me:4974: \$? = $ac_status" >&5
98418dba
CW
4976 (exit $ac_status); }; }; then
4977 ac_cv_c_volatile=yes
4978else
4979 echo "$as_me: failed program was:" >&5
4980cat conftest.$ac_ext >&5
4981ac_cv_c_volatile=no
4982fi
4983rm -f conftest.$ac_objext conftest.$ac_ext
4984fi
598a2813 4985echo "$as_me:4984: result: $ac_cv_c_volatile" >&5
98418dba
CW
4986echo "${ECHO_T}$ac_cv_c_volatile" >&6
4987if test $ac_cv_c_volatile = no; then
4988
925c2f3f 4989cat >>confdefs.h <<\EOF
98418dba 4990#define volatile
925c2f3f 4991EOF
98418dba
CW
4992
4993fi
4994
598a2813 4995echo "$as_me:4994: checking for an ANSI C-conforming const" >&5
98418dba
CW
4996echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
4997if test "${ac_cv_c_const+set}" = set; then
4998 echo $ECHO_N "(cached) $ECHO_C" >&6
4999else
5000 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 5001#line 4995 "configure"
98418dba
CW
5002#include "confdefs.h"
5003
98418dba
CW
5004int
5005main ()
5006{
5007/* FIXME: Include the comments suggested by Paul. */
5008#ifndef __cplusplus
5009 /* Ultrix mips cc rejects this. */
5010 typedef int charset[2];
5011 const charset x;
5012 /* SunOS 4.1.1 cc rejects this. */
5013 char const *const *ccp;
5014 char **p;
5015 /* NEC SVR4.0.2 mips cc rejects this. */
5016 struct point {int x, y;};
5017 static struct point const zero = {0,0};
5018 /* AIX XL C 1.02.0.0 rejects this.
5019 It does not let you subtract one const X* pointer from another in
5020 an arm of an if-expression whose if-part is not a constant
5021 expression */
5022 const char *g = "string";
5023 ccp = &g + (g ? g-g : 0);
5024 /* HPUX 7.0 cc rejects these. */
5025 ++ccp;
5026 p = (char**) ccp;
5027 ccp = (char const *const *) p;
5028 { /* SCO 3.2v4 cc rejects this. */
5029 char *t;
5030 char const *s = 0 ? (char *) 0 : (char const *) 0;
5031
5032 *t++ = 0;
5033 }
5034 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5035 int x[] = {25, 17};
5036 const int *foo = &x[0];
5037 ++foo;
5038 }
5039 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5040 typedef const int *iptr;
5041 iptr p = 0;
5042 ++p;
5043 }
5044 { /* AIX XL C 1.02.0.0 rejects this saying
5045 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5046 struct s { int j; const int *ap[3]; };
5047 struct s *b; b->j = 5;
5048 }
5049 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5050 const int foo = 10;
5051 }
5052#endif
5053
5054 ;
5055 return 0;
5056}
5057_ACEOF
5058rm -f conftest.$ac_objext
598a2813 5059if { (eval echo "$as_me:5058: \"$ac_compile\"") >&5
98418dba
CW
5060 (eval $ac_compile) 2>&5
5061 ac_status=$?
598a2813 5062 echo "$as_me:5061: \$? = $ac_status" >&5
98418dba
CW
5063 (exit $ac_status); } &&
5064 { ac_try='test -s conftest.$ac_objext'
598a2813 5065 { (eval echo "$as_me:5064: \"$ac_try\"") >&5
98418dba
CW
5066 (eval $ac_try) 2>&5
5067 ac_status=$?
598a2813 5068 echo "$as_me:5067: \$? = $ac_status" >&5
98418dba
CW
5069 (exit $ac_status); }; }; then
5070 ac_cv_c_const=yes
5071else
5072 echo "$as_me: failed program was:" >&5
5073cat conftest.$ac_ext >&5
5074ac_cv_c_const=no
5075fi
5076rm -f conftest.$ac_objext conftest.$ac_ext
5077fi
598a2813 5078echo "$as_me:5077: result: $ac_cv_c_const" >&5
98418dba
CW
5079echo "${ECHO_T}$ac_cv_c_const" >&6
5080if test $ac_cv_c_const = no; then
5081
925c2f3f 5082cat >>confdefs.h <<\EOF
98418dba 5083#define const
925c2f3f 5084EOF
98418dba
CW
5085
5086fi
5087
598a2813 5088echo "$as_me:5087: checking for void * support" >&5
98418dba
CW
5089echo $ECHO_N "checking for void * support... $ECHO_C" >&6
5090if test "${emacs_cv_void_star+set}" = set; then
5091 echo $ECHO_N "(cached) $ECHO_C" >&6
5092else
5093 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 5094#line 5088 "configure"
98418dba
CW
5095#include "confdefs.h"
5096
98418dba
CW
5097int
5098main ()
5099{
5100void * foo;
5101 ;
5102 return 0;
5103}
5104_ACEOF
5105rm -f conftest.$ac_objext
598a2813 5106if { (eval echo "$as_me:5105: \"$ac_compile\"") >&5
98418dba
CW
5107 (eval $ac_compile) 2>&5
5108 ac_status=$?
598a2813 5109 echo "$as_me:5108: \$? = $ac_status" >&5
98418dba
CW
5110 (exit $ac_status); } &&
5111 { ac_try='test -s conftest.$ac_objext'
598a2813 5112 { (eval echo "$as_me:5111: \"$ac_try\"") >&5
98418dba
CW
5113 (eval $ac_try) 2>&5
5114 ac_status=$?
598a2813 5115 echo "$as_me:5114: \$? = $ac_status" >&5
98418dba
CW
5116 (exit $ac_status); }; }; then
5117 emacs_cv_void_star=yes
5118else
5119 echo "$as_me: failed program was:" >&5
5120cat conftest.$ac_ext >&5
5121emacs_cv_void_star=no
5122fi
5123rm -f conftest.$ac_objext conftest.$ac_ext
5124fi
598a2813 5125echo "$as_me:5124: result: $emacs_cv_void_star" >&5
98418dba
CW
5126echo "${ECHO_T}$emacs_cv_void_star" >&6
5127if test $emacs_cv_void_star = yes; then
925c2f3f 5128 cat >>confdefs.h <<\EOF
98418dba 5129#define POINTER_TYPE void
925c2f3f 5130EOF
98418dba
CW
5131
5132else
925c2f3f 5133 cat >>confdefs.h <<\EOF
98418dba 5134#define POINTER_TYPE char
925c2f3f 5135EOF
98418dba
CW
5136
5137fi
5138
598a2813 5139echo "$as_me:5138: checking whether ${MAKE-make} sets \${MAKE}" >&5
98418dba
CW
5140echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
5141set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
5142if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
5143 echo $ECHO_N "(cached) $ECHO_C" >&6
5144else
925c2f3f 5145 cat >conftest.make <<\EOF
98418dba
CW
5146all:
5147 @echo 'ac_maketemp="${MAKE}"'
925c2f3f 5148EOF
98418dba
CW
5149# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5150eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
5151if test -n "$ac_maketemp"; then
5152 eval ac_cv_prog_make_${ac_make}_set=yes
5153else
5154 eval ac_cv_prog_make_${ac_make}_set=no
5155fi
5156rm -f conftest.make
5157fi
5158if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
598a2813 5159 echo "$as_me:5158: result: yes" >&5
98418dba
CW
5160echo "${ECHO_T}yes" >&6
5161 SET_MAKE=
5162else
598a2813 5163 echo "$as_me:5162: result: no" >&5
98418dba
CW
5164echo "${ECHO_T}no" >&6
5165 SET_MAKE="MAKE=${MAKE-make}"
5166fi
5167
598a2813 5168echo "$as_me:5167: checking for long file names" >&5
98418dba
CW
5169echo $ECHO_N "checking for long file names... $ECHO_C" >&6
5170if test "${ac_cv_sys_long_file_names+set}" = set; then
5171 echo $ECHO_N "(cached) $ECHO_C" >&6
5172else
5173 ac_cv_sys_long_file_names=yes
5174# Test for long file names in all the places we know might matter:
5175# . the current directory, where building will happen
5176# $prefix/lib where we will be installing things
5177# $exec_prefix/lib likewise
5178# eval it to expand exec_prefix.
5179# $TMPDIR if set, where it might want to write temporary files
5180# if $TMPDIR is not set:
5181# /tmp where it might want to write temporary files
5182# /var/tmp likewise
5183# /usr/tmp likewise
5184if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
5185 ac_tmpdirs=$TMPDIR
5186else
5187 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
5188fi
5189for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
5190 test -d $ac_dir || continue
5191 test -w $ac_dir || continue # It is less confusing to not echo anything here.
5192 ac_xdir=$ac_dir/cf$$
5193 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
5194 ac_tf1=$ac_xdir/conftest9012345
5195 ac_tf2=$ac_xdir/conftest9012346
5196 (echo 1 >$ac_tf1) 2>/dev/null
5197 (echo 2 >$ac_tf2) 2>/dev/null
5198 ac_val=`cat $ac_tf1 2>/dev/null`
5199 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
5200 ac_cv_sys_long_file_names=no
5201 rm -rf $ac_xdir 2>/dev/null
5202 break
5203 fi
5204 rm -rf $ac_xdir 2>/dev/null
5205done
5206fi
598a2813 5207echo "$as_me:5206: result: $ac_cv_sys_long_file_names" >&5
98418dba
CW
5208echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
5209if test $ac_cv_sys_long_file_names = yes; then
5210
925c2f3f 5211cat >>confdefs.h <<\EOF
98418dba 5212#define HAVE_LONG_FILE_NAMES 1
925c2f3f 5213EOF
98418dba
CW
5214
5215fi
5216
98418dba
CW
5217#### Choose a window system.
5218
598a2813 5219echo "$as_me:5218: checking for X" >&5
98418dba
CW
5220echo $ECHO_N "checking for X... $ECHO_C" >&6
5221
98418dba
CW
5222# Check whether --with-x or --without-x was given.
5223if test "${with_x+set}" = set; then
5224 withval="$with_x"
5225
5226fi;
5227# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5228if test "x$with_x" = xno; then
5229 # The user explicitly disabled X.
5230 have_x=disabled
5231else
5232 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5233 # Both variables are already set.
5234 have_x=yes
5235 else
5236 if test "${ac_cv_have_x+set}" = set; then
5237 echo $ECHO_N "(cached) $ECHO_C" >&6
5238else
5239 # One or both of the vars are not set, and there is no cached value.
5240ac_x_includes=no ac_x_libraries=no
5241rm -fr conftest.dir
5242if mkdir conftest.dir; then
5243 cd conftest.dir
5244 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
925c2f3f 5245 cat >Imakefile <<'EOF'
98418dba
CW
5246acfindx:
5247 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
925c2f3f 5248EOF
98418dba
CW
5249 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5250 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5251 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5252 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5253 for ac_extension in a so sl; do
5254 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5255 test -f $ac_im_libdir/libX11.$ac_extension; then
5256 ac_im_usrlibdir=$ac_im_libdir; break
5257 fi
5258 done
5259 # Screen out bogus values from the imake configuration. They are
5260 # bogus both because they are the default anyway, and because
5261 # using them would break gcc on systems where it needs fixed includes.
5262 case $ac_im_incroot in
5263 /usr/include) ;;
5264 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
5265 esac
5266 case $ac_im_usrlibdir in
5267 /usr/lib | /lib) ;;
5268 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
5269 esac
5270 fi
5271 cd ..
5272 rm -fr conftest.dir
5273fi
5274
5275# Standard set of common directories for X headers.
5276# Check X11 before X11Rn because it is often a symlink to the current release.
5277ac_x_header_dirs='
5278/usr/X11/include
5279/usr/X11R6/include
5280/usr/X11R5/include
5281/usr/X11R4/include
5282
5283/usr/include/X11
5284/usr/include/X11R6
5285/usr/include/X11R5
5286/usr/include/X11R4
5287
5288/usr/local/X11/include
5289/usr/local/X11R6/include
5290/usr/local/X11R5/include
5291/usr/local/X11R4/include
5292
5293/usr/local/include/X11
5294/usr/local/include/X11R6
5295/usr/local/include/X11R5
5296/usr/local/include/X11R4
5297
5298/usr/X386/include
5299/usr/x386/include
5300/usr/XFree86/include/X11
5301
5302/usr/include
5303/usr/local/include
5304/usr/unsupported/include
5305/usr/athena/include
5306/usr/local/x11r5/include
5307/usr/lpp/Xamples/include
5308
5309/usr/openwin/include
5310/usr/openwin/share/include'
5311
5312if test "$ac_x_includes" = no; then
5313 # Guess where to find include files, by looking for Intrinsic.h.
5314 # First, try using that file with no special directory specified.
5315 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 5316#line 5310 "configure"
98418dba
CW
5317#include "confdefs.h"
5318#include <X11/Intrinsic.h>
5319_ACEOF
598a2813 5320if { (eval echo "$as_me:5319: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
5321 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5322 ac_status=$?
5323 egrep -v '^ *\+' conftest.er1 >conftest.err
5324 rm -f conftest.er1
5325 cat conftest.err >&5
598a2813 5326 echo "$as_me:5325: \$? = $ac_status" >&5
98418dba
CW
5327 (exit $ac_status); } >/dev/null; then
5328 if test -s conftest.err; then
5329 ac_cpp_err=$ac_c_preproc_warn_flag
5330 else
5331 ac_cpp_err=
5332 fi
5333else
5334 ac_cpp_err=yes
5335fi
5336if test -z "$ac_cpp_err"; then
5337 # We can compile using X headers with no special include directory.
5338ac_x_includes=
5339else
5340 echo "$as_me: failed program was:" >&5
5341 cat conftest.$ac_ext >&5
5342 for ac_dir in $ac_x_header_dirs; do
5343 if test -r "$ac_dir/X11/Intrinsic.h"; then
5344 ac_x_includes=$ac_dir
5345 break
5346 fi
5347done
5348fi
5349rm -f conftest.err conftest.$ac_ext
5350fi # $ac_x_includes = no
5351
5352if test "$ac_x_libraries" = no; then
5353 # Check for the libraries.
5354 # See if we find them without any special options.
5355 # Don't add to $LIBS permanently.
5356 ac_save_LIBS=$LIBS
5357 LIBS="-lXt $LIBS"
5358 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 5359#line 5353 "configure"
98418dba
CW
5360#include "confdefs.h"
5361#include <X11/Intrinsic.h>
98418dba
CW
5362int
5363main ()
5364{
5365XtMalloc (0)
5366 ;
5367 return 0;
5368}
5369_ACEOF
5370rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 5371if { (eval echo "$as_me:5370: \"$ac_link\"") >&5
98418dba
CW
5372 (eval $ac_link) 2>&5
5373 ac_status=$?
598a2813 5374 echo "$as_me:5373: \$? = $ac_status" >&5
98418dba
CW
5375 (exit $ac_status); } &&
5376 { ac_try='test -s conftest$ac_exeext'
598a2813 5377 { (eval echo "$as_me:5376: \"$ac_try\"") >&5
98418dba
CW
5378 (eval $ac_try) 2>&5
5379 ac_status=$?
598a2813 5380 echo "$as_me:5379: \$? = $ac_status" >&5
98418dba
CW
5381 (exit $ac_status); }; }; then
5382 LIBS=$ac_save_LIBS
5383# We can link X programs with no special library path.
5384ac_x_libraries=
5385else
5386 echo "$as_me: failed program was:" >&5
5387cat conftest.$ac_ext >&5
5388LIBS=$ac_save_LIBS
5389for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
5390do
5391 # Don't even attempt the hair of trying to link an X program!
5392 for ac_extension in a so sl; do
5393 if test -r $ac_dir/libXt.$ac_extension; then
5394 ac_x_libraries=$ac_dir
5395 break 2
5396 fi
5397 done
5398done
5399fi
5400rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5401fi # $ac_x_libraries = no
5402
5403if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
5404 # Didn't find X anywhere. Cache the known absence of X.
5405 ac_cv_have_x="have_x=no"
5406else
5407 # Record where we found X for the cache.
5408 ac_cv_have_x="have_x=yes \
5409 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5410fi
5411fi
5412
5413 fi
5414 eval "$ac_cv_have_x"
5415fi # $with_x != no
5416
5417if test "$have_x" != yes; then
598a2813 5418 echo "$as_me:5417: result: $have_x" >&5
98418dba
CW
5419echo "${ECHO_T}$have_x" >&6
5420 no_x=yes
5421else
5422 # If each of the values was on the command line, it overrides each guess.
5423 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5424 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5425 # Update the cache value to reflect the command line values.
5426 ac_cv_have_x="have_x=yes \
5427 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
598a2813 5428 echo "$as_me:5427: result: libraries $x_libraries, headers $x_includes" >&5
98418dba
CW
5429echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
5430fi
5431
5432if test "$no_x" = yes; then
5433 window_system=none
5434else
5435 window_system=x11
5436fi
5437
5438if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
5439 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
5440 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
5441 x_default_search_path=""
5442 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
5443 x_search_path="\
5444${x_library}/X11/%L/%T/%N%C%S:\
5445${x_library}/X11/%l/%T/%N%C%S:\
5446${x_library}/X11/%T/%N%C%S:\
5447${x_library}/X11/%L/%T/%N%S:\
5448${x_library}/X11/%l/%T/%N%S:\
5449${x_library}/X11/%T/%N%S"
5450 if test x"${x_default_search_path}" = x; then
5451 x_default_search_path=${x_search_path}
5452 else
5453 x_default_search_path="${x_search_path}:${x_default_search_path}"
5454 fi
5455 done
5456fi
5457if test "${x_includes}" != NONE && test -n "${x_includes}"; then
5458 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
5459fi
5460
5461if test x"${x_includes}" = x; then
5462 bitmapdir=/usr/include/X11/bitmaps
5463else
5464 # accumulate include directories that have X11 bitmap subdirectories
5465 bmd_acc="dummyval"
5466 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
5467 if test -d "${bmd}/X11/bitmaps"; then
5468 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
5469 fi
5470 if test -d "${bmd}/bitmaps"; then
5471 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
5472 fi
5473 done
5474 if test ${bmd_acc} != "dummyval"; then
5475 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
5476 fi
5477fi
5478
5479case "${window_system}" in
5480 x11 )
5481 HAVE_X_WINDOWS=yes
5482 HAVE_X11=yes
5483 case "${with_x_toolkit}" in
5484 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
5485 motif ) USE_X_TOOLKIT=MOTIF ;;
5486 no ) USE_X_TOOLKIT=none ;;
5487 * ) USE_X_TOOLKIT=maybe ;;
5488 esac
5489 ;;
5490 none )
5491 HAVE_X_WINDOWS=no
5492 HAVE_X11=no
5493 USE_X_TOOLKIT=none
5494 ;;
5495esac
5496
5497### If we're using X11, we should use the X menu package.
5498HAVE_MENUS=no
5499case ${HAVE_X11} in
5500 yes ) HAVE_MENUS=yes ;;
5501esac
5502
5503if test "${opsys}" = "hpux9"; then
5504 case "${x_libraries}" in
5505 *X11R4* )
5506 opsysfile="s/hpux9-x11r4.h"
5507 ;;
5508 esac
5509fi
5510
5511if test "${opsys}" = "hpux9shr"; then
5512 case "${x_libraries}" in
5513 *X11R4* )
5514 opsysfile="s/hpux9shxr4.h"
5515 ;;
5516 esac
5517fi
5518
5519### Compute the unexec source name from the object name.
5520UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
5521
5522# Do the opsystem or machine files prohibit the use of the GNU malloc?
5523# Assume not, until told otherwise.
5524GNU_MALLOC=yes
5525doug_lea_malloc=yes
598a2813 5526echo "$as_me:5525: checking for malloc_get_state" >&5
98418dba
CW
5527echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6
5528if test "${ac_cv_func_malloc_get_state+set}" = set; then
5529 echo $ECHO_N "(cached) $ECHO_C" >&6
5530else
5531 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 5532#line 5526 "configure"
98418dba
CW
5533#include "confdefs.h"
5534/* System header to define __stub macros and hopefully few prototypes,
5535 which can conflict with char malloc_get_state (); below. */
5536#include <assert.h>
5537/* Override any gcc2 internal prototype to avoid an error. */
5538#ifdef __cplusplus
5539extern "C"
5540#endif
5541/* We use char because int might match the return type of a gcc2
5542 builtin and then its argument prototype would still apply. */
5543char malloc_get_state ();
5544char (*f) ();
5545
98418dba
CW
5546int
5547main ()
5548{
5549/* The GNU C library defines this for functions which it implements
5550 to always fail with ENOSYS. Some functions are actually named
5551 something starting with __ and the normal name is an alias. */
5552#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
5553choke me
5554#else
5555f = malloc_get_state;
5556#endif
5557
5558 ;
5559 return 0;
5560}
5561_ACEOF
5562rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 5563if { (eval echo "$as_me:5562: \"$ac_link\"") >&5
98418dba
CW
5564 (eval $ac_link) 2>&5
5565 ac_status=$?
598a2813 5566 echo "$as_me:5565: \$? = $ac_status" >&5
98418dba
CW
5567 (exit $ac_status); } &&
5568 { ac_try='test -s conftest$ac_exeext'
598a2813 5569 { (eval echo "$as_me:5568: \"$ac_try\"") >&5
98418dba
CW
5570 (eval $ac_try) 2>&5
5571 ac_status=$?
598a2813 5572 echo "$as_me:5571: \$? = $ac_status" >&5
98418dba
CW
5573 (exit $ac_status); }; }; then
5574 ac_cv_func_malloc_get_state=yes
5575else
5576 echo "$as_me: failed program was:" >&5
5577cat conftest.$ac_ext >&5
5578ac_cv_func_malloc_get_state=no
5579fi
5580rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5581fi
598a2813 5582echo "$as_me:5581: result: $ac_cv_func_malloc_get_state" >&5
98418dba
CW
5583echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6
5584if test $ac_cv_func_malloc_get_state = yes; then
5585 :
5586else
5587 doug_lea_malloc=no
5588fi
5589
598a2813 5590echo "$as_me:5589: checking for malloc_set_state" >&5
98418dba
CW
5591echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6
5592if test "${ac_cv_func_malloc_set_state+set}" = set; then
5593 echo $ECHO_N "(cached) $ECHO_C" >&6
5594else
5595 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 5596#line 5590 "configure"
98418dba
CW
5597#include "confdefs.h"
5598/* System header to define __stub macros and hopefully few prototypes,
5599 which can conflict with char malloc_set_state (); below. */
5600#include <assert.h>
5601/* Override any gcc2 internal prototype to avoid an error. */
5602#ifdef __cplusplus
5603extern "C"
5604#endif
5605/* We use char because int might match the return type of a gcc2
5606 builtin and then its argument prototype would still apply. */
5607char malloc_set_state ();
5608char (*f) ();
5609
98418dba
CW
5610int
5611main ()
5612{
5613/* The GNU C library defines this for functions which it implements
5614 to always fail with ENOSYS. Some functions are actually named
5615 something starting with __ and the normal name is an alias. */
5616#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
5617choke me
5618#else
5619f = malloc_set_state;
5620#endif
5621
5622 ;
5623 return 0;
5624}
5625_ACEOF
5626rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 5627if { (eval echo "$as_me:5626: \"$ac_link\"") >&5
98418dba
CW
5628 (eval $ac_link) 2>&5
5629 ac_status=$?
598a2813 5630 echo "$as_me:5629: \$? = $ac_status" >&5
98418dba
CW
5631 (exit $ac_status); } &&
5632 { ac_try='test -s conftest$ac_exeext'
598a2813 5633 { (eval echo "$as_me:5632: \"$ac_try\"") >&5
98418dba
CW
5634 (eval $ac_try) 2>&5
5635 ac_status=$?
598a2813 5636 echo "$as_me:5635: \$? = $ac_status" >&5
98418dba
CW
5637 (exit $ac_status); }; }; then
5638 ac_cv_func_malloc_set_state=yes
5639else
5640 echo "$as_me: failed program was:" >&5
5641cat conftest.$ac_ext >&5
5642ac_cv_func_malloc_set_state=no
5643fi
5644rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5645fi
598a2813 5646echo "$as_me:5645: result: $ac_cv_func_malloc_set_state" >&5
98418dba
CW
5647echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6
5648if test $ac_cv_func_malloc_set_state = yes; then
5649 :
5650else
5651 doug_lea_malloc=no
5652fi
5653
598a2813 5654echo "$as_me:5653: checking whether __after_morecore_hook exists" >&5
98418dba
CW
5655echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6
5656if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
5657 echo $ECHO_N "(cached) $ECHO_C" >&6
5658else
5659 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 5660#line 5654 "configure"
98418dba
CW
5661#include "confdefs.h"
5662extern void (* __after_morecore_hook)();
98418dba
CW
5663int
5664main ()
5665{
5666__after_morecore_hook = 0
5667 ;
5668 return 0;
5669}
5670_ACEOF
5671rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 5672if { (eval echo "$as_me:5671: \"$ac_link\"") >&5
98418dba
CW
5673 (eval $ac_link) 2>&5
5674 ac_status=$?
598a2813 5675 echo "$as_me:5674: \$? = $ac_status" >&5
98418dba
CW
5676 (exit $ac_status); } &&
5677 { ac_try='test -s conftest$ac_exeext'
598a2813 5678 { (eval echo "$as_me:5677: \"$ac_try\"") >&5
98418dba
CW
5679 (eval $ac_try) 2>&5
5680 ac_status=$?
598a2813 5681 echo "$as_me:5680: \$? = $ac_status" >&5
98418dba
CW
5682 (exit $ac_status); }; }; then
5683 emacs_cv_var___after_morecore_hook=yes
5684else
5685 echo "$as_me: failed program was:" >&5
5686cat conftest.$ac_ext >&5
5687emacs_cv_var___after_morecore_hook=no
5688fi
5689rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5690fi
598a2813 5691echo "$as_me:5690: result: $emacs_cv_var___after_morecore_hook" >&5
98418dba
CW
5692echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6
5693if test $emacs_cv_var___after_morecore_hook = no; then
5694 doug_lea_malloc=no
5695fi
5696if test "${system_malloc}" = "yes"; then
5697 GNU_MALLOC=no
5698 GNU_MALLOC_reason="
5699 (The GNU allocators don't work with this system configuration.)"
5700fi
5701if test "$doug_lea_malloc" = "yes" ; then
5702 if test "$GNU_MALLOC" = yes ; then
5703 GNU_MALLOC_reason="
5704 (Using Doug Lea's new malloc from the GNU C Library.)"
5705 fi
b936fae4 5706
925c2f3f 5707cat >>confdefs.h <<\EOF
98418dba 5708#define DOUG_LEA_MALLOC 1
925c2f3f 5709EOF
98418dba
CW
5710
5711fi
5712
5713if test x"${REL_ALLOC}" = x; then
5714 REL_ALLOC=${GNU_MALLOC}
5715fi
5716
925c2f3f 5717# On IRIX 5.3, sys/types and inttypes.h are conflicting.
98418dba 5718
925c2f3f
EZ
5719for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5720 inttypes.h stdint.h unistd.h
98418dba
CW
5721do
5722as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
598a2813 5723echo "$as_me:5722: checking for $ac_header" >&5
98418dba
CW
5724echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5725if eval "test \"\${$as_ac_Header+set}\" = set"; then
5726 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 5727else
925c2f3f
EZ
5728 cat >conftest.$ac_ext <<_ACEOF
5729#line 5723 "configure"
98418dba
CW
5730#include "confdefs.h"
5731$ac_includes_default
5732#include <$ac_header>
5733_ACEOF
5734rm -f conftest.$ac_objext
598a2813 5735if { (eval echo "$as_me:5734: \"$ac_compile\"") >&5
98418dba
CW
5736 (eval $ac_compile) 2>&5
5737 ac_status=$?
598a2813 5738 echo "$as_me:5737: \$? = $ac_status" >&5
98418dba
CW
5739 (exit $ac_status); } &&
5740 { ac_try='test -s conftest.$ac_objext'
598a2813 5741 { (eval echo "$as_me:5740: \"$ac_try\"") >&5
98418dba
CW
5742 (eval $ac_try) 2>&5
5743 ac_status=$?
598a2813 5744 echo "$as_me:5743: \$? = $ac_status" >&5
98418dba 5745 (exit $ac_status); }; }; then
925c2f3f 5746 eval "$as_ac_Header=yes"
98418dba
CW
5747else
5748 echo "$as_me: failed program was:" >&5
5749cat conftest.$ac_ext >&5
925c2f3f 5750eval "$as_ac_Header=no"
98418dba
CW
5751fi
5752rm -f conftest.$ac_objext conftest.$ac_ext
925c2f3f 5753fi
598a2813 5754echo "$as_me:5753: result: `eval echo '${'$as_ac_Header'}'`" >&5
925c2f3f
EZ
5755echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5756if test `eval echo '${'$as_ac_Header'}'` = yes; then
5757 cat >>confdefs.h <<EOF
5758#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5759EOF
98418dba 5760
925c2f3f
EZ
5761fi
5762done
5763
5764for ac_header in stdlib.h unistd.h
5765do
5766as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
598a2813 5767echo "$as_me:5766: checking for $ac_header" >&5
925c2f3f
EZ
5768echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5769if eval "test \"\${$as_ac_Header+set}\" = set"; then
5770 echo $ECHO_N "(cached) $ECHO_C" >&6
5771else
5772 cat >conftest.$ac_ext <<_ACEOF
5773#line 5767 "configure"
98418dba
CW
5774#include "confdefs.h"
5775#include <$ac_header>
5776_ACEOF
598a2813 5777if { (eval echo "$as_me:5776: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
5778 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5779 ac_status=$?
5780 egrep -v '^ *\+' conftest.er1 >conftest.err
5781 rm -f conftest.er1
5782 cat conftest.err >&5
598a2813 5783 echo "$as_me:5782: \$? = $ac_status" >&5
98418dba
CW
5784 (exit $ac_status); } >/dev/null; then
5785 if test -s conftest.err; then
5786 ac_cpp_err=$ac_c_preproc_warn_flag
5787 else
5788 ac_cpp_err=
5789 fi
5790else
5791 ac_cpp_err=yes
5792fi
5793if test -z "$ac_cpp_err"; then
925c2f3f 5794 eval "$as_ac_Header=yes"
98418dba
CW
5795else
5796 echo "$as_me: failed program was:" >&5
5797 cat conftest.$ac_ext >&5
925c2f3f 5798 eval "$as_ac_Header=no"
98418dba
CW
5799fi
5800rm -f conftest.err conftest.$ac_ext
98418dba 5801fi
598a2813 5802echo "$as_me:5801: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5803echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 5804if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 5805 cat >>confdefs.h <<EOF
98418dba 5806#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 5807EOF
98418dba
CW
5808
5809fi
98418dba
CW
5810done
5811
98418dba
CW
5812for ac_func in getpagesize
5813do
5814as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
598a2813 5815echo "$as_me:5814: checking for $ac_func" >&5
98418dba
CW
5816echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5817if eval "test \"\${$as_ac_var+set}\" = set"; then
5818 echo $ECHO_N "(cached) $ECHO_C" >&6
5819else
5820 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 5821#line 5815 "configure"
98418dba
CW
5822#include "confdefs.h"
5823/* System header to define __stub macros and hopefully few prototypes,
5824 which can conflict with char $ac_func (); below. */
5825#include <assert.h>
5826/* Override any gcc2 internal prototype to avoid an error. */
5827#ifdef __cplusplus
5828extern "C"
5829#endif
5830/* We use char because int might match the return type of a gcc2
5831 builtin and then its argument prototype would still apply. */
5832char $ac_func ();
5833char (*f) ();
5834
98418dba
CW
5835int
5836main ()
5837{
5838/* The GNU C library defines this for functions which it implements
5839 to always fail with ENOSYS. Some functions are actually named
5840 something starting with __ and the normal name is an alias. */
5841#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5842choke me
5843#else
5844f = $ac_func;
5845#endif
5846
5847 ;
5848 return 0;
5849}
5850_ACEOF
5851rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 5852if { (eval echo "$as_me:5851: \"$ac_link\"") >&5
98418dba
CW
5853 (eval $ac_link) 2>&5
5854 ac_status=$?
598a2813 5855 echo "$as_me:5854: \$? = $ac_status" >&5
98418dba
CW
5856 (exit $ac_status); } &&
5857 { ac_try='test -s conftest$ac_exeext'
598a2813 5858 { (eval echo "$as_me:5857: \"$ac_try\"") >&5
98418dba
CW
5859 (eval $ac_try) 2>&5
5860 ac_status=$?
598a2813 5861 echo "$as_me:5860: \$? = $ac_status" >&5
98418dba
CW
5862 (exit $ac_status); }; }; then
5863 eval "$as_ac_var=yes"
5864else
5865 echo "$as_me: failed program was:" >&5
5866cat conftest.$ac_ext >&5
5867eval "$as_ac_var=no"
5868fi
5869rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5870fi
598a2813 5871echo "$as_me:5870: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
5872echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5873if test `eval echo '${'$as_ac_var'}'` = yes; then
925c2f3f 5874 cat >>confdefs.h <<EOF
98418dba 5875#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
925c2f3f 5876EOF
98418dba
CW
5877
5878fi
5879done
5880
598a2813 5881echo "$as_me:5880: checking for working mmap" >&5
98418dba
CW
5882echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
5883if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
5884 echo $ECHO_N "(cached) $ECHO_C" >&6
5885else
5886 if test "$cross_compiling" = yes; then
5887 ac_cv_func_mmap_fixed_mapped=no
5888else
5889 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 5890#line 5884 "configure"
98418dba
CW
5891#include "confdefs.h"
5892$ac_includes_default
98418dba
CW
5893/* Thanks to Mike Haertel and Jim Avera for this test.
5894 Here is a matrix of mmap possibilities:
5895 mmap private not fixed
5896 mmap private fixed at somewhere currently unmapped
5897 mmap private fixed at somewhere already mapped
5898 mmap shared not fixed
5899 mmap shared fixed at somewhere currently unmapped
5900 mmap shared fixed at somewhere already mapped
5901 For private mappings, we should verify that changes cannot be read()
5902 back from the file, nor mmap's back from the file at a different
5903 address. (There have been systems where private was not correctly
5904 implemented like the infamous i386 svr4.0, and systems where the
5905 VM page cache was not coherent with the file system buffer cache
5906 like early versions of FreeBSD and possibly contemporary NetBSD.)
5907 For shared mappings, we should conversely verify that changes get
925c2f3f 5908 propogated back to all the places they're supposed to be.
98418dba
CW
5909
5910 Grep wants private fixed already mapped.
5911 The main things grep needs to know about mmap are:
5912 * does it exist and is it safe to write into the mmap'd area
5913 * how to use it (BSD variants) */
5914
5915#include <fcntl.h>
5916#include <sys/mman.h>
5917
5918#if !STDC_HEADERS && !HAVE_STDLIB_H
5919char *malloc ();
5920#endif
5921
5922/* This mess was copied from the GNU getpagesize.h. */
5923#if !HAVE_GETPAGESIZE
5924/* Assume that all systems that can run configure have sys/param.h. */
5925# if !HAVE_SYS_PARAM_H
5926# define HAVE_SYS_PARAM_H 1
5927# endif
5928
5929# ifdef _SC_PAGESIZE
5930# define getpagesize() sysconf(_SC_PAGESIZE)
5931# else /* no _SC_PAGESIZE */
5932# if HAVE_SYS_PARAM_H
5933# include <sys/param.h>
5934# ifdef EXEC_PAGESIZE
5935# define getpagesize() EXEC_PAGESIZE
5936# else /* no EXEC_PAGESIZE */
5937# ifdef NBPG
5938# define getpagesize() NBPG * CLSIZE
5939# ifndef CLSIZE
5940# define CLSIZE 1
5941# endif /* no CLSIZE */
5942# else /* no NBPG */
5943# ifdef NBPC
5944# define getpagesize() NBPC
5945# else /* no NBPC */
5946# ifdef PAGESIZE
5947# define getpagesize() PAGESIZE
5948# endif /* PAGESIZE */
5949# endif /* no NBPC */
5950# endif /* no NBPG */
5951# endif /* no EXEC_PAGESIZE */
5952# else /* no HAVE_SYS_PARAM_H */
5953# define getpagesize() 8192 /* punt totally */
5954# endif /* no HAVE_SYS_PARAM_H */
5955# endif /* no _SC_PAGESIZE */
5956
5957#endif /* no HAVE_GETPAGESIZE */
5958
5959int
5960main ()
5961{
5962 char *data, *data2, *data3;
5963 int i, pagesize;
5964 int fd;
5965
5966 pagesize = getpagesize ();
5967
5968 /* First, make a file with some known garbage in it. */
5969 data = (char *) malloc (pagesize);
5970 if (!data)
5971 exit (1);
5972 for (i = 0; i < pagesize; ++i)
5973 *(data + i) = rand ();
5974 umask (0);
5975 fd = creat ("conftest.mmap", 0600);
5976 if (fd < 0)
5977 exit (1);
5978 if (write (fd, data, pagesize) != pagesize)
5979 exit (1);
5980 close (fd);
5981
5982 /* Next, try to mmap the file at a fixed address which already has
5983 something else allocated at it. If we can, also make sure that
5984 we see the same garbage. */
5985 fd = open ("conftest.mmap", O_RDWR);
5986 if (fd < 0)
5987 exit (1);
5988 data2 = (char *) malloc (2 * pagesize);
5989 if (!data2)
5990 exit (1);
5991 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5992 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
5993 MAP_PRIVATE | MAP_FIXED, fd, 0L))
5994 exit (1);
5995 for (i = 0; i < pagesize; ++i)
5996 if (*(data + i) != *(data2 + i))
5997 exit (1);
5998
5999 /* Finally, make sure that changes to the mapped area do not
6000 percolate back to the file as seen by read(). (This is a bug on
6001 some variants of i386 svr4.0.) */
6002 for (i = 0; i < pagesize; ++i)
6003 *(data2 + i) = *(data2 + i) + 1;
6004 data3 = (char *) malloc (pagesize);
6005 if (!data3)
6006 exit (1);
6007 if (read (fd, data3, pagesize) != pagesize)
6008 exit (1);
6009 for (i = 0; i < pagesize; ++i)
6010 if (*(data + i) != *(data3 + i))
6011 exit (1);
6012 close (fd);
6013 exit (0);
6014}
6015_ACEOF
6016rm -f conftest$ac_exeext
598a2813 6017if { (eval echo "$as_me:6016: \"$ac_link\"") >&5
98418dba
CW
6018 (eval $ac_link) 2>&5
6019 ac_status=$?
598a2813 6020 echo "$as_me:6019: \$? = $ac_status" >&5
98418dba 6021 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
598a2813 6022 { (eval echo "$as_me:6021: \"$ac_try\"") >&5
98418dba
CW
6023 (eval $ac_try) 2>&5
6024 ac_status=$?
598a2813 6025 echo "$as_me:6024: \$? = $ac_status" >&5
98418dba
CW
6026 (exit $ac_status); }; }; then
6027 ac_cv_func_mmap_fixed_mapped=yes
6028else
6029 echo "$as_me: program exited with status $ac_status" >&5
6030echo "$as_me: failed program was:" >&5
6031cat conftest.$ac_ext >&5
98418dba
CW
6032ac_cv_func_mmap_fixed_mapped=no
6033fi
6034rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6035fi
6036fi
598a2813 6037echo "$as_me:6036: result: $ac_cv_func_mmap_fixed_mapped" >&5
98418dba
CW
6038echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
6039if test $ac_cv_func_mmap_fixed_mapped = yes; then
6040
925c2f3f 6041cat >>confdefs.h <<\EOF
98418dba 6042#define HAVE_MMAP 1
925c2f3f 6043EOF
98418dba
CW
6044
6045fi
6046rm -f conftest.mmap
6047
6048if test $use_mmap_for_buffers = yes; then
6049 REL_ALLOC=no
6050fi
6051
6052LIBS="$libsrc_libs $LIBS"
6053
598a2813 6054echo "$as_me:6053: checking for dnet_ntoa in -ldnet" >&5
98418dba
CW
6055echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
6056if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
6057 echo $ECHO_N "(cached) $ECHO_C" >&6
6058else
6059 ac_check_lib_save_LIBS=$LIBS
6060LIBS="-ldnet $LIBS"
6061cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6062#line 6056 "configure"
98418dba
CW
6063#include "confdefs.h"
6064
6065/* Override any gcc2 internal prototype to avoid an error. */
6066#ifdef __cplusplus
6067extern "C"
6068#endif
6069/* We use char because int might match the return type of a gcc2
6070 builtin and then its argument prototype would still apply. */
6071char dnet_ntoa ();
98418dba
CW
6072int
6073main ()
6074{
6075dnet_ntoa ();
6076 ;
6077 return 0;
6078}
6079_ACEOF
6080rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 6081if { (eval echo "$as_me:6080: \"$ac_link\"") >&5
98418dba
CW
6082 (eval $ac_link) 2>&5
6083 ac_status=$?
598a2813 6084 echo "$as_me:6083: \$? = $ac_status" >&5
98418dba
CW
6085 (exit $ac_status); } &&
6086 { ac_try='test -s conftest$ac_exeext'
598a2813 6087 { (eval echo "$as_me:6086: \"$ac_try\"") >&5
98418dba
CW
6088 (eval $ac_try) 2>&5
6089 ac_status=$?
598a2813 6090 echo "$as_me:6089: \$? = $ac_status" >&5
98418dba
CW
6091 (exit $ac_status); }; }; then
6092 ac_cv_lib_dnet_dnet_ntoa=yes
6093else
6094 echo "$as_me: failed program was:" >&5
6095cat conftest.$ac_ext >&5
6096ac_cv_lib_dnet_dnet_ntoa=no
6097fi
6098rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6099LIBS=$ac_check_lib_save_LIBS
6100fi
598a2813 6101echo "$as_me:6100: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
98418dba
CW
6102echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
6103if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
925c2f3f 6104 cat >>confdefs.h <<EOF
98418dba 6105#define HAVE_LIBDNET 1
925c2f3f 6106EOF
98418dba
CW
6107
6108 LIBS="-ldnet $LIBS"
6109
6110fi
6111
598a2813 6112echo "$as_me:6111: checking for main in -lXbsd" >&5
98418dba
CW
6113echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6
6114if test "${ac_cv_lib_Xbsd_main+set}" = set; then
6115 echo $ECHO_N "(cached) $ECHO_C" >&6
6116else
6117 ac_check_lib_save_LIBS=$LIBS
6118LIBS="-lXbsd $LIBS"
6119cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6120#line 6114 "configure"
98418dba
CW
6121#include "confdefs.h"
6122
98418dba
CW
6123int
6124main ()
6125{
6126main ();
6127 ;
6128 return 0;
6129}
6130_ACEOF
6131rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 6132if { (eval echo "$as_me:6131: \"$ac_link\"") >&5
98418dba
CW
6133 (eval $ac_link) 2>&5
6134 ac_status=$?
598a2813 6135 echo "$as_me:6134: \$? = $ac_status" >&5
98418dba
CW
6136 (exit $ac_status); } &&
6137 { ac_try='test -s conftest$ac_exeext'
598a2813 6138 { (eval echo "$as_me:6137: \"$ac_try\"") >&5
98418dba
CW
6139 (eval $ac_try) 2>&5
6140 ac_status=$?
598a2813 6141 echo "$as_me:6140: \$? = $ac_status" >&5
98418dba
CW
6142 (exit $ac_status); }; }; then
6143 ac_cv_lib_Xbsd_main=yes
6144else
6145 echo "$as_me: failed program was:" >&5
6146cat conftest.$ac_ext >&5
6147ac_cv_lib_Xbsd_main=no
6148fi
6149rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6150LIBS=$ac_check_lib_save_LIBS
6151fi
598a2813 6152echo "$as_me:6151: result: $ac_cv_lib_Xbsd_main" >&5
98418dba
CW
6153echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6
6154if test $ac_cv_lib_Xbsd_main = yes; then
6155 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
6156fi
6157
598a2813 6158echo "$as_me:6157: checking for cma_open in -lpthreads" >&5
98418dba
CW
6159echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6
6160if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
6161 echo $ECHO_N "(cached) $ECHO_C" >&6
6162else
6163 ac_check_lib_save_LIBS=$LIBS
6164LIBS="-lpthreads $LIBS"
6165cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6166#line 6160 "configure"
98418dba
CW
6167#include "confdefs.h"
6168
6169/* Override any gcc2 internal prototype to avoid an error. */
6170#ifdef __cplusplus
6171extern "C"
6172#endif
6173/* We use char because int might match the return type of a gcc2
6174 builtin and then its argument prototype would still apply. */
6175char cma_open ();
98418dba
CW
6176int
6177main ()
6178{
6179cma_open ();
6180 ;
6181 return 0;
6182}
6183_ACEOF
6184rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 6185if { (eval echo "$as_me:6184: \"$ac_link\"") >&5
98418dba
CW
6186 (eval $ac_link) 2>&5
6187 ac_status=$?
598a2813 6188 echo "$as_me:6187: \$? = $ac_status" >&5
98418dba
CW
6189 (exit $ac_status); } &&
6190 { ac_try='test -s conftest$ac_exeext'
598a2813 6191 { (eval echo "$as_me:6190: \"$ac_try\"") >&5
98418dba
CW
6192 (eval $ac_try) 2>&5
6193 ac_status=$?
598a2813 6194 echo "$as_me:6193: \$? = $ac_status" >&5
98418dba
CW
6195 (exit $ac_status); }; }; then
6196 ac_cv_lib_pthreads_cma_open=yes
6197else
6198 echo "$as_me: failed program was:" >&5
6199cat conftest.$ac_ext >&5
6200ac_cv_lib_pthreads_cma_open=no
6201fi
6202rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6203LIBS=$ac_check_lib_save_LIBS
6204fi
598a2813 6205echo "$as_me:6204: result: $ac_cv_lib_pthreads_cma_open" >&5
98418dba
CW
6206echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6
6207if test $ac_cv_lib_pthreads_cma_open = yes; then
925c2f3f 6208 cat >>confdefs.h <<EOF
98418dba 6209#define HAVE_LIBPTHREADS 1
925c2f3f 6210EOF
98418dba
CW
6211
6212 LIBS="-lpthreads $LIBS"
6213
6214fi
6215
598a2813 6216echo "$as_me:6215: checking for XFree86 in /usr/X386" >&5
98418dba
CW
6217echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6
6218if test -d /usr/X386/include; then
6219 HAVE_XFREE386=yes
6220 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
6221else
6222 HAVE_XFREE386=no
6223fi
598a2813 6224echo "$as_me:6223: result: $HAVE_XFREE386" >&5
98418dba
CW
6225echo "${ECHO_T}$HAVE_XFREE386" >&6
6226
6227# Change CFLAGS temporarily so that C_SWITCH_X_SITE gets used
6228# for the tests that follow. We set it back to REAL_CFLAGS later on.
6229
6230REAL_CPPFLAGS="$CPPFLAGS"
6231
6232if test "${HAVE_X11}" = "yes"; then
6233 DEFS="$C_SWITCH_X_SITE $DEFS"
6234 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
6235 LIBS="$LIBX $LIBS"
6236 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
6237 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
6238
6239 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
6240 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
6241 # but it's more convenient here to set LD_RUN_PATH
6242 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
6243 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
6244 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
6245 export LD_RUN_PATH
6246 fi
6247
6248 if test "${opsys}" = "gnu-linux"; then
598a2813 6249 echo "$as_me:6248: checking whether X on GNU/Linux needs -b to link" >&5
98418dba
CW
6250echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6
6251 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6252#line 6246 "configure"
98418dba
CW
6253#include "confdefs.h"
6254
98418dba
CW
6255int
6256main ()
6257{
6258XOpenDisplay ("foo");
6259 ;
6260 return 0;
6261}
6262_ACEOF
6263rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 6264if { (eval echo "$as_me:6263: \"$ac_link\"") >&5
98418dba
CW
6265 (eval $ac_link) 2>&5
6266 ac_status=$?
598a2813 6267 echo "$as_me:6266: \$? = $ac_status" >&5
98418dba
CW
6268 (exit $ac_status); } &&
6269 { ac_try='test -s conftest$ac_exeext'
598a2813 6270 { (eval echo "$as_me:6269: \"$ac_try\"") >&5
98418dba
CW
6271 (eval $ac_try) 2>&5
6272 ac_status=$?
598a2813 6273 echo "$as_me:6272: \$? = $ac_status" >&5
98418dba
CW
6274 (exit $ac_status); }; }; then
6275 xlinux_first_failure=no
6276else
6277 echo "$as_me: failed program was:" >&5
6278cat conftest.$ac_ext >&5
6279xlinux_first_failure=yes
6280fi
6281rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6282 if test "${xlinux_first_failure}" = "yes"; then
6283 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
6284 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
6285 OLD_CPPFLAGS="$CPPFLAGS"
6286 OLD_LIBS="$LIBS"
6287 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
6288 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
6289 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
6290 LIBS="$LIBS -b i486-linuxaout"
6291 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6292#line 6286 "configure"
98418dba
CW
6293#include "confdefs.h"
6294
98418dba
CW
6295int
6296main ()
6297{
6298XOpenDisplay ("foo");
6299 ;
6300 return 0;
6301}
6302_ACEOF
6303rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 6304if { (eval echo "$as_me:6303: \"$ac_link\"") >&5
98418dba
CW
6305 (eval $ac_link) 2>&5
6306 ac_status=$?
598a2813 6307 echo "$as_me:6306: \$? = $ac_status" >&5
98418dba
CW
6308 (exit $ac_status); } &&
6309 { ac_try='test -s conftest$ac_exeext'
598a2813 6310 { (eval echo "$as_me:6309: \"$ac_try\"") >&5
98418dba
CW
6311 (eval $ac_try) 2>&5
6312 ac_status=$?
598a2813 6313 echo "$as_me:6312: \$? = $ac_status" >&5
98418dba
CW
6314 (exit $ac_status); }; }; then
6315 xlinux_second_failure=no
6316else
6317 echo "$as_me: failed program was:" >&5
6318cat conftest.$ac_ext >&5
6319xlinux_second_failure=yes
6320fi
6321rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6322 if test "${xlinux_second_failure}" = "yes"; then
6323 # If we get the same failure with -b, there is no use adding -b.
6324 # So take it out. This plays safe.
6325 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
6326 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
6327 CPPFLAGS="$OLD_CPPFLAGS"
6328 LIBS="$OLD_LIBS"
598a2813 6329 echo "$as_me:6328: result: no" >&5
98418dba
CW
6330echo "${ECHO_T}no" >&6
6331 else
598a2813 6332 echo "$as_me:6331: result: yes" >&5
98418dba
CW
6333echo "${ECHO_T}yes" >&6
6334 fi
6335 else
598a2813 6336 echo "$as_me:6335: result: no" >&5
98418dba
CW
6337echo "${ECHO_T}no" >&6
6338 fi
6339 fi
6340
6341 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
6342 # header files included from there.
598a2813 6343 echo "$as_me:6342: checking for Xkb" >&5
98418dba
CW
6344echo $ECHO_N "checking for Xkb... $ECHO_C" >&6
6345 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6346#line 6340 "configure"
98418dba
CW
6347#include "confdefs.h"
6348#include <X11/Xlib.h>
6349#include <X11/XKBlib.h>
98418dba
CW
6350int
6351main ()
6352{
6353XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
6354 ;
6355 return 0;
6356}
6357_ACEOF
6358rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 6359if { (eval echo "$as_me:6358: \"$ac_link\"") >&5
98418dba
CW
6360 (eval $ac_link) 2>&5
6361 ac_status=$?
598a2813 6362 echo "$as_me:6361: \$? = $ac_status" >&5
98418dba
CW
6363 (exit $ac_status); } &&
6364 { ac_try='test -s conftest$ac_exeext'
598a2813 6365 { (eval echo "$as_me:6364: \"$ac_try\"") >&5
98418dba
CW
6366 (eval $ac_try) 2>&5
6367 ac_status=$?
598a2813 6368 echo "$as_me:6367: \$? = $ac_status" >&5
98418dba
CW
6369 (exit $ac_status); }; }; then
6370 emacs_xkb=yes
6371else
6372 echo "$as_me: failed program was:" >&5
6373cat conftest.$ac_ext >&5
6374emacs_xkb=no
6375fi
6376rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
598a2813 6377 echo "$as_me:6376: result: $emacs_xkb" >&5
98418dba
CW
6378echo "${ECHO_T}$emacs_xkb" >&6
6379 if test $emacs_xkb = yes; then
b936fae4 6380
925c2f3f 6381cat >>confdefs.h <<\EOF
98418dba 6382#define HAVE_XKBGETKEYBOARD 1
925c2f3f 6383EOF
98418dba
CW
6384
6385 fi
6386
98418dba
CW
6387for ac_func in XrmSetDatabase XScreenResourceString \
6388XScreenNumberOfScreen XSetWMProtocols
6389do
6390as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
598a2813 6391echo "$as_me:6390: checking for $ac_func" >&5
98418dba
CW
6392echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6393if eval "test \"\${$as_ac_var+set}\" = set"; then
6394 echo $ECHO_N "(cached) $ECHO_C" >&6
6395else
6396 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6397#line 6391 "configure"
98418dba
CW
6398#include "confdefs.h"
6399/* System header to define __stub macros and hopefully few prototypes,
6400 which can conflict with char $ac_func (); below. */
6401#include <assert.h>
6402/* Override any gcc2 internal prototype to avoid an error. */
6403#ifdef __cplusplus
6404extern "C"
6405#endif
6406/* We use char because int might match the return type of a gcc2
6407 builtin and then its argument prototype would still apply. */
6408char $ac_func ();
6409char (*f) ();
6410
98418dba
CW
6411int
6412main ()
6413{
6414/* The GNU C library defines this for functions which it implements
6415 to always fail with ENOSYS. Some functions are actually named
6416 something starting with __ and the normal name is an alias. */
6417#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6418choke me
6419#else
6420f = $ac_func;
6421#endif
6422
6423 ;
6424 return 0;
6425}
6426_ACEOF
6427rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 6428if { (eval echo "$as_me:6427: \"$ac_link\"") >&5
98418dba
CW
6429 (eval $ac_link) 2>&5
6430 ac_status=$?
598a2813 6431 echo "$as_me:6430: \$? = $ac_status" >&5
98418dba
CW
6432 (exit $ac_status); } &&
6433 { ac_try='test -s conftest$ac_exeext'
598a2813 6434 { (eval echo "$as_me:6433: \"$ac_try\"") >&5
98418dba
CW
6435 (eval $ac_try) 2>&5
6436 ac_status=$?
598a2813 6437 echo "$as_me:6436: \$? = $ac_status" >&5
98418dba
CW
6438 (exit $ac_status); }; }; then
6439 eval "$as_ac_var=yes"
6440else
6441 echo "$as_me: failed program was:" >&5
6442cat conftest.$ac_ext >&5
6443eval "$as_ac_var=no"
6444fi
6445rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6446fi
598a2813 6447echo "$as_me:6446: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
6448echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6449if test `eval echo '${'$as_ac_var'}'` = yes; then
925c2f3f 6450 cat >>confdefs.h <<EOF
98418dba 6451#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
925c2f3f 6452EOF
98418dba
CW
6453
6454fi
6455done
6456
6457fi
6458
6459if test "${window_system}" = "x11"; then
598a2813 6460 echo "$as_me:6459: checking X11 version 6" >&5
98418dba
CW
6461echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6
6462 if test "${emacs_cv_x11_version_6+set}" = set; then
6463 echo $ECHO_N "(cached) $ECHO_C" >&6
6464else
6465 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6466#line 6460 "configure"
98418dba
CW
6467#include "confdefs.h"
6468#include <X11/Xlib.h>
98418dba
CW
6469int
6470main ()
6471{
6472#if XlibSpecificationRelease < 6
6473fail;
6474#endif
6475
6476 ;
6477 return 0;
6478}
6479_ACEOF
6480rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 6481if { (eval echo "$as_me:6480: \"$ac_link\"") >&5
98418dba
CW
6482 (eval $ac_link) 2>&5
6483 ac_status=$?
598a2813 6484 echo "$as_me:6483: \$? = $ac_status" >&5
98418dba
CW
6485 (exit $ac_status); } &&
6486 { ac_try='test -s conftest$ac_exeext'
598a2813 6487 { (eval echo "$as_me:6486: \"$ac_try\"") >&5
98418dba
CW
6488 (eval $ac_try) 2>&5
6489 ac_status=$?
598a2813 6490 echo "$as_me:6489: \$? = $ac_status" >&5
98418dba
CW
6491 (exit $ac_status); }; }; then
6492 emacs_cv_x11_version_6=yes
6493else
6494 echo "$as_me: failed program was:" >&5
6495cat conftest.$ac_ext >&5
6496emacs_cv_x11_version_6=no
6497fi
6498rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6499fi
6500
6501 if test $emacs_cv_x11_version_6 = yes; then
598a2813 6502 echo "$as_me:6501: result: 6 or newer" >&5
98418dba 6503echo "${ECHO_T}6 or newer" >&6
b936fae4 6504
925c2f3f 6505cat >>confdefs.h <<\EOF
98418dba 6506#define HAVE_X11R6 1
925c2f3f 6507EOF
98418dba
CW
6508
6509 else
598a2813 6510 echo "$as_me:6509: result: before 6" >&5
98418dba
CW
6511echo "${ECHO_T}before 6" >&6
6512 fi
6513fi
6514
6515if test "${window_system}" = "x11"; then
598a2813 6516 echo "$as_me:6515: checking X11 version 5" >&5
98418dba
CW
6517echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6
6518 if test "${emacs_cv_x11_version_5+set}" = set; then
6519 echo $ECHO_N "(cached) $ECHO_C" >&6
6520else
6521 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6522#line 6516 "configure"
98418dba
CW
6523#include "confdefs.h"
6524#include <X11/Xlib.h>
98418dba
CW
6525int
6526main ()
6527{
6528#if XlibSpecificationRelease < 5
6529fail;
6530#endif
6531
6532 ;
6533 return 0;
6534}
6535_ACEOF
6536rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 6537if { (eval echo "$as_me:6536: \"$ac_link\"") >&5
98418dba
CW
6538 (eval $ac_link) 2>&5
6539 ac_status=$?
598a2813 6540 echo "$as_me:6539: \$? = $ac_status" >&5
98418dba
CW
6541 (exit $ac_status); } &&
6542 { ac_try='test -s conftest$ac_exeext'
598a2813 6543 { (eval echo "$as_me:6542: \"$ac_try\"") >&5
98418dba
CW
6544 (eval $ac_try) 2>&5
6545 ac_status=$?
598a2813 6546 echo "$as_me:6545: \$? = $ac_status" >&5
98418dba
CW
6547 (exit $ac_status); }; }; then
6548 emacs_cv_x11_version_5=yes
6549else
6550 echo "$as_me: failed program was:" >&5
6551cat conftest.$ac_ext >&5
6552emacs_cv_x11_version_5=no
6553fi
6554rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6555fi
6556
6557 if test $emacs_cv_x11_version_5 = yes; then
598a2813 6558 echo "$as_me:6557: result: 5 or newer" >&5
98418dba
CW
6559echo "${ECHO_T}5 or newer" >&6
6560 HAVE_X11R5=yes
b936fae4 6561
925c2f3f 6562cat >>confdefs.h <<\EOF
98418dba 6563#define HAVE_X11R5 1
925c2f3f 6564EOF
98418dba
CW
6565
6566 else
6567 HAVE_X11R5=no
598a2813 6568 echo "$as_me:6567: result: before 5" >&5
98418dba
CW
6569echo "${ECHO_T}before 5" >&6
6570 fi
6571fi
6572
6573if test x"${USE_X_TOOLKIT}" = xmaybe; then
6574 if test x"${HAVE_X11R5}" = xyes; then
598a2813 6575 echo "$as_me:6574: checking X11 version 5 with Xaw" >&5
98418dba
CW
6576echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6
6577 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
6578 echo $ECHO_N "(cached) $ECHO_C" >&6
6579else
6580 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6581#line 6575 "configure"
98418dba
CW
6582#include "confdefs.h"
6583
6584#include <X11/Intrinsic.h>
6585#include <X11/Xaw/Simple.h>
98418dba
CW
6586int
6587main ()
6588{
6589
6590 ;
6591 return 0;
6592}
6593_ACEOF
6594rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 6595if { (eval echo "$as_me:6594: \"$ac_link\"") >&5
98418dba
CW
6596 (eval $ac_link) 2>&5
6597 ac_status=$?
598a2813 6598 echo "$as_me:6597: \$? = $ac_status" >&5
98418dba
CW
6599 (exit $ac_status); } &&
6600 { ac_try='test -s conftest$ac_exeext'
598a2813 6601 { (eval echo "$as_me:6600: \"$ac_try\"") >&5
98418dba
CW
6602 (eval $ac_try) 2>&5
6603 ac_status=$?
598a2813 6604 echo "$as_me:6603: \$? = $ac_status" >&5
98418dba
CW
6605 (exit $ac_status); }; }; then
6606 emacs_cv_x11_version_5_with_xaw=yes
6607else
6608 echo "$as_me: failed program was:" >&5
6609cat conftest.$ac_ext >&5
6610emacs_cv_x11_version_5_with_xaw=no
6611fi
6612rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6613fi
6614
6615 if test $emacs_cv_x11_version_5_with_xaw = yes; then
598a2813 6616 echo "$as_me:6615: result: 5 or newer, with Xaw; use toolkit by default" >&5
98418dba
CW
6617echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6
6618 USE_X_TOOLKIT=LUCID
6619 else
598a2813 6620 echo "$as_me:6619: result: before 5 or no Xaw; do not use toolkit by default" >&5
98418dba
CW
6621echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6
6622 USE_X_TOOLKIT=none
6623 fi
6624 else
6625 USE_X_TOOLKIT=none
6626 fi
6627fi
6628
6629X_TOOLKIT_TYPE=$USE_X_TOOLKIT
6630
6631if test "${USE_X_TOOLKIT}" != "none"; then
598a2813 6632 echo "$as_me:6631: checking X11 toolkit version" >&5
98418dba
CW
6633echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6
6634 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
6635 echo $ECHO_N "(cached) $ECHO_C" >&6
6636else
6637 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6638#line 6632 "configure"
98418dba
CW
6639#include "confdefs.h"
6640#include <X11/Intrinsic.h>
98418dba
CW
6641int
6642main ()
6643{
6644#if XtSpecificationRelease < 6
6645fail;
6646#endif
6647
6648 ;
6649 return 0;
6650}
6651_ACEOF
6652rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 6653if { (eval echo "$as_me:6652: \"$ac_link\"") >&5
98418dba
CW
6654 (eval $ac_link) 2>&5
6655 ac_status=$?
598a2813 6656 echo "$as_me:6655: \$? = $ac_status" >&5
98418dba
CW
6657 (exit $ac_status); } &&
6658 { ac_try='test -s conftest$ac_exeext'
598a2813 6659 { (eval echo "$as_me:6658: \"$ac_try\"") >&5
98418dba
CW
6660 (eval $ac_try) 2>&5
6661 ac_status=$?
598a2813 6662 echo "$as_me:6661: \$? = $ac_status" >&5
98418dba
CW
6663 (exit $ac_status); }; }; then
6664 emacs_cv_x11_toolkit_version_6=yes
6665else
6666 echo "$as_me: failed program was:" >&5
6667cat conftest.$ac_ext >&5
6668emacs_cv_x11_toolkit_version_6=no
6669fi
6670rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6671fi
6672
6673 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
6674 if test $emacs_cv_x11_toolkit_version_6 = yes; then
598a2813 6675 echo "$as_me:6674: result: 6 or newer" >&5
98418dba 6676echo "${ECHO_T}6 or newer" >&6
b936fae4 6677
925c2f3f 6678cat >>confdefs.h <<\EOF
98418dba 6679#define HAVE_X11XTR6 1
925c2f3f 6680EOF
98418dba
CW
6681
6682 else
598a2813 6683 echo "$as_me:6682: result: before 6" >&5
98418dba
CW
6684echo "${ECHO_T}before 6" >&6
6685 fi
6686
6687 OLDLIBS="$LIBS"
6688 if test x$HAVE_X11XTR6 = xyes; then
6689 LIBS="-lXt -lSM -lICE $LIBS"
6690 else
6691 LIBS="-lXt $LIBS"
6692 fi
6693
598a2813 6694echo "$as_me:6693: checking for XmuConvertStandardSelection in -lXmu" >&5
98418dba
CW
6695echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6
6696if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
6697 echo $ECHO_N "(cached) $ECHO_C" >&6
6698else
6699 ac_check_lib_save_LIBS=$LIBS
6700LIBS="-lXmu $LIBS"
6701cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6702#line 6696 "configure"
98418dba
CW
6703#include "confdefs.h"
6704
6705/* Override any gcc2 internal prototype to avoid an error. */
6706#ifdef __cplusplus
6707extern "C"
6708#endif
6709/* We use char because int might match the return type of a gcc2
6710 builtin and then its argument prototype would still apply. */
6711char XmuConvertStandardSelection ();
98418dba
CW
6712int
6713main ()
6714{
6715XmuConvertStandardSelection ();
6716 ;
6717 return 0;
6718}
6719_ACEOF
6720rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 6721if { (eval echo "$as_me:6720: \"$ac_link\"") >&5
98418dba
CW
6722 (eval $ac_link) 2>&5
6723 ac_status=$?
598a2813 6724 echo "$as_me:6723: \$? = $ac_status" >&5
98418dba
CW
6725 (exit $ac_status); } &&
6726 { ac_try='test -s conftest$ac_exeext'
598a2813 6727 { (eval echo "$as_me:6726: \"$ac_try\"") >&5
98418dba
CW
6728 (eval $ac_try) 2>&5
6729 ac_status=$?
598a2813 6730 echo "$as_me:6729: \$? = $ac_status" >&5
98418dba
CW
6731 (exit $ac_status); }; }; then
6732 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
6733else
6734 echo "$as_me: failed program was:" >&5
6735cat conftest.$ac_ext >&5
6736ac_cv_lib_Xmu_XmuConvertStandardSelection=no
6737fi
6738rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6739LIBS=$ac_check_lib_save_LIBS
6740fi
598a2813 6741echo "$as_me:6740: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
98418dba
CW
6742echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6
6743if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
925c2f3f 6744 cat >>confdefs.h <<EOF
98418dba 6745#define HAVE_LIBXMU 1
925c2f3f 6746EOF
98418dba
CW
6747
6748 LIBS="-lXmu $LIBS"
6749
6750fi
6751
6752 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
6753fi
6754
6755# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
6756if test "${HAVE_X11}" = "yes"; then
6757 if test "${USE_X_TOOLKIT}" != "none"; then
6758
598a2813 6759echo "$as_me:6758: checking for XShapeQueryExtension in -lXext" >&5
98418dba
CW
6760echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6
6761if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
6762 echo $ECHO_N "(cached) $ECHO_C" >&6
6763else
6764 ac_check_lib_save_LIBS=$LIBS
6765LIBS="-lXext $LIBS"
6766cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6767#line 6761 "configure"
98418dba
CW
6768#include "confdefs.h"
6769
6770/* Override any gcc2 internal prototype to avoid an error. */
6771#ifdef __cplusplus
6772extern "C"
6773#endif
6774/* We use char because int might match the return type of a gcc2
6775 builtin and then its argument prototype would still apply. */
6776char XShapeQueryExtension ();
98418dba
CW
6777int
6778main ()
6779{
6780XShapeQueryExtension ();
6781 ;
6782 return 0;
6783}
6784_ACEOF
6785rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 6786if { (eval echo "$as_me:6785: \"$ac_link\"") >&5
98418dba
CW
6787 (eval $ac_link) 2>&5
6788 ac_status=$?
598a2813 6789 echo "$as_me:6788: \$? = $ac_status" >&5
98418dba
CW
6790 (exit $ac_status); } &&
6791 { ac_try='test -s conftest$ac_exeext'
598a2813 6792 { (eval echo "$as_me:6791: \"$ac_try\"") >&5
98418dba
CW
6793 (eval $ac_try) 2>&5
6794 ac_status=$?
598a2813 6795 echo "$as_me:6794: \$? = $ac_status" >&5
98418dba
CW
6796 (exit $ac_status); }; }; then
6797 ac_cv_lib_Xext_XShapeQueryExtension=yes
6798else
6799 echo "$as_me: failed program was:" >&5
6800cat conftest.$ac_ext >&5
6801ac_cv_lib_Xext_XShapeQueryExtension=no
6802fi
6803rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6804LIBS=$ac_check_lib_save_LIBS
6805fi
598a2813 6806echo "$as_me:6805: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
98418dba
CW
6807echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6
6808if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
925c2f3f 6809 cat >>confdefs.h <<EOF
98418dba 6810#define HAVE_LIBXEXT 1
925c2f3f 6811EOF
98418dba
CW
6812
6813 LIBS="-lXext $LIBS"
6814
6815fi
6816
6817 fi
6818fi
6819
6820if test "${USE_X_TOOLKIT}" = "MOTIF"; then
598a2813 6821 echo "$as_me:6820: checking for Motif version 2.1" >&5
98418dba
CW
6822echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6
6823if test "${emacs_cv_motif_version_2_1+set}" = set; then
6824 echo $ECHO_N "(cached) $ECHO_C" >&6
6825else
6826 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6827#line 6821 "configure"
98418dba
CW
6828#include "confdefs.h"
6829#include <Xm/Xm.h>
98418dba
CW
6830int
6831main ()
6832{
6833#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
6834int x = 5;
6835#else
6836Motif version prior to 2.1.
6837#endif
6838 ;
6839 return 0;
6840}
6841_ACEOF
6842rm -f conftest.$ac_objext
598a2813 6843if { (eval echo "$as_me:6842: \"$ac_compile\"") >&5
98418dba
CW
6844 (eval $ac_compile) 2>&5
6845 ac_status=$?
598a2813 6846 echo "$as_me:6845: \$? = $ac_status" >&5
98418dba
CW
6847 (exit $ac_status); } &&
6848 { ac_try='test -s conftest.$ac_objext'
598a2813 6849 { (eval echo "$as_me:6848: \"$ac_try\"") >&5
98418dba
CW
6850 (eval $ac_try) 2>&5
6851 ac_status=$?
598a2813 6852 echo "$as_me:6851: \$? = $ac_status" >&5
98418dba
CW
6853 (exit $ac_status); }; }; then
6854 emacs_cv_motif_version_2_1=yes
6855else
6856 echo "$as_me: failed program was:" >&5
6857cat conftest.$ac_ext >&5
6858emacs_cv_motif_version_2_1=no
6859fi
6860rm -f conftest.$ac_objext conftest.$ac_ext
6861fi
598a2813 6862echo "$as_me:6861: result: $emacs_cv_motif_version_2_1" >&5
98418dba
CW
6863echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6
6864 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
6865 if test $emacs_cv_motif_version_2_1 = yes; then
6866 HAVE_LIBXP=no
b936fae4 6867
925c2f3f 6868cat >>confdefs.h <<\EOF
98418dba 6869#define HAVE_MOTIF_2_1 1
925c2f3f 6870EOF
98418dba 6871
598a2813 6872 echo "$as_me:6871: checking for XpCreateContext in -lXp" >&5
98418dba
CW
6873echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6
6874if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
6875 echo $ECHO_N "(cached) $ECHO_C" >&6
6876else
6877 ac_check_lib_save_LIBS=$LIBS
6878LIBS="-lXp $LIBS"
6879cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6880#line 6874 "configure"
98418dba
CW
6881#include "confdefs.h"
6882
6883/* Override any gcc2 internal prototype to avoid an error. */
6884#ifdef __cplusplus
6885extern "C"
6886#endif
6887/* We use char because int might match the return type of a gcc2
6888 builtin and then its argument prototype would still apply. */
6889char XpCreateContext ();
98418dba
CW
6890int
6891main ()
6892{
6893XpCreateContext ();
6894 ;
6895 return 0;
6896}
6897_ACEOF
6898rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 6899if { (eval echo "$as_me:6898: \"$ac_link\"") >&5
98418dba
CW
6900 (eval $ac_link) 2>&5
6901 ac_status=$?
598a2813 6902 echo "$as_me:6901: \$? = $ac_status" >&5
98418dba
CW
6903 (exit $ac_status); } &&
6904 { ac_try='test -s conftest$ac_exeext'
598a2813 6905 { (eval echo "$as_me:6904: \"$ac_try\"") >&5
98418dba
CW
6906 (eval $ac_try) 2>&5
6907 ac_status=$?
598a2813 6908 echo "$as_me:6907: \$? = $ac_status" >&5
98418dba
CW
6909 (exit $ac_status); }; }; then
6910 ac_cv_lib_Xp_XpCreateContext=yes
6911else
6912 echo "$as_me: failed program was:" >&5
6913cat conftest.$ac_ext >&5
6914ac_cv_lib_Xp_XpCreateContext=no
6915fi
6916rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6917LIBS=$ac_check_lib_save_LIBS
6918fi
598a2813 6919echo "$as_me:6918: result: $ac_cv_lib_Xp_XpCreateContext" >&5
98418dba
CW
6920echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6
6921if test $ac_cv_lib_Xp_XpCreateContext = yes; then
6922 HAVE_LIBXP=yes
6923fi
503d2be0 6924
98418dba 6925 if test ${HAVE_LIBXP} = yes; then
b936fae4 6926
925c2f3f 6927cat >>confdefs.h <<\EOF
98418dba 6928#define HAVE_LIBXP 1
925c2f3f 6929EOF
503d2be0 6930
98418dba
CW
6931 fi
6932 fi
6933fi
6934
6935### Is -lXaw3d available?
6936HAVE_XAW3D=no
6937if test "${HAVE_X11}" = "yes"; then
6938 if test "${USE_X_TOOLKIT}" != "none"; then
598a2813 6939 echo "$as_me:6938: checking for X11/Xaw3d/Scrollbar.h" >&5
98418dba
CW
6940echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6
6941if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
6942 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 6943else
925c2f3f
EZ
6944 cat >conftest.$ac_ext <<_ACEOF
6945#line 6939 "configure"
98418dba
CW
6946#include "confdefs.h"
6947#include <X11/Xaw3d/Scrollbar.h>
503d2be0 6948_ACEOF
598a2813 6949if { (eval echo "$as_me:6948: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
6950 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6951 ac_status=$?
6952 egrep -v '^ *\+' conftest.er1 >conftest.err
6953 rm -f conftest.er1
6954 cat conftest.err >&5
598a2813 6955 echo "$as_me:6954: \$? = $ac_status" >&5
503d2be0
AS
6956 (exit $ac_status); } >/dev/null; then
6957 if test -s conftest.err; then
6958 ac_cpp_err=$ac_c_preproc_warn_flag
6959 else
6960 ac_cpp_err=
6961 fi
6962else
6963 ac_cpp_err=yes
6964fi
6965if test -z "$ac_cpp_err"; then
925c2f3f 6966 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 6967else
503d2be0 6968 echo "$as_me: failed program was:" >&5
ba4481b5 6969 cat conftest.$ac_ext >&5
925c2f3f 6970 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 6971fi
503d2be0 6972rm -f conftest.err conftest.$ac_ext
98418dba 6973fi
598a2813 6974echo "$as_me:6973: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
98418dba 6975echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6
98418dba 6976if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
598a2813 6977 echo "$as_me:6976: checking for XawScrollbarSetThumb in -lXaw3d" >&5
98418dba
CW
6978echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6
6979if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
6980 echo $ECHO_N "(cached) $ECHO_C" >&6
6981else
6982 ac_check_lib_save_LIBS=$LIBS
6983LIBS="-lXaw3d $LIBS"
6984cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6985#line 6979 "configure"
ba4481b5 6986#include "confdefs.h"
98418dba
CW
6987
6988/* Override any gcc2 internal prototype to avoid an error. */
6989#ifdef __cplusplus
6990extern "C"
6991#endif
6992/* We use char because int might match the return type of a gcc2
6993 builtin and then its argument prototype would still apply. */
6994char XawScrollbarSetThumb ();
503d2be0
AS
6995int
6996main ()
6997{
98418dba 6998XawScrollbarSetThumb ();
503d2be0
AS
6999 ;
7000 return 0;
7001}
7002_ACEOF
7003rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 7004if { (eval echo "$as_me:7003: \"$ac_link\"") >&5
503d2be0
AS
7005 (eval $ac_link) 2>&5
7006 ac_status=$?
598a2813 7007 echo "$as_me:7006: \$? = $ac_status" >&5
503d2be0
AS
7008 (exit $ac_status); } &&
7009 { ac_try='test -s conftest$ac_exeext'
598a2813 7010 { (eval echo "$as_me:7009: \"$ac_try\"") >&5
503d2be0
AS
7011 (eval $ac_try) 2>&5
7012 ac_status=$?
598a2813 7013 echo "$as_me:7012: \$? = $ac_status" >&5
503d2be0 7014 (exit $ac_status); }; }; then
98418dba 7015 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
ba4481b5 7016else
503d2be0
AS
7017 echo "$as_me: failed program was:" >&5
7018cat conftest.$ac_ext >&5
98418dba 7019ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
ba4481b5 7020fi
503d2be0 7021rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 7022LIBS=$ac_check_lib_save_LIBS
ba4481b5 7023fi
598a2813 7024echo "$as_me:7023: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
98418dba
CW
7025echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6
7026if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
7027 HAVE_XAW3D=yes
ba4481b5 7028fi
503d2be0 7029
ba4481b5
DL
7030fi
7031
98418dba 7032 if test "${HAVE_XAW3D}" = "yes"; then
b936fae4 7033
925c2f3f 7034cat >>confdefs.h <<\EOF
98418dba 7035#define HAVE_XAW3D 1
925c2f3f 7036EOF
98418dba 7037
ba4481b5 7038 fi
98418dba 7039 fi
ba4481b5
DL
7040fi
7041
98418dba
CW
7042USE_TOOLKIT_SCROLL_BARS=no
7043if test "${with_toolkit_scroll_bars}" != "no"; then
7044 if test "${USE_X_TOOLKIT}" != "none"; then
7045 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
925c2f3f 7046 cat >>confdefs.h <<\EOF
98418dba 7047#define USE_TOOLKIT_SCROLL_BARS 1
925c2f3f 7048EOF
98418dba
CW
7049
7050 HAVE_XAW3D=no
7051 USE_TOOLKIT_SCROLL_BARS=yes
7052 elif test "${HAVE_XAW3D}" = "yes"; then
925c2f3f 7053 cat >>confdefs.h <<\EOF
98418dba 7054#define USE_TOOLKIT_SCROLL_BARS 1
925c2f3f 7055EOF
98418dba
CW
7056
7057 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 7058 fi
ba4481b5
DL
7059 fi
7060fi
7061
98418dba 7062if test "${with_xim}" != "no"; then
b936fae4 7063
925c2f3f 7064cat >>confdefs.h <<\EOF
98418dba 7065#define USE_XIM 1
925c2f3f 7066EOF
98418dba
CW
7067
7068fi
7069
7070### Use -lXpm if available, unless `--with-xpm=no'.
7071HAVE_XPM=no
7072if test "${HAVE_X11}" = "yes"; then
7073 if test "${with_xpm}" != "no"; then
598a2813 7074 echo "$as_me:7073: checking for X11/xpm.h" >&5
98418dba
CW
7075echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
7076if test "${ac_cv_header_X11_xpm_h+set}" = set; then
7077 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 7078else
925c2f3f
EZ
7079 cat >conftest.$ac_ext <<_ACEOF
7080#line 7074 "configure"
98418dba
CW
7081#include "confdefs.h"
7082#include <X11/xpm.h>
7083_ACEOF
598a2813 7084if { (eval echo "$as_me:7083: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
7085 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7086 ac_status=$?
7087 egrep -v '^ *\+' conftest.er1 >conftest.err
7088 rm -f conftest.er1
7089 cat conftest.err >&5
598a2813 7090 echo "$as_me:7089: \$? = $ac_status" >&5
98418dba
CW
7091 (exit $ac_status); } >/dev/null; then
7092 if test -s conftest.err; then
7093 ac_cpp_err=$ac_c_preproc_warn_flag
7094 else
7095 ac_cpp_err=
7096 fi
7097else
7098 ac_cpp_err=yes
7099fi
7100if test -z "$ac_cpp_err"; then
925c2f3f 7101 ac_cv_header_X11_xpm_h=yes
98418dba
CW
7102else
7103 echo "$as_me: failed program was:" >&5
7104 cat conftest.$ac_ext >&5
925c2f3f 7105 ac_cv_header_X11_xpm_h=no
98418dba
CW
7106fi
7107rm -f conftest.err conftest.$ac_ext
ba4481b5 7108fi
598a2813 7109echo "$as_me:7108: result: $ac_cv_header_X11_xpm_h" >&5
98418dba 7110echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
98418dba 7111if test $ac_cv_header_X11_xpm_h = yes; then
598a2813 7112 echo "$as_me:7111: checking for XpmReadFileToPixmap in -lXpm" >&5
98418dba
CW
7113echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6
7114if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 7115 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7116else
98418dba
CW
7117 ac_check_lib_save_LIBS=$LIBS
7118LIBS="-lXpm -lX11 $LIBS"
7119cat >conftest.$ac_ext <<_ACEOF
925c2f3f 7120#line 7114 "configure"
ba4481b5 7121#include "confdefs.h"
98418dba 7122
ba4481b5 7123/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7124#ifdef __cplusplus
7125extern "C"
7126#endif
ba4481b5 7127/* We use char because int might match the return type of a gcc2
503d2be0 7128 builtin and then its argument prototype would still apply. */
98418dba 7129char XpmReadFileToPixmap ();
503d2be0
AS
7130int
7131main ()
7132{
98418dba 7133XpmReadFileToPixmap ();
503d2be0
AS
7134 ;
7135 return 0;
7136}
7137_ACEOF
7138rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 7139if { (eval echo "$as_me:7138: \"$ac_link\"") >&5
503d2be0
AS
7140 (eval $ac_link) 2>&5
7141 ac_status=$?
598a2813 7142 echo "$as_me:7141: \$? = $ac_status" >&5
503d2be0
AS
7143 (exit $ac_status); } &&
7144 { ac_try='test -s conftest$ac_exeext'
598a2813 7145 { (eval echo "$as_me:7144: \"$ac_try\"") >&5
503d2be0
AS
7146 (eval $ac_try) 2>&5
7147 ac_status=$?
598a2813 7148 echo "$as_me:7147: \$? = $ac_status" >&5
503d2be0 7149 (exit $ac_status); }; }; then
98418dba 7150 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
7151else
7152 echo "$as_me: failed program was:" >&5
7153cat conftest.$ac_ext >&5
98418dba 7154ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0
AS
7155fi
7156rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 7157LIBS=$ac_check_lib_save_LIBS
503d2be0 7158fi
598a2813 7159echo "$as_me:7158: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
98418dba
CW
7160echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6
7161if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
7162 HAVE_XPM=yes
ba4481b5
DL
7163fi
7164
98418dba
CW
7165fi
7166
98418dba 7167 if test "${HAVE_XPM}" = "yes"; then
598a2813 7168 echo "$as_me:7167: checking for XpmReturnAllocPixels preprocessor define" >&5
98418dba
CW
7169echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6
7170 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 7171#line 7165 "configure"
ba4481b5 7172#include "confdefs.h"
98418dba
CW
7173#include "X11/xpm.h"
7174#ifndef XpmReturnAllocPixels
7175no_return_alloc_pixels
503d2be0 7176#endif
ba4481b5 7177
98418dba
CW
7178_ACEOF
7179if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7180 egrep "no_return_alloc_pixels" >/dev/null 2>&1; then
7181 HAVE_XPM=no
7182else
7183 HAVE_XPM=yes
7184fi
7185rm -f conftest*
ba4481b5 7186
98418dba 7187 if test "${HAVE_XPM}" = "yes"; then
598a2813 7188 echo "$as_me:7187: result: yes" >&5
98418dba
CW
7189echo "${ECHO_T}yes" >&6
7190 else
598a2813 7191 echo "$as_me:7190: result: no" >&5
98418dba
CW
7192echo "${ECHO_T}no" >&6
7193 fi
7194 fi
7195 fi
7196
7197 if test "${HAVE_XPM}" = "yes"; then
b936fae4 7198
925c2f3f 7199cat >>confdefs.h <<\EOF
98418dba 7200#define HAVE_XPM 1
925c2f3f 7201EOF
98418dba
CW
7202
7203 fi
7204fi
7205
7206### Use -ljpeg if available, unless `--with-jpeg=no'.
7207HAVE_JPEG=no
7208if test "${HAVE_X11}" = "yes"; then
7209 if test "${with_jpeg}" != "no"; then
598a2813 7210 echo "$as_me:7209: checking for jerror.h" >&5
98418dba
CW
7211echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
7212if test "${ac_cv_header_jerror_h+set}" = set; then
7213 echo $ECHO_N "(cached) $ECHO_C" >&6
503d2be0 7214else
925c2f3f
EZ
7215 cat >conftest.$ac_ext <<_ACEOF
7216#line 7210 "configure"
98418dba
CW
7217#include "confdefs.h"
7218#include <jerror.h>
7219_ACEOF
598a2813 7220if { (eval echo "$as_me:7219: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
7221 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7222 ac_status=$?
7223 egrep -v '^ *\+' conftest.er1 >conftest.err
7224 rm -f conftest.er1
7225 cat conftest.err >&5
598a2813 7226 echo "$as_me:7225: \$? = $ac_status" >&5
98418dba
CW
7227 (exit $ac_status); } >/dev/null; then
7228 if test -s conftest.err; then
7229 ac_cpp_err=$ac_c_preproc_warn_flag
7230 else
7231 ac_cpp_err=
7232 fi
7233else
7234 ac_cpp_err=yes
503d2be0 7235fi
98418dba 7236if test -z "$ac_cpp_err"; then
925c2f3f 7237 ac_cv_header_jerror_h=yes
ba4481b5 7238else
98418dba
CW
7239 echo "$as_me: failed program was:" >&5
7240 cat conftest.$ac_ext >&5
925c2f3f 7241 ac_cv_header_jerror_h=no
98418dba
CW
7242fi
7243rm -f conftest.err conftest.$ac_ext
ba4481b5 7244fi
598a2813 7245echo "$as_me:7244: result: $ac_cv_header_jerror_h" >&5
98418dba 7246echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
98418dba 7247if test $ac_cv_header_jerror_h = yes; then
598a2813 7248 echo "$as_me:7247: checking for jpeg_destroy_compress in -ljpeg" >&5
98418dba
CW
7249echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6
7250if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 7251 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7252else
98418dba
CW
7253 ac_check_lib_save_LIBS=$LIBS
7254LIBS="-ljpeg $LIBS"
7255cat >conftest.$ac_ext <<_ACEOF
925c2f3f 7256#line 7250 "configure"
ba4481b5 7257#include "confdefs.h"
98418dba
CW
7258
7259/* Override any gcc2 internal prototype to avoid an error. */
7260#ifdef __cplusplus
7261extern "C"
7262#endif
7263/* We use char because int might match the return type of a gcc2
7264 builtin and then its argument prototype would still apply. */
7265char jpeg_destroy_compress ();
503d2be0
AS
7266int
7267main ()
7268{
98418dba 7269jpeg_destroy_compress ();
503d2be0
AS
7270 ;
7271 return 0;
7272}
7273_ACEOF
7274rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 7275if { (eval echo "$as_me:7274: \"$ac_link\"") >&5
503d2be0
AS
7276 (eval $ac_link) 2>&5
7277 ac_status=$?
598a2813 7278 echo "$as_me:7277: \$? = $ac_status" >&5
503d2be0
AS
7279 (exit $ac_status); } &&
7280 { ac_try='test -s conftest$ac_exeext'
598a2813 7281 { (eval echo "$as_me:7280: \"$ac_try\"") >&5
503d2be0
AS
7282 (eval $ac_try) 2>&5
7283 ac_status=$?
598a2813 7284 echo "$as_me:7283: \$? = $ac_status" >&5
503d2be0 7285 (exit $ac_status); }; }; then
98418dba 7286 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 7287else
503d2be0
AS
7288 echo "$as_me: failed program was:" >&5
7289cat conftest.$ac_ext >&5
98418dba 7290ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 7291fi
503d2be0 7292rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 7293LIBS=$ac_check_lib_save_LIBS
ba4481b5 7294fi
598a2813 7295echo "$as_me:7294: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
98418dba
CW
7296echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6
7297if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
7298 HAVE_JPEG=yes
ba4481b5 7299fi
98418dba 7300
ba4481b5 7301fi
98418dba 7302
ba4481b5 7303 fi
ba4481b5 7304
98418dba 7305 if test "${HAVE_JPEG}" = "yes"; then
925c2f3f 7306 cat >>confdefs.h <<\EOF
98418dba 7307#define HAVE_JPEG 1
925c2f3f 7308EOF
98418dba
CW
7309
7310 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 7311#line 7305 "configure"
98418dba
CW
7312#include "confdefs.h"
7313 #include <jpeglib.h>
7314 version=JPEG_LIB_VERSION
7315
7316_ACEOF
7317if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7318 egrep "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
925c2f3f 7319 cat >>confdefs.h <<\EOF
98418dba 7320#define HAVE_JPEG 1
925c2f3f 7321EOF
ba4481b5 7322
98418dba 7323else
598a2813 7324 { echo "$as_me:7323: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
7325echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
7326 HAVE_JPEG=no
ba4481b5 7327fi
98418dba 7328rm -f conftest*
ba4481b5 7329
98418dba
CW
7330 fi
7331fi
503d2be0 7332
98418dba
CW
7333### Use -lpng if available, unless `--with-png=no'.
7334HAVE_PNG=no
7335if test "${HAVE_X11}" = "yes"; then
7336 if test "${with_png}" != "no"; then
598a2813 7337 echo "$as_me:7336: checking for png.h" >&5
98418dba
CW
7338echo $ECHO_N "checking for png.h... $ECHO_C" >&6
7339if test "${ac_cv_header_png_h+set}" = set; then
503d2be0
AS
7340 echo $ECHO_N "(cached) $ECHO_C" >&6
7341else
925c2f3f
EZ
7342 cat >conftest.$ac_ext <<_ACEOF
7343#line 7337 "configure"
503d2be0 7344#include "confdefs.h"
98418dba 7345#include <png.h>
503d2be0 7346_ACEOF
598a2813 7347if { (eval echo "$as_me:7346: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
7348 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7349 ac_status=$?
7350 egrep -v '^ *\+' conftest.er1 >conftest.err
7351 rm -f conftest.er1
7352 cat conftest.err >&5
598a2813 7353 echo "$as_me:7352: \$? = $ac_status" >&5
503d2be0
AS
7354 (exit $ac_status); } >/dev/null; then
7355 if test -s conftest.err; then
7356 ac_cpp_err=$ac_c_preproc_warn_flag
7357 else
7358 ac_cpp_err=
7359 fi
7360else
7361 ac_cpp_err=yes
7362fi
7363if test -z "$ac_cpp_err"; then
925c2f3f 7364 ac_cv_header_png_h=yes
503d2be0
AS
7365else
7366 echo "$as_me: failed program was:" >&5
ba4481b5 7367 cat conftest.$ac_ext >&5
925c2f3f 7368 ac_cv_header_png_h=no
ba4481b5 7369fi
503d2be0 7370rm -f conftest.err conftest.$ac_ext
ba4481b5 7371fi
598a2813 7372echo "$as_me:7371: result: $ac_cv_header_png_h" >&5
98418dba 7373echo "${ECHO_T}$ac_cv_header_png_h" >&6
98418dba 7374if test $ac_cv_header_png_h = yes; then
598a2813 7375 echo "$as_me:7374: checking for png_get_channels in -lpng" >&5
98418dba
CW
7376echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6
7377if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 7378 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7379else
98418dba
CW
7380 ac_check_lib_save_LIBS=$LIBS
7381LIBS="-lpng -lz -lm $LIBS"
7382cat >conftest.$ac_ext <<_ACEOF
925c2f3f 7383#line 7377 "configure"
ba4481b5 7384#include "confdefs.h"
98418dba 7385
ba4481b5 7386/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7387#ifdef __cplusplus
7388extern "C"
7389#endif
ba4481b5 7390/* We use char because int might match the return type of a gcc2
503d2be0 7391 builtin and then its argument prototype would still apply. */
98418dba 7392char png_get_channels ();
503d2be0
AS
7393int
7394main ()
7395{
98418dba 7396png_get_channels ();
503d2be0
AS
7397 ;
7398 return 0;
7399}
7400_ACEOF
7401rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 7402if { (eval echo "$as_me:7401: \"$ac_link\"") >&5
503d2be0
AS
7403 (eval $ac_link) 2>&5
7404 ac_status=$?
598a2813 7405 echo "$as_me:7404: \$? = $ac_status" >&5
98418dba
CW
7406 (exit $ac_status); } &&
7407 { ac_try='test -s conftest$ac_exeext'
598a2813 7408 { (eval echo "$as_me:7407: \"$ac_try\"") >&5
503d2be0
AS
7409 (eval $ac_try) 2>&5
7410 ac_status=$?
598a2813 7411 echo "$as_me:7410: \$? = $ac_status" >&5
503d2be0 7412 (exit $ac_status); }; }; then
98418dba 7413 ac_cv_lib_png_png_get_channels=yes
73b77ee5 7414else
98418dba 7415 echo "$as_me: failed program was:" >&5
503d2be0 7416cat conftest.$ac_ext >&5
98418dba 7417ac_cv_lib_png_png_get_channels=no
73b77ee5 7418fi
98418dba
CW
7419rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7420LIBS=$ac_check_lib_save_LIBS
73b77ee5 7421fi
598a2813 7422echo "$as_me:7421: result: $ac_cv_lib_png_png_get_channels" >&5
98418dba
CW
7423echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6
7424if test $ac_cv_lib_png_png_get_channels = yes; then
7425 HAVE_PNG=yes
73b77ee5 7426fi
503d2be0 7427
98418dba
CW
7428fi
7429
98418dba
CW
7430 fi
7431
7432 if test "${HAVE_PNG}" = "yes"; then
b936fae4 7433
925c2f3f 7434cat >>confdefs.h <<\EOF
98418dba 7435#define HAVE_PNG 1
925c2f3f 7436EOF
73b77ee5 7437
98418dba 7438 fi
73b77ee5
GM
7439fi
7440
98418dba
CW
7441### Use -ltiff if available, unless `--with-tiff=no'.
7442HAVE_TIFF=no
7443if test "${HAVE_X11}" = "yes"; then
7444 if test "${with_tiff}" != "no"; then
598a2813 7445 echo "$as_me:7444: checking for tiffio.h" >&5
98418dba
CW
7446echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
7447if test "${ac_cv_header_tiffio_h+set}" = set; then
7448 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 7449else
925c2f3f
EZ
7450 cat >conftest.$ac_ext <<_ACEOF
7451#line 7445 "configure"
98418dba
CW
7452#include "confdefs.h"
7453#include <tiffio.h>
7454_ACEOF
598a2813 7455if { (eval echo "$as_me:7454: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
7456 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7457 ac_status=$?
7458 egrep -v '^ *\+' conftest.er1 >conftest.err
7459 rm -f conftest.er1
7460 cat conftest.err >&5
598a2813 7461 echo "$as_me:7460: \$? = $ac_status" >&5
98418dba
CW
7462 (exit $ac_status); } >/dev/null; then
7463 if test -s conftest.err; then
7464 ac_cpp_err=$ac_c_preproc_warn_flag
7465 else
7466 ac_cpp_err=
7467 fi
7468else
7469 ac_cpp_err=yes
7470fi
7471if test -z "$ac_cpp_err"; then
925c2f3f 7472 ac_cv_header_tiffio_h=yes
98418dba
CW
7473else
7474 echo "$as_me: failed program was:" >&5
7475 cat conftest.$ac_ext >&5
925c2f3f 7476 ac_cv_header_tiffio_h=no
98418dba
CW
7477fi
7478rm -f conftest.err conftest.$ac_ext
98418dba 7479fi
598a2813 7480echo "$as_me:7479: result: $ac_cv_header_tiffio_h" >&5
98418dba 7481echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
98418dba
CW
7482if test $ac_cv_header_tiffio_h = yes; then
7483 tifflibs="-lz -lm"
7484 # At least one tiff package requires the jpeg library.
7485 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
598a2813 7486 echo "$as_me:7485: checking for TIFFGetVersion in -ltiff" >&5
98418dba
CW
7487echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6
7488if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 7489 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 7490else
503d2be0 7491 ac_check_lib_save_LIBS=$LIBS
98418dba 7492LIBS="-ltiff $tifflibs $LIBS"
503d2be0 7493cat >conftest.$ac_ext <<_ACEOF
925c2f3f 7494#line 7488 "configure"
73b77ee5 7495#include "confdefs.h"
503d2be0 7496
73b77ee5 7497/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7498#ifdef __cplusplus
7499extern "C"
7500#endif
73b77ee5 7501/* We use char because int might match the return type of a gcc2
503d2be0 7502 builtin and then its argument prototype would still apply. */
98418dba 7503char TIFFGetVersion ();
503d2be0
AS
7504int
7505main ()
7506{
98418dba 7507TIFFGetVersion ();
503d2be0
AS
7508 ;
7509 return 0;
7510}
7511_ACEOF
7512rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 7513if { (eval echo "$as_me:7512: \"$ac_link\"") >&5
503d2be0
AS
7514 (eval $ac_link) 2>&5
7515 ac_status=$?
598a2813 7516 echo "$as_me:7515: \$? = $ac_status" >&5
503d2be0
AS
7517 (exit $ac_status); } &&
7518 { ac_try='test -s conftest$ac_exeext'
598a2813 7519 { (eval echo "$as_me:7518: \"$ac_try\"") >&5
503d2be0
AS
7520 (eval $ac_try) 2>&5
7521 ac_status=$?
598a2813 7522 echo "$as_me:7521: \$? = $ac_status" >&5
503d2be0 7523 (exit $ac_status); }; }; then
98418dba 7524 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
7525else
7526 echo "$as_me: failed program was:" >&5
7527cat conftest.$ac_ext >&5
98418dba 7528ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0
AS
7529fi
7530rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7531LIBS=$ac_check_lib_save_LIBS
7532fi
598a2813 7533echo "$as_me:7532: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
98418dba
CW
7534echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6
7535if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
7536 HAVE_TIFF=yes
7537fi
7538
7539fi
73b77ee5 7540
98418dba
CW
7541 fi
7542
7543 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 7544
925c2f3f 7545cat >>confdefs.h <<\EOF
98418dba 7546#define HAVE_TIFF 1
925c2f3f 7547EOF
98418dba
CW
7548
7549 fi
73b77ee5
GM
7550fi
7551
98418dba
CW
7552### Use -lgif if available, unless `--with-gif=no'.
7553HAVE_GIF=no
7554if test "${HAVE_X11}" = "yes"; then
7555 if test "${with_gif}" != "no"; then
598a2813 7556 echo "$as_me:7555: checking for gif_lib.h" >&5
98418dba
CW
7557echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
7558if test "${ac_cv_header_gif_lib_h+set}" = set; then
7559 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 7560else
925c2f3f
EZ
7561 cat >conftest.$ac_ext <<_ACEOF
7562#line 7556 "configure"
98418dba
CW
7563#include "confdefs.h"
7564#include <gif_lib.h>
7565_ACEOF
598a2813 7566if { (eval echo "$as_me:7565: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
7567 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7568 ac_status=$?
7569 egrep -v '^ *\+' conftest.er1 >conftest.err
7570 rm -f conftest.er1
7571 cat conftest.err >&5
598a2813 7572 echo "$as_me:7571: \$? = $ac_status" >&5
98418dba
CW
7573 (exit $ac_status); } >/dev/null; then
7574 if test -s conftest.err; then
7575 ac_cpp_err=$ac_c_preproc_warn_flag
7576 else
7577 ac_cpp_err=
7578 fi
7579else
7580 ac_cpp_err=yes
7581fi
7582if test -z "$ac_cpp_err"; then
925c2f3f 7583 ac_cv_header_gif_lib_h=yes
98418dba
CW
7584else
7585 echo "$as_me: failed program was:" >&5
7586 cat conftest.$ac_ext >&5
925c2f3f 7587 ac_cv_header_gif_lib_h=no
98418dba
CW
7588fi
7589rm -f conftest.err conftest.$ac_ext
98418dba 7590fi
598a2813 7591echo "$as_me:7590: result: $ac_cv_header_gif_lib_h" >&5
98418dba 7592echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
98418dba
CW
7593if test $ac_cv_header_gif_lib_h = yes; then
7594 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
7595# Earlier versions can crash Emacs.
598a2813 7596 echo "$as_me:7595: checking for EGifPutExtensionLast in -lungif" >&5
98418dba
CW
7597echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6
7598if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
503d2be0 7599 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 7600else
503d2be0 7601 ac_check_lib_save_LIBS=$LIBS
98418dba 7602LIBS="-lungif $LIBS"
503d2be0 7603cat >conftest.$ac_ext <<_ACEOF
925c2f3f 7604#line 7598 "configure"
73b77ee5
GM
7605#include "confdefs.h"
7606
98418dba
CW
7607/* Override any gcc2 internal prototype to avoid an error. */
7608#ifdef __cplusplus
7609extern "C"
7610#endif
7611/* We use char because int might match the return type of a gcc2
7612 builtin and then its argument prototype would still apply. */
7613char EGifPutExtensionLast ();
503d2be0
AS
7614int
7615main ()
7616{
98418dba 7617EGifPutExtensionLast ();
503d2be0
AS
7618 ;
7619 return 0;
7620}
7621_ACEOF
7622rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 7623if { (eval echo "$as_me:7622: \"$ac_link\"") >&5
503d2be0
AS
7624 (eval $ac_link) 2>&5
7625 ac_status=$?
598a2813 7626 echo "$as_me:7625: \$? = $ac_status" >&5
98418dba
CW
7627 (exit $ac_status); } &&
7628 { ac_try='test -s conftest$ac_exeext'
598a2813 7629 { (eval echo "$as_me:7628: \"$ac_try\"") >&5
98418dba
CW
7630 (eval $ac_try) 2>&5
7631 ac_status=$?
598a2813 7632 echo "$as_me:7631: \$? = $ac_status" >&5
98418dba
CW
7633 (exit $ac_status); }; }; then
7634 ac_cv_lib_ungif_EGifPutExtensionLast=yes
7635else
7636 echo "$as_me: failed program was:" >&5
7637cat conftest.$ac_ext >&5
7638ac_cv_lib_ungif_EGifPutExtensionLast=no
7639fi
7640rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7641LIBS=$ac_check_lib_save_LIBS
7642fi
598a2813 7643echo "$as_me:7642: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
98418dba
CW
7644echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6
7645if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
7646 HAVE_GIF=yes
7647fi
7648
7649fi
7650
98418dba
CW
7651 fi
7652
7653 if test "${HAVE_GIF}" = "yes"; then
b936fae4 7654
925c2f3f 7655cat >>confdefs.h <<\EOF
98418dba 7656#define HAVE_GIF 1
925c2f3f 7657EOF
98418dba
CW
7658
7659 fi
7660fi
7661
925c2f3f
EZ
7662### Use Mac OS X Carbon API to implement GUI.
7663HAVE_CARBON=no
7664if test "${with_carbon}" != "no"; then
598a2813 7665 echo "$as_me:7664: checking for Carbon/Carbon.h" >&5
925c2f3f
EZ
7666echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
7667if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
7668 echo $ECHO_N "(cached) $ECHO_C" >&6
7669else
7670 cat >conftest.$ac_ext <<_ACEOF
7671#line 7665 "configure"
e0f712ba
AC
7672#include "confdefs.h"
7673#include <Carbon/Carbon.h>
7674_ACEOF
598a2813 7675if { (eval echo "$as_me:7674: \"$ac_cpp conftest.$ac_ext\"") >&5
e0f712ba
AC
7676 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7677 ac_status=$?
7678 egrep -v '^ *\+' conftest.er1 >conftest.err
7679 rm -f conftest.er1
7680 cat conftest.err >&5
598a2813 7681 echo "$as_me:7680: \$? = $ac_status" >&5
e0f712ba
AC
7682 (exit $ac_status); } >/dev/null; then
7683 if test -s conftest.err; then
7684 ac_cpp_err=$ac_c_preproc_warn_flag
7685 else
7686 ac_cpp_err=
7687 fi
7688else
7689 ac_cpp_err=yes
7690fi
7691if test -z "$ac_cpp_err"; then
925c2f3f 7692 ac_cv_header_Carbon_Carbon_h=yes
e0f712ba
AC
7693else
7694 echo "$as_me: failed program was:" >&5
7695 cat conftest.$ac_ext >&5
925c2f3f 7696 ac_cv_header_Carbon_Carbon_h=no
e0f712ba
AC
7697fi
7698rm -f conftest.err conftest.$ac_ext
e0f712ba 7699fi
598a2813 7700echo "$as_me:7699: result: $ac_cv_header_Carbon_Carbon_h" >&5
e0f712ba 7701echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
e0f712ba
AC
7702if test $ac_cv_header_Carbon_Carbon_h = yes; then
7703 HAVE_CARBON=yes
7704fi
7705
e0f712ba
AC
7706fi
7707
7708if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 7709
925c2f3f 7710cat >>confdefs.h <<\EOF
e0f712ba 7711#define HAVE_CARBON 1
925c2f3f 7712EOF
e0f712ba
AC
7713
7714fi
7715
98418dba
CW
7716### Use session management (-lSM -lICE) if available
7717HAVE_X_SM=no
7718if test "${HAVE_X11}" = "yes"; then
598a2813 7719 echo "$as_me:7718: checking for X11/SM/SMlib.h" >&5
98418dba
CW
7720echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
7721if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
7722 echo $ECHO_N "(cached) $ECHO_C" >&6
503d2be0 7723else
925c2f3f
EZ
7724 cat >conftest.$ac_ext <<_ACEOF
7725#line 7719 "configure"
98418dba
CW
7726#include "confdefs.h"
7727#include <X11/SM/SMlib.h>
7728_ACEOF
598a2813 7729if { (eval echo "$as_me:7728: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
7730 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7731 ac_status=$?
7732 egrep -v '^ *\+' conftest.er1 >conftest.err
7733 rm -f conftest.er1
7734 cat conftest.err >&5
598a2813 7735 echo "$as_me:7734: \$? = $ac_status" >&5
98418dba
CW
7736 (exit $ac_status); } >/dev/null; then
7737 if test -s conftest.err; then
7738 ac_cpp_err=$ac_c_preproc_warn_flag
7739 else
7740 ac_cpp_err=
7741 fi
7742else
7743 ac_cpp_err=yes
503d2be0 7744fi
98418dba 7745if test -z "$ac_cpp_err"; then
925c2f3f 7746 ac_cv_header_X11_SM_SMlib_h=yes
98418dba
CW
7747else
7748 echo "$as_me: failed program was:" >&5
7749 cat conftest.$ac_ext >&5
925c2f3f 7750 ac_cv_header_X11_SM_SMlib_h=no
98418dba
CW
7751fi
7752rm -f conftest.err conftest.$ac_ext
73b77ee5 7753fi
598a2813 7754echo "$as_me:7753: result: $ac_cv_header_X11_SM_SMlib_h" >&5
98418dba 7755echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
98418dba 7756if test $ac_cv_header_X11_SM_SMlib_h = yes; then
598a2813 7757 echo "$as_me:7756: checking for SmcOpenConnection in -lSM" >&5
98418dba
CW
7758echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6
7759if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 7760 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 7761else
503d2be0 7762 ac_check_lib_save_LIBS=$LIBS
98418dba 7763LIBS="-lSM $LIBS"
503d2be0 7764cat >conftest.$ac_ext <<_ACEOF
925c2f3f 7765#line 7759 "configure"
73b77ee5 7766#include "confdefs.h"
503d2be0 7767
73b77ee5 7768/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7769#ifdef __cplusplus
7770extern "C"
7771#endif
73b77ee5 7772/* We use char because int might match the return type of a gcc2
503d2be0 7773 builtin and then its argument prototype would still apply. */
98418dba 7774char SmcOpenConnection ();
503d2be0
AS
7775int
7776main ()
7777{
98418dba 7778SmcOpenConnection ();
503d2be0
AS
7779 ;
7780 return 0;
7781}
7782_ACEOF
7783rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 7784if { (eval echo "$as_me:7783: \"$ac_link\"") >&5
503d2be0
AS
7785 (eval $ac_link) 2>&5
7786 ac_status=$?
598a2813 7787 echo "$as_me:7786: \$? = $ac_status" >&5
503d2be0
AS
7788 (exit $ac_status); } &&
7789 { ac_try='test -s conftest$ac_exeext'
598a2813 7790 { (eval echo "$as_me:7789: \"$ac_try\"") >&5
503d2be0
AS
7791 (eval $ac_try) 2>&5
7792 ac_status=$?
598a2813 7793 echo "$as_me:7792: \$? = $ac_status" >&5
503d2be0 7794 (exit $ac_status); }; }; then
98418dba 7795 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
7796else
7797 echo "$as_me: failed program was:" >&5
7798cat conftest.$ac_ext >&5
98418dba 7799ac_cv_lib_SM_SmcOpenConnection=no
503d2be0
AS
7800fi
7801rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7802LIBS=$ac_check_lib_save_LIBS
7803fi
598a2813 7804echo "$as_me:7803: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
98418dba
CW
7805echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6
7806if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
7807 HAVE_X_SM=yes
7808else
7809 -lICE
73b77ee5
GM
7810fi
7811
73b77ee5 7812fi
73b77ee5 7813
98418dba 7814 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 7815
925c2f3f 7816cat >>confdefs.h <<\EOF
98418dba 7817#define HAVE_X_SM 1
925c2f3f 7818EOF
73b77ee5 7819
98418dba
CW
7820 case "$LIBS" in
7821 *-lSM*) ;;
7822 *) LIBS="-lSM -lICE $LIBS" ;;
7823 esac
73b77ee5 7824 fi
98418dba 7825fi
73b77ee5 7826
98418dba 7827# If netdb.h doesn't declare h_errno, we must declare it by hand.
598a2813 7828echo "$as_me:7827: checking whether netdb declares h_errno" >&5
98418dba
CW
7829echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6
7830if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
7831 echo $ECHO_N "(cached) $ECHO_C" >&6
7832else
7833 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 7834#line 7828 "configure"
73b77ee5 7835#include "confdefs.h"
98418dba 7836#include <netdb.h>
503d2be0
AS
7837int
7838main ()
7839{
98418dba 7840return h_errno;
503d2be0
AS
7841 ;
7842 return 0;
7843}
7844_ACEOF
7845rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 7846if { (eval echo "$as_me:7845: \"$ac_link\"") >&5
503d2be0
AS
7847 (eval $ac_link) 2>&5
7848 ac_status=$?
598a2813 7849 echo "$as_me:7848: \$? = $ac_status" >&5
503d2be0
AS
7850 (exit $ac_status); } &&
7851 { ac_try='test -s conftest$ac_exeext'
598a2813 7852 { (eval echo "$as_me:7851: \"$ac_try\"") >&5
503d2be0
AS
7853 (eval $ac_try) 2>&5
7854 ac_status=$?
598a2813 7855 echo "$as_me:7854: \$? = $ac_status" >&5
503d2be0 7856 (exit $ac_status); }; }; then
98418dba 7857 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 7858else
503d2be0
AS
7859 echo "$as_me: failed program was:" >&5
7860cat conftest.$ac_ext >&5
98418dba 7861emacs_cv_netdb_declares_h_errno=no
73b77ee5 7862fi
503d2be0 7863rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 7864fi
598a2813 7865echo "$as_me:7864: result: $emacs_cv_netdb_declares_h_errno" >&5
98418dba
CW
7866echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6
7867if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 7868
925c2f3f 7869cat >>confdefs.h <<\EOF
98418dba 7870#define HAVE_H_ERRNO 1
925c2f3f 7871EOF
73b77ee5 7872
98418dba
CW
7873fi
7874
7875# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7876# for constant arguments. Useless!
598a2813 7877echo "$as_me:7876: checking for working alloca.h" >&5
98418dba
CW
7878echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
7879if test "${ac_cv_working_alloca_h+set}" = set; then
7880 echo $ECHO_N "(cached) $ECHO_C" >&6
7881else
7882 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 7883#line 7877 "configure"
98418dba
CW
7884#include "confdefs.h"
7885#include <alloca.h>
503d2be0
AS
7886int
7887main ()
7888{
98418dba 7889char *p = (char *) alloca (2 * sizeof (int));
503d2be0
AS
7890 ;
7891 return 0;
7892}
7893_ACEOF
7894rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 7895if { (eval echo "$as_me:7894: \"$ac_link\"") >&5
503d2be0
AS
7896 (eval $ac_link) 2>&5
7897 ac_status=$?
598a2813 7898 echo "$as_me:7897: \$? = $ac_status" >&5
503d2be0
AS
7899 (exit $ac_status); } &&
7900 { ac_try='test -s conftest$ac_exeext'
598a2813 7901 { (eval echo "$as_me:7900: \"$ac_try\"") >&5
503d2be0
AS
7902 (eval $ac_try) 2>&5
7903 ac_status=$?
598a2813 7904 echo "$as_me:7903: \$? = $ac_status" >&5
503d2be0 7905 (exit $ac_status); }; }; then
98418dba 7906 ac_cv_working_alloca_h=yes
73b77ee5 7907else
503d2be0
AS
7908 echo "$as_me: failed program was:" >&5
7909cat conftest.$ac_ext >&5
98418dba 7910ac_cv_working_alloca_h=no
73b77ee5 7911fi
503d2be0 7912rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 7913fi
598a2813 7914echo "$as_me:7913: result: $ac_cv_working_alloca_h" >&5
98418dba
CW
7915echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
7916if test $ac_cv_working_alloca_h = yes; then
73b77ee5 7917
925c2f3f 7918cat >>confdefs.h <<\EOF
98418dba 7919#define HAVE_ALLOCA_H 1
925c2f3f 7920EOF
98418dba
CW
7921
7922fi
7923
598a2813 7924echo "$as_me:7923: checking for alloca" >&5
98418dba
CW
7925echo $ECHO_N "checking for alloca... $ECHO_C" >&6
7926if test "${ac_cv_func_alloca_works+set}" = set; then
7927 echo $ECHO_N "(cached) $ECHO_C" >&6
7928else
503d2be0 7929 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 7930#line 7924 "configure"
ac95a621 7931#include "confdefs.h"
98418dba
CW
7932#ifdef __GNUC__
7933# define alloca __builtin_alloca
7934#else
7935# ifdef _MSC_VER
7936# include <malloc.h>
7937# define alloca _alloca
7938# else
7939# if HAVE_ALLOCA_H
7940# include <alloca.h>
7941# else
7942# ifdef _AIX
7943 #pragma alloca
7944# else
7945# ifndef alloca /* predefined by HP cc +Olibcalls */
7946char *alloca ();
7947# endif
7948# endif
7949# endif
7950# endif
7951#endif
7952
503d2be0
AS
7953int
7954main ()
7955{
98418dba 7956char *p = (char *) alloca (1);
503d2be0
AS
7957 ;
7958 return 0;
7959}
7960_ACEOF
7961rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 7962if { (eval echo "$as_me:7961: \"$ac_link\"") >&5
503d2be0
AS
7963 (eval $ac_link) 2>&5
7964 ac_status=$?
598a2813 7965 echo "$as_me:7964: \$? = $ac_status" >&5
503d2be0
AS
7966 (exit $ac_status); } &&
7967 { ac_try='test -s conftest$ac_exeext'
598a2813 7968 { (eval echo "$as_me:7967: \"$ac_try\"") >&5
503d2be0
AS
7969 (eval $ac_try) 2>&5
7970 ac_status=$?
598a2813 7971 echo "$as_me:7970: \$? = $ac_status" >&5
503d2be0 7972 (exit $ac_status); }; }; then
98418dba 7973 ac_cv_func_alloca_works=yes
ac95a621 7974else
503d2be0
AS
7975 echo "$as_me: failed program was:" >&5
7976cat conftest.$ac_ext >&5
98418dba 7977ac_cv_func_alloca_works=no
ac95a621 7978fi
503d2be0 7979rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 7980fi
598a2813 7981echo "$as_me:7980: result: $ac_cv_func_alloca_works" >&5
98418dba 7982echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
ac95a621 7983
98418dba
CW
7984if test $ac_cv_func_alloca_works = yes; then
7985
925c2f3f 7986cat >>confdefs.h <<\EOF
98418dba 7987#define HAVE_ALLOCA 1
925c2f3f 7988EOF
98418dba
CW
7989
7990else
7991 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7992# that cause trouble. Some versions do not even contain alloca or
7993# contain a buggy version. If you still want to use their alloca,
7994# use ar to extract alloca.o from them instead of compiling alloca.c.
7995
7996ALLOCA=alloca.$ac_objext
7997
925c2f3f 7998cat >>confdefs.h <<\EOF
98418dba 7999#define C_ALLOCA 1
925c2f3f 8000EOF
98418dba 8001
598a2813 8002echo "$as_me:8001: checking whether \`alloca.c' needs Cray hooks" >&5
98418dba
CW
8003echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
8004if test "${ac_cv_os_cray+set}" = set; then
8005 echo $ECHO_N "(cached) $ECHO_C" >&6
8006else
8007 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 8008#line 8002 "configure"
98418dba
CW
8009#include "confdefs.h"
8010#if defined(CRAY) && ! defined(CRAY2)
8011webecray
8012#else
8013wenotbecray
8014#endif
8015
8016_ACEOF
8017if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8018 egrep "webecray" >/dev/null 2>&1; then
8019 ac_cv_os_cray=yes
8020else
8021 ac_cv_os_cray=no
8022fi
8023rm -f conftest*
ac95a621 8024
98418dba 8025fi
598a2813 8026echo "$as_me:8025: result: $ac_cv_os_cray" >&5
98418dba
CW
8027echo "${ECHO_T}$ac_cv_os_cray" >&6
8028if test $ac_cv_os_cray = yes; then
8029 for ac_func in _getb67 GETB67 getb67; do
8030 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
598a2813 8031echo "$as_me:8030: checking for $ac_func" >&5
503d2be0
AS
8032echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8033if eval "test \"\${$as_ac_var+set}\" = set"; then
8034 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 8035else
503d2be0 8036 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 8037#line 8031 "configure"
73b77ee5
GM
8038#include "confdefs.h"
8039/* System header to define __stub macros and hopefully few prototypes,
503d2be0 8040 which can conflict with char $ac_func (); below. */
73b77ee5
GM
8041#include <assert.h>
8042/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8043#ifdef __cplusplus
8044extern "C"
8045#endif
73b77ee5 8046/* We use char because int might match the return type of a gcc2
503d2be0
AS
8047 builtin and then its argument prototype would still apply. */
8048char $ac_func ();
8049char (*f) ();
73b77ee5 8050
503d2be0
AS
8051int
8052main ()
8053{
73b77ee5
GM
8054/* The GNU C library defines this for functions which it implements
8055 to always fail with ENOSYS. Some functions are actually named
8056 something starting with __ and the normal name is an alias. */
8057#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8058choke me
8059#else
503d2be0 8060f = $ac_func;
73b77ee5
GM
8061#endif
8062
503d2be0
AS
8063 ;
8064 return 0;
8065}
8066_ACEOF
8067rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 8068if { (eval echo "$as_me:8067: \"$ac_link\"") >&5
503d2be0
AS
8069 (eval $ac_link) 2>&5
8070 ac_status=$?
598a2813 8071 echo "$as_me:8070: \$? = $ac_status" >&5
503d2be0
AS
8072 (exit $ac_status); } &&
8073 { ac_try='test -s conftest$ac_exeext'
598a2813 8074 { (eval echo "$as_me:8073: \"$ac_try\"") >&5
503d2be0
AS
8075 (eval $ac_try) 2>&5
8076 ac_status=$?
598a2813 8077 echo "$as_me:8076: \$? = $ac_status" >&5
503d2be0
AS
8078 (exit $ac_status); }; }; then
8079 eval "$as_ac_var=yes"
8080else
8081 echo "$as_me: failed program was:" >&5
8082cat conftest.$ac_ext >&5
8083eval "$as_ac_var=no"
8084fi
8085rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8086fi
598a2813 8087echo "$as_me:8086: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
8088echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8089if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 8090
925c2f3f 8091cat >>confdefs.h <<EOF
98418dba 8092#define CRAY_STACKSEG_END $ac_func
925c2f3f 8093EOF
98418dba
CW
8094
8095 break
73b77ee5 8096fi
73b77ee5 8097
98418dba 8098 done
73b77ee5
GM
8099fi
8100
598a2813 8101echo "$as_me:8100: checking stack direction for C alloca" >&5
98418dba
CW
8102echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
8103if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 8104 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
8105else
8106 if test "$cross_compiling" = yes; then
8107 ac_cv_c_stack_direction=0
73b77ee5 8108else
503d2be0 8109 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 8110#line 8104 "configure"
73b77ee5 8111#include "confdefs.h"
503d2be0 8112int
98418dba 8113find_stack_direction ()
503d2be0 8114{
98418dba
CW
8115 static char *addr = 0;
8116 auto char dummy;
8117 if (addr == 0)
8118 {
8119 addr = &dummy;
8120 return find_stack_direction ();
8121 }
73b77ee5 8122 else
98418dba
CW
8123 return (&dummy > addr) ? 1 : -1;
8124}
ba4481b5 8125
503d2be0
AS
8126int
8127main ()
8128{
98418dba 8129 exit (find_stack_direction () < 0);
503d2be0
AS
8130}
8131_ACEOF
98418dba 8132rm -f conftest$ac_exeext
598a2813 8133if { (eval echo "$as_me:8132: \"$ac_link\"") >&5
503d2be0
AS
8134 (eval $ac_link) 2>&5
8135 ac_status=$?
598a2813 8136 echo "$as_me:8135: \$? = $ac_status" >&5
98418dba 8137 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
598a2813 8138 { (eval echo "$as_me:8137: \"$ac_try\"") >&5
503d2be0
AS
8139 (eval $ac_try) 2>&5
8140 ac_status=$?
598a2813 8141 echo "$as_me:8140: \$? = $ac_status" >&5
503d2be0 8142 (exit $ac_status); }; }; then
98418dba 8143 ac_cv_c_stack_direction=1
ba4481b5 8144else
98418dba
CW
8145 echo "$as_me: program exited with status $ac_status" >&5
8146echo "$as_me: failed program was:" >&5
503d2be0 8147cat conftest.$ac_ext >&5
98418dba 8148ac_cv_c_stack_direction=-1
ba4481b5 8149fi
98418dba 8150rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 8151fi
98418dba 8152fi
598a2813 8153echo "$as_me:8152: result: $ac_cv_c_stack_direction" >&5
98418dba
CW
8154echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
8155
925c2f3f 8156cat >>confdefs.h <<EOF
98418dba 8157#define STACK_DIRECTION $ac_cv_c_stack_direction
925c2f3f 8158EOF
ba4481b5 8159
ba4481b5
DL
8160fi
8161
98418dba
CW
8162# fmod, logb, and frexp are found in -lm on most systems.
8163# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
8164
598a2813 8165echo "$as_me:8164: checking for sqrt in -lm" >&5
98418dba
CW
8166echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
8167if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 8168 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8169else
98418dba
CW
8170 ac_check_lib_save_LIBS=$LIBS
8171LIBS="-lm $LIBS"
8172cat >conftest.$ac_ext <<_ACEOF
925c2f3f 8173#line 8167 "configure"
ba4481b5
DL
8174#include "confdefs.h"
8175
98418dba
CW
8176/* Override any gcc2 internal prototype to avoid an error. */
8177#ifdef __cplusplus
8178extern "C"
8179#endif
8180/* We use char because int might match the return type of a gcc2
8181 builtin and then its argument prototype would still apply. */
8182char sqrt ();
503d2be0
AS
8183int
8184main ()
8185{
98418dba 8186sqrt ();
503d2be0
AS
8187 ;
8188 return 0;
8189}
8190_ACEOF
8191rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 8192if { (eval echo "$as_me:8191: \"$ac_link\"") >&5
503d2be0
AS
8193 (eval $ac_link) 2>&5
8194 ac_status=$?
598a2813 8195 echo "$as_me:8194: \$? = $ac_status" >&5
503d2be0
AS
8196 (exit $ac_status); } &&
8197 { ac_try='test -s conftest$ac_exeext'
598a2813 8198 { (eval echo "$as_me:8197: \"$ac_try\"") >&5
503d2be0
AS
8199 (eval $ac_try) 2>&5
8200 ac_status=$?
598a2813 8201 echo "$as_me:8200: \$? = $ac_status" >&5
503d2be0 8202 (exit $ac_status); }; }; then
98418dba 8203 ac_cv_lib_m_sqrt=yes
ba4481b5 8204else
503d2be0
AS
8205 echo "$as_me: failed program was:" >&5
8206cat conftest.$ac_ext >&5
98418dba 8207ac_cv_lib_m_sqrt=no
ba4481b5 8208fi
503d2be0 8209rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 8210LIBS=$ac_check_lib_save_LIBS
ba4481b5 8211fi
598a2813 8212echo "$as_me:8211: result: $ac_cv_lib_m_sqrt" >&5
98418dba
CW
8213echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
8214if test $ac_cv_lib_m_sqrt = yes; then
925c2f3f 8215 cat >>confdefs.h <<EOF
98418dba 8216#define HAVE_LIBM 1
925c2f3f 8217EOF
98418dba
CW
8218
8219 LIBS="-lm $LIBS"
ba4481b5 8220
ba4481b5
DL
8221fi
8222
98418dba
CW
8223# Check for mail-locking functions in a "mail" library
8224
598a2813 8225echo "$as_me:8224: checking for maillock in -lmail" >&5
98418dba
CW
8226echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6
8227if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 8228 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8229else
98418dba
CW
8230 ac_check_lib_save_LIBS=$LIBS
8231LIBS="-lmail $LIBS"
8232cat >conftest.$ac_ext <<_ACEOF
925c2f3f 8233#line 8227 "configure"
ba4481b5 8234#include "confdefs.h"
98418dba
CW
8235
8236/* Override any gcc2 internal prototype to avoid an error. */
8237#ifdef __cplusplus
8238extern "C"
8239#endif
8240/* We use char because int might match the return type of a gcc2
8241 builtin and then its argument prototype would still apply. */
8242char maillock ();
503d2be0
AS
8243int
8244main ()
8245{
98418dba 8246maillock ();
503d2be0
AS
8247 ;
8248 return 0;
8249}
8250_ACEOF
8251rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 8252if { (eval echo "$as_me:8251: \"$ac_link\"") >&5
503d2be0
AS
8253 (eval $ac_link) 2>&5
8254 ac_status=$?
598a2813 8255 echo "$as_me:8254: \$? = $ac_status" >&5
503d2be0
AS
8256 (exit $ac_status); } &&
8257 { ac_try='test -s conftest$ac_exeext'
598a2813 8258 { (eval echo "$as_me:8257: \"$ac_try\"") >&5
503d2be0
AS
8259 (eval $ac_try) 2>&5
8260 ac_status=$?
598a2813 8261 echo "$as_me:8260: \$? = $ac_status" >&5
503d2be0 8262 (exit $ac_status); }; }; then
98418dba 8263 ac_cv_lib_mail_maillock=yes
ba4481b5 8264else
503d2be0
AS
8265 echo "$as_me: failed program was:" >&5
8266cat conftest.$ac_ext >&5
98418dba 8267ac_cv_lib_mail_maillock=no
ba4481b5 8268fi
503d2be0 8269rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 8270LIBS=$ac_check_lib_save_LIBS
ba4481b5 8271fi
598a2813 8272echo "$as_me:8271: result: $ac_cv_lib_mail_maillock" >&5
98418dba
CW
8273echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6
8274if test $ac_cv_lib_mail_maillock = yes; then
925c2f3f 8275 cat >>confdefs.h <<EOF
98418dba 8276#define HAVE_LIBMAIL 1
925c2f3f 8277EOF
ba4481b5 8278
98418dba 8279 LIBS="-lmail $LIBS"
ba4481b5 8280
98418dba 8281fi
ba4481b5 8282
598a2813 8283echo "$as_me:8282: checking for maillock in -llockfile" >&5
98418dba
CW
8284echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6
8285if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 8286 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8287else
503d2be0 8288 ac_check_lib_save_LIBS=$LIBS
98418dba 8289LIBS="-llockfile $LIBS"
503d2be0 8290cat >conftest.$ac_ext <<_ACEOF
925c2f3f 8291#line 8285 "configure"
ba4481b5 8292#include "confdefs.h"
503d2be0 8293
ba4481b5 8294/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8295#ifdef __cplusplus
8296extern "C"
8297#endif
ba4481b5 8298/* We use char because int might match the return type of a gcc2
503d2be0 8299 builtin and then its argument prototype would still apply. */
98418dba 8300char maillock ();
503d2be0
AS
8301int
8302main ()
8303{
98418dba 8304maillock ();
503d2be0
AS
8305 ;
8306 return 0;
8307}
8308_ACEOF
8309rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 8310if { (eval echo "$as_me:8309: \"$ac_link\"") >&5
503d2be0
AS
8311 (eval $ac_link) 2>&5
8312 ac_status=$?
598a2813 8313 echo "$as_me:8312: \$? = $ac_status" >&5
503d2be0
AS
8314 (exit $ac_status); } &&
8315 { ac_try='test -s conftest$ac_exeext'
598a2813 8316 { (eval echo "$as_me:8315: \"$ac_try\"") >&5
503d2be0
AS
8317 (eval $ac_try) 2>&5
8318 ac_status=$?
598a2813 8319 echo "$as_me:8318: \$? = $ac_status" >&5
503d2be0 8320 (exit $ac_status); }; }; then
98418dba 8321 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
8322else
8323 echo "$as_me: failed program was:" >&5
8324cat conftest.$ac_ext >&5
98418dba
CW
8325ac_cv_lib_lockfile_maillock=no
8326fi
8327rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8328LIBS=$ac_check_lib_save_LIBS
8329fi
598a2813 8330echo "$as_me:8329: result: $ac_cv_lib_lockfile_maillock" >&5
98418dba
CW
8331echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6
8332if test $ac_cv_lib_lockfile_maillock = yes; then
925c2f3f 8333 cat >>confdefs.h <<EOF
98418dba 8334#define HAVE_LIBLOCKFILE 1
925c2f3f 8335EOF
98418dba
CW
8336
8337 LIBS="-llockfile $LIBS"
8338
8339fi
8340
8341# If we have the shared liblockfile, assume we must use it for mail
8342# locking (e.g. Debian). If we couldn't link against liblockfile
8343# (no liblockfile.a installed), ensure that we don't need to.
8344if test "$ac_cv_lib_lockfile_maillock" = no; then
8345 # Extract the first word of "liblockfile.so", so it can be a program name with args.
8346set dummy liblockfile.so; ac_word=$2
598a2813 8347echo "$as_me:8346: checking for $ac_word" >&5
98418dba
CW
8348echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8349if test "${ac_cv_prog_liblockfile+set}" = set; then
8350 echo $ECHO_N "(cached) $ECHO_C" >&6
8351else
8352 if test -n "$liblockfile"; then
8353 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
8354else
925c2f3f
EZ
8355 ac_save_IFS=$IFS; IFS=$ac_path_separator
8356ac_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
8357for ac_dir in $ac_dummy; do
8358 IFS=$ac_save_IFS
8359 test -z "$ac_dir" && ac_dir=.
8360 $as_executable_p "$ac_dir/$ac_word" || continue
8361ac_cv_prog_liblockfile="yes"
598a2813 8362echo "$as_me:8361: found $ac_dir/$ac_word" >&5
925c2f3f 8363break
98418dba
CW
8364done
8365
8366 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 8367fi
503d2be0 8368fi
98418dba
CW
8369liblockfile=$ac_cv_prog_liblockfile
8370if test -n "$liblockfile"; then
598a2813 8371 echo "$as_me:8370: result: $liblockfile" >&5
98418dba
CW
8372echo "${ECHO_T}$liblockfile" >&6
8373else
598a2813 8374 echo "$as_me:8373: result: no" >&5
98418dba 8375echo "${ECHO_T}no" >&6
ba4481b5
DL
8376fi
8377
98418dba 8378 if test $ac_cv_prog_liblockfile = yes; then
598a2813 8379 { { echo "$as_me:8378: error: Shared liblockfile found but can't link against it.
98418dba
CW
8380This probably means that movemail could lose mail.
8381There may be a \`development' package to install containing liblockfile." >&5
8382echo "$as_me: error: Shared liblockfile found but can't link against it.
8383This probably means that movemail could lose mail.
8384There may be a \`development' package to install containing liblockfile." >&2;}
8385 { (exit 1); exit 1; }; }
b936fae4 8386 else
925c2f3f 8387cat >>confdefs.h <<\EOF
98418dba 8388#define LIBMAIL -llockfile
925c2f3f 8389EOF
457b792c 8390
98418dba
CW
8391 fi
8392 else :
8393fi
503d2be0 8394
98418dba
CW
8395for ac_func in touchlock
8396do
8397as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
598a2813 8398echo "$as_me:8397: checking for $ac_func" >&5
98418dba
CW
8399echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8400if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 8401 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 8402else
98418dba 8403 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 8404#line 8398 "configure"
457b792c 8405#include "confdefs.h"
98418dba
CW
8406/* System header to define __stub macros and hopefully few prototypes,
8407 which can conflict with char $ac_func (); below. */
8408#include <assert.h>
457b792c 8409/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8410#ifdef __cplusplus
8411extern "C"
8412#endif
457b792c 8413/* We use char because int might match the return type of a gcc2
503d2be0 8414 builtin and then its argument prototype would still apply. */
98418dba
CW
8415char $ac_func ();
8416char (*f) ();
8417
503d2be0
AS
8418int
8419main ()
8420{
98418dba
CW
8421/* The GNU C library defines this for functions which it implements
8422 to always fail with ENOSYS. Some functions are actually named
8423 something starting with __ and the normal name is an alias. */
8424#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8425choke me
8426#else
8427f = $ac_func;
8428#endif
8429
503d2be0
AS
8430 ;
8431 return 0;
8432}
8433_ACEOF
8434rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 8435if { (eval echo "$as_me:8434: \"$ac_link\"") >&5
503d2be0
AS
8436 (eval $ac_link) 2>&5
8437 ac_status=$?
598a2813 8438 echo "$as_me:8437: \$? = $ac_status" >&5
503d2be0
AS
8439 (exit $ac_status); } &&
8440 { ac_try='test -s conftest$ac_exeext'
598a2813 8441 { (eval echo "$as_me:8440: \"$ac_try\"") >&5
503d2be0
AS
8442 (eval $ac_try) 2>&5
8443 ac_status=$?
598a2813 8444 echo "$as_me:8443: \$? = $ac_status" >&5
503d2be0 8445 (exit $ac_status); }; }; then
98418dba 8446 eval "$as_ac_var=yes"
503d2be0
AS
8447else
8448 echo "$as_me: failed program was:" >&5
8449cat conftest.$ac_ext >&5
98418dba 8450eval "$as_ac_var=no"
503d2be0
AS
8451fi
8452rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
503d2be0 8453fi
598a2813 8454echo "$as_me:8453: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
8455echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8456if test `eval echo '${'$as_ac_var'}'` = yes; then
925c2f3f 8457 cat >>confdefs.h <<EOF
98418dba 8458#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
925c2f3f 8459EOF
457b792c 8460
457b792c 8461fi
98418dba 8462done
457b792c 8463
98418dba
CW
8464for ac_header in maillock.h
8465do
8466as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
598a2813 8467echo "$as_me:8466: checking for $ac_header" >&5
98418dba
CW
8468echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8469if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 8470 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8471else
925c2f3f
EZ
8472 cat >conftest.$ac_ext <<_ACEOF
8473#line 8467 "configure"
ba4481b5 8474#include "confdefs.h"
98418dba 8475#include <$ac_header>
503d2be0 8476_ACEOF
598a2813 8477if { (eval echo "$as_me:8476: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 8478 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 8479 ac_status=$?
98418dba
CW
8480 egrep -v '^ *\+' conftest.er1 >conftest.err
8481 rm -f conftest.er1
8482 cat conftest.err >&5
598a2813 8483 echo "$as_me:8482: \$? = $ac_status" >&5
98418dba
CW
8484 (exit $ac_status); } >/dev/null; then
8485 if test -s conftest.err; then
8486 ac_cpp_err=$ac_c_preproc_warn_flag
8487 else
8488 ac_cpp_err=
8489 fi
503d2be0 8490else
98418dba 8491 ac_cpp_err=yes
503d2be0 8492fi
98418dba 8493if test -z "$ac_cpp_err"; then
925c2f3f 8494 eval "$as_ac_Header=yes"
98418dba
CW
8495else
8496 echo "$as_me: failed program was:" >&5
8497 cat conftest.$ac_ext >&5
925c2f3f 8498 eval "$as_ac_Header=no"
503d2be0 8499fi
98418dba 8500rm -f conftest.err conftest.$ac_ext
ba4481b5 8501fi
598a2813 8502echo "$as_me:8501: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 8503echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 8504if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 8505 cat >>confdefs.h <<EOF
98418dba 8506#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 8507EOF
48d4b120 8508
ba4481b5 8509fi
98418dba
CW
8510done
8511
98418dba
CW
8512for ac_func in gethostname getdomainname dup2 \
8513rename closedir mkdir rmdir sysinfo \
8514random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
8515strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
8516utimes setrlimit setpgid getcwd getwd shutdown strftime getaddrinfo \
8517__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
8518sendto recvfrom getsockopt setsockopt getsockname getpeername \
8519gai_strerror mkstemp getline getdelim
8520do
8521as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
598a2813 8522echo "$as_me:8521: checking for $ac_func" >&5
98418dba
CW
8523echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8524if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 8525 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8526else
503d2be0 8527 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 8528#line 8522 "configure"
ba4481b5 8529#include "confdefs.h"
98418dba
CW
8530/* System header to define __stub macros and hopefully few prototypes,
8531 which can conflict with char $ac_func (); below. */
8532#include <assert.h>
ba4481b5 8533/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8534#ifdef __cplusplus
8535extern "C"
8536#endif
ba4481b5 8537/* We use char because int might match the return type of a gcc2
503d2be0 8538 builtin and then its argument prototype would still apply. */
98418dba
CW
8539char $ac_func ();
8540char (*f) ();
8541
503d2be0
AS
8542int
8543main ()
8544{
98418dba
CW
8545/* The GNU C library defines this for functions which it implements
8546 to always fail with ENOSYS. Some functions are actually named
8547 something starting with __ and the normal name is an alias. */
8548#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8549choke me
8550#else
8551f = $ac_func;
8552#endif
8553
503d2be0
AS
8554 ;
8555 return 0;
8556}
8557_ACEOF
8558rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 8559if { (eval echo "$as_me:8558: \"$ac_link\"") >&5
503d2be0
AS
8560 (eval $ac_link) 2>&5
8561 ac_status=$?
598a2813 8562 echo "$as_me:8561: \$? = $ac_status" >&5
503d2be0
AS
8563 (exit $ac_status); } &&
8564 { ac_try='test -s conftest$ac_exeext'
598a2813 8565 { (eval echo "$as_me:8564: \"$ac_try\"") >&5
503d2be0
AS
8566 (eval $ac_try) 2>&5
8567 ac_status=$?
598a2813 8568 echo "$as_me:8567: \$? = $ac_status" >&5
503d2be0 8569 (exit $ac_status); }; }; then
98418dba 8570 eval "$as_ac_var=yes"
503d2be0
AS
8571else
8572 echo "$as_me: failed program was:" >&5
8573cat conftest.$ac_ext >&5
98418dba 8574eval "$as_ac_var=no"
503d2be0
AS
8575fi
8576rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 8577fi
598a2813 8578echo "$as_me:8577: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
8579echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8580if test `eval echo '${'$as_ac_var'}'` = yes; then
925c2f3f 8581 cat >>confdefs.h <<EOF
98418dba 8582#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
925c2f3f 8583EOF
ba4481b5 8584
ba4481b5 8585fi
98418dba 8586done
ba4481b5 8587
98418dba
CW
8588for ac_header in sys/un.h
8589do
8590as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
598a2813 8591echo "$as_me:8590: checking for $ac_header" >&5
98418dba
CW
8592echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8593if eval "test \"\${$as_ac_Header+set}\" = set"; then
8594 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 8595else
925c2f3f
EZ
8596 cat >conftest.$ac_ext <<_ACEOF
8597#line 8591 "configure"
ba4481b5 8598#include "confdefs.h"
98418dba 8599#include <$ac_header>
503d2be0 8600_ACEOF
598a2813 8601if { (eval echo "$as_me:8600: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
8602 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8603 ac_status=$?
8604 egrep -v '^ *\+' conftest.er1 >conftest.err
8605 rm -f conftest.er1
8606 cat conftest.err >&5
598a2813 8607 echo "$as_me:8606: \$? = $ac_status" >&5
503d2be0
AS
8608 (exit $ac_status); } >/dev/null; then
8609 if test -s conftest.err; then
8610 ac_cpp_err=$ac_c_preproc_warn_flag
8611 else
8612 ac_cpp_err=
8613 fi
8614else
8615 ac_cpp_err=yes
8616fi
8617if test -z "$ac_cpp_err"; then
925c2f3f 8618 eval "$as_ac_Header=yes"
ba4481b5 8619else
503d2be0 8620 echo "$as_me: failed program was:" >&5
ba4481b5 8621 cat conftest.$ac_ext >&5
925c2f3f 8622 eval "$as_ac_Header=no"
ba4481b5 8623fi
503d2be0 8624rm -f conftest.err conftest.$ac_ext
ba4481b5 8625fi
598a2813 8626echo "$as_me:8625: result: `eval echo '${'$as_ac_Header'}'`" >&5
925c2f3f
EZ
8627echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8628if test `eval echo '${'$as_ac_Header'}'` = yes; then
8629 cat >>confdefs.h <<EOF
8630#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8631EOF
503d2be0 8632
925c2f3f
EZ
8633fi
8634done
8635
8636for ac_header in sys/time.h unistd.h
8637do
8638as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
598a2813 8639echo "$as_me:8638: checking for $ac_header" >&5
925c2f3f
EZ
8640echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8641if eval "test \"\${$as_ac_Header+set}\" = set"; then
8642 echo $ECHO_N "(cached) $ECHO_C" >&6
8643else
8644 cat >conftest.$ac_ext <<_ACEOF
8645#line 8639 "configure"
ffe36136 8646#include "confdefs.h"
98418dba 8647#include <$ac_header>
503d2be0 8648_ACEOF
598a2813 8649if { (eval echo "$as_me:8648: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
8650 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8651 ac_status=$?
8652 egrep -v '^ *\+' conftest.er1 >conftest.err
8653 rm -f conftest.er1
8654 cat conftest.err >&5
598a2813 8655 echo "$as_me:8654: \$? = $ac_status" >&5
503d2be0
AS
8656 (exit $ac_status); } >/dev/null; then
8657 if test -s conftest.err; then
8658 ac_cpp_err=$ac_c_preproc_warn_flag
8659 else
8660 ac_cpp_err=
8661 fi
8662else
8663 ac_cpp_err=yes
8664fi
8665if test -z "$ac_cpp_err"; then
925c2f3f 8666 eval "$as_ac_Header=yes"
98418dba
CW
8667else
8668 echo "$as_me: failed program was:" >&5
8669 cat conftest.$ac_ext >&5
925c2f3f 8670 eval "$as_ac_Header=no"
98418dba
CW
8671fi
8672rm -f conftest.err conftest.$ac_ext
ffe36136 8673fi
598a2813 8674echo "$as_me:8673: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 8675echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 8676if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 8677 cat >>confdefs.h <<EOF
98418dba 8678#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 8679EOF
98418dba
CW
8680
8681fi
98418dba
CW
8682done
8683
98418dba
CW
8684for ac_func in alarm
8685do
8686as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
598a2813 8687echo "$as_me:8686: checking for $ac_func" >&5
98418dba
CW
8688echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8689if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 8690 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8691else
98418dba 8692 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 8693#line 8687 "configure"
ba4481b5 8694#include "confdefs.h"
98418dba
CW
8695/* System header to define __stub macros and hopefully few prototypes,
8696 which can conflict with char $ac_func (); below. */
8697#include <assert.h>
ba4481b5 8698/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8699#ifdef __cplusplus
8700extern "C"
8701#endif
ba4481b5 8702/* We use char because int might match the return type of a gcc2
503d2be0 8703 builtin and then its argument prototype would still apply. */
98418dba
CW
8704char $ac_func ();
8705char (*f) ();
8706
503d2be0
AS
8707int
8708main ()
8709{
98418dba
CW
8710/* The GNU C library defines this for functions which it implements
8711 to always fail with ENOSYS. Some functions are actually named
8712 something starting with __ and the normal name is an alias. */
8713#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8714choke me
8715#else
8716f = $ac_func;
8717#endif
8718
503d2be0
AS
8719 ;
8720 return 0;
8721}
8722_ACEOF
8723rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 8724if { (eval echo "$as_me:8723: \"$ac_link\"") >&5
503d2be0
AS
8725 (eval $ac_link) 2>&5
8726 ac_status=$?
598a2813 8727 echo "$as_me:8726: \$? = $ac_status" >&5
503d2be0
AS
8728 (exit $ac_status); } &&
8729 { ac_try='test -s conftest$ac_exeext'
598a2813 8730 { (eval echo "$as_me:8729: \"$ac_try\"") >&5
503d2be0
AS
8731 (eval $ac_try) 2>&5
8732 ac_status=$?
598a2813 8733 echo "$as_me:8732: \$? = $ac_status" >&5
503d2be0 8734 (exit $ac_status); }; }; then
98418dba 8735 eval "$as_ac_var=yes"
503d2be0
AS
8736else
8737 echo "$as_me: failed program was:" >&5
8738cat conftest.$ac_ext >&5
98418dba 8739eval "$as_ac_var=no"
503d2be0
AS
8740fi
8741rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ffe36136 8742fi
598a2813 8743echo "$as_me:8742: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
8744echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8745if test `eval echo '${'$as_ac_var'}'` = yes; then
925c2f3f 8746 cat >>confdefs.h <<EOF
98418dba 8747#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
925c2f3f 8748EOF
ffe36136 8749
ba4481b5 8750fi
98418dba 8751done
ba4481b5 8752
598a2813 8753echo "$as_me:8752: checking for working mktime" >&5
98418dba
CW
8754echo $ECHO_N "checking for working mktime... $ECHO_C" >&6
8755if test "${ac_cv_func_working_mktime+set}" = set; then
8756 echo $ECHO_N "(cached) $ECHO_C" >&6
8757else
8758 if test "$cross_compiling" = yes; then
8759 ac_cv_func_working_mktime=no
8760else
8761 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 8762#line 8756 "configure"
98418dba
CW
8763#include "confdefs.h"
8764/* Test program from Paul Eggert and Tony Leneis. */
8765#if TIME_WITH_SYS_TIME
8766# include <sys/time.h>
8767# include <time.h>
8768#else
8769# if HAVE_SYS_TIME_H
8770# include <sys/time.h>
8771# else
8772# include <time.h>
8773# endif
8774#endif
ba4481b5 8775
98418dba
CW
8776#if HAVE_UNISTD_H
8777# include <unistd.h>
8778#endif
ba4481b5 8779
98418dba
CW
8780#if !HAVE_ALARM
8781# define alarm(X) /* empty */
8782#endif
df645f7c 8783
98418dba
CW
8784/* Work around redefinition to rpl_putenv by other config tests. */
8785#undef putenv
df645f7c 8786
98418dba 8787static time_t time_t_max;
df645f7c 8788
98418dba
CW
8789/* Values we'll use to set the TZ environment variable. */
8790static const char *const tz_strings[] = {
8791 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
8792 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
8793};
8794#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 8795
98418dba
CW
8796/* Fail if mktime fails to convert a date in the spring-forward gap.
8797 Based on a problem report from Andreas Jaeger. */
8798static void
8799spring_forward_gap ()
8800{
8801 /* glibc (up to about 1998-10-07) failed this test. */
8802 struct tm tm;
8803
8804 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
8805 instead of "TZ=America/Vancouver" in order to detect the bug even
8806 on systems that don't support the Olson extension, or don't have the
8807 full zoneinfo tables installed. */
8808 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
8809
8810 tm.tm_year = 98;
8811 tm.tm_mon = 3;
8812 tm.tm_mday = 5;
8813 tm.tm_hour = 2;
8814 tm.tm_min = 0;
8815 tm.tm_sec = 0;
8816 tm.tm_isdst = -1;
8817 if (mktime (&tm) == (time_t)-1)
8818 exit (1);
8819}
8820
8821static void
8822mktime_test (now)
8823 time_t now;
8824{
8825 struct tm *lt;
8826 if ((lt = localtime (&now)) && mktime (lt) != now)
8827 exit (1);
8828 now = time_t_max - now;
8829 if ((lt = localtime (&now)) && mktime (lt) != now)
8830 exit (1);
8831}
8832
8833static void
8834irix_6_4_bug ()
8835{
8836 /* Based on code from Ariel Faigon. */
8837 struct tm tm;
8838 tm.tm_year = 96;
8839 tm.tm_mon = 3;
8840 tm.tm_mday = 0;
8841 tm.tm_hour = 0;
8842 tm.tm_min = 0;
8843 tm.tm_sec = 0;
8844 tm.tm_isdst = -1;
8845 mktime (&tm);
8846 if (tm.tm_mon != 2 || tm.tm_mday != 31)
8847 exit (1);
8848}
8849
8850static void
8851bigtime_test (j)
8852 int j;
8853{
8854 struct tm tm;
8855 time_t now;
8856 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
8857 now = mktime (&tm);
8858 if (now != (time_t) -1)
8859 {
8860 struct tm *lt = localtime (&now);
8861 if (! (lt
8862 && lt->tm_year == tm.tm_year
8863 && lt->tm_mon == tm.tm_mon
8864 && lt->tm_mday == tm.tm_mday
8865 && lt->tm_hour == tm.tm_hour
8866 && lt->tm_min == tm.tm_min
8867 && lt->tm_sec == tm.tm_sec
8868 && lt->tm_yday == tm.tm_yday
8869 && lt->tm_wday == tm.tm_wday
8870 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
8871 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
8872 exit (1);
8873 }
8874}
8875
8876int
8877main ()
8878{
8879 time_t t, delta;
8880 int i, j;
8881
8882 /* This test makes some buggy mktime implementations loop.
8883 Give up after 60 seconds; a mktime slower than that
8884 isn't worth using anyway. */
8885 alarm (60);
8886
8887 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
8888 continue;
8889 time_t_max--;
8890 delta = time_t_max / 997; /* a suitable prime number */
8891 for (i = 0; i < N_STRINGS; i++)
8892 {
8893 if (tz_strings[i])
8894 putenv (tz_strings[i]);
503d2be0 8895
98418dba
CW
8896 for (t = 0; t <= time_t_max - delta; t += delta)
8897 mktime_test (t);
8898 mktime_test ((time_t) 60 * 60);
8899 mktime_test ((time_t) 60 * 60 * 24);
8900
8901 for (j = 1; 0 < j; j *= 2)
8902 bigtime_test (j);
8903 bigtime_test (j - 1);
8904 }
8905 irix_6_4_bug ();
8906 spring_forward_gap ();
8907 exit (0);
503d2be0
AS
8908}
8909_ACEOF
98418dba 8910rm -f conftest$ac_exeext
598a2813 8911if { (eval echo "$as_me:8910: \"$ac_link\"") >&5
503d2be0
AS
8912 (eval $ac_link) 2>&5
8913 ac_status=$?
598a2813 8914 echo "$as_me:8913: \$? = $ac_status" >&5
98418dba 8915 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
598a2813 8916 { (eval echo "$as_me:8915: \"$ac_try\"") >&5
503d2be0
AS
8917 (eval $ac_try) 2>&5
8918 ac_status=$?
598a2813 8919 echo "$as_me:8918: \$? = $ac_status" >&5
503d2be0 8920 (exit $ac_status); }; }; then
98418dba 8921 ac_cv_func_working_mktime=yes
503d2be0 8922else
98418dba
CW
8923 echo "$as_me: program exited with status $ac_status" >&5
8924echo "$as_me: failed program was:" >&5
503d2be0 8925cat conftest.$ac_ext >&5
98418dba 8926ac_cv_func_working_mktime=no
503d2be0 8927fi
98418dba 8928rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 8929fi
ba4481b5 8930fi
598a2813 8931echo "$as_me:8930: result: $ac_cv_func_working_mktime" >&5
98418dba
CW
8932echo "${ECHO_T}$ac_cv_func_working_mktime" >&6
8933if test $ac_cv_func_working_mktime = no; then
8934 LIBOBJS="$LIBOBJS mktime.$ac_objext"
ba4481b5
DL
8935fi
8936
98418dba 8937if test "$ac_cv_func_working_mktime" = no; then
b936fae4 8938
925c2f3f 8939cat >>confdefs.h <<\EOF
98418dba 8940#define BROKEN_MKTIME 1
925c2f3f 8941EOF
ba4481b5 8942
ba4481b5 8943fi
503d2be0 8944
98418dba
CW
8945ac_have_func=no # yes means we've found a way to get the load average.
8946
8947ac_save_LIBS=$LIBS
8948
8949# Check for getloadavg, but be sure not to touch the cache variable.
598a2813 8950(echo "$as_me:8949: checking for getloadavg" >&5
98418dba
CW
8951echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6
8952if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 8953 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8954else
503d2be0 8955 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 8956#line 8950 "configure"
ba4481b5 8957#include "confdefs.h"
98418dba
CW
8958/* System header to define __stub macros and hopefully few prototypes,
8959 which can conflict with char getloadavg (); below. */
8960#include <assert.h>
ba4481b5 8961/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8962#ifdef __cplusplus
8963extern "C"
8964#endif
ba4481b5 8965/* We use char because int might match the return type of a gcc2
503d2be0 8966 builtin and then its argument prototype would still apply. */
98418dba
CW
8967char getloadavg ();
8968char (*f) ();
8969
503d2be0
AS
8970int
8971main ()
8972{
98418dba
CW
8973/* The GNU C library defines this for functions which it implements
8974 to always fail with ENOSYS. Some functions are actually named
8975 something starting with __ and the normal name is an alias. */
8976#if defined (__stub_getloadavg) || defined (__stub___getloadavg)
8977choke me
8978#else
8979f = getloadavg;
8980#endif
8981
503d2be0
AS
8982 ;
8983 return 0;
8984}
8985_ACEOF
8986rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 8987if { (eval echo "$as_me:8986: \"$ac_link\"") >&5
503d2be0
AS
8988 (eval $ac_link) 2>&5
8989 ac_status=$?
598a2813 8990 echo "$as_me:8989: \$? = $ac_status" >&5
503d2be0
AS
8991 (exit $ac_status); } &&
8992 { ac_try='test -s conftest$ac_exeext'
598a2813 8993 { (eval echo "$as_me:8992: \"$ac_try\"") >&5
503d2be0
AS
8994 (eval $ac_try) 2>&5
8995 ac_status=$?
598a2813 8996 echo "$as_me:8995: \$? = $ac_status" >&5
503d2be0 8997 (exit $ac_status); }; }; then
98418dba 8998 ac_cv_func_getloadavg=yes
503d2be0
AS
8999else
9000 echo "$as_me: failed program was:" >&5
9001cat conftest.$ac_ext >&5
98418dba 9002ac_cv_func_getloadavg=no
503d2be0
AS
9003fi
9004rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 9005fi
598a2813 9006echo "$as_me:9005: result: $ac_cv_func_getloadavg" >&5
98418dba
CW
9007echo "${ECHO_T}$ac_cv_func_getloadavg" >&6
9008if test $ac_cv_func_getloadavg = yes; then
9009 exit 0
9010else
9011 exit 1
ba4481b5 9012fi
98418dba 9013) && ac_have_func=yes
ba4481b5 9014
98418dba 9015# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 9016
98418dba
CW
9017for ac_func in pstat_getdynamic
9018do
9019as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
598a2813 9020echo "$as_me:9019: checking for $ac_func" >&5
98418dba
CW
9021echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9022if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 9023 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9024else
503d2be0 9025 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 9026#line 9020 "configure"
ba4481b5 9027#include "confdefs.h"
98418dba
CW
9028/* System header to define __stub macros and hopefully few prototypes,
9029 which can conflict with char $ac_func (); below. */
9030#include <assert.h>
ba4481b5 9031/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9032#ifdef __cplusplus
9033extern "C"
9034#endif
ba4481b5 9035/* We use char because int might match the return type of a gcc2
503d2be0 9036 builtin and then its argument prototype would still apply. */
98418dba
CW
9037char $ac_func ();
9038char (*f) ();
9039
503d2be0
AS
9040int
9041main ()
9042{
98418dba
CW
9043/* The GNU C library defines this for functions which it implements
9044 to always fail with ENOSYS. Some functions are actually named
9045 something starting with __ and the normal name is an alias. */
9046#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9047choke me
9048#else
9049f = $ac_func;
9050#endif
9051
9052 ;
9053 return 0;
9054}
f21fadcc 9055_ACEOF
98418dba 9056rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 9057if { (eval echo "$as_me:9056: \"$ac_link\"") >&5
98418dba 9058 (eval $ac_link) 2>&5
f21fadcc 9059 ac_status=$?
598a2813 9060 echo "$as_me:9059: \$? = $ac_status" >&5
98418dba
CW
9061 (exit $ac_status); } &&
9062 { ac_try='test -s conftest$ac_exeext'
598a2813 9063 { (eval echo "$as_me:9062: \"$ac_try\"") >&5
98418dba
CW
9064 (eval $ac_try) 2>&5
9065 ac_status=$?
598a2813 9066 echo "$as_me:9065: \$? = $ac_status" >&5
98418dba
CW
9067 (exit $ac_status); }; }; then
9068 eval "$as_ac_var=yes"
f21fadcc
JD
9069else
9070 echo "$as_me: failed program was:" >&5
98418dba
CW
9071cat conftest.$ac_ext >&5
9072eval "$as_ac_var=no"
f21fadcc 9073fi
98418dba 9074rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
f21fadcc 9075fi
598a2813 9076echo "$as_me:9075: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
9077echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9078if test `eval echo '${'$as_ac_var'}'` = yes; then
925c2f3f 9079 cat >>confdefs.h <<EOF
98418dba 9080#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
925c2f3f 9081EOF
98418dba
CW
9082
9083fi
9084done
9085
98418dba
CW
9086# Solaris has libkstat which does not require root.
9087
598a2813 9088echo "$as_me:9087: checking for kstat_open in -lkstat" >&5
98418dba
CW
9089echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
9090if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
9091 echo $ECHO_N "(cached) $ECHO_C" >&6
9092else
9093 ac_check_lib_save_LIBS=$LIBS
98418dba 9094LIBS="-lkstat $LIBS"
f21fadcc 9095cat >conftest.$ac_ext <<_ACEOF
925c2f3f 9096#line 9090 "configure"
f21fadcc
JD
9097#include "confdefs.h"
9098
9099/* Override any gcc2 internal prototype to avoid an error. */
9100#ifdef __cplusplus
9101extern "C"
9102#endif
9103/* We use char because int might match the return type of a gcc2
9104 builtin and then its argument prototype would still apply. */
98418dba 9105char kstat_open ();
f21fadcc
JD
9106int
9107main ()
9108{
98418dba 9109kstat_open ();
f21fadcc
JD
9110 ;
9111 return 0;
9112}
9113_ACEOF
9114rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 9115if { (eval echo "$as_me:9114: \"$ac_link\"") >&5
f21fadcc
JD
9116 (eval $ac_link) 2>&5
9117 ac_status=$?
598a2813 9118 echo "$as_me:9117: \$? = $ac_status" >&5
f21fadcc
JD
9119 (exit $ac_status); } &&
9120 { ac_try='test -s conftest$ac_exeext'
598a2813 9121 { (eval echo "$as_me:9120: \"$ac_try\"") >&5
f21fadcc
JD
9122 (eval $ac_try) 2>&5
9123 ac_status=$?
598a2813 9124 echo "$as_me:9123: \$? = $ac_status" >&5
f21fadcc 9125 (exit $ac_status); }; }; then
98418dba 9126 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
9127else
9128 echo "$as_me: failed program was:" >&5
9129cat conftest.$ac_ext >&5
98418dba 9130ac_cv_lib_kstat_kstat_open=no
f21fadcc
JD
9131fi
9132rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9133LIBS=$ac_check_lib_save_LIBS
9134fi
598a2813 9135echo "$as_me:9134: result: $ac_cv_lib_kstat_kstat_open" >&5
98418dba
CW
9136echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6
9137if test $ac_cv_lib_kstat_kstat_open = yes; then
925c2f3f 9138 cat >>confdefs.h <<EOF
98418dba 9139#define HAVE_LIBKSTAT 1
925c2f3f 9140EOF
f21fadcc 9141
98418dba 9142 LIBS="-lkstat $LIBS"
f21fadcc 9143
f21fadcc
JD
9144fi
9145
98418dba
CW
9146test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
9147
9148# Some systems with -lutil have (and need) -lkvm as well, some do not.
9149# On Solaris, -lkvm requires nlist from -lelf, so check that first
9150# to get the right answer into the cache.
9151# For kstat on solaris, we need libelf to force the definition of SVR4 below.
9152if test $ac_have_func = no; then
598a2813 9153 echo "$as_me:9152: checking for elf_begin in -lelf" >&5
98418dba
CW
9154echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
9155if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 9156 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9157else
98418dba
CW
9158 ac_check_lib_save_LIBS=$LIBS
9159LIBS="-lelf $LIBS"
9160cat >conftest.$ac_ext <<_ACEOF
925c2f3f 9161#line 9155 "configure"
ba4481b5 9162#include "confdefs.h"
98418dba
CW
9163
9164/* Override any gcc2 internal prototype to avoid an error. */
9165#ifdef __cplusplus
9166extern "C"
9167#endif
9168/* We use char because int might match the return type of a gcc2
9169 builtin and then its argument prototype would still apply. */
9170char elf_begin ();
503d2be0
AS
9171int
9172main ()
9173{
98418dba 9174elf_begin ();
503d2be0
AS
9175 ;
9176 return 0;
9177}
9178_ACEOF
9179rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 9180if { (eval echo "$as_me:9179: \"$ac_link\"") >&5
503d2be0
AS
9181 (eval $ac_link) 2>&5
9182 ac_status=$?
598a2813 9183 echo "$as_me:9182: \$? = $ac_status" >&5
503d2be0
AS
9184 (exit $ac_status); } &&
9185 { ac_try='test -s conftest$ac_exeext'
598a2813 9186 { (eval echo "$as_me:9185: \"$ac_try\"") >&5
503d2be0
AS
9187 (eval $ac_try) 2>&5
9188 ac_status=$?
598a2813 9189 echo "$as_me:9188: \$? = $ac_status" >&5
503d2be0 9190 (exit $ac_status); }; }; then
98418dba 9191 ac_cv_lib_elf_elf_begin=yes
ba4481b5 9192else
503d2be0
AS
9193 echo "$as_me: failed program was:" >&5
9194cat conftest.$ac_ext >&5
98418dba 9195ac_cv_lib_elf_elf_begin=no
ba4481b5 9196fi
503d2be0 9197rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 9198LIBS=$ac_check_lib_save_LIBS
ba4481b5 9199fi
598a2813 9200echo "$as_me:9199: result: $ac_cv_lib_elf_elf_begin" >&5
98418dba
CW
9201echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
9202if test $ac_cv_lib_elf_elf_begin = yes; then
9203 LIBS="-lelf $LIBS"
ba4481b5
DL
9204fi
9205
98418dba
CW
9206fi
9207if test $ac_have_func = no; then
598a2813 9208 echo "$as_me:9207: checking for kvm_open in -lkvm" >&5
98418dba
CW
9209echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6
9210if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 9211 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9212else
98418dba
CW
9213 ac_check_lib_save_LIBS=$LIBS
9214LIBS="-lkvm $LIBS"
9215cat >conftest.$ac_ext <<_ACEOF
925c2f3f 9216#line 9210 "configure"
ba4481b5 9217#include "confdefs.h"
98418dba
CW
9218
9219/* Override any gcc2 internal prototype to avoid an error. */
9220#ifdef __cplusplus
9221extern "C"
9222#endif
9223/* We use char because int might match the return type of a gcc2
9224 builtin and then its argument prototype would still apply. */
9225char kvm_open ();
503d2be0
AS
9226int
9227main ()
9228{
98418dba 9229kvm_open ();
503d2be0
AS
9230 ;
9231 return 0;
9232}
9233_ACEOF
9234rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 9235if { (eval echo "$as_me:9234: \"$ac_link\"") >&5
503d2be0
AS
9236 (eval $ac_link) 2>&5
9237 ac_status=$?
598a2813 9238 echo "$as_me:9237: \$? = $ac_status" >&5
503d2be0
AS
9239 (exit $ac_status); } &&
9240 { ac_try='test -s conftest$ac_exeext'
598a2813 9241 { (eval echo "$as_me:9240: \"$ac_try\"") >&5
503d2be0
AS
9242 (eval $ac_try) 2>&5
9243 ac_status=$?
598a2813 9244 echo "$as_me:9243: \$? = $ac_status" >&5
503d2be0 9245 (exit $ac_status); }; }; then
98418dba 9246 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
9247else
9248 echo "$as_me: failed program was:" >&5
9249cat conftest.$ac_ext >&5
98418dba 9250ac_cv_lib_kvm_kvm_open=no
503d2be0
AS
9251fi
9252rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 9253LIBS=$ac_check_lib_save_LIBS
503d2be0 9254fi
598a2813 9255echo "$as_me:9254: result: $ac_cv_lib_kvm_kvm_open" >&5
98418dba
CW
9256echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6
9257if test $ac_cv_lib_kvm_kvm_open = yes; then
9258 LIBS="-lkvm $LIBS"
ba4481b5
DL
9259fi
9260
98418dba 9261 # Check for the 4.4BSD definition of getloadavg.
598a2813 9262 echo "$as_me:9261: checking for getloadavg in -lutil" >&5
98418dba
CW
9263echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6
9264if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 9265 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9266else
98418dba
CW
9267 ac_check_lib_save_LIBS=$LIBS
9268LIBS="-lutil $LIBS"
9269cat >conftest.$ac_ext <<_ACEOF
925c2f3f 9270#line 9264 "configure"
ba4481b5 9271#include "confdefs.h"
98418dba
CW
9272
9273/* Override any gcc2 internal prototype to avoid an error. */
9274#ifdef __cplusplus
9275extern "C"
9276#endif
9277/* We use char because int might match the return type of a gcc2
9278 builtin and then its argument prototype would still apply. */
9279char getloadavg ();
503d2be0
AS
9280int
9281main ()
9282{
98418dba 9283getloadavg ();
503d2be0
AS
9284 ;
9285 return 0;
9286}
9287_ACEOF
9288rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 9289if { (eval echo "$as_me:9288: \"$ac_link\"") >&5
503d2be0
AS
9290 (eval $ac_link) 2>&5
9291 ac_status=$?
598a2813 9292 echo "$as_me:9291: \$? = $ac_status" >&5
503d2be0
AS
9293 (exit $ac_status); } &&
9294 { ac_try='test -s conftest$ac_exeext'
598a2813 9295 { (eval echo "$as_me:9294: \"$ac_try\"") >&5
503d2be0
AS
9296 (eval $ac_try) 2>&5
9297 ac_status=$?
598a2813 9298 echo "$as_me:9297: \$? = $ac_status" >&5
503d2be0 9299 (exit $ac_status); }; }; then
98418dba 9300 ac_cv_lib_util_getloadavg=yes
ba4481b5 9301else
503d2be0
AS
9302 echo "$as_me: failed program was:" >&5
9303cat conftest.$ac_ext >&5
98418dba 9304ac_cv_lib_util_getloadavg=no
ba4481b5 9305fi
503d2be0 9306rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9307LIBS=$ac_check_lib_save_LIBS
9308fi
598a2813 9309echo "$as_me:9308: result: $ac_cv_lib_util_getloadavg" >&5
98418dba
CW
9310echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6
9311if test $ac_cv_lib_util_getloadavg = yes; then
9312 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 9313fi
503d2be0 9314
98418dba 9315fi
ba4481b5 9316
98418dba
CW
9317if test $ac_have_func = no; then
9318 # There is a commonly available library for RS/6000 AIX.
9319 # Since it is not a standard part of AIX, it might be installed locally.
9320 ac_getloadavg_LIBS=$LIBS
9321 LIBS="-L/usr/local/lib $LIBS"
598a2813 9322 echo "$as_me:9321: checking for getloadavg in -lgetloadavg" >&5
98418dba
CW
9323echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6
9324if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 9325 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9326else
98418dba
CW
9327 ac_check_lib_save_LIBS=$LIBS
9328LIBS="-lgetloadavg $LIBS"
9329cat >conftest.$ac_ext <<_ACEOF
925c2f3f 9330#line 9324 "configure"
ba4481b5 9331#include "confdefs.h"
ba4481b5 9332
98418dba
CW
9333/* Override any gcc2 internal prototype to avoid an error. */
9334#ifdef __cplusplus
9335extern "C"
9336#endif
9337/* We use char because int might match the return type of a gcc2
9338 builtin and then its argument prototype would still apply. */
9339char getloadavg ();
98418dba
CW
9340int
9341main ()
9342{
9343getloadavg ();
9344 ;
9345 return 0;
9346}
503d2be0 9347_ACEOF
98418dba 9348rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 9349if { (eval echo "$as_me:9348: \"$ac_link\"") >&5
98418dba
CW
9350 (eval $ac_link) 2>&5
9351 ac_status=$?
598a2813 9352 echo "$as_me:9351: \$? = $ac_status" >&5
98418dba
CW
9353 (exit $ac_status); } &&
9354 { ac_try='test -s conftest$ac_exeext'
598a2813 9355 { (eval echo "$as_me:9354: \"$ac_try\"") >&5
98418dba
CW
9356 (eval $ac_try) 2>&5
9357 ac_status=$?
598a2813 9358 echo "$as_me:9357: \$? = $ac_status" >&5
98418dba
CW
9359 (exit $ac_status); }; }; then
9360 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 9361else
98418dba
CW
9362 echo "$as_me: failed program was:" >&5
9363cat conftest.$ac_ext >&5
9364ac_cv_lib_getloadavg_getloadavg=no
9365fi
9366rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9367LIBS=$ac_check_lib_save_LIBS
9368fi
598a2813 9369echo "$as_me:9368: result: $ac_cv_lib_getloadavg_getloadavg" >&5
98418dba
CW
9370echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6
9371if test $ac_cv_lib_getloadavg_getloadavg = yes; then
9372 LIBS="-lgetloadavg $LIBS"
9373else
9374 LIBS=$ac_getloadavg_LIBS
ba4481b5 9375fi
ba4481b5
DL
9376
9377fi
98418dba
CW
9378
9379# Make sure it is really in the library, if we think we found it,
9380# otherwise set up the replacement function.
9381
9382for ac_func in getloadavg
9383do
9384as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
598a2813 9385echo "$as_me:9384: checking for $ac_func" >&5
503d2be0
AS
9386echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9387if eval "test \"\${$as_ac_var+set}\" = set"; then
9388 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9389else
503d2be0 9390 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 9391#line 9385 "configure"
ba4481b5
DL
9392#include "confdefs.h"
9393/* System header to define __stub macros and hopefully few prototypes,
503d2be0 9394 which can conflict with char $ac_func (); below. */
ba4481b5
DL
9395#include <assert.h>
9396/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9397#ifdef __cplusplus
9398extern "C"
9399#endif
ba4481b5 9400/* We use char because int might match the return type of a gcc2
503d2be0
AS
9401 builtin and then its argument prototype would still apply. */
9402char $ac_func ();
9403char (*f) ();
ba4481b5 9404
503d2be0
AS
9405int
9406main ()
9407{
ba4481b5
DL
9408/* The GNU C library defines this for functions which it implements
9409 to always fail with ENOSYS. Some functions are actually named
9410 something starting with __ and the normal name is an alias. */
9411#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9412choke me
9413#else
503d2be0 9414f = $ac_func;
ba4481b5
DL
9415#endif
9416
503d2be0
AS
9417 ;
9418 return 0;
9419}
9420_ACEOF
9421rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 9422if { (eval echo "$as_me:9421: \"$ac_link\"") >&5
503d2be0
AS
9423 (eval $ac_link) 2>&5
9424 ac_status=$?
598a2813 9425 echo "$as_me:9424: \$? = $ac_status" >&5
503d2be0
AS
9426 (exit $ac_status); } &&
9427 { ac_try='test -s conftest$ac_exeext'
598a2813 9428 { (eval echo "$as_me:9427: \"$ac_try\"") >&5
503d2be0
AS
9429 (eval $ac_try) 2>&5
9430 ac_status=$?
598a2813 9431 echo "$as_me:9430: \$? = $ac_status" >&5
503d2be0
AS
9432 (exit $ac_status); }; }; then
9433 eval "$as_ac_var=yes"
9434else
9435 echo "$as_me: failed program was:" >&5
9436cat conftest.$ac_ext >&5
9437eval "$as_ac_var=no"
9438fi
9439rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9440fi
598a2813 9441echo "$as_me:9440: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
9442echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9443if test `eval echo '${'$as_ac_var'}'` = yes; then
925c2f3f 9444 cat >>confdefs.h <<EOF
98418dba 9445#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
925c2f3f 9446EOF
503d2be0 9447
98418dba
CW
9448else
9449 LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
ba4481b5 9450
925c2f3f 9451cat >>confdefs.h <<\EOF
98418dba 9452#define C_GETLOADAVG 1
925c2f3f 9453EOF
ba4481b5 9454
98418dba
CW
9455# Figure out what our getloadavg.c needs.
9456ac_have_func=no
598a2813 9457echo "$as_me:9456: checking for sys/dg_sys_info.h" >&5
98418dba
CW
9458echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
9459if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 9460 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9461else
925c2f3f
EZ
9462 cat >conftest.$ac_ext <<_ACEOF
9463#line 9457 "configure"
98418dba
CW
9464#include "confdefs.h"
9465#include <sys/dg_sys_info.h>
9466_ACEOF
598a2813 9467if { (eval echo "$as_me:9466: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
9468 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9469 ac_status=$?
9470 egrep -v '^ *\+' conftest.er1 >conftest.err
9471 rm -f conftest.er1
9472 cat conftest.err >&5
598a2813 9473 echo "$as_me:9472: \$? = $ac_status" >&5
98418dba
CW
9474 (exit $ac_status); } >/dev/null; then
9475 if test -s conftest.err; then
9476 ac_cpp_err=$ac_c_preproc_warn_flag
9477 else
9478 ac_cpp_err=
9479 fi
9480else
9481 ac_cpp_err=yes
ba4481b5 9482fi
98418dba 9483if test -z "$ac_cpp_err"; then
925c2f3f 9484 ac_cv_header_sys_dg_sys_info_h=yes
98418dba
CW
9485else
9486 echo "$as_me: failed program was:" >&5
9487 cat conftest.$ac_ext >&5
925c2f3f 9488 ac_cv_header_sys_dg_sys_info_h=no
ba4481b5 9489fi
98418dba 9490rm -f conftest.err conftest.$ac_ext
98418dba 9491fi
598a2813 9492echo "$as_me:9491: result: $ac_cv_header_sys_dg_sys_info_h" >&5
98418dba 9493echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
98418dba
CW
9494if test $ac_cv_header_sys_dg_sys_info_h = yes; then
9495 ac_have_func=yes
ba4481b5 9496
925c2f3f 9497cat >>confdefs.h <<\EOF
98418dba 9498#define DGUX 1
925c2f3f 9499EOF
503d2be0 9500
598a2813 9501echo "$as_me:9500: checking for dg_sys_info in -ldgc" >&5
98418dba
CW
9502echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6
9503if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 9504 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9505else
503d2be0 9506 ac_check_lib_save_LIBS=$LIBS
98418dba 9507LIBS="-ldgc $LIBS"
503d2be0 9508cat >conftest.$ac_ext <<_ACEOF
925c2f3f 9509#line 9503 "configure"
ba4481b5 9510#include "confdefs.h"
503d2be0 9511
ba4481b5 9512/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9513#ifdef __cplusplus
9514extern "C"
9515#endif
ba4481b5 9516/* We use char because int might match the return type of a gcc2
503d2be0 9517 builtin and then its argument prototype would still apply. */
98418dba 9518char dg_sys_info ();
503d2be0
AS
9519int
9520main ()
9521{
98418dba 9522dg_sys_info ();
503d2be0
AS
9523 ;
9524 return 0;
9525}
9526_ACEOF
9527rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 9528if { (eval echo "$as_me:9527: \"$ac_link\"") >&5
503d2be0
AS
9529 (eval $ac_link) 2>&5
9530 ac_status=$?
598a2813 9531 echo "$as_me:9530: \$? = $ac_status" >&5
503d2be0
AS
9532 (exit $ac_status); } &&
9533 { ac_try='test -s conftest$ac_exeext'
598a2813 9534 { (eval echo "$as_me:9533: \"$ac_try\"") >&5
503d2be0
AS
9535 (eval $ac_try) 2>&5
9536 ac_status=$?
598a2813 9537 echo "$as_me:9536: \$? = $ac_status" >&5
503d2be0 9538 (exit $ac_status); }; }; then
98418dba 9539 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
9540else
9541 echo "$as_me: failed program was:" >&5
9542cat conftest.$ac_ext >&5
98418dba 9543ac_cv_lib_dgc_dg_sys_info=no
503d2be0
AS
9544fi
9545rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9546LIBS=$ac_check_lib_save_LIBS
9547fi
598a2813 9548echo "$as_me:9547: result: $ac_cv_lib_dgc_dg_sys_info" >&5
98418dba
CW
9549echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6
9550if test $ac_cv_lib_dgc_dg_sys_info = yes; then
925c2f3f 9551 cat >>confdefs.h <<EOF
98418dba 9552#define HAVE_LIBDGC 1
925c2f3f 9553EOF
ba4481b5 9554
98418dba 9555 LIBS="-ldgc $LIBS"
ba4481b5 9556
ba4481b5
DL
9557fi
9558
98418dba 9559fi
503d2be0 9560
598a2813 9561echo "$as_me:9560: checking for locale.h" >&5
98418dba
CW
9562echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
9563if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 9564 echo $ECHO_N "(cached) $ECHO_C" >&6
503d2be0 9565else
925c2f3f
EZ
9566 cat >conftest.$ac_ext <<_ACEOF
9567#line 9561 "configure"
ba4481b5 9568#include "confdefs.h"
98418dba 9569#include <locale.h>
503d2be0 9570_ACEOF
598a2813 9571if { (eval echo "$as_me:9570: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 9572 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 9573 ac_status=$?
98418dba
CW
9574 egrep -v '^ *\+' conftest.er1 >conftest.err
9575 rm -f conftest.er1
9576 cat conftest.err >&5
598a2813 9577 echo "$as_me:9576: \$? = $ac_status" >&5
98418dba
CW
9578 (exit $ac_status); } >/dev/null; then
9579 if test -s conftest.err; then
9580 ac_cpp_err=$ac_c_preproc_warn_flag
9581 else
9582 ac_cpp_err=
9583 fi
503d2be0 9584else
98418dba 9585 ac_cpp_err=yes
503d2be0 9586fi
98418dba 9587if test -z "$ac_cpp_err"; then
925c2f3f 9588 ac_cv_header_locale_h=yes
98418dba
CW
9589else
9590 echo "$as_me: failed program was:" >&5
9591 cat conftest.$ac_ext >&5
925c2f3f 9592 ac_cv_header_locale_h=no
ba4481b5 9593fi
98418dba 9594rm -f conftest.err conftest.$ac_ext
ba4481b5 9595fi
598a2813 9596echo "$as_me:9595: result: $ac_cv_header_locale_h" >&5
98418dba
CW
9597echo "${ECHO_T}$ac_cv_header_locale_h" >&6
9598
98418dba 9599for ac_func in setlocale
ba4481b5 9600do
503d2be0 9601as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
598a2813 9602echo "$as_me:9601: checking for $ac_func" >&5
503d2be0
AS
9603echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9604if eval "test \"\${$as_ac_var+set}\" = set"; then
9605 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9606else
503d2be0 9607 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 9608#line 9602 "configure"
ba4481b5
DL
9609#include "confdefs.h"
9610/* System header to define __stub macros and hopefully few prototypes,
503d2be0 9611 which can conflict with char $ac_func (); below. */
ba4481b5
DL
9612#include <assert.h>
9613/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9614#ifdef __cplusplus
9615extern "C"
9616#endif
ba4481b5 9617/* We use char because int might match the return type of a gcc2
503d2be0
AS
9618 builtin and then its argument prototype would still apply. */
9619char $ac_func ();
9620char (*f) ();
ba4481b5 9621
503d2be0
AS
9622int
9623main ()
9624{
ba4481b5
DL
9625/* The GNU C library defines this for functions which it implements
9626 to always fail with ENOSYS. Some functions are actually named
9627 something starting with __ and the normal name is an alias. */
9628#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9629choke me
9630#else
503d2be0 9631f = $ac_func;
ba4481b5
DL
9632#endif
9633
503d2be0
AS
9634 ;
9635 return 0;
9636}
9637_ACEOF
9638rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 9639if { (eval echo "$as_me:9638: \"$ac_link\"") >&5
503d2be0
AS
9640 (eval $ac_link) 2>&5
9641 ac_status=$?
598a2813 9642 echo "$as_me:9641: \$? = $ac_status" >&5
503d2be0
AS
9643 (exit $ac_status); } &&
9644 { ac_try='test -s conftest$ac_exeext'
598a2813 9645 { (eval echo "$as_me:9644: \"$ac_try\"") >&5
503d2be0
AS
9646 (eval $ac_try) 2>&5
9647 ac_status=$?
598a2813 9648 echo "$as_me:9647: \$? = $ac_status" >&5
503d2be0
AS
9649 (exit $ac_status); }; }; then
9650 eval "$as_ac_var=yes"
9651else
9652 echo "$as_me: failed program was:" >&5
9653cat conftest.$ac_ext >&5
9654eval "$as_ac_var=no"
9655fi
9656rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9657fi
598a2813 9658echo "$as_me:9657: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
9659echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9660if test `eval echo '${'$as_ac_var'}'` = yes; then
925c2f3f 9661 cat >>confdefs.h <<EOF
503d2be0 9662#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
925c2f3f 9663EOF
ba4481b5 9664
ba4481b5
DL
9665fi
9666done
9667
98418dba
CW
9668# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
9669# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
9670# Irix 4.0.5F has the header but not the library.
9671if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
9672 ac_have_func=yes
9673
925c2f3f 9674cat >>confdefs.h <<\EOF
98418dba 9675#define SVR4 1
925c2f3f 9676EOF
98418dba
CW
9677
9678fi
9679
9680if test $ac_have_func = no; then
598a2813 9681 echo "$as_me:9680: checking for inq_stats/cpustats.h" >&5
98418dba
CW
9682echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
9683if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 9684 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 9685else
925c2f3f
EZ
9686 cat >conftest.$ac_ext <<_ACEOF
9687#line 9681 "configure"
98418dba
CW
9688#include "confdefs.h"
9689#include <inq_stats/cpustats.h>
503d2be0 9690_ACEOF
598a2813 9691if { (eval echo "$as_me:9690: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9692 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9693 ac_status=$?
9694 egrep -v '^ *\+' conftest.er1 >conftest.err
9695 rm -f conftest.er1
9696 cat conftest.err >&5
598a2813 9697 echo "$as_me:9696: \$? = $ac_status" >&5
503d2be0
AS
9698 (exit $ac_status); } >/dev/null; then
9699 if test -s conftest.err; then
9700 ac_cpp_err=$ac_c_preproc_warn_flag
9701 else
9702 ac_cpp_err=
9703 fi
9704else
9705 ac_cpp_err=yes
9706fi
9707if test -z "$ac_cpp_err"; then
925c2f3f 9708 ac_cv_header_inq_stats_cpustats_h=yes
503d2be0
AS
9709else
9710 echo "$as_me: failed program was:" >&5
ba4481b5 9711 cat conftest.$ac_ext >&5
925c2f3f 9712 ac_cv_header_inq_stats_cpustats_h=no
ba4481b5 9713fi
503d2be0 9714rm -f conftest.err conftest.$ac_ext
ba4481b5 9715fi
598a2813 9716echo "$as_me:9715: result: $ac_cv_header_inq_stats_cpustats_h" >&5
98418dba 9717echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
98418dba
CW
9718if test $ac_cv_header_inq_stats_cpustats_h = yes; then
9719 ac_have_func=yes
ba4481b5 9720
925c2f3f 9721cat >>confdefs.h <<\EOF
98418dba 9722#define UMAX 1
925c2f3f 9723EOF
98418dba 9724
925c2f3f 9725cat >>confdefs.h <<\EOF
98418dba 9726#define UMAX4_3 1
925c2f3f 9727EOF
98418dba
CW
9728
9729fi
9730
98418dba
CW
9731fi
9732
9733if test $ac_have_func = no; then
598a2813 9734 echo "$as_me:9733: checking for sys/cpustats.h" >&5
98418dba
CW
9735echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
9736if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 9737 echo $ECHO_N "(cached) $ECHO_C" >&6
503d2be0 9738else
925c2f3f
EZ
9739 cat >conftest.$ac_ext <<_ACEOF
9740#line 9734 "configure"
98418dba
CW
9741#include "confdefs.h"
9742#include <sys/cpustats.h>
9743_ACEOF
598a2813 9744if { (eval echo "$as_me:9743: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
9745 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9746 ac_status=$?
9747 egrep -v '^ *\+' conftest.er1 >conftest.err
9748 rm -f conftest.er1
9749 cat conftest.err >&5
598a2813 9750 echo "$as_me:9749: \$? = $ac_status" >&5
98418dba
CW
9751 (exit $ac_status); } >/dev/null; then
9752 if test -s conftest.err; then
9753 ac_cpp_err=$ac_c_preproc_warn_flag
9754 else
9755 ac_cpp_err=
9756 fi
9757else
9758 ac_cpp_err=yes
503d2be0 9759fi
98418dba 9760if test -z "$ac_cpp_err"; then
925c2f3f 9761 ac_cv_header_sys_cpustats_h=yes
98418dba
CW
9762else
9763 echo "$as_me: failed program was:" >&5
9764 cat conftest.$ac_ext >&5
925c2f3f 9765 ac_cv_header_sys_cpustats_h=no
98418dba
CW
9766fi
9767rm -f conftest.err conftest.$ac_ext
98418dba 9768fi
598a2813 9769echo "$as_me:9768: result: $ac_cv_header_sys_cpustats_h" >&5
98418dba 9770echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
98418dba 9771if test $ac_cv_header_sys_cpustats_h = yes; then
925c2f3f 9772 ac_have_func=yes; cat >>confdefs.h <<\EOF
98418dba 9773#define UMAX 1
925c2f3f 9774EOF
ba4481b5 9775
98418dba
CW
9776fi
9777
98418dba
CW
9778fi
9779
9780if test $ac_have_func = no; then
9781
9782for ac_header in mach/mach.h
2c9dccc9
PJ
9783do
9784as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
598a2813 9785echo "$as_me:9784: checking for $ac_header" >&5
2c9dccc9
PJ
9786echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9787if eval "test \"\${$as_ac_Header+set}\" = set"; then
9788 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 9789else
925c2f3f
EZ
9790 cat >conftest.$ac_ext <<_ACEOF
9791#line 9785 "configure"
2c9dccc9
PJ
9792#include "confdefs.h"
9793#include <$ac_header>
9794_ACEOF
598a2813 9795if { (eval echo "$as_me:9794: \"$ac_cpp conftest.$ac_ext\"") >&5
2c9dccc9
PJ
9796 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9797 ac_status=$?
9798 egrep -v '^ *\+' conftest.er1 >conftest.err
9799 rm -f conftest.er1
9800 cat conftest.err >&5
598a2813 9801 echo "$as_me:9800: \$? = $ac_status" >&5
2c9dccc9
PJ
9802 (exit $ac_status); } >/dev/null; then
9803 if test -s conftest.err; then
9804 ac_cpp_err=$ac_c_preproc_warn_flag
9805 else
9806 ac_cpp_err=
9807 fi
9808else
9809 ac_cpp_err=yes
9810fi
9811if test -z "$ac_cpp_err"; then
925c2f3f 9812 eval "$as_ac_Header=yes"
2c9dccc9
PJ
9813else
9814 echo "$as_me: failed program was:" >&5
9815 cat conftest.$ac_ext >&5
925c2f3f 9816 eval "$as_ac_Header=no"
2c9dccc9
PJ
9817fi
9818rm -f conftest.err conftest.$ac_ext
9819fi
598a2813 9820echo "$as_me:9819: result: `eval echo '${'$as_ac_Header'}'`" >&5
2c9dccc9
PJ
9821echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9822if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 9823 cat >>confdefs.h <<EOF
2c9dccc9 9824#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 9825EOF
2c9dccc9
PJ
9826
9827fi
9828done
9829
98418dba
CW
9830fi
9831
98418dba 9832for ac_header in nlist.h
b5de8dc0 9833do
503d2be0 9834as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
598a2813 9835echo "$as_me:9834: checking for $ac_header" >&5
925c2f3f
EZ
9836echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9837if eval "test \"\${$as_ac_Header+set}\" = set"; then
9838 echo $ECHO_N "(cached) $ECHO_C" >&6
9839else
9840 cat >conftest.$ac_ext <<_ACEOF
9841#line 9835 "configure"
503d2be0
AS
9842#include "confdefs.h"
9843#include <$ac_header>
9844_ACEOF
598a2813 9845if { (eval echo "$as_me:9844: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9846 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9847 ac_status=$?
9848 egrep -v '^ *\+' conftest.er1 >conftest.err
9849 rm -f conftest.er1
9850 cat conftest.err >&5
598a2813 9851 echo "$as_me:9850: \$? = $ac_status" >&5
503d2be0
AS
9852 (exit $ac_status); } >/dev/null; then
9853 if test -s conftest.err; then
9854 ac_cpp_err=$ac_c_preproc_warn_flag
9855 else
9856 ac_cpp_err=
9857 fi
9858else
9859 ac_cpp_err=yes
9860fi
9861if test -z "$ac_cpp_err"; then
925c2f3f 9862 eval "$as_ac_Header=yes"
503d2be0
AS
9863else
9864 echo "$as_me: failed program was:" >&5
b5de8dc0 9865 cat conftest.$ac_ext >&5
925c2f3f 9866 eval "$as_ac_Header=no"
b5de8dc0 9867fi
503d2be0 9868rm -f conftest.err conftest.$ac_ext
b5de8dc0 9869fi
598a2813 9870echo "$as_me:9869: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 9871echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 9872if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 9873 cat >>confdefs.h <<EOF
98418dba 9874#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 9875EOF
598a2813 9876 echo "$as_me:9875: checking for struct nlist.n_un.n_name" >&5
98418dba
CW
9877echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6
9878if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 9879 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 9880else
503d2be0 9881 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 9882#line 9876 "configure"
b5de8dc0 9883#include "confdefs.h"
98418dba 9884#include <nlist.h>
b5de8dc0 9885
503d2be0
AS
9886int
9887main ()
9888{
98418dba
CW
9889static struct nlist ac_aggr;
9890if (ac_aggr.n_un.n_name)
9891return 0;
503d2be0
AS
9892 ;
9893 return 0;
9894}
9895_ACEOF
98418dba 9896rm -f conftest.$ac_objext
598a2813 9897if { (eval echo "$as_me:9896: \"$ac_compile\"") >&5
98418dba 9898 (eval $ac_compile) 2>&5
503d2be0 9899 ac_status=$?
598a2813 9900 echo "$as_me:9899: \$? = $ac_status" >&5
503d2be0 9901 (exit $ac_status); } &&
98418dba 9902 { ac_try='test -s conftest.$ac_objext'
598a2813 9903 { (eval echo "$as_me:9902: \"$ac_try\"") >&5
503d2be0
AS
9904 (eval $ac_try) 2>&5
9905 ac_status=$?
598a2813 9906 echo "$as_me:9905: \$? = $ac_status" >&5
503d2be0 9907 (exit $ac_status); }; }; then
98418dba 9908 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
9909else
9910 echo "$as_me: failed program was:" >&5
9911cat conftest.$ac_ext >&5
98418dba 9912ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 9913fi
98418dba 9914rm -f conftest.$ac_objext conftest.$ac_ext
b5de8dc0 9915fi
598a2813 9916echo "$as_me:9915: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
98418dba
CW
9917echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6
9918if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 9919
925c2f3f 9920cat >>confdefs.h <<EOF
98418dba 9921#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
925c2f3f 9922EOF
b5de8dc0 9923
925c2f3f 9924cat >>confdefs.h <<\EOF
98418dba 9925#define NLIST_NAME_UNION 1
925c2f3f 9926EOF
b5de8dc0 9927
98418dba 9928fi
b5de8dc0 9929
98418dba 9930fi
98418dba 9931done
b5de8dc0 9932
98418dba
CW
9933fi
9934done
b5de8dc0 9935
98418dba 9936# Some definitions of getloadavg require that the program be installed setgid.
598a2813 9937echo "$as_me:9936: checking whether getloadavg requires setgid" >&5
98418dba
CW
9938echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6
9939if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
9940 echo $ECHO_N "(cached) $ECHO_C" >&6
9941else
9942 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 9943#line 9937 "configure"
98418dba
CW
9944#include "confdefs.h"
9945#include "$srcdir/getloadavg.c"
9946#ifdef LDAV_PRIVILEGED
9947Yowza Am I SETGID yet
9948#endif
9949_ACEOF
9950if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9951 egrep "Yowza Am I SETGID yet" >/dev/null 2>&1; then
9952 ac_cv_func_getloadavg_setgid=yes
9953else
9954 ac_cv_func_getloadavg_setgid=no
9955fi
9956rm -f conftest*
b5de8dc0 9957
98418dba 9958fi
598a2813 9959echo "$as_me:9958: result: $ac_cv_func_getloadavg_setgid" >&5
98418dba
CW
9960echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6
9961if test $ac_cv_func_getloadavg_setgid = yes; then
9962 NEED_SETGID=true
b5de8dc0 9963
925c2f3f 9964cat >>confdefs.h <<\EOF
98418dba 9965#define GETLOADAVG_PRIVILEGED 1
925c2f3f 9966EOF
98418dba 9967
b5de8dc0 9968else
98418dba 9969 NEED_SETGID=false
b5de8dc0 9970fi
98418dba
CW
9971
9972if test $ac_cv_func_getloadavg_setgid = yes; then
598a2813 9973 echo "$as_me:9972: checking group of /dev/kmem" >&5
98418dba
CW
9974echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6
9975if test "${ac_cv_group_kmem+set}" = set; then
9976 echo $ECHO_N "(cached) $ECHO_C" >&6
9977else
9978 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
9979 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
9980 # If we got an error (system does not support symlinks), try without -L.
9981 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
9982 ac_cv_group_kmem=`echo $ac_ls_output \
9983 | sed -ne 's/[ ][ ]*/ /g;
9984 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
9985 / /s/.* //;p;'`
9986
b5de8dc0 9987fi
598a2813 9988echo "$as_me:9987: result: $ac_cv_group_kmem" >&5
98418dba
CW
9989echo "${ECHO_T}$ac_cv_group_kmem" >&6
9990 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 9991fi
98418dba
CW
9992if test "x$ac_save_LIBS" = x; then
9993 GETLOADAVG_LIBS=$LIBS
9994else
9995 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 9996fi
98418dba 9997LIBS=$ac_save_LIBS
b5de8dc0 9998
598a2813 9999echo "$as_me:9998: checking for _LARGEFILE_SOURCE value needed for large files" >&5
b936fae4
AS
10000echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10001if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 10002 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 10003else
b936fae4
AS
10004 while :; do
10005 ac_cv_sys_largefile_source=no
503d2be0 10006 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10007#line 10001 "configure"
4c343001 10008#include "confdefs.h"
b936fae4 10009#include <stdio.h>
503d2be0
AS
10010int
10011main ()
10012{
b936fae4
AS
10013return !fseeko;
10014 ;
10015 return 0;
10016}
10017_ACEOF
10018rm -f conftest.$ac_objext
598a2813 10019if { (eval echo "$as_me:10018: \"$ac_compile\"") >&5
b936fae4
AS
10020 (eval $ac_compile) 2>&5
10021 ac_status=$?
598a2813 10022 echo "$as_me:10021: \$? = $ac_status" >&5
b936fae4
AS
10023 (exit $ac_status); } &&
10024 { ac_try='test -s conftest.$ac_objext'
598a2813 10025 { (eval echo "$as_me:10024: \"$ac_try\"") >&5
b936fae4
AS
10026 (eval $ac_try) 2>&5
10027 ac_status=$?
598a2813 10028 echo "$as_me:10027: \$? = $ac_status" >&5
b936fae4
AS
10029 (exit $ac_status); }; }; then
10030 break
10031else
10032 echo "$as_me: failed program was:" >&5
10033cat conftest.$ac_ext >&5
10034fi
10035rm -f conftest.$ac_objext conftest.$ac_ext
10036 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10037#line 10031 "configure"
b936fae4
AS
10038#include "confdefs.h"
10039#define _LARGEFILE_SOURCE 1
10040#include <stdio.h>
b936fae4
AS
10041int
10042main ()
10043{
10044return !fseeko;
10045 ;
10046 return 0;
10047}
10048_ACEOF
10049rm -f conftest.$ac_objext
598a2813 10050if { (eval echo "$as_me:10049: \"$ac_compile\"") >&5
b936fae4
AS
10051 (eval $ac_compile) 2>&5
10052 ac_status=$?
598a2813 10053 echo "$as_me:10052: \$? = $ac_status" >&5
b936fae4
AS
10054 (exit $ac_status); } &&
10055 { ac_try='test -s conftest.$ac_objext'
598a2813 10056 { (eval echo "$as_me:10055: \"$ac_try\"") >&5
b936fae4
AS
10057 (eval $ac_try) 2>&5
10058 ac_status=$?
598a2813 10059 echo "$as_me:10058: \$? = $ac_status" >&5
b936fae4
AS
10060 (exit $ac_status); }; }; then
10061 ac_cv_sys_largefile_source=1; break
10062else
10063 echo "$as_me: failed program was:" >&5
10064cat conftest.$ac_ext >&5
10065fi
10066rm -f conftest.$ac_objext conftest.$ac_ext
10067 break
10068done
10069fi
598a2813 10070echo "$as_me:10069: result: $ac_cv_sys_largefile_source" >&5
b936fae4
AS
10071echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10072if test "$ac_cv_sys_largefile_source" != no; then
10073
925c2f3f 10074cat >>confdefs.h <<EOF
b936fae4 10075#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
925c2f3f 10076EOF
b936fae4
AS
10077
10078fi
10079rm -f conftest*
4c343001 10080
b936fae4
AS
10081# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10082# in glibc 2.1.3, but that breaks too many other things.
10083# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
598a2813 10084echo "$as_me:10083: checking for fseeko" >&5
b936fae4
AS
10085echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10086if test "${ac_cv_func_fseeko+set}" = set; then
10087 echo $ECHO_N "(cached) $ECHO_C" >&6
10088else
10089 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10090#line 10084 "configure"
b936fae4
AS
10091#include "confdefs.h"
10092#include <stdio.h>
b936fae4
AS
10093int
10094main ()
10095{
10096return fseeko && fseeko (stdin, 0, 0);
503d2be0
AS
10097 ;
10098 return 0;
10099}
10100_ACEOF
10101rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 10102if { (eval echo "$as_me:10101: \"$ac_link\"") >&5
503d2be0
AS
10103 (eval $ac_link) 2>&5
10104 ac_status=$?
598a2813 10105 echo "$as_me:10104: \$? = $ac_status" >&5
503d2be0
AS
10106 (exit $ac_status); } &&
10107 { ac_try='test -s conftest$ac_exeext'
598a2813 10108 { (eval echo "$as_me:10107: \"$ac_try\"") >&5
503d2be0
AS
10109 (eval $ac_try) 2>&5
10110 ac_status=$?
598a2813 10111 echo "$as_me:10110: \$? = $ac_status" >&5
503d2be0 10112 (exit $ac_status); }; }; then
b936fae4 10113 ac_cv_func_fseeko=yes
503d2be0
AS
10114else
10115 echo "$as_me: failed program was:" >&5
10116cat conftest.$ac_ext >&5
b936fae4 10117ac_cv_func_fseeko=no
503d2be0
AS
10118fi
10119rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10120fi
598a2813 10121echo "$as_me:10120: result: $ac_cv_func_fseeko" >&5
b936fae4
AS
10122echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10123if test $ac_cv_func_fseeko = yes; then
10124
925c2f3f 10125cat >>confdefs.h <<\EOF
b936fae4 10126#define HAVE_FSEEKO 1
925c2f3f 10127EOF
b936fae4 10128
4c343001
DL
10129fi
10130
b936fae4
AS
10131# UNIX98 PTYs.
10132
10133for ac_func in grantpt
503d2be0
AS
10134do
10135as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
598a2813 10136echo "$as_me:10135: checking for $ac_func" >&5
503d2be0
AS
10137echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10138if eval "test \"\${$as_ac_var+set}\" = set"; then
10139 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 10140else
503d2be0 10141 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10142#line 10136 "configure"
4c343001 10143#include "confdefs.h"
503d2be0
AS
10144/* System header to define __stub macros and hopefully few prototypes,
10145 which can conflict with char $ac_func (); below. */
10146#include <assert.h>
4c343001 10147/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10148#ifdef __cplusplus
10149extern "C"
10150#endif
4c343001 10151/* We use char because int might match the return type of a gcc2
503d2be0
AS
10152 builtin and then its argument prototype would still apply. */
10153char $ac_func ();
10154char (*f) ();
10155
10156int
10157main ()
10158{
10159/* The GNU C library defines this for functions which it implements
10160 to always fail with ENOSYS. Some functions are actually named
10161 something starting with __ and the normal name is an alias. */
10162#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10163choke me
10164#else
10165f = $ac_func;
10166#endif
4c343001 10167
503d2be0
AS
10168 ;
10169 return 0;
10170}
10171_ACEOF
10172rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 10173if { (eval echo "$as_me:10172: \"$ac_link\"") >&5
503d2be0
AS
10174 (eval $ac_link) 2>&5
10175 ac_status=$?
598a2813 10176 echo "$as_me:10175: \$? = $ac_status" >&5
503d2be0
AS
10177 (exit $ac_status); } &&
10178 { ac_try='test -s conftest$ac_exeext'
598a2813 10179 { (eval echo "$as_me:10178: \"$ac_try\"") >&5
503d2be0
AS
10180 (eval $ac_try) 2>&5
10181 ac_status=$?
598a2813 10182 echo "$as_me:10181: \$? = $ac_status" >&5
503d2be0
AS
10183 (exit $ac_status); }; }; then
10184 eval "$as_ac_var=yes"
10185else
10186 echo "$as_me: failed program was:" >&5
10187cat conftest.$ac_ext >&5
10188eval "$as_ac_var=no"
10189fi
10190rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10191fi
598a2813 10192echo "$as_me:10191: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
10193echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10194if test `eval echo '${'$as_ac_var'}'` = yes; then
925c2f3f 10195 cat >>confdefs.h <<EOF
503d2be0 10196#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
925c2f3f 10197EOF
4c343001
DL
10198
10199fi
503d2be0
AS
10200done
10201
b936fae4 10202# PTY-related GNU extensions.
4c343001 10203
b936fae4
AS
10204for ac_func in getpt
10205do
10206as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
598a2813 10207echo "$as_me:10206: checking for $ac_func" >&5
b936fae4
AS
10208echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10209if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 10210 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 10211else
b936fae4 10212 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10213#line 10207 "configure"
087121cc
GM
10214#include "confdefs.h"
10215/* System header to define __stub macros and hopefully few prototypes,
503d2be0 10216 which can conflict with char $ac_func (); below. */
087121cc
GM
10217#include <assert.h>
10218/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10219#ifdef __cplusplus
10220extern "C"
10221#endif
087121cc 10222/* We use char because int might match the return type of a gcc2
503d2be0
AS
10223 builtin and then its argument prototype would still apply. */
10224char $ac_func ();
10225char (*f) ();
087121cc 10226
503d2be0
AS
10227int
10228main ()
10229{
087121cc
GM
10230/* The GNU C library defines this for functions which it implements
10231 to always fail with ENOSYS. Some functions are actually named
10232 something starting with __ and the normal name is an alias. */
10233#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10234choke me
10235#else
503d2be0 10236f = $ac_func;
087121cc
GM
10237#endif
10238
503d2be0
AS
10239 ;
10240 return 0;
10241}
10242_ACEOF
10243rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 10244if { (eval echo "$as_me:10243: \"$ac_link\"") >&5
503d2be0
AS
10245 (eval $ac_link) 2>&5
10246 ac_status=$?
598a2813 10247 echo "$as_me:10246: \$? = $ac_status" >&5
503d2be0
AS
10248 (exit $ac_status); } &&
10249 { ac_try='test -s conftest$ac_exeext'
598a2813 10250 { (eval echo "$as_me:10249: \"$ac_try\"") >&5
503d2be0
AS
10251 (eval $ac_try) 2>&5
10252 ac_status=$?
598a2813 10253 echo "$as_me:10252: \$? = $ac_status" >&5
503d2be0
AS
10254 (exit $ac_status); }; }; then
10255 eval "$as_ac_var=yes"
10256else
10257 echo "$as_me: failed program was:" >&5
10258cat conftest.$ac_ext >&5
10259eval "$as_ac_var=no"
10260fi
10261rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10262fi
598a2813 10263echo "$as_me:10262: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
10264echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10265if test `eval echo '${'$as_ac_var'}'` = yes; then
925c2f3f 10266 cat >>confdefs.h <<EOF
503d2be0 10267#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
925c2f3f 10268EOF
087121cc 10269
087121cc
GM
10270fi
10271done
10272
ba4481b5
DL
10273# Check this now, so that we will NOT find the above functions in ncurses.
10274# That is because we have not set up to link ncurses in lib-src.
10275# It's better to believe a function is not available
10276# than to expect to find it in ncurses.
503d2be0 10277
598a2813 10278echo "$as_me:10277: checking for tparm in -lncurses" >&5
503d2be0
AS
10279echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6
10280if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
10281 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 10282else
503d2be0 10283 ac_check_lib_save_LIBS=$LIBS
ba4481b5 10284LIBS="-lncurses $LIBS"
503d2be0 10285cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10286#line 10280 "configure"
ba4481b5 10287#include "confdefs.h"
503d2be0 10288
ba4481b5 10289/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10290#ifdef __cplusplus
10291extern "C"
10292#endif
ba4481b5 10293/* We use char because int might match the return type of a gcc2
503d2be0
AS
10294 builtin and then its argument prototype would still apply. */
10295char tparm ();
10296int
10297main ()
10298{
10299tparm ();
10300 ;
10301 return 0;
10302}
10303_ACEOF
10304rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 10305if { (eval echo "$as_me:10304: \"$ac_link\"") >&5
503d2be0
AS
10306 (eval $ac_link) 2>&5
10307 ac_status=$?
598a2813 10308 echo "$as_me:10307: \$? = $ac_status" >&5
503d2be0
AS
10309 (exit $ac_status); } &&
10310 { ac_try='test -s conftest$ac_exeext'
598a2813 10311 { (eval echo "$as_me:10310: \"$ac_try\"") >&5
503d2be0
AS
10312 (eval $ac_try) 2>&5
10313 ac_status=$?
598a2813 10314 echo "$as_me:10313: \$? = $ac_status" >&5
503d2be0
AS
10315 (exit $ac_status); }; }; then
10316 ac_cv_lib_ncurses_tparm=yes
10317else
10318 echo "$as_me: failed program was:" >&5
10319cat conftest.$ac_ext >&5
10320ac_cv_lib_ncurses_tparm=no
10321fi
10322rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10323LIBS=$ac_check_lib_save_LIBS
10324fi
598a2813 10325echo "$as_me:10324: result: $ac_cv_lib_ncurses_tparm" >&5
503d2be0
AS
10326echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6
10327if test $ac_cv_lib_ncurses_tparm = yes; then
925c2f3f 10328 cat >>confdefs.h <<EOF
503d2be0 10329#define HAVE_LIBNCURSES 1
925c2f3f 10330EOF
ba4481b5
DL
10331
10332 LIBS="-lncurses $LIBS"
10333
ba4481b5
DL
10334fi
10335
84e70f78
KR
10336# Do we need the Hesiod library to provide the support routines?
10337if test "$with_hesiod" = yes ; then
10338 # Don't set $LIBS here -- see comments above.
10339 resolv=no
598a2813 10340 echo "$as_me:10339: checking for res_send" >&5
84e70f78
KR
10341echo $ECHO_N "checking for res_send... $ECHO_C" >&6
10342if test "${ac_cv_func_res_send+set}" = set; then
10343 echo $ECHO_N "(cached) $ECHO_C" >&6
10344else
10345 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10346#line 10340 "configure"
84e70f78
KR
10347#include "confdefs.h"
10348/* System header to define __stub macros and hopefully few prototypes,
10349 which can conflict with char res_send (); below. */
10350#include <assert.h>
10351/* Override any gcc2 internal prototype to avoid an error. */
10352#ifdef __cplusplus
10353extern "C"
10354#endif
10355/* We use char because int might match the return type of a gcc2
10356 builtin and then its argument prototype would still apply. */
10357char res_send ();
10358char (*f) ();
10359
10360int
10361main ()
10362{
10363/* The GNU C library defines this for functions which it implements
10364 to always fail with ENOSYS. Some functions are actually named
10365 something starting with __ and the normal name is an alias. */
10366#if defined (__stub_res_send) || defined (__stub___res_send)
10367choke me
10368#else
10369f = res_send;
10370#endif
10371
10372 ;
10373 return 0;
10374}
10375_ACEOF
10376rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 10377if { (eval echo "$as_me:10376: \"$ac_link\"") >&5
84e70f78
KR
10378 (eval $ac_link) 2>&5
10379 ac_status=$?
598a2813 10380 echo "$as_me:10379: \$? = $ac_status" >&5
84e70f78
KR
10381 (exit $ac_status); } &&
10382 { ac_try='test -s conftest$ac_exeext'
598a2813 10383 { (eval echo "$as_me:10382: \"$ac_try\"") >&5
84e70f78
KR
10384 (eval $ac_try) 2>&5
10385 ac_status=$?
598a2813 10386 echo "$as_me:10385: \$? = $ac_status" >&5
84e70f78
KR
10387 (exit $ac_status); }; }; then
10388 ac_cv_func_res_send=yes
10389else
10390 echo "$as_me: failed program was:" >&5
10391cat conftest.$ac_ext >&5
10392ac_cv_func_res_send=no
10393fi
10394rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10395fi
598a2813 10396echo "$as_me:10395: result: $ac_cv_func_res_send" >&5
84e70f78
KR
10397echo "${ECHO_T}$ac_cv_func_res_send" >&6
10398if test $ac_cv_func_res_send = yes; then
10399 :
10400else
598a2813 10401 echo "$as_me:10400: checking for __res_send" >&5
84e70f78
KR
10402echo $ECHO_N "checking for __res_send... $ECHO_C" >&6
10403if test "${ac_cv_func___res_send+set}" = set; then
10404 echo $ECHO_N "(cached) $ECHO_C" >&6
10405else
10406 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10407#line 10401 "configure"
84e70f78
KR
10408#include "confdefs.h"
10409/* System header to define __stub macros and hopefully few prototypes,
10410 which can conflict with char __res_send (); below. */
10411#include <assert.h>
10412/* Override any gcc2 internal prototype to avoid an error. */
10413#ifdef __cplusplus
10414extern "C"
10415#endif
10416/* We use char because int might match the return type of a gcc2
10417 builtin and then its argument prototype would still apply. */
10418char __res_send ();
10419char (*f) ();
10420
10421int
10422main ()
10423{
10424/* The GNU C library defines this for functions which it implements
10425 to always fail with ENOSYS. Some functions are actually named
10426 something starting with __ and the normal name is an alias. */
10427#if defined (__stub___res_send) || defined (__stub_____res_send)
10428choke me
10429#else
10430f = __res_send;
10431#endif
10432
10433 ;
10434 return 0;
10435}
10436_ACEOF
10437rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 10438if { (eval echo "$as_me:10437: \"$ac_link\"") >&5
84e70f78
KR
10439 (eval $ac_link) 2>&5
10440 ac_status=$?
598a2813 10441 echo "$as_me:10440: \$? = $ac_status" >&5
84e70f78
KR
10442 (exit $ac_status); } &&
10443 { ac_try='test -s conftest$ac_exeext'
598a2813 10444 { (eval echo "$as_me:10443: \"$ac_try\"") >&5
84e70f78
KR
10445 (eval $ac_try) 2>&5
10446 ac_status=$?
598a2813 10447 echo "$as_me:10446: \$? = $ac_status" >&5
84e70f78
KR
10448 (exit $ac_status); }; }; then
10449 ac_cv_func___res_send=yes
10450else
10451 echo "$as_me: failed program was:" >&5
10452cat conftest.$ac_ext >&5
10453ac_cv_func___res_send=no
10454fi
10455rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10456fi
598a2813 10457echo "$as_me:10456: result: $ac_cv_func___res_send" >&5
84e70f78
KR
10458echo "${ECHO_T}$ac_cv_func___res_send" >&6
10459if test $ac_cv_func___res_send = yes; then
10460 :
10461else
598a2813 10462 echo "$as_me:10461: checking for res_send in -lresolv" >&5
84e70f78
KR
10463echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6
10464if test "${ac_cv_lib_resolv_res_send+set}" = set; then
10465 echo $ECHO_N "(cached) $ECHO_C" >&6
10466else
10467 ac_check_lib_save_LIBS=$LIBS
10468LIBS="-lresolv $LIBS"
10469cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10470#line 10464 "configure"
84e70f78
KR
10471#include "confdefs.h"
10472
10473/* Override any gcc2 internal prototype to avoid an error. */
10474#ifdef __cplusplus
10475extern "C"
10476#endif
10477/* We use char because int might match the return type of a gcc2
10478 builtin and then its argument prototype would still apply. */
10479char res_send ();
10480int
10481main ()
10482{
10483res_send ();
10484 ;
10485 return 0;
10486}
10487_ACEOF
10488rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 10489if { (eval echo "$as_me:10488: \"$ac_link\"") >&5
84e70f78
KR
10490 (eval $ac_link) 2>&5
10491 ac_status=$?
598a2813 10492 echo "$as_me:10491: \$? = $ac_status" >&5
84e70f78
KR
10493 (exit $ac_status); } &&
10494 { ac_try='test -s conftest$ac_exeext'
598a2813 10495 { (eval echo "$as_me:10494: \"$ac_try\"") >&5
84e70f78
KR
10496 (eval $ac_try) 2>&5
10497 ac_status=$?
598a2813 10498 echo "$as_me:10497: \$? = $ac_status" >&5
84e70f78
KR
10499 (exit $ac_status); }; }; then
10500 ac_cv_lib_resolv_res_send=yes
10501else
10502 echo "$as_me: failed program was:" >&5
10503cat conftest.$ac_ext >&5
10504ac_cv_lib_resolv_res_send=no
10505fi
10506rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10507LIBS=$ac_check_lib_save_LIBS
10508fi
598a2813 10509echo "$as_me:10508: result: $ac_cv_lib_resolv_res_send" >&5
84e70f78
KR
10510echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6
10511if test $ac_cv_lib_resolv_res_send = yes; then
10512 resolv=yes
10513else
598a2813 10514 echo "$as_me:10513: checking for __res_send in -lresolv" >&5
84e70f78
KR
10515echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6
10516if test "${ac_cv_lib_resolv___res_send+set}" = set; then
10517 echo $ECHO_N "(cached) $ECHO_C" >&6
10518else
10519 ac_check_lib_save_LIBS=$LIBS
10520LIBS="-lresolv $LIBS"
10521cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10522#line 10516 "configure"
84e70f78
KR
10523#include "confdefs.h"
10524
10525/* Override any gcc2 internal prototype to avoid an error. */
10526#ifdef __cplusplus
10527extern "C"
10528#endif
10529/* We use char because int might match the return type of a gcc2
10530 builtin and then its argument prototype would still apply. */
10531char __res_send ();
10532int
10533main ()
10534{
10535__res_send ();
10536 ;
10537 return 0;
10538}
10539_ACEOF
10540rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 10541if { (eval echo "$as_me:10540: \"$ac_link\"") >&5
84e70f78
KR
10542 (eval $ac_link) 2>&5
10543 ac_status=$?
598a2813 10544 echo "$as_me:10543: \$? = $ac_status" >&5
84e70f78
KR
10545 (exit $ac_status); } &&
10546 { ac_try='test -s conftest$ac_exeext'
598a2813 10547 { (eval echo "$as_me:10546: \"$ac_try\"") >&5
84e70f78
KR
10548 (eval $ac_try) 2>&5
10549 ac_status=$?
598a2813 10550 echo "$as_me:10549: \$? = $ac_status" >&5
84e70f78
KR
10551 (exit $ac_status); }; }; then
10552 ac_cv_lib_resolv___res_send=yes
10553else
10554 echo "$as_me: failed program was:" >&5
10555cat conftest.$ac_ext >&5
10556ac_cv_lib_resolv___res_send=no
10557fi
10558rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10559LIBS=$ac_check_lib_save_LIBS
10560fi
598a2813 10561echo "$as_me:10560: result: $ac_cv_lib_resolv___res_send" >&5
84e70f78
KR
10562echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6
10563if test $ac_cv_lib_resolv___res_send = yes; then
10564 resolv=yes
10565fi
10566
10567fi
10568
10569fi
10570
10571fi
10572
10573 if test "$resolv" = yes ; then
10574 RESOLVLIB=-lresolv
b936fae4 10575
925c2f3f 10576cat >>confdefs.h <<\EOF
84e70f78 10577#define HAVE_LIBRESOLV 1
925c2f3f 10578EOF
84e70f78
KR
10579
10580 else
10581 RESOLVLIB=
10582 fi
598a2813 10583 echo "$as_me:10582: checking for hes_getmailhost" >&5
84e70f78
KR
10584echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6
10585if test "${ac_cv_func_hes_getmailhost+set}" = set; then
10586 echo $ECHO_N "(cached) $ECHO_C" >&6
10587else
10588 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10589#line 10583 "configure"
84e70f78
KR
10590#include "confdefs.h"
10591/* System header to define __stub macros and hopefully few prototypes,
10592 which can conflict with char hes_getmailhost (); below. */
10593#include <assert.h>
10594/* Override any gcc2 internal prototype to avoid an error. */
10595#ifdef __cplusplus
10596extern "C"
10597#endif
10598/* We use char because int might match the return type of a gcc2
10599 builtin and then its argument prototype would still apply. */
10600char hes_getmailhost ();
10601char (*f) ();
10602
10603int
10604main ()
10605{
10606/* The GNU C library defines this for functions which it implements
10607 to always fail with ENOSYS. Some functions are actually named
10608 something starting with __ and the normal name is an alias. */
10609#if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
10610choke me
10611#else
10612f = hes_getmailhost;
10613#endif
10614
10615 ;
10616 return 0;
10617}
10618_ACEOF
10619rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 10620if { (eval echo "$as_me:10619: \"$ac_link\"") >&5
84e70f78
KR
10621 (eval $ac_link) 2>&5
10622 ac_status=$?
598a2813 10623 echo "$as_me:10622: \$? = $ac_status" >&5
84e70f78
KR
10624 (exit $ac_status); } &&
10625 { ac_try='test -s conftest$ac_exeext'
598a2813 10626 { (eval echo "$as_me:10625: \"$ac_try\"") >&5
84e70f78
KR
10627 (eval $ac_try) 2>&5
10628 ac_status=$?
598a2813 10629 echo "$as_me:10628: \$? = $ac_status" >&5
84e70f78
KR
10630 (exit $ac_status); }; }; then
10631 ac_cv_func_hes_getmailhost=yes
10632else
10633 echo "$as_me: failed program was:" >&5
10634cat conftest.$ac_ext >&5
10635ac_cv_func_hes_getmailhost=no
10636fi
10637rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10638fi
598a2813 10639echo "$as_me:10638: result: $ac_cv_func_hes_getmailhost" >&5
84e70f78
KR
10640echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6
10641if test $ac_cv_func_hes_getmailhost = yes; then
10642 :
10643else
598a2813 10644 echo "$as_me:10643: checking for hes_getmailhost in -lhesiod" >&5
84e70f78
KR
10645echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6
10646if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
10647 echo $ECHO_N "(cached) $ECHO_C" >&6
10648else
10649 ac_check_lib_save_LIBS=$LIBS
10650LIBS="-lhesiod $RESOLVLIB $LIBS"
10651cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10652#line 10646 "configure"
84e70f78
KR
10653#include "confdefs.h"
10654
10655/* Override any gcc2 internal prototype to avoid an error. */
10656#ifdef __cplusplus
10657extern "C"
10658#endif
10659/* We use char because int might match the return type of a gcc2
10660 builtin and then its argument prototype would still apply. */
10661char hes_getmailhost ();
10662int
10663main ()
10664{
10665hes_getmailhost ();
10666 ;
10667 return 0;
10668}
10669_ACEOF
10670rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 10671if { (eval echo "$as_me:10670: \"$ac_link\"") >&5
84e70f78
KR
10672 (eval $ac_link) 2>&5
10673 ac_status=$?
598a2813 10674 echo "$as_me:10673: \$? = $ac_status" >&5
84e70f78
KR
10675 (exit $ac_status); } &&
10676 { ac_try='test -s conftest$ac_exeext'
598a2813 10677 { (eval echo "$as_me:10676: \"$ac_try\"") >&5
84e70f78
KR
10678 (eval $ac_try) 2>&5
10679 ac_status=$?
598a2813 10680 echo "$as_me:10679: \$? = $ac_status" >&5
84e70f78
KR
10681 (exit $ac_status); }; }; then
10682 ac_cv_lib_hesiod_hes_getmailhost=yes
10683else
10684 echo "$as_me: failed program was:" >&5
10685cat conftest.$ac_ext >&5
10686ac_cv_lib_hesiod_hes_getmailhost=no
10687fi
10688rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10689LIBS=$ac_check_lib_save_LIBS
10690fi
598a2813 10691echo "$as_me:10690: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
84e70f78
KR
10692echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6
10693if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 10694
925c2f3f 10695cat >>confdefs.h <<\EOF
84e70f78 10696#define HAVE_LIBHESIOD 1
925c2f3f 10697EOF
84e70f78
KR
10698
10699else
10700 :
10701fi
10702
10703fi
10704
10705fi
10706
a21616bd
KR
10707# These tell us which Kerberos-related libraries to use.
10708if test "${with_kerberos+set}" = set; then
503d2be0 10709
598a2813 10710echo "$as_me:10709: checking for com_err in -lcom_err" >&5
503d2be0
AS
10711echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
10712if test "${ac_cv_lib_com_err_com_err+set}" = set; then
10713 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10714else
503d2be0 10715 ac_check_lib_save_LIBS=$LIBS
a21616bd 10716LIBS="-lcom_err $LIBS"
503d2be0 10717cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10718#line 10712 "configure"
a21616bd 10719#include "confdefs.h"
503d2be0 10720
a21616bd 10721/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10722#ifdef __cplusplus
10723extern "C"
10724#endif
a21616bd 10725/* We use char because int might match the return type of a gcc2
503d2be0
AS
10726 builtin and then its argument prototype would still apply. */
10727char com_err ();
10728int
10729main ()
10730{
10731com_err ();
10732 ;
10733 return 0;
10734}
10735_ACEOF
10736rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 10737if { (eval echo "$as_me:10736: \"$ac_link\"") >&5
503d2be0
AS
10738 (eval $ac_link) 2>&5
10739 ac_status=$?
598a2813 10740 echo "$as_me:10739: \$? = $ac_status" >&5
503d2be0
AS
10741 (exit $ac_status); } &&
10742 { ac_try='test -s conftest$ac_exeext'
598a2813 10743 { (eval echo "$as_me:10742: \"$ac_try\"") >&5
503d2be0
AS
10744 (eval $ac_try) 2>&5
10745 ac_status=$?
598a2813 10746 echo "$as_me:10745: \$? = $ac_status" >&5
503d2be0
AS
10747 (exit $ac_status); }; }; then
10748 ac_cv_lib_com_err_com_err=yes
10749else
10750 echo "$as_me: failed program was:" >&5
10751cat conftest.$ac_ext >&5
10752ac_cv_lib_com_err_com_err=no
10753fi
10754rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10755LIBS=$ac_check_lib_save_LIBS
10756fi
598a2813 10757echo "$as_me:10756: result: $ac_cv_lib_com_err_com_err" >&5
503d2be0
AS
10758echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
10759if test $ac_cv_lib_com_err_com_err = yes; then
925c2f3f 10760 cat >>confdefs.h <<EOF
503d2be0 10761#define HAVE_LIBCOM_ERR 1
925c2f3f 10762EOF
a21616bd
KR
10763
10764 LIBS="-lcom_err $LIBS"
10765
a21616bd
KR
10766fi
10767
598a2813 10768echo "$as_me:10767: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
503d2be0
AS
10769echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6
10770if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
10771 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10772else
503d2be0 10773 ac_check_lib_save_LIBS=$LIBS
a21616bd 10774LIBS="-lk5crypto $LIBS"
503d2be0 10775cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10776#line 10770 "configure"
a21616bd 10777#include "confdefs.h"
503d2be0 10778
a21616bd 10779/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10780#ifdef __cplusplus
10781extern "C"
10782#endif
a21616bd 10783/* We use char because int might match the return type of a gcc2
503d2be0
AS
10784 builtin and then its argument prototype would still apply. */
10785char mit_des_cbc_encrypt ();
10786int
10787main ()
10788{
10789mit_des_cbc_encrypt ();
10790 ;
10791 return 0;
10792}
10793_ACEOF
10794rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 10795if { (eval echo "$as_me:10794: \"$ac_link\"") >&5
503d2be0
AS
10796 (eval $ac_link) 2>&5
10797 ac_status=$?
598a2813 10798 echo "$as_me:10797: \$? = $ac_status" >&5
503d2be0
AS
10799 (exit $ac_status); } &&
10800 { ac_try='test -s conftest$ac_exeext'
598a2813 10801 { (eval echo "$as_me:10800: \"$ac_try\"") >&5
503d2be0
AS
10802 (eval $ac_try) 2>&5
10803 ac_status=$?
598a2813 10804 echo "$as_me:10803: \$? = $ac_status" >&5
503d2be0
AS
10805 (exit $ac_status); }; }; then
10806 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
10807else
10808 echo "$as_me: failed program was:" >&5
10809cat conftest.$ac_ext >&5
10810ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
10811fi
10812rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10813LIBS=$ac_check_lib_save_LIBS
10814fi
598a2813 10815echo "$as_me:10814: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
10816echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6
10817if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
925c2f3f 10818 cat >>confdefs.h <<EOF
503d2be0 10819#define HAVE_LIBK5CRYPTO 1
925c2f3f 10820EOF
a21616bd
KR
10821
10822 LIBS="-lk5crypto $LIBS"
10823
a21616bd
KR
10824fi
10825
598a2813 10826echo "$as_me:10825: checking for mit_des_cbc_encrypt in -lcrypto" >&5
503d2be0
AS
10827echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6
10828if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
10829 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10830else
503d2be0 10831 ac_check_lib_save_LIBS=$LIBS
a21616bd 10832LIBS="-lcrypto $LIBS"
503d2be0 10833cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10834#line 10828 "configure"
a21616bd 10835#include "confdefs.h"
503d2be0 10836
a21616bd 10837/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10838#ifdef __cplusplus
10839extern "C"
10840#endif
a21616bd 10841/* We use char because int might match the return type of a gcc2
503d2be0
AS
10842 builtin and then its argument prototype would still apply. */
10843char mit_des_cbc_encrypt ();
10844int
10845main ()
10846{
10847mit_des_cbc_encrypt ();
10848 ;
10849 return 0;
10850}
10851_ACEOF
10852rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 10853if { (eval echo "$as_me:10852: \"$ac_link\"") >&5
503d2be0
AS
10854 (eval $ac_link) 2>&5
10855 ac_status=$?
598a2813 10856 echo "$as_me:10855: \$? = $ac_status" >&5
503d2be0
AS
10857 (exit $ac_status); } &&
10858 { ac_try='test -s conftest$ac_exeext'
598a2813 10859 { (eval echo "$as_me:10858: \"$ac_try\"") >&5
503d2be0
AS
10860 (eval $ac_try) 2>&5
10861 ac_status=$?
598a2813 10862 echo "$as_me:10861: \$? = $ac_status" >&5
503d2be0
AS
10863 (exit $ac_status); }; }; then
10864 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
10865else
10866 echo "$as_me: failed program was:" >&5
10867cat conftest.$ac_ext >&5
10868ac_cv_lib_crypto_mit_des_cbc_encrypt=no
10869fi
10870rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10871LIBS=$ac_check_lib_save_LIBS
10872fi
598a2813 10873echo "$as_me:10872: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
10874echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6
10875if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
925c2f3f 10876 cat >>confdefs.h <<EOF
503d2be0 10877#define HAVE_LIBCRYPTO 1
925c2f3f 10878EOF
a21616bd
KR
10879
10880 LIBS="-lcrypto $LIBS"
10881
a21616bd
KR
10882fi
10883
598a2813 10884echo "$as_me:10883: checking for krb5_init_context in -lkrb5" >&5
503d2be0
AS
10885echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6
10886if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
10887 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10888else
503d2be0 10889 ac_check_lib_save_LIBS=$LIBS
a21616bd 10890LIBS="-lkrb5 $LIBS"
503d2be0 10891cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10892#line 10886 "configure"
a21616bd 10893#include "confdefs.h"
a21616bd 10894
503d2be0
AS
10895/* Override any gcc2 internal prototype to avoid an error. */
10896#ifdef __cplusplus
10897extern "C"
10898#endif
10899/* We use char because int might match the return type of a gcc2
10900 builtin and then its argument prototype would still apply. */
10901char krb5_init_context ();
10902int
10903main ()
10904{
10905krb5_init_context ();
10906 ;
10907 return 0;
10908}
10909_ACEOF
10910rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 10911if { (eval echo "$as_me:10910: \"$ac_link\"") >&5
503d2be0
AS
10912 (eval $ac_link) 2>&5
10913 ac_status=$?
598a2813 10914 echo "$as_me:10913: \$? = $ac_status" >&5
503d2be0
AS
10915 (exit $ac_status); } &&
10916 { ac_try='test -s conftest$ac_exeext'
598a2813 10917 { (eval echo "$as_me:10916: \"$ac_try\"") >&5
503d2be0
AS
10918 (eval $ac_try) 2>&5
10919 ac_status=$?
598a2813 10920 echo "$as_me:10919: \$? = $ac_status" >&5
503d2be0
AS
10921 (exit $ac_status); }; }; then
10922 ac_cv_lib_krb5_krb5_init_context=yes
10923else
10924 echo "$as_me: failed program was:" >&5
10925cat conftest.$ac_ext >&5
10926ac_cv_lib_krb5_krb5_init_context=no
10927fi
10928rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10929LIBS=$ac_check_lib_save_LIBS
10930fi
598a2813 10931echo "$as_me:10930: result: $ac_cv_lib_krb5_krb5_init_context" >&5
503d2be0
AS
10932echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6
10933if test $ac_cv_lib_krb5_krb5_init_context = yes; then
925c2f3f 10934 cat >>confdefs.h <<EOF
503d2be0 10935#define HAVE_LIBKRB5 1
925c2f3f 10936EOF
a21616bd
KR
10937
10938 LIBS="-lkrb5 $LIBS"
10939
a21616bd
KR
10940fi
10941
10942 if test "${with_kerberos5+set}" != set; then
503d2be0 10943
598a2813 10944echo "$as_me:10943: checking for des_cbc_encrypt in -ldes425" >&5
503d2be0
AS
10945echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
10946if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
10947 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10948else
503d2be0 10949 ac_check_lib_save_LIBS=$LIBS
a21616bd 10950LIBS="-ldes425 $LIBS"
503d2be0 10951cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10952#line 10946 "configure"
a21616bd 10953#include "confdefs.h"
503d2be0 10954
a21616bd 10955/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10956#ifdef __cplusplus
10957extern "C"
10958#endif
a21616bd 10959/* We use char because int might match the return type of a gcc2
503d2be0
AS
10960 builtin and then its argument prototype would still apply. */
10961char des_cbc_encrypt ();
10962int
10963main ()
10964{
10965des_cbc_encrypt ();
10966 ;
10967 return 0;
10968}
10969_ACEOF
10970rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 10971if { (eval echo "$as_me:10970: \"$ac_link\"") >&5
503d2be0
AS
10972 (eval $ac_link) 2>&5
10973 ac_status=$?
598a2813 10974 echo "$as_me:10973: \$? = $ac_status" >&5
503d2be0
AS
10975 (exit $ac_status); } &&
10976 { ac_try='test -s conftest$ac_exeext'
598a2813 10977 { (eval echo "$as_me:10976: \"$ac_try\"") >&5
503d2be0
AS
10978 (eval $ac_try) 2>&5
10979 ac_status=$?
598a2813 10980 echo "$as_me:10979: \$? = $ac_status" >&5
503d2be0
AS
10981 (exit $ac_status); }; }; then
10982 ac_cv_lib_des425_des_cbc_encrypt=yes
10983else
10984 echo "$as_me: failed program was:" >&5
10985cat conftest.$ac_ext >&5
10986ac_cv_lib_des425_des_cbc_encrypt=no
10987fi
10988rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10989LIBS=$ac_check_lib_save_LIBS
10990fi
598a2813 10991echo "$as_me:10990: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
503d2be0
AS
10992echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
10993if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
925c2f3f 10994 cat >>confdefs.h <<EOF
503d2be0 10995#define HAVE_LIBDES425 1
925c2f3f 10996EOF
a21616bd
KR
10997
10998 LIBS="-ldes425 $LIBS"
10999
11000else
503d2be0 11001
598a2813 11002echo "$as_me:11001: checking for des_cbc_encrypt in -ldes" >&5
503d2be0
AS
11003echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
11004if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
11005 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 11006else
503d2be0 11007 ac_check_lib_save_LIBS=$LIBS
a21616bd 11008LIBS="-ldes $LIBS"
503d2be0 11009cat >conftest.$ac_ext <<_ACEOF
925c2f3f 11010#line 11004 "configure"
a21616bd 11011#include "confdefs.h"
503d2be0 11012
a21616bd 11013/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11014#ifdef __cplusplus
11015extern "C"
11016#endif
a21616bd 11017/* We use char because int might match the return type of a gcc2
503d2be0
AS
11018 builtin and then its argument prototype would still apply. */
11019char des_cbc_encrypt ();
11020int
11021main ()
11022{
11023des_cbc_encrypt ();
11024 ;
11025 return 0;
11026}
11027_ACEOF
11028rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 11029if { (eval echo "$as_me:11028: \"$ac_link\"") >&5
503d2be0
AS
11030 (eval $ac_link) 2>&5
11031 ac_status=$?
598a2813 11032 echo "$as_me:11031: \$? = $ac_status" >&5
503d2be0
AS
11033 (exit $ac_status); } &&
11034 { ac_try='test -s conftest$ac_exeext'
598a2813 11035 { (eval echo "$as_me:11034: \"$ac_try\"") >&5
503d2be0
AS
11036 (eval $ac_try) 2>&5
11037 ac_status=$?
598a2813 11038 echo "$as_me:11037: \$? = $ac_status" >&5
503d2be0
AS
11039 (exit $ac_status); }; }; then
11040 ac_cv_lib_des_des_cbc_encrypt=yes
11041else
11042 echo "$as_me: failed program was:" >&5
11043cat conftest.$ac_ext >&5
11044ac_cv_lib_des_des_cbc_encrypt=no
11045fi
11046rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11047LIBS=$ac_check_lib_save_LIBS
11048fi
598a2813 11049echo "$as_me:11048: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
503d2be0
AS
11050echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
11051if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
925c2f3f 11052 cat >>confdefs.h <<EOF
503d2be0 11053#define HAVE_LIBDES 1
925c2f3f 11054EOF
a21616bd
KR
11055
11056 LIBS="-ldes $LIBS"
11057
a21616bd
KR
11058fi
11059
11060fi
11061
598a2813 11062echo "$as_me:11061: checking for krb_get_cred in -lkrb4" >&5
503d2be0
AS
11063echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6
11064if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
11065 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 11066else
503d2be0 11067 ac_check_lib_save_LIBS=$LIBS
a21616bd 11068LIBS="-lkrb4 $LIBS"
503d2be0 11069cat >conftest.$ac_ext <<_ACEOF
925c2f3f 11070#line 11064 "configure"
a21616bd 11071#include "confdefs.h"
503d2be0 11072
a21616bd 11073/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11074#ifdef __cplusplus
11075extern "C"
11076#endif
a21616bd 11077/* We use char because int might match the return type of a gcc2
503d2be0
AS
11078 builtin and then its argument prototype would still apply. */
11079char krb_get_cred ();
11080int
11081main ()
11082{
11083krb_get_cred ();
11084 ;
11085 return 0;
11086}
11087_ACEOF
11088rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 11089if { (eval echo "$as_me:11088: \"$ac_link\"") >&5
503d2be0
AS
11090 (eval $ac_link) 2>&5
11091 ac_status=$?
598a2813 11092 echo "$as_me:11091: \$? = $ac_status" >&5
503d2be0
AS
11093 (exit $ac_status); } &&
11094 { ac_try='test -s conftest$ac_exeext'
598a2813 11095 { (eval echo "$as_me:11094: \"$ac_try\"") >&5
503d2be0
AS
11096 (eval $ac_try) 2>&5
11097 ac_status=$?
598a2813 11098 echo "$as_me:11097: \$? = $ac_status" >&5
503d2be0
AS
11099 (exit $ac_status); }; }; then
11100 ac_cv_lib_krb4_krb_get_cred=yes
11101else
11102 echo "$as_me: failed program was:" >&5
11103cat conftest.$ac_ext >&5
11104ac_cv_lib_krb4_krb_get_cred=no
11105fi
11106rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11107LIBS=$ac_check_lib_save_LIBS
11108fi
598a2813 11109echo "$as_me:11108: result: $ac_cv_lib_krb4_krb_get_cred" >&5
503d2be0
AS
11110echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6
11111if test $ac_cv_lib_krb4_krb_get_cred = yes; then
925c2f3f 11112 cat >>confdefs.h <<EOF
503d2be0 11113#define HAVE_LIBKRB4 1
925c2f3f 11114EOF
a21616bd
KR
11115
11116 LIBS="-lkrb4 $LIBS"
11117
11118else
503d2be0 11119
598a2813 11120echo "$as_me:11119: checking for krb_get_cred in -lkrb" >&5
503d2be0
AS
11121echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6
11122if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
11123 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 11124else
503d2be0 11125 ac_check_lib_save_LIBS=$LIBS
a21616bd 11126LIBS="-lkrb $LIBS"
503d2be0 11127cat >conftest.$ac_ext <<_ACEOF
925c2f3f 11128#line 11122 "configure"
a21616bd 11129#include "confdefs.h"
503d2be0 11130
a21616bd 11131/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11132#ifdef __cplusplus
11133extern "C"
11134#endif
a21616bd 11135/* We use char because int might match the return type of a gcc2
503d2be0
AS
11136 builtin and then its argument prototype would still apply. */
11137char krb_get_cred ();
11138int
11139main ()
11140{
11141krb_get_cred ();
11142 ;
11143 return 0;
11144}
11145_ACEOF
11146rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 11147if { (eval echo "$as_me:11146: \"$ac_link\"") >&5
503d2be0
AS
11148 (eval $ac_link) 2>&5
11149 ac_status=$?
598a2813 11150 echo "$as_me:11149: \$? = $ac_status" >&5
503d2be0
AS
11151 (exit $ac_status); } &&
11152 { ac_try='test -s conftest$ac_exeext'
598a2813 11153 { (eval echo "$as_me:11152: \"$ac_try\"") >&5
503d2be0
AS
11154 (eval $ac_try) 2>&5
11155 ac_status=$?
598a2813 11156 echo "$as_me:11155: \$? = $ac_status" >&5
503d2be0
AS
11157 (exit $ac_status); }; }; then
11158 ac_cv_lib_krb_krb_get_cred=yes
11159else
11160 echo "$as_me: failed program was:" >&5
11161cat conftest.$ac_ext >&5
11162ac_cv_lib_krb_krb_get_cred=no
11163fi
11164rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11165LIBS=$ac_check_lib_save_LIBS
11166fi
598a2813 11167echo "$as_me:11166: result: $ac_cv_lib_krb_krb_get_cred" >&5
503d2be0
AS
11168echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6
11169if test $ac_cv_lib_krb_krb_get_cred = yes; then
925c2f3f 11170 cat >>confdefs.h <<EOF
503d2be0 11171#define HAVE_LIBKRB 1
925c2f3f 11172EOF
a21616bd
KR
11173
11174 LIBS="-lkrb $LIBS"
11175
a21616bd
KR
11176fi
11177
11178fi
11179
11180 fi
11181
11182 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
11183
11184for ac_header in krb5.h
a21616bd 11185do
503d2be0 11186as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
598a2813 11187echo "$as_me:11186: checking for $ac_header" >&5
503d2be0
AS
11188echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11189if eval "test \"\${$as_ac_Header+set}\" = set"; then
11190 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 11191else
925c2f3f
EZ
11192 cat >conftest.$ac_ext <<_ACEOF
11193#line 11187 "configure"
503d2be0
AS
11194#include "confdefs.h"
11195#include <$ac_header>
11196_ACEOF
598a2813 11197if { (eval echo "$as_me:11196: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11198 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11199 ac_status=$?
11200 egrep -v '^ *\+' conftest.er1 >conftest.err
11201 rm -f conftest.er1
11202 cat conftest.err >&5
598a2813 11203 echo "$as_me:11202: \$? = $ac_status" >&5
503d2be0
AS
11204 (exit $ac_status); } >/dev/null; then
11205 if test -s conftest.err; then
11206 ac_cpp_err=$ac_c_preproc_warn_flag
11207 else
11208 ac_cpp_err=
11209 fi
11210else
11211 ac_cpp_err=yes
11212fi
11213if test -z "$ac_cpp_err"; then
925c2f3f 11214 eval "$as_ac_Header=yes"
503d2be0
AS
11215else
11216 echo "$as_me: failed program was:" >&5
a21616bd 11217 cat conftest.$ac_ext >&5
925c2f3f 11218 eval "$as_ac_Header=no"
a21616bd 11219fi
503d2be0 11220rm -f conftest.err conftest.$ac_ext
a21616bd 11221fi
598a2813 11222echo "$as_me:11221: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11223echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11224if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 11225 cat >>confdefs.h <<EOF
503d2be0 11226#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 11227EOF
503d2be0 11228
a21616bd
KR
11229fi
11230done
11231
11232 else
503d2be0
AS
11233
11234for ac_header in des.h
a21616bd 11235do
503d2be0 11236as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
598a2813 11237echo "$as_me:11236: checking for $ac_header" >&5
503d2be0
AS
11238echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11239if eval "test \"\${$as_ac_Header+set}\" = set"; then
11240 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 11241else
925c2f3f
EZ
11242 cat >conftest.$ac_ext <<_ACEOF
11243#line 11237 "configure"
503d2be0
AS
11244#include "confdefs.h"
11245#include <$ac_header>
11246_ACEOF
598a2813 11247if { (eval echo "$as_me:11246: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
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
598a2813 11253 echo "$as_me:11252: \$? = $ac_status" >&5
503d2be0
AS
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
11260else
11261 ac_cpp_err=yes
11262fi
11263if test -z "$ac_cpp_err"; then
925c2f3f 11264 eval "$as_ac_Header=yes"
503d2be0
AS
11265else
11266 echo "$as_me: failed program was:" >&5
a21616bd 11267 cat conftest.$ac_ext >&5
925c2f3f 11268 eval "$as_ac_Header=no"
a21616bd 11269fi
503d2be0 11270rm -f conftest.err conftest.$ac_ext
a21616bd 11271fi
598a2813 11272echo "$as_me:11271: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11273echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11274if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 11275 cat >>confdefs.h <<EOF
503d2be0 11276#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 11277EOF
503d2be0 11278
a21616bd 11279else
503d2be0
AS
11280
11281for ac_header in kerberosIV/des.h
a21616bd 11282do
503d2be0 11283as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
598a2813 11284echo "$as_me:11283: checking for $ac_header" >&5
503d2be0
AS
11285echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11286if eval "test \"\${$as_ac_Header+set}\" = set"; then
11287 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 11288else
925c2f3f
EZ
11289 cat >conftest.$ac_ext <<_ACEOF
11290#line 11284 "configure"
503d2be0
AS
11291#include "confdefs.h"
11292#include <$ac_header>
11293_ACEOF
598a2813 11294if { (eval echo "$as_me:11293: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
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
598a2813 11300 echo "$as_me:11299: \$? = $ac_status" >&5
503d2be0
AS
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
11307else
11308 ac_cpp_err=yes
11309fi
11310if test -z "$ac_cpp_err"; then
925c2f3f 11311 eval "$as_ac_Header=yes"
503d2be0
AS
11312else
11313 echo "$as_me: failed program was:" >&5
a21616bd 11314 cat conftest.$ac_ext >&5
925c2f3f 11315 eval "$as_ac_Header=no"
a21616bd 11316fi
503d2be0 11317rm -f conftest.err conftest.$ac_ext
a21616bd 11318fi
598a2813 11319echo "$as_me:11318: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11320echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11321if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 11322 cat >>confdefs.h <<EOF
503d2be0 11323#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 11324EOF
503d2be0 11325
a21616bd 11326else
503d2be0
AS
11327
11328for ac_header in kerberos/des.h
a21616bd 11329do
503d2be0 11330as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
598a2813 11331echo "$as_me:11330: checking for $ac_header" >&5
503d2be0
AS
11332echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11333if eval "test \"\${$as_ac_Header+set}\" = set"; then
11334 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 11335else
925c2f3f
EZ
11336 cat >conftest.$ac_ext <<_ACEOF
11337#line 11331 "configure"
503d2be0
AS
11338#include "confdefs.h"
11339#include <$ac_header>
11340_ACEOF
598a2813 11341if { (eval echo "$as_me:11340: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11342 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11343 ac_status=$?
11344 egrep -v '^ *\+' conftest.er1 >conftest.err
11345 rm -f conftest.er1
11346 cat conftest.err >&5
598a2813 11347 echo "$as_me:11346: \$? = $ac_status" >&5
503d2be0
AS
11348 (exit $ac_status); } >/dev/null; then
11349 if test -s conftest.err; then
11350 ac_cpp_err=$ac_c_preproc_warn_flag
11351 else
11352 ac_cpp_err=
11353 fi
11354else
11355 ac_cpp_err=yes
11356fi
11357if test -z "$ac_cpp_err"; then
925c2f3f 11358 eval "$as_ac_Header=yes"
503d2be0
AS
11359else
11360 echo "$as_me: failed program was:" >&5
a21616bd 11361 cat conftest.$ac_ext >&5
925c2f3f 11362 eval "$as_ac_Header=no"
a21616bd 11363fi
503d2be0 11364rm -f conftest.err conftest.$ac_ext
a21616bd 11365fi
598a2813 11366echo "$as_me:11365: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11367echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11368if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 11369 cat >>confdefs.h <<EOF
503d2be0 11370#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 11371EOF
a21616bd
KR
11372
11373fi
11374done
11375
98418dba 11376fi
925c2f3f
EZ
11377done
11378
98418dba 11379fi
925c2f3f 11380done
98418dba 11381
925c2f3f
EZ
11382for ac_header in krb.h
11383do
11384as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
598a2813 11385echo "$as_me:11384: checking for $ac_header" >&5
925c2f3f
EZ
11386echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11387if eval "test \"\${$as_ac_Header+set}\" = set"; then
11388 echo $ECHO_N "(cached) $ECHO_C" >&6
11389else
11390 cat >conftest.$ac_ext <<_ACEOF
11391#line 11385 "configure"
503d2be0
AS
11392#include "confdefs.h"
11393#include <$ac_header>
11394_ACEOF
598a2813 11395if { (eval echo "$as_me:11394: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11396 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11397 ac_status=$?
11398 egrep -v '^ *\+' conftest.er1 >conftest.err
11399 rm -f conftest.er1
11400 cat conftest.err >&5
598a2813 11401 echo "$as_me:11400: \$? = $ac_status" >&5
503d2be0
AS
11402 (exit $ac_status); } >/dev/null; then
11403 if test -s conftest.err; then
11404 ac_cpp_err=$ac_c_preproc_warn_flag
11405 else
11406 ac_cpp_err=
11407 fi
11408else
11409 ac_cpp_err=yes
11410fi
11411if test -z "$ac_cpp_err"; then
925c2f3f 11412 eval "$as_ac_Header=yes"
503d2be0
AS
11413else
11414 echo "$as_me: failed program was:" >&5
a21616bd 11415 cat conftest.$ac_ext >&5
925c2f3f 11416 eval "$as_ac_Header=no"
a21616bd 11417fi
503d2be0 11418rm -f conftest.err conftest.$ac_ext
a21616bd 11419fi
598a2813 11420echo "$as_me:11419: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11421echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11422if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 11423 cat >>confdefs.h <<EOF
503d2be0 11424#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 11425EOF
503d2be0 11426
a21616bd 11427else
503d2be0
AS
11428
11429for ac_header in kerberosIV/krb.h
a21616bd 11430do
503d2be0 11431as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
598a2813 11432echo "$as_me:11431: checking for $ac_header" >&5
503d2be0
AS
11433echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11434if eval "test \"\${$as_ac_Header+set}\" = set"; then
11435 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 11436else
925c2f3f
EZ
11437 cat >conftest.$ac_ext <<_ACEOF
11438#line 11432 "configure"
503d2be0
AS
11439#include "confdefs.h"
11440#include <$ac_header>
11441_ACEOF
598a2813 11442if { (eval echo "$as_me:11441: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11443 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11444 ac_status=$?
11445 egrep -v '^ *\+' conftest.er1 >conftest.err
11446 rm -f conftest.er1
11447 cat conftest.err >&5
598a2813 11448 echo "$as_me:11447: \$? = $ac_status" >&5
503d2be0
AS
11449 (exit $ac_status); } >/dev/null; then
11450 if test -s conftest.err; then
11451 ac_cpp_err=$ac_c_preproc_warn_flag
11452 else
11453 ac_cpp_err=
11454 fi
11455else
11456 ac_cpp_err=yes
11457fi
11458if test -z "$ac_cpp_err"; then
925c2f3f 11459 eval "$as_ac_Header=yes"
503d2be0
AS
11460else
11461 echo "$as_me: failed program was:" >&5
a21616bd 11462 cat conftest.$ac_ext >&5
925c2f3f 11463 eval "$as_ac_Header=no"
a21616bd 11464fi
503d2be0 11465rm -f conftest.err conftest.$ac_ext
a21616bd 11466fi
598a2813 11467echo "$as_me:11466: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11468echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11469if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 11470 cat >>confdefs.h <<EOF
503d2be0 11471#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 11472EOF
503d2be0 11473
a21616bd 11474else
503d2be0
AS
11475
11476for ac_header in kerberos/krb.h
a21616bd 11477do
503d2be0 11478as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
598a2813 11479echo "$as_me:11478: checking for $ac_header" >&5
503d2be0
AS
11480echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11481if eval "test \"\${$as_ac_Header+set}\" = set"; then
11482 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 11483else
925c2f3f
EZ
11484 cat >conftest.$ac_ext <<_ACEOF
11485#line 11479 "configure"
503d2be0
AS
11486#include "confdefs.h"
11487#include <$ac_header>
11488_ACEOF
598a2813 11489if { (eval echo "$as_me:11488: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11490 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11491 ac_status=$?
11492 egrep -v '^ *\+' conftest.er1 >conftest.err
11493 rm -f conftest.er1
11494 cat conftest.err >&5
598a2813 11495 echo "$as_me:11494: \$? = $ac_status" >&5
503d2be0
AS
11496 (exit $ac_status); } >/dev/null; then
11497 if test -s conftest.err; then
11498 ac_cpp_err=$ac_c_preproc_warn_flag
11499 else
11500 ac_cpp_err=
11501 fi
11502else
11503 ac_cpp_err=yes
11504fi
11505if test -z "$ac_cpp_err"; then
925c2f3f 11506 eval "$as_ac_Header=yes"
503d2be0
AS
11507else
11508 echo "$as_me: failed program was:" >&5
a21616bd 11509 cat conftest.$ac_ext >&5
925c2f3f 11510 eval "$as_ac_Header=no"
a21616bd 11511fi
503d2be0 11512rm -f conftest.err conftest.$ac_ext
a21616bd 11513fi
598a2813 11514echo "$as_me:11513: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11515echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11516if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 11517 cat >>confdefs.h <<EOF
503d2be0 11518#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 11519EOF
503d2be0 11520
a21616bd
KR
11521fi
11522done
11523
11524fi
11525done
11526
11527fi
11528done
11529
11530 fi
503d2be0
AS
11531
11532for ac_header in com_err.h
a21616bd 11533do
503d2be0 11534as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
598a2813 11535echo "$as_me:11534: checking for $ac_header" >&5
503d2be0
AS
11536echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11537if eval "test \"\${$as_ac_Header+set}\" = set"; then
11538 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 11539else
925c2f3f
EZ
11540 cat >conftest.$ac_ext <<_ACEOF
11541#line 11535 "configure"
503d2be0
AS
11542#include "confdefs.h"
11543#include <$ac_header>
11544_ACEOF
598a2813 11545if { (eval echo "$as_me:11544: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11546 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11547 ac_status=$?
11548 egrep -v '^ *\+' conftest.er1 >conftest.err
11549 rm -f conftest.er1
11550 cat conftest.err >&5
598a2813 11551 echo "$as_me:11550: \$? = $ac_status" >&5
503d2be0
AS
11552 (exit $ac_status); } >/dev/null; then
11553 if test -s conftest.err; then
11554 ac_cpp_err=$ac_c_preproc_warn_flag
11555 else
11556 ac_cpp_err=
11557 fi
11558else
11559 ac_cpp_err=yes
11560fi
11561if test -z "$ac_cpp_err"; then
925c2f3f 11562 eval "$as_ac_Header=yes"
503d2be0
AS
11563else
11564 echo "$as_me: failed program was:" >&5
a21616bd 11565 cat conftest.$ac_ext >&5
925c2f3f 11566 eval "$as_ac_Header=no"
a21616bd 11567fi
503d2be0 11568rm -f conftest.err conftest.$ac_ext
a21616bd 11569fi
598a2813 11570echo "$as_me:11569: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11571echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11572if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 11573 cat >>confdefs.h <<EOF
503d2be0 11574#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 11575EOF
503d2be0 11576
a21616bd
KR
11577fi
11578done
11579
11580fi
11581
ba4481b5
DL
11582# Solaris requires -lintl if you want strerror (which calls dgettext)
11583# to return localized messages.
503d2be0 11584
598a2813 11585echo "$as_me:11584: checking for dgettext in -lintl" >&5
503d2be0
AS
11586echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
11587if test "${ac_cv_lib_intl_dgettext+set}" = set; then
11588 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11589else
503d2be0 11590 ac_check_lib_save_LIBS=$LIBS
ba4481b5 11591LIBS="-lintl $LIBS"
503d2be0 11592cat >conftest.$ac_ext <<_ACEOF
925c2f3f 11593#line 11587 "configure"
ba4481b5 11594#include "confdefs.h"
503d2be0 11595
ba4481b5 11596/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11597#ifdef __cplusplus
11598extern "C"
11599#endif
ba4481b5 11600/* We use char because int might match the return type of a gcc2
503d2be0
AS
11601 builtin and then its argument prototype would still apply. */
11602char dgettext ();
11603int
11604main ()
11605{
11606dgettext ();
11607 ;
11608 return 0;
11609}
11610_ACEOF
11611rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 11612if { (eval echo "$as_me:11611: \"$ac_link\"") >&5
503d2be0
AS
11613 (eval $ac_link) 2>&5
11614 ac_status=$?
598a2813 11615 echo "$as_me:11614: \$? = $ac_status" >&5
503d2be0
AS
11616 (exit $ac_status); } &&
11617 { ac_try='test -s conftest$ac_exeext'
598a2813 11618 { (eval echo "$as_me:11617: \"$ac_try\"") >&5
503d2be0
AS
11619 (eval $ac_try) 2>&5
11620 ac_status=$?
598a2813 11621 echo "$as_me:11620: \$? = $ac_status" >&5
503d2be0
AS
11622 (exit $ac_status); }; }; then
11623 ac_cv_lib_intl_dgettext=yes
11624else
11625 echo "$as_me: failed program was:" >&5
11626cat conftest.$ac_ext >&5
11627ac_cv_lib_intl_dgettext=no
11628fi
11629rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11630LIBS=$ac_check_lib_save_LIBS
11631fi
598a2813 11632echo "$as_me:11631: result: $ac_cv_lib_intl_dgettext" >&5
503d2be0
AS
11633echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
11634if test $ac_cv_lib_intl_dgettext = yes; then
925c2f3f 11635 cat >>confdefs.h <<EOF
503d2be0 11636#define HAVE_LIBINTL 1
925c2f3f 11637EOF
ba4481b5
DL
11638
11639 LIBS="-lintl $LIBS"
11640
ba4481b5
DL
11641fi
11642
598a2813 11643echo "$as_me:11642: checking whether localtime caches TZ" >&5
503d2be0
AS
11644echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6
11645if test "${emacs_cv_localtime_cache+set}" = set; then
11646 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
11647else
11648 if test x$ac_cv_func_tzset = xyes; then
11649if test "$cross_compiling" = yes; then
11650 # If we have tzset, assume the worst when cross-compiling.
11651emacs_cv_localtime_cache=yes
11652else
503d2be0 11653 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 11654#line 11648 "configure"
ba4481b5
DL
11655#include "confdefs.h"
11656#include <time.h>
ba4481b5
DL
11657extern char **environ;
11658unset_TZ ()
11659{
11660 char **from, **to;
11661 for (to = from = environ; (*to = *from); from++)
11662 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11663 to++;
11664}
11665char TZ_GMT0[] = "TZ=GMT0";
11666char TZ_PST8[] = "TZ=PST8";
11667main()
11668{
11669 time_t now = time ((time_t *) 0);
11670 int hour_GMT0, hour_unset;
11671 if (putenv (TZ_GMT0) != 0)
11672 exit (1);
11673 hour_GMT0 = localtime (&now)->tm_hour;
11674 unset_TZ ();
11675 hour_unset = localtime (&now)->tm_hour;
11676 if (putenv (TZ_PST8) != 0)
11677 exit (1);
11678 if (localtime (&now)->tm_hour == hour_GMT0)
11679 exit (1);
11680 unset_TZ ();
11681 if (localtime (&now)->tm_hour != hour_unset)
11682 exit (1);
11683 exit (0);
11684}
503d2be0
AS
11685_ACEOF
11686rm -f conftest$ac_exeext
598a2813 11687if { (eval echo "$as_me:11686: \"$ac_link\"") >&5
503d2be0
AS
11688 (eval $ac_link) 2>&5
11689 ac_status=$?
598a2813 11690 echo "$as_me:11689: \$? = $ac_status" >&5
503d2be0 11691 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
598a2813 11692 { (eval echo "$as_me:11691: \"$ac_try\"") >&5
503d2be0
AS
11693 (eval $ac_try) 2>&5
11694 ac_status=$?
598a2813 11695 echo "$as_me:11694: \$? = $ac_status" >&5
503d2be0 11696 (exit $ac_status); }; }; then
ba4481b5
DL
11697 emacs_cv_localtime_cache=no
11698else
503d2be0
AS
11699 echo "$as_me: program exited with status $ac_status" >&5
11700echo "$as_me: failed program was:" >&5
11701cat conftest.$ac_ext >&5
11702emacs_cv_localtime_cache=yes
ba4481b5 11703fi
503d2be0 11704rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 11705fi
ba4481b5
DL
11706else
11707 # If we lack tzset, report that localtime does not cache TZ,
11708 # since we can't invalidate the cache if we don't have tzset.
11709 emacs_cv_localtime_cache=no
11710fi
11711fi
598a2813 11712echo "$as_me:11711: result: $emacs_cv_localtime_cache" >&5
503d2be0 11713echo "${ECHO_T}$emacs_cv_localtime_cache" >&6
ba4481b5 11714if test $emacs_cv_localtime_cache = yes; then
b936fae4 11715
925c2f3f 11716cat >>confdefs.h <<\EOF
ba4481b5 11717#define LOCALTIME_CACHE 1
925c2f3f 11718EOF
ba4481b5
DL
11719
11720fi
11721
11722if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
11723
11724for ac_func in gettimeofday
48d4b120 11725do
503d2be0 11726as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
598a2813 11727echo "$as_me:11726: checking for $ac_func" >&5
503d2be0
AS
11728echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11729if eval "test \"\${$as_ac_var+set}\" = set"; then
11730 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 11731else
503d2be0 11732 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 11733#line 11727 "configure"
48d4b120
DL
11734#include "confdefs.h"
11735/* System header to define __stub macros and hopefully few prototypes,
503d2be0 11736 which can conflict with char $ac_func (); below. */
48d4b120
DL
11737#include <assert.h>
11738/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11739#ifdef __cplusplus
11740extern "C"
11741#endif
48d4b120 11742/* We use char because int might match the return type of a gcc2
503d2be0
AS
11743 builtin and then its argument prototype would still apply. */
11744char $ac_func ();
11745char (*f) ();
48d4b120 11746
503d2be0
AS
11747int
11748main ()
11749{
48d4b120
DL
11750/* The GNU C library defines this for functions which it implements
11751 to always fail with ENOSYS. Some functions are actually named
11752 something starting with __ and the normal name is an alias. */
11753#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11754choke me
11755#else
503d2be0 11756f = $ac_func;
48d4b120
DL
11757#endif
11758
503d2be0
AS
11759 ;
11760 return 0;
11761}
11762_ACEOF
11763rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 11764if { (eval echo "$as_me:11763: \"$ac_link\"") >&5
503d2be0
AS
11765 (eval $ac_link) 2>&5
11766 ac_status=$?
598a2813 11767 echo "$as_me:11766: \$? = $ac_status" >&5
503d2be0
AS
11768 (exit $ac_status); } &&
11769 { ac_try='test -s conftest$ac_exeext'
598a2813 11770 { (eval echo "$as_me:11769: \"$ac_try\"") >&5
503d2be0
AS
11771 (eval $ac_try) 2>&5
11772 ac_status=$?
598a2813 11773 echo "$as_me:11772: \$? = $ac_status" >&5
503d2be0
AS
11774 (exit $ac_status); }; }; then
11775 eval "$as_ac_var=yes"
11776else
11777 echo "$as_me: failed program was:" >&5
11778cat conftest.$ac_ext >&5
11779eval "$as_ac_var=no"
11780fi
11781rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11782fi
598a2813 11783echo "$as_me:11782: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
11784echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11785if test `eval echo '${'$as_ac_var'}'` = yes; then
925c2f3f 11786 cat >>confdefs.h <<EOF
503d2be0 11787#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
925c2f3f 11788EOF
48d4b120 11789
48d4b120
DL
11790fi
11791done
11792
b936fae4 11793 if test $ac_cv_func_gettimeofday = yes; then
598a2813 11794 echo "$as_me:11793: checking whether gettimeofday can accept two arguments" >&5
503d2be0
AS
11795echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6
11796if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
11797 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11798else
503d2be0 11799 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 11800#line 11794 "configure"
a3f08d9e 11801#include "confdefs.h"
ba4481b5 11802
a3f08d9e
DL
11803#ifdef TIME_WITH_SYS_TIME
11804#include <sys/time.h>
11805#include <time.h>
11806#else
11807#ifdef HAVE_SYS_TIME_H
11808#include <sys/time.h>
11809#else
11810#include <time.h>
11811#endif
11812#endif
503d2be0
AS
11813int
11814main ()
11815{
a3f08d9e 11816struct timeval time;
b936fae4 11817 gettimeofday (&time, 0);
503d2be0
AS
11818 ;
11819 return 0;
11820}
11821_ACEOF
11822rm -f conftest.$ac_objext
598a2813 11823if { (eval echo "$as_me:11822: \"$ac_compile\"") >&5
503d2be0
AS
11824 (eval $ac_compile) 2>&5
11825 ac_status=$?
598a2813 11826 echo "$as_me:11825: \$? = $ac_status" >&5
503d2be0
AS
11827 (exit $ac_status); } &&
11828 { ac_try='test -s conftest.$ac_objext'
598a2813 11829 { (eval echo "$as_me:11828: \"$ac_try\"") >&5
503d2be0
AS
11830 (eval $ac_try) 2>&5
11831 ac_status=$?
598a2813 11832 echo "$as_me:11831: \$? = $ac_status" >&5
503d2be0 11833 (exit $ac_status); }; }; then
ba4481b5
DL
11834 emacs_cv_gettimeofday_two_arguments=yes
11835else
503d2be0
AS
11836 echo "$as_me: failed program was:" >&5
11837cat conftest.$ac_ext >&5
11838emacs_cv_gettimeofday_two_arguments=no
ba4481b5 11839fi
503d2be0 11840rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 11841fi
598a2813 11842echo "$as_me:11841: result: $emacs_cv_gettimeofday_two_arguments" >&5
503d2be0 11843echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6
b936fae4
AS
11844 if test $emacs_cv_gettimeofday_two_arguments = no; then
11845
925c2f3f 11846cat >>confdefs.h <<\EOF
ba4481b5 11847#define GETTIMEOFDAY_ONE_ARGUMENT 1
925c2f3f 11848EOF
ba4481b5 11849
b936fae4 11850 fi
ba4481b5
DL
11851 fi
11852fi
11853
48d4b120 11854if test "$ac_cv_func_gettimeofday" = yes; then
598a2813 11855 echo "$as_me:11854: checking for struct timezone" >&5
503d2be0
AS
11856echo $ECHO_N "checking for struct timezone... $ECHO_C" >&6
11857if test "${emacs_cv_struct_timezone+set}" = set; then
11858 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 11859else
503d2be0 11860 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 11861#line 11855 "configure"
48d4b120
DL
11862#include "confdefs.h"
11863#include <sys/time.h>
503d2be0
AS
11864int
11865main ()
11866{
48d4b120 11867struct timezone tz;
503d2be0
AS
11868 ;
11869 return 0;
11870}
11871_ACEOF
11872rm -f conftest.$ac_objext
598a2813 11873if { (eval echo "$as_me:11872: \"$ac_compile\"") >&5
503d2be0
AS
11874 (eval $ac_compile) 2>&5
11875 ac_status=$?
598a2813 11876 echo "$as_me:11875: \$? = $ac_status" >&5
503d2be0
AS
11877 (exit $ac_status); } &&
11878 { ac_try='test -s conftest.$ac_objext'
598a2813 11879 { (eval echo "$as_me:11878: \"$ac_try\"") >&5
503d2be0
AS
11880 (eval $ac_try) 2>&5
11881 ac_status=$?
598a2813 11882 echo "$as_me:11881: \$? = $ac_status" >&5
503d2be0 11883 (exit $ac_status); }; }; then
48d4b120
DL
11884 if test "$cross_compiling" = yes; then
11885 emacs_cv_struct_timezone=yes
11886else
503d2be0 11887 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 11888#line 11882 "configure"
48d4b120
DL
11889#include "confdefs.h"
11890
11891#ifdef TIME_WITH_SYS_TIME
11892#include <sys/time.h>
11893#include <time.h>
11894#else
11895#ifdef HAVE_SYS_TIME_H
11896#include <sys/time.h>
11897#else
11898#include <time.h>
11899#endif
11900#endif
11901main () {
11902 struct timeval time;
11903 struct timezone dummy;
11904 exit (gettimeofday (&time, &dummy));
11905}
503d2be0
AS
11906_ACEOF
11907rm -f conftest$ac_exeext
598a2813 11908if { (eval echo "$as_me:11907: \"$ac_link\"") >&5
503d2be0
AS
11909 (eval $ac_link) 2>&5
11910 ac_status=$?
598a2813 11911 echo "$as_me:11910: \$? = $ac_status" >&5
503d2be0 11912 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
598a2813 11913 { (eval echo "$as_me:11912: \"$ac_try\"") >&5
503d2be0
AS
11914 (eval $ac_try) 2>&5
11915 ac_status=$?
598a2813 11916 echo "$as_me:11915: \$? = $ac_status" >&5
503d2be0 11917 (exit $ac_status); }; }; then
48d4b120
DL
11918 emacs_cv_struct_timezone=yes
11919else
503d2be0
AS
11920 echo "$as_me: program exited with status $ac_status" >&5
11921echo "$as_me: failed program was:" >&5
11922cat conftest.$ac_ext >&5
11923emacs_cv_struct_timezone=no
48d4b120 11924fi
503d2be0 11925rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
48d4b120 11926fi
48d4b120 11927else
503d2be0
AS
11928 echo "$as_me: failed program was:" >&5
11929cat conftest.$ac_ext >&5
11930emacs_cv_struct_timezone=no
48d4b120 11931fi
503d2be0 11932rm -f conftest.$ac_objext conftest.$ac_ext
48d4b120 11933fi
598a2813 11934echo "$as_me:11933: result: $emacs_cv_struct_timezone" >&5
503d2be0 11935echo "${ECHO_T}$emacs_cv_struct_timezone" >&6
48d4b120
DL
11936fi
11937
ba4481b5 11938ok_so_far=yes
598a2813 11939echo "$as_me:11938: checking for socket" >&5
503d2be0
AS
11940echo $ECHO_N "checking for socket... $ECHO_C" >&6
11941if test "${ac_cv_func_socket+set}" = set; then
11942 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11943else
503d2be0 11944 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 11945#line 11939 "configure"
ba4481b5
DL
11946#include "confdefs.h"
11947/* System header to define __stub macros and hopefully few prototypes,
503d2be0 11948 which can conflict with char socket (); below. */
ba4481b5
DL
11949#include <assert.h>
11950/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11951#ifdef __cplusplus
11952extern "C"
11953#endif
ba4481b5 11954/* We use char because int might match the return type of a gcc2
503d2be0
AS
11955 builtin and then its argument prototype would still apply. */
11956char socket ();
11957char (*f) ();
ba4481b5 11958
503d2be0
AS
11959int
11960main ()
11961{
ba4481b5
DL
11962/* The GNU C library defines this for functions which it implements
11963 to always fail with ENOSYS. Some functions are actually named
11964 something starting with __ and the normal name is an alias. */
11965#if defined (__stub_socket) || defined (__stub___socket)
11966choke me
11967#else
503d2be0 11968f = socket;
ba4481b5
DL
11969#endif
11970
503d2be0
AS
11971 ;
11972 return 0;
11973}
11974_ACEOF
11975rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 11976if { (eval echo "$as_me:11975: \"$ac_link\"") >&5
503d2be0
AS
11977 (eval $ac_link) 2>&5
11978 ac_status=$?
598a2813 11979 echo "$as_me:11978: \$? = $ac_status" >&5
503d2be0
AS
11980 (exit $ac_status); } &&
11981 { ac_try='test -s conftest$ac_exeext'
598a2813 11982 { (eval echo "$as_me:11981: \"$ac_try\"") >&5
503d2be0
AS
11983 (eval $ac_try) 2>&5
11984 ac_status=$?
598a2813 11985 echo "$as_me:11984: \$? = $ac_status" >&5
503d2be0
AS
11986 (exit $ac_status); }; }; then
11987 ac_cv_func_socket=yes
11988else
11989 echo "$as_me: failed program was:" >&5
11990cat conftest.$ac_ext >&5
11991ac_cv_func_socket=no
11992fi
11993rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11994fi
598a2813 11995echo "$as_me:11994: result: $ac_cv_func_socket" >&5
503d2be0
AS
11996echo "${ECHO_T}$ac_cv_func_socket" >&6
11997if test $ac_cv_func_socket = yes; then
ba4481b5
DL
11998 :
11999else
503d2be0 12000 ok_so_far=no
ba4481b5
DL
12001fi
12002
12003if test $ok_so_far = yes; then
598a2813 12004 echo "$as_me:12003: checking for netinet/in.h" >&5
503d2be0
AS
12005echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
12006if test "${ac_cv_header_netinet_in_h+set}" = set; then
12007 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 12008else
925c2f3f
EZ
12009 cat >conftest.$ac_ext <<_ACEOF
12010#line 12004 "configure"
ba4481b5
DL
12011#include "confdefs.h"
12012#include <netinet/in.h>
503d2be0 12013_ACEOF
598a2813 12014if { (eval echo "$as_me:12013: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
12015 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12016 ac_status=$?
12017 egrep -v '^ *\+' conftest.er1 >conftest.err
12018 rm -f conftest.er1
12019 cat conftest.err >&5
598a2813 12020 echo "$as_me:12019: \$? = $ac_status" >&5
503d2be0
AS
12021 (exit $ac_status); } >/dev/null; then
12022 if test -s conftest.err; then
12023 ac_cpp_err=$ac_c_preproc_warn_flag
12024 else
12025 ac_cpp_err=
12026 fi
12027else
12028 ac_cpp_err=yes
12029fi
12030if test -z "$ac_cpp_err"; then
925c2f3f 12031 ac_cv_header_netinet_in_h=yes
ba4481b5 12032else
503d2be0 12033 echo "$as_me: failed program was:" >&5
ba4481b5 12034 cat conftest.$ac_ext >&5
925c2f3f 12035 ac_cv_header_netinet_in_h=no
ba4481b5 12036fi
503d2be0 12037rm -f conftest.err conftest.$ac_ext
ba4481b5 12038fi
598a2813 12039echo "$as_me:12038: result: $ac_cv_header_netinet_in_h" >&5
503d2be0
AS
12040echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
12041if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
12042 :
12043else
503d2be0 12044 ok_so_far=no
ba4481b5
DL
12045fi
12046
12047fi
12048if test $ok_so_far = yes; then
598a2813 12049 echo "$as_me:12048: checking for arpa/inet.h" >&5
503d2be0
AS
12050echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
12051if test "${ac_cv_header_arpa_inet_h+set}" = set; then
12052 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 12053else
925c2f3f
EZ
12054 cat >conftest.$ac_ext <<_ACEOF
12055#line 12049 "configure"
ba4481b5
DL
12056#include "confdefs.h"
12057#include <arpa/inet.h>
503d2be0 12058_ACEOF
598a2813 12059if { (eval echo "$as_me:12058: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
12060 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12061 ac_status=$?
12062 egrep -v '^ *\+' conftest.er1 >conftest.err
12063 rm -f conftest.er1
12064 cat conftest.err >&5
598a2813 12065 echo "$as_me:12064: \$? = $ac_status" >&5
503d2be0
AS
12066 (exit $ac_status); } >/dev/null; then
12067 if test -s conftest.err; then
12068 ac_cpp_err=$ac_c_preproc_warn_flag
12069 else
12070 ac_cpp_err=
12071 fi
12072else
12073 ac_cpp_err=yes
12074fi
12075if test -z "$ac_cpp_err"; then
925c2f3f 12076 ac_cv_header_arpa_inet_h=yes
ba4481b5 12077else
503d2be0 12078 echo "$as_me: failed program was:" >&5
ba4481b5 12079 cat conftest.$ac_ext >&5
925c2f3f 12080 ac_cv_header_arpa_inet_h=no
ba4481b5 12081fi
503d2be0 12082rm -f conftest.err conftest.$ac_ext
ba4481b5 12083fi
598a2813 12084echo "$as_me:12083: result: $ac_cv_header_arpa_inet_h" >&5
503d2be0
AS
12085echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
12086if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
12087 :
12088else
503d2be0 12089 ok_so_far=no
ba4481b5
DL
12090fi
12091
12092fi
12093if test $ok_so_far = yes; then
b936fae4 12094
925c2f3f 12095cat >>confdefs.h <<\EOF
ba4481b5 12096#define HAVE_INET_SOCKETS 1
925c2f3f 12097EOF
ba4481b5
DL
12098
12099fi
12100
12101if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 12102
925c2f3f 12103cat >>confdefs.h <<\EOF
ba4481b5 12104#define HAVE_AIX_SMT_EXP 1
925c2f3f 12105EOF
ba4481b5
DL
12106
12107fi
12108
598a2813 12109echo "$as_me:12108: checking whether system supports dynamic ptys" >&5
503d2be0 12110echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6
3d9fec71 12111if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
598a2813 12112 echo "$as_me:12111: result: yes" >&5
503d2be0 12113echo "${ECHO_T}yes" >&6
b936fae4 12114
925c2f3f 12115cat >>confdefs.h <<\EOF
3d9fec71 12116#define HAVE_DEV_PTMX 1
925c2f3f 12117EOF
3d9fec71
DL
12118
12119else
598a2813 12120 echo "$as_me:12119: result: no" >&5
503d2be0 12121echo "${ECHO_T}no" >&6
3d9fec71
DL
12122fi
12123
598a2813 12124echo "$as_me:12123: checking for pid_t" >&5
503d2be0
AS
12125echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
12126if test "${ac_cv_type_pid_t+set}" = set; then
12127 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 12128else
503d2be0 12129 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 12130#line 12124 "configure"
647847ea 12131#include "confdefs.h"
503d2be0
AS
12132$ac_includes_default
12133int
12134main ()
12135{
12136if ((pid_t *) 0)
12137 return 0;
12138if (sizeof (pid_t))
12139 return 0;
12140 ;
12141 return 0;
12142}
12143_ACEOF
12144rm -f conftest.$ac_objext
598a2813 12145if { (eval echo "$as_me:12144: \"$ac_compile\"") >&5
503d2be0
AS
12146 (eval $ac_compile) 2>&5
12147 ac_status=$?
598a2813 12148 echo "$as_me:12147: \$? = $ac_status" >&5
503d2be0
AS
12149 (exit $ac_status); } &&
12150 { ac_try='test -s conftest.$ac_objext'
598a2813 12151 { (eval echo "$as_me:12150: \"$ac_try\"") >&5
503d2be0
AS
12152 (eval $ac_try) 2>&5
12153 ac_status=$?
598a2813 12154 echo "$as_me:12153: \$? = $ac_status" >&5
503d2be0 12155 (exit $ac_status); }; }; then
647847ea
DL
12156 ac_cv_type_pid_t=yes
12157else
503d2be0
AS
12158 echo "$as_me: failed program was:" >&5
12159cat conftest.$ac_ext >&5
12160ac_cv_type_pid_t=no
647847ea 12161fi
503d2be0 12162rm -f conftest.$ac_objext conftest.$ac_ext
647847ea 12163fi
598a2813 12164echo "$as_me:12163: result: $ac_cv_type_pid_t" >&5
503d2be0
AS
12165echo "${ECHO_T}$ac_cv_type_pid_t" >&6
12166if test $ac_cv_type_pid_t = yes; then
12167 :
12168else
12169
925c2f3f 12170cat >>confdefs.h <<EOF
647847ea 12171#define pid_t int
925c2f3f 12172EOF
647847ea
DL
12173
12174fi
12175
503d2be0
AS
12176for ac_header in unistd.h vfork.h
12177do
12178as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
598a2813 12179echo "$as_me:12178: checking for $ac_header" >&5
503d2be0
AS
12180echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12181if eval "test \"\${$as_ac_Header+set}\" = set"; then
12182 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 12183else
925c2f3f
EZ
12184 cat >conftest.$ac_ext <<_ACEOF
12185#line 12179 "configure"
503d2be0
AS
12186#include "confdefs.h"
12187#include <$ac_header>
12188_ACEOF
598a2813 12189if { (eval echo "$as_me:12188: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
12190 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12191 ac_status=$?
12192 egrep -v '^ *\+' conftest.er1 >conftest.err
12193 rm -f conftest.er1
12194 cat conftest.err >&5
598a2813 12195 echo "$as_me:12194: \$? = $ac_status" >&5
503d2be0
AS
12196 (exit $ac_status); } >/dev/null; then
12197 if test -s conftest.err; then
12198 ac_cpp_err=$ac_c_preproc_warn_flag
12199 else
12200 ac_cpp_err=
12201 fi
647847ea 12202else
503d2be0
AS
12203 ac_cpp_err=yes
12204fi
12205if test -z "$ac_cpp_err"; then
925c2f3f 12206 eval "$as_ac_Header=yes"
647847ea 12207else
503d2be0 12208 echo "$as_me: failed program was:" >&5
647847ea 12209 cat conftest.$ac_ext >&5
925c2f3f 12210 eval "$as_ac_Header=no"
647847ea 12211fi
503d2be0 12212rm -f conftest.err conftest.$ac_ext
647847ea 12213fi
598a2813 12214echo "$as_me:12213: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
12215echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12216if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 12217 cat >>confdefs.h <<EOF
503d2be0 12218#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 12219EOF
647847ea 12220
73b77ee5 12221fi
503d2be0 12222done
73b77ee5 12223
503d2be0
AS
12224for ac_func in fork vfork
12225do
12226as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
598a2813 12227echo "$as_me:12226: checking for $ac_func" >&5
503d2be0
AS
12228echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12229if eval "test \"\${$as_ac_var+set}\" = set"; then
12230 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 12231else
503d2be0 12232 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 12233#line 12227 "configure"
fa0b693c
GM
12234#include "confdefs.h"
12235/* System header to define __stub macros and hopefully few prototypes,
503d2be0 12236 which can conflict with char $ac_func (); below. */
fa0b693c
GM
12237#include <assert.h>
12238/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12239#ifdef __cplusplus
12240extern "C"
12241#endif
fa0b693c 12242/* We use char because int might match the return type of a gcc2
503d2be0
AS
12243 builtin and then its argument prototype would still apply. */
12244char $ac_func ();
12245char (*f) ();
fa0b693c 12246
503d2be0
AS
12247int
12248main ()
12249{
fa0b693c
GM
12250/* The GNU C library defines this for functions which it implements
12251 to always fail with ENOSYS. Some functions are actually named
12252 something starting with __ and the normal name is an alias. */
503d2be0 12253#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
fa0b693c
GM
12254choke me
12255#else
503d2be0 12256f = $ac_func;
fa0b693c
GM
12257#endif
12258
503d2be0
AS
12259 ;
12260 return 0;
12261}
12262_ACEOF
12263rm -f conftest.$ac_objext conftest$ac_exeext
598a2813 12264if { (eval echo "$as_me:12263: \"$ac_link\"") >&5
503d2be0
AS
12265 (eval $ac_link) 2>&5
12266 ac_status=$?
598a2813 12267 echo "$as_me:12266: \$? = $ac_status" >&5
503d2be0
AS
12268 (exit $ac_status); } &&
12269 { ac_try='test -s conftest$ac_exeext'
598a2813 12270 { (eval echo "$as_me:12269: \"$ac_try\"") >&5
503d2be0
AS
12271 (eval $ac_try) 2>&5
12272 ac_status=$?
598a2813 12273 echo "$as_me:12272: \$? = $ac_status" >&5
503d2be0
AS
12274 (exit $ac_status); }; }; then
12275 eval "$as_ac_var=yes"
12276else
12277 echo "$as_me: failed program was:" >&5
12278cat conftest.$ac_ext >&5
12279eval "$as_ac_var=no"
12280fi
12281rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12282fi
598a2813 12283echo "$as_me:12282: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
12284echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12285if test `eval echo '${'$as_ac_var'}'` = yes; then
925c2f3f 12286 cat >>confdefs.h <<EOF
503d2be0 12287#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
925c2f3f 12288EOF
503d2be0 12289
fa0b693c 12290fi
503d2be0 12291done
fa0b693c 12292
503d2be0
AS
12293ac_cv_func_fork_works=$ac_cv_func_fork
12294if test "x$ac_cv_func_fork" = xyes; then
598a2813 12295 echo "$as_me:12294: checking for working fork" >&5
503d2be0
AS
12296echo $ECHO_N "checking for working fork... $ECHO_C" >&6
12297if test "${ac_cv_func_fork_works+set}" = set; then
12298 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 12299else
503d2be0
AS
12300 if test "$cross_compiling" = yes; then
12301 ac_cv_func_fork_works=cross
12302else
12303 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 12304