Fix some dependencies.
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
503d2be0 3# Generated by Autoconf 2.52.
ba4481b5 4#
503d2be0
AS
5# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
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.
9
503d2be0
AS
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
16
17# Sed expression to map a string onto a valid variable name.
18as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19
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"
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.
32as_me=`echo "$0" |sed 's,.*[\\/],,'`
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
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
66
67# NLS nuisances.
68$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
69$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
70$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
71$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
72$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
73$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
74$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
75$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
76
77# IFS
78# We need space, tab and new line, in precisely that order.
79as_nl='
80'
81IFS=" $as_nl"
82
83# CDPATH.
84$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
85
86# Name of the host.
87# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
88# so uname gets run too.
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=
99MFLAGS= MAKEFLAGS=
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
503d2be0
AS
183# Identity of this package.
184PACKAGE_NAME=
185PACKAGE_TARNAME=
186PACKAGE_VERSION=
187PACKAGE_STRING=
188PACKAGE_BUGREPORT=
ba4481b5
DL
189
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 \
322 | --no-cr | --no-c)
323 no_create=yes ;;
324
325 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
326 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
327 no_recursion=yes ;;
328
329 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
330 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
331 | --oldin | --oldi | --old | --ol | --o)
332 ac_prev=oldincludedir ;;
333 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
334 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
335 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
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 | '' ) ;;
501 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
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 [\\/$]* | ?:[\\/]* ) ;;
513 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
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
524# FIXME: should be removed in autoconf 3.0.
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.
544 ac_prog=$0
503d2be0 545 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
ba4481b5
DL
546 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
547 srcdir=$ac_confdir
548 if test ! -r $srcdir/$ac_unique_file; then
549 srcdir=..
550 fi
551else
552 ac_srcdir_defaulted=no
553fi
554if test ! -r $srcdir/$ac_unique_file; then
555 if test "$ac_srcdir_defaulted" = yes; then
503d2be0
AS
556 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
557 { (exit 1); exit 1; }; }
ba4481b5 558 else
503d2be0
AS
559 { echo "$as_me: error: cannot find sources in $srcdir" >&2
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.
603 cat <<EOF
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
624EOF
625
626 cat <<EOF
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]
653EOF
654
655 cat <<\EOF
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]
668 --host=HOST build programs to run on HOST [BUILD]
669EOF
670fi
671
672if test -n "$ac_init_help"; then
673
674 cat <<\EOF
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)
684 --without-gcc don't use GCC to compile Emacs if GCC is found
685 --without-pop don't support POP mail retrieval with movemail
686 --with-kerberos support Kerberos-authenticated POP
687 --with-kerberos5 support Kerberos version 5 authenticated POP
688 --with-hesiod support Hesiod to get the POP server host
689 --with-x-toolkit=KIT use an X toolkit (KIT = yes/lucid/athena/motif/no)
690 --with-xpm use -lXpm for displaying XPM images
691 --with-jpeg use -ljpeg for displaying JPEG images
692 --with-tiff use -ltiff for displaying TIFF images
693 --with-gif use -lungif for displaying GIF images
694 --with-png use -lpng for displaying PNG images
695 --without-toolkit-scroll-bars
cc227489
MB
696 don't use Motif or Xaw3d scroll bars
697 --without-xim don't use X11 XIM
503d2be0
AS
698 --with-x use the X Window System
699
700Some influential environment variables:
701 CC C compiler command
702 CFLAGS C compiler flags
703 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
704 nonstandard directory <lib dir>
705 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
706 headers in a nonstandard directory <include dir>
707 CPP C preprocessor
708
709Use these variables to override the choices made by `configure' or to help
710it to find libraries and programs with nonstandard names/locations.
711
712EOF
713fi
714
715if test "$ac_init_help" = "recursive"; then
716 # If there are subdirs, report their specific --help.
717 ac_popdir=`pwd`
718 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
719 cd $ac_subdir
720 # A "../" for each directory in /$ac_subdir.
721 ac_dots=`echo $ac_subdir |
722 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
723
724 case $srcdir in
725 .) # No --srcdir option. We are building in place.
726 ac_sub_srcdir=$srcdir ;;
727 [\\/]* | ?:[\\/]* ) # Absolute path.
728 ac_sub_srcdir=$srcdir/$ac_subdir ;;
729 *) # Relative path.
730 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
731 esac
732
733 # Check for guested configure; otherwise get Cygnus style configure.
734 if test -f $ac_sub_srcdir/configure.gnu; then
735 echo
736 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
737 elif test -f $ac_sub_srcdir/configure; then
738 echo
739 $SHELL $ac_sub_srcdir/configure --help=recursive
740 elif test -f $ac_sub_srcdir/configure.ac ||
741 test -f $ac_sub_srcdir/configure.in; then
742 echo
743 $ac_configure --help
744 else
745 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
746 fi
747 cd $ac_popdir
748 done
749fi
750
751test -n "$ac_init_help" && exit 0
752if $ac_init_version; then
753 cat <<\EOF
754
755Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
756Free Software Foundation, Inc.
757This configure script is free software; the Free Software Foundation
758gives unlimited permission to copy, distribute and modify it.
759EOF
760 exit 0
761fi
762exec 5>config.log
763cat >&5 <<EOF
764This file contains any messages produced by compilers while
765running configure, to aid debugging if configure makes a mistake.
766
767It was created by $as_me, which was
768generated by GNU Autoconf 2.52. Invocation command line was
769
770 $ $0 $@
771
772EOF
773{
774cat <<_ASUNAME
775## ---------- ##
776## Platform. ##
777## ---------- ##
778
779hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
780uname -m = `(uname -m) 2>/dev/null || echo unknown`
781uname -r = `(uname -r) 2>/dev/null || echo unknown`
782uname -s = `(uname -s) 2>/dev/null || echo unknown`
783uname -v = `(uname -v) 2>/dev/null || echo unknown`
784
785/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
786/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
787
788/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
789/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
790/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
791hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
792/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
793/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
794/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
795
796PATH = $PATH
797
798_ASUNAME
799} >&5
800
801cat >&5 <<EOF
802## ------------ ##
803## Core tests. ##
804## ------------ ##
805
806EOF
807
808# Keep a trace of the command line.
809# Strip out --no-create and --no-recursion so they do not pile up.
810# Also quote any args containing shell meta-characters.
811ac_configure_args=
812ac_sep=
813for ac_arg
814do
815 case $ac_arg in
816 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
817 | --no-cr | --no-c) ;;
818 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
819 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
820 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
821 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
822 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
823 ac_sep=" " ;;
824 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
825 ac_sep=" " ;;
826 esac
827 # Get rid of the leading space.
828done
829
830# When interrupted or exit'd, cleanup temporary files, and complete
831# config.log. We remove comments because anyway the quotes in there
832# would cause problems or look ugly.
833trap 'exit_status=$?
834 # Save into config.log some information that might help in debugging.
835 echo >&5
836 echo "## ----------------- ##" >&5
837 echo "## Cache variables. ##" >&5
838 echo "## ----------------- ##" >&5
839 echo >&5
840 # The following way of writing the cache mishandles newlines in values,
841{
842 (set) 2>&1 |
843 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
844 *ac_space=\ *)
845 sed -n \
846 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
847 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
848 ;;
849 *)
850 sed -n \
851 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
852 ;;
853 esac;
854} >&5
855 sed "/^$/d" confdefs.h >conftest.log
856 if test -s conftest.log; then
857 echo >&5
858 echo "## ------------ ##" >&5
859 echo "## confdefs.h. ##" >&5
860 echo "## ------------ ##" >&5
861 echo >&5
862 cat conftest.log >&5
863 fi
864 (echo; echo) >&5
865 test "$ac_signal" != 0 &&
866 echo "$as_me: caught signal $ac_signal" >&5
867 echo "$as_me: exit $exit_status" >&5
868 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
869 exit $exit_status
870 ' 0
871for ac_signal in 1 2 13 15; do
872 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
873done
874ac_signal=0
875
876# confdefs.h avoids OS command line length limits that DEFS can exceed.
877rm -rf conftest* confdefs.h
878# AIX cpp loses on an empty file, so make sure it contains at least a newline.
879echo >confdefs.h
ba4481b5 880
503d2be0 881# Let the site file select an alternate cache file if it wants to.
ba4481b5
DL
882# Prefer explicitly selected file to automatically selected ones.
883if test -z "$CONFIG_SITE"; then
884 if test "x$prefix" != xNONE; then
885 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
886 else
887 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
888 fi
889fi
890for ac_site_file in $CONFIG_SITE; do
891 if test -r "$ac_site_file"; then
ba5da88a 892 { echo "$as_me:892: loading site script $ac_site_file" >&5
503d2be0
AS
893echo "$as_me: loading site script $ac_site_file" >&6;}
894 cat "$ac_site_file" >&5
ba4481b5
DL
895 . "$ac_site_file"
896 fi
897done
898
899if test -r "$cache_file"; then
503d2be0
AS
900 # Some versions of bash will fail to source /dev/null (special
901 # files actually), so we avoid doing that.
902 if test -f "$cache_file"; then
ba5da88a 903 { echo "$as_me:903: loading cache $cache_file" >&5
503d2be0
AS
904echo "$as_me: loading cache $cache_file" >&6;}
905 case $cache_file in
906 [\\/]* | ?:[\\/]* ) . $cache_file;;
907 *) . ./$cache_file;;
908 esac
909 fi
ba4481b5 910else
ba5da88a 911 { echo "$as_me:911: creating cache $cache_file" >&5
503d2be0
AS
912echo "$as_me: creating cache $cache_file" >&6;}
913 >$cache_file
914fi
915
916# Check that the precious variables saved in the cache have kept the same
917# value.
918ac_cache_corrupted=false
919for ac_var in `(set) 2>&1 |
920 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
921 eval ac_old_set=\$ac_cv_env_${ac_var}_set
922 eval ac_new_set=\$ac_env_${ac_var}_set
923 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
924 eval ac_new_val="\$ac_env_${ac_var}_value"
925 case $ac_old_set,$ac_new_set in
926 set,)
ba5da88a 927 { echo "$as_me:927: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
928echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
929 ac_cache_corrupted=: ;;
930 ,set)
ba5da88a 931 { echo "$as_me:931: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
932echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
933 ac_cache_corrupted=: ;;
934 ,);;
935 *)
936 if test "x$ac_old_val" != "x$ac_new_val"; then
ba5da88a 937 { echo "$as_me:937: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 938echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
ba5da88a 939 { echo "$as_me:939: former value: $ac_old_val" >&5
503d2be0 940echo "$as_me: former value: $ac_old_val" >&2;}
ba5da88a 941 { echo "$as_me:941: current value: $ac_new_val" >&5
503d2be0
AS
942echo "$as_me: current value: $ac_new_val" >&2;}
943 ac_cache_corrupted=:
944 fi;;
945 esac
946 # Pass precious variables to config.status. It doesn't matter if
947 # we pass some twice (in addition to the command line arguments).
948 if test "$ac_new_set" = set; then
949 case $ac_new_val in
950 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
951 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
952 ac_configure_args="$ac_configure_args '$ac_arg'"
953 ;;
954 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
955 ;;
956 esac
957 fi
958done
959if $ac_cache_corrupted; then
ba5da88a 960 { echo "$as_me:960: error: changes in the environment can compromise the build" >&5
503d2be0 961echo "$as_me: error: changes in the environment can compromise the build" >&2;}
ba5da88a 962 { { echo "$as_me:962: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
963echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
964 { (exit 1); exit 1; }; }
ba4481b5
DL
965fi
966
967ac_ext=c
ba4481b5 968ac_cpp='$CPP $CPPFLAGS'
503d2be0
AS
969ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
970ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
971ac_compiler_gnu=$ac_cv_c_compiler_gnu
972
973case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
974 *c*,-n*) ECHO_N= ECHO_C='
975' ECHO_T=' ' ;;
976 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
977 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
978esac
979echo "#! $SHELL" >conftest.sh
980echo "exit 0" >>conftest.sh
981chmod +x conftest.sh
ba5da88a 982if { (echo "$as_me:982: PATH=\".;.\"; conftest.sh") >&5
503d2be0
AS
983 (PATH=".;."; conftest.sh) 2>&5
984 ac_status=$?
ba5da88a 985 echo "$as_me:985: \$? = $ac_status" >&5
503d2be0
AS
986 (exit $ac_status); }; then
987 ac_path_separator=';'
ba4481b5 988else
503d2be0 989 ac_path_separator=:
ba4481b5 990fi
503d2be0
AS
991PATH_SEPARATOR="$ac_path_separator"
992rm -f conftest.sh
ba4481b5 993
503d2be0 994ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 995
ba5da88a
PJ
996test "$program_prefix" != NONE &&
997 program_transform_name="s,^,$program_prefix,;$program_transform_name"
998# Use a double $ so make ignores it.
999test "$program_suffix" != NONE &&
1000 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1001# Double any \ or $. echo might interpret backslashes.
1002# By default was `s,x,x', remove it if useless.
1003cat <<\_ACEOF >conftest.sed
1004s/[\\$]/&&/g;s/;s,x,x,$//
1005_ACEOF
1006program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1007rm conftest.sed
1008
ba4481b5
DL
1009lispdir='${datadir}/emacs/${version}/lisp'
1010locallisppath='${datadir}/emacs/${version}/site-lisp:'\
1011'${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
1012lisppath='${locallisppath}:${lispdir}'
1013etcdir='${datadir}/emacs/${version}/etc'
1014archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1015docdir='${datadir}/emacs/${version}/etc'
1016
1017# Check whether --with-gcc or --without-gcc was given.
1018if test "${with_gcc+set}" = set; then
1019 withval="$with_gcc"
503d2be0
AS
1020
1021fi;
ba4481b5
DL
1022
1023# Check whether --with-pop or --without-pop was given.
1024if test "${with_pop+set}" = set; then
1025 withval="$with_pop"
243cf185 1026 if test "$withval" = yes; then
503d2be0 1027 cat >>confdefs.h <<\EOF
ba4481b5
DL
1028#define MAIL_USE_POP 1
1029EOF
1030
243cf185
DL
1031else :
1032fi
3d9fec71 1033else
503d2be0 1034 cat >>confdefs.h <<\EOF
3d9fec71
DL
1035#define MAIL_USE_POP 1
1036EOF
1037
503d2be0 1038fi;
ba4481b5 1039
a21616bd
KR
1040# Check whether --with-kerberos or --without-kerberos was given.
1041if test "${with_kerberos+set}" = set; then
1042 withval="$with_kerberos"
503d2be0 1043 cat >>confdefs.h <<\EOF
a21616bd
KR
1044#define KERBEROS 1
1045EOF
1046
503d2be0 1047fi;
a21616bd
KR
1048
1049# Check whether --with-kerberos5 or --without-kerberos5 was given.
1050if test "${with_kerberos5+set}" = set; then
1051 withval="$with_kerberos5"
1052 if test "${with_kerberos5+set}" = set; then
1053 if test "${with_kerberos+set}" != set; then
1054 with_kerberos=yes
503d2be0 1055 cat >>confdefs.h <<\EOF
a21616bd
KR
1056#define KERBEROS 1
1057EOF
1058
1059 fi
1060fi
503d2be0 1061cat >>confdefs.h <<\EOF
a21616bd
KR
1062#define KERBEROS5 1
1063EOF
1064
503d2be0 1065fi;
a21616bd 1066
ba4481b5
DL
1067# Check whether --with-hesiod or --without-hesiod was given.
1068if test "${with_hesiod+set}" = set; then
1069 withval="$with_hesiod"
503d2be0 1070 cat >>confdefs.h <<\EOF
ba4481b5
DL
1071#define HESIOD 1
1072EOF
1073
503d2be0 1074fi;
ba4481b5
DL
1075
1076# Check whether --with-x-toolkit or --without-x-toolkit was given.
1077if test "${with_x_toolkit+set}" = set; then
1078 withval="$with_x_toolkit"
1079 case "${withval}" in
1080 y | ye | yes ) val=athena ;;
1081 n | no ) val=no ;;
1082 l | lu | luc | luci | lucid ) val=lucid ;;
1083 a | at | ath | athe | athen | athena ) val=athena ;;
1084 m | mo | mot | moti | motif ) val=motif ;;
1085 * )
ba5da88a 1086{ { echo "$as_me:1086: error: \`--with-x-toolkit=$withval' is invalid\;
ba4481b5 1087this option's value should be \`yes', \`no', \`lucid', \`athena', or \`motif'.
503d2be0
AS
1088Currently, \`yes', \`athena' and \`lucid' are synonyms." >&5
1089echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid\;
1090this option's value should be \`yes', \`no', \`lucid', \`athena', or \`motif'.
1091Currently, \`yes', \`athena' and \`lucid' are synonyms." >&2;}
1092 { (exit 1); exit 1; }; }
ba4481b5
DL
1093 ;;
1094 esac
1095 with_x_toolkit=$val
1096
503d2be0 1097fi;
ba4481b5
DL
1098
1099# Check whether --with-xpm or --without-xpm was given.
1100if test "${with_xpm+set}" = set; then
1101 withval="$with_xpm"
503d2be0
AS
1102
1103fi;
ba4481b5
DL
1104
1105# Check whether --with-jpeg or --without-jpeg was given.
1106if test "${with_jpeg+set}" = set; then
1107 withval="$with_jpeg"
503d2be0
AS
1108
1109fi;
ba4481b5
DL
1110
1111# Check whether --with-tiff or --without-tiff was given.
1112if test "${with_tiff+set}" = set; then
1113 withval="$with_tiff"
503d2be0
AS
1114
1115fi;
ba4481b5
DL
1116
1117# Check whether --with-gif or --without-gif was given.
1118if test "${with_gif+set}" = set; then
1119 withval="$with_gif"
503d2be0
AS
1120
1121fi;
ba4481b5
DL
1122
1123# Check whether --with-png or --without-png was given.
1124if test "${with_png+set}" = set; then
1125 withval="$with_png"
503d2be0
AS
1126
1127fi;
ba4481b5
DL
1128
1129# Check whether --with-toolkit-scroll-bars or --without-toolkit-scroll-bars was given.
1130if test "${with_toolkit_scroll_bars+set}" = set; then
1131 withval="$with_toolkit_scroll_bars"
503d2be0
AS
1132
1133fi;
ba4481b5 1134
1d36487c
GM
1135# Check whether --with-xim or --without-xim was given.
1136if test "${with_xim+set}" = set; then
1137 withval="$with_xim"
1d36487c 1138
503d2be0 1139fi;
ba4481b5
DL
1140
1141#### Make srcdir absolute, if it isn't already. It's important to
17494071 1142#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
1143#### give you automounter prefixes, which can go away. We do all this
1144#### so Emacs can find its files when run uninstalled.
17494071
GM
1145## Make sure CDPATH doesn't affect cd (in case PWD is relative).
1146unset CDPATH
ba4481b5
DL
1147case "${srcdir}" in
1148 /* ) ;;
1149 . )
1150 ## We may be able to use the $PWD environment variable to make this
1151 ## absolute. But sometimes PWD is inaccurate.
17494071 1152 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".${PWD}" ;
ba4481b5
DL
1153 then
1154 srcdir="$PWD"
1155 else
1156 srcdir="`(cd ${srcdir}; pwd)`"
1157 fi
1158 ;;
1159 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
1160esac
1161
1162#### Check if the source directory already has a configured system in it.
1163if test `pwd` != `(cd ${srcdir} && pwd)` \
1164 && test -f "${srcdir}/src/config.h" ; then
ba5da88a 1165 { echo "$as_me:1165: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
1166 as a build directory right now; it has been configured in its own
1167 right. To configure in another directory as well, you MUST
1168 use GNU make. If you do not have GNU make, then you must
1169 now do \`make distclean' in ${srcdir},
1170 and then run $0 again." >&5
1171echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
1172 as a build directory right now; it has been configured in its own
1173 right. To configure in another directory as well, you MUST
1174 use GNU make. If you do not have GNU make, then you must
1175 now do \`make distclean' in ${srcdir},
503d2be0 1176 and then run $0 again." >&2;}
ba4481b5
DL
1177
1178 extrasub='/^VPATH[ ]*=/c\
1179vpath %.c $(srcdir)\
1180vpath %.h $(srcdir)\
1181vpath %.y $(srcdir)\
1182vpath %.l $(srcdir)\
1183vpath %.s $(srcdir)\
1184vpath %.in $(srcdir)\
1185vpath %.texi $(srcdir)'
1186fi
1187
1188#### Given the configuration name, set machfile and opsysfile to the
1189#### names of the m/*.h and s/*.h files we should use.
1190
1191### Canonicalize the configuration name.
1192
1193ac_aux_dir=
1194for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1195 if test -f $ac_dir/install-sh; then
1196 ac_aux_dir=$ac_dir
1197 ac_install_sh="$ac_aux_dir/install-sh -c"
1198 break
1199 elif test -f $ac_dir/install.sh; then
1200 ac_aux_dir=$ac_dir
1201 ac_install_sh="$ac_aux_dir/install.sh -c"
1202 break
503d2be0
AS
1203 elif test -f $ac_dir/shtool; then
1204 ac_aux_dir=$ac_dir
1205 ac_install_sh="$ac_aux_dir/shtool install -c"
1206 break
ba4481b5
DL
1207 fi
1208done
1209if test -z "$ac_aux_dir"; then
ba5da88a 1210 { { echo "$as_me:1210: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
503d2be0
AS
1211echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1212 { (exit 1); exit 1; }; }
ba4481b5 1213fi
503d2be0
AS
1214ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1215ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1216ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ba4481b5
DL
1217
1218# Make sure we can run config.sub.
503d2be0 1219$ac_config_sub sun4 >/dev/null 2>&1 ||
ba5da88a 1220 { { echo "$as_me:1220: error: cannot run $ac_config_sub" >&5
503d2be0
AS
1221echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1222 { (exit 1); exit 1; }; }
1223
ba5da88a 1224echo "$as_me:1224: checking build system type" >&5
503d2be0
AS
1225echo $ECHO_N "checking build system type... $ECHO_C" >&6
1226if test "${ac_cv_build+set}" = set; then
1227 echo $ECHO_N "(cached) $ECHO_C" >&6
1228else
1229 ac_cv_build_alias=$build_alias
1230test -z "$ac_cv_build_alias" &&
1231 ac_cv_build_alias=`$ac_config_guess`
1232test -z "$ac_cv_build_alias" &&
ba5da88a 1233 { { echo "$as_me:1233: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
1234echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1235 { (exit 1); exit 1; }; }
1236ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
ba5da88a 1237 { { echo "$as_me:1237: error: $ac_config_sub $ac_cv_build_alias failed." >&5
503d2be0
AS
1238echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1239 { (exit 1); exit 1; }; }
1240
1241fi
ba5da88a 1242echo "$as_me:1242: result: $ac_cv_build" >&5
503d2be0
AS
1243echo "${ECHO_T}$ac_cv_build" >&6
1244build=$ac_cv_build
1245build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1246build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1247build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1248
409d9577 1249echo "$as_me:1249: checking host system type" >&5
503d2be0
AS
1250echo $ECHO_N "checking host system type... $ECHO_C" >&6
1251if test "${ac_cv_host+set}" = set; then
1252 echo $ECHO_N "(cached) $ECHO_C" >&6
1253else
1254 ac_cv_host_alias=$host_alias
1255test -z "$ac_cv_host_alias" &&
1256 ac_cv_host_alias=$ac_cv_build_alias
1257ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
409d9577 1258 { { echo "$as_me:1258: error: $ac_config_sub $ac_cv_host_alias failed" >&5
503d2be0
AS
1259echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1260 { (exit 1); exit 1; }; }
1261
1262fi
409d9577 1263echo "$as_me:1263: result: $ac_cv_host" >&5
503d2be0
AS
1264echo "${ECHO_T}$ac_cv_host" >&6
1265host=$ac_cv_host
1266host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1267host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1268host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ba4481b5
DL
1269
1270canonical=$host
531a3336 1271configuration=${host_alias-$host}
ba4481b5 1272
ba4481b5
DL
1273### If you add support for a new configuration, add code to this
1274### switch statement to recognize your configuration name and select
1275### the appropriate operating system and machine description files.
1276
1277### You would hope that you could choose an m/*.h file pretty much
1278### based on the machine portion of the configuration name, and an s-
1279### file based on the operating system portion. However, it turns out
1280### that each m/*.h file is pretty manufacturer-specific - for
1281### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
1282### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
1283### machines. So we basically have to have a special case for each
1284### configuration name.
1285###
1286### As far as handling version numbers on operating systems is
1287### concerned, make sure things will fail in a fixable way. If
1288### /etc/MACHINES doesn't say anything about version numbers, be
1289### prepared to handle anything reasonably. If version numbers
1290### matter, be sure /etc/MACHINES says something about it.
1291###
1292### Eric Raymond says we should accept strings like "sysvr4" to mean
1293### "System V Release 4"; he writes, "The old convention encouraged
1294### confusion between `system' and `release' levels'."
1295
1296machine='' opsys='' unported=no
1297case "${canonical}" in
1298
1096bcc0
GM
1299 ## FreeBSD ports
1300 *-*-freebsd* )
1301 opsys=freebsd
1302 case "${canonical}" in
1303 alpha*-*-freebsd*) machine=alpha ;;
1304 i[3456]86-*-freebsd*) machine=intel386 ;;
1305 esac
1306 ;;
1307
ba4481b5
DL
1308 ## NetBSD ports
1309 *-*-netbsd* )
1310 opsys=netbsd
1311 case "${canonical}" in
1312 alpha*-*-netbsd*) machine=alpha ;;
1313 i[3456]86-*-netbsd*) machine=intel386 ;;
1314 m68k-*-netbsd*)
1315 # This is somewhat bogus.
1316 machine=hp9000s300 ;;
1317 powerpc-apple-netbsd*) machine=macppc ;;
1318 mips-*-netbsd*) machine=pmax ;;
2df636f4 1319 mipsel-*-netbsd*) machine=pmax ;;
ba4481b5 1320 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 1321 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 1322 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 1323 vax-*-netbsd*) machine=vax ;;
2df636f4 1324 arm-*-netbsd*) machine=arm ;;
ba4481b5
DL
1325 esac
1326 ;;
1327
1328 ## OpenBSD ports
1329 *-*-openbsd* )
1330 opsys=openbsd
1331 case "${canonical}" in
1332 alpha*-*-openbsd*) machine=alpha ;;
1333 i386-*-openbsd*) machine=intel386 ;;
1334 m68k-*-openbsd*) machine=hp9000s300 ;;
1335 mipsel-*-openbsd*) machine=pmax ;;
1336 ns32k-*-openbsd*) machine=ns32000 ;;
1337 sparc-*-openbsd*) machine=sparc ;;
1338 vax-*-openbsd*) machine=vax ;;
1339 esac
1340 ;;
1341
1342 ## Acorn RISCiX:
1343 arm-acorn-riscix1.1* )
1344 machine=acorn opsys=riscix1-1
1345 ;;
1346 arm-acorn-riscix1.2* | arm-acorn-riscix )
1347 ## This name is riscix12 instead of riscix1.2
1348 ## to avoid a file name conflict on MSDOS.
1349 machine=acorn opsys=riscix12
1350 ;;
1351
1352 ## BSDI ports
1353 *-*-bsdi* )
1354 opsys=bsdi
1355 case "${canonical}" in
1356 i[345]86-*-bsdi*) machine=intel386 ;;
1357 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 1358 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
1359 esac
1360 case "${canonical}" in
1361 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
1362 *-*-bsdi2.0* ) opsys=bsdos2 ;;
1363 *-*-bsdi2* ) opsys=bsdos2-1 ;;
1364 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 1365 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
1366 esac
1367 ;;
1368
1369 ## Alliant machines
1370 ## Strictly speaking, we need the version of the alliant operating
1371 ## system to choose the right machine file, but currently the
1372 ## configuration name doesn't tell us enough to choose the right
1373 ## one; we need to give alliants their own operating system name to
1374 ## do this right. When someone cares, they can help us.
1375 fx80-alliant-* )
1376 machine=alliant4 opsys=bsd4-2
1377 ;;
1378 i860-alliant-* )
1379 machine=alliant-2800 opsys=bsd4-3
1380 ;;
1381
1382 ## Alpha (DEC) machines.
1383 alpha*-dec-osf* )
1384 machine=alpha opsys=osf1
1385 # This is needed to find X11R6.1 libraries for certain tests.
1386 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
1387 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
1388 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
1389 # due to non-traditional preprocessing with the current compiler
1390 # defaults. OSF 4 can also have that compiler version, and there
1391 # seems always to have been a usable /usr/bin/cpp.
1392 NON_GNU_CPP=/usr/bin/cpp
ca512671 1393 case "${canonical}" in
a55b799a 1394 alpha*-dec-osf[5-9]*)
bb17930d 1395 opsys=osf5-0 ;;
ca512671 1396 esac
ba4481b5
DL
1397 ;;
1398
1399 alpha*-*-linux-gnu* )
1400 machine=alpha opsys=gnu-linux
1401 ;;
1402
c4bb2108
DL
1403 arm*-*-linux-gnu* )
1404 machine=arm opsys=gnu-linux
1405 ;;
1406
1407 ppc-*-linux | \
1408 powerpc-*-linux* )
3aeecf97 1409 machine=macppc opsys=gnu-linux
c4bb2108
DL
1410 ;;
1411
ba4481b5
DL
1412 ## Altos 3068
1413 m68*-altos-sysv* )
1414 machine=altos opsys=usg5-2
1415 ;;
1416
1417 ## Amdahl UTS
1418 580-amdahl-sysv* )
1419 machine=amdahl opsys=usg5-2-2
1420 ;;
1421
1422 ## Apollo, Domain/OS
1423 m68*-apollo-* )
1424 machine=apollo opsys=bsd4-3
1425 ;;
1426
1427 ## AT&T 3b2, 3b5, 3b15, 3b20
1428 we32k-att-sysv* )
1429 machine=att3b opsys=usg5-2-2
1430 ;;
1431
1432 ## AT&T 3b1 - The Mighty Unix PC!
1433 m68*-att-sysv* )
1434 machine=7300 opsys=usg5-2-2
1435 ;;
1436
1437 ## Bull dpx20
1438 rs6000-bull-bosx* )
1439 machine=ibmrs6000 opsys=aix3-2
1440 ;;
1441
1442 ## Bull dpx2
1443 m68*-bull-sysv3* )
1444 machine=dpx2 opsys=usg5-3
1445 ;;
1446
1447 ## Bull sps7
1448 m68*-bull-sysv2* )
1449 machine=sps7 opsys=usg5-2
1450 ;;
1451
1452 ## CCI 5/32, 6/32 -- see "Tahoe".
1453
1454 ## Celerity
1455 ## I don't know what configuration name to use for this; config.sub
1456 ## doesn't seem to know anything about it. Hey, Celerity users, get
1457 ## in touch with us!
1458 celerity-celerity-bsd* )
1459 machine=celerity opsys=bsd4-2
1460 ;;
1461
1462 ## Clipper
1463 ## What operating systems does this chip run that Emacs has been
1464 ## tested on?
1465 clipper-* )
1466 machine=clipper
1467 ## We'll use the catch-all code at the bottom to guess the
1468 ## operating system.
1469 ;;
1470
1471 ## Convex
1472 *-convex-bsd* | *-convex-convexos* )
1473 machine=convex opsys=bsd4-3
1474 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
1475 NON_GNU_CPP="cc -E -P"
1476 ;;
1477
1478 ## Cubix QBx/386
1479 i[3456]86-cubix-sysv* )
1480 machine=intel386 opsys=usg5-3
1481 ;;
1482
1483 ## Cydra 5
1484 cydra*-cydrome-sysv* )
1485 machine=cydra5 opsys=usg5-3
1486 ;;
1487
1488 ## Data General AViiON Machines
1489 ## DG changed naming conventions with the release of 5.4.4.10, they
1490 ## dropped the initial 5.4 but left the intervening R. Because of the
1491 ## R this shouldn't conflict with older versions of the OS (which I
1492 ## think were named like dgux4.*). In addition, DG new AViiONs series
1493 ## uses either Motorola M88k or Intel Pentium CPUs.
1494 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
1495 machine=aviion opsys=dgux4
1496 ;;
1497 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
1498 ## This name is dgux5-4-3 instead of dgux5-4r3
1499 ## to avoid a file name conflict on MSDOS.
1500 machine=aviion opsys=dgux5-4-3
1501 ;;
1502 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
1503 machine=aviion opsys=dgux5-4r2
1504 ;;
1505 m88k-dg-dgux* )
1506 machine=aviion opsys=dgux
1507 ;;
1508
1509 ## Data General AViiON Intel (x86) Machines
1510 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
1511 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
1512 i[345]86-dg-dguxR4* )
1513 machine=aviion-intel opsys=dgux4
1514 ;;
1515
1516 ## DECstations
1517 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1518 machine=pmax opsys=bsd4-2
1519 ;;
1520 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1521 machine=pmax opsys=bsd4-3
1522 ;;
1523 mips-dec-ultrix* )
1524 machine=pmax opsys=ultrix4-3
1525 ;;
1526 mips-dec-osf* )
1527 machine=pmax opsys=osf1
1528 ;;
1529 mips-dec-mach_bsd4.3* )
1530 machine=pmax opsys=mach-bsd4-3
1531 ;;
1532
1533 ## Motorola Delta machines
1534 m68k-motorola-sysv* | m68000-motorola-sysv* )
1535 machine=delta opsys=usg5-3
1536 if test -z "`type gnucc | grep 'not found'`"
1537 then
1538 if test -s /etc/167config
1539 then CC="gnucc -m68040"
1540 else CC="gnucc -m68881"
1541 fi
1542 else
1543 if test -z "`type gcc | grep 'not found'`"
1544 then CC=gcc
1545 else CC=cc
1546 fi
1547 fi
1548 ;;
1549 m88k-motorola-sysv4* )
1550 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1551 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1552 # I hope there are not other 4.0 versions for this machine
1553 # which really need usg5-4 instead.
1554 machine=delta88k opsys=usg5-4-2
1555 ;;
1556 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1557 machine=delta88k opsys=usg5-3
1558 ;;
1559
1560 ## Dual machines
1561 m68*-dual-sysv* )
1562 machine=dual opsys=usg5-2
1563 ;;
1564 m68*-dual-uniplus* )
1565 machine=dual opsys=unipl5-2
1566 ;;
1567
1568 ## Elxsi 6400
1569 elxsi-elxsi-sysv* )
1570 machine=elxsi opsys=usg5-2
1571 ;;
1572
1573 ## Encore machines
1574 ns16k-encore-bsd* )
1575 machine=ns16000 opsys=umax
1576 ;;
1577
65171e3a
DL
1578 ## The GEC 63 - apparently, this port isn't really finished yet.
1579 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
1580
1581 ## Gould Power Node and NP1
1582 pn-gould-bsd4.2* )
1583 machine=gould opsys=bsd4-2
1584 ;;
1585 pn-gould-bsd4.3* )
1586 machine=gould opsys=bsd4-3
1587 ;;
1588 np1-gould-bsd* )
1589 machine=gould-np1 opsys=bsd4-3
1590 ;;
1591
1592 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
1593 ## as far as Emacs is concerned).
1594 m88k-harris-cxux* )
1595 # Build needs to be different on 7.0 and later releases
1596 case "`uname -r`" in
1597 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
1598 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
1599 esac
1600 NON_GNU_CPP="/lib/cpp"
1601 ;;
1602 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
1603 m68k-harris-cxux* )
1604 machine=nh3000 opsys=cxux
1605 ;;
1606 ## Harris power pc NightHawk running Power UNIX (Series 6000)
1607 powerpc-harris-powerunix )
1608 machine=nh6000 opsys=powerunix
1609 NON_GNU_CPP="cc -Xo -E -P"
1610 ;;
1611 ## SR2001/SR2201 running HI-UX/MPP
1612 hppa1.1-hitachi-hiuxmpp* )
1613 machine=sr2k opsys=hiuxmpp
1614 ;;
89a336fa
GM
1615 hppa1.1-hitachi-hiuxwe2* )
1616 machine=sr2k opsys=hiuxwe2
1617 ;;
ba4481b5
DL
1618 ## Honeywell XPS100
1619 xps*-honeywell-sysv* )
1620 machine=xps100 opsys=usg5-2
1621 ;;
1622
1623 ## HP 9000 series 200 or 300
1624 m68*-hp-bsd* )
1625 machine=hp9000s300 opsys=bsd4-3
1626 ;;
1627 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
1628 m68*-hp-hpux* )
1629 case "`uname -r`" in
1630 ## Someone's system reports A.B8.05 for this.
1631 ## I wonder what other possibilities there are.
1632 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
1633 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
1634 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
1635 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
1636 *) machine=hp9000s300 opsys=hpux ;;
1637 esac
1638 ;;
1639
1640 ## HP 9000 series 700 and 800, running HP/UX
1641 hppa*-hp-hpux7* )
1642 machine=hp800 opsys=hpux
1643 ;;
1644 hppa*-hp-hpux8* )
1645 machine=hp800 opsys=hpux8
1646 ;;
1647 hppa*-hp-hpux9shr* )
1648 machine=hp800 opsys=hpux9shr
1649 ;;
1650 hppa*-hp-hpux9* )
1651 machine=hp800 opsys=hpux9
1652 ;;
cc227489 1653 hppa*-hp-hpux10* )
ba4481b5
DL
1654 machine=hp800 opsys=hpux10
1655 ;;
cc227489
MB
1656 hppa*-hp-hpux1[1-9]* )
1657 machine=hp800 opsys=hpux11
1658 ;;
ba4481b5 1659
409d9577
GM
1660 hppa*-*-linux-gnu* )
1661 machine=hp800 opsys=gnu-linux
1662 ;;
1663
ba4481b5
DL
1664 ## HP 9000 series 700 and 800, running HP/UX
1665 hppa*-hp-hpux* )
1666 ## Cross-compilation? Nah!
1667 case "`uname -r`" in
1668 ## Someone's system reports A.B8.05 for this.
1669 ## I wonder what other possibilities there are.
1670 *.B8.* ) machine=hp800 opsys=hpux8 ;;
1671 *.08.* ) machine=hp800 opsys=hpux8 ;;
1672 *.09.* ) machine=hp800 opsys=hpux9 ;;
1673 *) machine=hp800 opsys=hpux10 ;;
1674 esac
1675 ;;
1676 hppa*-*-nextstep* )
1677 machine=hp800 opsys=nextstep
1678 ;;
1679
1680 ## Orion machines
1681 orion-orion-bsd* )
1682 machine=orion opsys=bsd4-2
1683 ;;
1684 clipper-orion-bsd* )
1685 machine=orion105 opsys=bsd4-2
1686 ;;
1687
1688 ## IBM machines
1689 i[3456]86-ibm-aix1.1* )
1690 machine=ibmps2-aix opsys=usg5-2-2
1691 ;;
1692 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
1693 machine=ibmps2-aix opsys=usg5-3
1694 ;;
1695 i370-ibm-aix*)
1696 machine=ibm370aix opsys=usg5-3
1697 ;;
138f0859
GM
1698 s390-*-linux-gnu)
1699 machine=ibms390 opsys=gnu-linux
1700 ;;
ba4481b5
DL
1701 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
1702 machine=ibmrs6000 opsys=aix3-1
1703 ;;
1704 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
1705 machine=ibmrs6000 opsys=aix3-2-5
1706 ;;
1707 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
1708 machine=ibmrs6000 opsys=aix4-1
1709 ;;
1710 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
1711 machine=ibmrs6000 opsys=aix4-2
1712 ;;
1713 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
1714 machine=ibmrs6000 opsys=aix4
1715 ;;
1716 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
1717 machine=ibmrs6000 opsys=aix4-1
1718 ;;
1719 rs6000-ibm-aix* | powerpc-ibm-aix* )
1720 machine=ibmrs6000 opsys=aix3-2
1721 ;;
1722 romp-ibm-bsd4.3* )
1723 machine=ibmrt opsys=bsd4-3
1724 ;;
1725 romp-ibm-bsd4.2* )
1726 machine=ibmrt opsys=bsd4-2
1727 ;;
1728 romp-ibm-aos4.3* )
1729 machine=ibmrt opsys=bsd4-3
1730 ;;
1731 romp-ibm-aos4.2* )
1732 machine=ibmrt opsys=bsd4-2
1733 ;;
1734 romp-ibm-aos* )
1735 machine=ibmrt opsys=bsd4-3
1736 ;;
1737 romp-ibm-bsd* )
1738 machine=ibmrt opsys=bsd4-3
1739 ;;
1740 romp-ibm-aix* )
1741 machine=ibmrt-aix opsys=usg5-2-2
1742 ;;
1743
1744 ## Integrated Solutions `Optimum V'
1745 m68*-isi-bsd4.2* )
1746 machine=isi-ov opsys=bsd4-2
1747 ;;
1748 m68*-isi-bsd4.3* )
1749 machine=isi-ov opsys=bsd4-3
1750 ;;
1751
1752 ## Intel 386 machines where we do care about the manufacturer
1753 i[3456]86-intsys-sysv* )
1754 machine=is386 opsys=usg5-2-2
1755 ;;
1756
1757 ## Prime EXL
1758 i[3456]86-prime-sysv* )
1759 machine=i386 opsys=usg5-3
1760 ;;
1761
1762 ## Sequent Symmetry running Dynix
1763 i[3456]86-sequent-bsd* )
1764 machine=symmetry opsys=bsd4-3
1765 ;;
1766
1767 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
1768 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
1769 machine=sequent-ptx opsys=ptx4
1770 NON_GNU_CPP=/lib/cpp
1771 ;;
1772
1773 ## Sequent Symmetry running DYNIX/ptx
1774 ## Use the old cpp rather than the newer ANSI one.
1775 i[3456]86-sequent-ptx* )
1776 machine=sequent-ptx opsys=ptx
1777 NON_GNU_CPP="/lib/cpp"
1778 ;;
1779
1780 ## ncr machine running svr4.3.
1781 i[3456]86-ncr-sysv4.3 )
1782 machine=ncr386 opsys=usg5-4-3
1783 ;;
1784
1785 ## Unspecified sysv on an ncr machine defaults to svr4.2.
1786 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
1787 i[3456]86-ncr-sysv* )
1788 machine=ncr386 opsys=usg5-4-2
1789 ;;
1790
1791 ## Intel Paragon OSF/1
1792 i860-intel-osf1* )
1793 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
1794 ;;
1795
1796 ## Intel 860
1797 i860-*-sysv4* )
1798 machine=i860 opsys=usg5-4
1799 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
1800 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
1801 ;;
1802
c76e04a8
GM
1803 ## Macintosh PowerPC
1804 powerpc*-*-linux-gnu* )
1805 machine=macppc opsys=gnu-linux
1806 ;;
1807
ba4481b5
DL
1808 ## Masscomp machines
1809 m68*-masscomp-rtu* )
1810 machine=masscomp opsys=rtu
1811 ;;
1812
1813 ## Megatest machines
1814 m68*-megatest-bsd* )
1815 machine=mega68 opsys=bsd4-2
1816 ;;
1817
1818 ## Workstations sold by MIPS
1819 ## This is not necessarily all workstations using the MIPS processor -
1820 ## Irises are produced by SGI, and DECstations by DEC.
1821
1822 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
1823 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
1824 ## it gives for choosing between the alternatives seems to be "Use
1825 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
1826 ## the BSD world." I'll assume that these are instructions for
1827 ## handling two odd situations, and that every other situation
1828 ## should use mips.h and usg5-2-2, they being listed first.
1829 mips-mips-usg* )
1830 machine=mips4
1831 ## Fall through to the general code at the bottom to decide on the OS.
1832 ;;
1833 mips-mips-riscos4* )
1834 machine=mips4 opsys=bsd4-3
1835 NON_GNU_CC="cc -systype bsd43"
1836 NON_GNU_CPP="cc -systype bsd43 -E"
1837 ;;
1838 mips-mips-riscos5* )
1839 machine=mips4 opsys=riscos5
1840 NON_GNU_CC="cc -systype bsd43"
1841 NON_GNU_CPP="cc -systype bsd43 -E"
1842 ;;
1843 mips-mips-bsd* )
1844 machine=mips opsys=bsd4-3
1845 ;;
1846 mips-mips-* )
1847 machine=mips opsys=usg5-2-2
1848 ;;
1849
1850 ## NeXT
1851 m68*-next-* | m68k-*-nextstep* )
1852 machine=m68k opsys=nextstep
1853 ;;
1854
1855 ## The complete machine from National Semiconductor
1856 ns32k-ns-genix* )
1857 machine=ns32000 opsys=usg5-2
1858 ;;
1859
1860 ## NCR machines
1861 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
1862 machine=tower32 opsys=usg5-2-2
1863 ;;
1864 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
1865 machine=tower32v3 opsys=usg5-3
1866 ;;
1867
1868 ## NEC EWS4800
1869 mips-nec-sysv4*)
1870 machine=ews4800 opsys=ux4800
1871 ;;
1872
1873 ## Nixdorf Targon 31
1874 m68*-nixdorf-sysv* )
1875 machine=targon31 opsys=usg5-2-2
1876 ;;
1877
1878 ## Nu (TI or LMI)
1879 m68*-nu-sysv* )
1880 machine=nu opsys=usg5-2
1881 ;;
1882
1883 ## Plexus
1884 m68*-plexus-sysv* )
1885 machine=plexus opsys=usg5-2
1886 ;;
1887
1888 ## PowerPC reference platform
1889 powerpcle-*-solaris2* )
1890 machine=prep
1891 opsys=sol2-5
1892 ;;
1893
1894 ## Pyramid machines
1895 ## I don't really have any idea what sort of processor the Pyramid has,
1896 ## so I'm assuming it is its own architecture.
1897 pyramid-pyramid-bsd* )
1898 machine=pyramid opsys=bsd4-2
1899 ;;
1900
1901 ## Sequent Balance
1902 ns32k-sequent-bsd4.2* )
1903 machine=sequent opsys=bsd4-2
1904 ;;
1905 ns32k-sequent-bsd4.3* )
1906 machine=sequent opsys=bsd4-3
1907 ;;
1908
1909 ## Siemens Nixdorf
1910 mips-siemens-sysv* | mips-sni-sysv*)
1911 machine=mips-siemens opsys=usg5-4
1912 NON_GNU_CC=/usr/ccs/bin/cc
1913 NON_GNU_CPP=/usr/ccs/lib/cpp
1914 ;;
1915
1916 ## Silicon Graphics machines
1917 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
1918 m68*-sgi-iris3.5* )
1919 machine=irist opsys=iris3-5
1920 ;;
1921 m68*-sgi-iris3.6* | m68*-sgi-iris*)
1922 machine=irist opsys=iris3-6
1923 ;;
1924 ## Iris 4D
1925 mips-sgi-irix3* )
1926 machine=iris4d opsys=irix3-3
1927 ;;
1928 mips-sgi-irix4* )
1929 machine=iris4d opsys=irix4-0
1930 ;;
1931 mips-sgi-irix6.5 )
1932 machine=iris4d opsys=irix6-5
946173ad
DL
1933 # Without defining _LANGUAGE_C, things get masked out in the headers
1934 # so that, for instance, grepping for `free' in stdlib.h fails and
1935 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
1936 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 1937 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
1938 ;;
1939 mips-sgi-irix6* )
1940 machine=iris4d opsys=irix6-0
c4bb2108 1941 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
1942 # but presumably it does no harm.
1943 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 1944 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
1945 NON_GCC_TEST_OPTIONS=-32
1946 ;;
1947 mips-sgi-irix5.[01]* )
1948 machine=iris4d opsys=irix5-0
1949 ;;
1950 mips-sgi-irix5* | mips-sgi-irix* )
1951 machine=iris4d opsys=irix5-2
1952 ;;
1953
1954 ## SONY machines
1955 m68*-sony-bsd4.2* )
1956 machine=news opsys=bsd4-2
1957 ;;
1958 m68*-sony-bsd4.3* )
1959 machine=news opsys=bsd4-3
1960 ;;
1961 m68*-sony-newsos3* | m68*-sony-news3*)
1962 machine=news opsys=bsd4-3
1963 ;;
1964 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
1965 machine=news-risc opsys=bsd4-3
1966 ;;
1967 mips-sony-newsos6* )
1968 machine=news-r6 opsys=newsos6
1969 ;;
1970 mips-sony-news* )
1971 machine=news-risc opsys=newsos5
1972 ;;
1973
1974 ## Stride
1975 m68*-stride-sysv* )
1976 machine=stride opsys=usg5-2
1977 ;;
1978
1979 ## Suns
1980 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
1981 machine=sparc opsys=gnu-linux
1982 ;;
1983
d054101f 1984 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
1985 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
1986 | rs6000-*-solaris2*)
1987 case "${canonical}" in
1988 m68*-sunos1* ) machine=sun1 ;;
1989 m68*-sunos2* ) machine=sun2 ;;
1990 m68* ) machine=sun3 ;;
1991 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
1992 i[3456]86-*-* ) machine=intel386 ;;
1993 powerpcle* ) machine=powerpcle ;;
1994 powerpc* | rs6000* ) machine=ibmrs6000 ;;
1995 sparc* ) machine=sparc ;;
1996 * ) unported=yes ;;
1997 esac
1998 case "${canonical}" in
1999 ## The Sun386 didn't get past 4.0.
2000 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2001 *-sunos4.0* ) opsys=sunos4-0 ;;
2002 *-sunos4.1.[3-9]*noshare )
2003 ## This name is sunos413 instead of sunos4-1-3
2004 ## to avoid a file name conflict on MSDOS.
2005 opsys=sunos413
2006 NON_GNU_CPP=/usr/lib/cpp
2007 NON_GCC_TEST_OPTIONS=-Bstatic
2008 GCC_TEST_OPTIONS=-static
2009 ;;
2010 *-sunos4.1.[3-9]* | *-sunos4shr*)
2011 opsys=sunos4shr
2012 NON_GNU_CPP=/usr/lib/cpp
2013 ;;
2014 *-sunos4* | *-sunos )
2015 opsys=sunos4-1
2016 NON_GCC_TEST_OPTIONS=-Bstatic
2017 GCC_TEST_OPTIONS=-static
2018 ;;
2019 *-sunos5.3* | *-solaris2.3* )
2020 opsys=sol2-3
2021 NON_GNU_CPP=/usr/ccs/lib/cpp
2022 ;;
2023 *-sunos5.4* | *-solaris2.4* )
2024 opsys=sol2-4
2025 NON_GNU_CPP=/usr/ccs/lib/cpp
2026 RANLIB="ar -ts"
2027 ;;
2028 *-sunos5.5* | *-solaris2.5* )
2029 opsys=sol2-5
2030 NON_GNU_CPP=/usr/ccs/lib/cpp
2031 RANLIB="ar -ts"
2032 ;;
2033 *-sunos5* | *-solaris* )
2034 opsys=sol2-5
2035 NON_GNU_CPP=/usr/ccs/lib/cpp
2036 ;;
2037 * ) opsys=bsd4-2 ;;
2038 esac
2039 ## Watch out for a compiler that we know will not work.
2040 case "${canonical}" in
2041 *-solaris* | *-sunos5* )
2042 if [ "x$CC" = x/usr/ucb/cc ]; then
2043 ## /usr/ucb/cc doesn't work;
2044 ## we should find some other compiler that does work.
2045 unset CC
2046 fi
2047 ;;
2048 *) ;;
2049 esac
2050 ;;
2051 sparc-*-nextstep* )
2052 machine=sparc opsys=nextstep
2053 ;;
2054
2055 ## Tadpole 68k
2056 m68*-tadpole-sysv* )
2057 machine=tad68k opsys=usg5-3
2058 ;;
2059
2060 ## Tahoe machines
2061 tahoe-tahoe-bsd4.2* )
2062 machine=tahoe opsys=bsd4-2
2063 ;;
2064 tahoe-tahoe-bsd4.3* )
2065 machine=tahoe opsys=bsd4-3
2066 ;;
2067
2068 ## Tandem Integrity S2
2069 mips-tandem-sysv* )
2070 machine=tandem-s2 opsys=usg5-3
2071 ;;
2072
2073 ## Tektronix XD88
2074 m88k-tektronix-sysv3* )
2075 machine=tekxd88 opsys=usg5-3
2076 ;;
2077
2078 ## Tektronix 16000 box (6130?)
2079 ns16k-tektronix-bsd* )
2080 machine=ns16000 opsys=bsd4-2
2081 ;;
2082 ## Tektronix 4300
2083 ## src/m/tek4300.h hints that this is a m68k machine.
2084 m68*-tektronix-bsd* )
2085 machine=tek4300 opsys=bsd4-3
2086 ;;
2087
2088 ## Titan P2 or P3
2089 ## We seem to have lost the machine-description file titan.h!
2090 titan-titan-sysv* )
2091 machine=titan opsys=usg5-3
2092 ;;
2093
2094 ## Ustation E30 (SS5E)
2095 m68*-unisys-uniplus* )
2096 machine=ustation opsystem=unipl5-2
2097 ;;
2098
2099 ## Vaxen.
2100 vax-dec-* )
2101 machine=vax
2102 case "${canonical}" in
2103 *-bsd4.1* ) opsys=bsd4-1 ;;
2104 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
2105 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
2106 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
2107 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
2108 *-vms* ) opsys=vms ;;
2109 * ) unported=yes
2110 esac
2111 ;;
2112
2113 ## Whitechapel MG1
2114 ns16k-whitechapel-* )
2115 machine=mg1
2116 ## We don't know what sort of OS runs on these; we'll let the
2117 ## operating system guessing code below try.
2118 ;;
2119
2120 ## Wicat
2121 m68*-wicat-sysv* )
2122 machine=wicat opsys=usg5-2
2123 ;;
2124
f4988be7
GM
2125 ## IA-64
2126 ia64*-*-linux* )
2127 machine=ia64 opsys=gnu-linux
2128 ;;
2129
ba4481b5
DL
2130 ## Intel 386 machines where we don't care about the manufacturer
2131 i[3456]86-*-* )
2132 machine=intel386
2133 case "${canonical}" in
9f817ea4 2134 *-lynxos* ) opsys=lynxos ;;
ba4481b5
DL
2135 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
2136 *-isc2.2* ) opsys=isc2-2 ;;
2137 *-isc4.0* ) opsys=isc4-0 ;;
2138 *-isc4.* ) opsys=isc4-1
2139 GCC_TEST_OPTIONS=-posix
2140 NON_GCC_TEST_OPTIONS=-Xp
2141 ;;
2142 *-isc* ) opsys=isc3-0 ;;
2143 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
2144 *-esix* ) opsys=esix ;;
2145 *-xenix* ) opsys=xenix ;;
2146 *-linux-gnu* ) opsys=gnu-linux ;;
2147 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 2148 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
2149 NON_GNU_CPP=/lib/cpp
2150 # Prevent -belf from being passed to $CPP.
2151 # /lib/cpp does not accept it.
2152 OVERRIDE_CPPFLAGS=" "
2153 ;;
2154 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2155 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
2156 *-nextstep* ) opsys=nextstep ;;
2157 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2158 esac
2159 ;;
2160
2161 ## m68k Linux-based GNU system
2162 m68k-*-linux-gnu* )
2163 machine=m68k opsys=gnu-linux
2164 ;;
2165
2166 ## Mips Linux-based GNU system
2167 mips-*-linux-gnu* )
2168 machine=mips opsys=gnu-linux
2169 ;;
2170
2171 ## UXP/DS
2172 sparc-fujitsu-sysv4* )
2173 machine=sparc opsys=uxpds
2174 NON_GNU_CPP=/usr/ccs/lib/cpp
2175 RANLIB="ar -ts"
2176 ;;
2177
2178 ## UXP/V
2179 f301-fujitsu-uxpv4.1)
2180 machine=f301 opsys=uxpv
2181 ;;
2182
2183 * )
2184 unported=yes
2185 ;;
2186esac
2187
2188### If the code above didn't choose an operating system, just choose
2189### an operating system based on the configuration name. You really
2190### only want to use this when you have no idea what the right
2191### operating system is; if you know what operating systems a machine
2192### runs, it's cleaner to make it explicit in the case statement
2193### above.
2194if test x"${opsys}" = x; then
2195 case "${canonical}" in
2196 *-gnu* ) opsys=gnu ;;
2197 *-bsd4.[01] ) opsys=bsd4-1 ;;
2198 *-bsd4.2 ) opsys=bsd4-2 ;;
2199 *-bsd4.3 ) opsys=bsd4-3 ;;
2200 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
2201 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
2202 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
2203 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
2204 *-sysv4.2uw* ) opsys=unixware ;;
2205 *-sysv4.1* | *-sysvr4.1* )
2206 NON_GNU_CPP=/usr/lib/cpp
2207 opsys=usg5-4 ;;
2208 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2209 if [ x$NON_GNU_CPP = x ]; then
2210 if [ -f /usr/ccs/lib/cpp ]; then
2211 NON_GNU_CPP=/usr/ccs/lib/cpp
2212 else
2213 NON_GNU_CPP=/lib/cpp
2214 fi
2215 fi
2216 opsys=usg5-4-2 ;;
2217 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2218 * )
2219 unported=yes
2220 ;;
2221 esac
2222fi
2223
ba4481b5 2224if test $unported = yes; then
409d9577 2225 { { echo "$as_me:2225: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2226Check \`etc/MACHINES' for recognized configuration names." >&5
2227echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2228Check \`etc/MACHINES' for recognized configuration names." >&2;}
2229 { (exit 1); exit 1; }; }
ba4481b5
DL
2230fi
2231
2232machfile="m/${machine}.h"
2233opsysfile="s/${opsys}.h"
2234
ba4481b5
DL
2235#### Choose a compiler.
2236test -n "$CC" && cc_specified=yes
2237
2238# Save the value of CFLAGS that the user specified.
2239SPECIFIED_CFLAGS="$CFLAGS"
2240
2241case ${with_gcc} in
2242 "yes" ) CC="gcc" GCC=yes ;;
2243 "no" ) : ${CC=cc} ;;
503d2be0
AS
2244 * )
2245esac
2246ac_ext=c
2247ac_cpp='$CPP $CPPFLAGS'
2248ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2249ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2250ac_compiler_gnu=$ac_cv_c_compiler_gnu
2251if test -n "$ac_tool_prefix"; then
2252 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2253set dummy ${ac_tool_prefix}gcc; ac_word=$2
409d9577 2254echo "$as_me:2254: checking for $ac_word" >&5
503d2be0
AS
2255echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2256if test "${ac_cv_prog_CC+set}" = set; then
2257 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2258else
2259 if test -n "$CC"; then
2260 ac_cv_prog_CC="$CC" # Let the user override the test.
2261else
503d2be0
AS
2262 ac_save_IFS=$IFS; IFS=$ac_path_separator
2263ac_dummy="$PATH"
2264for ac_dir in $ac_dummy; do
2265 IFS=$ac_save_IFS
2266 test -z "$ac_dir" && ac_dir=.
2267 $as_executable_p "$ac_dir/$ac_word" || continue
2268ac_cv_prog_CC="${ac_tool_prefix}gcc"
409d9577 2269echo "$as_me:2269: found $ac_dir/$ac_word" >&5
503d2be0
AS
2270break
2271done
2272
ba4481b5
DL
2273fi
2274fi
503d2be0 2275CC=$ac_cv_prog_CC
ba4481b5 2276if test -n "$CC"; then
409d9577 2277 echo "$as_me:2277: result: $CC" >&5
503d2be0
AS
2278echo "${ECHO_T}$CC" >&6
2279else
409d9577 2280 echo "$as_me:2280: result: no" >&5
503d2be0
AS
2281echo "${ECHO_T}no" >&6
2282fi
2283
2284fi
2285if test -z "$ac_cv_prog_CC"; then
2286 ac_ct_CC=$CC
2287 # Extract the first word of "gcc", so it can be a program name with args.
2288set dummy gcc; ac_word=$2
409d9577 2289echo "$as_me:2289: checking for $ac_word" >&5
503d2be0
AS
2290echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2291if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2292 echo $ECHO_N "(cached) $ECHO_C" >&6
2293else
2294 if test -n "$ac_ct_CC"; then
2295 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2296else
2297 ac_save_IFS=$IFS; IFS=$ac_path_separator
2298ac_dummy="$PATH"
2299for ac_dir in $ac_dummy; do
2300 IFS=$ac_save_IFS
2301 test -z "$ac_dir" && ac_dir=.
2302 $as_executable_p "$ac_dir/$ac_word" || continue
2303ac_cv_prog_ac_ct_CC="gcc"
409d9577 2304echo "$as_me:2304: found $ac_dir/$ac_word" >&5
503d2be0
AS
2305break
2306done
2307
2308fi
2309fi
2310ac_ct_CC=$ac_cv_prog_ac_ct_CC
2311if test -n "$ac_ct_CC"; then
409d9577 2312 echo "$as_me:2312: result: $ac_ct_CC" >&5
503d2be0 2313echo "${ECHO_T}$ac_ct_CC" >&6
ba4481b5 2314else
409d9577 2315 echo "$as_me:2315: result: no" >&5
503d2be0
AS
2316echo "${ECHO_T}no" >&6
2317fi
2318
2319 CC=$ac_ct_CC
2320else
2321 CC="$ac_cv_prog_CC"
ba4481b5
DL
2322fi
2323
2324if test -z "$CC"; then
503d2be0
AS
2325 if test -n "$ac_tool_prefix"; then
2326 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2327set dummy ${ac_tool_prefix}cc; ac_word=$2
409d9577 2328echo "$as_me:2328: checking for $ac_word" >&5
503d2be0
AS
2329echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2330if test "${ac_cv_prog_CC+set}" = set; then
2331 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2332else
2333 if test -n "$CC"; then
2334 ac_cv_prog_CC="$CC" # Let the user override the test.
2335else
503d2be0
AS
2336 ac_save_IFS=$IFS; IFS=$ac_path_separator
2337ac_dummy="$PATH"
2338for ac_dir in $ac_dummy; do
2339 IFS=$ac_save_IFS
2340 test -z "$ac_dir" && ac_dir=.
2341 $as_executable_p "$ac_dir/$ac_word" || continue
2342ac_cv_prog_CC="${ac_tool_prefix}cc"
409d9577 2343echo "$as_me:2343: found $ac_dir/$ac_word" >&5
503d2be0
AS
2344break
2345done
2346
2347fi
2348fi
2349CC=$ac_cv_prog_CC
2350if test -n "$CC"; then
409d9577 2351 echo "$as_me:2351: result: $CC" >&5
503d2be0
AS
2352echo "${ECHO_T}$CC" >&6
2353else
409d9577 2354 echo "$as_me:2354: result: no" >&5
503d2be0
AS
2355echo "${ECHO_T}no" >&6
2356fi
2357
2358fi
2359if test -z "$ac_cv_prog_CC"; then
2360 ac_ct_CC=$CC
2361 # Extract the first word of "cc", so it can be a program name with args.
2362set dummy cc; ac_word=$2
409d9577 2363echo "$as_me:2363: checking for $ac_word" >&5
503d2be0
AS
2364echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2365if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2366 echo $ECHO_N "(cached) $ECHO_C" >&6
2367else
2368 if test -n "$ac_ct_CC"; then
2369 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2370else
2371 ac_save_IFS=$IFS; IFS=$ac_path_separator
2372ac_dummy="$PATH"
2373for ac_dir in $ac_dummy; do
2374 IFS=$ac_save_IFS
2375 test -z "$ac_dir" && ac_dir=.
2376 $as_executable_p "$ac_dir/$ac_word" || continue
2377ac_cv_prog_ac_ct_CC="cc"
409d9577 2378echo "$as_me:2378: found $ac_dir/$ac_word" >&5
503d2be0
AS
2379break
2380done
2381
2382fi
2383fi
2384ac_ct_CC=$ac_cv_prog_ac_ct_CC
2385if test -n "$ac_ct_CC"; then
409d9577 2386 echo "$as_me:2386: result: $ac_ct_CC" >&5
503d2be0
AS
2387echo "${ECHO_T}$ac_ct_CC" >&6
2388else
409d9577 2389 echo "$as_me:2389: result: no" >&5
503d2be0
AS
2390echo "${ECHO_T}no" >&6
2391fi
2392
2393 CC=$ac_ct_CC
2394else
2395 CC="$ac_cv_prog_CC"
2396fi
2397
2398fi
2399if test -z "$CC"; then
2400 # Extract the first word of "cc", so it can be a program name with args.
2401set dummy cc; ac_word=$2
409d9577 2402echo "$as_me:2402: checking for $ac_word" >&5
503d2be0
AS
2403echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2404if test "${ac_cv_prog_CC+set}" = set; then
2405 echo $ECHO_N "(cached) $ECHO_C" >&6
2406else
2407 if test -n "$CC"; then
2408 ac_cv_prog_CC="$CC" # Let the user override the test.
2409else
2410 ac_prog_rejected=no
2411 ac_save_IFS=$IFS; IFS=$ac_path_separator
2412ac_dummy="$PATH"
2413for ac_dir in $ac_dummy; do
2414 IFS=$ac_save_IFS
2415 test -z "$ac_dir" && ac_dir=.
2416 $as_executable_p "$ac_dir/$ac_word" || continue
2417if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2418 ac_prog_rejected=yes
2419 continue
2420fi
2421ac_cv_prog_CC="cc"
409d9577 2422echo "$as_me:2422: found $ac_dir/$ac_word" >&5
503d2be0
AS
2423break
2424done
2425
ba4481b5
DL
2426if test $ac_prog_rejected = yes; then
2427 # We found a bogon in the path, so make sure we never use it.
2428 set dummy $ac_cv_prog_CC
2429 shift
503d2be0 2430 if test $# != 0; then
ba4481b5
DL
2431 # We chose a different compiler from the bogus one.
2432 # However, it has the same basename, so the bogon will be chosen
2433 # first if we set CC to just the basename; use the full file name.
2434 shift
503d2be0 2435 set dummy "$ac_dir/$ac_word" ${1+"$@"}
ba4481b5
DL
2436 shift
2437 ac_cv_prog_CC="$@"
2438 fi
2439fi
2440fi
2441fi
503d2be0 2442CC=$ac_cv_prog_CC
ba4481b5 2443if test -n "$CC"; then
409d9577 2444 echo "$as_me:2444: result: $CC" >&5
503d2be0 2445echo "${ECHO_T}$CC" >&6
ba4481b5 2446else
409d9577 2447 echo "$as_me:2447: result: no" >&5
503d2be0 2448echo "${ECHO_T}no" >&6
ba4481b5
DL
2449fi
2450
503d2be0
AS
2451fi
2452if test -z "$CC"; then
2453 if test -n "$ac_tool_prefix"; then
2454 for ac_prog in cl
2455 do
2456 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2457set dummy $ac_tool_prefix$ac_prog; ac_word=$2
409d9577 2458echo "$as_me:2458: checking for $ac_word" >&5
503d2be0
AS
2459echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2460if test "${ac_cv_prog_CC+set}" = set; then
2461 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2462else
2463 if test -n "$CC"; then
2464 ac_cv_prog_CC="$CC" # Let the user override the test.
2465else
503d2be0
AS
2466 ac_save_IFS=$IFS; IFS=$ac_path_separator
2467ac_dummy="$PATH"
2468for ac_dir in $ac_dummy; do
2469 IFS=$ac_save_IFS
2470 test -z "$ac_dir" && ac_dir=.
2471 $as_executable_p "$ac_dir/$ac_word" || continue
2472ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
409d9577 2473echo "$as_me:2473: found $ac_dir/$ac_word" >&5
503d2be0
AS
2474break
2475done
2476
c4bb2108
DL
2477fi
2478fi
503d2be0 2479CC=$ac_cv_prog_CC
c4bb2108 2480if test -n "$CC"; then
409d9577 2481 echo "$as_me:2481: result: $CC" >&5
503d2be0 2482echo "${ECHO_T}$CC" >&6
c4bb2108 2483else
409d9577 2484 echo "$as_me:2484: result: no" >&5
503d2be0
AS
2485echo "${ECHO_T}no" >&6
2486fi
2487
2488 test -n "$CC" && break
2489 done
2490fi
2491if test -z "$CC"; then
2492 ac_ct_CC=$CC
2493 for ac_prog in cl
2494do
2495 # Extract the first word of "$ac_prog", so it can be a program name with args.
2496set dummy $ac_prog; ac_word=$2
409d9577 2497echo "$as_me:2497: checking for $ac_word" >&5
503d2be0
AS
2498echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2499if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2500 echo $ECHO_N "(cached) $ECHO_C" >&6
2501else
2502 if test -n "$ac_ct_CC"; then
2503 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2504else
2505 ac_save_IFS=$IFS; IFS=$ac_path_separator
2506ac_dummy="$PATH"
2507for ac_dir in $ac_dummy; do
2508 IFS=$ac_save_IFS
2509 test -z "$ac_dir" && ac_dir=.
2510 $as_executable_p "$ac_dir/$ac_word" || continue
2511ac_cv_prog_ac_ct_CC="$ac_prog"
409d9577 2512echo "$as_me:2512: found $ac_dir/$ac_word" >&5
503d2be0
AS
2513break
2514done
2515
c4bb2108 2516fi
503d2be0
AS
2517fi
2518ac_ct_CC=$ac_cv_prog_ac_ct_CC
2519if test -n "$ac_ct_CC"; then
409d9577 2520 echo "$as_me:2520: result: $ac_ct_CC" >&5
503d2be0
AS
2521echo "${ECHO_T}$ac_ct_CC" >&6
2522else
409d9577 2523 echo "$as_me:2523: result: no" >&5
503d2be0 2524echo "${ECHO_T}no" >&6
ba4481b5
DL
2525fi
2526
503d2be0
AS
2527 test -n "$ac_ct_CC" && break
2528done
ba4481b5 2529
503d2be0
AS
2530 CC=$ac_ct_CC
2531fi
2532
2533fi
ba4481b5 2534
409d9577 2535test -z "$CC" && { { echo "$as_me:2535: error: no acceptable cc found in \$PATH" >&5
503d2be0
AS
2536echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
2537 { (exit 1); exit 1; }; }
c4bb2108 2538
503d2be0 2539# Provide some information about the compiler.
409d9577 2540echo "$as_me:2540:" \
503d2be0
AS
2541 "checking for C compiler version" >&5
2542ac_compiler=`set X $ac_compile; echo $2`
409d9577 2543{ (eval echo "$as_me:2543: \"$ac_compiler --version </dev/null >&5\"") >&5
503d2be0
AS
2544 (eval $ac_compiler --version </dev/null >&5) 2>&5
2545 ac_status=$?
409d9577 2546 echo "$as_me:2546: \$? = $ac_status" >&5
503d2be0 2547 (exit $ac_status); }
409d9577 2548{ (eval echo "$as_me:2548: \"$ac_compiler -v </dev/null >&5\"") >&5
503d2be0
AS
2549 (eval $ac_compiler -v </dev/null >&5) 2>&5
2550 ac_status=$?
409d9577 2551 echo "$as_me:2551: \$? = $ac_status" >&5
503d2be0 2552 (exit $ac_status); }
409d9577 2553{ (eval echo "$as_me:2553: \"$ac_compiler -V </dev/null >&5\"") >&5
503d2be0
AS
2554 (eval $ac_compiler -V </dev/null >&5) 2>&5
2555 ac_status=$?
409d9577 2556 echo "$as_me:2556: \$? = $ac_status" >&5
503d2be0
AS
2557 (exit $ac_status); }
2558
2559cat >conftest.$ac_ext <<_ACEOF
409d9577 2560#line 2560 "configure"
ba4481b5 2561#include "confdefs.h"
c4bb2108 2562
503d2be0
AS
2563int
2564main ()
2565{
2566
2567 ;
2568 return 0;
2569}
2570_ACEOF
2571ac_clean_files_save=$ac_clean_files
2572ac_clean_files="$ac_clean_files a.out a.exe"
2573# Try to create an executable without -o first, disregard a.out.
2574# It will help us diagnose broken compilers, and finding out an intuition
2575# of exeext.
409d9577 2576echo "$as_me:2576: checking for C compiler default output" >&5
503d2be0
AS
2577echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2578ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
409d9577 2579if { (eval echo "$as_me:2579: \"$ac_link_default\"") >&5
503d2be0
AS
2580 (eval $ac_link_default) 2>&5
2581 ac_status=$?
409d9577 2582 echo "$as_me:2582: \$? = $ac_status" >&5
503d2be0
AS
2583 (exit $ac_status); }; then
2584 # Find the output, starting from the most likely. This scheme is
2585# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2586# resort.
2587for ac_file in `ls a.exe conftest.exe 2>/dev/null;
2588 ls a.out conftest 2>/dev/null;
2589 ls a.* conftest.* 2>/dev/null`; do
2590 case $ac_file in
2591 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2592 a.out ) # We found the default executable, but exeext='' is most
2593 # certainly right.
2594 break;;
2595 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2596 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2597 export ac_cv_exeext
2598 break;;
2599 * ) break;;
2600 esac
2601done
2602else
2603 echo "$as_me: failed program was:" >&5
2604cat conftest.$ac_ext >&5
409d9577 2605{ { echo "$as_me:2605: error: C compiler cannot create executables" >&5
503d2be0
AS
2606echo "$as_me: error: C compiler cannot create executables" >&2;}
2607 { (exit 77); exit 77; }; }
2608fi
2609
2610ac_exeext=$ac_cv_exeext
409d9577 2611echo "$as_me:2611: result: $ac_file" >&5
503d2be0
AS
2612echo "${ECHO_T}$ac_file" >&6
2613
2614# Check the compiler produces executables we can run. If not, either
2615# the compiler is broken, or we cross compile.
409d9577 2616echo "$as_me:2616: checking whether the C compiler works" >&5
503d2be0
AS
2617echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2618# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2619# If not cross compiling, check that we can run a simple program.
2620if test "$cross_compiling" != yes; then
2621 if { ac_try='./$ac_file'
409d9577 2622 { (eval echo "$as_me:2622: \"$ac_try\"") >&5
503d2be0
AS
2623 (eval $ac_try) 2>&5
2624 ac_status=$?
409d9577 2625 echo "$as_me:2625: \$? = $ac_status" >&5
503d2be0
AS
2626 (exit $ac_status); }; }; then
2627 cross_compiling=no
ba4481b5 2628 else
503d2be0
AS
2629 if test "$cross_compiling" = maybe; then
2630 cross_compiling=yes
2631 else
409d9577 2632 { { echo "$as_me:2632: error: cannot run C compiled programs.
503d2be0
AS
2633If you meant to cross compile, use \`--host'." >&5
2634echo "$as_me: error: cannot run C compiled programs.
2635If you meant to cross compile, use \`--host'." >&2;}
2636 { (exit 1); exit 1; }; }
2637 fi
ba4481b5 2638 fi
503d2be0 2639fi
409d9577 2640echo "$as_me:2640: result: yes" >&5
503d2be0
AS
2641echo "${ECHO_T}yes" >&6
2642
2643rm -f a.out a.exe conftest$ac_cv_exeext
2644ac_clean_files=$ac_clean_files_save
2645# Check the compiler produces executables we can run. If not, either
2646# the compiler is broken, or we cross compile.
409d9577 2647echo "$as_me:2647: checking whether we are cross compiling" >&5
503d2be0 2648echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
409d9577 2649echo "$as_me:2649: result: $cross_compiling" >&5
503d2be0
AS
2650echo "${ECHO_T}$cross_compiling" >&6
2651
409d9577 2652echo "$as_me:2652: checking for executable suffix" >&5
503d2be0 2653echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
409d9577 2654if { (eval echo "$as_me:2654: \"$ac_link\"") >&5
503d2be0
AS
2655 (eval $ac_link) 2>&5
2656 ac_status=$?
409d9577 2657 echo "$as_me:2657: \$? = $ac_status" >&5
503d2be0
AS
2658 (exit $ac_status); }; then
2659 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2660# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2661# work properly (i.e., refer to `conftest.exe'), while it won't with
2662# `rm'.
2663for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2664 case $ac_file in
2665 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2666 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2667 export ac_cv_exeext
2668 break;;
2669 * ) break;;
2670 esac
2671done
ba4481b5 2672else
409d9577 2673 { { echo "$as_me:2673: error: cannot compute EXEEXT: cannot compile and link" >&5
503d2be0
AS
2674echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2675 { (exit 1); exit 1; }; }
ba4481b5 2676fi
ba4481b5 2677
503d2be0 2678rm -f conftest$ac_cv_exeext
409d9577 2679echo "$as_me:2679: result: $ac_cv_exeext" >&5
503d2be0 2680echo "${ECHO_T}$ac_cv_exeext" >&6
ba4481b5 2681
503d2be0
AS
2682rm -f conftest.$ac_ext
2683EXEEXT=$ac_cv_exeext
2684ac_exeext=$EXEEXT
409d9577 2685echo "$as_me:2685: checking for object suffix" >&5
503d2be0
AS
2686echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2687if test "${ac_cv_objext+set}" = set; then
2688 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 2689else
503d2be0 2690 cat >conftest.$ac_ext <<_ACEOF
409d9577 2691#line 2691 "configure"
503d2be0 2692#include "confdefs.h"
ba4481b5 2693
503d2be0
AS
2694int
2695main ()
2696{
ba4481b5 2697
503d2be0
AS
2698 ;
2699 return 0;
2700}
2701_ACEOF
2702rm -f conftest.o conftest.obj
409d9577 2703if { (eval echo "$as_me:2703: \"$ac_compile\"") >&5
503d2be0
AS
2704 (eval $ac_compile) 2>&5
2705 ac_status=$?
409d9577 2706 echo "$as_me:2706: \$? = $ac_status" >&5
503d2be0
AS
2707 (exit $ac_status); }; then
2708 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2709 case $ac_file in
2710 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2711 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2712 break;;
2713 esac
2714done
c4bb2108 2715else
503d2be0
AS
2716 echo "$as_me: failed program was:" >&5
2717cat conftest.$ac_ext >&5
409d9577 2718{ { echo "$as_me:2718: error: cannot compute OBJEXT: cannot compile" >&5
503d2be0
AS
2719echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2720 { (exit 1); exit 1; }; }
c4bb2108
DL
2721fi
2722
503d2be0
AS
2723rm -f conftest.$ac_cv_objext conftest.$ac_ext
2724fi
409d9577 2725echo "$as_me:2725: result: $ac_cv_objext" >&5
503d2be0
AS
2726echo "${ECHO_T}$ac_cv_objext" >&6
2727OBJEXT=$ac_cv_objext
2728ac_objext=$OBJEXT
409d9577 2729echo "$as_me:2729: checking whether we are using the GNU C compiler" >&5
503d2be0
AS
2730echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2731if test "${ac_cv_c_compiler_gnu+set}" = set; then
2732 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 2733else
503d2be0 2734 cat >conftest.$ac_ext <<_ACEOF
409d9577 2735#line 2735 "configure"
503d2be0
AS
2736#include "confdefs.h"
2737
2738int
2739main ()
2740{
2741#ifndef __GNUC__
2742 choke me
2743#endif
2744
2745 ;
2746 return 0;
2747}
2748_ACEOF
2749rm -f conftest.$ac_objext
409d9577 2750if { (eval echo "$as_me:2750: \"$ac_compile\"") >&5
503d2be0
AS
2751 (eval $ac_compile) 2>&5
2752 ac_status=$?
409d9577 2753 echo "$as_me:2753: \$? = $ac_status" >&5
503d2be0
AS
2754 (exit $ac_status); } &&
2755 { ac_try='test -s conftest.$ac_objext'
409d9577 2756 { (eval echo "$as_me:2756: \"$ac_try\"") >&5
503d2be0
AS
2757 (eval $ac_try) 2>&5
2758 ac_status=$?
409d9577 2759 echo "$as_me:2759: \$? = $ac_status" >&5
503d2be0
AS
2760 (exit $ac_status); }; }; then
2761 ac_compiler_gnu=yes
2762else
2763 echo "$as_me: failed program was:" >&5
2764cat conftest.$ac_ext >&5
2765ac_compiler_gnu=no
2766fi
2767rm -f conftest.$ac_objext conftest.$ac_ext
2768ac_cv_c_compiler_gnu=$ac_compiler_gnu
2769
2770fi
409d9577 2771echo "$as_me:2771: result: $ac_cv_c_compiler_gnu" >&5
503d2be0
AS
2772echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2773GCC=`test $ac_compiler_gnu = yes && echo yes`
2774ac_test_CFLAGS=${CFLAGS+set}
2775ac_save_CFLAGS=$CFLAGS
2776CFLAGS="-g"
409d9577 2777echo "$as_me:2777: checking whether $CC accepts -g" >&5
503d2be0
AS
2778echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2779if test "${ac_cv_prog_cc_g+set}" = set; then
2780 echo $ECHO_N "(cached) $ECHO_C" >&6
2781else
2782 cat >conftest.$ac_ext <<_ACEOF
409d9577 2783#line 2783 "configure"
503d2be0
AS
2784#include "confdefs.h"
2785
2786int
2787main ()
2788{
2789
2790 ;
2791 return 0;
2792}
2793_ACEOF
2794rm -f conftest.$ac_objext
409d9577 2795if { (eval echo "$as_me:2795: \"$ac_compile\"") >&5
503d2be0
AS
2796 (eval $ac_compile) 2>&5
2797 ac_status=$?
409d9577 2798 echo "$as_me:2798: \$? = $ac_status" >&5
503d2be0
AS
2799 (exit $ac_status); } &&
2800 { ac_try='test -s conftest.$ac_objext'
409d9577 2801 { (eval echo "$as_me:2801: \"$ac_try\"") >&5
503d2be0
AS
2802 (eval $ac_try) 2>&5
2803 ac_status=$?
409d9577 2804 echo "$as_me:2804: \$? = $ac_status" >&5
503d2be0 2805 (exit $ac_status); }; }; then
ba4481b5
DL
2806 ac_cv_prog_cc_g=yes
2807else
503d2be0
AS
2808 echo "$as_me: failed program was:" >&5
2809cat conftest.$ac_ext >&5
2810ac_cv_prog_cc_g=no
ba4481b5 2811fi
503d2be0 2812rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 2813fi
409d9577 2814echo "$as_me:2814: result: $ac_cv_prog_cc_g" >&5
503d2be0 2815echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c4bb2108 2816if test "$ac_test_CFLAGS" = set; then
503d2be0 2817 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
2818elif test $ac_cv_prog_cc_g = yes; then
2819 if test "$GCC" = yes; then
ba4481b5
DL
2820 CFLAGS="-g -O2"
2821 else
c4bb2108 2822 CFLAGS="-g"
ba4481b5 2823 fi
22afa6e8 2824else
c4bb2108
DL
2825 if test "$GCC" = yes; then
2826 CFLAGS="-O2"
2827 else
2828 CFLAGS=
2829 fi
ba4481b5 2830fi
503d2be0
AS
2831# Some people use a C++ compiler to compile C. Since we use `exit',
2832# in C++ we need to declare it. In case someone uses the same compiler
2833# for both compiling C and C++ we need to have the C++ compiler decide
2834# the declaration of exit, since it's the most demanding environment.
2835cat >conftest.$ac_ext <<_ACEOF
2836#ifndef __cplusplus
2837 choke me
2838#endif
2839_ACEOF
2840rm -f conftest.$ac_objext
409d9577 2841if { (eval echo "$as_me:2841: \"$ac_compile\"") >&5
503d2be0
AS
2842 (eval $ac_compile) 2>&5
2843 ac_status=$?
409d9577 2844 echo "$as_me:2844: \$? = $ac_status" >&5
503d2be0
AS
2845 (exit $ac_status); } &&
2846 { ac_try='test -s conftest.$ac_objext'
409d9577 2847 { (eval echo "$as_me:2847: \"$ac_try\"") >&5
503d2be0
AS
2848 (eval $ac_try) 2>&5
2849 ac_status=$?
409d9577 2850 echo "$as_me:2850: \$? = $ac_status" >&5
503d2be0
AS
2851 (exit $ac_status); }; }; then
2852 for ac_declaration in \
2853 ''\
2854 '#include <stdlib.h>' \
2855 'extern "C" void std::exit (int) throw (); using std::exit;' \
2856 'extern "C" void std::exit (int); using std::exit;' \
2857 'extern "C" void exit (int) throw ();' \
2858 'extern "C" void exit (int);' \
2859 'void exit (int);'
2860do
2861 cat >conftest.$ac_ext <<_ACEOF
409d9577 2862#line 2862 "configure"
503d2be0
AS
2863#include "confdefs.h"
2864#include <stdlib.h>
2865$ac_declaration
2866int
2867main ()
2868{
2869exit (42);
2870 ;
2871 return 0;
2872}
2873_ACEOF
2874rm -f conftest.$ac_objext
409d9577 2875if { (eval echo "$as_me:2875: \"$ac_compile\"") >&5
503d2be0
AS
2876 (eval $ac_compile) 2>&5
2877 ac_status=$?
409d9577 2878 echo "$as_me:2878: \$? = $ac_status" >&5
503d2be0
AS
2879 (exit $ac_status); } &&
2880 { ac_try='test -s conftest.$ac_objext'
409d9577 2881 { (eval echo "$as_me:2881: \"$ac_try\"") >&5
503d2be0
AS
2882 (eval $ac_try) 2>&5
2883 ac_status=$?
409d9577 2884 echo "$as_me:2884: \$? = $ac_status" >&5
503d2be0
AS
2885 (exit $ac_status); }; }; then
2886 :
2887else
2888 echo "$as_me: failed program was:" >&5
2889cat conftest.$ac_ext >&5
2890continue
2891fi
2892rm -f conftest.$ac_objext conftest.$ac_ext
2893 cat >conftest.$ac_ext <<_ACEOF
409d9577 2894#line 2894 "configure"
503d2be0
AS
2895#include "confdefs.h"
2896$ac_declaration
2897int
2898main ()
2899{
2900exit (42);
2901 ;
2902 return 0;
2903}
2904_ACEOF
2905rm -f conftest.$ac_objext
409d9577 2906if { (eval echo "$as_me:2906: \"$ac_compile\"") >&5
503d2be0
AS
2907 (eval $ac_compile) 2>&5
2908 ac_status=$?
409d9577 2909 echo "$as_me:2909: \$? = $ac_status" >&5
503d2be0
AS
2910 (exit $ac_status); } &&
2911 { ac_try='test -s conftest.$ac_objext'
409d9577 2912 { (eval echo "$as_me:2912: \"$ac_try\"") >&5
503d2be0
AS
2913 (eval $ac_try) 2>&5
2914 ac_status=$?
409d9577 2915 echo "$as_me:2915: \$? = $ac_status" >&5
503d2be0
AS
2916 (exit $ac_status); }; }; then
2917 break
2918else
2919 echo "$as_me: failed program was:" >&5
2920cat conftest.$ac_ext >&5
2921fi
2922rm -f conftest.$ac_objext conftest.$ac_ext
2923done
2924rm -f conftest*
2925if test -n "$ac_declaration"; then
2926 echo '#ifdef __cplusplus' >>confdefs.h
2927 echo $ac_declaration >>confdefs.h
2928 echo '#endif' >>confdefs.h
2929fi
ba4481b5 2930
503d2be0
AS
2931else
2932 echo "$as_me: failed program was:" >&5
2933cat conftest.$ac_ext >&5
2934fi
2935rm -f conftest.$ac_objext conftest.$ac_ext
2936ac_ext=c
2937ac_cpp='$CPP $CPPFLAGS'
2938ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2939ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2940ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
2941
2942# On Suns, sometimes $CPP names a directory.
2943if test -n "$CPP" && test -d "$CPP"; then
2944 CPP=
2945fi
2946
2947#### Some systems specify a CPP to use unless we are using GCC.
2948#### Now that we know whether we are using GCC, we can decide whether
2949#### to use that one.
2950if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
2951then
2952 CPP="$NON_GNU_CPP"
2953fi
2954
2955#### Some systems specify a CC to use unless we are using GCC.
2956#### Now that we know whether we are using GCC, we can decide whether
2957#### to use that one.
2958if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
2959 test x$cc_specified != xyes
2960then
2961 CC="$NON_GNU_CC"
2962fi
2963
2964if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
2965then
2966 CC="$CC $GCC_TEST_OPTIONS"
2967fi
2968
2969if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
2970then
2971 CC="$CC $NON_GCC_TEST_OPTIONS"
2972fi
2973
2974if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
2975then
2976 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
2977fi
2978
2979if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
2980then
2981 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
2982fi
2983
2984#### Some other nice autoconf tests. If you add a test here which
2985#### should make an entry in src/config.h, don't forget to add an
2986#### #undef clause to src/config.h.in for autoconf to modify.
2987
409d9577 2988echo "$as_me:2988: checking whether ln -s works" >&5
503d2be0
AS
2989echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2990LN_S=$as_ln_s
2991if test "$LN_S" = "ln -s"; then
409d9577 2992 echo "$as_me:2992: result: yes" >&5
503d2be0 2993echo "${ECHO_T}yes" >&6
ba4481b5 2994else
409d9577 2995 echo "$as_me:2995: result: no, using $LN_S" >&5
503d2be0 2996echo "${ECHO_T}no, using $LN_S" >&6
ba4481b5
DL
2997fi
2998
503d2be0
AS
2999ac_ext=c
3000ac_cpp='$CPP $CPPFLAGS'
3001ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3002ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3003ac_compiler_gnu=$ac_cv_c_compiler_gnu
409d9577 3004echo "$as_me:3004: checking how to run the C preprocessor" >&5
503d2be0 3005echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
ba4481b5
DL
3006# On Suns, sometimes $CPP names a directory.
3007if test -n "$CPP" && test -d "$CPP"; then
3008 CPP=
3009fi
3010if test -z "$CPP"; then
503d2be0
AS
3011 if test "${ac_cv_prog_CPP+set}" = set; then
3012 echo $ECHO_N "(cached) $ECHO_C" >&6
3013else
3014 # Double quotes because CPP needs to be expanded
3015 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3016 do
3017 ac_preproc_ok=false
3018for ac_c_preproc_warn_flag in '' yes
3019do
3020 # Use a header file that comes with gcc, so configuring glibc
3021 # with a fresh cross-compiler works.
ba4481b5 3022 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
3023 # not just through cpp. "Syntax error" is here to catch this case.
3024 cat >conftest.$ac_ext <<_ACEOF
409d9577 3025#line 3025 "configure"
ba4481b5
DL
3026#include "confdefs.h"
3027#include <assert.h>
503d2be0
AS
3028 Syntax error
3029_ACEOF
409d9577 3030if { (eval echo "$as_me:3030: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3031 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3032 ac_status=$?
3033 egrep -v '^ *\+' conftest.er1 >conftest.err
3034 rm -f conftest.er1
3035 cat conftest.err >&5
409d9577 3036 echo "$as_me:3036: \$? = $ac_status" >&5
503d2be0
AS
3037 (exit $ac_status); } >/dev/null; then
3038 if test -s conftest.err; then
3039 ac_cpp_err=$ac_c_preproc_warn_flag
3040 else
3041 ac_cpp_err=
3042 fi
3043else
3044 ac_cpp_err=yes
3045fi
3046if test -z "$ac_cpp_err"; then
ba4481b5
DL
3047 :
3048else
503d2be0 3049 echo "$as_me: failed program was:" >&5
ba4481b5 3050 cat conftest.$ac_ext >&5
503d2be0
AS
3051 # Broken: fails on valid input.
3052continue
3053fi
3054rm -f conftest.err conftest.$ac_ext
3055
3056 # OK, works on sane cases. Now check whether non-existent headers
3057 # can be detected and how.
3058 cat >conftest.$ac_ext <<_ACEOF
409d9577 3059#line 3059 "configure"
503d2be0
AS
3060#include "confdefs.h"
3061#include <ac_nonexistent.h>
3062_ACEOF
409d9577 3063if { (eval echo "$as_me:3063: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3064 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3065 ac_status=$?
3066 egrep -v '^ *\+' conftest.er1 >conftest.err
3067 rm -f conftest.er1
3068 cat conftest.err >&5
409d9577 3069 echo "$as_me:3069: \$? = $ac_status" >&5
503d2be0
AS
3070 (exit $ac_status); } >/dev/null; then
3071 if test -s conftest.err; then
3072 ac_cpp_err=$ac_c_preproc_warn_flag
3073 else
3074 ac_cpp_err=
3075 fi
3076else
3077 ac_cpp_err=yes
3078fi
3079if test -z "$ac_cpp_err"; then
3080 # Broken: success on invalid input.
3081continue
c4bb2108 3082else
503d2be0 3083 echo "$as_me: failed program was:" >&5
c4bb2108 3084 cat conftest.$ac_ext >&5
503d2be0
AS
3085 # Passes both tests.
3086ac_preproc_ok=:
3087break
3088fi
3089rm -f conftest.err conftest.$ac_ext
3090
3091done
3092# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3093rm -f conftest.err conftest.$ac_ext
3094if $ac_preproc_ok; then
3095 break
3096fi
3097
3098 done
3099 ac_cv_prog_CPP=$CPP
3100
3101fi
3102 CPP=$ac_cv_prog_CPP
3103else
3104 ac_cv_prog_CPP=$CPP
3105fi
409d9577 3106echo "$as_me:3106: result: $CPP" >&5
503d2be0
AS
3107echo "${ECHO_T}$CPP" >&6
3108ac_preproc_ok=false
3109for ac_c_preproc_warn_flag in '' yes
3110do
3111 # Use a header file that comes with gcc, so configuring glibc
3112 # with a fresh cross-compiler works.
3113 # On the NeXT, cc -E runs the code through the compiler's parser,
3114 # not just through cpp. "Syntax error" is here to catch this case.
3115 cat >conftest.$ac_ext <<_ACEOF
409d9577 3116#line 3116 "configure"
c4bb2108
DL
3117#include "confdefs.h"
3118#include <assert.h>
503d2be0
AS
3119 Syntax error
3120_ACEOF
409d9577 3121if { (eval echo "$as_me:3121: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3122 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3123 ac_status=$?
3124 egrep -v '^ *\+' conftest.er1 >conftest.err
3125 rm -f conftest.er1
3126 cat conftest.err >&5
409d9577 3127 echo "$as_me:3127: \$? = $ac_status" >&5
503d2be0
AS
3128 (exit $ac_status); } >/dev/null; then
3129 if test -s conftest.err; then
3130 ac_cpp_err=$ac_c_preproc_warn_flag
3131 else
3132 ac_cpp_err=
3133 fi
3134else
3135 ac_cpp_err=yes
3136fi
3137if test -z "$ac_cpp_err"; then
ba4481b5
DL
3138 :
3139else
503d2be0 3140 echo "$as_me: failed program was:" >&5
ba4481b5 3141 cat conftest.$ac_ext >&5
503d2be0
AS
3142 # Broken: fails on valid input.
3143continue
3144fi
3145rm -f conftest.err conftest.$ac_ext
3146
3147 # OK, works on sane cases. Now check whether non-existent headers
3148 # can be detected and how.
3149 cat >conftest.$ac_ext <<_ACEOF
409d9577 3150#line 3150 "configure"
503d2be0
AS
3151#include "confdefs.h"
3152#include <ac_nonexistent.h>
3153_ACEOF
409d9577 3154if { (eval echo "$as_me:3154: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3155 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3156 ac_status=$?
3157 egrep -v '^ *\+' conftest.er1 >conftest.err
3158 rm -f conftest.er1
3159 cat conftest.err >&5
409d9577 3160 echo "$as_me:3160: \$? = $ac_status" >&5
503d2be0
AS
3161 (exit $ac_status); } >/dev/null; then
3162 if test -s conftest.err; then
3163 ac_cpp_err=$ac_c_preproc_warn_flag
3164 else
3165 ac_cpp_err=
3166 fi
3167else
3168 ac_cpp_err=yes
c4bb2108 3169fi
503d2be0
AS
3170if test -z "$ac_cpp_err"; then
3171 # Broken: success on invalid input.
3172continue
3173else
3174 echo "$as_me: failed program was:" >&5
3175 cat conftest.$ac_ext >&5
3176 # Passes both tests.
3177ac_preproc_ok=:
3178break
ba4481b5 3179fi
503d2be0
AS
3180rm -f conftest.err conftest.$ac_ext
3181
3182done
3183# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3184rm -f conftest.err conftest.$ac_ext
3185if $ac_preproc_ok; then
3186 :
ba4481b5 3187else
409d9577 3188 { { echo "$as_me:3188: error: C preprocessor \"$CPP\" fails sanity check" >&5
503d2be0
AS
3189echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3190 { (exit 1); exit 1; }; }
ba4481b5 3191fi
503d2be0
AS
3192
3193ac_ext=c
3194ac_cpp='$CPP $CPPFLAGS'
3195ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3196ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3197ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
3198
3199# Find a good install program. We prefer a C program (faster),
3200# so one script is as good as another. But avoid the broken or
3201# incompatible versions:
3202# SysV /etc/install, /usr/sbin/install
3203# SunOS /usr/etc/install
3204# IRIX /sbin/install
3205# AIX /bin/install
503d2be0 3206# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 3207# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
3208# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3209# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3210# ./install, which can be erroneously created by make from ./install.sh.
409d9577 3211echo "$as_me:3211: checking for a BSD compatible install" >&5
503d2be0 3212echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
ba4481b5 3213if test -z "$INSTALL"; then
503d2be0
AS
3214if test "${ac_cv_path_install+set}" = set; then
3215 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3216else
503d2be0 3217 ac_save_IFS=$IFS; IFS=$ac_path_separator
ba4481b5 3218 for ac_dir in $PATH; do
503d2be0 3219 IFS=$ac_save_IFS
ba4481b5 3220 # Account for people who put trailing slashes in PATH elements.
503d2be0
AS
3221 case $ac_dir/ in
3222 / | ./ | .// | /cC/* \
3223 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3224 | /usr/ucb/* ) ;;
ba4481b5
DL
3225 *)
3226 # OSF1 and SCO ODT 3.0 have their own names for install.
c4bb2108
DL
3227 # Don't use installbsd from OSF since it installs stuff as root
3228 # by default.
3229 for ac_prog in ginstall scoinst install; do
503d2be0 3230 if $as_executable_p "$ac_dir/$ac_prog"; then
ba4481b5 3231 if test $ac_prog = install &&
503d2be0 3232 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
ba4481b5
DL
3233 # AIX install. It has an incompatible calling convention.
3234 :
503d2be0
AS
3235 elif test $ac_prog = install &&
3236 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3237 # program-specific install script used by HP pwplus--don't use.
3238 :
ba4481b5
DL
3239 else
3240 ac_cv_path_install="$ac_dir/$ac_prog -c"
3241 break 2
3242 fi
3243 fi
3244 done
3245 ;;
3246 esac
3247 done
ba4481b5
DL
3248
3249fi
3250 if test "${ac_cv_path_install+set}" = set; then
503d2be0 3251 INSTALL=$ac_cv_path_install
ba4481b5
DL
3252 else
3253 # As a last resort, use the slow shell script. We don't cache a
3254 # path for INSTALL within a source directory, because that will
3255 # break other packages using the cache if that directory is
3256 # removed, or if the path is relative.
503d2be0 3257 INSTALL=$ac_install_sh
ba4481b5
DL
3258 fi
3259fi
409d9577 3260echo "$as_me:3260: result: $INSTALL" >&5
503d2be0 3261echo "${ECHO_T}$INSTALL" >&6
ba4481b5
DL
3262
3263# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3264# It thinks the first close brace ends the variable substitution.
3265test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3266
503d2be0 3267test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 3268
ba4481b5
DL
3269test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3270
3271for ac_prog in 'bison -y' byacc
3272do
503d2be0 3273 # Extract the first word of "$ac_prog", so it can be a program name with args.
ba4481b5 3274set dummy $ac_prog; ac_word=$2
409d9577 3275echo "$as_me:3275: checking for $ac_word" >&5
503d2be0
AS
3276echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3277if test "${ac_cv_prog_YACC+set}" = set; then
3278 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3279else
3280 if test -n "$YACC"; then
3281 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3282else
503d2be0
AS
3283 ac_save_IFS=$IFS; IFS=$ac_path_separator
3284ac_dummy="$PATH"
3285for ac_dir in $ac_dummy; do
3286 IFS=$ac_save_IFS
3287 test -z "$ac_dir" && ac_dir=.
3288 $as_executable_p "$ac_dir/$ac_word" || continue
3289ac_cv_prog_YACC="$ac_prog"
409d9577 3290echo "$as_me:3290: found $ac_dir/$ac_word" >&5
503d2be0
AS
3291break
3292done
3293
ba4481b5
DL
3294fi
3295fi
503d2be0 3296YACC=$ac_cv_prog_YACC
ba4481b5 3297if test -n "$YACC"; then
409d9577 3298 echo "$as_me:3298: result: $YACC" >&5
503d2be0 3299echo "${ECHO_T}$YACC" >&6
ba4481b5 3300else
409d9577 3301 echo "$as_me:3301: result: no" >&5
503d2be0 3302echo "${ECHO_T}no" >&6
ba4481b5
DL
3303fi
3304
503d2be0 3305 test -n "$YACC" && break
ba4481b5
DL
3306done
3307test -n "$YACC" || YACC="yacc"
3308
7397acc4 3309if test "x$RANLIB" = x; then
503d2be0
AS
3310 if test -n "$ac_tool_prefix"; then
3311 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3312set dummy ${ac_tool_prefix}ranlib; ac_word=$2
409d9577 3313echo "$as_me:3313: checking for $ac_word" >&5
503d2be0
AS
3314echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3315if test "${ac_cv_prog_RANLIB+set}" = set; then
3316 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
3317else
3318 if test -n "$RANLIB"; then
3319 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3320else
503d2be0
AS
3321 ac_save_IFS=$IFS; IFS=$ac_path_separator
3322ac_dummy="$PATH"
3323for ac_dir in $ac_dummy; do
3324 IFS=$ac_save_IFS
3325 test -z "$ac_dir" && ac_dir=.
3326 $as_executable_p "$ac_dir/$ac_word" || continue
3327ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
409d9577 3328echo "$as_me:3328: found $ac_dir/$ac_word" >&5
503d2be0
AS
3329break
3330done
3331
7397acc4
DL
3332fi
3333fi
503d2be0 3334RANLIB=$ac_cv_prog_RANLIB
7397acc4 3335if test -n "$RANLIB"; then
409d9577 3336 echo "$as_me:3336: result: $RANLIB" >&5
503d2be0
AS
3337echo "${ECHO_T}$RANLIB" >&6
3338else
409d9577 3339 echo "$as_me:3339: result: no" >&5
503d2be0
AS
3340echo "${ECHO_T}no" >&6
3341fi
3342
3343fi
3344if test -z "$ac_cv_prog_RANLIB"; then
3345 ac_ct_RANLIB=$RANLIB
3346 # Extract the first word of "ranlib", so it can be a program name with args.
3347set dummy ranlib; ac_word=$2
409d9577 3348echo "$as_me:3348: checking for $ac_word" >&5
503d2be0
AS
3349echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3350if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3351 echo $ECHO_N "(cached) $ECHO_C" >&6
3352else
3353 if test -n "$ac_ct_RANLIB"; then
3354 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3355else
3356 ac_save_IFS=$IFS; IFS=$ac_path_separator
3357ac_dummy="$PATH"
3358for ac_dir in $ac_dummy; do
3359 IFS=$ac_save_IFS
3360 test -z "$ac_dir" && ac_dir=.
3361 $as_executable_p "$ac_dir/$ac_word" || continue
3362ac_cv_prog_ac_ct_RANLIB="ranlib"
409d9577 3363echo "$as_me:3363: found $ac_dir/$ac_word" >&5
503d2be0
AS
3364break
3365done
3366
3367 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3368fi
3369fi
3370ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3371if test -n "$ac_ct_RANLIB"; then
409d9577 3372 echo "$as_me:3372: result: $ac_ct_RANLIB" >&5
503d2be0
AS
3373echo "${ECHO_T}$ac_ct_RANLIB" >&6
3374else
409d9577 3375 echo "$as_me:3375: result: no" >&5
503d2be0
AS
3376echo "${ECHO_T}no" >&6
3377fi
3378
3379 RANLIB=$ac_ct_RANLIB
7397acc4 3380else
503d2be0 3381 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
3382fi
3383
3384fi
ba4481b5 3385
409d9577 3386echo "$as_me:3386: checking for AIX" >&5
503d2be0
AS
3387echo $ECHO_N "checking for AIX... $ECHO_C" >&6
3388cat >conftest.$ac_ext <<_ACEOF
409d9577 3389#line 3389 "configure"
ba4481b5
DL
3390#include "confdefs.h"
3391#ifdef _AIX
3392 yes
3393#endif
3394
503d2be0 3395_ACEOF
ba4481b5
DL
3396if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3397 egrep "yes" >/dev/null 2>&1; then
409d9577 3398 echo "$as_me:3398: result: yes" >&5
503d2be0
AS
3399echo "${ECHO_T}yes" >&6
3400cat >>confdefs.h <<\EOF
ba4481b5
DL
3401#define _ALL_SOURCE 1
3402EOF
3403
3404else
409d9577 3405 echo "$as_me:3405: result: no" >&5
503d2be0 3406echo "${ECHO_T}no" >&6
ba4481b5
DL
3407fi
3408rm -f conftest*
3409
3b33a005
DL
3410#### Extract some information from the operating system and machine files.
3411
409d9577 3412{ echo "$as_me:3412: checking the machine- and system-dependent files to find out
3b33a005 3413 - which libraries the lib-src programs will want, and
503d2be0
AS
3414 - whether the GNU malloc routines are usable..." >&5
3415echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 3416 - which libraries the lib-src programs will want, and
503d2be0 3417 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
3418
3419### First figure out CFLAGS (which we use for running the compiler here)
3420### and REAL_CFLAGS (which we use for real compilation).
3421### The two are the same except on a few systems, where they are made
3422### different to work around various lossages. For example,
3423### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
3424### as implying static linking.
3425
3426### If the CFLAGS env var is specified, we use that value
3427### instead of the default.
3428
3429### It's not important that this name contain the PID; you can't run
3430### two configures in the same directory and have anything work
3431### anyway.
3432tempcname="conftest.c"
3433
3434echo '
3435#include "'${srcdir}'/src/'${opsysfile}'"
3436#include "'${srcdir}'/src/'${machfile}'"
3437#ifndef LIBS_MACHINE
3438#define LIBS_MACHINE
3439#endif
3440#ifndef LIBS_SYSTEM
3441#define LIBS_SYSTEM
3442#endif
3443#ifndef C_SWITCH_SYSTEM
3444#define C_SWITCH_SYSTEM
3445#endif
3446#ifndef C_SWITCH_MACHINE
3447#define C_SWITCH_MACHINE
3448#endif
3449configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
3450configure___ c_switch_system=C_SWITCH_SYSTEM
3451configure___ c_switch_machine=C_SWITCH_MACHINE
3452
3453#ifndef LIB_X11_LIB
3454#define LIB_X11_LIB -lX11
3455#endif
3456
3457#ifndef LIBX11_MACHINE
3458#define LIBX11_MACHINE
3459#endif
3460
3461#ifndef LIBX11_SYSTEM
3462#define LIBX11_SYSTEM
3463#endif
3464configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
3465
3466#ifdef UNEXEC
3467configure___ unexec=UNEXEC
3468#else
3469configure___ unexec=unexec.o
3470#endif
3471
3472#ifdef SYSTEM_MALLOC
3473configure___ system_malloc=yes
3474#else
3475configure___ system_malloc=no
3476#endif
3477
ef9e4345
GM
3478#ifdef USE_MMAP_FOR_BUFFERS
3479configure___ use_mmap_for_buffers=yes
73b77ee5 3480#else
ef9e4345 3481configure___ use_mmap_for_buffers=no
73b77ee5
GM
3482#endif
3483
3b33a005
DL
3484#ifndef C_DEBUG_SWITCH
3485#define C_DEBUG_SWITCH -g
3486#endif
3487
3488#ifndef C_OPTIMIZE_SWITCH
3489#ifdef __GNUC__
3490#define C_OPTIMIZE_SWITCH -O2
3491#else
3492#define C_OPTIMIZE_SWITCH -O
3493#endif
3494#endif
3495
3496#ifndef LD_SWITCH_MACHINE
3497#define LD_SWITCH_MACHINE
3498#endif
3499
3500#ifndef LD_SWITCH_SYSTEM
3501#define LD_SWITCH_SYSTEM
3502#endif
3503
3504#ifndef LD_SWITCH_X_SITE_AUX
3505#define LD_SWITCH_X_SITE_AUX
503d2be0 3506#endif
3b33a005
DL
3507
3508configure___ ld_switch_system=LD_SWITCH_SYSTEM
3509configure___ ld_switch_machine=LD_SWITCH_MACHINE
3510
3511#ifdef THIS_IS_CONFIGURE
3512
3513/* Get the CFLAGS for tests in configure. */
3514#ifdef __GNUC__
3515configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3516#else
3517configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3518#endif
3519
3520#else /* not THIS_IS_CONFIGURE */
3521
3522/* Get the CFLAGS for real compilation. */
3523#ifdef __GNUC__
3524configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3525#else
3526configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3527#endif
3528
3529#endif /* not THIS_IS_CONFIGURE */
3530' > ${tempcname}
3531
3532# The value of CPP is a quoted variable reference, so we need to do this
3533# to get its actual value...
3534CPP=`eval "echo $CPP"`
3535eval `${CPP} -Isrc ${tempcname} \
3536 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3537if test "x$SPECIFIED_CFLAGS" = x; then
3538 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
3539 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3540else
3541 REAL_CFLAGS="$CFLAGS"
3542fi
3543rm ${tempcname}
3544
3545ac_link="$ac_link $ld_switch_machine $ld_switch_system"
3546
3547### Make sure subsequent tests use flags consistent with the build flags.
3548
3549if test x"${OVERRIDE_CPPFLAGS}" != x; then
3550 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
3551else
3552 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
3553fi
3554
503d2be0 3555# Check whether --enable-largefile or --disable-largefile was given.
f4988be7
GM
3556if test "${enable_largefile+set}" = set; then
3557 enableval="$enable_largefile"
f4988be7 3558
503d2be0
AS
3559fi;
3560if test "$enable_largefile" != no; then
f4988be7 3561
409d9577 3562 echo "$as_me:3562: checking for special C compiler options needed for large files" >&5
503d2be0
AS
3563echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
3564if test "${ac_cv_sys_largefile_CC+set}" = set; then
3565 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3566else
f4988be7 3567 ac_cv_sys_largefile_CC=no
503d2be0
AS
3568 if test "$GCC" != yes; then
3569 ac_save_CC=$CC
3570 while :; do
3571 # IRIX 6.2 and later do not support large files by default,
3572 # so use the C compiler's -n32 option if that helps.
3573 cat >conftest.$ac_ext <<_ACEOF
409d9577 3574#line 3574 "configure"
b192d653 3575#include "confdefs.h"
f4988be7 3576#include <sys/types.h>
503d2be0
AS
3577 /* Check that off_t can represent 2**63 - 1 correctly.
3578 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3579 since some C++ compilers masquerading as C compilers
3580 incorrectly reject 9223372036854775807. */
3581#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3582 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3583 && LARGE_OFF_T % 2147483647 == 1)
3584 ? 1 : -1];
3585int
3586main ()
3587{
f4988be7 3588
503d2be0
AS
3589 ;
3590 return 0;
3591}
3592_ACEOF
3593 rm -f conftest.$ac_objext
409d9577 3594if { (eval echo "$as_me:3594: \"$ac_compile\"") >&5
503d2be0
AS
3595 (eval $ac_compile) 2>&5
3596 ac_status=$?
409d9577 3597 echo "$as_me:3597: \$? = $ac_status" >&5
503d2be0
AS
3598 (exit $ac_status); } &&
3599 { ac_try='test -s conftest.$ac_objext'
409d9577 3600 { (eval echo "$as_me:3600: \"$ac_try\"") >&5
503d2be0
AS
3601 (eval $ac_try) 2>&5
3602 ac_status=$?
409d9577 3603 echo "$as_me:3603: \$? = $ac_status" >&5
503d2be0
AS
3604 (exit $ac_status); }; }; then
3605 break
b192d653 3606else
503d2be0
AS
3607 echo "$as_me: failed program was:" >&5
3608cat conftest.$ac_ext >&5
3609fi
3610rm -f conftest.$ac_objext
3611 CC="$CC -n32"
3612 rm -f conftest.$ac_objext
409d9577 3613if { (eval echo "$as_me:3613: \"$ac_compile\"") >&5
503d2be0
AS
3614 (eval $ac_compile) 2>&5
3615 ac_status=$?
409d9577 3616 echo "$as_me:3616: \$? = $ac_status" >&5
503d2be0
AS
3617 (exit $ac_status); } &&
3618 { ac_try='test -s conftest.$ac_objext'
409d9577 3619 { (eval echo "$as_me:3619: \"$ac_try\"") >&5
503d2be0
AS
3620 (eval $ac_try) 2>&5
3621 ac_status=$?
409d9577 3622 echo "$as_me:3622: \$? = $ac_status" >&5
503d2be0
AS
3623 (exit $ac_status); }; }; then
3624 ac_cv_sys_largefile_CC=' -n32'; break
3625else
3626 echo "$as_me: failed program was:" >&5
3627cat conftest.$ac_ext >&5
3628fi
3629rm -f conftest.$ac_objext
3630 break
3631 done
3632 CC=$ac_save_CC
3633 rm -f conftest.$ac_ext
3634 fi
b192d653 3635fi
409d9577 3636echo "$as_me:3636: result: $ac_cv_sys_largefile_CC" >&5
503d2be0
AS
3637echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
3638 if test "$ac_cv_sys_largefile_CC" != no; then
3639 CC=$CC$ac_cv_sys_largefile_CC
3640 fi
b192d653 3641
409d9577 3642 echo "$as_me:3642: checking for _FILE_OFFSET_BITS value needed for large files" >&5
503d2be0
AS
3643echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
3644if test "${ac_cv_sys_file_offset_bits+set}" = set; then
3645 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3646else
503d2be0 3647 while :; do
f4988be7 3648 ac_cv_sys_file_offset_bits=no
503d2be0 3649 cat >conftest.$ac_ext <<_ACEOF
409d9577 3650#line 3650 "configure"
f4988be7
GM
3651#include "confdefs.h"
3652#include <sys/types.h>
503d2be0
AS
3653 /* Check that off_t can represent 2**63 - 1 correctly.
3654 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3655 since some C++ compilers masquerading as C compilers
3656 incorrectly reject 9223372036854775807. */
3657#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3658 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3659 && LARGE_OFF_T % 2147483647 == 1)
3660 ? 1 : -1];
3661int
3662main ()
3663{
f4988be7 3664
503d2be0
AS
3665 ;
3666 return 0;
3667}
3668_ACEOF
3669rm -f conftest.$ac_objext
409d9577 3670if { (eval echo "$as_me:3670: \"$ac_compile\"") >&5
503d2be0
AS
3671 (eval $ac_compile) 2>&5
3672 ac_status=$?
409d9577 3673 echo "$as_me:3673: \$? = $ac_status" >&5
503d2be0
AS
3674 (exit $ac_status); } &&
3675 { ac_try='test -s conftest.$ac_objext'
409d9577 3676 { (eval echo "$as_me:3676: \"$ac_try\"") >&5
503d2be0
AS
3677 (eval $ac_try) 2>&5
3678 ac_status=$?
409d9577 3679 echo "$as_me:3679: \$? = $ac_status" >&5
503d2be0
AS
3680 (exit $ac_status); }; }; then
3681 break
f4988be7 3682else
503d2be0
AS
3683 echo "$as_me: failed program was:" >&5
3684cat conftest.$ac_ext >&5
3685fi
3686rm -f conftest.$ac_objext conftest.$ac_ext
3687 cat >conftest.$ac_ext <<_ACEOF
409d9577 3688#line 3688 "configure"
ba4481b5 3689#include "confdefs.h"
f4988be7
GM
3690#define _FILE_OFFSET_BITS 64
3691#include <sys/types.h>
503d2be0
AS
3692 /* Check that off_t can represent 2**63 - 1 correctly.
3693 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3694 since some C++ compilers masquerading as C compilers
3695 incorrectly reject 9223372036854775807. */
3696#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3697 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3698 && LARGE_OFF_T % 2147483647 == 1)
3699 ? 1 : -1];
3700int
3701main ()
3702{
3703
3704 ;
3705 return 0;
3706}
3707_ACEOF
3708rm -f conftest.$ac_objext
409d9577 3709if { (eval echo "$as_me:3709: \"$ac_compile\"") >&5
503d2be0
AS
3710 (eval $ac_compile) 2>&5
3711 ac_status=$?
409d9577 3712 echo "$as_me:3712: \$? = $ac_status" >&5
503d2be0
AS
3713 (exit $ac_status); } &&
3714 { ac_try='test -s conftest.$ac_objext'
409d9577 3715 { (eval echo "$as_me:3715: \"$ac_try\"") >&5
503d2be0
AS
3716 (eval $ac_try) 2>&5
3717 ac_status=$?
409d9577 3718 echo "$as_me:3718: \$? = $ac_status" >&5
503d2be0
AS
3719 (exit $ac_status); }; }; then
3720 ac_cv_sys_file_offset_bits=64; break
3721else
3722 echo "$as_me: failed program was:" >&5
3723cat conftest.$ac_ext >&5
3724fi
3725rm -f conftest.$ac_objext conftest.$ac_ext
3726 break
3727done
ba4481b5 3728fi
409d9577 3729echo "$as_me:3729: result: $ac_cv_sys_file_offset_bits" >&5
503d2be0
AS
3730echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
3731if test "$ac_cv_sys_file_offset_bits" != no; then
ba4481b5 3732
503d2be0 3733cat >>confdefs.h <<EOF
f4988be7 3734#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
ba4481b5 3735EOF
f4988be7 3736
503d2be0
AS
3737fi
3738rm -f conftest*
409d9577 3739 echo "$as_me:3739: checking for _LARGE_FILES value needed for large files" >&5
503d2be0
AS
3740echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
3741if test "${ac_cv_sys_large_files+set}" = set; then
3742 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3743else
503d2be0 3744 while :; do
f4988be7 3745 ac_cv_sys_large_files=no
503d2be0 3746 cat >conftest.$ac_ext <<_ACEOF
409d9577 3747#line 3747 "configure"
f4988be7 3748#include "confdefs.h"
503d2be0
AS
3749#include <sys/types.h>
3750 /* Check that off_t can represent 2**63 - 1 correctly.
3751 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3752 since some C++ compilers masquerading as C compilers
3753 incorrectly reject 9223372036854775807. */
3754#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3755 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3756 && LARGE_OFF_T % 2147483647 == 1)
3757 ? 1 : -1];
3758int
3759main ()
3760{
ba4481b5 3761
503d2be0
AS
3762 ;
3763 return 0;
3764}
3765_ACEOF
3766rm -f conftest.$ac_objext
409d9577 3767if { (eval echo "$as_me:3767: \"$ac_compile\"") >&5
503d2be0
AS
3768 (eval $ac_compile) 2>&5
3769 ac_status=$?
409d9577 3770 echo "$as_me:3770: \$? = $ac_status" >&5
503d2be0
AS
3771 (exit $ac_status); } &&
3772 { ac_try='test -s conftest.$ac_objext'
409d9577 3773 { (eval echo "$as_me:3773: \"$ac_try\"") >&5
503d2be0
AS
3774 (eval $ac_try) 2>&5
3775 ac_status=$?
409d9577 3776 echo "$as_me:3776: \$? = $ac_status" >&5
503d2be0
AS
3777 (exit $ac_status); }; }; then
3778 break
ba4481b5 3779else
503d2be0
AS
3780 echo "$as_me: failed program was:" >&5
3781cat conftest.$ac_ext >&5
3782fi
3783rm -f conftest.$ac_objext conftest.$ac_ext
3784 cat >conftest.$ac_ext <<_ACEOF
409d9577 3785#line 3785 "configure"
ba4481b5 3786#include "confdefs.h"
f4988be7 3787#define _LARGE_FILES 1
503d2be0
AS
3788#include <sys/types.h>
3789 /* Check that off_t can represent 2**63 - 1 correctly.
3790 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3791 since some C++ compilers masquerading as C compilers
3792 incorrectly reject 9223372036854775807. */
3793#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3794 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3795 && LARGE_OFF_T % 2147483647 == 1)
3796 ? 1 : -1];
3797int
3798main ()
3799{
f4988be7 3800
503d2be0
AS
3801 ;
3802 return 0;
3803}
3804_ACEOF
3805rm -f conftest.$ac_objext
409d9577 3806if { (eval echo "$as_me:3806: \"$ac_compile\"") >&5
503d2be0
AS
3807 (eval $ac_compile) 2>&5
3808 ac_status=$?
409d9577 3809 echo "$as_me:3809: \$? = $ac_status" >&5
503d2be0
AS
3810 (exit $ac_status); } &&
3811 { ac_try='test -s conftest.$ac_objext'
409d9577 3812 { (eval echo "$as_me:3812: \"$ac_try\"") >&5
503d2be0
AS
3813 (eval $ac_try) 2>&5
3814 ac_status=$?
409d9577 3815 echo "$as_me:3815: \$? = $ac_status" >&5
503d2be0
AS
3816 (exit $ac_status); }; }; then
3817 ac_cv_sys_large_files=1; break
3818else
3819 echo "$as_me: failed program was:" >&5
3820cat conftest.$ac_ext >&5
3821fi
3822rm -f conftest.$ac_objext conftest.$ac_ext
3823 break
3824done
ba4481b5 3825fi
409d9577 3826echo "$as_me:3826: result: $ac_cv_sys_large_files" >&5
503d2be0
AS
3827echo "${ECHO_T}$ac_cv_sys_large_files" >&6
3828if test "$ac_cv_sys_large_files" != no; then
ba4481b5 3829
503d2be0 3830cat >>confdefs.h <<EOF
f4988be7 3831#define _LARGE_FILES $ac_cv_sys_large_files
ba4481b5
DL
3832EOF
3833
503d2be0
AS
3834fi
3835rm -f conftest*
3836fi
ba4481b5 3837
f4988be7 3838# Sound support for GNU/Linux and the free BSDs.
503d2be0
AS
3839
3840for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
f4988be7 3841do
503d2be0 3842as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
409d9577 3843echo "$as_me:3843: checking for $ac_header" >&5
503d2be0
AS
3844echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3845if eval "test \"\${$as_ac_Header+set}\" = set"; then
3846 echo $ECHO_N "(cached) $ECHO_C" >&6
3847else
3848 cat >conftest.$ac_ext <<_ACEOF
409d9577 3849#line 3849 "configure"
503d2be0
AS
3850#include "confdefs.h"
3851#include <$ac_header>
3852_ACEOF
409d9577 3853if { (eval echo "$as_me:3853: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3854 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3855 ac_status=$?
3856 egrep -v '^ *\+' conftest.er1 >conftest.err
3857 rm -f conftest.er1
3858 cat conftest.err >&5
409d9577 3859 echo "$as_me:3859: \$? = $ac_status" >&5
503d2be0
AS
3860 (exit $ac_status); } >/dev/null; then
3861 if test -s conftest.err; then
3862 ac_cpp_err=$ac_c_preproc_warn_flag
3863 else
3864 ac_cpp_err=
3865 fi
3866else
3867 ac_cpp_err=yes
3868fi
3869if test -z "$ac_cpp_err"; then
3870 eval "$as_ac_Header=yes"
3871else
3872 echo "$as_me: failed program was:" >&5
ba4481b5 3873 cat conftest.$ac_ext >&5
503d2be0 3874 eval "$as_ac_Header=no"
ba4481b5 3875fi
503d2be0 3876rm -f conftest.err conftest.$ac_ext
ba4481b5 3877fi
409d9577 3878echo "$as_me:3878: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
3879echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3880if test `eval echo '${'$as_ac_Header'}'` = yes; then
3881 cat >>confdefs.h <<EOF
3882#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba4481b5 3883EOF
503d2be0 3884
ba4481b5 3885fi
f4988be7 3886done
ba4481b5 3887
f4988be7 3888# Emulation library used on NetBSD.
409d9577 3889echo "$as_me:3889: checking for _oss_ioctl in -lossaudio" >&5
503d2be0
AS
3890echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6
3891if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
3892 echo $ECHO_N "(cached) $ECHO_C" >&6
65171e3a 3893else
503d2be0 3894 ac_check_lib_save_LIBS=$LIBS
f4988be7 3895LIBS="-lossaudio $LIBS"
503d2be0 3896cat >conftest.$ac_ext <<_ACEOF
409d9577 3897#line 3897 "configure"
65171e3a 3898#include "confdefs.h"
503d2be0 3899
f4988be7 3900/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
3901#ifdef __cplusplus
3902extern "C"
3903#endif
f4988be7 3904/* We use char because int might match the return type of a gcc2
503d2be0
AS
3905 builtin and then its argument prototype would still apply. */
3906char _oss_ioctl ();
3907int
3908main ()
3909{
3910_oss_ioctl ();
3911 ;
3912 return 0;
3913}
3914_ACEOF
3915rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 3916if { (eval echo "$as_me:3916: \"$ac_link\"") >&5
503d2be0
AS
3917 (eval $ac_link) 2>&5
3918 ac_status=$?
409d9577 3919 echo "$as_me:3919: \$? = $ac_status" >&5
503d2be0
AS
3920 (exit $ac_status); } &&
3921 { ac_try='test -s conftest$ac_exeext'
409d9577 3922 { (eval echo "$as_me:3922: \"$ac_try\"") >&5
503d2be0
AS
3923 (eval $ac_try) 2>&5
3924 ac_status=$?
409d9577 3925 echo "$as_me:3925: \$? = $ac_status" >&5
503d2be0
AS
3926 (exit $ac_status); }; }; then
3927 ac_cv_lib_ossaudio__oss_ioctl=yes
3928else
3929 echo "$as_me: failed program was:" >&5
3930cat conftest.$ac_ext >&5
3931ac_cv_lib_ossaudio__oss_ioctl=no
3932fi
3933rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3934LIBS=$ac_check_lib_save_LIBS
3935fi
409d9577 3936echo "$as_me:3936: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
503d2be0
AS
3937echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6
3938if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
f4988be7
GM
3939 LIBSOUND=-lossaudio
3940else
503d2be0 3941 LIBSOUND=
f4988be7 3942fi
65171e3a 3943
503d2be0 3944for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
f4988be7 3945 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
b1b84649 3946 termcap.h stdio_ext.h fcntl.h term.h strings.h coff.h
f4988be7 3947do
503d2be0 3948as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
409d9577 3949echo "$as_me:3949: checking for $ac_header" >&5
503d2be0
AS
3950echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3951if eval "test \"\${$as_ac_Header+set}\" = set"; then
3952 echo $ECHO_N "(cached) $ECHO_C" >&6
3953else
3954 cat >conftest.$ac_ext <<_ACEOF
409d9577 3955#line 3955 "configure"
503d2be0
AS
3956#include "confdefs.h"
3957#include <$ac_header>
3958_ACEOF
409d9577 3959if { (eval echo "$as_me:3959: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3960 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3961 ac_status=$?
3962 egrep -v '^ *\+' conftest.er1 >conftest.err
3963 rm -f conftest.er1
3964 cat conftest.err >&5
409d9577 3965 echo "$as_me:3965: \$? = $ac_status" >&5
503d2be0
AS
3966 (exit $ac_status); } >/dev/null; then
3967 if test -s conftest.err; then
3968 ac_cpp_err=$ac_c_preproc_warn_flag
3969 else
3970 ac_cpp_err=
3971 fi
3972else
3973 ac_cpp_err=yes
3974fi
3975if test -z "$ac_cpp_err"; then
3976 eval "$as_ac_Header=yes"
3977else
3978 echo "$as_me: failed program was:" >&5
ba4481b5 3979 cat conftest.$ac_ext >&5
503d2be0 3980 eval "$as_ac_Header=no"
ba4481b5 3981fi
503d2be0 3982rm -f conftest.err conftest.$ac_ext
ba4481b5 3983fi
409d9577 3984echo "$as_me:3984: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
3985echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3986if test `eval echo '${'$as_ac_Header'}'` = yes; then
3987 cat >>confdefs.h <<EOF
3988#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba4481b5 3989EOF
503d2be0 3990
ba4481b5 3991fi
f4988be7 3992done
ba4481b5 3993
409d9577 3994echo "$as_me:3994: checking for ANSI C header files" >&5
503d2be0
AS
3995echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3996if test "${ac_cv_header_stdc+set}" = set; then
3997 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3998else
503d2be0 3999 cat >conftest.$ac_ext <<_ACEOF
409d9577 4000#line 4000 "configure"
ba4481b5 4001#include "confdefs.h"
f4988be7
GM
4002#include <stdlib.h>
4003#include <stdarg.h>
4004#include <string.h>
4005#include <float.h>
503d2be0
AS
4006
4007_ACEOF
409d9577 4008if { (eval echo "$as_me:4008: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
4009 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4010 ac_status=$?
4011 egrep -v '^ *\+' conftest.er1 >conftest.err
4012 rm -f conftest.er1
4013 cat conftest.err >&5
409d9577 4014 echo "$as_me:4014: \$? = $ac_status" >&5
503d2be0
AS
4015 (exit $ac_status); } >/dev/null; then
4016 if test -s conftest.err; then
4017 ac_cpp_err=$ac_c_preproc_warn_flag
4018 else
4019 ac_cpp_err=
4020 fi
4021else
4022 ac_cpp_err=yes
4023fi
4024if test -z "$ac_cpp_err"; then
f4988be7 4025 ac_cv_header_stdc=yes
ba4481b5 4026else
503d2be0 4027 echo "$as_me: failed program was:" >&5
ba4481b5 4028 cat conftest.$ac_ext >&5
f4988be7 4029 ac_cv_header_stdc=no
ba4481b5 4030fi
503d2be0 4031rm -f conftest.err conftest.$ac_ext
ba4481b5 4032
f4988be7
GM
4033if test $ac_cv_header_stdc = yes; then
4034 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
503d2be0 4035 cat >conftest.$ac_ext <<_ACEOF
409d9577 4036#line 4036 "configure"
f4988be7
GM
4037#include "confdefs.h"
4038#include <string.h>
503d2be0
AS
4039
4040_ACEOF
f4988be7
GM
4041if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4042 egrep "memchr" >/dev/null 2>&1; then
4043 :
4044else
f4988be7
GM
4045 ac_cv_header_stdc=no
4046fi
4047rm -f conftest*
4048
4049fi
4050
4051if test $ac_cv_header_stdc = yes; then
4052 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
503d2be0 4053 cat >conftest.$ac_ext <<_ACEOF
409d9577 4054#line 4054 "configure"
f4988be7
GM
4055#include "confdefs.h"
4056#include <stdlib.h>
503d2be0
AS
4057
4058_ACEOF
f4988be7
GM
4059if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4060 egrep "free" >/dev/null 2>&1; then
4061 :
4062else
f4988be7
GM
4063 ac_cv_header_stdc=no
4064fi
4065rm -f conftest*
4066
4067fi
4068
4069if test $ac_cv_header_stdc = yes; then
4070 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
503d2be0 4071 if test "$cross_compiling" = yes; then
f4988be7
GM
4072 :
4073else
503d2be0 4074 cat >conftest.$ac_ext <<_ACEOF
409d9577 4075#line 4075 "configure"
f4988be7
GM
4076#include "confdefs.h"
4077#include <ctype.h>
503d2be0
AS
4078#if ((' ' & 0x0FF) == 0x020)
4079# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4080# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4081#else
4082# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4083 || ('j' <= (c) && (c) <= 'r') \
4084 || ('s' <= (c) && (c) <= 'z'))
4085# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4086#endif
f4988be7 4087
503d2be0
AS
4088#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4089int
4090main ()
4091{
4092 int i;
4093 for (i = 0; i < 256; i++)
4094 if (XOR (islower (i), ISLOWER (i))
4095 || toupper (i) != TOUPPER (i))
4096 exit(2);
4097 exit (0);
4098}
4099_ACEOF
4100rm -f conftest$ac_exeext
409d9577 4101if { (eval echo "$as_me:4101: \"$ac_link\"") >&5
503d2be0
AS
4102 (eval $ac_link) 2>&5
4103 ac_status=$?
409d9577 4104 echo "$as_me:4104: \$? = $ac_status" >&5
503d2be0 4105 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
409d9577 4106 { (eval echo "$as_me:4106: \"$ac_try\"") >&5
503d2be0
AS
4107 (eval $ac_try) 2>&5
4108 ac_status=$?
409d9577 4109 echo "$as_me:4109: \$? = $ac_status" >&5
503d2be0 4110 (exit $ac_status); }; }; then
f4988be7
GM
4111 :
4112else
503d2be0
AS
4113 echo "$as_me: program exited with status $ac_status" >&5
4114echo "$as_me: failed program was:" >&5
4115cat conftest.$ac_ext >&5
4116ac_cv_header_stdc=no
f4988be7 4117fi
503d2be0 4118rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
f4988be7 4119fi
f4988be7
GM
4120fi
4121fi
409d9577 4122echo "$as_me:4122: result: $ac_cv_header_stdc" >&5
503d2be0 4123echo "${ECHO_T}$ac_cv_header_stdc" >&6
f4988be7 4124if test $ac_cv_header_stdc = yes; then
503d2be0
AS
4125
4126cat >>confdefs.h <<\EOF
f4988be7
GM
4127#define STDC_HEADERS 1
4128EOF
4129
4130fi
4131
409d9577 4132echo "$as_me:4132: checking whether time.h and sys/time.h may both be included" >&5
503d2be0
AS
4133echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
4134if test "${ac_cv_header_time+set}" = set; then
4135 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4136else
503d2be0 4137 cat >conftest.$ac_ext <<_ACEOF
409d9577 4138#line 4138 "configure"
f4988be7
GM
4139#include "confdefs.h"
4140#include <sys/types.h>
4141#include <sys/time.h>
4142#include <time.h>
503d2be0
AS
4143
4144int
4145main ()
4146{
4147if ((struct tm *) 0)
4148return 0;
4149 ;
4150 return 0;
4151}
4152_ACEOF
4153rm -f conftest.$ac_objext
409d9577 4154if { (eval echo "$as_me:4154: \"$ac_compile\"") >&5
503d2be0
AS
4155 (eval $ac_compile) 2>&5
4156 ac_status=$?
409d9577 4157 echo "$as_me:4157: \$? = $ac_status" >&5
503d2be0
AS
4158 (exit $ac_status); } &&
4159 { ac_try='test -s conftest.$ac_objext'
409d9577 4160 { (eval echo "$as_me:4160: \"$ac_try\"") >&5
503d2be0
AS
4161 (eval $ac_try) 2>&5
4162 ac_status=$?
409d9577 4163 echo "$as_me:4163: \$? = $ac_status" >&5
503d2be0 4164 (exit $ac_status); }; }; then
f4988be7
GM
4165 ac_cv_header_time=yes
4166else
503d2be0
AS
4167 echo "$as_me: failed program was:" >&5
4168cat conftest.$ac_ext >&5
4169ac_cv_header_time=no
f4988be7 4170fi
503d2be0 4171rm -f conftest.$ac_objext conftest.$ac_ext
f4988be7 4172fi
409d9577 4173echo "$as_me:4173: result: $ac_cv_header_time" >&5
503d2be0 4174echo "${ECHO_T}$ac_cv_header_time" >&6
f4988be7 4175if test $ac_cv_header_time = yes; then
503d2be0
AS
4176
4177cat >>confdefs.h <<\EOF
f4988be7
GM
4178#define TIME_WITH_SYS_TIME 1
4179EOF
4180
4181fi
4182
409d9577 4183echo "$as_me:4183: checking for sys_siglist declaration in signal.h or unistd.h" >&5
503d2be0
AS
4184echo $ECHO_N "checking for sys_siglist declaration in signal.h or unistd.h... $ECHO_C" >&6
4185if test "${ac_cv_decl_sys_siglist+set}" = set; then
4186 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4187else
503d2be0 4188 cat >conftest.$ac_ext <<_ACEOF
409d9577 4189#line 4189 "configure"
f4988be7
GM
4190#include "confdefs.h"
4191#include <sys/types.h>
4192#include <signal.h>
4193/* NetBSD declares sys_siglist in unistd.h. */
503d2be0
AS
4194#if HAVE_UNISTD_H
4195# include <unistd.h>
f4988be7 4196#endif
503d2be0
AS
4197
4198int
4199main ()
4200{
f4988be7 4201char *msg = *(sys_siglist + 1);
503d2be0
AS
4202 ;
4203 return 0;
4204}
4205_ACEOF
4206rm -f conftest.$ac_objext
409d9577 4207if { (eval echo "$as_me:4207: \"$ac_compile\"") >&5
503d2be0
AS
4208 (eval $ac_compile) 2>&5
4209 ac_status=$?
409d9577 4210 echo "$as_me:4210: \$? = $ac_status" >&5
503d2be0
AS
4211 (exit $ac_status); } &&
4212 { ac_try='test -s conftest.$ac_objext'
409d9577 4213 { (eval echo "$as_me:4213: \"$ac_try\"") >&5
503d2be0
AS
4214 (eval $ac_try) 2>&5
4215 ac_status=$?
409d9577 4216 echo "$as_me:4216: \$? = $ac_status" >&5
503d2be0 4217 (exit $ac_status); }; }; then
f4988be7
GM
4218 ac_cv_decl_sys_siglist=yes
4219else
503d2be0
AS
4220 echo "$as_me: failed program was:" >&5
4221cat conftest.$ac_ext >&5
4222ac_cv_decl_sys_siglist=no
f4988be7 4223fi
503d2be0 4224rm -f conftest.$ac_objext conftest.$ac_ext
f4988be7 4225fi
409d9577 4226echo "$as_me:4226: result: $ac_cv_decl_sys_siglist" >&5
503d2be0 4227echo "${ECHO_T}$ac_cv_decl_sys_siglist" >&6
f4988be7 4228if test $ac_cv_decl_sys_siglist = yes; then
503d2be0
AS
4229
4230cat >>confdefs.h <<\EOF
f4988be7
GM
4231#define SYS_SIGLIST_DECLARED 1
4232EOF
4233
4234fi
4235
409d9577 4236echo "$as_me:4236: checking for sys/wait.h that is POSIX.1 compatible" >&5
503d2be0
AS
4237echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
4238if test "${ac_cv_header_sys_wait_h+set}" = set; then
4239 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4240else
503d2be0 4241 cat >conftest.$ac_ext <<_ACEOF
409d9577 4242#line 4242 "configure"
f4988be7
GM
4243#include "confdefs.h"
4244#include <sys/types.h>
4245#include <sys/wait.h>
4246#ifndef WEXITSTATUS
503d2be0 4247# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
f4988be7
GM
4248#endif
4249#ifndef WIFEXITED
503d2be0 4250# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
f4988be7 4251#endif
503d2be0
AS
4252
4253int
4254main ()
4255{
4256 int s;
4257 wait (&s);
4258 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4259 ;
4260 return 0;
4261}
4262_ACEOF
4263rm -f conftest.$ac_objext
409d9577 4264if { (eval echo "$as_me:4264: \"$ac_compile\"") >&5
503d2be0
AS
4265 (eval $ac_compile) 2>&5
4266 ac_status=$?
409d9577 4267 echo "$as_me:4267: \$? = $ac_status" >&5
503d2be0
AS
4268 (exit $ac_status); } &&
4269 { ac_try='test -s conftest.$ac_objext'
409d9577 4270 { (eval echo "$as_me:4270: \"$ac_try\"") >&5
503d2be0
AS
4271 (eval $ac_try) 2>&5
4272 ac_status=$?
409d9577 4273 echo "$as_me:4273: \$? = $ac_status" >&5
503d2be0 4274 (exit $ac_status); }; }; then
f4988be7
GM
4275 ac_cv_header_sys_wait_h=yes
4276else
503d2be0
AS
4277 echo "$as_me: failed program was:" >&5
4278cat conftest.$ac_ext >&5
4279ac_cv_header_sys_wait_h=no
f4988be7 4280fi
503d2be0 4281rm -f conftest.$ac_objext conftest.$ac_ext
f4988be7 4282fi
409d9577 4283echo "$as_me:4283: result: $ac_cv_header_sys_wait_h" >&5
503d2be0 4284echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
f4988be7 4285if test $ac_cv_header_sys_wait_h = yes; then
503d2be0
AS
4286
4287cat >>confdefs.h <<\EOF
f4988be7
GM
4288#define HAVE_SYS_WAIT_H 1
4289EOF
4290
4291fi
4292
409d9577 4293echo "$as_me:4293: checking for struct utimbuf" >&5
503d2be0
AS
4294echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
4295if test "${emacs_cv_struct_utimbuf+set}" = set; then
4296 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4297else
503d2be0 4298 cat >conftest.$ac_ext <<_ACEOF
409d9577 4299#line 4299 "configure"
f4988be7
GM
4300#include "confdefs.h"
4301#ifdef TIME_WITH_SYS_TIME
4302#include <sys/time.h>
4303#include <time.h>
4304#else
4305#ifdef HAVE_SYS_TIME_H
4306#include <sys/time.h>
4307#else
4308#include <time.h>
4309#endif
4310#endif
4311#ifdef HAVE_UTIME_H
4312#include <utime.h>
4313#endif
503d2be0
AS
4314int
4315main ()
4316{
f4988be7 4317static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
4318 ;
4319 return 0;
4320}
4321_ACEOF
4322rm -f conftest.$ac_objext
409d9577 4323if { (eval echo "$as_me:4323: \"$ac_compile\"") >&5
503d2be0
AS
4324 (eval $ac_compile) 2>&5
4325 ac_status=$?
409d9577 4326 echo "$as_me:4326: \$? = $ac_status" >&5
503d2be0
AS
4327 (exit $ac_status); } &&
4328 { ac_try='test -s conftest.$ac_objext'
409d9577 4329 { (eval echo "$as_me:4329: \"$ac_try\"") >&5
503d2be0
AS
4330 (eval $ac_try) 2>&5
4331 ac_status=$?
409d9577 4332 echo "$as_me:4332: \$? = $ac_status" >&5
503d2be0 4333 (exit $ac_status); }; }; then
f4988be7
GM
4334 emacs_cv_struct_utimbuf=yes
4335else
503d2be0
AS
4336 echo "$as_me: failed program was:" >&5
4337cat conftest.$ac_ext >&5
4338emacs_cv_struct_utimbuf=no
f4988be7 4339fi
503d2be0 4340rm -f conftest.$ac_objext conftest.$ac_ext
f4988be7 4341fi
409d9577 4342echo "$as_me:4342: result: $emacs_cv_struct_utimbuf" >&5
503d2be0 4343echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6
f4988be7 4344if test $emacs_cv_struct_utimbuf = yes; then
503d2be0 4345 cat >>confdefs.h <<\EOF
f4988be7
GM
4346#define HAVE_STRUCT_UTIMBUF 1
4347EOF
4348
4349fi
4350
409d9577 4351echo "$as_me:4351: checking return type of signal handlers" >&5
503d2be0
AS
4352echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4353if test "${ac_cv_type_signal+set}" = set; then
4354 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4355else
503d2be0 4356 cat >conftest.$ac_ext <<_ACEOF
409d9577 4357#line 4357 "configure"
f4988be7
GM
4358#include "confdefs.h"
4359#include <sys/types.h>
4360#include <signal.h>
4361#ifdef signal
503d2be0 4362# undef signal
f4988be7
GM
4363#endif
4364#ifdef __cplusplus
4365extern "C" void (*signal (int, void (*)(int)))(int);
4366#else
4367void (*signal ()) ();
4368#endif
4369
503d2be0
AS
4370int
4371main ()
4372{
f4988be7 4373int i;
503d2be0
AS
4374 ;
4375 return 0;
4376}
4377_ACEOF
4378rm -f conftest.$ac_objext
409d9577 4379if { (eval echo "$as_me:4379: \"$ac_compile\"") >&5
503d2be0
AS
4380 (eval $ac_compile) 2>&5
4381 ac_status=$?
409d9577 4382 echo "$as_me:4382: \$? = $ac_status" >&5
503d2be0
AS
4383 (exit $ac_status); } &&
4384 { ac_try='test -s conftest.$ac_objext'
409d9577 4385 { (eval echo "$as_me:4385: \"$ac_try\"") >&5
503d2be0
AS
4386 (eval $ac_try) 2>&5
4387 ac_status=$?
409d9577 4388 echo "$as_me:4388: \$? = $ac_status" >&5
503d2be0 4389 (exit $ac_status); }; }; then
f4988be7
GM
4390 ac_cv_type_signal=void
4391else
503d2be0
AS
4392 echo "$as_me: failed program was:" >&5
4393cat conftest.$ac_ext >&5
4394ac_cv_type_signal=int
f4988be7 4395fi
503d2be0 4396rm -f conftest.$ac_objext conftest.$ac_ext
f4988be7 4397fi
409d9577 4398echo "$as_me:4398: result: $ac_cv_type_signal" >&5
503d2be0 4399echo "${ECHO_T}$ac_cv_type_signal" >&6
f4988be7 4400
503d2be0 4401cat >>confdefs.h <<EOF
f4988be7 4402#define RETSIGTYPE $ac_cv_type_signal
ba4481b5
DL
4403EOF
4404
409d9577 4405echo "$as_me:4405: checking for speed_t" >&5
503d2be0
AS
4406echo $ECHO_N "checking for speed_t... $ECHO_C" >&6
4407if test "${emacs_cv_speed_t+set}" = set; then
4408 echo $ECHO_N "(cached) $ECHO_C" >&6
34ec9ebe 4409else
503d2be0 4410 cat >conftest.$ac_ext <<_ACEOF
409d9577 4411#line 4411 "configure"
34ec9ebe
GM
4412#include "confdefs.h"
4413#include <termios.h>
503d2be0
AS
4414int
4415main ()
4416{
34ec9ebe 4417speed_t x = 1;
503d2be0
AS
4418 ;
4419 return 0;
4420}
4421_ACEOF
4422rm -f conftest.$ac_objext
409d9577 4423if { (eval echo "$as_me:4423: \"$ac_compile\"") >&5
503d2be0
AS
4424 (eval $ac_compile) 2>&5
4425 ac_status=$?
409d9577 4426 echo "$as_me:4426: \$? = $ac_status" >&5
503d2be0
AS
4427 (exit $ac_status); } &&
4428 { ac_try='test -s conftest.$ac_objext'
409d9577 4429 { (eval echo "$as_me:4429: \"$ac_try\"") >&5
503d2be0
AS
4430 (eval $ac_try) 2>&5
4431 ac_status=$?
409d9577 4432 echo "$as_me:4432: \$? = $ac_status" >&5
503d2be0 4433 (exit $ac_status); }; }; then
34ec9ebe
GM
4434 emacs_cv_speed_t=yes
4435else
503d2be0
AS
4436 echo "$as_me: failed program was:" >&5
4437cat conftest.$ac_ext >&5
4438emacs_cv_speed_t=no
34ec9ebe 4439fi
503d2be0 4440rm -f conftest.$ac_objext conftest.$ac_ext
34ec9ebe 4441fi
409d9577 4442echo "$as_me:4442: result: $emacs_cv_speed_t" >&5
503d2be0 4443echo "${ECHO_T}$emacs_cv_speed_t" >&6
34ec9ebe 4444if test $emacs_cv_speed_t = yes; then
503d2be0 4445 cat >>confdefs.h <<\EOF
34ec9ebe
GM
4446#define HAVE_SPEED_T 1
4447EOF
4448
4449fi
4450
409d9577 4451echo "$as_me:4451: checking for struct timeval" >&5
503d2be0
AS
4452echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
4453if test "${emacs_cv_struct_timeval+set}" = set; then
4454 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4455else
503d2be0 4456 cat >conftest.$ac_ext <<_ACEOF
409d9577 4457#line 4457 "configure"
ba4481b5
DL
4458#include "confdefs.h"
4459#ifdef TIME_WITH_SYS_TIME
4460#include <sys/time.h>
4461#include <time.h>
4462#else
4463#ifdef HAVE_SYS_TIME_H
4464#include <sys/time.h>
4465#else
4466#include <time.h>
4467#endif
4468#endif
503d2be0
AS
4469int
4470main ()
4471{
ba4481b5 4472static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
4473 ;
4474 return 0;
4475}
4476_ACEOF
4477rm -f conftest.$ac_objext
409d9577 4478if { (eval echo "$as_me:4478: \"$ac_compile\"") >&5
503d2be0
AS
4479 (eval $ac_compile) 2>&5
4480 ac_status=$?
409d9577 4481 echo "$as_me:4481: \$? = $ac_status" >&5
503d2be0
AS
4482 (exit $ac_status); } &&
4483 { ac_try='test -s conftest.$ac_objext'
409d9577 4484 { (eval echo "$as_me:4484: \"$ac_try\"") >&5
503d2be0
AS
4485 (eval $ac_try) 2>&5
4486 ac_status=$?
409d9577 4487 echo "$as_me:4487: \$? = $ac_status" >&5
503d2be0 4488 (exit $ac_status); }; }; then
ba4481b5
DL
4489 emacs_cv_struct_timeval=yes
4490else
503d2be0
AS
4491 echo "$as_me: failed program was:" >&5
4492cat conftest.$ac_ext >&5
4493emacs_cv_struct_timeval=no
ba4481b5 4494fi
503d2be0 4495rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 4496fi
409d9577 4497echo "$as_me:4497: result: $emacs_cv_struct_timeval" >&5
503d2be0 4498echo "${ECHO_T}$emacs_cv_struct_timeval" >&6
ba4481b5
DL
4499HAVE_TIMEVAL=$emacs_cv_struct_timeval
4500if test $emacs_cv_struct_timeval = yes; then
503d2be0 4501 cat >>confdefs.h <<\EOF
ba4481b5
DL
4502#define HAVE_TIMEVAL 1
4503EOF
4504
4505fi
4506
409d9577 4507echo "$as_me:4507: checking for struct exception" >&5
503d2be0
AS
4508echo $ECHO_N "checking for struct exception... $ECHO_C" >&6
4509if test "${emacs_cv_struct_exception+set}" = set; then
4510 echo $ECHO_N "(cached) $ECHO_C" >&6
d42122a3 4511else
503d2be0 4512 cat >conftest.$ac_ext <<_ACEOF
409d9577 4513#line 4513 "configure"
d42122a3
DL
4514#include "confdefs.h"
4515#include <math.h>
503d2be0
AS
4516int
4517main ()
4518{
d42122a3 4519static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
4520 ;
4521 return 0;
4522}
4523_ACEOF
4524rm -f conftest.$ac_objext
409d9577 4525if { (eval echo "$as_me:4525: \"$ac_compile\"") >&5
503d2be0
AS
4526 (eval $ac_compile) 2>&5
4527 ac_status=$?
409d9577 4528 echo "$as_me:4528: \$? = $ac_status" >&5
503d2be0
AS
4529 (exit $ac_status); } &&
4530 { ac_try='test -s conftest.$ac_objext'
409d9577 4531 { (eval echo "$as_me:4531: \"$ac_try\"") >&5
503d2be0
AS
4532 (eval $ac_try) 2>&5
4533 ac_status=$?
409d9577 4534 echo "$as_me:4534: \$? = $ac_status" >&5
503d2be0 4535 (exit $ac_status); }; }; then
d42122a3
DL
4536 emacs_cv_struct_exception=yes
4537else
503d2be0
AS
4538 echo "$as_me: failed program was:" >&5
4539cat conftest.$ac_ext >&5
4540emacs_cv_struct_exception=no
d42122a3 4541fi
503d2be0 4542rm -f conftest.$ac_objext conftest.$ac_ext
d42122a3 4543fi
409d9577 4544echo "$as_me:4544: result: $emacs_cv_struct_exception" >&5
503d2be0 4545echo "${ECHO_T}$emacs_cv_struct_exception" >&6
d42122a3
DL
4546HAVE_EXCEPTION=$emacs_cv_struct_exception
4547if test $emacs_cv_struct_exception != yes; then
503d2be0 4548 cat >>confdefs.h <<\EOF
d42122a3
DL
4549#define NO_MATHERR 1
4550EOF
4551
4552fi
4553
409d9577 4554echo "$as_me:4554: checking whether struct tm is in sys/time.h or time.h" >&5
503d2be0
AS
4555echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
4556if test "${ac_cv_struct_tm+set}" = set; then
4557 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4558else
503d2be0 4559 cat >conftest.$ac_ext <<_ACEOF
409d9577 4560#line 4560 "configure"
ba4481b5
DL
4561#include "confdefs.h"
4562#include <sys/types.h>
4563#include <time.h>
503d2be0
AS
4564
4565int
4566main ()
4567{
ba4481b5 4568struct tm *tp; tp->tm_sec;
503d2be0
AS
4569 ;
4570 return 0;
4571}
4572_ACEOF
4573rm -f conftest.$ac_objext
409d9577 4574if { (eval echo "$as_me:4574: \"$ac_compile\"") >&5
503d2be0
AS
4575 (eval $ac_compile) 2>&5
4576 ac_status=$?
409d9577 4577 echo "$as_me:4577: \$? = $ac_status" >&5
503d2be0
AS
4578 (exit $ac_status); } &&
4579 { ac_try='test -s conftest.$ac_objext'
409d9577 4580 { (eval echo "$as_me:4580: \"$ac_try\"") >&5
503d2be0
AS
4581 (eval $ac_try) 2>&5
4582 ac_status=$?
409d9577 4583 echo "$as_me:4583: \$? = $ac_status" >&5
503d2be0 4584 (exit $ac_status); }; }; then
ba4481b5
DL
4585 ac_cv_struct_tm=time.h
4586else
503d2be0
AS
4587 echo "$as_me: failed program was:" >&5
4588cat conftest.$ac_ext >&5
4589ac_cv_struct_tm=sys/time.h
ba4481b5 4590fi
503d2be0 4591rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 4592fi
409d9577 4593echo "$as_me:4593: result: $ac_cv_struct_tm" >&5
503d2be0 4594echo "${ECHO_T}$ac_cv_struct_tm" >&6
ba4481b5 4595if test $ac_cv_struct_tm = sys/time.h; then
503d2be0
AS
4596
4597cat >>confdefs.h <<\EOF
ba4481b5
DL
4598#define TM_IN_SYS_TIME 1
4599EOF
4600
4601fi
4602
409d9577 4603echo "$as_me:4603: checking for struct tm.tm_zone" >&5
503d2be0
AS
4604echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
4605if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
4606 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4607else
503d2be0 4608 cat >conftest.$ac_ext <<_ACEOF
409d9577 4609#line 4609 "configure"
ba4481b5
DL
4610#include "confdefs.h"
4611#include <sys/types.h>
4612#include <$ac_cv_struct_tm>
503d2be0
AS
4613
4614int
4615main ()
4616{
4617static struct tm ac_aggr;
4618if (ac_aggr.tm_zone)
4619return 0;
4620 ;
4621 return 0;
4622}
4623_ACEOF
4624rm -f conftest.$ac_objext
409d9577 4625if { (eval echo "$as_me:4625: \"$ac_compile\"") >&5
503d2be0
AS
4626 (eval $ac_compile) 2>&5
4627 ac_status=$?
409d9577 4628 echo "$as_me:4628: \$? = $ac_status" >&5
503d2be0
AS
4629 (exit $ac_status); } &&
4630 { ac_try='test -s conftest.$ac_objext'
409d9577 4631 { (eval echo "$as_me:4631: \"$ac_try\"") >&5
503d2be0
AS
4632 (eval $ac_try) 2>&5
4633 ac_status=$?
409d9577 4634 echo "$as_me:4634: \$? = $ac_status" >&5
503d2be0
AS
4635 (exit $ac_status); }; }; then
4636 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 4637else
503d2be0
AS
4638 echo "$as_me: failed program was:" >&5
4639cat conftest.$ac_ext >&5
4640ac_cv_member_struct_tm_tm_zone=no
ba4481b5 4641fi
503d2be0
AS
4642rm -f conftest.$ac_objext conftest.$ac_ext
4643fi
409d9577 4644echo "$as_me:4644: result: $ac_cv_member_struct_tm_tm_zone" >&5
503d2be0
AS
4645echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
4646if test $ac_cv_member_struct_tm_tm_zone = yes; then
4647
4648cat >>confdefs.h <<EOF
4649#define HAVE_STRUCT_TM_TM_ZONE 1
4650EOF
4651
ba4481b5
DL
4652fi
4653
503d2be0
AS
4654if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
4655
4656cat >>confdefs.h <<\EOF
ba4481b5
DL
4657#define HAVE_TM_ZONE 1
4658EOF
4659
4660else
409d9577 4661 echo "$as_me:4661: checking for tzname" >&5
503d2be0
AS
4662echo $ECHO_N "checking for tzname... $ECHO_C" >&6
4663if test "${ac_cv_var_tzname+set}" = set; then
4664 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4665else
503d2be0 4666 cat >conftest.$ac_ext <<_ACEOF
409d9577 4667#line 4667 "configure"
ba4481b5
DL
4668#include "confdefs.h"
4669#include <time.h>
4670#ifndef tzname /* For SGI. */
4671extern char *tzname[]; /* RS6000 and others reject char **tzname. */
4672#endif
503d2be0
AS
4673
4674int
4675main ()
4676{
ba4481b5 4677atoi(*tzname);
503d2be0
AS
4678 ;
4679 return 0;
4680}
4681_ACEOF
4682rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 4683if { (eval echo "$as_me:4683: \"$ac_link\"") >&5
503d2be0
AS
4684 (eval $ac_link) 2>&5
4685 ac_status=$?
409d9577 4686 echo "$as_me:4686: \$? = $ac_status" >&5
503d2be0
AS
4687 (exit $ac_status); } &&
4688 { ac_try='test -s conftest$ac_exeext'
409d9577 4689 { (eval echo "$as_me:4689: \"$ac_try\"") >&5
503d2be0
AS
4690 (eval $ac_try) 2>&5
4691 ac_status=$?
409d9577 4692 echo "$as_me:4692: \$? = $ac_status" >&5
503d2be0 4693 (exit $ac_status); }; }; then
ba4481b5
DL
4694 ac_cv_var_tzname=yes
4695else
503d2be0
AS
4696 echo "$as_me: failed program was:" >&5
4697cat conftest.$ac_ext >&5
4698ac_cv_var_tzname=no
ba4481b5 4699fi
503d2be0 4700rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 4701fi
409d9577 4702echo "$as_me:4702: result: $ac_cv_var_tzname" >&5
503d2be0 4703echo "${ECHO_T}$ac_cv_var_tzname" >&6
ba4481b5 4704 if test $ac_cv_var_tzname = yes; then
503d2be0
AS
4705
4706cat >>confdefs.h <<\EOF
ba4481b5
DL
4707#define HAVE_TZNAME 1
4708EOF
4709
4710 fi
4711fi
4712
409d9577 4713echo "$as_me:4713: checking for tm_gmtoff in struct tm" >&5
503d2be0
AS
4714echo $ECHO_N "checking for tm_gmtoff in struct tm... $ECHO_C" >&6
4715if test "${emacs_cv_tm_gmtoff+set}" = set; then
4716 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 4717else
503d2be0 4718 cat >conftest.$ac_ext <<_ACEOF
409d9577 4719#line 4719 "configure"
1113b624
PE
4720#include "confdefs.h"
4721#include <time.h>
503d2be0
AS
4722int
4723main ()
4724{
1113b624 4725struct tm t; t.tm_gmtoff = 0
503d2be0
AS
4726 ;
4727 return 0;
4728}
4729_ACEOF
4730rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 4731if { (eval echo "$as_me:4731: \"$ac_link\"") >&5
503d2be0
AS
4732 (eval $ac_link) 2>&5
4733 ac_status=$?
409d9577 4734 echo "$as_me:4734: \$? = $ac_status" >&5
503d2be0
AS
4735 (exit $ac_status); } &&
4736 { ac_try='test -s conftest$ac_exeext'
409d9577 4737 { (eval echo "$as_me:4737: \"$ac_try\"") >&5
503d2be0
AS
4738 (eval $ac_try) 2>&5
4739 ac_status=$?
409d9577 4740 echo "$as_me:4740: \$? = $ac_status" >&5
503d2be0 4741 (exit $ac_status); }; }; then
1113b624
PE
4742 emacs_cv_tm_gmtoff=yes
4743else
503d2be0
AS
4744 echo "$as_me: failed program was:" >&5
4745cat conftest.$ac_ext >&5
4746emacs_cv_tm_gmtoff=no
1113b624 4747fi
503d2be0 4748rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1113b624 4749fi
409d9577 4750echo "$as_me:4750: result: $emacs_cv_tm_gmtoff" >&5
503d2be0 4751echo "${ECHO_T}$emacs_cv_tm_gmtoff" >&6
1113b624 4752if test $emacs_cv_tm_gmtoff = yes; then
503d2be0 4753 cat >>confdefs.h <<\EOF
1113b624
PE
4754#define HAVE_TM_GMTOFF 1
4755EOF
4756
4757fi
ba4481b5 4758
409d9577 4759echo "$as_me:4759: checking for $CC option to accept ANSI C" >&5
503d2be0
AS
4760echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
4761if test "${ac_cv_prog_cc_stdc+set}" = set; then
4762 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
4763else
4764 ac_cv_prog_cc_stdc=no
503d2be0
AS
4765ac_save_CC=$CC
4766cat >conftest.$ac_ext <<_ACEOF
409d9577 4767#line 4767 "configure"
7397acc4
DL
4768#include "confdefs.h"
4769#include <stdarg.h>
4770#include <stdio.h>
4771#include <sys/types.h>
4772#include <sys/stat.h>
4773/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4774struct buf { int x; };
4775FILE * (*rcsopen) (struct buf *, struct stat *, int);
4776static char *e (p, i)
4777 char **p;
4778 int i;
4779{
4780 return p[i];
4781}
4782static char *f (char * (*g) (char **, int), char **p, ...)
4783{
4784 char *s;
4785 va_list v;
4786 va_start (v,p);
4787 s = g (p, va_arg (v,int));
4788 va_end (v);
4789 return s;
4790}
4791int test (int i, double x);
4792struct s1 {int (*f) (int a);};
4793struct s2 {int (*f) (double a);};
4794int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4795int argc;
4796char **argv;
503d2be0
AS
4797int
4798main ()
4799{
7397acc4 4800return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
503d2be0
AS
4801 ;
4802 return 0;
4803}
4804_ACEOF
4805# Don't try gcc -ansi; that turns off useful extensions and
4806# breaks some systems' header files.
4807# AIX -qlanglvl=ansi
4808# Ultrix and OSF/1 -std1
4809# HP-UX 10.20 and later -Ae
4810# HP-UX older versions -Aa -D_HPUX_SOURCE
4811# SVR4 -Xc -D__EXTENSIONS__
4812for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4813do
4814 CC="$ac_save_CC $ac_arg"
4815 rm -f conftest.$ac_objext
409d9577 4816if { (eval echo "$as_me:4816: \"$ac_compile\"") >&5
503d2be0
AS
4817 (eval $ac_compile) 2>&5
4818 ac_status=$?
409d9577 4819 echo "$as_me:4819: \$? = $ac_status" >&5
503d2be0
AS
4820 (exit $ac_status); } &&
4821 { ac_try='test -s conftest.$ac_objext'
409d9577 4822 { (eval echo "$as_me:4822: \"$ac_try\"") >&5
503d2be0
AS
4823 (eval $ac_try) 2>&5
4824 ac_status=$?
409d9577 4825 echo "$as_me:4825: \$? = $ac_status" >&5
503d2be0
AS
4826 (exit $ac_status); }; }; then
4827 ac_cv_prog_cc_stdc=$ac_arg
4828break
4829else
4830 echo "$as_me: failed program was:" >&5
4831cat conftest.$ac_ext >&5
4832fi
4833rm -f conftest.$ac_objext
7397acc4 4834done
503d2be0
AS
4835rm -f conftest.$ac_ext conftest.$ac_objext
4836CC=$ac_save_CC
7397acc4
DL
4837
4838fi
4839
4840case "x$ac_cv_prog_cc_stdc" in
4841 x|xno)
409d9577 4842 echo "$as_me:4842: result: none needed" >&5
503d2be0 4843echo "${ECHO_T}none needed" >&6 ;;
7397acc4 4844 *)
409d9577 4845 echo "$as_me:4845: result: $ac_cv_prog_cc_stdc" >&5
503d2be0 4846echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
7397acc4
DL
4847 CC="$CC $ac_cv_prog_cc_stdc" ;;
4848esac
4849
409d9577 4850echo "$as_me:4850: checking for function prototypes" >&5
503d2be0 4851echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
7397acc4 4852if test "$ac_cv_prog_cc_stdc" != no; then
409d9577 4853 echo "$as_me:4853: result: yes" >&5
503d2be0
AS
4854echo "${ECHO_T}yes" >&6
4855
4856cat >>confdefs.h <<\EOF
7397acc4
DL
4857#define PROTOTYPES 1
4858EOF
4859
4860else
409d9577 4861 echo "$as_me:4861: result: no" >&5
503d2be0 4862echo "${ECHO_T}no" >&6
7397acc4
DL
4863fi
4864
409d9577 4865echo "$as_me:4865: checking for working volatile" >&5
503d2be0
AS
4866echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
4867if test "${ac_cv_c_volatile+set}" = set; then
4868 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 4869else
503d2be0 4870 cat >conftest.$ac_ext <<_ACEOF
409d9577 4871#line 4871 "configure"
7397acc4
DL
4872#include "confdefs.h"
4873
503d2be0
AS
4874int
4875main ()
4876{
7397acc4
DL
4877
4878volatile int x;
4879int * volatile y;
503d2be0
AS
4880 ;
4881 return 0;
4882}
4883_ACEOF
4884rm -f conftest.$ac_objext
409d9577 4885if { (eval echo "$as_me:4885: \"$ac_compile\"") >&5
503d2be0
AS
4886 (eval $ac_compile) 2>&5
4887 ac_status=$?
409d9577 4888 echo "$as_me:4888: \$? = $ac_status" >&5
503d2be0
AS
4889 (exit $ac_status); } &&
4890 { ac_try='test -s conftest.$ac_objext'
409d9577 4891 { (eval echo "$as_me:4891: \"$ac_try\"") >&5
503d2be0
AS
4892 (eval $ac_try) 2>&5
4893 ac_status=$?
409d9577 4894 echo "$as_me:4894: \$? = $ac_status" >&5
503d2be0 4895 (exit $ac_status); }; }; then
7397acc4
DL
4896 ac_cv_c_volatile=yes
4897else
503d2be0
AS
4898 echo "$as_me: failed program was:" >&5
4899cat conftest.$ac_ext >&5
4900ac_cv_c_volatile=no
7397acc4 4901fi
503d2be0 4902rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 4903fi
409d9577 4904echo "$as_me:4904: result: $ac_cv_c_volatile" >&5
503d2be0 4905echo "${ECHO_T}$ac_cv_c_volatile" >&6
7397acc4 4906if test $ac_cv_c_volatile = no; then
503d2be0
AS
4907
4908cat >>confdefs.h <<\EOF
4909#define volatile
7397acc4
DL
4910EOF
4911
4912fi
4913
409d9577 4914echo "$as_me:4914: checking for an ANSI C-conforming const" >&5
503d2be0
AS
4915echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
4916if test "${ac_cv_c_const+set}" = set; then
4917 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4918else
503d2be0 4919 cat >conftest.$ac_ext <<_ACEOF
409d9577 4920#line 4920 "configure"
ba4481b5
DL
4921#include "confdefs.h"
4922
503d2be0
AS
4923int
4924main ()
4925{
4926/* FIXME: Include the comments suggested by Paul. */
4927#ifndef __cplusplus
4928 /* Ultrix mips cc rejects this. */
4929 typedef int charset[2];
4930 const charset x;
4931 /* SunOS 4.1.1 cc rejects this. */
4932 char const *const *ccp;
4933 char **p;
4934 /* NEC SVR4.0.2 mips cc rejects this. */
4935 struct point {int x, y;};
4936 static struct point const zero = {0,0};
4937 /* AIX XL C 1.02.0.0 rejects this.
4938 It does not let you subtract one const X* pointer from another in
4939 an arm of an if-expression whose if-part is not a constant
4940 expression */
4941 const char *g = "string";
4942 ccp = &g + (g ? g-g : 0);
4943 /* HPUX 7.0 cc rejects these. */
4944 ++ccp;
4945 p = (char**) ccp;
4946 ccp = (char const *const *) p;
4947 { /* SCO 3.2v4 cc rejects this. */
4948 char *t;
4949 char const *s = 0 ? (char *) 0 : (char const *) 0;
4950
4951 *t++ = 0;
4952 }
4953 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
4954 int x[] = {25, 17};
4955 const int *foo = &x[0];
4956 ++foo;
4957 }
4958 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4959 typedef const int *iptr;
4960 iptr p = 0;
4961 ++p;
4962 }
4963 { /* AIX XL C 1.02.0.0 rejects this saying
4964 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4965 struct s { int j; const int *ap[3]; };
4966 struct s *b; b->j = 5;
4967 }
4968 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4969 const int foo = 10;
4970 }
4971#endif
ba4481b5 4972
503d2be0
AS
4973 ;
4974 return 0;
ba4481b5 4975}
503d2be0
AS
4976_ACEOF
4977rm -f conftest.$ac_objext
409d9577 4978if { (eval echo "$as_me:4978: \"$ac_compile\"") >&5
503d2be0
AS
4979 (eval $ac_compile) 2>&5
4980 ac_status=$?
409d9577 4981 echo "$as_me:4981: \$? = $ac_status" >&5
503d2be0
AS
4982 (exit $ac_status); } &&
4983 { ac_try='test -s conftest.$ac_objext'
409d9577 4984 { (eval echo "$as_me:4984: \"$ac_try\"") >&5
503d2be0
AS
4985 (eval $ac_try) 2>&5
4986 ac_status=$?
409d9577 4987 echo "$as_me:4987: \$? = $ac_status" >&5
503d2be0 4988 (exit $ac_status); }; }; then
ba4481b5
DL
4989 ac_cv_c_const=yes
4990else
503d2be0
AS
4991 echo "$as_me: failed program was:" >&5
4992cat conftest.$ac_ext >&5
4993ac_cv_c_const=no
ba4481b5 4994fi
503d2be0 4995rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 4996fi
409d9577 4997echo "$as_me:4997: result: $ac_cv_c_const" >&5
503d2be0 4998echo "${ECHO_T}$ac_cv_c_const" >&6
ba4481b5 4999if test $ac_cv_c_const = no; then
503d2be0
AS
5000
5001cat >>confdefs.h <<\EOF
5002#define const
ba4481b5
DL
5003EOF
5004
5005fi
5006
409d9577 5007echo "$as_me:5007: checking for void * support" >&5
503d2be0
AS
5008echo $ECHO_N "checking for void * support... $ECHO_C" >&6
5009if test "${emacs_cv_void_star+set}" = set; then
5010 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 5011else
503d2be0 5012 cat >conftest.$ac_ext <<_ACEOF
409d9577 5013#line 5013 "configure"
7397acc4
DL
5014#include "confdefs.h"
5015
503d2be0
AS
5016int
5017main ()
5018{
7397acc4 5019void * foo;
503d2be0
AS
5020 ;
5021 return 0;
5022}
5023_ACEOF
5024rm -f conftest.$ac_objext
409d9577 5025if { (eval echo "$as_me:5025: \"$ac_compile\"") >&5
503d2be0
AS
5026 (eval $ac_compile) 2>&5
5027 ac_status=$?
409d9577 5028 echo "$as_me:5028: \$? = $ac_status" >&5
503d2be0
AS
5029 (exit $ac_status); } &&
5030 { ac_try='test -s conftest.$ac_objext'
409d9577 5031 { (eval echo "$as_me:5031: \"$ac_try\"") >&5
503d2be0
AS
5032 (eval $ac_try) 2>&5
5033 ac_status=$?
409d9577 5034 echo "$as_me:5034: \$? = $ac_status" >&5
503d2be0 5035 (exit $ac_status); }; }; then
7397acc4
DL
5036 emacs_cv_void_star=yes
5037else
503d2be0
AS
5038 echo "$as_me: failed program was:" >&5
5039cat conftest.$ac_ext >&5
5040emacs_cv_void_star=no
7397acc4 5041fi
503d2be0 5042rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 5043fi
409d9577 5044echo "$as_me:5044: result: $emacs_cv_void_star" >&5
503d2be0 5045echo "${ECHO_T}$emacs_cv_void_star" >&6
7397acc4 5046if test $emacs_cv_void_star = yes; then
503d2be0 5047 cat >>confdefs.h <<\EOF
7397acc4
DL
5048#define POINTER_TYPE void
5049EOF
5050
5051else
503d2be0 5052 cat >>confdefs.h <<\EOF
7397acc4
DL
5053#define POINTER_TYPE char
5054EOF
5055
5056fi
ba4481b5 5057
409d9577 5058echo "$as_me:5058: checking whether ${MAKE-make} sets \${MAKE}" >&5
503d2be0
AS
5059echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
5060set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
5061if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
5062 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5063else
503d2be0 5064 cat >conftest.make <<\EOF
ba4481b5
DL
5065all:
5066 @echo 'ac_maketemp="${MAKE}"'
5067EOF
5068# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
503d2be0 5069eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
ba4481b5
DL
5070if test -n "$ac_maketemp"; then
5071 eval ac_cv_prog_make_${ac_make}_set=yes
5072else
5073 eval ac_cv_prog_make_${ac_make}_set=no
5074fi
503d2be0 5075rm -f conftest.make
ba4481b5
DL
5076fi
5077if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
409d9577 5078 echo "$as_me:5078: result: yes" >&5
503d2be0 5079echo "${ECHO_T}yes" >&6
ba4481b5
DL
5080 SET_MAKE=
5081else
409d9577 5082 echo "$as_me:5082: result: no" >&5
503d2be0 5083echo "${ECHO_T}no" >&6
ba4481b5
DL
5084 SET_MAKE="MAKE=${MAKE-make}"
5085fi
5086
409d9577 5087echo "$as_me:5087: checking for long file names" >&5
503d2be0
AS
5088echo $ECHO_N "checking for long file names... $ECHO_C" >&6
5089if test "${ac_cv_sys_long_file_names+set}" = set; then
5090 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
5091else
5092 ac_cv_sys_long_file_names=yes
5093# Test for long file names in all the places we know might matter:
5094# . the current directory, where building will happen
5095# $prefix/lib where we will be installing things
5096# $exec_prefix/lib likewise
5097# eval it to expand exec_prefix.
5098# $TMPDIR if set, where it might want to write temporary files
5099# if $TMPDIR is not set:
5100# /tmp where it might want to write temporary files
5101# /var/tmp likewise
5102# /usr/tmp likewise
5103if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
503d2be0 5104 ac_tmpdirs=$TMPDIR
ba4481b5
DL
5105else
5106 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
5107fi
5108for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
5109 test -d $ac_dir || continue
5110 test -w $ac_dir || continue # It is less confusing to not echo anything here.
503d2be0
AS
5111 ac_xdir=$ac_dir/cf$$
5112 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
5113 ac_tf1=$ac_xdir/conftest9012345
5114 ac_tf2=$ac_xdir/conftest9012346
5115 (echo 1 >$ac_tf1) 2>/dev/null
5116 (echo 2 >$ac_tf2) 2>/dev/null
5117 ac_val=`cat $ac_tf1 2>/dev/null`
5118 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
ba4481b5 5119 ac_cv_sys_long_file_names=no
503d2be0 5120 rm -rf $ac_xdir 2>/dev/null
ba4481b5
DL
5121 break
5122 fi
503d2be0 5123 rm -rf $ac_xdir 2>/dev/null
ba4481b5
DL
5124done
5125fi
409d9577 5126echo "$as_me:5126: result: $ac_cv_sys_long_file_names" >&5
503d2be0 5127echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
ba4481b5 5128if test $ac_cv_sys_long_file_names = yes; then
503d2be0
AS
5129
5130cat >>confdefs.h <<\EOF
ba4481b5
DL
5131#define HAVE_LONG_FILE_NAMES 1
5132EOF
5133
5134fi
5135
ba4481b5
DL
5136#### Choose a window system.
5137
409d9577 5138echo "$as_me:5138: checking for X" >&5
503d2be0 5139echo $ECHO_N "checking for X... $ECHO_C" >&6
ba4481b5
DL
5140
5141# Check whether --with-x or --without-x was given.
5142if test "${with_x+set}" = set; then
5143 withval="$with_x"
ba4481b5 5144
503d2be0 5145fi;
ba4481b5
DL
5146# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5147if test "x$with_x" = xno; then
5148 # The user explicitly disabled X.
5149 have_x=disabled
5150else
5151 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5152 # Both variables are already set.
5153 have_x=yes
5154 else
503d2be0
AS
5155 if test "${ac_cv_have_x+set}" = set; then
5156 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
5157else
5158 # One or both of the vars are not set, and there is no cached value.
503d2be0
AS
5159ac_x_includes=no ac_x_libraries=no
5160rm -fr conftest.dir
5161if mkdir conftest.dir; then
5162 cd conftest.dir
ba4481b5 5163 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
503d2be0 5164 cat >Imakefile <<'EOF'
ba4481b5
DL
5165acfindx:
5166 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5167EOF
5168 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5169 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5170 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5171 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5172 for ac_extension in a so sl; do
5173 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
503d2be0 5174 test -f $ac_im_libdir/libX11.$ac_extension; then
ba4481b5
DL
5175 ac_im_usrlibdir=$ac_im_libdir; break
5176 fi
5177 done
5178 # Screen out bogus values from the imake configuration. They are
5179 # bogus both because they are the default anyway, and because
5180 # using them would break gcc on systems where it needs fixed includes.
503d2be0 5181 case $ac_im_incroot in
ba4481b5 5182 /usr/include) ;;
503d2be0 5183 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
ba4481b5 5184 esac
503d2be0 5185 case $ac_im_usrlibdir in
ba4481b5 5186 /usr/lib | /lib) ;;
503d2be0 5187 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
ba4481b5
DL
5188 esac
5189 fi
5190 cd ..
503d2be0 5191 rm -fr conftest.dir
ba4481b5
DL
5192fi
5193
503d2be0
AS
5194# Standard set of common directories for X headers.
5195# Check X11 before X11Rn because it is often a symlink to the current release.
5196ac_x_header_dirs='
5197/usr/X11/include
5198/usr/X11R6/include
5199/usr/X11R5/include
5200/usr/X11R4/include
5201
5202/usr/include/X11
5203/usr/include/X11R6
5204/usr/include/X11R5
5205/usr/include/X11R4
5206
5207/usr/local/X11/include
5208/usr/local/X11R6/include
5209/usr/local/X11R5/include
5210/usr/local/X11R4/include
5211
5212/usr/local/include/X11
5213/usr/local/include/X11R6
5214/usr/local/include/X11R5
5215/usr/local/include/X11R4
5216
5217/usr/X386/include
5218/usr/x386/include
5219/usr/XFree86/include/X11
5220
5221/usr/include
5222/usr/local/include
5223/usr/unsupported/include
5224/usr/athena/include
5225/usr/local/x11r5/include
5226/usr/lpp/Xamples/include
5227
5228/usr/openwin/include
5229/usr/openwin/share/include'
5230
5231if test "$ac_x_includes" = no; then
5232 # Guess where to find include files, by looking for Intrinsic.h.
ba4481b5 5233 # First, try using that file with no special directory specified.
503d2be0 5234 cat >conftest.$ac_ext <<_ACEOF
409d9577 5235#line 5235 "configure"
ba4481b5 5236#include "confdefs.h"
503d2be0
AS
5237#include <X11/Intrinsic.h>
5238_ACEOF
409d9577 5239if { (eval echo "$as_me:5239: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
5240 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5241 ac_status=$?
5242 egrep -v '^ *\+' conftest.er1 >conftest.err
5243 rm -f conftest.er1
5244 cat conftest.err >&5
409d9577 5245 echo "$as_me:5245: \$? = $ac_status" >&5
503d2be0
AS
5246 (exit $ac_status); } >/dev/null; then
5247 if test -s conftest.err; then
5248 ac_cpp_err=$ac_c_preproc_warn_flag
5249 else
5250 ac_cpp_err=
5251 fi
5252else
5253 ac_cpp_err=yes
5254fi
5255if test -z "$ac_cpp_err"; then
ba4481b5
DL
5256 # We can compile using X headers with no special include directory.
5257ac_x_includes=
5258else
503d2be0 5259 echo "$as_me: failed program was:" >&5
ba4481b5 5260 cat conftest.$ac_ext >&5
503d2be0
AS
5261 for ac_dir in $ac_x_header_dirs; do
5262 if test -r "$ac_dir/X11/Intrinsic.h"; then
5263 ac_x_includes=$ac_dir
5264 break
5265 fi
5266done
ba4481b5 5267fi
503d2be0
AS
5268rm -f conftest.err conftest.$ac_ext
5269fi # $ac_x_includes = no
ba4481b5 5270
503d2be0 5271if test "$ac_x_libraries" = no; then
ba4481b5 5272 # Check for the libraries.
ba4481b5
DL
5273 # See if we find them without any special options.
5274 # Don't add to $LIBS permanently.
503d2be0
AS
5275 ac_save_LIBS=$LIBS
5276 LIBS="-lXt $LIBS"
5277 cat >conftest.$ac_ext <<_ACEOF
409d9577 5278#line 5278 "configure"
ba4481b5 5279#include "confdefs.h"
503d2be0
AS
5280#include <X11/Intrinsic.h>
5281int
5282main ()
5283{
5284XtMalloc (0)
5285 ;
5286 return 0;
5287}
5288_ACEOF
5289rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 5290if { (eval echo "$as_me:5290: \"$ac_link\"") >&5
503d2be0
AS
5291 (eval $ac_link) 2>&5
5292 ac_status=$?
409d9577 5293 echo "$as_me:5293: \$? = $ac_status" >&5
503d2be0
AS
5294 (exit $ac_status); } &&
5295 { ac_try='test -s conftest$ac_exeext'
409d9577 5296 { (eval echo "$as_me:5296: \"$ac_try\"") >&5
503d2be0
AS
5297 (eval $ac_try) 2>&5
5298 ac_status=$?
409d9577 5299 echo "$as_me:5299: \$? = $ac_status" >&5
503d2be0
AS
5300 (exit $ac_status); }; }; then
5301 LIBS=$ac_save_LIBS
ba4481b5
DL
5302# We can link X programs with no special library path.
5303ac_x_libraries=
5304else
503d2be0
AS
5305 echo "$as_me: failed program was:" >&5
5306cat conftest.$ac_ext >&5
5307LIBS=$ac_save_LIBS
5308for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
ba4481b5 5309do
503d2be0 5310 # Don't even attempt the hair of trying to link an X program!
ba4481b5 5311 for ac_extension in a so sl; do
503d2be0 5312 if test -r $ac_dir/libXt.$ac_extension; then
ba4481b5
DL
5313 ac_x_libraries=$ac_dir
5314 break 2
5315 fi
5316 done
5317done
5318fi
503d2be0
AS
5319rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5320fi # $ac_x_libraries = no
ba4481b5 5321
503d2be0 5322if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
ba4481b5
DL
5323 # Didn't find X anywhere. Cache the known absence of X.
5324 ac_cv_have_x="have_x=no"
5325else
5326 # Record where we found X for the cache.
5327 ac_cv_have_x="have_x=yes \
5328 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5329fi
5330fi
503d2be0 5331
ba4481b5
DL
5332 fi
5333 eval "$ac_cv_have_x"
5334fi # $with_x != no
5335
5336if test "$have_x" != yes; then
409d9577 5337 echo "$as_me:5337: result: $have_x" >&5
503d2be0 5338echo "${ECHO_T}$have_x" >&6
ba4481b5
DL
5339 no_x=yes
5340else
5341 # If each of the values was on the command line, it overrides each guess.
5342 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5343 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5344 # Update the cache value to reflect the command line values.
5345 ac_cv_have_x="have_x=yes \
5346 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
409d9577 5347 echo "$as_me:5347: result: libraries $x_libraries, headers $x_includes" >&5
503d2be0 5348echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
ba4481b5
DL
5349fi
5350
5351if test "$no_x" = yes; then
5352 window_system=none
5353else
5354 window_system=x11
5355fi
5356
5357if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
5358 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
5359 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
5360 x_default_search_path=""
5361 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
f5215ba5
GM
5362 x_search_path="\
5363${x_library}/X11/%L/%T/%N%C%S:\
5364${x_library}/X11/%l/%T/%N%C%S:\
5365${x_library}/X11/%T/%N%C%S:\
5366${x_library}/X11/%L/%T/%N%S:\
5367${x_library}/X11/%l/%T/%N%S:\
5368${x_library}/X11/%T/%N%S"
ba4481b5
DL
5369 if test x"${x_default_search_path}" = x; then
5370 x_default_search_path=${x_search_path}
5371 else
5372 x_default_search_path="${x_search_path}:${x_default_search_path}"
5373 fi
5374 done
5375fi
5376if test "${x_includes}" != NONE && test -n "${x_includes}"; then
5377 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
5378fi
5379
5380if test x"${x_includes}" = x; then
5381 bitmapdir=/usr/include/X11/bitmaps
5382else
5383 # accumulate include directories that have X11 bitmap subdirectories
5384 bmd_acc="dummyval"
5385 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
5386 if test -d "${bmd}/X11/bitmaps"; then
5387 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
946173ad
DL
5388 fi
5389 if test -d "${bmd}/bitmaps"; then
ba4481b5
DL
5390 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
5391 fi
5392 done
5393 if test ${bmd_acc} != "dummyval"; then
5394 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
5395 fi
5396fi
5397
5398case "${window_system}" in
5399 x11 )
5400 HAVE_X_WINDOWS=yes
5401 HAVE_X11=yes
5402 case "${with_x_toolkit}" in
5403 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
5404 motif ) USE_X_TOOLKIT=MOTIF ;;
5405 no ) USE_X_TOOLKIT=none ;;
5406 * ) USE_X_TOOLKIT=maybe ;;
5407 esac
5408 ;;
5409 none )
5410 HAVE_X_WINDOWS=no
5411 HAVE_X11=no
5412 USE_X_TOOLKIT=none
5413 ;;
5414esac
5415
5416### If we're using X11, we should use the X menu package.
5417HAVE_MENUS=no
5418case ${HAVE_X11} in
5419 yes ) HAVE_MENUS=yes ;;
5420esac
503d2be0 5421
ba4481b5
DL
5422if test "${opsys}" = "hpux9"; then
5423 case "${x_libraries}" in
5424 *X11R4* )
5425 opsysfile="s/hpux9-x11r4.h"
5426 ;;
5427 esac
5428fi
5429
5430if test "${opsys}" = "hpux9shr"; then
5431 case "${x_libraries}" in
5432 *X11R4* )
5433 opsysfile="s/hpux9shxr4.h"
5434 ;;
5435 esac
5436fi
5437
ba4481b5
DL
5438### Compute the unexec source name from the object name.
5439UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
5440
5441# Do the opsystem or machine files prohibit the use of the GNU malloc?
5442# Assume not, until told otherwise.
5443GNU_MALLOC=yes
5444doug_lea_malloc=yes
409d9577 5445echo "$as_me:5445: checking for malloc_get_state" >&5
503d2be0
AS
5446echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6
5447if test "${ac_cv_func_malloc_get_state+set}" = set; then
5448 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5449else
503d2be0 5450 cat >conftest.$ac_ext <<_ACEOF
409d9577 5451#line 5451 "configure"
ba4481b5
DL
5452#include "confdefs.h"
5453/* System header to define __stub macros and hopefully few prototypes,
503d2be0 5454 which can conflict with char malloc_get_state (); below. */
ba4481b5
DL
5455#include <assert.h>
5456/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
5457#ifdef __cplusplus
5458extern "C"
5459#endif
ba4481b5 5460/* We use char because int might match the return type of a gcc2
503d2be0
AS
5461 builtin and then its argument prototype would still apply. */
5462char malloc_get_state ();
5463char (*f) ();
ba4481b5 5464
503d2be0
AS
5465int
5466main ()
5467{
ba4481b5
DL
5468/* The GNU C library defines this for functions which it implements
5469 to always fail with ENOSYS. Some functions are actually named
5470 something starting with __ and the normal name is an alias. */
5471#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
5472choke me
5473#else
503d2be0 5474f = malloc_get_state;
ba4481b5
DL
5475#endif
5476
503d2be0
AS
5477 ;
5478 return 0;
5479}
5480_ACEOF
5481rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 5482if { (eval echo "$as_me:5482: \"$ac_link\"") >&5
503d2be0
AS
5483 (eval $ac_link) 2>&5
5484 ac_status=$?
409d9577 5485 echo "$as_me:5485: \$? = $ac_status" >&5
503d2be0
AS
5486 (exit $ac_status); } &&
5487 { ac_try='test -s conftest$ac_exeext'
409d9577 5488 { (eval echo "$as_me:5488: \"$ac_try\"") >&5
503d2be0
AS
5489 (eval $ac_try) 2>&5
5490 ac_status=$?
409d9577 5491 echo "$as_me:5491: \$? = $ac_status" >&5
503d2be0
AS
5492 (exit $ac_status); }; }; then
5493 ac_cv_func_malloc_get_state=yes
5494else
5495 echo "$as_me: failed program was:" >&5
5496cat conftest.$ac_ext >&5
5497ac_cv_func_malloc_get_state=no
5498fi
5499rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5500fi
409d9577 5501echo "$as_me:5501: result: $ac_cv_func_malloc_get_state" >&5
503d2be0
AS
5502echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6
5503if test $ac_cv_func_malloc_get_state = yes; then
ba4481b5
DL
5504 :
5505else
503d2be0 5506 doug_lea_malloc=no
ba4481b5
DL
5507fi
5508
409d9577 5509echo "$as_me:5509: checking for malloc_set_state" >&5
503d2be0
AS
5510echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6
5511if test "${ac_cv_func_malloc_set_state+set}" = set; then
5512 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5513else
503d2be0 5514 cat >conftest.$ac_ext <<_ACEOF
409d9577 5515#line 5515 "configure"
ba4481b5
DL
5516#include "confdefs.h"
5517/* System header to define __stub macros and hopefully few prototypes,
503d2be0 5518 which can conflict with char malloc_set_state (); below. */
ba4481b5
DL
5519#include <assert.h>
5520/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
5521#ifdef __cplusplus
5522extern "C"
5523#endif
ba4481b5 5524/* We use char because int might match the return type of a gcc2
503d2be0
AS
5525 builtin and then its argument prototype would still apply. */
5526char malloc_set_state ();
5527char (*f) ();
ba4481b5 5528
503d2be0
AS
5529int
5530main ()
5531{
ba4481b5
DL
5532/* The GNU C library defines this for functions which it implements
5533 to always fail with ENOSYS. Some functions are actually named
5534 something starting with __ and the normal name is an alias. */
5535#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
5536choke me
5537#else
503d2be0 5538f = malloc_set_state;
ba4481b5
DL
5539#endif
5540
503d2be0
AS
5541 ;
5542 return 0;
5543}
5544_ACEOF
5545rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 5546if { (eval echo "$as_me:5546: \"$ac_link\"") >&5
503d2be0
AS
5547 (eval $ac_link) 2>&5
5548 ac_status=$?
409d9577 5549 echo "$as_me:5549: \$? = $ac_status" >&5
503d2be0
AS
5550 (exit $ac_status); } &&
5551 { ac_try='test -s conftest$ac_exeext'
409d9577 5552 { (eval echo "$as_me:5552: \"$ac_try\"") >&5
503d2be0
AS
5553 (eval $ac_try) 2>&5
5554 ac_status=$?
409d9577 5555 echo "$as_me:5555: \$? = $ac_status" >&5
503d2be0
AS
5556 (exit $ac_status); }; }; then
5557 ac_cv_func_malloc_set_state=yes
5558else
5559 echo "$as_me: failed program was:" >&5
5560cat conftest.$ac_ext >&5
5561ac_cv_func_malloc_set_state=no
5562fi
5563rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5564fi
409d9577 5565echo "$as_me:5565: result: $ac_cv_func_malloc_set_state" >&5
503d2be0
AS
5566echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6
5567if test $ac_cv_func_malloc_set_state = yes; then
ba4481b5
DL
5568 :
5569else
503d2be0 5570 doug_lea_malloc=no
ba4481b5
DL
5571fi
5572
409d9577 5573echo "$as_me:5573: checking whether __after_morecore_hook exists" >&5
503d2be0
AS
5574echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6
5575if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
5576 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5577else
503d2be0 5578 cat >conftest.$ac_ext <<_ACEOF
409d9577 5579#line 5579 "configure"
ba4481b5
DL
5580#include "confdefs.h"
5581extern void (* __after_morecore_hook)();
503d2be0
AS
5582int
5583main ()
5584{
ba4481b5 5585__after_morecore_hook = 0
503d2be0
AS
5586 ;
5587 return 0;
5588}
5589_ACEOF
5590rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 5591if { (eval echo "$as_me:5591: \"$ac_link\"") >&5
503d2be0
AS
5592 (eval $ac_link) 2>&5
5593 ac_status=$?
409d9577 5594 echo "$as_me:5594: \$? = $ac_status" >&5
503d2be0
AS
5595 (exit $ac_status); } &&
5596 { ac_try='test -s conftest$ac_exeext'
409d9577 5597 { (eval echo "$as_me:5597: \"$ac_try\"") >&5
503d2be0
AS
5598 (eval $ac_try) 2>&5
5599 ac_status=$?
409d9577 5600 echo "$as_me:5600: \$? = $ac_status" >&5
503d2be0 5601 (exit $ac_status); }; }; then
ba4481b5
DL
5602 emacs_cv_var___after_morecore_hook=yes
5603else
503d2be0
AS
5604 echo "$as_me: failed program was:" >&5
5605cat conftest.$ac_ext >&5
5606emacs_cv_var___after_morecore_hook=no
ba4481b5 5607fi
503d2be0 5608rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 5609fi
409d9577 5610echo "$as_me:5610: result: $emacs_cv_var___after_morecore_hook" >&5
503d2be0 5611echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6
ba4481b5
DL
5612if test $emacs_cv_var___after_morecore_hook = no; then
5613 doug_lea_malloc=no
5614fi
5615if test "${system_malloc}" = "yes"; then
5616 GNU_MALLOC=no
5617 GNU_MALLOC_reason="
5618 (The GNU allocators don't work with this system configuration.)"
5619fi
5620if test "$doug_lea_malloc" = "yes" ; then
5621 if test "$GNU_MALLOC" = yes ; then
5622 GNU_MALLOC_reason="
5623 (Using Doug Lea's new malloc from the GNU C Library.)"
5624 fi
503d2be0 5625 cat >>confdefs.h <<\EOF
ba4481b5
DL
5626#define DOUG_LEA_MALLOC 1
5627EOF
5628
5629fi
5630
5631if test x"${REL_ALLOC}" = x; then
5632 REL_ALLOC=${GNU_MALLOC}
5633fi
5634
503d2be0
AS
5635# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5636
5637for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5638 inttypes.h stdint.h unistd.h
5639do
5640as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
409d9577 5641echo "$as_me:5641: checking for $ac_header" >&5
503d2be0
AS
5642echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5643if eval "test \"\${$as_ac_Header+set}\" = set"; then
5644 echo $ECHO_N "(cached) $ECHO_C" >&6
5645else
5646 cat >conftest.$ac_ext <<_ACEOF
409d9577 5647#line 5647 "configure"
503d2be0
AS
5648#include "confdefs.h"
5649$ac_includes_default
5650#include <$ac_header>
5651_ACEOF
5652rm -f conftest.$ac_objext
409d9577 5653if { (eval echo "$as_me:5653: \"$ac_compile\"") >&5
503d2be0
AS
5654 (eval $ac_compile) 2>&5
5655 ac_status=$?
409d9577 5656 echo "$as_me:5656: \$? = $ac_status" >&5
503d2be0
AS
5657 (exit $ac_status); } &&
5658 { ac_try='test -s conftest.$ac_objext'
409d9577 5659 { (eval echo "$as_me:5659: \"$ac_try\"") >&5
503d2be0
AS
5660 (eval $ac_try) 2>&5
5661 ac_status=$?
409d9577 5662 echo "$as_me:5662: \$? = $ac_status" >&5
503d2be0
AS
5663 (exit $ac_status); }; }; then
5664 eval "$as_ac_Header=yes"
5665else
5666 echo "$as_me: failed program was:" >&5
5667cat conftest.$ac_ext >&5
5668eval "$as_ac_Header=no"
5669fi
5670rm -f conftest.$ac_objext conftest.$ac_ext
5671fi
409d9577 5672echo "$as_me:5672: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
5673echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5674if test `eval echo '${'$as_ac_Header'}'` = yes; then
5675 cat >>confdefs.h <<EOF
5676#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5677EOF
5678
5679fi
5680done
a55b799a 5681
503d2be0 5682for ac_header in stdlib.h unistd.h
73b77ee5 5683do
503d2be0 5684as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
409d9577 5685echo "$as_me:5685: checking for $ac_header" >&5
503d2be0
AS
5686echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5687if eval "test \"\${$as_ac_Header+set}\" = set"; then
5688 echo $ECHO_N "(cached) $ECHO_C" >&6
5689else
5690 cat >conftest.$ac_ext <<_ACEOF
409d9577 5691#line 5691 "configure"
503d2be0
AS
5692#include "confdefs.h"
5693#include <$ac_header>
5694_ACEOF
409d9577 5695if { (eval echo "$as_me:5695: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
5696 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5697 ac_status=$?
5698 egrep -v '^ *\+' conftest.er1 >conftest.err
5699 rm -f conftest.er1
5700 cat conftest.err >&5
409d9577 5701 echo "$as_me:5701: \$? = $ac_status" >&5
503d2be0
AS
5702 (exit $ac_status); } >/dev/null; then
5703 if test -s conftest.err; then
5704 ac_cpp_err=$ac_c_preproc_warn_flag
5705 else
5706 ac_cpp_err=
5707 fi
5708else
5709 ac_cpp_err=yes
5710fi
5711if test -z "$ac_cpp_err"; then
5712 eval "$as_ac_Header=yes"
5713else
5714 echo "$as_me: failed program was:" >&5
ba4481b5 5715 cat conftest.$ac_ext >&5
503d2be0 5716 eval "$as_ac_Header=no"
ba4481b5 5717fi
503d2be0 5718rm -f conftest.err conftest.$ac_ext
ba4481b5 5719fi
409d9577 5720echo "$as_me:5720: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
5721echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5722if test `eval echo '${'$as_ac_Header'}'` = yes; then
5723 cat >>confdefs.h <<EOF
5724#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba4481b5 5725EOF
503d2be0 5726
ba4481b5 5727fi
73b77ee5 5728done
ba4481b5 5729
73b77ee5 5730for ac_func in getpagesize
ba4481b5 5731do
503d2be0 5732as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
409d9577 5733echo "$as_me:5733: checking for $ac_func" >&5
503d2be0
AS
5734echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5735if eval "test \"\${$as_ac_var+set}\" = set"; then
5736 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5737else
503d2be0 5738 cat >conftest.$ac_ext <<_ACEOF
409d9577 5739#line 5739 "configure"
ba4481b5
DL
5740#include "confdefs.h"
5741/* System header to define __stub macros and hopefully few prototypes,
503d2be0 5742 which can conflict with char $ac_func (); below. */
ba4481b5
DL
5743#include <assert.h>
5744/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
5745#ifdef __cplusplus
5746extern "C"
5747#endif
ba4481b5 5748/* We use char because int might match the return type of a gcc2
503d2be0
AS
5749 builtin and then its argument prototype would still apply. */
5750char $ac_func ();
5751char (*f) ();
ba4481b5 5752
503d2be0
AS
5753int
5754main ()
5755{
ba4481b5
DL
5756/* The GNU C library defines this for functions which it implements
5757 to always fail with ENOSYS. Some functions are actually named
5758 something starting with __ and the normal name is an alias. */
5759#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5760choke me
5761#else
503d2be0 5762f = $ac_func;
ba4481b5
DL
5763#endif
5764
503d2be0
AS
5765 ;
5766 return 0;
5767}
5768_ACEOF
5769rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 5770if { (eval echo "$as_me:5770: \"$ac_link\"") >&5
503d2be0
AS
5771 (eval $ac_link) 2>&5
5772 ac_status=$?
409d9577 5773 echo "$as_me:5773: \$? = $ac_status" >&5
503d2be0
AS
5774 (exit $ac_status); } &&
5775 { ac_try='test -s conftest$ac_exeext'
409d9577 5776 { (eval echo "$as_me:5776: \"$ac_try\"") >&5
503d2be0
AS
5777 (eval $ac_try) 2>&5
5778 ac_status=$?
409d9577 5779 echo "$as_me:5779: \$? = $ac_status" >&5
503d2be0
AS
5780 (exit $ac_status); }; }; then
5781 eval "$as_ac_var=yes"
5782else
5783 echo "$as_me: failed program was:" >&5
5784cat conftest.$ac_ext >&5
5785eval "$as_ac_var=no"
5786fi
5787rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5788fi
409d9577 5789echo "$as_me:5789: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
5790echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5791if test `eval echo '${'$as_ac_var'}'` = yes; then
5792 cat >>confdefs.h <<EOF
5793#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
ba4481b5 5794EOF
ba4481b5 5795
ba4481b5
DL
5796fi
5797done
5798
409d9577 5799echo "$as_me:5799: checking for working mmap" >&5
503d2be0
AS
5800echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
5801if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
5802 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5
GM
5803else
5804 if test "$cross_compiling" = yes; then
5805 ac_cv_func_mmap_fixed_mapped=no
ba4481b5 5806else
503d2be0 5807 cat >conftest.$ac_ext <<_ACEOF
409d9577 5808#line 5808 "configure"
ba4481b5 5809#include "confdefs.h"
503d2be0 5810$ac_includes_default
73b77ee5
GM
5811/* Thanks to Mike Haertel and Jim Avera for this test.
5812 Here is a matrix of mmap possibilities:
5813 mmap private not fixed
5814 mmap private fixed at somewhere currently unmapped
5815 mmap private fixed at somewhere already mapped
5816 mmap shared not fixed
5817 mmap shared fixed at somewhere currently unmapped
5818 mmap shared fixed at somewhere already mapped
5819 For private mappings, we should verify that changes cannot be read()
5820 back from the file, nor mmap's back from the file at a different
5821 address. (There have been systems where private was not correctly
5822 implemented like the infamous i386 svr4.0, and systems where the
1932bc86 5823 VM page cache was not coherent with the file system buffer cache
73b77ee5
GM
5824 like early versions of FreeBSD and possibly contemporary NetBSD.)
5825 For shared mappings, we should conversely verify that changes get
5826 propogated back to all the places they're supposed to be.
5827
5828 Grep wants private fixed already mapped.
5829 The main things grep needs to know about mmap are:
5830 * does it exist and is it safe to write into the mmap'd area
5831 * how to use it (BSD variants) */
503d2be0 5832
73b77ee5
GM
5833#include <fcntl.h>
5834#include <sys/mman.h>
5835
503d2be0 5836#if !STDC_HEADERS && !HAVE_STDLIB_H
1932bc86
DL
5837char *malloc ();
5838#endif
73b77ee5 5839
1932bc86
DL
5840/* This mess was copied from the GNU getpagesize.h. */
5841#if !HAVE_GETPAGESIZE
73b77ee5 5842/* Assume that all systems that can run configure have sys/param.h. */
1932bc86 5843# if !HAVE_SYS_PARAM_H
73b77ee5
GM
5844# define HAVE_SYS_PARAM_H 1
5845# endif
5846
5847# ifdef _SC_PAGESIZE
5848# define getpagesize() sysconf(_SC_PAGESIZE)
5849# else /* no _SC_PAGESIZE */
1932bc86 5850# if HAVE_SYS_PARAM_H
73b77ee5
GM
5851# include <sys/param.h>
5852# ifdef EXEC_PAGESIZE
5853# define getpagesize() EXEC_PAGESIZE
5854# else /* no EXEC_PAGESIZE */
5855# ifdef NBPG
5856# define getpagesize() NBPG * CLSIZE
5857# ifndef CLSIZE
5858# define CLSIZE 1
5859# endif /* no CLSIZE */
5860# else /* no NBPG */
5861# ifdef NBPC
5862# define getpagesize() NBPC
5863# else /* no NBPC */
5864# ifdef PAGESIZE
5865# define getpagesize() PAGESIZE
5866# endif /* PAGESIZE */
5867# endif /* no NBPC */
5868# endif /* no NBPG */
5869# endif /* no EXEC_PAGESIZE */
5870# else /* no HAVE_SYS_PARAM_H */
5871# define getpagesize() 8192 /* punt totally */
5872# endif /* no HAVE_SYS_PARAM_H */
5873# endif /* no _SC_PAGESIZE */
5874
5875#endif /* no HAVE_GETPAGESIZE */
5876
73b77ee5 5877int
1932bc86 5878main ()
73b77ee5 5879{
1932bc86
DL
5880 char *data, *data2, *data3;
5881 int i, pagesize;
5882 int fd;
5883
5884 pagesize = getpagesize ();
5885
5886 /* First, make a file with some known garbage in it. */
5887 data = (char *) malloc (pagesize);
5888 if (!data)
5889 exit (1);
5890 for (i = 0; i < pagesize; ++i)
5891 *(data + i) = rand ();
5892 umask (0);
503d2be0 5893 fd = creat ("conftest.mmap", 0600);
1932bc86
DL
5894 if (fd < 0)
5895 exit (1);
5896 if (write (fd, data, pagesize) != pagesize)
5897 exit (1);
5898 close (fd);
73b77ee5 5899
1932bc86
DL
5900 /* Next, try to mmap the file at a fixed address which already has
5901 something else allocated at it. If we can, also make sure that
5902 we see the same garbage. */
503d2be0 5903 fd = open ("conftest.mmap", O_RDWR);
1932bc86
DL
5904 if (fd < 0)
5905 exit (1);
5906 data2 = (char *) malloc (2 * pagesize);
5907 if (!data2)
5908 exit (1);
5909 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5910 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
5911 MAP_PRIVATE | MAP_FIXED, fd, 0L))
5912 exit (1);
5913 for (i = 0; i < pagesize; ++i)
5914 if (*(data + i) != *(data2 + i))
5915 exit (1);
5916
5917 /* Finally, make sure that changes to the mapped area do not
5918 percolate back to the file as seen by read(). (This is a bug on
5919 some variants of i386 svr4.0.) */
5920 for (i = 0; i < pagesize; ++i)
5921 *(data2 + i) = *(data2 + i) + 1;
5922 data3 = (char *) malloc (pagesize);
5923 if (!data3)
5924 exit (1);
5925 if (read (fd, data3, pagesize) != pagesize)
5926 exit (1);
5927 for (i = 0; i < pagesize; ++i)
5928 if (*(data + i) != *(data3 + i))
5929 exit (1);
5930 close (fd);
1932bc86
DL
5931 exit (0);
5932}
503d2be0
AS
5933_ACEOF
5934rm -f conftest$ac_exeext
409d9577 5935if { (eval echo "$as_me:5935: \"$ac_link\"") >&5
503d2be0
AS
5936 (eval $ac_link) 2>&5
5937 ac_status=$?
409d9577 5938 echo "$as_me:5938: \$? = $ac_status" >&5
503d2be0 5939 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
409d9577 5940 { (eval echo "$as_me:5940: \"$ac_try\"") >&5
503d2be0
AS
5941 (eval $ac_try) 2>&5
5942 ac_status=$?
409d9577 5943 echo "$as_me:5943: \$? = $ac_status" >&5
503d2be0 5944 (exit $ac_status); }; }; then
73b77ee5
GM
5945 ac_cv_func_mmap_fixed_mapped=yes
5946else
503d2be0
AS
5947 echo "$as_me: program exited with status $ac_status" >&5
5948echo "$as_me: failed program was:" >&5
5949cat conftest.$ac_ext >&5
5950ac_cv_func_mmap_fixed_mapped=no
73b77ee5 5951fi
503d2be0 5952rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
73b77ee5 5953fi
73b77ee5 5954fi
409d9577 5955echo "$as_me:5955: result: $ac_cv_func_mmap_fixed_mapped" >&5
503d2be0 5956echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
73b77ee5 5957if test $ac_cv_func_mmap_fixed_mapped = yes; then
503d2be0
AS
5958
5959cat >>confdefs.h <<\EOF
73b77ee5
GM
5960#define HAVE_MMAP 1
5961EOF
5962
5963fi
503d2be0 5964rm -f conftest.mmap
73b77ee5 5965
ef9e4345
GM
5966if test $use_mmap_for_buffers = yes; then
5967 REL_ALLOC=no
73b77ee5
GM
5968fi
5969
5970LIBS="$libsrc_libs $LIBS"
5971
409d9577 5972echo "$as_me:5972: checking for dnet_ntoa in -ldnet" >&5
503d2be0
AS
5973echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
5974if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
5975 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 5976else
503d2be0 5977 ac_check_lib_save_LIBS=$LIBS
73b77ee5 5978LIBS="-ldnet $LIBS"
503d2be0 5979cat >conftest.$ac_ext <<_ACEOF
409d9577 5980#line 5980 "configure"
73b77ee5 5981#include "confdefs.h"
503d2be0 5982
73b77ee5 5983/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
5984#ifdef __cplusplus
5985extern "C"
5986#endif
73b77ee5 5987/* We use char because int might match the return type of a gcc2
503d2be0
AS
5988 builtin and then its argument prototype would still apply. */
5989char dnet_ntoa ();
5990int
5991main ()
5992{
5993dnet_ntoa ();
5994 ;
5995 return 0;
5996}
5997_ACEOF
5998rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 5999if { (eval echo "$as_me:5999: \"$ac_link\"") >&5
503d2be0
AS
6000 (eval $ac_link) 2>&5
6001 ac_status=$?
409d9577 6002 echo "$as_me:6002: \$? = $ac_status" >&5
503d2be0
AS
6003 (exit $ac_status); } &&
6004 { ac_try='test -s conftest$ac_exeext'
409d9577 6005 { (eval echo "$as_me:6005: \"$ac_try\"") >&5
503d2be0
AS
6006 (eval $ac_try) 2>&5
6007 ac_status=$?
409d9577 6008 echo "$as_me:6008: \$? = $ac_status" >&5
503d2be0
AS
6009 (exit $ac_status); }; }; then
6010 ac_cv_lib_dnet_dnet_ntoa=yes
6011else
6012 echo "$as_me: failed program was:" >&5
6013cat conftest.$ac_ext >&5
6014ac_cv_lib_dnet_dnet_ntoa=no
6015fi
6016rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6017LIBS=$ac_check_lib_save_LIBS
6018fi
409d9577 6019echo "$as_me:6019: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
503d2be0
AS
6020echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
6021if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
6022 cat >>confdefs.h <<EOF
6023#define HAVE_LIBDNET 1
73b77ee5
GM
6024EOF
6025
6026 LIBS="-ldnet $LIBS"
6027
73b77ee5
GM
6028fi
6029
409d9577 6030echo "$as_me:6030: checking for main in -lXbsd" >&5
503d2be0
AS
6031echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6
6032if test "${ac_cv_lib_Xbsd_main+set}" = set; then
6033 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 6034else
503d2be0 6035 ac_check_lib_save_LIBS=$LIBS
73b77ee5 6036LIBS="-lXbsd $LIBS"
503d2be0 6037cat >conftest.$ac_ext <<_ACEOF
409d9577 6038#line 6038 "configure"
73b77ee5
GM
6039#include "confdefs.h"
6040
503d2be0
AS
6041int
6042main ()
6043{
6044main ();
6045 ;
6046 return 0;
6047}
6048_ACEOF
6049rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 6050if { (eval echo "$as_me:6050: \"$ac_link\"") >&5
503d2be0
AS
6051 (eval $ac_link) 2>&5
6052 ac_status=$?
409d9577 6053 echo "$as_me:6053: \$? = $ac_status" >&5
503d2be0
AS
6054 (exit $ac_status); } &&
6055 { ac_try='test -s conftest$ac_exeext'
409d9577 6056 { (eval echo "$as_me:6056: \"$ac_try\"") >&5
503d2be0
AS
6057 (eval $ac_try) 2>&5
6058 ac_status=$?
409d9577 6059 echo "$as_me:6059: \$? = $ac_status" >&5
503d2be0
AS
6060 (exit $ac_status); }; }; then
6061 ac_cv_lib_Xbsd_main=yes
6062else
6063 echo "$as_me: failed program was:" >&5
6064cat conftest.$ac_ext >&5
6065ac_cv_lib_Xbsd_main=no
6066fi
6067rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6068LIBS=$ac_check_lib_save_LIBS
6069fi
409d9577 6070echo "$as_me:6070: result: $ac_cv_lib_Xbsd_main" >&5
503d2be0
AS
6071echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6
6072if test $ac_cv_lib_Xbsd_main = yes; then
73b77ee5 6073 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
73b77ee5
GM
6074fi
6075
409d9577 6076echo "$as_me:6076: checking for cma_open in -lpthreads" >&5
503d2be0
AS
6077echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6
6078if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
6079 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 6080else
503d2be0 6081 ac_check_lib_save_LIBS=$LIBS
73b77ee5 6082LIBS="-lpthreads $LIBS"
503d2be0 6083cat >conftest.$ac_ext <<_ACEOF
409d9577 6084#line 6084 "configure"
73b77ee5 6085#include "confdefs.h"
503d2be0 6086
73b77ee5 6087/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6088#ifdef __cplusplus
6089extern "C"
6090#endif
73b77ee5 6091/* We use char because int might match the return type of a gcc2
503d2be0
AS
6092 builtin and then its argument prototype would still apply. */
6093char cma_open ();
6094int
6095main ()
6096{
6097cma_open ();
6098 ;
6099 return 0;
6100}
6101_ACEOF
6102rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 6103if { (eval echo "$as_me:6103: \"$ac_link\"") >&5
503d2be0
AS
6104 (eval $ac_link) 2>&5
6105 ac_status=$?
409d9577 6106 echo "$as_me:6106: \$? = $ac_status" >&5
503d2be0
AS
6107 (exit $ac_status); } &&
6108 { ac_try='test -s conftest$ac_exeext'
409d9577 6109 { (eval echo "$as_me:6109: \"$ac_try\"") >&5
503d2be0
AS
6110 (eval $ac_try) 2>&5
6111 ac_status=$?
409d9577 6112 echo "$as_me:6112: \$? = $ac_status" >&5
503d2be0
AS
6113 (exit $ac_status); }; }; then
6114 ac_cv_lib_pthreads_cma_open=yes
6115else
6116 echo "$as_me: failed program was:" >&5
6117cat conftest.$ac_ext >&5
6118ac_cv_lib_pthreads_cma_open=no
6119fi
6120rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6121LIBS=$ac_check_lib_save_LIBS
6122fi
409d9577 6123echo "$as_me:6123: result: $ac_cv_lib_pthreads_cma_open" >&5
503d2be0
AS
6124echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6
6125if test $ac_cv_lib_pthreads_cma_open = yes; then
6126 cat >>confdefs.h <<EOF
6127#define HAVE_LIBPTHREADS 1
73b77ee5
GM
6128EOF
6129
6130 LIBS="-lpthreads $LIBS"
6131
73b77ee5
GM
6132fi
6133
409d9577 6134echo "$as_me:6134: checking for XFree86 in /usr/X386" >&5
503d2be0 6135echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6
73b77ee5
GM
6136if test -d /usr/X386/include; then
6137 HAVE_XFREE386=yes
6138 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
6139else
6140 HAVE_XFREE386=no
6141fi
409d9577 6142echo "$as_me:6142: result: $HAVE_XFREE386" >&5
503d2be0 6143echo "${ECHO_T}$HAVE_XFREE386" >&6
73b77ee5
GM
6144
6145# Change CFLAGS temporarily so that C_SWITCH_X_SITE gets used
6146# for the tests that follow. We set it back to REAL_CFLAGS later on.
6147
6148REAL_CPPFLAGS="$CPPFLAGS"
6149
6150if test "${HAVE_X11}" = "yes"; then
6151 DEFS="$C_SWITCH_X_SITE $DEFS"
6152 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
6153 LIBS="$LIBX $LIBS"
6154 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
6155 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
6156
6157 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
6158 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
6159 # but it's more convenient here to set LD_RUN_PATH
6160 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
6161 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
6162 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
6163 export LD_RUN_PATH
6164 fi
6165
6166 if test "${opsys}" = "gnu-linux"; then
409d9577 6167 echo "$as_me:6167: checking whether X on GNU/Linux needs -b to link" >&5
503d2be0
AS
6168echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6
6169 cat >conftest.$ac_ext <<_ACEOF
409d9577 6170#line 6170 "configure"
73b77ee5
GM
6171#include "confdefs.h"
6172
503d2be0
AS
6173int
6174main ()
6175{
73b77ee5 6176XOpenDisplay ("foo");
503d2be0
AS
6177 ;
6178 return 0;
6179}
6180_ACEOF
6181rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 6182if { (eval echo "$as_me:6182: \"$ac_link\"") >&5
503d2be0
AS
6183 (eval $ac_link) 2>&5
6184 ac_status=$?
409d9577 6185 echo "$as_me:6185: \$? = $ac_status" >&5
503d2be0
AS
6186 (exit $ac_status); } &&
6187 { ac_try='test -s conftest$ac_exeext'
409d9577 6188 { (eval echo "$as_me:6188: \"$ac_try\"") >&5
503d2be0
AS
6189 (eval $ac_try) 2>&5
6190 ac_status=$?
409d9577 6191 echo "$as_me:6191: \$? = $ac_status" >&5
503d2be0 6192 (exit $ac_status); }; }; then
73b77ee5
GM
6193 xlinux_first_failure=no
6194else
503d2be0
AS
6195 echo "$as_me: failed program was:" >&5
6196cat conftest.$ac_ext >&5
6197xlinux_first_failure=yes
73b77ee5 6198fi
503d2be0 6199rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
73b77ee5
GM
6200 if test "${xlinux_first_failure}" = "yes"; then
6201 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
6202 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
6203 OLD_CPPFLAGS="$CPPFLAGS"
6204 OLD_LIBS="$LIBS"
6205 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
6206 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
6207 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
6208 LIBS="$LIBS -b i486-linuxaout"
503d2be0 6209 cat >conftest.$ac_ext <<_ACEOF
409d9577 6210#line 6210 "configure"
73b77ee5
GM
6211#include "confdefs.h"
6212
503d2be0
AS
6213int
6214main ()
6215{
73b77ee5 6216XOpenDisplay ("foo");
503d2be0
AS
6217 ;
6218 return 0;
6219}
6220_ACEOF
6221rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 6222if { (eval echo "$as_me:6222: \"$ac_link\"") >&5
503d2be0
AS
6223 (eval $ac_link) 2>&5
6224 ac_status=$?
409d9577 6225 echo "$as_me:6225: \$? = $ac_status" >&5
503d2be0
AS
6226 (exit $ac_status); } &&
6227 { ac_try='test -s conftest$ac_exeext'
409d9577 6228 { (eval echo "$as_me:6228: \"$ac_try\"") >&5
503d2be0
AS
6229 (eval $ac_try) 2>&5
6230 ac_status=$?
409d9577 6231 echo "$as_me:6231: \$? = $ac_status" >&5
503d2be0 6232 (exit $ac_status); }; }; then
73b77ee5
GM
6233 xlinux_second_failure=no
6234else
503d2be0
AS
6235 echo "$as_me: failed program was:" >&5
6236cat conftest.$ac_ext >&5
6237xlinux_second_failure=yes
73b77ee5 6238fi
503d2be0 6239rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
73b77ee5
GM
6240 if test "${xlinux_second_failure}" = "yes"; then
6241 # If we get the same failure with -b, there is no use adding -b.
6242 # So take it out. This plays safe.
6243 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
6244 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
6245 CPPFLAGS="$OLD_CPPFLAGS"
6246 LIBS="$OLD_LIBS"
409d9577 6247 echo "$as_me:6247: result: no" >&5
503d2be0 6248echo "${ECHO_T}no" >&6
73b77ee5 6249 else
409d9577 6250 echo "$as_me:6250: result: yes" >&5
503d2be0 6251echo "${ECHO_T}yes" >&6
73b77ee5
GM
6252 fi
6253 else
409d9577 6254 echo "$as_me:6254: result: no" >&5
503d2be0 6255echo "${ECHO_T}no" >&6
73b77ee5
GM
6256 fi
6257 fi
6258
ac95a621
GM
6259 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
6260 # header files included from there.
409d9577 6261 echo "$as_me:6261: checking for Xkb" >&5
503d2be0
AS
6262echo $ECHO_N "checking for Xkb... $ECHO_C" >&6
6263 cat >conftest.$ac_ext <<_ACEOF
409d9577 6264#line 6264 "configure"
ac95a621
GM
6265#include "confdefs.h"
6266#include <X11/Xlib.h>
6267#include <X11/XKBlib.h>
503d2be0
AS
6268int
6269main ()
6270{
ac95a621 6271XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
503d2be0
AS
6272 ;
6273 return 0;
6274}
6275_ACEOF
6276rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 6277if { (eval echo "$as_me:6277: \"$ac_link\"") >&5
503d2be0
AS
6278 (eval $ac_link) 2>&5
6279 ac_status=$?
409d9577 6280 echo "$as_me:6280: \$? = $ac_status" >&5
503d2be0
AS
6281 (exit $ac_status); } &&
6282 { ac_try='test -s conftest$ac_exeext'
409d9577 6283 { (eval echo "$as_me:6283: \"$ac_try\"") >&5
503d2be0
AS
6284 (eval $ac_try) 2>&5
6285 ac_status=$?
409d9577 6286 echo "$as_me:6286: \$? = $ac_status" >&5
503d2be0 6287 (exit $ac_status); }; }; then
ac95a621
GM
6288 emacs_xkb=yes
6289else
503d2be0
AS
6290 echo "$as_me: failed program was:" >&5
6291cat conftest.$ac_ext >&5
6292emacs_xkb=no
ac95a621 6293fi
503d2be0 6294rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
409d9577 6295 echo "$as_me:6295: result: $emacs_xkb" >&5
503d2be0 6296echo "${ECHO_T}$emacs_xkb" >&6
ac95a621 6297 if test $emacs_xkb = yes; then
503d2be0 6298 cat >>confdefs.h <<\EOF
ac95a621
GM
6299#define HAVE_XKBGETKEYBOARD 1
6300EOF
6301
6302 fi
6303
503d2be0 6304for ac_func in XrmSetDatabase XScreenResourceString \
73b77ee5
GM
6305XScreenNumberOfScreen XSetWMProtocols
6306do
503d2be0 6307as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
409d9577 6308echo "$as_me:6308: checking for $ac_func" >&5
503d2be0
AS
6309echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6310if eval "test \"\${$as_ac_var+set}\" = set"; then
6311 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 6312else
503d2be0 6313 cat >conftest.$ac_ext <<_ACEOF
409d9577 6314#line 6314 "configure"
73b77ee5
GM
6315#include "confdefs.h"
6316/* System header to define __stub macros and hopefully few prototypes,
503d2be0 6317 which can conflict with char $ac_func (); below. */
73b77ee5
GM
6318#include <assert.h>
6319/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6320#ifdef __cplusplus
6321extern "C"
6322#endif
73b77ee5 6323/* We use char because int might match the return type of a gcc2
503d2be0
AS
6324 builtin and then its argument prototype would still apply. */
6325char $ac_func ();
6326char (*f) ();
73b77ee5 6327
503d2be0
AS
6328int
6329main ()
6330{
73b77ee5
GM
6331/* The GNU C library defines this for functions which it implements
6332 to always fail with ENOSYS. Some functions are actually named
6333 something starting with __ and the normal name is an alias. */
6334#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6335choke me
6336#else
503d2be0 6337f = $ac_func;
73b77ee5
GM
6338#endif
6339
503d2be0
AS
6340 ;
6341 return 0;
6342}
6343_ACEOF
6344rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 6345if { (eval echo "$as_me:6345: \"$ac_link\"") >&5
503d2be0
AS
6346 (eval $ac_link) 2>&5
6347 ac_status=$?
409d9577 6348 echo "$as_me:6348: \$? = $ac_status" >&5
503d2be0
AS
6349 (exit $ac_status); } &&
6350 { ac_try='test -s conftest$ac_exeext'
409d9577 6351 { (eval echo "$as_me:6351: \"$ac_try\"") >&5
503d2be0
AS
6352 (eval $ac_try) 2>&5
6353 ac_status=$?
409d9577 6354 echo "$as_me:6354: \$? = $ac_status" >&5
503d2be0
AS
6355 (exit $ac_status); }; }; then
6356 eval "$as_ac_var=yes"
6357else
6358 echo "$as_me: failed program was:" >&5
6359cat conftest.$ac_ext >&5
6360eval "$as_ac_var=no"
6361fi
6362rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6363fi
409d9577 6364echo "$as_me:6364: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
6365echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6366if test `eval echo '${'$as_ac_var'}'` = yes; then
6367 cat >>confdefs.h <<EOF
6368#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
73b77ee5 6369EOF
73b77ee5 6370
73b77ee5
GM
6371fi
6372done
6373
6374fi
6375
6376if test "${window_system}" = "x11"; then
409d9577 6377 echo "$as_me:6377: checking X11 version 6" >&5
503d2be0
AS
6378echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6
6379 if test "${emacs_cv_x11_version_6+set}" = set; then
6380 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 6381else
503d2be0 6382 cat >conftest.$ac_ext <<_ACEOF
409d9577 6383#line 6383 "configure"
73b77ee5
GM
6384#include "confdefs.h"
6385#include <X11/Xlib.h>
503d2be0
AS
6386int
6387main ()
6388{
73b77ee5
GM
6389#if XlibSpecificationRelease < 6
6390fail;
6391#endif
6392
503d2be0
AS
6393 ;
6394 return 0;
6395}
6396_ACEOF
6397rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 6398if { (eval echo "$as_me:6398: \"$ac_link\"") >&5
503d2be0
AS
6399 (eval $ac_link) 2>&5
6400 ac_status=$?
409d9577 6401 echo "$as_me:6401: \$? = $ac_status" >&5
503d2be0
AS
6402 (exit $ac_status); } &&
6403 { ac_try='test -s conftest$ac_exeext'
409d9577 6404 { (eval echo "$as_me:6404: \"$ac_try\"") >&5
503d2be0
AS
6405 (eval $ac_try) 2>&5
6406 ac_status=$?
409d9577 6407 echo "$as_me:6407: \$? = $ac_status" >&5
503d2be0 6408 (exit $ac_status); }; }; then
73b77ee5
GM
6409 emacs_cv_x11_version_6=yes
6410else
503d2be0
AS
6411 echo "$as_me: failed program was:" >&5
6412cat conftest.$ac_ext >&5
6413emacs_cv_x11_version_6=no
73b77ee5 6414fi
503d2be0 6415rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
73b77ee5
GM
6416fi
6417
6418 if test $emacs_cv_x11_version_6 = yes; then
409d9577 6419 echo "$as_me:6419: result: 6 or newer" >&5
503d2be0
AS
6420echo "${ECHO_T}6 or newer" >&6
6421 cat >>confdefs.h <<\EOF
73b77ee5
GM
6422#define HAVE_X11R6 1
6423EOF
6424
6425 else
409d9577 6426 echo "$as_me:6426: result: before 6" >&5
503d2be0 6427echo "${ECHO_T}before 6" >&6
ba4481b5
DL
6428 fi
6429fi
6430
6431if test "${window_system}" = "x11"; then
409d9577 6432 echo "$as_me:6432: checking X11 version 5" >&5
503d2be0
AS
6433echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6
6434 if test "${emacs_cv_x11_version_5+set}" = set; then
6435 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6436else
503d2be0 6437 cat >conftest.$ac_ext <<_ACEOF
409d9577 6438#line 6438 "configure"
ba4481b5
DL
6439#include "confdefs.h"
6440#include <X11/Xlib.h>
503d2be0
AS
6441int
6442main ()
6443{
ba4481b5
DL
6444#if XlibSpecificationRelease < 5
6445fail;
6446#endif
6447
503d2be0
AS
6448 ;
6449 return 0;
6450}
6451_ACEOF
6452rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 6453if { (eval echo "$as_me:6453: \"$ac_link\"") >&5
503d2be0
AS
6454 (eval $ac_link) 2>&5
6455 ac_status=$?
409d9577 6456 echo "$as_me:6456: \$? = $ac_status" >&5
503d2be0
AS
6457 (exit $ac_status); } &&
6458 { ac_try='test -s conftest$ac_exeext'
409d9577 6459 { (eval echo "$as_me:6459: \"$ac_try\"") >&5
503d2be0
AS
6460 (eval $ac_try) 2>&5
6461 ac_status=$?
409d9577 6462 echo "$as_me:6462: \$? = $ac_status" >&5
503d2be0 6463 (exit $ac_status); }; }; then
ba4481b5
DL
6464 emacs_cv_x11_version_5=yes
6465else
503d2be0
AS
6466 echo "$as_me: failed program was:" >&5
6467cat conftest.$ac_ext >&5
6468emacs_cv_x11_version_5=no
ba4481b5 6469fi
503d2be0 6470rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5
DL
6471fi
6472
6473 if test $emacs_cv_x11_version_5 = yes; then
409d9577 6474 echo "$as_me:6474: result: 5 or newer" >&5
503d2be0 6475echo "${ECHO_T}5 or newer" >&6
ba4481b5 6476 HAVE_X11R5=yes
503d2be0 6477 cat >>confdefs.h <<\EOF
ba4481b5
DL
6478#define HAVE_X11R5 1
6479EOF
6480
6481 else
6482 HAVE_X11R5=no
409d9577 6483 echo "$as_me:6483: result: before 5" >&5
503d2be0 6484echo "${ECHO_T}before 5" >&6
ba4481b5
DL
6485 fi
6486fi
6487
6488if test x"${USE_X_TOOLKIT}" = xmaybe; then
6489 if test x"${HAVE_X11R5}" = xyes; then
409d9577 6490 echo "$as_me:6490: checking X11 version 5 with Xaw" >&5
503d2be0
AS
6491echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6
6492 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
6493 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6494else
503d2be0 6495 cat >conftest.$ac_ext <<_ACEOF
409d9577 6496#line 6496 "configure"
ba4481b5
DL
6497#include "confdefs.h"
6498
6499#include <X11/Intrinsic.h>
6500#include <X11/Xaw/Simple.h>
503d2be0
AS
6501int
6502main ()
6503{
ba4481b5 6504
503d2be0
AS
6505 ;
6506 return 0;
6507}
6508_ACEOF
6509rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 6510if { (eval echo "$as_me:6510: \"$ac_link\"") >&5
503d2be0
AS
6511 (eval $ac_link) 2>&5
6512 ac_status=$?
409d9577 6513 echo "$as_me:6513: \$? = $ac_status" >&5
503d2be0
AS
6514 (exit $ac_status); } &&
6515 { ac_try='test -s conftest$ac_exeext'
409d9577 6516 { (eval echo "$as_me:6516: \"$ac_try\"") >&5
503d2be0
AS
6517 (eval $ac_try) 2>&5
6518 ac_status=$?
409d9577 6519 echo "$as_me:6519: \$? = $ac_status" >&5
503d2be0 6520 (exit $ac_status); }; }; then
ba4481b5
DL
6521 emacs_cv_x11_version_5_with_xaw=yes
6522else
503d2be0
AS
6523 echo "$as_me: failed program was:" >&5
6524cat conftest.$ac_ext >&5
6525emacs_cv_x11_version_5_with_xaw=no
ba4481b5 6526fi
503d2be0 6527rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5
DL
6528fi
6529
6530 if test $emacs_cv_x11_version_5_with_xaw = yes; then
409d9577 6531 echo "$as_me:6531: result: 5 or newer, with Xaw; use toolkit by default" >&5
503d2be0 6532echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6
ba4481b5
DL
6533 USE_X_TOOLKIT=LUCID
6534 else
409d9577 6535 echo "$as_me:6535: result: before 5 or no Xaw; do not use toolkit by default" >&5
503d2be0 6536echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6
ba4481b5
DL
6537 USE_X_TOOLKIT=none
6538 fi
6539 else
6540 USE_X_TOOLKIT=none
6541 fi
6542fi
6543
6544X_TOOLKIT_TYPE=$USE_X_TOOLKIT
6545
6546if test "${USE_X_TOOLKIT}" != "none"; then
409d9577 6547 echo "$as_me:6547: checking X11 toolkit version" >&5
503d2be0
AS
6548echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6
6549 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
6550 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6551else
503d2be0 6552 cat >conftest.$ac_ext <<_ACEOF
409d9577 6553#line 6553 "configure"
ba4481b5
DL
6554#include "confdefs.h"
6555#include <X11/Intrinsic.h>
503d2be0
AS
6556int
6557main ()
6558{
ba4481b5
DL
6559#if XtSpecificationRelease < 6
6560fail;
6561#endif
6562
503d2be0
AS
6563 ;
6564 return 0;
6565}
6566_ACEOF
6567rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 6568if { (eval echo "$as_me:6568: \"$ac_link\"") >&5
503d2be0
AS
6569 (eval $ac_link) 2>&5
6570 ac_status=$?
409d9577 6571 echo "$as_me:6571: \$? = $ac_status" >&5
503d2be0
AS
6572 (exit $ac_status); } &&
6573 { ac_try='test -s conftest$ac_exeext'
409d9577 6574 { (eval echo "$as_me:6574: \"$ac_try\"") >&5
503d2be0
AS
6575 (eval $ac_try) 2>&5
6576 ac_status=$?
409d9577 6577 echo "$as_me:6577: \$? = $ac_status" >&5
503d2be0 6578 (exit $ac_status); }; }; then
ba4481b5
DL
6579 emacs_cv_x11_toolkit_version_6=yes
6580else
503d2be0
AS
6581 echo "$as_me: failed program was:" >&5
6582cat conftest.$ac_ext >&5
6583emacs_cv_x11_toolkit_version_6=no
ba4481b5 6584fi
503d2be0 6585rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5
DL
6586fi
6587
6588 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
6589 if test $emacs_cv_x11_toolkit_version_6 = yes; then
409d9577 6590 echo "$as_me:6590: result: 6 or newer" >&5
503d2be0
AS
6591echo "${ECHO_T}6 or newer" >&6
6592 cat >>confdefs.h <<\EOF
ba4481b5
DL
6593#define HAVE_X11XTR6 1
6594EOF
6595
6596 else
409d9577 6597 echo "$as_me:6597: result: before 6" >&5
503d2be0 6598echo "${ECHO_T}before 6" >&6
ba4481b5
DL
6599 fi
6600
6601 OLDLIBS="$LIBS"
6602 if test x$HAVE_X11XTR6 = xyes; then
6603 LIBS="-lXt -lSM -lICE $LIBS"
6604 else
6605 LIBS="-lXt $LIBS"
6606 fi
503d2be0 6607
409d9577 6608echo "$as_me:6608: checking for XmuConvertStandardSelection in -lXmu" >&5
503d2be0
AS
6609echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6
6610if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
6611 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6612else
503d2be0 6613 ac_check_lib_save_LIBS=$LIBS
ba4481b5 6614LIBS="-lXmu $LIBS"
503d2be0 6615cat >conftest.$ac_ext <<_ACEOF
409d9577 6616#line 6616 "configure"
ba4481b5 6617#include "confdefs.h"
503d2be0 6618
ba4481b5 6619/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6620#ifdef __cplusplus
6621extern "C"
6622#endif
ba4481b5 6623/* We use char because int might match the return type of a gcc2
503d2be0
AS
6624 builtin and then its argument prototype would still apply. */
6625char XmuConvertStandardSelection ();
6626int
6627main ()
6628{
6629XmuConvertStandardSelection ();
6630 ;
6631 return 0;
6632}
6633_ACEOF
6634rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 6635if { (eval echo "$as_me:6635: \"$ac_link\"") >&5
503d2be0
AS
6636 (eval $ac_link) 2>&5
6637 ac_status=$?
409d9577 6638 echo "$as_me:6638: \$? = $ac_status" >&5
503d2be0
AS
6639 (exit $ac_status); } &&
6640 { ac_try='test -s conftest$ac_exeext'
409d9577 6641 { (eval echo "$as_me:6641: \"$ac_try\"") >&5
503d2be0
AS
6642 (eval $ac_try) 2>&5
6643 ac_status=$?
409d9577 6644 echo "$as_me:6644: \$? = $ac_status" >&5
503d2be0
AS
6645 (exit $ac_status); }; }; then
6646 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
6647else
6648 echo "$as_me: failed program was:" >&5
6649cat conftest.$ac_ext >&5
6650ac_cv_lib_Xmu_XmuConvertStandardSelection=no
6651fi
6652rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6653LIBS=$ac_check_lib_save_LIBS
6654fi
409d9577 6655echo "$as_me:6655: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
503d2be0
AS
6656echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6
6657if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
6658 cat >>confdefs.h <<EOF
6659#define HAVE_LIBXMU 1
ba4481b5
DL
6660EOF
6661
6662 LIBS="-lXmu $LIBS"
6663
ba4481b5
DL
6664fi
6665
457b792c
GM
6666 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
6667fi
6668
6669# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
6670if test "${HAVE_X11}" = "yes"; then
6671 if test "${USE_X_TOOLKIT}" != "none"; then
503d2be0 6672
409d9577 6673echo "$as_me:6673: checking for XShapeQueryExtension in -lXext" >&5
503d2be0
AS
6674echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6
6675if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
6676 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 6677else
503d2be0 6678 ac_check_lib_save_LIBS=$LIBS
457b792c 6679LIBS="-lXext $LIBS"
503d2be0 6680cat >conftest.$ac_ext <<_ACEOF
409d9577 6681#line 6681 "configure"
457b792c 6682#include "confdefs.h"
503d2be0 6683
457b792c 6684/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6685#ifdef __cplusplus
6686extern "C"
6687#endif
457b792c 6688/* We use char because int might match the return type of a gcc2
503d2be0
AS
6689 builtin and then its argument prototype would still apply. */
6690char XShapeQueryExtension ();
6691int
6692main ()
6693{
6694XShapeQueryExtension ();
6695 ;
6696 return 0;
6697}
6698_ACEOF
6699rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 6700if { (eval echo "$as_me:6700: \"$ac_link\"") >&5
503d2be0
AS
6701 (eval $ac_link) 2>&5
6702 ac_status=$?
409d9577 6703 echo "$as_me:6703: \$? = $ac_status" >&5
503d2be0
AS
6704 (exit $ac_status); } &&
6705 { ac_try='test -s conftest$ac_exeext'
409d9577 6706 { (eval echo "$as_me:6706: \"$ac_try\"") >&5
503d2be0
AS
6707 (eval $ac_try) 2>&5
6708 ac_status=$?
409d9577 6709 echo "$as_me:6709: \$? = $ac_status" >&5
503d2be0
AS
6710 (exit $ac_status); }; }; then
6711 ac_cv_lib_Xext_XShapeQueryExtension=yes
6712else
6713 echo "$as_me: failed program was:" >&5
6714cat conftest.$ac_ext >&5
6715ac_cv_lib_Xext_XShapeQueryExtension=no
6716fi
6717rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6718LIBS=$ac_check_lib_save_LIBS
6719fi
409d9577 6720echo "$as_me:6720: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
503d2be0
AS
6721echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6
6722if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
6723 cat >>confdefs.h <<EOF
6724#define HAVE_LIBXEXT 1
457b792c
GM
6725EOF
6726
6727 LIBS="-lXext $LIBS"
6728
457b792c
GM
6729fi
6730
6731 fi
ba4481b5
DL
6732fi
6733
6734if test "${USE_X_TOOLKIT}" = "MOTIF"; then
409d9577 6735 echo "$as_me:6735: checking for Motif version 2.1" >&5
503d2be0
AS
6736echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6
6737if test "${emacs_cv_motif_version_2_1+set}" = set; then
6738 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6739else
503d2be0 6740 cat >conftest.$ac_ext <<_ACEOF
409d9577 6741#line 6741 "configure"
ba4481b5
DL
6742#include "confdefs.h"
6743#include <Xm/Xm.h>
503d2be0
AS
6744int
6745main ()
6746{
ba4481b5
DL
6747#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
6748int x = 5;
6749#else
6750Motif version prior to 2.1.
6751#endif
503d2be0
AS
6752 ;
6753 return 0;
6754}
6755_ACEOF
6756rm -f conftest.$ac_objext
409d9577 6757if { (eval echo "$as_me:6757: \"$ac_compile\"") >&5
503d2be0
AS
6758 (eval $ac_compile) 2>&5
6759 ac_status=$?
409d9577 6760 echo "$as_me:6760: \$? = $ac_status" >&5
503d2be0
AS
6761 (exit $ac_status); } &&
6762 { ac_try='test -s conftest.$ac_objext'
409d9577 6763 { (eval echo "$as_me:6763: \"$ac_try\"") >&5
503d2be0
AS
6764 (eval $ac_try) 2>&5
6765 ac_status=$?
409d9577 6766 echo "$as_me:6766: \$? = $ac_status" >&5
503d2be0 6767 (exit $ac_status); }; }; then
ba4481b5
DL
6768 emacs_cv_motif_version_2_1=yes
6769else
503d2be0
AS
6770 echo "$as_me: failed program was:" >&5
6771cat conftest.$ac_ext >&5
6772emacs_cv_motif_version_2_1=no
ba4481b5 6773fi
503d2be0 6774rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 6775fi
409d9577 6776echo "$as_me:6776: result: $emacs_cv_motif_version_2_1" >&5
503d2be0 6777echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6
ba4481b5
DL
6778 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
6779 if test $emacs_cv_motif_version_2_1 = yes; then
169fe44e 6780 HAVE_LIBXP=no
503d2be0 6781 cat >>confdefs.h <<\EOF
ba4481b5
DL
6782#define HAVE_MOTIF_2_1 1
6783EOF
6784
409d9577 6785 echo "$as_me:6785: checking for XpCreateContext in -lXp" >&5
503d2be0
AS
6786echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6
6787if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
6788 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6789else
503d2be0 6790 ac_check_lib_save_LIBS=$LIBS
457b792c 6791LIBS="-lXp $LIBS"
503d2be0 6792cat >conftest.$ac_ext <<_ACEOF
409d9577 6793#line 6793 "configure"
ba4481b5 6794#include "confdefs.h"
503d2be0 6795
ba4481b5 6796/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6797#ifdef __cplusplus
6798extern "C"
6799#endif
ba4481b5 6800/* We use char because int might match the return type of a gcc2
503d2be0
AS
6801 builtin and then its argument prototype would still apply. */
6802char XpCreateContext ();
6803int
6804main ()
6805{
6806XpCreateContext ();
6807 ;
6808 return 0;
6809}
6810_ACEOF
6811rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 6812if { (eval echo "$as_me:6812: \"$ac_link\"") >&5
503d2be0
AS
6813 (eval $ac_link) 2>&5
6814 ac_status=$?
409d9577 6815 echo "$as_me:6815: \$? = $ac_status" >&5
503d2be0
AS
6816 (exit $ac_status); } &&
6817 { ac_try='test -s conftest$ac_exeext'
409d9577 6818 { (eval echo "$as_me:6818: \"$ac_try\"") >&5
503d2be0
AS
6819 (eval $ac_try) 2>&5
6820 ac_status=$?
409d9577 6821 echo "$as_me:6821: \$? = $ac_status" >&5
503d2be0
AS
6822 (exit $ac_status); }; }; then
6823 ac_cv_lib_Xp_XpCreateContext=yes
6824else
6825 echo "$as_me: failed program was:" >&5
6826cat conftest.$ac_ext >&5
6827ac_cv_lib_Xp_XpCreateContext=no
6828fi
6829rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6830LIBS=$ac_check_lib_save_LIBS
6831fi
409d9577 6832echo "$as_me:6832: result: $ac_cv_lib_Xp_XpCreateContext" >&5
503d2be0
AS
6833echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6
6834if test $ac_cv_lib_Xp_XpCreateContext = yes; then
48d4b120 6835 HAVE_LIBXP=yes
ba4481b5
DL
6836fi
6837
48d4b120 6838 if test ${HAVE_LIBXP} = yes; then
503d2be0 6839 cat >>confdefs.h <<\EOF
48d4b120
DL
6840#define HAVE_LIBXP 1
6841EOF
6842
503d2be0 6843 fi
ba4481b5
DL
6844 fi
6845fi
6846
6847### Is -lXaw3d available?
6848HAVE_XAW3D=no
6849if test "${HAVE_X11}" = "yes"; then
6850 if test "${USE_X_TOOLKIT}" != "none"; then
409d9577 6851 echo "$as_me:6851: checking for X11/Xaw3d/Scrollbar.h" >&5
503d2be0
AS
6852echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6
6853if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
6854 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6855else
503d2be0 6856 cat >conftest.$ac_ext <<_ACEOF
409d9577 6857#line 6857 "configure"
ba4481b5
DL
6858#include "confdefs.h"
6859#include <X11/Xaw3d/Scrollbar.h>
503d2be0 6860_ACEOF
409d9577 6861if { (eval echo "$as_me:6861: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
6862 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6863 ac_status=$?
6864 egrep -v '^ *\+' conftest.er1 >conftest.err
6865 rm -f conftest.er1
6866 cat conftest.err >&5
409d9577 6867 echo "$as_me:6867: \$? = $ac_status" >&5
503d2be0
AS
6868 (exit $ac_status); } >/dev/null; then
6869 if test -s conftest.err; then
6870 ac_cpp_err=$ac_c_preproc_warn_flag
6871 else
6872 ac_cpp_err=
6873 fi
6874else
6875 ac_cpp_err=yes
6876fi
6877if test -z "$ac_cpp_err"; then
6878 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 6879else
503d2be0 6880 echo "$as_me: failed program was:" >&5
ba4481b5 6881 cat conftest.$ac_ext >&5
503d2be0 6882 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 6883fi
503d2be0 6884rm -f conftest.err conftest.$ac_ext
ba4481b5 6885fi
409d9577 6886echo "$as_me:6886: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
503d2be0
AS
6887echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6
6888if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
409d9577 6889 echo "$as_me:6889: checking for XawScrollbarSetThumb in -lXaw3d" >&5
503d2be0
AS
6890echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6
6891if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
6892 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6893else
503d2be0 6894 ac_check_lib_save_LIBS=$LIBS
457b792c 6895LIBS="-lXaw3d $LIBS"
503d2be0 6896cat >conftest.$ac_ext <<_ACEOF
409d9577 6897#line 6897 "configure"
ba4481b5 6898#include "confdefs.h"
503d2be0 6899
ba4481b5 6900/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6901#ifdef __cplusplus
6902extern "C"
6903#endif
ba4481b5 6904/* We use char because int might match the return type of a gcc2
503d2be0
AS
6905 builtin and then its argument prototype would still apply. */
6906char XawScrollbarSetThumb ();
6907int
6908main ()
6909{
6910XawScrollbarSetThumb ();
6911 ;
6912 return 0;
6913}
6914_ACEOF
6915rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 6916if { (eval echo "$as_me:6916: \"$ac_link\"") >&5
503d2be0
AS
6917 (eval $ac_link) 2>&5
6918 ac_status=$?
409d9577 6919 echo "$as_me:6919: \$? = $ac_status" >&5
503d2be0
AS
6920 (exit $ac_status); } &&
6921 { ac_try='test -s conftest$ac_exeext'
409d9577 6922 { (eval echo "$as_me:6922: \"$ac_try\"") >&5
503d2be0
AS
6923 (eval $ac_try) 2>&5
6924 ac_status=$?
409d9577 6925 echo "$as_me:6925: \$? = $ac_status" >&5
503d2be0
AS
6926 (exit $ac_status); }; }; then
6927 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
6928else
6929 echo "$as_me: failed program was:" >&5
6930cat conftest.$ac_ext >&5
6931ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
6932fi
6933rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6934LIBS=$ac_check_lib_save_LIBS
6935fi
409d9577 6936echo "$as_me:6936: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
503d2be0
AS
6937echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6
6938if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
ba4481b5 6939 HAVE_XAW3D=yes
ba4481b5
DL
6940fi
6941
ba4481b5
DL
6942fi
6943
ba4481b5 6944 if test "${HAVE_XAW3D}" = "yes"; then
503d2be0 6945 cat >>confdefs.h <<\EOF
ba4481b5
DL
6946#define HAVE_XAW3D 1
6947EOF
6948
6949 fi
6950 fi
6951fi
ba4481b5
DL
6952
6953USE_TOOLKIT_SCROLL_BARS=no
6954if test "${with_toolkit_scroll_bars}" != "no"; then
6955 if test "${USE_X_TOOLKIT}" != "none"; then
6956 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
503d2be0 6957 cat >>confdefs.h <<\EOF
ba4481b5
DL
6958#define USE_TOOLKIT_SCROLL_BARS 1
6959EOF
6960
6961 HAVE_XAW3D=no
6962 USE_TOOLKIT_SCROLL_BARS=yes
6963 elif test "${HAVE_XAW3D}" = "yes"; then
503d2be0 6964 cat >>confdefs.h <<\EOF
ba4481b5
DL
6965#define USE_TOOLKIT_SCROLL_BARS 1
6966EOF
6967
6968 USE_TOOLKIT_SCROLL_BARS=yes
6969 fi
6970 fi
6971fi
6972
1d36487c 6973if test "${with_xim}" != "no"; then
503d2be0 6974 cat >>confdefs.h <<\EOF
1d36487c
GM
6975#define USE_XIM 1
6976EOF
6977
6978fi
6979
ba4481b5
DL
6980### Use -lXpm if available, unless `--with-xpm=no'.
6981HAVE_XPM=no
6982if test "${HAVE_X11}" = "yes"; then
6983 if test "${with_xpm}" != "no"; then
409d9577 6984 echo "$as_me:6984: checking for X11/xpm.h" >&5
503d2be0
AS
6985echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
6986if test "${ac_cv_header_X11_xpm_h+set}" = set; then
6987 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6988else
503d2be0 6989 cat >conftest.$ac_ext <<_ACEOF
409d9577 6990#line 6990 "configure"
ba4481b5
DL
6991#include "confdefs.h"
6992#include <X11/xpm.h>
503d2be0 6993_ACEOF
409d9577 6994if { (eval echo "$as_me:6994: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
6995 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6996 ac_status=$?
6997 egrep -v '^ *\+' conftest.er1 >conftest.err
6998 rm -f conftest.er1
6999 cat conftest.err >&5
409d9577 7000 echo "$as_me:7000: \$? = $ac_status" >&5
503d2be0
AS
7001 (exit $ac_status); } >/dev/null; then
7002 if test -s conftest.err; then
7003 ac_cpp_err=$ac_c_preproc_warn_flag
7004 else
7005 ac_cpp_err=
7006 fi
7007else
7008 ac_cpp_err=yes
7009fi
7010if test -z "$ac_cpp_err"; then
7011 ac_cv_header_X11_xpm_h=yes
ba4481b5 7012else
503d2be0 7013 echo "$as_me: failed program was:" >&5
ba4481b5 7014 cat conftest.$ac_ext >&5
503d2be0 7015 ac_cv_header_X11_xpm_h=no
ba4481b5 7016fi
503d2be0 7017rm -f conftest.err conftest.$ac_ext
ba4481b5 7018fi
409d9577 7019echo "$as_me:7019: result: $ac_cv_header_X11_xpm_h" >&5
503d2be0
AS
7020echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
7021if test $ac_cv_header_X11_xpm_h = yes; then
409d9577 7022 echo "$as_me:7022: checking for XpmReadFileToPixmap in -lXpm" >&5
503d2be0
AS
7023echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6
7024if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
7025 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7026else
503d2be0 7027 ac_check_lib_save_LIBS=$LIBS
ba4481b5 7028LIBS="-lXpm -lX11 $LIBS"
503d2be0 7029cat >conftest.$ac_ext <<_ACEOF
409d9577 7030#line 7030 "configure"
ba4481b5 7031#include "confdefs.h"
503d2be0 7032
ba4481b5 7033/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7034#ifdef __cplusplus
7035extern "C"
7036#endif
ba4481b5 7037/* We use char because int might match the return type of a gcc2
503d2be0
AS
7038 builtin and then its argument prototype would still apply. */
7039char XpmReadFileToPixmap ();
7040int
7041main ()
7042{
7043XpmReadFileToPixmap ();
7044 ;
7045 return 0;
7046}
7047_ACEOF
7048rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 7049if { (eval echo "$as_me:7049: \"$ac_link\"") >&5
503d2be0
AS
7050 (eval $ac_link) 2>&5
7051 ac_status=$?
409d9577 7052 echo "$as_me:7052: \$? = $ac_status" >&5
503d2be0
AS
7053 (exit $ac_status); } &&
7054 { ac_try='test -s conftest$ac_exeext'
409d9577 7055 { (eval echo "$as_me:7055: \"$ac_try\"") >&5
503d2be0
AS
7056 (eval $ac_try) 2>&5
7057 ac_status=$?
409d9577 7058 echo "$as_me:7058: \$? = $ac_status" >&5
503d2be0
AS
7059 (exit $ac_status); }; }; then
7060 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
7061else
7062 echo "$as_me: failed program was:" >&5
7063cat conftest.$ac_ext >&5
7064ac_cv_lib_Xpm_XpmReadFileToPixmap=no
7065fi
7066rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7067LIBS=$ac_check_lib_save_LIBS
7068fi
409d9577 7069echo "$as_me:7069: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
503d2be0
AS
7070echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6
7071if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
ba4481b5 7072 HAVE_XPM=yes
ba4481b5
DL
7073fi
7074
ba4481b5
DL
7075fi
7076
4b92c49a 7077 if test "${HAVE_XPM}" = "yes"; then
409d9577 7078 echo "$as_me:7078: checking for XpmReturnAllocPixels preprocessor define" >&5
503d2be0
AS
7079echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6
7080 cat >conftest.$ac_ext <<_ACEOF
409d9577 7081#line 7081 "configure"
4b92c49a
GM
7082#include "confdefs.h"
7083#include "X11/xpm.h"
7084#ifndef XpmReturnAllocPixels
7085no_return_alloc_pixels
7086#endif
503d2be0
AS
7087
7088_ACEOF
4b92c49a
GM
7089if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7090 egrep "no_return_alloc_pixels" >/dev/null 2>&1; then
4b92c49a
GM
7091 HAVE_XPM=no
7092else
4b92c49a
GM
7093 HAVE_XPM=yes
7094fi
7095rm -f conftest*
7096
5721ae13 7097 if test "${HAVE_XPM}" = "yes"; then
409d9577 7098 echo "$as_me:7098: result: yes" >&5
503d2be0 7099echo "${ECHO_T}yes" >&6
5721ae13 7100 else
409d9577 7101 echo "$as_me:7101: result: no" >&5
503d2be0 7102echo "${ECHO_T}no" >&6
5721ae13 7103 fi
ff8df3be 7104 fi
ba4481b5
DL
7105 fi
7106
7107 if test "${HAVE_XPM}" = "yes"; then
503d2be0 7108 cat >>confdefs.h <<\EOF
ba4481b5
DL
7109#define HAVE_XPM 1
7110EOF
7111
7112 fi
7113fi
503d2be0 7114
ba4481b5
DL
7115### Use -ljpeg if available, unless `--with-jpeg=no'.
7116HAVE_JPEG=no
7117if test "${HAVE_X11}" = "yes"; then
7118 if test "${with_jpeg}" != "no"; then
409d9577 7119 echo "$as_me:7119: checking for jerror.h" >&5
503d2be0
AS
7120echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
7121if test "${ac_cv_header_jerror_h+set}" = set; then
7122 echo $ECHO_N "(cached) $ECHO_C" >&6
ffe36136 7123else
503d2be0 7124 cat >conftest.$ac_ext <<_ACEOF
409d9577 7125#line 7125 "configure"
ffe36136
GM
7126#include "confdefs.h"
7127#include <jerror.h>
503d2be0 7128_ACEOF
409d9577 7129if { (eval echo "$as_me:7129: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
7130 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7131 ac_status=$?
7132 egrep -v '^ *\+' conftest.er1 >conftest.err
7133 rm -f conftest.er1
7134 cat conftest.err >&5
409d9577 7135 echo "$as_me:7135: \$? = $ac_status" >&5
503d2be0
AS
7136 (exit $ac_status); } >/dev/null; then
7137 if test -s conftest.err; then
7138 ac_cpp_err=$ac_c_preproc_warn_flag
7139 else
7140 ac_cpp_err=
7141 fi
7142else
7143 ac_cpp_err=yes
7144fi
7145if test -z "$ac_cpp_err"; then
7146 ac_cv_header_jerror_h=yes
ffe36136 7147else
503d2be0 7148 echo "$as_me: failed program was:" >&5
ffe36136 7149 cat conftest.$ac_ext >&5
503d2be0 7150 ac_cv_header_jerror_h=no
ffe36136 7151fi
503d2be0 7152rm -f conftest.err conftest.$ac_ext
ffe36136 7153fi
409d9577 7154echo "$as_me:7154: result: $ac_cv_header_jerror_h" >&5
503d2be0
AS
7155echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
7156if test $ac_cv_header_jerror_h = yes; then
409d9577 7157 echo "$as_me:7157: checking for jpeg_destroy_compress in -ljpeg" >&5
503d2be0
AS
7158echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6
7159if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
7160 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7161else
503d2be0 7162 ac_check_lib_save_LIBS=$LIBS
457b792c 7163LIBS="-ljpeg $LIBS"
503d2be0 7164cat >conftest.$ac_ext <<_ACEOF
409d9577 7165#line 7165 "configure"
ba4481b5 7166#include "confdefs.h"
503d2be0 7167
ba4481b5 7168/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7169#ifdef __cplusplus
7170extern "C"
7171#endif
ba4481b5 7172/* We use char because int might match the return type of a gcc2
503d2be0
AS
7173 builtin and then its argument prototype would still apply. */
7174char jpeg_destroy_compress ();
7175int
7176main ()
7177{
7178jpeg_destroy_compress ();
7179 ;
7180 return 0;
7181}
7182_ACEOF
7183rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 7184if { (eval echo "$as_me:7184: \"$ac_link\"") >&5
503d2be0
AS
7185 (eval $ac_link) 2>&5
7186 ac_status=$?
409d9577 7187 echo "$as_me:7187: \$? = $ac_status" >&5
503d2be0
AS
7188 (exit $ac_status); } &&
7189 { ac_try='test -s conftest$ac_exeext'
409d9577 7190 { (eval echo "$as_me:7190: \"$ac_try\"") >&5
503d2be0
AS
7191 (eval $ac_try) 2>&5
7192 ac_status=$?
409d9577 7193 echo "$as_me:7193: \$? = $ac_status" >&5
503d2be0
AS
7194 (exit $ac_status); }; }; then
7195 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
7196else
7197 echo "$as_me: failed program was:" >&5
7198cat conftest.$ac_ext >&5
7199ac_cv_lib_jpeg_jpeg_destroy_compress=no
7200fi
7201rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7202LIBS=$ac_check_lib_save_LIBS
7203fi
409d9577 7204echo "$as_me:7204: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
503d2be0
AS
7205echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6
7206if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
ba4481b5 7207 HAVE_JPEG=yes
ffe36136
GM
7208fi
7209
ba4481b5
DL
7210fi
7211
ba4481b5
DL
7212 fi
7213
7214 if test "${HAVE_JPEG}" = "yes"; then
503d2be0 7215 cat >>confdefs.h <<\EOF
ba4481b5
DL
7216#define HAVE_JPEG 1
7217EOF
7218
7219 fi
7220fi
503d2be0 7221
ba4481b5
DL
7222### Use -lpng if available, unless `--with-png=no'.
7223HAVE_PNG=no
7224if test "${HAVE_X11}" = "yes"; then
7225 if test "${with_png}" != "no"; then
409d9577 7226 echo "$as_me:7226: checking for png.h" >&5
503d2be0
AS
7227echo $ECHO_N "checking for png.h... $ECHO_C" >&6
7228if test "${ac_cv_header_png_h+set}" = set; then
7229 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7230else
503d2be0 7231 cat >conftest.$ac_ext <<_ACEOF
409d9577 7232#line 7232 "configure"
ba4481b5
DL
7233#include "confdefs.h"
7234#include <png.h>
503d2be0 7235_ACEOF
409d9577 7236if { (eval echo "$as_me:7236: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
7237 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7238 ac_status=$?
7239 egrep -v '^ *\+' conftest.er1 >conftest.err
7240 rm -f conftest.er1
7241 cat conftest.err >&5
409d9577 7242 echo "$as_me:7242: \$? = $ac_status" >&5
503d2be0
AS
7243 (exit $ac_status); } >/dev/null; then
7244 if test -s conftest.err; then
7245 ac_cpp_err=$ac_c_preproc_warn_flag
7246 else
7247 ac_cpp_err=
7248 fi
7249else
7250 ac_cpp_err=yes
7251fi
7252if test -z "$ac_cpp_err"; then
7253 ac_cv_header_png_h=yes
ba4481b5 7254else
503d2be0 7255 echo "$as_me: failed program was:" >&5
ba4481b5 7256 cat conftest.$ac_ext >&5
503d2be0 7257 ac_cv_header_png_h=no
ba4481b5 7258fi
503d2be0 7259rm -f conftest.err conftest.$ac_ext
ba4481b5 7260fi
409d9577 7261echo "$as_me:7261: result: $ac_cv_header_png_h" >&5
503d2be0
AS
7262echo "${ECHO_T}$ac_cv_header_png_h" >&6
7263if test $ac_cv_header_png_h = yes; then
409d9577 7264 echo "$as_me:7264: checking for png_get_channels in -lpng" >&5
503d2be0
AS
7265echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6
7266if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
7267 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7268else
503d2be0 7269 ac_check_lib_save_LIBS=$LIBS
457b792c 7270LIBS="-lpng -lz -lm $LIBS"
503d2be0 7271cat >conftest.$ac_ext <<_ACEOF
409d9577 7272#line 7272 "configure"
ba4481b5 7273#include "confdefs.h"
503d2be0 7274
ba4481b5 7275/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7276#ifdef __cplusplus
7277extern "C"
7278#endif
ba4481b5 7279/* We use char because int might match the return type of a gcc2
503d2be0
AS
7280 builtin and then its argument prototype would still apply. */
7281char png_get_channels ();
7282int
7283main ()
7284{
7285png_get_channels ();
7286 ;
7287 return 0;
7288}
7289_ACEOF
7290rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 7291if { (eval echo "$as_me:7291: \"$ac_link\"") >&5
503d2be0
AS
7292 (eval $ac_link) 2>&5
7293 ac_status=$?
409d9577 7294 echo "$as_me:7294: \$? = $ac_status" >&5
503d2be0
AS
7295 (exit $ac_status); } &&
7296 { ac_try='test -s conftest$ac_exeext'
409d9577 7297 { (eval echo "$as_me:7297: \"$ac_try\"") >&5
503d2be0
AS
7298 (eval $ac_try) 2>&5
7299 ac_status=$?
409d9577 7300 echo "$as_me:7300: \$? = $ac_status" >&5
503d2be0
AS
7301 (exit $ac_status); }; }; then
7302 ac_cv_lib_png_png_get_channels=yes
7303else
7304 echo "$as_me: failed program was:" >&5
7305cat conftest.$ac_ext >&5
7306ac_cv_lib_png_png_get_channels=no
7307fi
7308rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7309LIBS=$ac_check_lib_save_LIBS
7310fi
409d9577 7311echo "$as_me:7311: result: $ac_cv_lib_png_png_get_channels" >&5
503d2be0
AS
7312echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6
7313if test $ac_cv_lib_png_png_get_channels = yes; then
ba4481b5 7314 HAVE_PNG=yes
ba4481b5
DL
7315fi
7316
ba4481b5
DL
7317fi
7318
ba4481b5
DL
7319 fi
7320
7321 if test "${HAVE_PNG}" = "yes"; then
503d2be0 7322 cat >>confdefs.h <<\EOF
ba4481b5
DL
7323#define HAVE_PNG 1
7324EOF
7325
7326 fi
7327fi
503d2be0 7328
ba4481b5
DL
7329### Use -ltiff if available, unless `--with-tiff=no'.
7330HAVE_TIFF=no
7331if test "${HAVE_X11}" = "yes"; then
7332 if test "${with_tiff}" != "no"; then
409d9577 7333 echo "$as_me:7333: checking for tiffio.h" >&5
503d2be0
AS
7334echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
7335if test "${ac_cv_header_tiffio_h+set}" = set; then
7336 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7337else
503d2be0 7338 cat >conftest.$ac_ext <<_ACEOF
409d9577 7339#line 7339 "configure"
ba4481b5
DL
7340#include "confdefs.h"
7341#include <tiffio.h>
503d2be0 7342_ACEOF
409d9577 7343if { (eval echo "$as_me:7343: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
7344 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7345 ac_status=$?
7346 egrep -v '^ *\+' conftest.er1 >conftest.err
7347 rm -f conftest.er1
7348 cat conftest.err >&5
409d9577 7349 echo "$as_me:7349: \$? = $ac_status" >&5
503d2be0
AS
7350 (exit $ac_status); } >/dev/null; then
7351 if test -s conftest.err; then
7352 ac_cpp_err=$ac_c_preproc_warn_flag
7353 else
7354 ac_cpp_err=
7355 fi
7356else
7357 ac_cpp_err=yes
7358fi
7359if test -z "$ac_cpp_err"; then
7360 ac_cv_header_tiffio_h=yes
ba4481b5 7361else
503d2be0 7362 echo "$as_me: failed program was:" >&5
ba4481b5 7363 cat conftest.$ac_ext >&5
503d2be0 7364 ac_cv_header_tiffio_h=no
ba4481b5 7365fi
503d2be0 7366rm -f conftest.err conftest.$ac_ext
ba4481b5 7367fi
409d9577 7368echo "$as_me:7368: result: $ac_cv_header_tiffio_h" >&5
503d2be0
AS
7369echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
7370if test $ac_cv_header_tiffio_h = yes; then
457b792c 7371 tifflibs="-lz -lm"
3b3cc4a4
KR
7372 # At least one tiff package requires the jpeg library.
7373 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
409d9577 7374 echo "$as_me:7374: checking for TIFFGetVersion in -ltiff" >&5
503d2be0
AS
7375echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6
7376if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
7377 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7378else
503d2be0 7379 ac_check_lib_save_LIBS=$LIBS
3b3cc4a4 7380LIBS="-ltiff $tifflibs $LIBS"
503d2be0 7381cat >conftest.$ac_ext <<_ACEOF
409d9577 7382#line 7382 "configure"
ba4481b5 7383#include "confdefs.h"
503d2be0 7384
ba4481b5 7385/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7386#ifdef __cplusplus
7387extern "C"
7388#endif
ba4481b5 7389/* We use char because int might match the return type of a gcc2
503d2be0
AS
7390 builtin and then its argument prototype would still apply. */
7391char TIFFGetVersion ();
7392int
7393main ()
7394{
7395TIFFGetVersion ();
7396 ;
7397 return 0;
7398}
7399_ACEOF
7400rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 7401if { (eval echo "$as_me:7401: \"$ac_link\"") >&5
503d2be0
AS
7402 (eval $ac_link) 2>&5
7403 ac_status=$?
409d9577 7404 echo "$as_me:7404: \$? = $ac_status" >&5
503d2be0
AS
7405 (exit $ac_status); } &&
7406 { ac_try='test -s conftest$ac_exeext'
409d9577 7407 { (eval echo "$as_me:7407: \"$ac_try\"") >&5
503d2be0
AS
7408 (eval $ac_try) 2>&5
7409 ac_status=$?
409d9577 7410 echo "$as_me:7410: \$? = $ac_status" >&5
503d2be0
AS
7411 (exit $ac_status); }; }; then
7412 ac_cv_lib_tiff_TIFFGetVersion=yes
7413else
7414 echo "$as_me: failed program was:" >&5
7415cat conftest.$ac_ext >&5
7416ac_cv_lib_tiff_TIFFGetVersion=no
7417fi
7418rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7419LIBS=$ac_check_lib_save_LIBS
7420fi
409d9577 7421echo "$as_me:7421: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
503d2be0
AS
7422echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6
7423if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
ba4481b5 7424 HAVE_TIFF=yes
ba4481b5
DL
7425fi
7426
ba4481b5
DL
7427fi
7428
ba4481b5
DL
7429 fi
7430
7431 if test "${HAVE_TIFF}" = "yes"; then
503d2be0 7432 cat >>confdefs.h <<\EOF
ba4481b5
DL
7433#define HAVE_TIFF 1
7434EOF
7435
7436 fi
7437fi
503d2be0 7438
ba4481b5
DL
7439### Use -lgif if available, unless `--with-gif=no'.
7440HAVE_GIF=no
7441if test "${HAVE_X11}" = "yes"; then
7442 if test "${with_gif}" != "no"; then
409d9577 7443 echo "$as_me:7443: checking for gif_lib.h" >&5
503d2be0
AS
7444echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
7445if test "${ac_cv_header_gif_lib_h+set}" = set; then
7446 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7447else
503d2be0 7448 cat >conftest.$ac_ext <<_ACEOF
409d9577 7449#line 7449 "configure"
ba4481b5
DL
7450#include "confdefs.h"
7451#include <gif_lib.h>
503d2be0 7452_ACEOF
409d9577 7453if { (eval echo "$as_me:7453: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
7454 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7455 ac_status=$?
7456 egrep -v '^ *\+' conftest.er1 >conftest.err
7457 rm -f conftest.er1
7458 cat conftest.err >&5
409d9577 7459 echo "$as_me:7459: \$? = $ac_status" >&5
503d2be0
AS
7460 (exit $ac_status); } >/dev/null; then
7461 if test -s conftest.err; then
7462 ac_cpp_err=$ac_c_preproc_warn_flag
7463 else
7464 ac_cpp_err=
7465 fi
7466else
7467 ac_cpp_err=yes
7468fi
7469if test -z "$ac_cpp_err"; then
7470 ac_cv_header_gif_lib_h=yes
ba4481b5 7471else
503d2be0 7472 echo "$as_me: failed program was:" >&5
ba4481b5 7473 cat conftest.$ac_ext >&5
503d2be0 7474 ac_cv_header_gif_lib_h=no
ba4481b5 7475fi
503d2be0 7476rm -f conftest.err conftest.$ac_ext
ba4481b5 7477fi
409d9577 7478echo "$as_me:7478: result: $ac_cv_header_gif_lib_h" >&5
503d2be0
AS
7479echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
7480if test $ac_cv_header_gif_lib_h = yes; then
409d9577 7481 echo "$as_me:7481: checking for DGifOpen in -lungif" >&5
503d2be0
AS
7482echo $ECHO_N "checking for DGifOpen in -lungif... $ECHO_C" >&6
7483if test "${ac_cv_lib_ungif_DGifOpen+set}" = set; then
7484 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7485else
503d2be0 7486 ac_check_lib_save_LIBS=$LIBS
457b792c 7487LIBS="-lungif $LIBS"
503d2be0 7488cat >conftest.$ac_ext <<_ACEOF
409d9577 7489#line 7489 "configure"
ba4481b5 7490#include "confdefs.h"
503d2be0 7491
ba4481b5 7492/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7493#ifdef __cplusplus
7494extern "C"
7495#endif
ba4481b5 7496/* We use char because int might match the return type of a gcc2
503d2be0
AS
7497 builtin and then its argument prototype would still apply. */
7498char DGifOpen ();
7499int
7500main ()
7501{
7502DGifOpen ();
7503 ;
7504 return 0;
7505}
7506_ACEOF
7507rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 7508if { (eval echo "$as_me:7508: \"$ac_link\"") >&5
503d2be0
AS
7509 (eval $ac_link) 2>&5
7510 ac_status=$?
409d9577 7511 echo "$as_me:7511: \$? = $ac_status" >&5
503d2be0
AS
7512 (exit $ac_status); } &&
7513 { ac_try='test -s conftest$ac_exeext'
409d9577 7514 { (eval echo "$as_me:7514: \"$ac_try\"") >&5
503d2be0
AS
7515 (eval $ac_try) 2>&5
7516 ac_status=$?
409d9577 7517 echo "$as_me:7517: \$? = $ac_status" >&5
503d2be0
AS
7518 (exit $ac_status); }; }; then
7519 ac_cv_lib_ungif_DGifOpen=yes
7520else
7521 echo "$as_me: failed program was:" >&5
7522cat conftest.$ac_ext >&5
7523ac_cv_lib_ungif_DGifOpen=no
7524fi
7525rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7526LIBS=$ac_check_lib_save_LIBS
7527fi
409d9577 7528echo "$as_me:7528: result: $ac_cv_lib_ungif_DGifOpen" >&5
503d2be0
AS
7529echo "${ECHO_T}$ac_cv_lib_ungif_DGifOpen" >&6
7530if test $ac_cv_lib_ungif_DGifOpen = yes; then
ba4481b5 7531 HAVE_GIF=yes
ba4481b5
DL
7532fi
7533
ba4481b5
DL
7534fi
7535
ba4481b5
DL
7536 fi
7537
7538 if test "${HAVE_GIF}" = "yes"; then
503d2be0 7539 cat >>confdefs.h <<\EOF
ba4481b5
DL
7540#define HAVE_GIF 1
7541EOF
7542
7543 fi
7544fi
7545
7546# If netdb.h doesn't declare h_errno, we must declare it by hand.
409d9577 7547echo "$as_me:7547: checking whether netdb declares h_errno" >&5
503d2be0
AS
7548echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6
7549if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
7550 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7551else
503d2be0 7552 cat >conftest.$ac_ext <<_ACEOF
409d9577 7553#line 7553 "configure"
ba4481b5
DL
7554#include "confdefs.h"
7555#include <netdb.h>
503d2be0
AS
7556int
7557main ()
7558{
ba4481b5 7559return h_errno;
503d2be0
AS
7560 ;
7561 return 0;
7562}
7563_ACEOF
7564rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 7565if { (eval echo "$as_me:7565: \"$ac_link\"") >&5
503d2be0
AS
7566 (eval $ac_link) 2>&5
7567 ac_status=$?
409d9577 7568 echo "$as_me:7568: \$? = $ac_status" >&5
503d2be0
AS
7569 (exit $ac_status); } &&
7570 { ac_try='test -s conftest$ac_exeext'
409d9577 7571 { (eval echo "$as_me:7571: \"$ac_try\"") >&5
503d2be0
AS
7572 (eval $ac_try) 2>&5
7573 ac_status=$?
409d9577 7574 echo "$as_me:7574: \$? = $ac_status" >&5
503d2be0 7575 (exit $ac_status); }; }; then
ba4481b5
DL
7576 emacs_cv_netdb_declares_h_errno=yes
7577else
503d2be0
AS
7578 echo "$as_me: failed program was:" >&5
7579cat conftest.$ac_ext >&5
7580emacs_cv_netdb_declares_h_errno=no
ba4481b5 7581fi
503d2be0 7582rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 7583fi
409d9577 7584echo "$as_me:7584: result: $emacs_cv_netdb_declares_h_errno" >&5
503d2be0 7585echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6
ba4481b5 7586if test $emacs_cv_netdb_declares_h_errno = yes; then
503d2be0 7587 cat >>confdefs.h <<\EOF
ba4481b5
DL
7588#define HAVE_H_ERRNO 1
7589EOF
7590
7591fi
7592
7593# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7594# for constant arguments. Useless!
409d9577 7595echo "$as_me:7595: checking for working alloca.h" >&5
503d2be0
AS
7596echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
7597if test "${ac_cv_working_alloca_h+set}" = set; then
7598 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7599else
503d2be0 7600 cat >conftest.$ac_ext <<_ACEOF
409d9577 7601#line 7601 "configure"
ba4481b5
DL
7602#include "confdefs.h"
7603#include <alloca.h>
503d2be0
AS
7604int
7605main ()
7606{
7607char *p = (char *) alloca (2 * sizeof (int));
7608 ;
7609 return 0;
7610}
7611_ACEOF
7612rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 7613if { (eval echo "$as_me:7613: \"$ac_link\"") >&5
503d2be0
AS
7614 (eval $ac_link) 2>&5
7615 ac_status=$?
409d9577 7616 echo "$as_me:7616: \$? = $ac_status" >&5
503d2be0
AS
7617 (exit $ac_status); } &&
7618 { ac_try='test -s conftest$ac_exeext'
409d9577 7619 { (eval echo "$as_me:7619: \"$ac_try\"") >&5
503d2be0
AS
7620 (eval $ac_try) 2>&5
7621 ac_status=$?
409d9577 7622 echo "$as_me:7622: \$? = $ac_status" >&5
503d2be0
AS
7623 (exit $ac_status); }; }; then
7624 ac_cv_working_alloca_h=yes
7625else
7626 echo "$as_me: failed program was:" >&5
7627cat conftest.$ac_ext >&5
7628ac_cv_working_alloca_h=no
7629fi
7630rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7631fi
409d9577 7632echo "$as_me:7632: result: $ac_cv_working_alloca_h" >&5
503d2be0
AS
7633echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
7634if test $ac_cv_working_alloca_h = yes; then
7635
7636cat >>confdefs.h <<\EOF
ba4481b5
DL
7637#define HAVE_ALLOCA_H 1
7638EOF
7639
7640fi
7641
409d9577 7642echo "$as_me:7642: checking for alloca" >&5
503d2be0
AS
7643echo $ECHO_N "checking for alloca... $ECHO_C" >&6
7644if test "${ac_cv_func_alloca_works+set}" = set; then
7645 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7646else
503d2be0 7647 cat >conftest.$ac_ext <<_ACEOF
409d9577 7648#line 7648 "configure"
ba4481b5 7649#include "confdefs.h"
ba4481b5
DL
7650#ifdef __GNUC__
7651# define alloca __builtin_alloca
7652#else
c4bb2108
DL
7653# ifdef _MSC_VER
7654# include <malloc.h>
7655# define alloca _alloca
ba4481b5 7656# else
c4bb2108
DL
7657# if HAVE_ALLOCA_H
7658# include <alloca.h>
22afa6e8 7659# else
c4bb2108
DL
7660# ifdef _AIX
7661 #pragma alloca
7662# else
7663# ifndef alloca /* predefined by HP cc +Olibcalls */
ba4481b5 7664char *alloca ();
c4bb2108 7665# endif
ba4481b5
DL
7666# endif
7667# endif
7668# endif
7669#endif
7670
503d2be0
AS
7671int
7672main ()
7673{
7674char *p = (char *) alloca (1);
7675 ;
7676 return 0;
7677}
7678_ACEOF
7679rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 7680if { (eval echo "$as_me:7680: \"$ac_link\"") >&5
503d2be0
AS
7681 (eval $ac_link) 2>&5
7682 ac_status=$?
409d9577 7683 echo "$as_me:7683: \$? = $ac_status" >&5
503d2be0
AS
7684 (exit $ac_status); } &&
7685 { ac_try='test -s conftest$ac_exeext'
409d9577 7686 { (eval echo "$as_me:7686: \"$ac_try\"") >&5
503d2be0
AS
7687 (eval $ac_try) 2>&5
7688 ac_status=$?
409d9577 7689 echo "$as_me:7689: \$? = $ac_status" >&5
503d2be0 7690 (exit $ac_status); }; }; then
ba4481b5
DL
7691 ac_cv_func_alloca_works=yes
7692else
503d2be0
AS
7693 echo "$as_me: failed program was:" >&5
7694cat conftest.$ac_ext >&5
7695ac_cv_func_alloca_works=no
ba4481b5 7696fi
503d2be0 7697rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 7698fi
409d9577 7699echo "$as_me:7699: result: $ac_cv_func_alloca_works" >&5
503d2be0 7700echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
ba4481b5 7701
ba4481b5 7702if test $ac_cv_func_alloca_works = yes; then
503d2be0
AS
7703
7704cat >>confdefs.h <<\EOF
ba4481b5
DL
7705#define HAVE_ALLOCA 1
7706EOF
7707
503d2be0 7708else
ba4481b5 7709 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
503d2be0
AS
7710# that cause trouble. Some versions do not even contain alloca or
7711# contain a buggy version. If you still want to use their alloca,
7712# use ar to extract alloca.o from them instead of compiling alloca.c.
7713
7714ALLOCA=alloca.$ac_objext
7715
7716cat >>confdefs.h <<\EOF
ba4481b5
DL
7717#define C_ALLOCA 1
7718EOF
7719
409d9577 7720echo "$as_me:7720: checking whether \`alloca.c' needs Cray hooks" >&5
503d2be0
AS
7721echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
7722if test "${ac_cv_os_cray+set}" = set; then
7723 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7724else
503d2be0 7725 cat >conftest.$ac_ext <<_ACEOF
409d9577 7726#line 7726 "configure"
ba4481b5
DL
7727#include "confdefs.h"
7728#if defined(CRAY) && ! defined(CRAY2)
7729webecray
7730#else
7731wenotbecray
7732#endif
7733
503d2be0 7734_ACEOF
ba4481b5
DL
7735if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7736 egrep "webecray" >/dev/null 2>&1; then
ba4481b5
DL
7737 ac_cv_os_cray=yes
7738else
ba4481b5
DL
7739 ac_cv_os_cray=no
7740fi
7741rm -f conftest*
7742
7743fi
409d9577 7744echo "$as_me:7744: result: $ac_cv_os_cray" >&5
503d2be0 7745echo "${ECHO_T}$ac_cv_os_cray" >&6
ba4481b5 7746if test $ac_cv_os_cray = yes; then
503d2be0
AS
7747 for ac_func in _getb67 GETB67 getb67; do
7748 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
409d9577 7749echo "$as_me:7749: checking for $ac_func" >&5
503d2be0
AS
7750echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7751if eval "test \"\${$as_ac_var+set}\" = set"; then
7752 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7753else
503d2be0 7754 cat >conftest.$ac_ext <<_ACEOF
409d9577 7755#line 7755 "configure"
ba4481b5
DL
7756#include "confdefs.h"
7757/* System header to define __stub macros and hopefully few prototypes,
503d2be0 7758 which can conflict with char $ac_func (); below. */
ba4481b5
DL
7759#include <assert.h>
7760/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7761#ifdef __cplusplus
7762extern "C"
7763#endif
ba4481b5 7764/* We use char because int might match the return type of a gcc2
503d2be0
AS
7765 builtin and then its argument prototype would still apply. */
7766char $ac_func ();
7767char (*f) ();
ba4481b5 7768
503d2be0
AS
7769int
7770main ()
7771{
ba4481b5
DL
7772/* The GNU C library defines this for functions which it implements
7773 to always fail with ENOSYS. Some functions are actually named
7774 something starting with __ and the normal name is an alias. */
7775#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7776choke me
7777#else
503d2be0 7778f = $ac_func;
ba4481b5
DL
7779#endif
7780
503d2be0
AS
7781 ;
7782 return 0;
7783}
7784_ACEOF
7785rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 7786if { (eval echo "$as_me:7786: \"$ac_link\"") >&5
503d2be0
AS
7787 (eval $ac_link) 2>&5
7788 ac_status=$?
409d9577 7789 echo "$as_me:7789: \$? = $ac_status" >&5
503d2be0
AS
7790 (exit $ac_status); } &&
7791 { ac_try='test -s conftest$ac_exeext'
409d9577 7792 { (eval echo "$as_me:7792: \"$ac_try\"") >&5
503d2be0
AS
7793 (eval $ac_try) 2>&5
7794 ac_status=$?
409d9577 7795 echo "$as_me:7795: \$? = $ac_status" >&5
503d2be0
AS
7796 (exit $ac_status); }; }; then
7797 eval "$as_ac_var=yes"
7798else
7799 echo "$as_me: failed program was:" >&5
7800cat conftest.$ac_ext >&5
7801eval "$as_ac_var=no"
7802fi
7803rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7804fi
409d9577 7805echo "$as_me:7805: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
7806echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7807if test `eval echo '${'$as_ac_var'}'` = yes; then
7808
7809cat >>confdefs.h <<EOF
ba4481b5
DL
7810#define CRAY_STACKSEG_END $ac_func
7811EOF
7812
503d2be0 7813 break
ba4481b5
DL
7814fi
7815
503d2be0 7816 done
ba4481b5
DL
7817fi
7818
409d9577 7819echo "$as_me:7819: checking stack direction for C alloca" >&5
503d2be0
AS
7820echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
7821if test "${ac_cv_c_stack_direction+set}" = set; then
7822 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
7823else
7824 if test "$cross_compiling" = yes; then
7825 ac_cv_c_stack_direction=0
7826else
503d2be0 7827 cat >conftest.$ac_ext <<_ACEOF
409d9577 7828#line 7828 "configure"
ba4481b5 7829#include "confdefs.h"
503d2be0 7830int
ba4481b5
DL
7831find_stack_direction ()
7832{
7833 static char *addr = 0;
7834 auto char dummy;
7835 if (addr == 0)
7836 {
7837 addr = &dummy;
7838 return find_stack_direction ();
7839 }
7840 else
7841 return (&dummy > addr) ? 1 : -1;
7842}
503d2be0
AS
7843
7844int
ba4481b5
DL
7845main ()
7846{
503d2be0 7847 exit (find_stack_direction () < 0);
ba4481b5 7848}
503d2be0
AS
7849_ACEOF
7850rm -f conftest$ac_exeext
409d9577 7851if { (eval echo "$as_me:7851: \"$ac_link\"") >&5
503d2be0
AS
7852 (eval $ac_link) 2>&5
7853 ac_status=$?
409d9577 7854 echo "$as_me:7854: \$? = $ac_status" >&5
503d2be0 7855 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
409d9577 7856 { (eval echo "$as_me:7856: \"$ac_try\"") >&5
503d2be0
AS
7857 (eval $ac_try) 2>&5
7858 ac_status=$?
409d9577 7859 echo "$as_me:7859: \$? = $ac_status" >&5
503d2be0 7860 (exit $ac_status); }; }; then
ba4481b5
DL
7861 ac_cv_c_stack_direction=1
7862else
503d2be0
AS
7863 echo "$as_me: program exited with status $ac_status" >&5
7864echo "$as_me: failed program was:" >&5
7865cat conftest.$ac_ext >&5
7866ac_cv_c_stack_direction=-1
ba4481b5 7867fi
503d2be0 7868rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 7869fi
ba4481b5 7870fi
409d9577 7871echo "$as_me:7871: result: $ac_cv_c_stack_direction" >&5
503d2be0 7872echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
ba4481b5 7873
503d2be0 7874cat >>confdefs.h <<EOF
ba4481b5
DL
7875#define STACK_DIRECTION $ac_cv_c_stack_direction
7876EOF
7877
7878fi
7879
ba4481b5
DL
7880# fmod, logb, and frexp are found in -lm on most systems.
7881# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
503d2be0 7882
409d9577 7883echo "$as_me:7883: checking for sqrt in -lm" >&5
503d2be0
AS
7884echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
7885if test "${ac_cv_lib_m_sqrt+set}" = set; then
7886 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7887else
503d2be0 7888 ac_check_lib_save_LIBS=$LIBS
ba4481b5 7889LIBS="-lm $LIBS"
503d2be0 7890cat >conftest.$ac_ext <<_ACEOF
409d9577 7891#line 7891 "configure"
ba4481b5 7892#include "confdefs.h"
503d2be0 7893
ba4481b5 7894/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7895#ifdef __cplusplus
7896extern "C"
7897#endif
ba4481b5 7898/* We use char because int might match the return type of a gcc2
503d2be0
AS
7899 builtin and then its argument prototype would still apply. */
7900char sqrt ();
7901int
7902main ()
7903{
7904sqrt ();
7905 ;
7906 return 0;
7907}
7908_ACEOF
7909rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 7910if { (eval echo "$as_me:7910: \"$ac_link\"") >&5
503d2be0
AS
7911 (eval $ac_link) 2>&5
7912 ac_status=$?
409d9577 7913 echo "$as_me:7913: \$? = $ac_status" >&5
503d2be0
AS
7914 (exit $ac_status); } &&
7915 { ac_try='test -s conftest$ac_exeext'
409d9577 7916 { (eval echo "$as_me:7916: \"$ac_try\"") >&5
503d2be0
AS
7917 (eval $ac_try) 2>&5
7918 ac_status=$?
409d9577 7919 echo "$as_me:7919: \$? = $ac_status" >&5
503d2be0
AS
7920 (exit $ac_status); }; }; then
7921 ac_cv_lib_m_sqrt=yes
7922else
7923 echo "$as_me: failed program was:" >&5
7924cat conftest.$ac_ext >&5
7925ac_cv_lib_m_sqrt=no
7926fi
7927rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7928LIBS=$ac_check_lib_save_LIBS
7929fi
409d9577 7930echo "$as_me:7930: result: $ac_cv_lib_m_sqrt" >&5
503d2be0
AS
7931echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
7932if test $ac_cv_lib_m_sqrt = yes; then
7933 cat >>confdefs.h <<EOF
7934#define HAVE_LIBM 1
ba4481b5
DL
7935EOF
7936
7937 LIBS="-lm $LIBS"
7938
ba4481b5
DL
7939fi
7940
ba4481b5 7941# Check for mail-locking functions in a "mail" library
503d2be0 7942
409d9577 7943echo "$as_me:7943: checking for maillock in -lmail" >&5
503d2be0
AS
7944echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6
7945if test "${ac_cv_lib_mail_maillock+set}" = set; then
7946 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7947else
503d2be0 7948 ac_check_lib_save_LIBS=$LIBS
ba4481b5 7949LIBS="-lmail $LIBS"
503d2be0 7950cat >conftest.$ac_ext <<_ACEOF
409d9577 7951#line 7951 "configure"
ba4481b5 7952#include "confdefs.h"
503d2be0 7953
ba4481b5 7954/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7955#ifdef __cplusplus
7956extern "C"
7957#endif
ba4481b5 7958/* We use char because int might match the return type of a gcc2
503d2be0
AS
7959 builtin and then its argument prototype would still apply. */
7960char maillock ();
7961int
7962main ()
7963{
7964maillock ();
7965 ;
7966 return 0;
7967}
7968_ACEOF
7969rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 7970if { (eval echo "$as_me:7970: \"$ac_link\"") >&5
503d2be0
AS
7971 (eval $ac_link) 2>&5
7972 ac_status=$?
409d9577 7973 echo "$as_me:7973: \$? = $ac_status" >&5
503d2be0
AS
7974 (exit $ac_status); } &&
7975 { ac_try='test -s conftest$ac_exeext'
409d9577 7976 { (eval echo "$as_me:7976: \"$ac_try\"") >&5
503d2be0
AS
7977 (eval $ac_try) 2>&5
7978 ac_status=$?
409d9577 7979 echo "$as_me:7979: \$? = $ac_status" >&5
503d2be0
AS
7980 (exit $ac_status); }; }; then
7981 ac_cv_lib_mail_maillock=yes
7982else
7983 echo "$as_me: failed program was:" >&5
7984cat conftest.$ac_ext >&5
7985ac_cv_lib_mail_maillock=no
7986fi
7987rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7988LIBS=$ac_check_lib_save_LIBS
7989fi
409d9577 7990echo "$as_me:7990: result: $ac_cv_lib_mail_maillock" >&5
503d2be0
AS
7991echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6
7992if test $ac_cv_lib_mail_maillock = yes; then
7993 cat >>confdefs.h <<EOF
7994#define HAVE_LIBMAIL 1
ba4481b5
DL
7995EOF
7996
7997 LIBS="-lmail $LIBS"
7998
ba4481b5
DL
7999fi
8000
409d9577 8001echo "$as_me:8001: checking for maillock in -llockfile" >&5
503d2be0
AS
8002echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6
8003if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
8004 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8005else
503d2be0 8006 ac_check_lib_save_LIBS=$LIBS
ba4481b5 8007LIBS="-llockfile $LIBS"
503d2be0 8008cat >conftest.$ac_ext <<_ACEOF
409d9577 8009#line 8009 "configure"
ba4481b5 8010#include "confdefs.h"
503d2be0 8011
ba4481b5 8012/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8013#ifdef __cplusplus
8014extern "C"
8015#endif
ba4481b5 8016/* We use char because int might match the return type of a gcc2
503d2be0
AS
8017 builtin and then its argument prototype would still apply. */
8018char maillock ();
8019int
8020main ()
8021{
8022maillock ();
8023 ;
8024 return 0;
8025}
8026_ACEOF
8027rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 8028if { (eval echo "$as_me:8028: \"$ac_link\"") >&5
503d2be0
AS
8029 (eval $ac_link) 2>&5
8030 ac_status=$?
409d9577 8031 echo "$as_me:8031: \$? = $ac_status" >&5
503d2be0
AS
8032 (exit $ac_status); } &&
8033 { ac_try='test -s conftest$ac_exeext'
409d9577 8034 { (eval echo "$as_me:8034: \"$ac_try\"") >&5
503d2be0
AS
8035 (eval $ac_try) 2>&5
8036 ac_status=$?
409d9577 8037 echo "$as_me:8037: \$? = $ac_status" >&5
503d2be0
AS
8038 (exit $ac_status); }; }; then
8039 ac_cv_lib_lockfile_maillock=yes
8040else
8041 echo "$as_me: failed program was:" >&5
8042cat conftest.$ac_ext >&5
8043ac_cv_lib_lockfile_maillock=no
8044fi
8045rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8046LIBS=$ac_check_lib_save_LIBS
8047fi
409d9577 8048echo "$as_me:8048: result: $ac_cv_lib_lockfile_maillock" >&5
503d2be0
AS
8049echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6
8050if test $ac_cv_lib_lockfile_maillock = yes; then
8051 cat >>confdefs.h <<EOF
8052#define HAVE_LIBLOCKFILE 1
ba4481b5
DL
8053EOF
8054
8055 LIBS="-llockfile $LIBS"
8056
ba4481b5
DL
8057fi
8058
8059# If we have the shared liblockfile, assume we must use it for mail
8060# locking (e.g. Debian). If we couldn't link against liblockfile
8061# (no liblockfile.a installed), ensure that we don't need to.
8062if test "$ac_cv_lib_lockfile_maillock" = no; then
8063 # Extract the first word of "liblockfile.so", so it can be a program name with args.
8064set dummy liblockfile.so; ac_word=$2
409d9577 8065echo "$as_me:8065: checking for $ac_word" >&5
503d2be0
AS
8066echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8067if test "${ac_cv_prog_liblockfile+set}" = set; then
8068 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
8069else
8070 if test -n "$liblockfile"; then
8071 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
8072else
503d2be0
AS
8073 ac_save_IFS=$IFS; IFS=$ac_path_separator
8074ac_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
8075for ac_dir in $ac_dummy; do
8076 IFS=$ac_save_IFS
8077 test -z "$ac_dir" && ac_dir=.
8078 $as_executable_p "$ac_dir/$ac_word" || continue
8079ac_cv_prog_liblockfile="yes"
409d9577 8080echo "$as_me:8080: found $ac_dir/$ac_word" >&5
503d2be0
AS
8081break
8082done
8083
ba4481b5
DL
8084 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
8085fi
8086fi
503d2be0 8087liblockfile=$ac_cv_prog_liblockfile
ba4481b5 8088if test -n "$liblockfile"; then
409d9577 8089 echo "$as_me:8089: result: $liblockfile" >&5
503d2be0 8090echo "${ECHO_T}$liblockfile" >&6
ba4481b5 8091else
409d9577 8092 echo "$as_me:8092: result: no" >&5
503d2be0 8093echo "${ECHO_T}no" >&6
ba4481b5
DL
8094fi
8095
8096 if test $ac_cv_prog_liblockfile = yes; then
409d9577 8097 { { echo "$as_me:8097: error: Shared liblockfile found but can't link against it.
503d2be0
AS
8098This probably means that movemail could lose mail.
8099There may be a \`development' package to install containing liblockfile." >&5
8100echo "$as_me: error: Shared liblockfile found but can't link against it.
ba4481b5 8101This probably means that movemail could lose mail.
503d2be0
AS
8102There may be a \`development' package to install containing liblockfile." >&2;}
8103 { (exit 1); exit 1; }; }
8104 else cat >>confdefs.h <<\EOF
ba4481b5
DL
8105#define LIBMAIL -llockfile
8106EOF
8107
8108 fi
8109 else :
8110fi
503d2be0 8111
ba4481b5
DL
8112for ac_func in touchlock
8113do
503d2be0 8114as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
409d9577 8115echo "$as_me:8115: checking for $ac_func" >&5
503d2be0
AS
8116echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8117if eval "test \"\${$as_ac_var+set}\" = set"; then
8118 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8119else
503d2be0 8120 cat >conftest.$ac_ext <<_ACEOF
409d9577 8121#line 8121 "configure"
ba4481b5
DL
8122#include "confdefs.h"
8123/* System header to define __stub macros and hopefully few prototypes,
503d2be0 8124 which can conflict with char $ac_func (); below. */
ba4481b5
DL
8125#include <assert.h>
8126/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8127#ifdef __cplusplus
8128extern "C"
8129#endif
ba4481b5 8130/* We use char because int might match the return type of a gcc2
503d2be0
AS
8131 builtin and then its argument prototype would still apply. */
8132char $ac_func ();
8133char (*f) ();
ba4481b5 8134
503d2be0
AS
8135int
8136main ()
8137{
ba4481b5
DL
8138/* The GNU C library defines this for functions which it implements
8139 to always fail with ENOSYS. Some functions are actually named
8140 something starting with __ and the normal name is an alias. */
8141#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8142choke me
8143#else
503d2be0 8144f = $ac_func;
ba4481b5
DL
8145#endif
8146
503d2be0
AS
8147 ;
8148 return 0;
8149}
8150_ACEOF
8151rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 8152if { (eval echo "$as_me:8152: \"$ac_link\"") >&5
503d2be0
AS
8153 (eval $ac_link) 2>&5
8154 ac_status=$?
409d9577 8155 echo "$as_me:8155: \$? = $ac_status" >&5
503d2be0
AS
8156 (exit $ac_status); } &&
8157 { ac_try='test -s conftest$ac_exeext'
409d9577 8158 { (eval echo "$as_me:8158: \"$ac_try\"") >&5
503d2be0
AS
8159 (eval $ac_try) 2>&5
8160 ac_status=$?
409d9577 8161 echo "$as_me:8161: \$? = $ac_status" >&5
503d2be0
AS
8162 (exit $ac_status); }; }; then
8163 eval "$as_ac_var=yes"
8164else
8165 echo "$as_me: failed program was:" >&5
8166cat conftest.$ac_ext >&5
8167eval "$as_ac_var=no"
8168fi
8169rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8170fi
409d9577 8171echo "$as_me:8171: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
8172echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8173if test `eval echo '${'$as_ac_var'}'` = yes; then
8174 cat >>confdefs.h <<EOF
8175#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
ba4481b5 8176EOF
ba4481b5 8177
ba4481b5
DL
8178fi
8179done
8180
503d2be0 8181for ac_header in maillock.h
ba4481b5 8182do
503d2be0 8183as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
409d9577 8184echo "$as_me:8184: checking for $ac_header" >&5
503d2be0
AS
8185echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8186if eval "test \"\${$as_ac_Header+set}\" = set"; then
8187 echo $ECHO_N "(cached) $ECHO_C" >&6
8188else
8189 cat >conftest.$ac_ext <<_ACEOF
409d9577 8190#line 8190 "configure"
503d2be0
AS
8191#include "confdefs.h"
8192#include <$ac_header>
8193_ACEOF
409d9577 8194if { (eval echo "$as_me:8194: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
8195 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8196 ac_status=$?
8197 egrep -v '^ *\+' conftest.er1 >conftest.err
8198 rm -f conftest.er1
8199 cat conftest.err >&5
409d9577 8200 echo "$as_me:8200: \$? = $ac_status" >&5
503d2be0
AS
8201 (exit $ac_status); } >/dev/null; then
8202 if test -s conftest.err; then
8203 ac_cpp_err=$ac_c_preproc_warn_flag
8204 else
8205 ac_cpp_err=
8206 fi
8207else
8208 ac_cpp_err=yes
8209fi
8210if test -z "$ac_cpp_err"; then
8211 eval "$as_ac_Header=yes"
8212else
8213 echo "$as_me: failed program was:" >&5
ba4481b5 8214 cat conftest.$ac_ext >&5
503d2be0 8215 eval "$as_ac_Header=no"
ba4481b5 8216fi
503d2be0 8217rm -f conftest.err conftest.$ac_ext
ba4481b5 8218fi
409d9577 8219echo "$as_me:8219: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
8220echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8221if test `eval echo '${'$as_ac_Header'}'` = yes; then
8222 cat >>confdefs.h <<EOF
8223#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba4481b5 8224EOF
503d2be0 8225
ba4481b5
DL
8226fi
8227done
8228
48d4b120 8229for ac_func in gethostname getdomainname dup2 \
ba4481b5
DL
8230rename closedir mkdir rmdir sysinfo \
8231random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
8232strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
a3f08d9e 8233utimes setrlimit setpgid getcwd getwd shutdown strftime getaddrinfo \
6edcfe1a 8234__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
03391420 8235gai_strerror mkstemp
ba4481b5 8236do
503d2be0 8237as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
409d9577 8238echo "$as_me:8238: checking for $ac_func" >&5
503d2be0
AS
8239echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8240if eval "test \"\${$as_ac_var+set}\" = set"; then
8241 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8242else
503d2be0 8243 cat >conftest.$ac_ext <<_ACEOF
409d9577 8244#line 8244 "configure"
ba4481b5
DL
8245#include "confdefs.h"
8246/* System header to define __stub macros and hopefully few prototypes,
503d2be0 8247 which can conflict with char $ac_func (); below. */
ba4481b5
DL
8248#include <assert.h>
8249/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8250#ifdef __cplusplus
8251extern "C"
8252#endif
ba4481b5 8253/* We use char because int might match the return type of a gcc2
503d2be0
AS
8254 builtin and then its argument prototype would still apply. */
8255char $ac_func ();
8256char (*f) ();
ba4481b5 8257
503d2be0
AS
8258int
8259main ()
8260{
ba4481b5
DL
8261/* The GNU C library defines this for functions which it implements
8262 to always fail with ENOSYS. Some functions are actually named
8263 something starting with __ and the normal name is an alias. */
8264#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8265choke me
8266#else
503d2be0 8267f = $ac_func;
ba4481b5
DL
8268#endif
8269
503d2be0
AS
8270 ;
8271 return 0;
8272}
8273_ACEOF
8274rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 8275if { (eval echo "$as_me:8275: \"$ac_link\"") >&5
503d2be0
AS
8276 (eval $ac_link) 2>&5
8277 ac_status=$?
409d9577 8278 echo "$as_me:8278: \$? = $ac_status" >&5
503d2be0
AS
8279 (exit $ac_status); } &&
8280 { ac_try='test -s conftest$ac_exeext'
409d9577 8281 { (eval echo "$as_me:8281: \"$ac_try\"") >&5
503d2be0
AS
8282 (eval $ac_try) 2>&5
8283 ac_status=$?
409d9577 8284 echo "$as_me:8284: \$? = $ac_status" >&5
503d2be0
AS
8285 (exit $ac_status); }; }; then
8286 eval "$as_ac_var=yes"
8287else
8288 echo "$as_me: failed program was:" >&5
8289cat conftest.$ac_ext >&5
8290eval "$as_ac_var=no"
8291fi
8292rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8293fi
409d9577 8294echo "$as_me:8294: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
8295echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8296if test `eval echo '${'$as_ac_var'}'` = yes; then
8297 cat >>confdefs.h <<EOF
8298#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
ba4481b5 8299EOF
ba4481b5 8300
ba4481b5
DL
8301fi
8302done
8303
503d2be0 8304for ac_header in sys/time.h unistd.h
b5de8dc0 8305do
503d2be0 8306as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
409d9577 8307echo "$as_me:8307: checking for $ac_header" >&5
503d2be0
AS
8308echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8309if eval "test \"\${$as_ac_Header+set}\" = set"; then
8310 echo $ECHO_N "(cached) $ECHO_C" >&6
8311else
8312 cat >conftest.$ac_ext <<_ACEOF
409d9577 8313#line 8313 "configure"
503d2be0
AS
8314#include "confdefs.h"
8315#include <$ac_header>
8316_ACEOF
409d9577 8317if { (eval echo "$as_me:8317: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
8318 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8319 ac_status=$?
8320 egrep -v '^ *\+' conftest.er1 >conftest.err
8321 rm -f conftest.er1
8322 cat conftest.err >&5
409d9577 8323 echo "$as_me:8323: \$? = $ac_status" >&5
503d2be0
AS
8324 (exit $ac_status); } >/dev/null; then
8325 if test -s conftest.err; then
8326 ac_cpp_err=$ac_c_preproc_warn_flag
8327 else
8328 ac_cpp_err=
8329 fi
8330else
8331 ac_cpp_err=yes
8332fi
8333if test -z "$ac_cpp_err"; then
8334 eval "$as_ac_Header=yes"
8335else
8336 echo "$as_me: failed program was:" >&5
b5de8dc0 8337 cat conftest.$ac_ext >&5
503d2be0 8338 eval "$as_ac_Header=no"
b5de8dc0 8339fi
503d2be0 8340rm -f conftest.err conftest.$ac_ext
b5de8dc0 8341fi
409d9577 8342echo "$as_me:8342: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
8343echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8344if test `eval echo '${'$as_ac_Header'}'` = yes; then
8345 cat >>confdefs.h <<EOF
8346#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
b5de8dc0 8347EOF
503d2be0 8348
b5de8dc0
DL
8349fi
8350done
8351
8352for ac_func in alarm
8353do
503d2be0 8354as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
409d9577 8355echo "$as_me:8355: checking for $ac_func" >&5
503d2be0
AS
8356echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8357if eval "test \"\${$as_ac_var+set}\" = set"; then
8358 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 8359else
503d2be0 8360 cat >conftest.$ac_ext <<_ACEOF
409d9577 8361#line 8361 "configure"
b5de8dc0
DL
8362#include "confdefs.h"
8363/* System header to define __stub macros and hopefully few prototypes,
503d2be0 8364 which can conflict with char $ac_func (); below. */
b5de8dc0
DL
8365#include <assert.h>
8366/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8367#ifdef __cplusplus
8368extern "C"
8369#endif
b5de8dc0 8370/* We use char because int might match the return type of a gcc2
503d2be0
AS
8371 builtin and then its argument prototype would still apply. */
8372char $ac_func ();
8373char (*f) ();
b5de8dc0 8374
503d2be0
AS
8375int
8376main ()
8377{
b5de8dc0
DL
8378/* The GNU C library defines this for functions which it implements
8379 to always fail with ENOSYS. Some functions are actually named
8380 something starting with __ and the normal name is an alias. */
8381#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8382choke me
8383#else
503d2be0 8384f = $ac_func;
b5de8dc0
DL
8385#endif
8386
503d2be0
AS
8387 ;
8388 return 0;
8389}
8390_ACEOF
8391rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 8392if { (eval echo "$as_me:8392: \"$ac_link\"") >&5
503d2be0
AS
8393 (eval $ac_link) 2>&5
8394 ac_status=$?
409d9577 8395 echo "$as_me:8395: \$? = $ac_status" >&5
503d2be0
AS
8396 (exit $ac_status); } &&
8397 { ac_try='test -s conftest$ac_exeext'
409d9577 8398 { (eval echo "$as_me:8398: \"$ac_try\"") >&5
503d2be0
AS
8399 (eval $ac_try) 2>&5
8400 ac_status=$?
409d9577 8401 echo "$as_me:8401: \$? = $ac_status" >&5
503d2be0
AS
8402 (exit $ac_status); }; }; then
8403 eval "$as_ac_var=yes"
8404else
8405 echo "$as_me: failed program was:" >&5
8406cat conftest.$ac_ext >&5
8407eval "$as_ac_var=no"
8408fi
8409rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8410fi
409d9577 8411echo "$as_me:8411: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
8412echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8413if test `eval echo '${'$as_ac_var'}'` = yes; then
8414 cat >>confdefs.h <<EOF
8415#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
b5de8dc0 8416EOF
b5de8dc0 8417
b5de8dc0
DL
8418fi
8419done
8420
409d9577 8421echo "$as_me:8421: checking for working mktime" >&5
503d2be0
AS
8422echo $ECHO_N "checking for working mktime... $ECHO_C" >&6
8423if test "${ac_cv_func_working_mktime+set}" = set; then
8424 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0
DL
8425else
8426 if test "$cross_compiling" = yes; then
8427 ac_cv_func_working_mktime=no
8428else
503d2be0 8429 cat >conftest.$ac_ext <<_ACEOF
409d9577 8430#line 8430 "configure"
b5de8dc0 8431#include "confdefs.h"
503d2be0 8432/* Test program from Paul Eggert and Tony Leneis. */
b5de8dc0
DL
8433#if TIME_WITH_SYS_TIME
8434# include <sys/time.h>
8435# include <time.h>
8436#else
8437# if HAVE_SYS_TIME_H
8438# include <sys/time.h>
8439# else
8440# include <time.h>
8441# endif
8442#endif
8443
8444#if HAVE_UNISTD_H
8445# include <unistd.h>
8446#endif
8447
8448#if !HAVE_ALARM
8449# define alarm(X) /* empty */
8450#endif
8451
8452/* Work around redefinition to rpl_putenv by other config tests. */
8453#undef putenv
8454
8455static time_t time_t_max;
8456
8457/* Values we'll use to set the TZ environment variable. */
8458static const char *const tz_strings[] = {
8459 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
8460 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
8461};
8462#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
8463
8464/* Fail if mktime fails to convert a date in the spring-forward gap.
8465 Based on a problem report from Andreas Jaeger. */
8466static void
8467spring_forward_gap ()
8468{
503d2be0 8469 /* glibc (up to about 1998-10-07) failed this test. */
b5de8dc0
DL
8470 struct tm tm;
8471
8472 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
8473 instead of "TZ=America/Vancouver" in order to detect the bug even
8474 on systems that don't support the Olson extension, or don't have the
8475 full zoneinfo tables installed. */
8476 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
8477
8478 tm.tm_year = 98;
8479 tm.tm_mon = 3;
8480 tm.tm_mday = 5;
8481 tm.tm_hour = 2;
8482 tm.tm_min = 0;
8483 tm.tm_sec = 0;
8484 tm.tm_isdst = -1;
8485 if (mktime (&tm) == (time_t)-1)
8486 exit (1);
8487}
8488
8489static void
8490mktime_test (now)
8491 time_t now;
8492{
8493 struct tm *lt;
8494 if ((lt = localtime (&now)) && mktime (lt) != now)
8495 exit (1);
8496 now = time_t_max - now;
8497 if ((lt = localtime (&now)) && mktime (lt) != now)
8498 exit (1);
8499}
8500
8501static void
8502irix_6_4_bug ()
8503{
8504 /* Based on code from Ariel Faigon. */
8505 struct tm tm;
8506 tm.tm_year = 96;
8507 tm.tm_mon = 3;
8508 tm.tm_mday = 0;
8509 tm.tm_hour = 0;
8510 tm.tm_min = 0;
8511 tm.tm_sec = 0;
8512 tm.tm_isdst = -1;
8513 mktime (&tm);
8514 if (tm.tm_mon != 2 || tm.tm_mday != 31)
8515 exit (1);
8516}
8517
8518static void
8519bigtime_test (j)
8520 int j;
8521{
8522 struct tm tm;
8523 time_t now;
8524 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
8525 now = mktime (&tm);
8526 if (now != (time_t) -1)
8527 {
8528 struct tm *lt = localtime (&now);
8529 if (! (lt
8530 && lt->tm_year == tm.tm_year
8531 && lt->tm_mon == tm.tm_mon
8532 && lt->tm_mday == tm.tm_mday
8533 && lt->tm_hour == tm.tm_hour
8534 && lt->tm_min == tm.tm_min
8535 && lt->tm_sec == tm.tm_sec
8536 && lt->tm_yday == tm.tm_yday
8537 && lt->tm_wday == tm.tm_wday
8538 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
8539 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
8540 exit (1);
8541 }
8542}
8543
8544int
8545main ()
8546{
8547 time_t t, delta;
8548 int i, j;
8549
8550 /* This test makes some buggy mktime implementations loop.
8551 Give up after 60 seconds; a mktime slower than that
8552 isn't worth using anyway. */
8553 alarm (60);
8554
8555 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
8556 continue;
8557 time_t_max--;
8558 delta = time_t_max / 997; /* a suitable prime number */
8559 for (i = 0; i < N_STRINGS; i++)
8560 {
8561 if (tz_strings[i])
8562 putenv (tz_strings[i]);
8563
8564 for (t = 0; t <= time_t_max - delta; t += delta)
8565 mktime_test (t);
8566 mktime_test ((time_t) 60 * 60);
8567 mktime_test ((time_t) 60 * 60 * 24);
8568
8569 for (j = 1; 0 < j; j *= 2)
8570 bigtime_test (j);
8571 bigtime_test (j - 1);
8572 }
8573 irix_6_4_bug ();
8574 spring_forward_gap ();
8575 exit (0);
8576}
503d2be0
AS
8577_ACEOF
8578rm -f conftest$ac_exeext
409d9577 8579if { (eval echo "$as_me:8579: \"$ac_link\"") >&5
503d2be0
AS
8580 (eval $ac_link) 2>&5
8581 ac_status=$?
409d9577 8582 echo "$as_me:8582: \$? = $ac_status" >&5
503d2be0 8583 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
409d9577 8584 { (eval echo "$as_me:8584: \"$ac_try\"") >&5
503d2be0
AS
8585 (eval $ac_try) 2>&5
8586 ac_status=$?
409d9577 8587 echo "$as_me:8587: \$? = $ac_status" >&5
503d2be0 8588 (exit $ac_status); }; }; then
b5de8dc0
DL
8589 ac_cv_func_working_mktime=yes
8590else
503d2be0
AS
8591 echo "$as_me: program exited with status $ac_status" >&5
8592echo "$as_me: failed program was:" >&5
8593cat conftest.$ac_ext >&5
8594ac_cv_func_working_mktime=no
b5de8dc0 8595fi
503d2be0 8596rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
b5de8dc0 8597fi
b5de8dc0 8598fi
409d9577 8599echo "$as_me:8599: result: $ac_cv_func_working_mktime" >&5
503d2be0 8600echo "${ECHO_T}$ac_cv_func_working_mktime" >&6
b5de8dc0 8601if test $ac_cv_func_working_mktime = no; then
503d2be0 8602 LIBOBJS="$LIBOBJS mktime.$ac_objext"
b5de8dc0
DL
8603fi
8604
8605if test "$ac_cv_func_working_mktime" = no; then
503d2be0 8606 cat >>confdefs.h <<\EOF
b5de8dc0
DL
8607#define BROKEN_MKTIME 1
8608EOF
8609
8610fi
8611
4c343001
DL
8612ac_have_func=no # yes means we've found a way to get the load average.
8613
503d2be0
AS
8614ac_save_LIBS=$LIBS
8615
8616# Check for getloadavg, but be sure not to touch the cache variable.
409d9577 8617(echo "$as_me:8617: checking for getloadavg" >&5
503d2be0
AS
8618echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6
8619if test "${ac_cv_func_getloadavg+set}" = set; then
8620 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 8621else
503d2be0 8622 cat >conftest.$ac_ext <<_ACEOF
409d9577 8623#line 8623 "configure"
4c343001 8624#include "confdefs.h"
503d2be0
AS
8625/* System header to define __stub macros and hopefully few prototypes,
8626 which can conflict with char getloadavg (); below. */
8627#include <assert.h>
4c343001 8628/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8629#ifdef __cplusplus
8630extern "C"
8631#endif
4c343001 8632/* We use char because int might match the return type of a gcc2
503d2be0
AS
8633 builtin and then its argument prototype would still apply. */
8634char getloadavg ();
8635char (*f) ();
4c343001 8636
503d2be0
AS
8637int
8638main ()
8639{
8640/* The GNU C library defines this for functions which it implements
8641 to always fail with ENOSYS. Some functions are actually named
8642 something starting with __ and the normal name is an alias. */
8643#if defined (__stub_getloadavg) || defined (__stub___getloadavg)
8644choke me
8645#else
8646f = getloadavg;
8647#endif
4c343001 8648
503d2be0
AS
8649 ;
8650 return 0;
8651}
8652_ACEOF
8653rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 8654if { (eval echo "$as_me:8654: \"$ac_link\"") >&5
503d2be0
AS
8655 (eval $ac_link) 2>&5
8656 ac_status=$?
409d9577 8657 echo "$as_me:8657: \$? = $ac_status" >&5
503d2be0
AS
8658 (exit $ac_status); } &&
8659 { ac_try='test -s conftest$ac_exeext'
409d9577 8660 { (eval echo "$as_me:8660: \"$ac_try\"") >&5
503d2be0
AS
8661 (eval $ac_try) 2>&5
8662 ac_status=$?
409d9577 8663 echo "$as_me:8663: \$? = $ac_status" >&5
503d2be0
AS
8664 (exit $ac_status); }; }; then
8665 ac_cv_func_getloadavg=yes
8666else
8667 echo "$as_me: failed program was:" >&5
8668cat conftest.$ac_ext >&5
8669ac_cv_func_getloadavg=no
8670fi
8671rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8672fi
409d9577 8673echo "$as_me:8673: result: $ac_cv_func_getloadavg" >&5
503d2be0
AS
8674echo "${ECHO_T}$ac_cv_func_getloadavg" >&6
8675if test $ac_cv_func_getloadavg = yes; then
8676 exit 0
4c343001 8677else
503d2be0 8678 exit 1
4c343001 8679fi
503d2be0 8680) && ac_have_func=yes
4c343001 8681
503d2be0
AS
8682# On HPUX9, an unprivileged user can get load averages through this function.
8683
8684for ac_func in pstat_getdynamic
8685do
8686as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
409d9577 8687echo "$as_me:8687: checking for $ac_func" >&5
503d2be0
AS
8688echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8689if eval "test \"\${$as_ac_var+set}\" = set"; then
8690 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 8691else
503d2be0 8692 cat >conftest.$ac_ext <<_ACEOF
409d9577 8693#line 8693 "configure"
4c343001 8694#include "confdefs.h"
503d2be0
AS
8695/* System header to define __stub macros and hopefully few prototypes,
8696 which can conflict with char $ac_func (); below. */
8697#include <assert.h>
4c343001 8698/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8699#ifdef __cplusplus
8700extern "C"
8701#endif
4c343001 8702/* We use char because int might match the return type of a gcc2
503d2be0
AS
8703 builtin and then its argument prototype would still apply. */
8704char $ac_func ();
8705char (*f) ();
8706
8707int
8708main ()
8709{
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
4c343001 8718
503d2be0
AS
8719 ;
8720 return 0;
8721}
8722_ACEOF
8723rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 8724if { (eval echo "$as_me:8724: \"$ac_link\"") >&5
503d2be0
AS
8725 (eval $ac_link) 2>&5
8726 ac_status=$?
409d9577 8727 echo "$as_me:8727: \$? = $ac_status" >&5
503d2be0
AS
8728 (exit $ac_status); } &&
8729 { ac_try='test -s conftest$ac_exeext'
409d9577 8730 { (eval echo "$as_me:8730: \"$ac_try\"") >&5
503d2be0
AS
8731 (eval $ac_try) 2>&5
8732 ac_status=$?
409d9577 8733 echo "$as_me:8733: \$? = $ac_status" >&5
503d2be0
AS
8734 (exit $ac_status); }; }; then
8735 eval "$as_ac_var=yes"
8736else
8737 echo "$as_me: failed program was:" >&5
8738cat conftest.$ac_ext >&5
8739eval "$as_ac_var=no"
8740fi
8741rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8742fi
409d9577 8743echo "$as_me:8743: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
8744echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8745if test `eval echo '${'$as_ac_var'}'` = yes; then
8746 cat >>confdefs.h <<EOF
8747#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4c343001 8748EOF
4c343001
DL
8749
8750fi
503d2be0
AS
8751done
8752
8753# Solaris has libkstat which does not require root.
4c343001 8754
409d9577 8755echo "$as_me:8755: checking for kstat_open in -lkstat" >&5
503d2be0
AS
8756echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
8757if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
8758 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 8759else
503d2be0
AS
8760 ac_check_lib_save_LIBS=$LIBS
8761LIBS="-lkstat $LIBS"
8762cat >conftest.$ac_ext <<_ACEOF
409d9577 8763#line 8763 "configure"
4c343001 8764#include "confdefs.h"
503d2be0 8765
4c343001 8766/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8767#ifdef __cplusplus
8768extern "C"
8769#endif
4c343001 8770/* We use char because int might match the return type of a gcc2
503d2be0
AS
8771 builtin and then its argument prototype would still apply. */
8772char kstat_open ();
8773int
8774main ()
8775{
8776kstat_open ();
8777 ;
8778 return 0;
8779}
8780_ACEOF
8781rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 8782if { (eval echo "$as_me:8782: \"$ac_link\"") >&5
503d2be0
AS
8783 (eval $ac_link) 2>&5
8784 ac_status=$?
409d9577 8785 echo "$as_me:8785: \$? = $ac_status" >&5
503d2be0
AS
8786 (exit $ac_status); } &&
8787 { ac_try='test -s conftest$ac_exeext'
409d9577 8788 { (eval echo "$as_me:8788: \"$ac_try\"") >&5
503d2be0
AS
8789 (eval $ac_try) 2>&5
8790 ac_status=$?
409d9577 8791 echo "$as_me:8791: \$? = $ac_status" >&5
503d2be0
AS
8792 (exit $ac_status); }; }; then
8793 ac_cv_lib_kstat_kstat_open=yes
4c343001 8794else
503d2be0
AS
8795 echo "$as_me: failed program was:" >&5
8796cat conftest.$ac_ext >&5
8797ac_cv_lib_kstat_kstat_open=no
4c343001 8798fi
503d2be0
AS
8799rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8800LIBS=$ac_check_lib_save_LIBS
4c343001 8801fi
409d9577 8802echo "$as_me:8802: result: $ac_cv_lib_kstat_kstat_open" >&5
503d2be0
AS
8803echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6
8804if test $ac_cv_lib_kstat_kstat_open = yes; then
8805 cat >>confdefs.h <<EOF
8806#define HAVE_LIBKSTAT 1
8807EOF
8808
8809 LIBS="-lkstat $LIBS"
8810
4c343001
DL
8811fi
8812
503d2be0 8813test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
4c343001 8814
503d2be0
AS
8815# Some systems with -lutil have (and need) -lkvm as well, some do not.
8816# On Solaris, -lkvm requires nlist from -lelf, so check that first
8817# to get the right answer into the cache.
8818# For kstat on solaris, we need libelf to force the definition of SVR4 below.
4c343001 8819if test $ac_have_func = no; then
409d9577 8820 echo "$as_me:8820: checking for elf_begin in -lelf" >&5
503d2be0
AS
8821echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
8822if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
8823 echo $ECHO_N "(cached) $ECHO_C" >&6
8824else
8825 ac_check_lib_save_LIBS=$LIBS
8826LIBS="-lelf $LIBS"
8827cat >conftest.$ac_ext <<_ACEOF
409d9577 8828#line 8828 "configure"
4c343001 8829#include "confdefs.h"
503d2be0 8830
4c343001 8831/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8832#ifdef __cplusplus
8833extern "C"
8834#endif
4c343001 8835/* We use char because int might match the return type of a gcc2
503d2be0
AS
8836 builtin and then its argument prototype would still apply. */
8837char elf_begin ();
8838int
8839main ()
8840{
8841elf_begin ();
8842 ;
8843 return 0;
8844}
8845_ACEOF
8846rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 8847if { (eval echo "$as_me:8847: \"$ac_link\"") >&5
503d2be0
AS
8848 (eval $ac_link) 2>&5
8849 ac_status=$?
409d9577 8850 echo "$as_me:8850: \$? = $ac_status" >&5
503d2be0
AS
8851 (exit $ac_status); } &&
8852 { ac_try='test -s conftest$ac_exeext'
409d9577 8853 { (eval echo "$as_me:8853: \"$ac_try\"") >&5
503d2be0
AS
8854 (eval $ac_try) 2>&5
8855 ac_status=$?
409d9577 8856 echo "$as_me:8856: \$? = $ac_status" >&5
503d2be0
AS
8857 (exit $ac_status); }; }; then
8858 ac_cv_lib_elf_elf_begin=yes
8859else
8860 echo "$as_me: failed program was:" >&5
8861cat conftest.$ac_ext >&5
8862ac_cv_lib_elf_elf_begin=no
8863fi
8864rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8865LIBS=$ac_check_lib_save_LIBS
8866fi
409d9577 8867echo "$as_me:8867: result: $ac_cv_lib_elf_elf_begin" >&5
503d2be0
AS
8868echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
8869if test $ac_cv_lib_elf_elf_begin = yes; then
8870 LIBS="-lelf $LIBS"
4c343001 8871fi
4c343001
DL
8872
8873fi
503d2be0 8874if test $ac_have_func = no; then
409d9577 8875 echo "$as_me:8875: checking for kvm_open in -lkvm" >&5
503d2be0
AS
8876echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6
8877if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
8878 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 8879else
503d2be0
AS
8880 ac_check_lib_save_LIBS=$LIBS
8881LIBS="-lkvm $LIBS"
8882cat >conftest.$ac_ext <<_ACEOF
409d9577 8883#line 8883 "configure"
503d2be0 8884#include "confdefs.h"
4c343001 8885
503d2be0
AS
8886/* Override any gcc2 internal prototype to avoid an error. */
8887#ifdef __cplusplus
8888extern "C"
8889#endif
8890/* We use char because int might match the return type of a gcc2
8891 builtin and then its argument prototype would still apply. */
8892char kvm_open ();
8893int
8894main ()
8895{
8896kvm_open ();
8897 ;
8898 return 0;
8899}
8900_ACEOF
8901rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 8902if { (eval echo "$as_me:8902: \"$ac_link\"") >&5
503d2be0
AS
8903 (eval $ac_link) 2>&5
8904 ac_status=$?
409d9577 8905 echo "$as_me:8905: \$? = $ac_status" >&5
503d2be0
AS
8906 (exit $ac_status); } &&
8907 { ac_try='test -s conftest$ac_exeext'
409d9577 8908 { (eval echo "$as_me:8908: \"$ac_try\"") >&5
503d2be0
AS
8909 (eval $ac_try) 2>&5
8910 ac_status=$?
409d9577 8911 echo "$as_me:8911: \$? = $ac_status" >&5
503d2be0
AS
8912 (exit $ac_status); }; }; then
8913 ac_cv_lib_kvm_kvm_open=yes
8914else
8915 echo "$as_me: failed program was:" >&5
8916cat conftest.$ac_ext >&5
8917ac_cv_lib_kvm_kvm_open=no
8918fi
8919rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8920LIBS=$ac_check_lib_save_LIBS
8921fi
409d9577 8922echo "$as_me:8922: result: $ac_cv_lib_kvm_kvm_open" >&5
503d2be0
AS
8923echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6
8924if test $ac_cv_lib_kvm_kvm_open = yes; then
8925 LIBS="-lkvm $LIBS"
4c343001
DL
8926fi
8927
503d2be0 8928 # Check for the 4.4BSD definition of getloadavg.
409d9577 8929 echo "$as_me:8929: checking for getloadavg in -lutil" >&5
503d2be0
AS
8930echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6
8931if test "${ac_cv_lib_util_getloadavg+set}" = set; then
8932 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 8933else
503d2be0
AS
8934 ac_check_lib_save_LIBS=$LIBS
8935LIBS="-lutil $LIBS"
8936cat >conftest.$ac_ext <<_ACEOF
409d9577 8937#line 8937 "configure"
4c343001 8938#include "confdefs.h"
503d2be0 8939
4c343001 8940/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8941#ifdef __cplusplus
8942extern "C"
8943#endif
8944/* We use char because int might match the return type of a gcc2
8945 builtin and then its argument prototype would still apply. */
8946char getloadavg ();
8947int
8948main ()
8949{
8950getloadavg ();
8951 ;
8952 return 0;
8953}
8954_ACEOF
8955rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 8956if { (eval echo "$as_me:8956: \"$ac_link\"") >&5
503d2be0
AS
8957 (eval $ac_link) 2>&5
8958 ac_status=$?
409d9577 8959 echo "$as_me:8959: \$? = $ac_status" >&5
503d2be0
AS
8960 (exit $ac_status); } &&
8961 { ac_try='test -s conftest$ac_exeext'
409d9577 8962 { (eval echo "$as_me:8962: \"$ac_try\"") >&5
503d2be0
AS
8963 (eval $ac_try) 2>&5
8964 ac_status=$?
409d9577 8965 echo "$as_me:8965: \$? = $ac_status" >&5
503d2be0
AS
8966 (exit $ac_status); }; }; then
8967 ac_cv_lib_util_getloadavg=yes
8968else
8969 echo "$as_me: failed program was:" >&5
8970cat conftest.$ac_ext >&5
8971ac_cv_lib_util_getloadavg=no
8972fi
8973rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8974LIBS=$ac_check_lib_save_LIBS
8975fi
409d9577 8976echo "$as_me:8976: result: $ac_cv_lib_util_getloadavg" >&5
503d2be0
AS
8977echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6
8978if test $ac_cv_lib_util_getloadavg = yes; then
8979 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
8980fi
8981
8982fi
8983
8984if test $ac_have_func = no; then
8985 # There is a commonly available library for RS/6000 AIX.
8986 # Since it is not a standard part of AIX, it might be installed locally.
8987 ac_getloadavg_LIBS=$LIBS
8988 LIBS="-L/usr/local/lib $LIBS"
409d9577 8989 echo "$as_me:8989: checking for getloadavg in -lgetloadavg" >&5
503d2be0
AS
8990echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6
8991if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
8992 echo $ECHO_N "(cached) $ECHO_C" >&6
8993else
8994 ac_check_lib_save_LIBS=$LIBS
8995LIBS="-lgetloadavg $LIBS"
8996cat >conftest.$ac_ext <<_ACEOF
409d9577 8997#line 8997 "configure"
503d2be0
AS
8998#include "confdefs.h"
8999
9000/* Override any gcc2 internal prototype to avoid an error. */
9001#ifdef __cplusplus
9002extern "C"
9003#endif
4c343001 9004/* We use char because int might match the return type of a gcc2
503d2be0
AS
9005 builtin and then its argument prototype would still apply. */
9006char getloadavg ();
9007int
9008main ()
9009{
9010getloadavg ();
9011 ;
9012 return 0;
9013}
9014_ACEOF
9015rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 9016if { (eval echo "$as_me:9016: \"$ac_link\"") >&5
503d2be0
AS
9017 (eval $ac_link) 2>&5
9018 ac_status=$?
409d9577 9019 echo "$as_me:9019: \$? = $ac_status" >&5
503d2be0
AS
9020 (exit $ac_status); } &&
9021 { ac_try='test -s conftest$ac_exeext'
409d9577 9022 { (eval echo "$as_me:9022: \"$ac_try\"") >&5
503d2be0
AS
9023 (eval $ac_try) 2>&5
9024 ac_status=$?
409d9577 9025 echo "$as_me:9025: \$? = $ac_status" >&5
503d2be0
AS
9026 (exit $ac_status); }; }; then
9027 ac_cv_lib_getloadavg_getloadavg=yes
9028else
9029 echo "$as_me: failed program was:" >&5
9030cat conftest.$ac_ext >&5
9031ac_cv_lib_getloadavg_getloadavg=no
9032fi
9033rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9034LIBS=$ac_check_lib_save_LIBS
9035fi
409d9577 9036echo "$as_me:9036: result: $ac_cv_lib_getloadavg_getloadavg" >&5
503d2be0
AS
9037echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6
9038if test $ac_cv_lib_getloadavg_getloadavg = yes; then
9039 LIBS="-lgetloadavg $LIBS"
9040else
9041 LIBS=$ac_getloadavg_LIBS
9042fi
9043
9044fi
9045
9046# Make sure it is really in the library, if we think we found it,
9047# otherwise set up the replacement function.
4c343001 9048
503d2be0
AS
9049for ac_func in getloadavg
9050do
9051as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
409d9577 9052echo "$as_me:9052: checking for $ac_func" >&5
503d2be0
AS
9053echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9054if eval "test \"\${$as_ac_var+set}\" = set"; then
9055 echo $ECHO_N "(cached) $ECHO_C" >&6
9056else
9057 cat >conftest.$ac_ext <<_ACEOF
409d9577 9058#line 9058 "configure"
503d2be0
AS
9059#include "confdefs.h"
9060/* System header to define __stub macros and hopefully few prototypes,
9061 which can conflict with char $ac_func (); below. */
9062#include <assert.h>
9063/* Override any gcc2 internal prototype to avoid an error. */
9064#ifdef __cplusplus
9065extern "C"
9066#endif
9067/* We use char because int might match the return type of a gcc2
9068 builtin and then its argument prototype would still apply. */
9069char $ac_func ();
9070char (*f) ();
4c343001 9071
503d2be0
AS
9072int
9073main ()
9074{
4c343001
DL
9075/* The GNU C library defines this for functions which it implements
9076 to always fail with ENOSYS. Some functions are actually named
9077 something starting with __ and the normal name is an alias. */
9078#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9079choke me
9080#else
503d2be0 9081f = $ac_func;
4c343001
DL
9082#endif
9083
503d2be0
AS
9084 ;
9085 return 0;
9086}
9087_ACEOF
9088rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 9089if { (eval echo "$as_me:9089: \"$ac_link\"") >&5
503d2be0
AS
9090 (eval $ac_link) 2>&5
9091 ac_status=$?
409d9577 9092 echo "$as_me:9092: \$? = $ac_status" >&5
503d2be0
AS
9093 (exit $ac_status); } &&
9094 { ac_try='test -s conftest$ac_exeext'
409d9577 9095 { (eval echo "$as_me:9095: \"$ac_try\"") >&5
503d2be0
AS
9096 (eval $ac_try) 2>&5
9097 ac_status=$?
409d9577 9098 echo "$as_me:9098: \$? = $ac_status" >&5
503d2be0
AS
9099 (exit $ac_status); }; }; then
9100 eval "$as_ac_var=yes"
4c343001 9101else
503d2be0
AS
9102 echo "$as_me: failed program was:" >&5
9103cat conftest.$ac_ext >&5
9104eval "$as_ac_var=no"
4c343001 9105fi
503d2be0 9106rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4c343001 9107fi
409d9577 9108echo "$as_me:9108: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
9109echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9110if test `eval echo '${'$as_ac_var'}'` = yes; then
9111 cat >>confdefs.h <<EOF
9112#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4c343001 9113EOF
4c343001 9114
503d2be0
AS
9115else
9116 LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
4c343001 9117
503d2be0
AS
9118cat >>confdefs.h <<\EOF
9119#define C_GETLOADAVG 1
4c343001
DL
9120EOF
9121
503d2be0
AS
9122# Figure out what our getloadavg.c needs.
9123ac_have_func=no
409d9577 9124echo "$as_me:9124: checking for sys/dg_sys_info.h" >&5
503d2be0
AS
9125echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
9126if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
9127 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9128else
503d2be0 9129 cat >conftest.$ac_ext <<_ACEOF
409d9577 9130#line 9130 "configure"
4c343001
DL
9131#include "confdefs.h"
9132#include <sys/dg_sys_info.h>
503d2be0 9133_ACEOF
409d9577 9134if { (eval echo "$as_me:9134: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9135 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9136 ac_status=$?
9137 egrep -v '^ *\+' conftest.er1 >conftest.err
9138 rm -f conftest.er1
9139 cat conftest.err >&5
409d9577 9140 echo "$as_me:9140: \$? = $ac_status" >&5
503d2be0
AS
9141 (exit $ac_status); } >/dev/null; then
9142 if test -s conftest.err; then
9143 ac_cpp_err=$ac_c_preproc_warn_flag
9144 else
9145 ac_cpp_err=
9146 fi
9147else
9148 ac_cpp_err=yes
9149fi
9150if test -z "$ac_cpp_err"; then
9151 ac_cv_header_sys_dg_sys_info_h=yes
4c343001 9152else
503d2be0 9153 echo "$as_me: failed program was:" >&5
4c343001 9154 cat conftest.$ac_ext >&5
503d2be0 9155 ac_cv_header_sys_dg_sys_info_h=no
4c343001 9156fi
503d2be0 9157rm -f conftest.err conftest.$ac_ext
4c343001 9158fi
409d9577 9159echo "$as_me:9159: result: $ac_cv_header_sys_dg_sys_info_h" >&5
503d2be0
AS
9160echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
9161if test $ac_cv_header_sys_dg_sys_info_h = yes; then
9162 ac_have_func=yes
9163
9164cat >>confdefs.h <<\EOF
4c343001
DL
9165#define DGUX 1
9166EOF
9167
409d9577 9168echo "$as_me:9168: checking for dg_sys_info in -ldgc" >&5
503d2be0
AS
9169echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6
9170if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
9171 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9172else
503d2be0 9173 ac_check_lib_save_LIBS=$LIBS
4c343001 9174LIBS="-ldgc $LIBS"
503d2be0 9175cat >conftest.$ac_ext <<_ACEOF
409d9577 9176#line 9176 "configure"
4c343001 9177#include "confdefs.h"
503d2be0 9178
4c343001 9179/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9180#ifdef __cplusplus
9181extern "C"
9182#endif
4c343001 9183/* We use char because int might match the return type of a gcc2
503d2be0
AS
9184 builtin and then its argument prototype would still apply. */
9185char dg_sys_info ();
9186int
9187main ()
9188{
9189dg_sys_info ();
9190 ;
9191 return 0;
9192}
9193_ACEOF
9194rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 9195if { (eval echo "$as_me:9195: \"$ac_link\"") >&5
503d2be0
AS
9196 (eval $ac_link) 2>&5
9197 ac_status=$?
409d9577 9198 echo "$as_me:9198: \$? = $ac_status" >&5
503d2be0
AS
9199 (exit $ac_status); } &&
9200 { ac_try='test -s conftest$ac_exeext'
409d9577 9201 { (eval echo "$as_me:9201: \"$ac_try\"") >&5
503d2be0
AS
9202 (eval $ac_try) 2>&5
9203 ac_status=$?
409d9577 9204 echo "$as_me:9204: \$? = $ac_status" >&5
503d2be0
AS
9205 (exit $ac_status); }; }; then
9206 ac_cv_lib_dgc_dg_sys_info=yes
9207else
9208 echo "$as_me: failed program was:" >&5
9209cat conftest.$ac_ext >&5
9210ac_cv_lib_dgc_dg_sys_info=no
9211fi
9212rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9213LIBS=$ac_check_lib_save_LIBS
9214fi
409d9577 9215echo "$as_me:9215: result: $ac_cv_lib_dgc_dg_sys_info" >&5
503d2be0
AS
9216echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6
9217if test $ac_cv_lib_dgc_dg_sys_info = yes; then
9218 cat >>confdefs.h <<EOF
9219#define HAVE_LIBDGC 1
4c343001 9220EOF
503d2be0
AS
9221
9222 LIBS="-ldgc $LIBS"
4c343001
DL
9223
9224fi
4c343001 9225
503d2be0 9226fi
4c343001 9227
409d9577 9228echo "$as_me:9228: checking for locale.h" >&5
503d2be0
AS
9229echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
9230if test "${ac_cv_header_locale_h+set}" = set; then
9231 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9232else
503d2be0 9233 cat >conftest.$ac_ext <<_ACEOF
409d9577 9234#line 9234 "configure"
503d2be0
AS
9235#include "confdefs.h"
9236#include <locale.h>
9237_ACEOF
409d9577 9238if { (eval echo "$as_me:9238: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9239 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9240 ac_status=$?
9241 egrep -v '^ *\+' conftest.er1 >conftest.err
9242 rm -f conftest.er1
9243 cat conftest.err >&5
409d9577 9244 echo "$as_me:9244: \$? = $ac_status" >&5
503d2be0
AS
9245 (exit $ac_status); } >/dev/null; then
9246 if test -s conftest.err; then
9247 ac_cpp_err=$ac_c_preproc_warn_flag
9248 else
9249 ac_cpp_err=
9250 fi
9251else
9252 ac_cpp_err=yes
4c343001 9253fi
503d2be0
AS
9254if test -z "$ac_cpp_err"; then
9255 ac_cv_header_locale_h=yes
9256else
9257 echo "$as_me: failed program was:" >&5
9258 cat conftest.$ac_ext >&5
9259 ac_cv_header_locale_h=no
9260fi
9261rm -f conftest.err conftest.$ac_ext
9262fi
409d9577 9263echo "$as_me:9263: result: $ac_cv_header_locale_h" >&5
503d2be0 9264echo "${ECHO_T}$ac_cv_header_locale_h" >&6
4c343001 9265
503d2be0
AS
9266for ac_func in setlocale
9267do
9268as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
409d9577 9269echo "$as_me:9269: checking for $ac_func" >&5
503d2be0
AS
9270echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9271if eval "test \"\${$as_ac_var+set}\" = set"; then
9272 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9273else
503d2be0 9274 cat >conftest.$ac_ext <<_ACEOF
409d9577 9275#line 9275 "configure"
503d2be0
AS
9276#include "confdefs.h"
9277/* System header to define __stub macros and hopefully few prototypes,
9278 which can conflict with char $ac_func (); below. */
9279#include <assert.h>
9280/* Override any gcc2 internal prototype to avoid an error. */
9281#ifdef __cplusplus
9282extern "C"
9283#endif
9284/* We use char because int might match the return type of a gcc2
9285 builtin and then its argument prototype would still apply. */
9286char $ac_func ();
9287char (*f) ();
9288
9289int
9290main ()
9291{
9292/* The GNU C library defines this for functions which it implements
9293 to always fail with ENOSYS. Some functions are actually named
9294 something starting with __ and the normal name is an alias. */
9295#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9296choke me
9297#else
9298f = $ac_func;
9299#endif
9300
9301 ;
9302 return 0;
9303}
9304_ACEOF
9305rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 9306if { (eval echo "$as_me:9306: \"$ac_link\"") >&5
503d2be0
AS
9307 (eval $ac_link) 2>&5
9308 ac_status=$?
409d9577 9309 echo "$as_me:9309: \$? = $ac_status" >&5
503d2be0
AS
9310 (exit $ac_status); } &&
9311 { ac_try='test -s conftest$ac_exeext'
409d9577 9312 { (eval echo "$as_me:9312: \"$ac_try\"") >&5
503d2be0
AS
9313 (eval $ac_try) 2>&5
9314 ac_status=$?
409d9577 9315 echo "$as_me:9315: \$? = $ac_status" >&5
503d2be0
AS
9316 (exit $ac_status); }; }; then
9317 eval "$as_ac_var=yes"
9318else
9319 echo "$as_me: failed program was:" >&5
9320cat conftest.$ac_ext >&5
9321eval "$as_ac_var=no"
9322fi
9323rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9324fi
409d9577 9325echo "$as_me:9325: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
9326echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9327if test `eval echo '${'$as_ac_var'}'` = yes; then
9328 cat >>confdefs.h <<EOF
9329#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9330EOF
9331
4c343001 9332fi
503d2be0 9333done
4c343001 9334
503d2be0
AS
9335# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
9336# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
9337# Irix 4.0.5F has the header but not the library.
9338if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
9339 ac_have_func=yes
4c343001 9340
503d2be0 9341cat >>confdefs.h <<\EOF
4c343001
DL
9342#define SVR4 1
9343EOF
9344
503d2be0 9345fi
4c343001 9346
503d2be0 9347if test $ac_have_func = no; then
409d9577 9348 echo "$as_me:9348: checking for inq_stats/cpustats.h" >&5
503d2be0
AS
9349echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
9350if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
9351 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9352else
503d2be0 9353 cat >conftest.$ac_ext <<_ACEOF
409d9577 9354#line 9354 "configure"
4c343001
DL
9355#include "confdefs.h"
9356#include <inq_stats/cpustats.h>
503d2be0 9357_ACEOF
409d9577 9358if { (eval echo "$as_me:9358: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9359 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9360 ac_status=$?
9361 egrep -v '^ *\+' conftest.er1 >conftest.err
9362 rm -f conftest.er1
9363 cat conftest.err >&5
409d9577 9364 echo "$as_me:9364: \$? = $ac_status" >&5
503d2be0
AS
9365 (exit $ac_status); } >/dev/null; then
9366 if test -s conftest.err; then
9367 ac_cpp_err=$ac_c_preproc_warn_flag
9368 else
9369 ac_cpp_err=
9370 fi
9371else
9372 ac_cpp_err=yes
9373fi
9374if test -z "$ac_cpp_err"; then
9375 ac_cv_header_inq_stats_cpustats_h=yes
4c343001 9376else
503d2be0 9377 echo "$as_me: failed program was:" >&5
4c343001 9378 cat conftest.$ac_ext >&5
503d2be0 9379 ac_cv_header_inq_stats_cpustats_h=no
4c343001 9380fi
503d2be0 9381rm -f conftest.err conftest.$ac_ext
4c343001 9382fi
409d9577 9383echo "$as_me:9383: result: $ac_cv_header_inq_stats_cpustats_h" >&5
503d2be0
AS
9384echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
9385if test $ac_cv_header_inq_stats_cpustats_h = yes; then
9386 ac_have_func=yes
9387
9388cat >>confdefs.h <<\EOF
4c343001
DL
9389#define UMAX 1
9390EOF
9391
503d2be0 9392cat >>confdefs.h <<\EOF
4c343001
DL
9393#define UMAX4_3 1
9394EOF
9395
4c343001
DL
9396fi
9397
503d2be0 9398fi
4c343001 9399
503d2be0 9400if test $ac_have_func = no; then
409d9577 9401 echo "$as_me:9401: checking for sys/cpustats.h" >&5
503d2be0
AS
9402echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
9403if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
9404 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9405else
503d2be0 9406 cat >conftest.$ac_ext <<_ACEOF
409d9577 9407#line 9407 "configure"
4c343001
DL
9408#include "confdefs.h"
9409#include <sys/cpustats.h>
503d2be0 9410_ACEOF
409d9577 9411if { (eval echo "$as_me:9411: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9412 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9413 ac_status=$?
9414 egrep -v '^ *\+' conftest.er1 >conftest.err
9415 rm -f conftest.er1
9416 cat conftest.err >&5
409d9577 9417 echo "$as_me:9417: \$? = $ac_status" >&5
503d2be0
AS
9418 (exit $ac_status); } >/dev/null; then
9419 if test -s conftest.err; then
9420 ac_cpp_err=$ac_c_preproc_warn_flag
9421 else
9422 ac_cpp_err=
9423 fi
4c343001 9424else
503d2be0
AS
9425 ac_cpp_err=yes
9426fi
9427if test -z "$ac_cpp_err"; then
9428 ac_cv_header_sys_cpustats_h=yes
9429else
9430 echo "$as_me: failed program was:" >&5
4c343001 9431 cat conftest.$ac_ext >&5
503d2be0 9432 ac_cv_header_sys_cpustats_h=no
4c343001 9433fi
503d2be0 9434rm -f conftest.err conftest.$ac_ext
4c343001 9435fi
409d9577 9436echo "$as_me:9436: result: $ac_cv_header_sys_cpustats_h" >&5
503d2be0
AS
9437echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
9438if test $ac_cv_header_sys_cpustats_h = yes; then
9439 ac_have_func=yes; cat >>confdefs.h <<\EOF
4c343001
DL
9440#define UMAX 1
9441EOF
9442
4c343001
DL
9443fi
9444
503d2be0 9445fi
4c343001 9446
503d2be0
AS
9447if test $ac_have_func = no; then
9448
9449for ac_header in mach/mach.h
4c343001 9450do
503d2be0 9451as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
409d9577 9452echo "$as_me:9452: checking for $ac_header" >&5
503d2be0
AS
9453echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9454if eval "test \"\${$as_ac_Header+set}\" = set"; then
9455 echo $ECHO_N "(cached) $ECHO_C" >&6
9456else
9457 cat >conftest.$ac_ext <<_ACEOF
409d9577 9458#line 9458 "configure"
503d2be0
AS
9459#include "confdefs.h"
9460#include <$ac_header>
9461_ACEOF
409d9577 9462if { (eval echo "$as_me:9462: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9463 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9464 ac_status=$?
9465 egrep -v '^ *\+' conftest.er1 >conftest.err
9466 rm -f conftest.er1
9467 cat conftest.err >&5
409d9577 9468 echo "$as_me:9468: \$? = $ac_status" >&5
503d2be0
AS
9469 (exit $ac_status); } >/dev/null; then
9470 if test -s conftest.err; then
9471 ac_cpp_err=$ac_c_preproc_warn_flag
9472 else
9473 ac_cpp_err=
9474 fi
9475else
9476 ac_cpp_err=yes
9477fi
9478if test -z "$ac_cpp_err"; then
9479 eval "$as_ac_Header=yes"
9480else
9481 echo "$as_me: failed program was:" >&5
4c343001 9482 cat conftest.$ac_ext >&5
503d2be0 9483 eval "$as_ac_Header=no"
4c343001 9484fi
503d2be0 9485rm -f conftest.err conftest.$ac_ext
4c343001 9486fi
409d9577 9487echo "$as_me:9487: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
9488echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9489if test `eval echo '${'$as_ac_Header'}'` = yes; then
9490 cat >>confdefs.h <<EOF
9491#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4c343001 9492EOF
503d2be0 9493
4c343001
DL
9494fi
9495done
9496
503d2be0 9497fi
4c343001 9498
503d2be0
AS
9499for ac_header in nlist.h
9500do
9501as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
409d9577 9502echo "$as_me:9502: checking for $ac_header" >&5
503d2be0
AS
9503echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9504if eval "test \"\${$as_ac_Header+set}\" = set"; then
9505 echo $ECHO_N "(cached) $ECHO_C" >&6
9506else
9507 cat >conftest.$ac_ext <<_ACEOF
409d9577 9508#line 9508 "configure"
503d2be0
AS
9509#include "confdefs.h"
9510#include <$ac_header>
9511_ACEOF
409d9577 9512if { (eval echo "$as_me:9512: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9513 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9514 ac_status=$?
9515 egrep -v '^ *\+' conftest.er1 >conftest.err
9516 rm -f conftest.er1
9517 cat conftest.err >&5
409d9577 9518 echo "$as_me:9518: \$? = $ac_status" >&5
503d2be0
AS
9519 (exit $ac_status); } >/dev/null; then
9520 if test -s conftest.err; then
9521 ac_cpp_err=$ac_c_preproc_warn_flag
9522 else
9523 ac_cpp_err=
9524 fi
4c343001 9525else
503d2be0
AS
9526 ac_cpp_err=yes
9527fi
9528if test -z "$ac_cpp_err"; then
9529 eval "$as_ac_Header=yes"
4c343001 9530else
503d2be0 9531 echo "$as_me: failed program was:" >&5
4c343001 9532 cat conftest.$ac_ext >&5
503d2be0 9533 eval "$as_ac_Header=no"
4c343001 9534fi
503d2be0 9535rm -f conftest.err conftest.$ac_ext
4c343001 9536fi
409d9577 9537echo "$as_me:9537: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
9538echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9539if test `eval echo '${'$as_ac_Header'}'` = yes; then
9540 cat >>confdefs.h <<EOF
9541#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4c343001 9542EOF
409d9577 9543 echo "$as_me:9543: checking for struct nlist.n_un.n_name" >&5
503d2be0
AS
9544echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6
9545if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
9546 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9547else
503d2be0 9548 cat >conftest.$ac_ext <<_ACEOF
409d9577 9549#line 9549 "configure"
4c343001
DL
9550#include "confdefs.h"
9551#include <nlist.h>
4c343001 9552
503d2be0
AS
9553int
9554main ()
9555{
9556static struct nlist ac_aggr;
9557if (ac_aggr.n_un.n_name)
9558return 0;
9559 ;
9560 return 0;
9561}
9562_ACEOF
9563rm -f conftest.$ac_objext
409d9577 9564if { (eval echo "$as_me:9564: \"$ac_compile\"") >&5
503d2be0
AS
9565 (eval $ac_compile) 2>&5
9566 ac_status=$?
409d9577 9567 echo "$as_me:9567: \$? = $ac_status" >&5
503d2be0
AS
9568 (exit $ac_status); } &&
9569 { ac_try='test -s conftest.$ac_objext'
409d9577 9570 { (eval echo "$as_me:9570: \"$ac_try\"") >&5
503d2be0
AS
9571 (eval $ac_try) 2>&5
9572 ac_status=$?
409d9577 9573 echo "$as_me:9573: \$? = $ac_status" >&5
503d2be0
AS
9574 (exit $ac_status); }; }; then
9575 ac_cv_member_struct_nlist_n_un_n_name=yes
9576else
9577 echo "$as_me: failed program was:" >&5
9578cat conftest.$ac_ext >&5
9579ac_cv_member_struct_nlist_n_un_n_name=no
9580fi
9581rm -f conftest.$ac_objext conftest.$ac_ext
9582fi
409d9577 9583echo "$as_me:9583: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
503d2be0
AS
9584echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6
9585if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
9586
9587cat >>confdefs.h <<EOF
9588#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
9589EOF
9590
9591cat >>confdefs.h <<\EOF
4c343001
DL
9592#define NLIST_NAME_UNION 1
9593EOF
9594
4c343001 9595fi
503d2be0
AS
9596
9597fi
9598done
9599
9600fi
9601done
4c343001
DL
9602
9603# Some definitions of getloadavg require that the program be installed setgid.
409d9577 9604echo "$as_me:9604: checking whether getloadavg requires setgid" >&5
503d2be0
AS
9605echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6
9606if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
9607 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9608else
503d2be0 9609 cat >conftest.$ac_ext <<_ACEOF
409d9577 9610#line 9610 "configure"
4c343001
DL
9611#include "confdefs.h"
9612#include "$srcdir/getloadavg.c"
9613#ifdef LDAV_PRIVILEGED
9614Yowza Am I SETGID yet
9615#endif
503d2be0 9616_ACEOF
4c343001
DL
9617if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9618 egrep "Yowza Am I SETGID yet" >/dev/null 2>&1; then
4c343001
DL
9619 ac_cv_func_getloadavg_setgid=yes
9620else
4c343001
DL
9621 ac_cv_func_getloadavg_setgid=no
9622fi
9623rm -f conftest*
9624
9625fi
409d9577 9626echo "$as_me:9626: result: $ac_cv_func_getloadavg_setgid" >&5
503d2be0 9627echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6
4c343001 9628if test $ac_cv_func_getloadavg_setgid = yes; then
503d2be0
AS
9629 NEED_SETGID=true
9630
9631cat >>confdefs.h <<\EOF
4c343001
DL
9632#define GETLOADAVG_PRIVILEGED 1
9633EOF
9634
9635else
9636 NEED_SETGID=false
9637fi
9638
9639if test $ac_cv_func_getloadavg_setgid = yes; then
409d9577 9640 echo "$as_me:9640: checking group of /dev/kmem" >&5
503d2be0
AS
9641echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6
9642if test "${ac_cv_group_kmem+set}" = set; then
9643 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9644else
503d2be0 9645 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
4c343001
DL
9646 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
9647 # If we got an error (system does not support symlinks), try without -L.
9648 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
9649 ac_cv_group_kmem=`echo $ac_ls_output \
9650 | sed -ne 's/[ ][ ]*/ /g;
9651 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
9652 / /s/.* //;p;'`
9653
9654fi
409d9577 9655echo "$as_me:9655: result: $ac_cv_group_kmem" >&5
503d2be0 9656echo "${ECHO_T}$ac_cv_group_kmem" >&6
4c343001
DL
9657 KMEM_GROUP=$ac_cv_group_kmem
9658fi
503d2be0
AS
9659if test "x$ac_save_LIBS" = x; then
9660 GETLOADAVG_LIBS=$LIBS
9661else
9662 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
9663fi
9664LIBS=$ac_save_LIBS
4c343001 9665
409d9577 9666echo "$as_me:9666: checking for _LARGEFILE_SOURCE value needed for large files" >&5
503d2be0
AS
9667echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9668if test "${ac_cv_sys_largefile_source+set}" = set; then
9669 echo $ECHO_N "(cached) $ECHO_C" >&6
d42122a3 9670else
503d2be0 9671 while :; do
169fe44e 9672 ac_cv_sys_largefile_source=no
503d2be0 9673 cat >conftest.$ac_ext <<_ACEOF
409d9577 9674#line 9674 "configure"
169fe44e
GM
9675#include "confdefs.h"
9676#include <stdio.h>
503d2be0
AS
9677int
9678main ()
9679{
169fe44e 9680return !fseeko;
503d2be0
AS
9681 ;
9682 return 0;
9683}
9684_ACEOF
9685rm -f conftest.$ac_objext
409d9577 9686if { (eval echo "$as_me:9686: \"$ac_compile\"") >&5
503d2be0
AS
9687 (eval $ac_compile) 2>&5
9688 ac_status=$?
409d9577 9689 echo "$as_me:9689: \$? = $ac_status" >&5
503d2be0
AS
9690 (exit $ac_status); } &&
9691 { ac_try='test -s conftest.$ac_objext'
409d9577 9692 { (eval echo "$as_me:9692: \"$ac_try\"") >&5
503d2be0
AS
9693 (eval $ac_try) 2>&5
9694 ac_status=$?
409d9577 9695 echo "$as_me:9695: \$? = $ac_status" >&5
503d2be0
AS
9696 (exit $ac_status); }; }; then
9697 break
169fe44e 9698else
503d2be0
AS
9699 echo "$as_me: failed program was:" >&5
9700cat conftest.$ac_ext >&5
9701fi
9702rm -f conftest.$ac_objext conftest.$ac_ext
9703 cat >conftest.$ac_ext <<_ACEOF
409d9577 9704#line 9704 "configure"
d42122a3 9705#include "confdefs.h"
169fe44e
GM
9706#define _LARGEFILE_SOURCE 1
9707#include <stdio.h>
503d2be0
AS
9708int
9709main ()
9710{
169fe44e 9711return !fseeko;
503d2be0
AS
9712 ;
9713 return 0;
9714}
9715_ACEOF
9716rm -f conftest.$ac_objext
409d9577 9717if { (eval echo "$as_me:9717: \"$ac_compile\"") >&5
503d2be0
AS
9718 (eval $ac_compile) 2>&5
9719 ac_status=$?
409d9577 9720 echo "$as_me:9720: \$? = $ac_status" >&5
503d2be0
AS
9721 (exit $ac_status); } &&
9722 { ac_try='test -s conftest.$ac_objext'
409d9577 9723 { (eval echo "$as_me:9723: \"$ac_try\"") >&5
503d2be0
AS
9724 (eval $ac_try) 2>&5
9725 ac_status=$?
409d9577 9726 echo "$as_me:9726: \$? = $ac_status" >&5
503d2be0
AS
9727 (exit $ac_status); }; }; then
9728 ac_cv_sys_largefile_source=1; break
9729else
9730 echo "$as_me: failed program was:" >&5
9731cat conftest.$ac_ext >&5
9732fi
9733rm -f conftest.$ac_objext conftest.$ac_ext
9734 break
9735done
d42122a3 9736fi
409d9577 9737echo "$as_me:9737: result: $ac_cv_sys_largefile_source" >&5
503d2be0
AS
9738echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9739if test "$ac_cv_sys_largefile_source" != no; then
d42122a3 9740
503d2be0 9741cat >>confdefs.h <<EOF
169fe44e 9742#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
d42122a3 9743EOF
169fe44e 9744
503d2be0
AS
9745fi
9746rm -f conftest*
169fe44e 9747
503d2be0
AS
9748# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9749# in glibc 2.1.3, but that breaks too many other things.
9750# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
409d9577 9751echo "$as_me:9751: checking for fseeko" >&5
503d2be0
AS
9752echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9753if test "${ac_cv_func_fseeko+set}" = set; then
9754 echo $ECHO_N "(cached) $ECHO_C" >&6
d42122a3 9755else
503d2be0 9756 cat >conftest.$ac_ext <<_ACEOF
409d9577 9757#line 9757 "configure"
169fe44e
GM
9758#include "confdefs.h"
9759#include <stdio.h>
503d2be0
AS
9760int
9761main ()
9762{
169fe44e 9763return fseeko && fseeko (stdin, 0, 0);
503d2be0
AS
9764 ;
9765 return 0;
9766}
9767_ACEOF
9768rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 9769if { (eval echo "$as_me:9769: \"$ac_link\"") >&5
503d2be0
AS
9770 (eval $ac_link) 2>&5
9771 ac_status=$?
409d9577 9772 echo "$as_me:9772: \$? = $ac_status" >&5
503d2be0
AS
9773 (exit $ac_status); } &&
9774 { ac_try='test -s conftest$ac_exeext'
409d9577 9775 { (eval echo "$as_me:9775: \"$ac_try\"") >&5
503d2be0
AS
9776 (eval $ac_try) 2>&5
9777 ac_status=$?
409d9577 9778 echo "$as_me:9778: \$? = $ac_status" >&5
503d2be0 9779 (exit $ac_status); }; }; then
169fe44e
GM
9780 ac_cv_func_fseeko=yes
9781else
503d2be0
AS
9782 echo "$as_me: failed program was:" >&5
9783cat conftest.$ac_ext >&5
9784ac_cv_func_fseeko=no
169fe44e 9785fi
503d2be0 9786rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
d42122a3 9787fi
409d9577 9788echo "$as_me:9788: result: $ac_cv_func_fseeko" >&5
503d2be0
AS
9789echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9790if test $ac_cv_func_fseeko = yes; then
d42122a3 9791
503d2be0 9792cat >>confdefs.h <<\EOF
169fe44e
GM
9793#define HAVE_FSEEKO 1
9794EOF
9795
503d2be0 9796fi
d42122a3 9797
169fe44e 9798# UNIX98 PTYs.
503d2be0 9799
087121cc
GM
9800for ac_func in grantpt
9801do
503d2be0 9802as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
409d9577 9803echo "$as_me:9803: checking for $ac_func" >&5
503d2be0
AS
9804echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9805if eval "test \"\${$as_ac_var+set}\" = set"; then
9806 echo $ECHO_N "(cached) $ECHO_C" >&6
087121cc 9807else
503d2be0 9808 cat >conftest.$ac_ext <<_ACEOF
409d9577 9809#line 9809 "configure"
087121cc
GM
9810#include "confdefs.h"
9811/* System header to define __stub macros and hopefully few prototypes,
503d2be0 9812 which can conflict with char $ac_func (); below. */
087121cc
GM
9813#include <assert.h>
9814/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9815#ifdef __cplusplus
9816extern "C"
9817#endif
087121cc 9818/* We use char because int might match the return type of a gcc2
503d2be0
AS
9819 builtin and then its argument prototype would still apply. */
9820char $ac_func ();
9821char (*f) ();
087121cc 9822
503d2be0
AS
9823int
9824main ()
9825{
087121cc
GM
9826/* The GNU C library defines this for functions which it implements
9827 to always fail with ENOSYS. Some functions are actually named
9828 something starting with __ and the normal name is an alias. */
9829#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9830choke me
9831#else
503d2be0 9832f = $ac_func;
087121cc
GM
9833#endif
9834
503d2be0
AS
9835 ;
9836 return 0;
9837}
9838_ACEOF
9839rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 9840if { (eval echo "$as_me:9840: \"$ac_link\"") >&5
503d2be0
AS
9841 (eval $ac_link) 2>&5
9842 ac_status=$?
409d9577 9843 echo "$as_me:9843: \$? = $ac_status" >&5
503d2be0
AS
9844 (exit $ac_status); } &&
9845 { ac_try='test -s conftest$ac_exeext'
409d9577 9846 { (eval echo "$as_me:9846: \"$ac_try\"") >&5
503d2be0
AS
9847 (eval $ac_try) 2>&5
9848 ac_status=$?
409d9577 9849 echo "$as_me:9849: \$? = $ac_status" >&5
503d2be0
AS
9850 (exit $ac_status); }; }; then
9851 eval "$as_ac_var=yes"
9852else
9853 echo "$as_me: failed program was:" >&5
9854cat conftest.$ac_ext >&5
9855eval "$as_ac_var=no"
9856fi
9857rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9858fi
409d9577 9859echo "$as_me:9859: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
9860echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9861if test `eval echo '${'$as_ac_var'}'` = yes; then
9862 cat >>confdefs.h <<EOF
9863#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
087121cc 9864EOF
087121cc 9865
087121cc
GM
9866fi
9867done
9868
087121cc 9869# PTY-related GNU extensions.
503d2be0 9870
087121cc
GM
9871for ac_func in getpt
9872do
503d2be0 9873as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
409d9577 9874echo "$as_me:9874: checking for $ac_func" >&5
503d2be0
AS
9875echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9876if eval "test \"\${$as_ac_var+set}\" = set"; then
9877 echo $ECHO_N "(cached) $ECHO_C" >&6
087121cc 9878else
503d2be0 9879 cat >conftest.$ac_ext <<_ACEOF
409d9577 9880#line 9880 "configure"
087121cc
GM
9881#include "confdefs.h"
9882/* System header to define __stub macros and hopefully few prototypes,
503d2be0 9883 which can conflict with char $ac_func (); below. */
087121cc
GM
9884#include <assert.h>
9885/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9886#ifdef __cplusplus
9887extern "C"
9888#endif
087121cc 9889/* We use char because int might match the return type of a gcc2
503d2be0
AS
9890 builtin and then its argument prototype would still apply. */
9891char $ac_func ();
9892char (*f) ();
087121cc 9893
503d2be0
AS
9894int
9895main ()
9896{
087121cc
GM
9897/* The GNU C library defines this for functions which it implements
9898 to always fail with ENOSYS. Some functions are actually named
9899 something starting with __ and the normal name is an alias. */
9900#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9901choke me
9902#else
503d2be0 9903f = $ac_func;
087121cc
GM
9904#endif
9905
503d2be0
AS
9906 ;
9907 return 0;
9908}
9909_ACEOF
9910rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 9911if { (eval echo "$as_me:9911: \"$ac_link\"") >&5
503d2be0
AS
9912 (eval $ac_link) 2>&5
9913 ac_status=$?
409d9577 9914 echo "$as_me:9914: \$? = $ac_status" >&5
503d2be0
AS
9915 (exit $ac_status); } &&
9916 { ac_try='test -s conftest$ac_exeext'
409d9577 9917 { (eval echo "$as_me:9917: \"$ac_try\"") >&5
503d2be0
AS
9918 (eval $ac_try) 2>&5
9919 ac_status=$?
409d9577 9920 echo "$as_me:9920: \$? = $ac_status" >&5
503d2be0
AS
9921 (exit $ac_status); }; }; then
9922 eval "$as_ac_var=yes"
9923else
9924 echo "$as_me: failed program was:" >&5
9925cat conftest.$ac_ext >&5
9926eval "$as_ac_var=no"
9927fi
9928rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9929fi
409d9577 9930echo "$as_me:9930: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
9931echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9932if test `eval echo '${'$as_ac_var'}'` = yes; then
9933 cat >>confdefs.h <<EOF
9934#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
087121cc 9935EOF
087121cc 9936
087121cc
GM
9937fi
9938done
9939
ba4481b5
DL
9940# Check this now, so that we will NOT find the above functions in ncurses.
9941# That is because we have not set up to link ncurses in lib-src.
9942# It's better to believe a function is not available
9943# than to expect to find it in ncurses.
503d2be0 9944
409d9577 9945echo "$as_me:9945: checking for tparm in -lncurses" >&5
503d2be0
AS
9946echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6
9947if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
9948 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9949else
503d2be0 9950 ac_check_lib_save_LIBS=$LIBS
ba4481b5 9951LIBS="-lncurses $LIBS"
503d2be0 9952cat >conftest.$ac_ext <<_ACEOF
409d9577 9953#line 9953 "configure"
ba4481b5 9954#include "confdefs.h"
503d2be0 9955
ba4481b5 9956/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9957#ifdef __cplusplus
9958extern "C"
9959#endif
ba4481b5 9960/* We use char because int might match the return type of a gcc2
503d2be0
AS
9961 builtin and then its argument prototype would still apply. */
9962char tparm ();
9963int
9964main ()
9965{
9966tparm ();
9967 ;
9968 return 0;
9969}
9970_ACEOF
9971rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 9972if { (eval echo "$as_me:9972: \"$ac_link\"") >&5
503d2be0
AS
9973 (eval $ac_link) 2>&5
9974 ac_status=$?
409d9577 9975 echo "$as_me:9975: \$? = $ac_status" >&5
503d2be0
AS
9976 (exit $ac_status); } &&
9977 { ac_try='test -s conftest$ac_exeext'
409d9577 9978 { (eval echo "$as_me:9978: \"$ac_try\"") >&5
503d2be0
AS
9979 (eval $ac_try) 2>&5
9980 ac_status=$?
409d9577 9981 echo "$as_me:9981: \$? = $ac_status" >&5
503d2be0
AS
9982 (exit $ac_status); }; }; then
9983 ac_cv_lib_ncurses_tparm=yes
9984else
9985 echo "$as_me: failed program was:" >&5
9986cat conftest.$ac_ext >&5
9987ac_cv_lib_ncurses_tparm=no
9988fi
9989rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9990LIBS=$ac_check_lib_save_LIBS
9991fi
409d9577 9992echo "$as_me:9992: result: $ac_cv_lib_ncurses_tparm" >&5
503d2be0
AS
9993echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6
9994if test $ac_cv_lib_ncurses_tparm = yes; then
9995 cat >>confdefs.h <<EOF
9996#define HAVE_LIBNCURSES 1
ba4481b5
DL
9997EOF
9998
9999 LIBS="-lncurses $LIBS"
10000
ba4481b5
DL
10001fi
10002
84e70f78
KR
10003# Do we need the Hesiod library to provide the support routines?
10004if test "$with_hesiod" = yes ; then
10005 # Don't set $LIBS here -- see comments above.
10006 resolv=no
409d9577 10007 echo "$as_me:10007: checking for res_send" >&5
84e70f78
KR
10008echo $ECHO_N "checking for res_send... $ECHO_C" >&6
10009if test "${ac_cv_func_res_send+set}" = set; then
10010 echo $ECHO_N "(cached) $ECHO_C" >&6
10011else
10012 cat >conftest.$ac_ext <<_ACEOF
409d9577 10013#line 10013 "configure"
84e70f78
KR
10014#include "confdefs.h"
10015/* System header to define __stub macros and hopefully few prototypes,
10016 which can conflict with char res_send (); below. */
10017#include <assert.h>
10018/* Override any gcc2 internal prototype to avoid an error. */
10019#ifdef __cplusplus
10020extern "C"
10021#endif
10022/* We use char because int might match the return type of a gcc2
10023 builtin and then its argument prototype would still apply. */
10024char res_send ();
10025char (*f) ();
10026
10027int
10028main ()
10029{
10030/* The GNU C library defines this for functions which it implements
10031 to always fail with ENOSYS. Some functions are actually named
10032 something starting with __ and the normal name is an alias. */
10033#if defined (__stub_res_send) || defined (__stub___res_send)
10034choke me
10035#else
10036f = res_send;
10037#endif
10038
10039 ;
10040 return 0;
10041}
10042_ACEOF
10043rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 10044if { (eval echo "$as_me:10044: \"$ac_link\"") >&5
84e70f78
KR
10045 (eval $ac_link) 2>&5
10046 ac_status=$?
409d9577 10047 echo "$as_me:10047: \$? = $ac_status" >&5
84e70f78
KR
10048 (exit $ac_status); } &&
10049 { ac_try='test -s conftest$ac_exeext'
409d9577 10050 { (eval echo "$as_me:10050: \"$ac_try\"") >&5
84e70f78
KR
10051 (eval $ac_try) 2>&5
10052 ac_status=$?
409d9577 10053 echo "$as_me:10053: \$? = $ac_status" >&5
84e70f78
KR
10054 (exit $ac_status); }; }; then
10055 ac_cv_func_res_send=yes
10056else
10057 echo "$as_me: failed program was:" >&5
10058cat conftest.$ac_ext >&5
10059ac_cv_func_res_send=no
10060fi
10061rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10062fi
409d9577 10063echo "$as_me:10063: result: $ac_cv_func_res_send" >&5
84e70f78
KR
10064echo "${ECHO_T}$ac_cv_func_res_send" >&6
10065if test $ac_cv_func_res_send = yes; then
10066 :
10067else
409d9577 10068 echo "$as_me:10068: checking for __res_send" >&5
84e70f78
KR
10069echo $ECHO_N "checking for __res_send... $ECHO_C" >&6
10070if test "${ac_cv_func___res_send+set}" = set; then
10071 echo $ECHO_N "(cached) $ECHO_C" >&6
10072else
10073 cat >conftest.$ac_ext <<_ACEOF
409d9577 10074#line 10074 "configure"
84e70f78
KR
10075#include "confdefs.h"
10076/* System header to define __stub macros and hopefully few prototypes,
10077 which can conflict with char __res_send (); below. */
10078#include <assert.h>
10079/* Override any gcc2 internal prototype to avoid an error. */
10080#ifdef __cplusplus
10081extern "C"
10082#endif
10083/* We use char because int might match the return type of a gcc2
10084 builtin and then its argument prototype would still apply. */
10085char __res_send ();
10086char (*f) ();
10087
10088int
10089main ()
10090{
10091/* The GNU C library defines this for functions which it implements
10092 to always fail with ENOSYS. Some functions are actually named
10093 something starting with __ and the normal name is an alias. */
10094#if defined (__stub___res_send) || defined (__stub_____res_send)
10095choke me
10096#else
10097f = __res_send;
10098#endif
10099
10100 ;
10101 return 0;
10102}
10103_ACEOF
10104rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 10105if { (eval echo "$as_me:10105: \"$ac_link\"") >&5
84e70f78
KR
10106 (eval $ac_link) 2>&5
10107 ac_status=$?
409d9577 10108 echo "$as_me:10108: \$? = $ac_status" >&5
84e70f78
KR
10109 (exit $ac_status); } &&
10110 { ac_try='test -s conftest$ac_exeext'
409d9577 10111 { (eval echo "$as_me:10111: \"$ac_try\"") >&5
84e70f78
KR
10112 (eval $ac_try) 2>&5
10113 ac_status=$?
409d9577 10114 echo "$as_me:10114: \$? = $ac_status" >&5
84e70f78
KR
10115 (exit $ac_status); }; }; then
10116 ac_cv_func___res_send=yes
10117else
10118 echo "$as_me: failed program was:" >&5
10119cat conftest.$ac_ext >&5
10120ac_cv_func___res_send=no
10121fi
10122rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10123fi
409d9577 10124echo "$as_me:10124: result: $ac_cv_func___res_send" >&5
84e70f78
KR
10125echo "${ECHO_T}$ac_cv_func___res_send" >&6
10126if test $ac_cv_func___res_send = yes; then
10127 :
10128else
409d9577 10129 echo "$as_me:10129: checking for res_send in -lresolv" >&5
84e70f78
KR
10130echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6
10131if test "${ac_cv_lib_resolv_res_send+set}" = set; then
10132 echo $ECHO_N "(cached) $ECHO_C" >&6
10133else
10134 ac_check_lib_save_LIBS=$LIBS
10135LIBS="-lresolv $LIBS"
10136cat >conftest.$ac_ext <<_ACEOF
409d9577 10137#line 10137 "configure"
84e70f78
KR
10138#include "confdefs.h"
10139
10140/* Override any gcc2 internal prototype to avoid an error. */
10141#ifdef __cplusplus
10142extern "C"
10143#endif
10144/* We use char because int might match the return type of a gcc2
10145 builtin and then its argument prototype would still apply. */
10146char res_send ();
10147int
10148main ()
10149{
10150res_send ();
10151 ;
10152 return 0;
10153}
10154_ACEOF
10155rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 10156if { (eval echo "$as_me:10156: \"$ac_link\"") >&5
84e70f78
KR
10157 (eval $ac_link) 2>&5
10158 ac_status=$?
409d9577 10159 echo "$as_me:10159: \$? = $ac_status" >&5
84e70f78
KR
10160 (exit $ac_status); } &&
10161 { ac_try='test -s conftest$ac_exeext'
409d9577 10162 { (eval echo "$as_me:10162: \"$ac_try\"") >&5
84e70f78
KR
10163 (eval $ac_try) 2>&5
10164 ac_status=$?
409d9577 10165 echo "$as_me:10165: \$? = $ac_status" >&5
84e70f78
KR
10166 (exit $ac_status); }; }; then
10167 ac_cv_lib_resolv_res_send=yes
10168else
10169 echo "$as_me: failed program was:" >&5
10170cat conftest.$ac_ext >&5
10171ac_cv_lib_resolv_res_send=no
10172fi
10173rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10174LIBS=$ac_check_lib_save_LIBS
10175fi
409d9577 10176echo "$as_me:10176: result: $ac_cv_lib_resolv_res_send" >&5
84e70f78
KR
10177echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6
10178if test $ac_cv_lib_resolv_res_send = yes; then
10179 resolv=yes
10180else
409d9577 10181 echo "$as_me:10181: checking for __res_send in -lresolv" >&5
84e70f78
KR
10182echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6
10183if test "${ac_cv_lib_resolv___res_send+set}" = set; then
10184 echo $ECHO_N "(cached) $ECHO_C" >&6
10185else
10186 ac_check_lib_save_LIBS=$LIBS
10187LIBS="-lresolv $LIBS"
10188cat >conftest.$ac_ext <<_ACEOF
409d9577 10189#line 10189 "configure"
84e70f78
KR
10190#include "confdefs.h"
10191
10192/* Override any gcc2 internal prototype to avoid an error. */
10193#ifdef __cplusplus
10194extern "C"
10195#endif
10196/* We use char because int might match the return type of a gcc2
10197 builtin and then its argument prototype would still apply. */
10198char __res_send ();
10199int
10200main ()
10201{
10202__res_send ();
10203 ;
10204 return 0;
10205}
10206_ACEOF
10207rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 10208if { (eval echo "$as_me:10208: \"$ac_link\"") >&5
84e70f78
KR
10209 (eval $ac_link) 2>&5
10210 ac_status=$?
409d9577 10211 echo "$as_me:10211: \$? = $ac_status" >&5
84e70f78
KR
10212 (exit $ac_status); } &&
10213 { ac_try='test -s conftest$ac_exeext'
409d9577 10214 { (eval echo "$as_me:10214: \"$ac_try\"") >&5
84e70f78
KR
10215 (eval $ac_try) 2>&5
10216 ac_status=$?
409d9577 10217 echo "$as_me:10217: \$? = $ac_status" >&5
84e70f78
KR
10218 (exit $ac_status); }; }; then
10219 ac_cv_lib_resolv___res_send=yes
10220else
10221 echo "$as_me: failed program was:" >&5
10222cat conftest.$ac_ext >&5
10223ac_cv_lib_resolv___res_send=no
10224fi
10225rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10226LIBS=$ac_check_lib_save_LIBS
10227fi
409d9577 10228echo "$as_me:10228: result: $ac_cv_lib_resolv___res_send" >&5
84e70f78
KR
10229echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6
10230if test $ac_cv_lib_resolv___res_send = yes; then
10231 resolv=yes
10232fi
10233
10234fi
10235
10236fi
10237
10238fi
10239
10240 if test "$resolv" = yes ; then
10241 RESOLVLIB=-lresolv
10242 cat >>confdefs.h <<\EOF
10243#define HAVE_LIBRESOLV 1
10244EOF
10245
10246 else
10247 RESOLVLIB=
10248 fi
409d9577 10249 echo "$as_me:10249: checking for hes_getmailhost" >&5
84e70f78
KR
10250echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6
10251if test "${ac_cv_func_hes_getmailhost+set}" = set; then
10252 echo $ECHO_N "(cached) $ECHO_C" >&6
10253else
10254 cat >conftest.$ac_ext <<_ACEOF
409d9577 10255#line 10255 "configure"
84e70f78
KR
10256#include "confdefs.h"
10257/* System header to define __stub macros and hopefully few prototypes,
10258 which can conflict with char hes_getmailhost (); below. */
10259#include <assert.h>
10260/* Override any gcc2 internal prototype to avoid an error. */
10261#ifdef __cplusplus
10262extern "C"
10263#endif
10264/* We use char because int might match the return type of a gcc2
10265 builtin and then its argument prototype would still apply. */
10266char hes_getmailhost ();
10267char (*f) ();
10268
10269int
10270main ()
10271{
10272/* The GNU C library defines this for functions which it implements
10273 to always fail with ENOSYS. Some functions are actually named
10274 something starting with __ and the normal name is an alias. */
10275#if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
10276choke me
10277#else
10278f = hes_getmailhost;
10279#endif
10280
10281 ;
10282 return 0;
10283}
10284_ACEOF
10285rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 10286if { (eval echo "$as_me:10286: \"$ac_link\"") >&5
84e70f78
KR
10287 (eval $ac_link) 2>&5
10288 ac_status=$?
409d9577 10289 echo "$as_me:10289: \$? = $ac_status" >&5
84e70f78
KR
10290 (exit $ac_status); } &&
10291 { ac_try='test -s conftest$ac_exeext'
409d9577 10292 { (eval echo "$as_me:10292: \"$ac_try\"") >&5
84e70f78
KR
10293 (eval $ac_try) 2>&5
10294 ac_status=$?
409d9577 10295 echo "$as_me:10295: \$? = $ac_status" >&5
84e70f78
KR
10296 (exit $ac_status); }; }; then
10297 ac_cv_func_hes_getmailhost=yes
10298else
10299 echo "$as_me: failed program was:" >&5
10300cat conftest.$ac_ext >&5
10301ac_cv_func_hes_getmailhost=no
10302fi
10303rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10304fi
409d9577 10305echo "$as_me:10305: result: $ac_cv_func_hes_getmailhost" >&5
84e70f78
KR
10306echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6
10307if test $ac_cv_func_hes_getmailhost = yes; then
10308 :
10309else
409d9577 10310 echo "$as_me:10310: checking for hes_getmailhost in -lhesiod" >&5
84e70f78
KR
10311echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6
10312if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
10313 echo $ECHO_N "(cached) $ECHO_C" >&6
10314else
10315 ac_check_lib_save_LIBS=$LIBS
10316LIBS="-lhesiod $RESOLVLIB $LIBS"
10317cat >conftest.$ac_ext <<_ACEOF
409d9577 10318#line 10318 "configure"
84e70f78
KR
10319#include "confdefs.h"
10320
10321/* Override any gcc2 internal prototype to avoid an error. */
10322#ifdef __cplusplus
10323extern "C"
10324#endif
10325/* We use char because int might match the return type of a gcc2
10326 builtin and then its argument prototype would still apply. */
10327char hes_getmailhost ();
10328int
10329main ()
10330{
10331hes_getmailhost ();
10332 ;
10333 return 0;
10334}
10335_ACEOF
10336rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 10337if { (eval echo "$as_me:10337: \"$ac_link\"") >&5
84e70f78
KR
10338 (eval $ac_link) 2>&5
10339 ac_status=$?
409d9577 10340 echo "$as_me:10340: \$? = $ac_status" >&5
84e70f78
KR
10341 (exit $ac_status); } &&
10342 { ac_try='test -s conftest$ac_exeext'
409d9577 10343 { (eval echo "$as_me:10343: \"$ac_try\"") >&5
84e70f78
KR
10344 (eval $ac_try) 2>&5
10345 ac_status=$?
409d9577 10346 echo "$as_me:10346: \$? = $ac_status" >&5
84e70f78
KR
10347 (exit $ac_status); }; }; then
10348 ac_cv_lib_hesiod_hes_getmailhost=yes
10349else
10350 echo "$as_me: failed program was:" >&5
10351cat conftest.$ac_ext >&5
10352ac_cv_lib_hesiod_hes_getmailhost=no
10353fi
10354rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10355LIBS=$ac_check_lib_save_LIBS
10356fi
409d9577 10357echo "$as_me:10357: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
84e70f78
KR
10358echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6
10359if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
10360 cat >>confdefs.h <<\EOF
10361#define HAVE_LIBHESIOD 1
10362EOF
10363
10364else
10365 :
10366fi
10367
10368fi
10369
10370fi
10371
a21616bd
KR
10372# These tell us which Kerberos-related libraries to use.
10373if test "${with_kerberos+set}" = set; then
503d2be0 10374
409d9577 10375echo "$as_me:10375: checking for com_err in -lcom_err" >&5
503d2be0
AS
10376echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
10377if test "${ac_cv_lib_com_err_com_err+set}" = set; then
10378 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10379else
503d2be0 10380 ac_check_lib_save_LIBS=$LIBS
a21616bd 10381LIBS="-lcom_err $LIBS"
503d2be0 10382cat >conftest.$ac_ext <<_ACEOF
409d9577 10383#line 10383 "configure"
a21616bd 10384#include "confdefs.h"
503d2be0 10385
a21616bd 10386/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10387#ifdef __cplusplus
10388extern "C"
10389#endif
a21616bd 10390/* We use char because int might match the return type of a gcc2
503d2be0
AS
10391 builtin and then its argument prototype would still apply. */
10392char com_err ();
10393int
10394main ()
10395{
10396com_err ();
10397 ;
10398 return 0;
10399}
10400_ACEOF
10401rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 10402if { (eval echo "$as_me:10402: \"$ac_link\"") >&5
503d2be0
AS
10403 (eval $ac_link) 2>&5
10404 ac_status=$?
409d9577 10405 echo "$as_me:10405: \$? = $ac_status" >&5
503d2be0
AS
10406 (exit $ac_status); } &&
10407 { ac_try='test -s conftest$ac_exeext'
409d9577 10408 { (eval echo "$as_me:10408: \"$ac_try\"") >&5
503d2be0
AS
10409 (eval $ac_try) 2>&5
10410 ac_status=$?
409d9577 10411 echo "$as_me:10411: \$? = $ac_status" >&5
503d2be0
AS
10412 (exit $ac_status); }; }; then
10413 ac_cv_lib_com_err_com_err=yes
10414else
10415 echo "$as_me: failed program was:" >&5
10416cat conftest.$ac_ext >&5
10417ac_cv_lib_com_err_com_err=no
10418fi
10419rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10420LIBS=$ac_check_lib_save_LIBS
10421fi
409d9577 10422echo "$as_me:10422: result: $ac_cv_lib_com_err_com_err" >&5
503d2be0
AS
10423echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
10424if test $ac_cv_lib_com_err_com_err = yes; then
10425 cat >>confdefs.h <<EOF
10426#define HAVE_LIBCOM_ERR 1
a21616bd
KR
10427EOF
10428
10429 LIBS="-lcom_err $LIBS"
10430
a21616bd
KR
10431fi
10432
409d9577 10433echo "$as_me:10433: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
503d2be0
AS
10434echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6
10435if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
10436 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10437else
503d2be0 10438 ac_check_lib_save_LIBS=$LIBS
a21616bd 10439LIBS="-lk5crypto $LIBS"
503d2be0 10440cat >conftest.$ac_ext <<_ACEOF
409d9577 10441#line 10441 "configure"
a21616bd 10442#include "confdefs.h"
503d2be0 10443
a21616bd 10444/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10445#ifdef __cplusplus
10446extern "C"
10447#endif
a21616bd 10448/* We use char because int might match the return type of a gcc2
503d2be0
AS
10449 builtin and then its argument prototype would still apply. */
10450char mit_des_cbc_encrypt ();
10451int
10452main ()
10453{
10454mit_des_cbc_encrypt ();
10455 ;
10456 return 0;
10457}
10458_ACEOF
10459rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 10460if { (eval echo "$as_me:10460: \"$ac_link\"") >&5
503d2be0
AS
10461 (eval $ac_link) 2>&5
10462 ac_status=$?
409d9577 10463 echo "$as_me:10463: \$? = $ac_status" >&5
503d2be0
AS
10464 (exit $ac_status); } &&
10465 { ac_try='test -s conftest$ac_exeext'
409d9577 10466 { (eval echo "$as_me:10466: \"$ac_try\"") >&5
503d2be0
AS
10467 (eval $ac_try) 2>&5
10468 ac_status=$?
409d9577 10469 echo "$as_me:10469: \$? = $ac_status" >&5
503d2be0
AS
10470 (exit $ac_status); }; }; then
10471 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
10472else
10473 echo "$as_me: failed program was:" >&5
10474cat conftest.$ac_ext >&5
10475ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
10476fi
10477rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10478LIBS=$ac_check_lib_save_LIBS
10479fi
409d9577 10480echo "$as_me:10480: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
10481echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6
10482if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
10483 cat >>confdefs.h <<EOF
10484#define HAVE_LIBK5CRYPTO 1
a21616bd
KR
10485EOF
10486
10487 LIBS="-lk5crypto $LIBS"
10488
a21616bd
KR
10489fi
10490
409d9577 10491echo "$as_me:10491: checking for mit_des_cbc_encrypt in -lcrypto" >&5
503d2be0
AS
10492echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6
10493if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
10494 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10495else
503d2be0 10496 ac_check_lib_save_LIBS=$LIBS
a21616bd 10497LIBS="-lcrypto $LIBS"
503d2be0 10498cat >conftest.$ac_ext <<_ACEOF
409d9577 10499#line 10499 "configure"
a21616bd 10500#include "confdefs.h"
503d2be0 10501
a21616bd 10502/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10503#ifdef __cplusplus
10504extern "C"
10505#endif
a21616bd 10506/* We use char because int might match the return type of a gcc2
503d2be0
AS
10507 builtin and then its argument prototype would still apply. */
10508char mit_des_cbc_encrypt ();
10509int
10510main ()
10511{
10512mit_des_cbc_encrypt ();
10513 ;
10514 return 0;
10515}
10516_ACEOF
10517rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 10518if { (eval echo "$as_me:10518: \"$ac_link\"") >&5
503d2be0
AS
10519 (eval $ac_link) 2>&5
10520 ac_status=$?
409d9577 10521 echo "$as_me:10521: \$? = $ac_status" >&5
503d2be0
AS
10522 (exit $ac_status); } &&
10523 { ac_try='test -s conftest$ac_exeext'
409d9577 10524 { (eval echo "$as_me:10524: \"$ac_try\"") >&5
503d2be0
AS
10525 (eval $ac_try) 2>&5
10526 ac_status=$?
409d9577 10527 echo "$as_me:10527: \$? = $ac_status" >&5
503d2be0
AS
10528 (exit $ac_status); }; }; then
10529 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
10530else
10531 echo "$as_me: failed program was:" >&5
10532cat conftest.$ac_ext >&5
10533ac_cv_lib_crypto_mit_des_cbc_encrypt=no
10534fi
10535rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10536LIBS=$ac_check_lib_save_LIBS
10537fi
409d9577 10538echo "$as_me:10538: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
10539echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6
10540if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
10541 cat >>confdefs.h <<EOF
10542#define HAVE_LIBCRYPTO 1
a21616bd
KR
10543EOF
10544
10545 LIBS="-lcrypto $LIBS"
10546
a21616bd
KR
10547fi
10548
409d9577 10549echo "$as_me:10549: checking for krb5_init_context in -lkrb5" >&5
503d2be0
AS
10550echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6
10551if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
10552 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10553else
503d2be0 10554 ac_check_lib_save_LIBS=$LIBS
a21616bd 10555LIBS="-lkrb5 $LIBS"
503d2be0 10556cat >conftest.$ac_ext <<_ACEOF
409d9577 10557#line 10557 "configure"
a21616bd 10558#include "confdefs.h"
a21616bd 10559
503d2be0
AS
10560/* Override any gcc2 internal prototype to avoid an error. */
10561#ifdef __cplusplus
10562extern "C"
10563#endif
10564/* We use char because int might match the return type of a gcc2
10565 builtin and then its argument prototype would still apply. */
10566char krb5_init_context ();
10567int
10568main ()
10569{
10570krb5_init_context ();
10571 ;
10572 return 0;
10573}
10574_ACEOF
10575rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 10576if { (eval echo "$as_me:10576: \"$ac_link\"") >&5
503d2be0
AS
10577 (eval $ac_link) 2>&5
10578 ac_status=$?
409d9577 10579 echo "$as_me:10579: \$? = $ac_status" >&5
503d2be0
AS
10580 (exit $ac_status); } &&
10581 { ac_try='test -s conftest$ac_exeext'
409d9577 10582 { (eval echo "$as_me:10582: \"$ac_try\"") >&5
503d2be0
AS
10583 (eval $ac_try) 2>&5
10584 ac_status=$?
409d9577 10585 echo "$as_me:10585: \$? = $ac_status" >&5
503d2be0
AS
10586 (exit $ac_status); }; }; then
10587 ac_cv_lib_krb5_krb5_init_context=yes
10588else
10589 echo "$as_me: failed program was:" >&5
10590cat conftest.$ac_ext >&5
10591ac_cv_lib_krb5_krb5_init_context=no
10592fi
10593rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10594LIBS=$ac_check_lib_save_LIBS
10595fi
409d9577 10596echo "$as_me:10596: result: $ac_cv_lib_krb5_krb5_init_context" >&5
503d2be0
AS
10597echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6
10598if test $ac_cv_lib_krb5_krb5_init_context = yes; then
10599 cat >>confdefs.h <<EOF
10600#define HAVE_LIBKRB5 1
a21616bd
KR
10601EOF
10602
10603 LIBS="-lkrb5 $LIBS"
10604
a21616bd
KR
10605fi
10606
10607 if test "${with_kerberos5+set}" != set; then
503d2be0 10608
409d9577 10609echo "$as_me:10609: checking for des_cbc_encrypt in -ldes425" >&5
503d2be0
AS
10610echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
10611if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
10612 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10613else
503d2be0 10614 ac_check_lib_save_LIBS=$LIBS
a21616bd 10615LIBS="-ldes425 $LIBS"
503d2be0 10616cat >conftest.$ac_ext <<_ACEOF
409d9577 10617#line 10617 "configure"
a21616bd 10618#include "confdefs.h"
503d2be0 10619
a21616bd 10620/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10621#ifdef __cplusplus
10622extern "C"
10623#endif
a21616bd 10624/* We use char because int might match the return type of a gcc2
503d2be0
AS
10625 builtin and then its argument prototype would still apply. */
10626char des_cbc_encrypt ();
10627int
10628main ()
10629{
10630des_cbc_encrypt ();
10631 ;
10632 return 0;
10633}
10634_ACEOF
10635rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 10636if { (eval echo "$as_me:10636: \"$ac_link\"") >&5
503d2be0
AS
10637 (eval $ac_link) 2>&5
10638 ac_status=$?
409d9577 10639 echo "$as_me:10639: \$? = $ac_status" >&5
503d2be0
AS
10640 (exit $ac_status); } &&
10641 { ac_try='test -s conftest$ac_exeext'
409d9577 10642 { (eval echo "$as_me:10642: \"$ac_try\"") >&5
503d2be0
AS
10643 (eval $ac_try) 2>&5
10644 ac_status=$?
409d9577 10645 echo "$as_me:10645: \$? = $ac_status" >&5
503d2be0
AS
10646 (exit $ac_status); }; }; then
10647 ac_cv_lib_des425_des_cbc_encrypt=yes
10648else
10649 echo "$as_me: failed program was:" >&5
10650cat conftest.$ac_ext >&5
10651ac_cv_lib_des425_des_cbc_encrypt=no
10652fi
10653rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10654LIBS=$ac_check_lib_save_LIBS
10655fi
409d9577 10656echo "$as_me:10656: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
503d2be0
AS
10657echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
10658if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
10659 cat >>confdefs.h <<EOF
10660#define HAVE_LIBDES425 1
a21616bd
KR
10661EOF
10662
10663 LIBS="-ldes425 $LIBS"
10664
10665else
503d2be0 10666
409d9577 10667echo "$as_me:10667: checking for des_cbc_encrypt in -ldes" >&5
503d2be0
AS
10668echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
10669if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
10670 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10671else
503d2be0 10672 ac_check_lib_save_LIBS=$LIBS
a21616bd 10673LIBS="-ldes $LIBS"
503d2be0 10674cat >conftest.$ac_ext <<_ACEOF
409d9577 10675#line 10675 "configure"
a21616bd 10676#include "confdefs.h"
503d2be0 10677
a21616bd 10678/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10679#ifdef __cplusplus
10680extern "C"
10681#endif
a21616bd 10682/* We use char because int might match the return type of a gcc2
503d2be0
AS
10683 builtin and then its argument prototype would still apply. */
10684char des_cbc_encrypt ();
10685int
10686main ()
10687{
10688des_cbc_encrypt ();
10689 ;
10690 return 0;
10691}
10692_ACEOF
10693rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 10694if { (eval echo "$as_me:10694: \"$ac_link\"") >&5
503d2be0
AS
10695 (eval $ac_link) 2>&5
10696 ac_status=$?
409d9577 10697 echo "$as_me:10697: \$? = $ac_status" >&5
503d2be0
AS
10698 (exit $ac_status); } &&
10699 { ac_try='test -s conftest$ac_exeext'
409d9577 10700 { (eval echo "$as_me:10700: \"$ac_try\"") >&5
503d2be0
AS
10701 (eval $ac_try) 2>&5
10702 ac_status=$?
409d9577 10703 echo "$as_me:10703: \$? = $ac_status" >&5
503d2be0
AS
10704 (exit $ac_status); }; }; then
10705 ac_cv_lib_des_des_cbc_encrypt=yes
10706else
10707 echo "$as_me: failed program was:" >&5
10708cat conftest.$ac_ext >&5
10709ac_cv_lib_des_des_cbc_encrypt=no
10710fi
10711rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10712LIBS=$ac_check_lib_save_LIBS
10713fi
409d9577 10714echo "$as_me:10714: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
503d2be0
AS
10715echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
10716if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
10717 cat >>confdefs.h <<EOF
10718#define HAVE_LIBDES 1
a21616bd
KR
10719EOF
10720
10721 LIBS="-ldes $LIBS"
10722
a21616bd
KR
10723fi
10724
10725fi
10726
409d9577 10727echo "$as_me:10727: checking for krb_get_cred in -lkrb4" >&5
503d2be0
AS
10728echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6
10729if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
10730 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10731else
503d2be0 10732 ac_check_lib_save_LIBS=$LIBS
a21616bd 10733LIBS="-lkrb4 $LIBS"
503d2be0 10734cat >conftest.$ac_ext <<_ACEOF
409d9577 10735#line 10735 "configure"
a21616bd 10736#include "confdefs.h"
503d2be0 10737
a21616bd 10738/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10739#ifdef __cplusplus
10740extern "C"
10741#endif
a21616bd 10742/* We use char because int might match the return type of a gcc2
503d2be0
AS
10743 builtin and then its argument prototype would still apply. */
10744char krb_get_cred ();
10745int
10746main ()
10747{
10748krb_get_cred ();
10749 ;
10750 return 0;
10751}
10752_ACEOF
10753rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 10754if { (eval echo "$as_me:10754: \"$ac_link\"") >&5
503d2be0
AS
10755 (eval $ac_link) 2>&5
10756 ac_status=$?
409d9577 10757 echo "$as_me:10757: \$? = $ac_status" >&5
503d2be0
AS
10758 (exit $ac_status); } &&
10759 { ac_try='test -s conftest$ac_exeext'
409d9577 10760 { (eval echo "$as_me:10760: \"$ac_try\"") >&5
503d2be0
AS
10761 (eval $ac_try) 2>&5
10762 ac_status=$?
409d9577 10763 echo "$as_me:10763: \$? = $ac_status" >&5
503d2be0
AS
10764 (exit $ac_status); }; }; then
10765 ac_cv_lib_krb4_krb_get_cred=yes
10766else
10767 echo "$as_me: failed program was:" >&5
10768cat conftest.$ac_ext >&5
10769ac_cv_lib_krb4_krb_get_cred=no
10770fi
10771rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10772LIBS=$ac_check_lib_save_LIBS
10773fi
409d9577 10774echo "$as_me:10774: result: $ac_cv_lib_krb4_krb_get_cred" >&5
503d2be0
AS
10775echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6
10776if test $ac_cv_lib_krb4_krb_get_cred = yes; then
10777 cat >>confdefs.h <<EOF
10778#define HAVE_LIBKRB4 1
a21616bd
KR
10779EOF
10780
10781 LIBS="-lkrb4 $LIBS"
10782
10783else
503d2be0 10784
409d9577 10785echo "$as_me:10785: checking for krb_get_cred in -lkrb" >&5
503d2be0
AS
10786echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6
10787if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
10788 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10789else
503d2be0 10790 ac_check_lib_save_LIBS=$LIBS
a21616bd 10791LIBS="-lkrb $LIBS"
503d2be0 10792cat >conftest.$ac_ext <<_ACEOF
409d9577 10793#line 10793 "configure"
a21616bd 10794#include "confdefs.h"
503d2be0 10795
a21616bd 10796/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10797#ifdef __cplusplus
10798extern "C"
10799#endif
a21616bd 10800/* We use char because int might match the return type of a gcc2
503d2be0
AS
10801 builtin and then its argument prototype would still apply. */
10802char krb_get_cred ();
10803int
10804main ()
10805{
10806krb_get_cred ();
10807 ;
10808 return 0;
10809}
10810_ACEOF
10811rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 10812if { (eval echo "$as_me:10812: \"$ac_link\"") >&5
503d2be0
AS
10813 (eval $ac_link) 2>&5
10814 ac_status=$?
409d9577 10815 echo "$as_me:10815: \$? = $ac_status" >&5
503d2be0
AS
10816 (exit $ac_status); } &&
10817 { ac_try='test -s conftest$ac_exeext'
409d9577 10818 { (eval echo "$as_me:10818: \"$ac_try\"") >&5
503d2be0
AS
10819 (eval $ac_try) 2>&5
10820 ac_status=$?
409d9577 10821 echo "$as_me:10821: \$? = $ac_status" >&5
503d2be0
AS
10822 (exit $ac_status); }; }; then
10823 ac_cv_lib_krb_krb_get_cred=yes
10824else
10825 echo "$as_me: failed program was:" >&5
10826cat conftest.$ac_ext >&5
10827ac_cv_lib_krb_krb_get_cred=no
10828fi
10829rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10830LIBS=$ac_check_lib_save_LIBS
10831fi
409d9577 10832echo "$as_me:10832: result: $ac_cv_lib_krb_krb_get_cred" >&5
503d2be0
AS
10833echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6
10834if test $ac_cv_lib_krb_krb_get_cred = yes; then
10835 cat >>confdefs.h <<EOF
10836#define HAVE_LIBKRB 1
a21616bd
KR
10837EOF
10838
10839 LIBS="-lkrb $LIBS"
10840
a21616bd
KR
10841fi
10842
10843fi
10844
10845 fi
10846
10847 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
10848
10849for ac_header in krb5.h
a21616bd 10850do
503d2be0 10851as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
409d9577 10852echo "$as_me:10852: checking for $ac_header" >&5
503d2be0
AS
10853echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10854if eval "test \"\${$as_ac_Header+set}\" = set"; then
10855 echo $ECHO_N "(cached) $ECHO_C" >&6
10856else
10857 cat >conftest.$ac_ext <<_ACEOF
409d9577 10858#line 10858 "configure"
503d2be0
AS
10859#include "confdefs.h"
10860#include <$ac_header>
10861_ACEOF
409d9577 10862if { (eval echo "$as_me:10862: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
10863 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10864 ac_status=$?
10865 egrep -v '^ *\+' conftest.er1 >conftest.err
10866 rm -f conftest.er1
10867 cat conftest.err >&5
409d9577 10868 echo "$as_me:10868: \$? = $ac_status" >&5
503d2be0
AS
10869 (exit $ac_status); } >/dev/null; then
10870 if test -s conftest.err; then
10871 ac_cpp_err=$ac_c_preproc_warn_flag
10872 else
10873 ac_cpp_err=
10874 fi
10875else
10876 ac_cpp_err=yes
10877fi
10878if test -z "$ac_cpp_err"; then
10879 eval "$as_ac_Header=yes"
10880else
10881 echo "$as_me: failed program was:" >&5
a21616bd 10882 cat conftest.$ac_ext >&5
503d2be0 10883 eval "$as_ac_Header=no"
a21616bd 10884fi
503d2be0 10885rm -f conftest.err conftest.$ac_ext
a21616bd 10886fi
409d9577 10887echo "$as_me:10887: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
10888echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10889if test `eval echo '${'$as_ac_Header'}'` = yes; then
10890 cat >>confdefs.h <<EOF
10891#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 10892EOF
503d2be0 10893
a21616bd
KR
10894fi
10895done
10896
10897 else
503d2be0
AS
10898
10899for ac_header in des.h
a21616bd 10900do
503d2be0 10901as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
409d9577 10902echo "$as_me:10902: checking for $ac_header" >&5
503d2be0
AS
10903echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10904if eval "test \"\${$as_ac_Header+set}\" = set"; then
10905 echo $ECHO_N "(cached) $ECHO_C" >&6
10906else
10907 cat >conftest.$ac_ext <<_ACEOF
409d9577 10908#line 10908 "configure"
503d2be0
AS
10909#include "confdefs.h"
10910#include <$ac_header>
10911_ACEOF
409d9577 10912if { (eval echo "$as_me:10912: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
10913 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10914 ac_status=$?
10915 egrep -v '^ *\+' conftest.er1 >conftest.err
10916 rm -f conftest.er1
10917 cat conftest.err >&5
409d9577 10918 echo "$as_me:10918: \$? = $ac_status" >&5
503d2be0
AS
10919 (exit $ac_status); } >/dev/null; then
10920 if test -s conftest.err; then
10921 ac_cpp_err=$ac_c_preproc_warn_flag
10922 else
10923 ac_cpp_err=
10924 fi
10925else
10926 ac_cpp_err=yes
10927fi
10928if test -z "$ac_cpp_err"; then
10929 eval "$as_ac_Header=yes"
10930else
10931 echo "$as_me: failed program was:" >&5
a21616bd 10932 cat conftest.$ac_ext >&5
503d2be0 10933 eval "$as_ac_Header=no"
a21616bd 10934fi
503d2be0 10935rm -f conftest.err conftest.$ac_ext
a21616bd 10936fi
409d9577 10937echo "$as_me:10937: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
10938echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10939if test `eval echo '${'$as_ac_Header'}'` = yes; then
10940 cat >>confdefs.h <<EOF
10941#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 10942EOF
503d2be0 10943
a21616bd 10944else
503d2be0
AS
10945
10946for ac_header in kerberosIV/des.h
a21616bd 10947do
503d2be0 10948as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
409d9577 10949echo "$as_me:10949: checking for $ac_header" >&5
503d2be0
AS
10950echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10951if eval "test \"\${$as_ac_Header+set}\" = set"; then
10952 echo $ECHO_N "(cached) $ECHO_C" >&6
10953else
10954 cat >conftest.$ac_ext <<_ACEOF
409d9577 10955#line 10955 "configure"
503d2be0
AS
10956#include "confdefs.h"
10957#include <$ac_header>
10958_ACEOF
409d9577 10959if { (eval echo "$as_me:10959: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
10960 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10961 ac_status=$?
10962 egrep -v '^ *\+' conftest.er1 >conftest.err
10963 rm -f conftest.er1
10964 cat conftest.err >&5
409d9577 10965 echo "$as_me:10965: \$? = $ac_status" >&5
503d2be0
AS
10966 (exit $ac_status); } >/dev/null; then
10967 if test -s conftest.err; then
10968 ac_cpp_err=$ac_c_preproc_warn_flag
10969 else
10970 ac_cpp_err=
10971 fi
10972else
10973 ac_cpp_err=yes
10974fi
10975if test -z "$ac_cpp_err"; then
10976 eval "$as_ac_Header=yes"
10977else
10978 echo "$as_me: failed program was:" >&5
a21616bd 10979 cat conftest.$ac_ext >&5
503d2be0 10980 eval "$as_ac_Header=no"
a21616bd 10981fi
503d2be0 10982rm -f conftest.err conftest.$ac_ext
a21616bd 10983fi
409d9577 10984echo "$as_me:10984: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
10985echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10986if test `eval echo '${'$as_ac_Header'}'` = yes; then
10987 cat >>confdefs.h <<EOF
10988#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 10989EOF
503d2be0 10990
a21616bd 10991else
503d2be0
AS
10992
10993for ac_header in kerberos/des.h
a21616bd 10994do
503d2be0 10995as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
409d9577 10996echo "$as_me:10996: checking for $ac_header" >&5
503d2be0
AS
10997echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10998if eval "test \"\${$as_ac_Header+set}\" = set"; then
10999 echo $ECHO_N "(cached) $ECHO_C" >&6
11000else
11001 cat >conftest.$ac_ext <<_ACEOF
409d9577 11002#line 11002 "configure"
503d2be0
AS
11003#include "confdefs.h"
11004#include <$ac_header>
11005_ACEOF
409d9577 11006if { (eval echo "$as_me:11006: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11007 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11008 ac_status=$?
11009 egrep -v '^ *\+' conftest.er1 >conftest.err
11010 rm -f conftest.er1
11011 cat conftest.err >&5
409d9577 11012 echo "$as_me:11012: \$? = $ac_status" >&5
503d2be0
AS
11013 (exit $ac_status); } >/dev/null; then
11014 if test -s conftest.err; then
11015 ac_cpp_err=$ac_c_preproc_warn_flag
11016 else
11017 ac_cpp_err=
11018 fi
11019else
11020 ac_cpp_err=yes
11021fi
11022if test -z "$ac_cpp_err"; then
11023 eval "$as_ac_Header=yes"
11024else
11025 echo "$as_me: failed program was:" >&5
a21616bd 11026 cat conftest.$ac_ext >&5
503d2be0 11027 eval "$as_ac_Header=no"
a21616bd 11028fi
503d2be0 11029rm -f conftest.err conftest.$ac_ext
a21616bd 11030fi
409d9577 11031echo "$as_me:11031: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11032echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11033if test `eval echo '${'$as_ac_Header'}'` = yes; then
11034 cat >>confdefs.h <<EOF
11035#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 11036EOF
503d2be0 11037
a21616bd
KR
11038fi
11039done
11040
11041fi
11042done
11043
11044fi
11045done
11046
503d2be0 11047for ac_header in krb.h
a21616bd 11048do
503d2be0 11049as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
409d9577 11050echo "$as_me:11050: checking for $ac_header" >&5
503d2be0
AS
11051echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11052if eval "test \"\${$as_ac_Header+set}\" = set"; then
11053 echo $ECHO_N "(cached) $ECHO_C" >&6
11054else
11055 cat >conftest.$ac_ext <<_ACEOF
409d9577 11056#line 11056 "configure"
503d2be0
AS
11057#include "confdefs.h"
11058#include <$ac_header>
11059_ACEOF
409d9577 11060if { (eval echo "$as_me:11060: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11061 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11062 ac_status=$?
11063 egrep -v '^ *\+' conftest.er1 >conftest.err
11064 rm -f conftest.er1
11065 cat conftest.err >&5
409d9577 11066 echo "$as_me:11066: \$? = $ac_status" >&5
503d2be0
AS
11067 (exit $ac_status); } >/dev/null; then
11068 if test -s conftest.err; then
11069 ac_cpp_err=$ac_c_preproc_warn_flag
11070 else
11071 ac_cpp_err=
11072 fi
11073else
11074 ac_cpp_err=yes
11075fi
11076if test -z "$ac_cpp_err"; then
11077 eval "$as_ac_Header=yes"
11078else
11079 echo "$as_me: failed program was:" >&5
a21616bd 11080 cat conftest.$ac_ext >&5
503d2be0 11081 eval "$as_ac_Header=no"
a21616bd 11082fi
503d2be0 11083rm -f conftest.err conftest.$ac_ext
a21616bd 11084fi
409d9577 11085echo "$as_me:11085: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11086echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11087if test `eval echo '${'$as_ac_Header'}'` = yes; then
11088 cat >>confdefs.h <<EOF
11089#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 11090EOF
503d2be0 11091
a21616bd 11092else
503d2be0
AS
11093
11094for ac_header in kerberosIV/krb.h
a21616bd 11095do
503d2be0 11096as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
409d9577 11097echo "$as_me:11097: checking for $ac_header" >&5
503d2be0
AS
11098echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11099if eval "test \"\${$as_ac_Header+set}\" = set"; then
11100 echo $ECHO_N "(cached) $ECHO_C" >&6
11101else
11102 cat >conftest.$ac_ext <<_ACEOF
409d9577 11103#line 11103 "configure"
503d2be0
AS
11104#include "confdefs.h"
11105#include <$ac_header>
11106_ACEOF
409d9577 11107if { (eval echo "$as_me:11107: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11108 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11109 ac_status=$?
11110 egrep -v '^ *\+' conftest.er1 >conftest.err
11111 rm -f conftest.er1
11112 cat conftest.err >&5
409d9577 11113 echo "$as_me:11113: \$? = $ac_status" >&5
503d2be0
AS
11114 (exit $ac_status); } >/dev/null; then
11115 if test -s conftest.err; then
11116 ac_cpp_err=$ac_c_preproc_warn_flag
11117 else
11118 ac_cpp_err=
11119 fi
11120else
11121 ac_cpp_err=yes
11122fi
11123if test -z "$ac_cpp_err"; then
11124 eval "$as_ac_Header=yes"
11125else
11126 echo "$as_me: failed program was:" >&5
a21616bd 11127 cat conftest.$ac_ext >&5
503d2be0 11128 eval "$as_ac_Header=no"
a21616bd 11129fi
503d2be0 11130rm -f conftest.err conftest.$ac_ext
a21616bd 11131fi
409d9577 11132echo "$as_me:11132: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11133echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11134if test `eval echo '${'$as_ac_Header'}'` = yes; then
11135 cat >>confdefs.h <<EOF
11136#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 11137EOF
503d2be0 11138
a21616bd 11139else
503d2be0
AS
11140
11141for ac_header in kerberos/krb.h
a21616bd 11142do
503d2be0 11143as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
409d9577 11144echo "$as_me:11144: checking for $ac_header" >&5
503d2be0
AS
11145echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11146if eval "test \"\${$as_ac_Header+set}\" = set"; then
11147 echo $ECHO_N "(cached) $ECHO_C" >&6
11148else
11149 cat >conftest.$ac_ext <<_ACEOF
409d9577 11150#line 11150 "configure"
503d2be0
AS
11151#include "confdefs.h"
11152#include <$ac_header>
11153_ACEOF
409d9577 11154if { (eval echo "$as_me:11154: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11155 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11156 ac_status=$?
11157 egrep -v '^ *\+' conftest.er1 >conftest.err
11158 rm -f conftest.er1
11159 cat conftest.err >&5
409d9577 11160 echo "$as_me:11160: \$? = $ac_status" >&5
503d2be0
AS
11161 (exit $ac_status); } >/dev/null; then
11162 if test -s conftest.err; then
11163 ac_cpp_err=$ac_c_preproc_warn_flag
11164 else
11165 ac_cpp_err=
11166 fi
11167else
11168 ac_cpp_err=yes
11169fi
11170if test -z "$ac_cpp_err"; then
11171 eval "$as_ac_Header=yes"
11172else
11173 echo "$as_me: failed program was:" >&5
a21616bd 11174 cat conftest.$ac_ext >&5
503d2be0 11175 eval "$as_ac_Header=no"
a21616bd 11176fi
503d2be0 11177rm -f conftest.err conftest.$ac_ext
a21616bd 11178fi
409d9577 11179echo "$as_me:11179: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11180echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11181if test `eval echo '${'$as_ac_Header'}'` = yes; then
11182 cat >>confdefs.h <<EOF
11183#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 11184EOF
503d2be0 11185
a21616bd
KR
11186fi
11187done
11188
11189fi
11190done
11191
11192fi
11193done
11194
11195 fi
503d2be0
AS
11196
11197for ac_header in com_err.h
a21616bd 11198do
503d2be0 11199as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
409d9577 11200echo "$as_me:11200: checking for $ac_header" >&5
503d2be0
AS
11201echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11202if eval "test \"\${$as_ac_Header+set}\" = set"; then
11203 echo $ECHO_N "(cached) $ECHO_C" >&6
11204else
11205 cat >conftest.$ac_ext <<_ACEOF
409d9577 11206#line 11206 "configure"
503d2be0
AS
11207#include "confdefs.h"
11208#include <$ac_header>
11209_ACEOF
409d9577 11210if { (eval echo "$as_me:11210: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11211 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11212 ac_status=$?
11213 egrep -v '^ *\+' conftest.er1 >conftest.err
11214 rm -f conftest.er1
11215 cat conftest.err >&5
409d9577 11216 echo "$as_me:11216: \$? = $ac_status" >&5
503d2be0
AS
11217 (exit $ac_status); } >/dev/null; then
11218 if test -s conftest.err; then
11219 ac_cpp_err=$ac_c_preproc_warn_flag
11220 else
11221 ac_cpp_err=
11222 fi
11223else
11224 ac_cpp_err=yes
11225fi
11226if test -z "$ac_cpp_err"; then
11227 eval "$as_ac_Header=yes"
11228else
11229 echo "$as_me: failed program was:" >&5
a21616bd 11230 cat conftest.$ac_ext >&5
503d2be0 11231 eval "$as_ac_Header=no"
a21616bd 11232fi
503d2be0 11233rm -f conftest.err conftest.$ac_ext
a21616bd 11234fi
409d9577 11235echo "$as_me:11235: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11236echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11237if test `eval echo '${'$as_ac_Header'}'` = yes; then
11238 cat >>confdefs.h <<EOF
11239#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 11240EOF
503d2be0 11241
a21616bd
KR
11242fi
11243done
11244
11245fi
11246
ba4481b5
DL
11247# Solaris requires -lintl if you want strerror (which calls dgettext)
11248# to return localized messages.
503d2be0 11249
409d9577 11250echo "$as_me:11250: checking for dgettext in -lintl" >&5
503d2be0
AS
11251echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
11252if test "${ac_cv_lib_intl_dgettext+set}" = set; then
11253 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11254else
503d2be0 11255 ac_check_lib_save_LIBS=$LIBS
ba4481b5 11256LIBS="-lintl $LIBS"
503d2be0 11257cat >conftest.$ac_ext <<_ACEOF
409d9577 11258#line 11258 "configure"
ba4481b5 11259#include "confdefs.h"
503d2be0 11260
ba4481b5 11261/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11262#ifdef __cplusplus
11263extern "C"
11264#endif
ba4481b5 11265/* We use char because int might match the return type of a gcc2
503d2be0
AS
11266 builtin and then its argument prototype would still apply. */
11267char dgettext ();
11268int
11269main ()
11270{
11271dgettext ();
11272 ;
11273 return 0;
11274}
11275_ACEOF
11276rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 11277if { (eval echo "$as_me:11277: \"$ac_link\"") >&5
503d2be0
AS
11278 (eval $ac_link) 2>&5
11279 ac_status=$?
409d9577 11280 echo "$as_me:11280: \$? = $ac_status" >&5
503d2be0
AS
11281 (exit $ac_status); } &&
11282 { ac_try='test -s conftest$ac_exeext'
409d9577 11283 { (eval echo "$as_me:11283: \"$ac_try\"") >&5
503d2be0
AS
11284 (eval $ac_try) 2>&5
11285 ac_status=$?
409d9577 11286 echo "$as_me:11286: \$? = $ac_status" >&5
503d2be0
AS
11287 (exit $ac_status); }; }; then
11288 ac_cv_lib_intl_dgettext=yes
11289else
11290 echo "$as_me: failed program was:" >&5
11291cat conftest.$ac_ext >&5
11292ac_cv_lib_intl_dgettext=no
11293fi
11294rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11295LIBS=$ac_check_lib_save_LIBS
11296fi
409d9577 11297echo "$as_me:11297: result: $ac_cv_lib_intl_dgettext" >&5
503d2be0
AS
11298echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
11299if test $ac_cv_lib_intl_dgettext = yes; then
11300 cat >>confdefs.h <<EOF
11301#define HAVE_LIBINTL 1
ba4481b5
DL
11302EOF
11303
11304 LIBS="-lintl $LIBS"
11305
ba4481b5
DL
11306fi
11307
409d9577 11308echo "$as_me:11308: checking whether localtime caches TZ" >&5
503d2be0
AS
11309echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6
11310if test "${emacs_cv_localtime_cache+set}" = set; then
11311 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
11312else
11313 if test x$ac_cv_func_tzset = xyes; then
11314if test "$cross_compiling" = yes; then
11315 # If we have tzset, assume the worst when cross-compiling.
11316emacs_cv_localtime_cache=yes
11317else
503d2be0 11318 cat >conftest.$ac_ext <<_ACEOF
409d9577 11319#line 11319 "configure"
ba4481b5
DL
11320#include "confdefs.h"
11321#include <time.h>
ba4481b5
DL
11322extern char **environ;
11323unset_TZ ()
11324{
11325 char **from, **to;
11326 for (to = from = environ; (*to = *from); from++)
11327 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11328 to++;
11329}
11330char TZ_GMT0[] = "TZ=GMT0";
11331char TZ_PST8[] = "TZ=PST8";
11332main()
11333{
11334 time_t now = time ((time_t *) 0);
11335 int hour_GMT0, hour_unset;
11336 if (putenv (TZ_GMT0) != 0)
11337 exit (1);
11338 hour_GMT0 = localtime (&now)->tm_hour;
11339 unset_TZ ();
11340 hour_unset = localtime (&now)->tm_hour;
11341 if (putenv (TZ_PST8) != 0)
11342 exit (1);
11343 if (localtime (&now)->tm_hour == hour_GMT0)
11344 exit (1);
11345 unset_TZ ();
11346 if (localtime (&now)->tm_hour != hour_unset)
11347 exit (1);
11348 exit (0);
11349}
503d2be0
AS
11350_ACEOF
11351rm -f conftest$ac_exeext
409d9577 11352if { (eval echo "$as_me:11352: \"$ac_link\"") >&5
503d2be0
AS
11353 (eval $ac_link) 2>&5
11354 ac_status=$?
409d9577 11355 echo "$as_me:11355: \$? = $ac_status" >&5
503d2be0 11356 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
409d9577 11357 { (eval echo "$as_me:11357: \"$ac_try\"") >&5
503d2be0
AS
11358 (eval $ac_try) 2>&5
11359 ac_status=$?
409d9577 11360 echo "$as_me:11360: \$? = $ac_status" >&5
503d2be0 11361 (exit $ac_status); }; }; then
ba4481b5
DL
11362 emacs_cv_localtime_cache=no
11363else
503d2be0
AS
11364 echo "$as_me: program exited with status $ac_status" >&5
11365echo "$as_me: failed program was:" >&5
11366cat conftest.$ac_ext >&5
11367emacs_cv_localtime_cache=yes
ba4481b5 11368fi
503d2be0 11369rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 11370fi
ba4481b5
DL
11371else
11372 # If we lack tzset, report that localtime does not cache TZ,
11373 # since we can't invalidate the cache if we don't have tzset.
11374 emacs_cv_localtime_cache=no
11375fi
11376fi
409d9577 11377echo "$as_me:11377: result: $emacs_cv_localtime_cache" >&5
503d2be0 11378echo "${ECHO_T}$emacs_cv_localtime_cache" >&6
ba4481b5 11379if test $emacs_cv_localtime_cache = yes; then
503d2be0 11380 cat >>confdefs.h <<\EOF
ba4481b5
DL
11381#define LOCALTIME_CACHE 1
11382EOF
11383
11384fi
11385
11386if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
11387
11388for ac_func in gettimeofday
48d4b120 11389do
503d2be0 11390as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
409d9577 11391echo "$as_me:11391: checking for $ac_func" >&5
503d2be0
AS
11392echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11393if eval "test \"\${$as_ac_var+set}\" = set"; then
11394 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 11395else
503d2be0 11396 cat >conftest.$ac_ext <<_ACEOF
409d9577 11397#line 11397 "configure"
48d4b120
DL
11398#include "confdefs.h"
11399/* System header to define __stub macros and hopefully few prototypes,
503d2be0 11400 which can conflict with char $ac_func (); below. */
48d4b120
DL
11401#include <assert.h>
11402/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11403#ifdef __cplusplus
11404extern "C"
11405#endif
48d4b120 11406/* We use char because int might match the return type of a gcc2
503d2be0
AS
11407 builtin and then its argument prototype would still apply. */
11408char $ac_func ();
11409char (*f) ();
48d4b120 11410
503d2be0
AS
11411int
11412main ()
11413{
48d4b120
DL
11414/* The GNU C library defines this for functions which it implements
11415 to always fail with ENOSYS. Some functions are actually named
11416 something starting with __ and the normal name is an alias. */
11417#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11418choke me
11419#else
503d2be0 11420f = $ac_func;
48d4b120
DL
11421#endif
11422
503d2be0
AS
11423 ;
11424 return 0;
11425}
11426_ACEOF
11427rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 11428if { (eval echo "$as_me:11428: \"$ac_link\"") >&5
503d2be0
AS
11429 (eval $ac_link) 2>&5
11430 ac_status=$?
409d9577 11431 echo "$as_me:11431: \$? = $ac_status" >&5
503d2be0
AS
11432 (exit $ac_status); } &&
11433 { ac_try='test -s conftest$ac_exeext'
409d9577 11434 { (eval echo "$as_me:11434: \"$ac_try\"") >&5
503d2be0
AS
11435 (eval $ac_try) 2>&5
11436 ac_status=$?
409d9577 11437 echo "$as_me:11437: \$? = $ac_status" >&5
503d2be0
AS
11438 (exit $ac_status); }; }; then
11439 eval "$as_ac_var=yes"
11440else
11441 echo "$as_me: failed program was:" >&5
11442cat conftest.$ac_ext >&5
11443eval "$as_ac_var=no"
11444fi
11445rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11446fi
409d9577 11447echo "$as_me:11447: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
11448echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11449if test `eval echo '${'$as_ac_var'}'` = yes; then
11450 cat >>confdefs.h <<EOF
11451#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
48d4b120 11452EOF
48d4b120 11453
48d4b120
DL
11454fi
11455done
11456
409d9577 11457 echo "$as_me:11457: checking whether gettimeofday can accept two arguments" >&5
503d2be0
AS
11458echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6
11459if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
11460 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11461else
503d2be0 11462 cat >conftest.$ac_ext <<_ACEOF
409d9577 11463#line 11463 "configure"
a3f08d9e 11464#include "confdefs.h"
ba4481b5 11465
a3f08d9e
DL
11466#ifdef TIME_WITH_SYS_TIME
11467#include <sys/time.h>
11468#include <time.h>
11469#else
11470#ifdef HAVE_SYS_TIME_H
11471#include <sys/time.h>
11472#else
11473#include <time.h>
11474#endif
11475#endif
503d2be0
AS
11476int
11477main ()
11478{
a3f08d9e 11479struct timeval time;
48d4b120 11480 gettimeofday (&time, 0);
503d2be0
AS
11481 ;
11482 return 0;
11483}
11484_ACEOF
11485rm -f conftest.$ac_objext
409d9577 11486if { (eval echo "$as_me:11486: \"$ac_compile\"") >&5
503d2be0
AS
11487 (eval $ac_compile) 2>&5
11488 ac_status=$?
409d9577 11489 echo "$as_me:11489: \$? = $ac_status" >&5
503d2be0
AS
11490 (exit $ac_status); } &&
11491 { ac_try='test -s conftest.$ac_objext'
409d9577 11492 { (eval echo "$as_me:11492: \"$ac_try\"") >&5
503d2be0
AS
11493 (eval $ac_try) 2>&5
11494 ac_status=$?
409d9577 11495 echo "$as_me:11495: \$? = $ac_status" >&5
503d2be0 11496 (exit $ac_status); }; }; then
ba4481b5
DL
11497 emacs_cv_gettimeofday_two_arguments=yes
11498else
503d2be0
AS
11499 echo "$as_me: failed program was:" >&5
11500cat conftest.$ac_ext >&5
11501emacs_cv_gettimeofday_two_arguments=no
ba4481b5 11502fi
503d2be0 11503rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 11504fi
409d9577 11505echo "$as_me:11505: result: $emacs_cv_gettimeofday_two_arguments" >&5
503d2be0 11506echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6
ba4481b5 11507 if test $emacs_cv_gettimeofday_two_arguments = no; then
503d2be0 11508 cat >>confdefs.h <<\EOF
ba4481b5
DL
11509#define GETTIMEOFDAY_ONE_ARGUMENT 1
11510EOF
11511
11512 fi
11513fi
11514
48d4b120 11515if test "$ac_cv_func_gettimeofday" = yes; then
409d9577 11516 echo "$as_me:11516: checking for struct timezone" >&5
503d2be0
AS
11517echo $ECHO_N "checking for struct timezone... $ECHO_C" >&6
11518if test "${emacs_cv_struct_timezone+set}" = set; then
11519 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 11520else
503d2be0 11521 cat >conftest.$ac_ext <<_ACEOF
409d9577 11522#line 11522 "configure"
48d4b120
DL
11523#include "confdefs.h"
11524#include <sys/time.h>
503d2be0
AS
11525int
11526main ()
11527{
48d4b120 11528struct timezone tz;
503d2be0
AS
11529 ;
11530 return 0;
11531}
11532_ACEOF
11533rm -f conftest.$ac_objext
409d9577 11534if { (eval echo "$as_me:11534: \"$ac_compile\"") >&5
503d2be0
AS
11535 (eval $ac_compile) 2>&5
11536 ac_status=$?
409d9577 11537 echo "$as_me:11537: \$? = $ac_status" >&5
503d2be0
AS
11538 (exit $ac_status); } &&
11539 { ac_try='test -s conftest.$ac_objext'
409d9577 11540 { (eval echo "$as_me:11540: \"$ac_try\"") >&5
503d2be0
AS
11541 (eval $ac_try) 2>&5
11542 ac_status=$?
409d9577 11543 echo "$as_me:11543: \$? = $ac_status" >&5
503d2be0 11544 (exit $ac_status); }; }; then
48d4b120
DL
11545 if test "$cross_compiling" = yes; then
11546 emacs_cv_struct_timezone=yes
11547else
503d2be0 11548 cat >conftest.$ac_ext <<_ACEOF
409d9577 11549#line 11549 "configure"
48d4b120
DL
11550#include "confdefs.h"
11551
11552#ifdef TIME_WITH_SYS_TIME
11553#include <sys/time.h>
11554#include <time.h>
11555#else
11556#ifdef HAVE_SYS_TIME_H
11557#include <sys/time.h>
11558#else
11559#include <time.h>
11560#endif
11561#endif
11562main () {
11563 struct timeval time;
11564 struct timezone dummy;
11565 exit (gettimeofday (&time, &dummy));
11566}
503d2be0
AS
11567_ACEOF
11568rm -f conftest$ac_exeext
409d9577 11569if { (eval echo "$as_me:11569: \"$ac_link\"") >&5
503d2be0
AS
11570 (eval $ac_link) 2>&5
11571 ac_status=$?
409d9577 11572 echo "$as_me:11572: \$? = $ac_status" >&5
503d2be0 11573 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
409d9577 11574 { (eval echo "$as_me:11574: \"$ac_try\"") >&5
503d2be0
AS
11575 (eval $ac_try) 2>&5
11576 ac_status=$?
409d9577 11577 echo "$as_me:11577: \$? = $ac_status" >&5
503d2be0 11578 (exit $ac_status); }; }; then
48d4b120
DL
11579 emacs_cv_struct_timezone=yes
11580else
503d2be0
AS
11581 echo "$as_me: program exited with status $ac_status" >&5
11582echo "$as_me: failed program was:" >&5
11583cat conftest.$ac_ext >&5
11584emacs_cv_struct_timezone=no
48d4b120 11585fi
503d2be0 11586rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
48d4b120 11587fi
48d4b120 11588else
503d2be0
AS
11589 echo "$as_me: failed program was:" >&5
11590cat conftest.$ac_ext >&5
11591emacs_cv_struct_timezone=no
48d4b120 11592fi
503d2be0 11593rm -f conftest.$ac_objext conftest.$ac_ext
48d4b120 11594fi
409d9577 11595echo "$as_me:11595: result: $emacs_cv_struct_timezone" >&5
503d2be0 11596echo "${ECHO_T}$emacs_cv_struct_timezone" >&6
48d4b120
DL
11597fi
11598
ba4481b5 11599ok_so_far=yes
409d9577 11600echo "$as_me:11600: checking for socket" >&5
503d2be0
AS
11601echo $ECHO_N "checking for socket... $ECHO_C" >&6
11602if test "${ac_cv_func_socket+set}" = set; then
11603 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11604else
503d2be0 11605 cat >conftest.$ac_ext <<_ACEOF
409d9577 11606#line 11606 "configure"
ba4481b5
DL
11607#include "confdefs.h"
11608/* System header to define __stub macros and hopefully few prototypes,
503d2be0 11609 which can conflict with char socket (); below. */
ba4481b5
DL
11610#include <assert.h>
11611/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11612#ifdef __cplusplus
11613extern "C"
11614#endif
ba4481b5 11615/* We use char because int might match the return type of a gcc2
503d2be0
AS
11616 builtin and then its argument prototype would still apply. */
11617char socket ();
11618char (*f) ();
ba4481b5 11619
503d2be0
AS
11620int
11621main ()
11622{
ba4481b5
DL
11623/* The GNU C library defines this for functions which it implements
11624 to always fail with ENOSYS. Some functions are actually named
11625 something starting with __ and the normal name is an alias. */
11626#if defined (__stub_socket) || defined (__stub___socket)
11627choke me
11628#else
503d2be0 11629f = socket;
ba4481b5
DL
11630#endif
11631
503d2be0
AS
11632 ;
11633 return 0;
11634}
11635_ACEOF
11636rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 11637if { (eval echo "$as_me:11637: \"$ac_link\"") >&5
503d2be0
AS
11638 (eval $ac_link) 2>&5
11639 ac_status=$?
409d9577 11640 echo "$as_me:11640: \$? = $ac_status" >&5
503d2be0
AS
11641 (exit $ac_status); } &&
11642 { ac_try='test -s conftest$ac_exeext'
409d9577 11643 { (eval echo "$as_me:11643: \"$ac_try\"") >&5
503d2be0
AS
11644 (eval $ac_try) 2>&5
11645 ac_status=$?
409d9577 11646 echo "$as_me:11646: \$? = $ac_status" >&5
503d2be0
AS
11647 (exit $ac_status); }; }; then
11648 ac_cv_func_socket=yes
11649else
11650 echo "$as_me: failed program was:" >&5
11651cat conftest.$ac_ext >&5
11652ac_cv_func_socket=no
11653fi
11654rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11655fi
409d9577 11656echo "$as_me:11656: result: $ac_cv_func_socket" >&5
503d2be0
AS
11657echo "${ECHO_T}$ac_cv_func_socket" >&6
11658if test $ac_cv_func_socket = yes; then
ba4481b5
DL
11659 :
11660else
503d2be0 11661 ok_so_far=no
ba4481b5
DL
11662fi
11663
11664if test $ok_so_far = yes; then
409d9577 11665 echo "$as_me:11665: checking for netinet/in.h" >&5
503d2be0
AS
11666echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
11667if test "${ac_cv_header_netinet_in_h+set}" = set; then
11668 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11669else
503d2be0 11670 cat >conftest.$ac_ext <<_ACEOF
409d9577 11671#line 11671 "configure"
ba4481b5
DL
11672#include "confdefs.h"
11673#include <netinet/in.h>
503d2be0 11674_ACEOF
409d9577 11675if { (eval echo "$as_me:11675: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11676 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11677 ac_status=$?
11678 egrep -v '^ *\+' conftest.er1 >conftest.err
11679 rm -f conftest.er1
11680 cat conftest.err >&5
409d9577 11681 echo "$as_me:11681: \$? = $ac_status" >&5
503d2be0
AS
11682 (exit $ac_status); } >/dev/null; then
11683 if test -s conftest.err; then
11684 ac_cpp_err=$ac_c_preproc_warn_flag
11685 else
11686 ac_cpp_err=
11687 fi
11688else
11689 ac_cpp_err=yes
11690fi
11691if test -z "$ac_cpp_err"; then
11692 ac_cv_header_netinet_in_h=yes
ba4481b5 11693else
503d2be0 11694 echo "$as_me: failed program was:" >&5
ba4481b5 11695 cat conftest.$ac_ext >&5
503d2be0 11696 ac_cv_header_netinet_in_h=no
ba4481b5 11697fi
503d2be0 11698rm -f conftest.err conftest.$ac_ext
ba4481b5 11699fi
409d9577 11700echo "$as_me:11700: result: $ac_cv_header_netinet_in_h" >&5
503d2be0
AS
11701echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
11702if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
11703 :
11704else
503d2be0 11705 ok_so_far=no
ba4481b5
DL
11706fi
11707
11708fi
11709if test $ok_so_far = yes; then
409d9577 11710 echo "$as_me:11710: checking for arpa/inet.h" >&5
503d2be0
AS
11711echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
11712if test "${ac_cv_header_arpa_inet_h+set}" = set; then
11713 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11714else
503d2be0 11715 cat >conftest.$ac_ext <<_ACEOF
409d9577 11716#line 11716 "configure"
ba4481b5
DL
11717#include "confdefs.h"
11718#include <arpa/inet.h>
503d2be0 11719_ACEOF
409d9577 11720if { (eval echo "$as_me:11720: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11721 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11722 ac_status=$?
11723 egrep -v '^ *\+' conftest.er1 >conftest.err
11724 rm -f conftest.er1
11725 cat conftest.err >&5
409d9577 11726 echo "$as_me:11726: \$? = $ac_status" >&5
503d2be0
AS
11727 (exit $ac_status); } >/dev/null; then
11728 if test -s conftest.err; then
11729 ac_cpp_err=$ac_c_preproc_warn_flag
11730 else
11731 ac_cpp_err=
11732 fi
11733else
11734 ac_cpp_err=yes
11735fi
11736if test -z "$ac_cpp_err"; then
11737 ac_cv_header_arpa_inet_h=yes
ba4481b5 11738else
503d2be0 11739 echo "$as_me: failed program was:" >&5
ba4481b5 11740 cat conftest.$ac_ext >&5
503d2be0 11741 ac_cv_header_arpa_inet_h=no
ba4481b5 11742fi
503d2be0 11743rm -f conftest.err conftest.$ac_ext
ba4481b5 11744fi
409d9577 11745echo "$as_me:11745: result: $ac_cv_header_arpa_inet_h" >&5
503d2be0
AS
11746echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
11747if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
11748 :
11749else
503d2be0 11750 ok_so_far=no
ba4481b5
DL
11751fi
11752
11753fi
11754if test $ok_so_far = yes; then
503d2be0 11755 cat >>confdefs.h <<\EOF
ba4481b5
DL
11756#define HAVE_INET_SOCKETS 1
11757EOF
11758
11759fi
11760
11761if test -f /usr/lpp/X11/bin/smt.exp; then
503d2be0 11762 cat >>confdefs.h <<\EOF
ba4481b5
DL
11763#define HAVE_AIX_SMT_EXP 1
11764EOF
11765
11766fi
11767
409d9577 11768echo "$as_me:11768: checking whether system supports dynamic ptys" >&5
503d2be0 11769echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6
3d9fec71 11770if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
409d9577 11771 echo "$as_me:11771: result: yes" >&5
503d2be0
AS
11772echo "${ECHO_T}yes" >&6
11773 cat >>confdefs.h <<\EOF
3d9fec71
DL
11774#define HAVE_DEV_PTMX 1
11775EOF
11776
11777else
409d9577 11778 echo "$as_me:11778: result: no" >&5
503d2be0 11779echo "${ECHO_T}no" >&6
3d9fec71
DL
11780fi
11781
409d9577 11782echo "$as_me:11782: checking for pid_t" >&5
503d2be0
AS
11783echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
11784if test "${ac_cv_type_pid_t+set}" = set; then
11785 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 11786else
503d2be0 11787 cat >conftest.$ac_ext <<_ACEOF
409d9577 11788#line 11788 "configure"
647847ea 11789#include "confdefs.h"
503d2be0
AS
11790$ac_includes_default
11791int
11792main ()
11793{
11794if ((pid_t *) 0)
11795 return 0;
11796if (sizeof (pid_t))
11797 return 0;
11798 ;
11799 return 0;
11800}
11801_ACEOF
11802rm -f conftest.$ac_objext
409d9577 11803if { (eval echo "$as_me:11803: \"$ac_compile\"") >&5
503d2be0
AS
11804 (eval $ac_compile) 2>&5
11805 ac_status=$?
409d9577 11806 echo "$as_me:11806: \$? = $ac_status" >&5
503d2be0
AS
11807 (exit $ac_status); } &&
11808 { ac_try='test -s conftest.$ac_objext'
409d9577 11809 { (eval echo "$as_me:11809: \"$ac_try\"") >&5
503d2be0
AS
11810 (eval $ac_try) 2>&5
11811 ac_status=$?
409d9577 11812 echo "$as_me:11812: \$? = $ac_status" >&5
503d2be0 11813 (exit $ac_status); }; }; then
647847ea
DL
11814 ac_cv_type_pid_t=yes
11815else
503d2be0
AS
11816 echo "$as_me: failed program was:" >&5
11817cat conftest.$ac_ext >&5
11818ac_cv_type_pid_t=no
647847ea 11819fi
503d2be0 11820rm -f conftest.$ac_objext conftest.$ac_ext
647847ea 11821fi
409d9577 11822echo "$as_me:11822: result: $ac_cv_type_pid_t" >&5
503d2be0
AS
11823echo "${ECHO_T}$ac_cv_type_pid_t" >&6
11824if test $ac_cv_type_pid_t = yes; then
11825 :
11826else
11827
11828cat >>confdefs.h <<EOF
647847ea
DL
11829#define pid_t int
11830EOF
11831
11832fi
11833
503d2be0
AS
11834for ac_header in unistd.h vfork.h
11835do
11836as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
409d9577 11837echo "$as_me:11837: checking for $ac_header" >&5
503d2be0
AS
11838echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11839if eval "test \"\${$as_ac_Header+set}\" = set"; then
11840 echo $ECHO_N "(cached) $ECHO_C" >&6
11841else
11842 cat >conftest.$ac_ext <<_ACEOF
409d9577 11843#line 11843 "configure"
503d2be0
AS
11844#include "confdefs.h"
11845#include <$ac_header>
11846_ACEOF
409d9577 11847if { (eval echo "$as_me:11847: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11848 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11849 ac_status=$?
11850 egrep -v '^ *\+' conftest.er1 >conftest.err
11851 rm -f conftest.er1
11852 cat conftest.err >&5
409d9577 11853 echo "$as_me:11853: \$? = $ac_status" >&5
503d2be0
AS
11854 (exit $ac_status); } >/dev/null; then
11855 if test -s conftest.err; then
11856 ac_cpp_err=$ac_c_preproc_warn_flag
11857 else
11858 ac_cpp_err=
11859 fi
647847ea 11860else
503d2be0
AS
11861 ac_cpp_err=yes
11862fi
11863if test -z "$ac_cpp_err"; then
11864 eval "$as_ac_Header=yes"
647847ea 11865else
503d2be0 11866 echo "$as_me: failed program was:" >&5
647847ea 11867 cat conftest.$ac_ext >&5
503d2be0 11868 eval "$as_ac_Header=no"
647847ea 11869fi
503d2be0 11870rm -f conftest.err conftest.$ac_ext
647847ea 11871fi
409d9577 11872echo "$as_me:11872: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11873echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11874if test `eval echo '${'$as_ac_Header'}'` = yes; then
11875 cat >>confdefs.h <<EOF
11876#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
647847ea
DL
11877EOF
11878
73b77ee5 11879fi
503d2be0 11880done
73b77ee5 11881
503d2be0
AS
11882for ac_func in fork vfork
11883do
11884as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
409d9577 11885echo "$as_me:11885: checking for $ac_func" >&5
503d2be0
AS
11886echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11887if eval "test \"\${$as_ac_var+set}\" = set"; then
11888 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 11889else
503d2be0 11890 cat >conftest.$ac_ext <<_ACEOF
409d9577 11891#line 11891 "configure"
fa0b693c
GM
11892#include "confdefs.h"
11893/* System header to define __stub macros and hopefully few prototypes,
503d2be0 11894 which can conflict with char $ac_func (); below. */
fa0b693c
GM
11895#include <assert.h>
11896/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11897#ifdef __cplusplus
11898extern "C"
11899#endif
fa0b693c 11900/* We use char because int might match the return type of a gcc2
503d2be0
AS
11901 builtin and then its argument prototype would still apply. */
11902char $ac_func ();
11903char (*f) ();
fa0b693c 11904
503d2be0
AS
11905int
11906main ()
11907{
fa0b693c
GM
11908/* The GNU C library defines this for functions which it implements
11909 to always fail with ENOSYS. Some functions are actually named
11910 something starting with __ and the normal name is an alias. */
503d2be0 11911#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
fa0b693c
GM
11912choke me
11913#else
503d2be0 11914f = $ac_func;
fa0b693c
GM
11915#endif
11916
503d2be0
AS
11917 ;
11918 return 0;
11919}
11920_ACEOF
11921rm -f conftest.$ac_objext conftest$ac_exeext
409d9577 11922if { (eval echo "$as_me:11922: \"$ac_link\"") >&5
503d2be0
AS
11923 (eval $ac_link) 2>&5
11924 ac_status=$?
409d9577 11925 echo "$as_me:11925: \$? = $ac_status" >&5
503d2be0
AS
11926 (exit $ac_status); } &&
11927 { ac_try='test -s conftest$ac_exeext'
409d9577 11928 { (eval echo "$as_me:11928: \"$ac_try\"") >&5
503d2be0
AS
11929 (eval $ac_try) 2>&5
11930 ac_status=$?
409d9577 11931 echo "$as_me:11931: \$? = $ac_status" >&5
503d2be0
AS
11932 (exit $ac_status); }; }; then
11933 eval "$as_ac_var=yes"
11934else
11935 echo "$as_me: failed program was:" >&5
11936cat conftest.$ac_ext >&5
11937eval "$as_ac_var=no"
11938fi
11939rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11940fi
409d9577 11941echo "$as_me:11941: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
11942echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11943if test `eval echo '${'$as_ac_var'}'` = yes; then
11944 cat >>confdefs.h <<EOF
11945#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
fa0b693c 11946EOF
503d2be0 11947
fa0b693c 11948fi
503d2be0 11949done
fa0b693c 11950
503d2be0
AS
11951ac_cv_func_fork_works=$ac_cv_func_fork
11952if test "x$ac_cv_func_fork" = xyes; then
409d9577 11953 echo "$as_me:11953: checking for working fork" >&5
503d2be0
AS
11954echo $ECHO_N "checking for working fork... $ECHO_C" >&6
11955if test "${ac_cv_func_fork_works+set}" = set; then
11956 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 11957else
503d2be0
AS
11958 if test "$cross_compiling" = yes; then
11959 ac_cv_func_fork_works=cross
11960else
11961 cat >conftest.$ac_ext <<_ACEOF
11962