(calc-keypad-mode): New.
[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
b1b84649 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` ||
b1b84649 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
b1b84649 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
1299 ## NetBSD ports
1300 *-*-netbsd* )
1301 opsys=netbsd
1302 case "${canonical}" in
1303 alpha*-*-netbsd*) machine=alpha ;;
1304 i[3456]86-*-netbsd*) machine=intel386 ;;
1305 m68k-*-netbsd*)
1306 # This is somewhat bogus.
1307 machine=hp9000s300 ;;
1308 powerpc-apple-netbsd*) machine=macppc ;;
1309 mips-*-netbsd*) machine=pmax ;;
2df636f4 1310 mipsel-*-netbsd*) machine=pmax ;;
ba4481b5 1311 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 1312 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 1313 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 1314 vax-*-netbsd*) machine=vax ;;
2df636f4 1315 arm-*-netbsd*) machine=arm ;;
ba4481b5
DL
1316 esac
1317 ;;
1318
1319 ## OpenBSD ports
1320 *-*-openbsd* )
1321 opsys=openbsd
1322 case "${canonical}" in
1323 alpha*-*-openbsd*) machine=alpha ;;
1324 i386-*-openbsd*) machine=intel386 ;;
1325 m68k-*-openbsd*) machine=hp9000s300 ;;
1326 mipsel-*-openbsd*) machine=pmax ;;
1327 ns32k-*-openbsd*) machine=ns32000 ;;
1328 sparc-*-openbsd*) machine=sparc ;;
1329 vax-*-openbsd*) machine=vax ;;
1330 esac
1331 ;;
1332
1333 ## Acorn RISCiX:
1334 arm-acorn-riscix1.1* )
1335 machine=acorn opsys=riscix1-1
1336 ;;
1337 arm-acorn-riscix1.2* | arm-acorn-riscix )
1338 ## This name is riscix12 instead of riscix1.2
1339 ## to avoid a file name conflict on MSDOS.
1340 machine=acorn opsys=riscix12
1341 ;;
1342
1343 ## BSDI ports
1344 *-*-bsdi* )
1345 opsys=bsdi
1346 case "${canonical}" in
1347 i[345]86-*-bsdi*) machine=intel386 ;;
1348 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 1349 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
1350 esac
1351 case "${canonical}" in
1352 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
1353 *-*-bsdi2.0* ) opsys=bsdos2 ;;
1354 *-*-bsdi2* ) opsys=bsdos2-1 ;;
1355 *-*-bsdi3* ) opsys=bsdos3 ;;
1356 *-*-bsdi4* ) opsys=bsdos4 ;;
1357 esac
1358 ;;
1359
1360 ## Alliant machines
1361 ## Strictly speaking, we need the version of the alliant operating
1362 ## system to choose the right machine file, but currently the
1363 ## configuration name doesn't tell us enough to choose the right
1364 ## one; we need to give alliants their own operating system name to
1365 ## do this right. When someone cares, they can help us.
1366 fx80-alliant-* )
1367 machine=alliant4 opsys=bsd4-2
1368 ;;
1369 i860-alliant-* )
1370 machine=alliant-2800 opsys=bsd4-3
1371 ;;
1372
1373 ## Alpha (DEC) machines.
1374 alpha*-dec-osf* )
1375 machine=alpha opsys=osf1
1376 # This is needed to find X11R6.1 libraries for certain tests.
1377 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
1378 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
1379 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
1380 # due to non-traditional preprocessing with the current compiler
1381 # defaults. OSF 4 can also have that compiler version, and there
1382 # seems always to have been a usable /usr/bin/cpp.
1383 NON_GNU_CPP=/usr/bin/cpp
ca512671 1384 case "${canonical}" in
a55b799a 1385 alpha*-dec-osf[5-9]*)
bb17930d 1386 opsys=osf5-0 ;;
ca512671 1387 esac
ba4481b5
DL
1388 ;;
1389
1390 alpha*-*-linux-gnu* )
1391 machine=alpha opsys=gnu-linux
1392 ;;
1393
c4bb2108
DL
1394 arm*-*-linux-gnu* )
1395 machine=arm opsys=gnu-linux
1396 ;;
1397
1398 ppc-*-linux | \
1399 powerpc-*-linux* )
3aeecf97 1400 machine=macppc opsys=gnu-linux
c4bb2108
DL
1401 ;;
1402
ba4481b5
DL
1403 ## Altos 3068
1404 m68*-altos-sysv* )
1405 machine=altos opsys=usg5-2
1406 ;;
1407
1408 ## Amdahl UTS
1409 580-amdahl-sysv* )
1410 machine=amdahl opsys=usg5-2-2
1411 ;;
1412
1413 ## Apollo, Domain/OS
1414 m68*-apollo-* )
1415 machine=apollo opsys=bsd4-3
1416 ;;
1417
1418 ## AT&T 3b2, 3b5, 3b15, 3b20
1419 we32k-att-sysv* )
1420 machine=att3b opsys=usg5-2-2
1421 ;;
1422
1423 ## AT&T 3b1 - The Mighty Unix PC!
1424 m68*-att-sysv* )
1425 machine=7300 opsys=usg5-2-2
1426 ;;
1427
1428 ## Bull dpx20
1429 rs6000-bull-bosx* )
1430 machine=ibmrs6000 opsys=aix3-2
1431 ;;
1432
1433 ## Bull dpx2
1434 m68*-bull-sysv3* )
1435 machine=dpx2 opsys=usg5-3
1436 ;;
1437
1438 ## Bull sps7
1439 m68*-bull-sysv2* )
1440 machine=sps7 opsys=usg5-2
1441 ;;
1442
1443 ## CCI 5/32, 6/32 -- see "Tahoe".
1444
1445 ## Celerity
1446 ## I don't know what configuration name to use for this; config.sub
1447 ## doesn't seem to know anything about it. Hey, Celerity users, get
1448 ## in touch with us!
1449 celerity-celerity-bsd* )
1450 machine=celerity opsys=bsd4-2
1451 ;;
1452
1453 ## Clipper
1454 ## What operating systems does this chip run that Emacs has been
1455 ## tested on?
1456 clipper-* )
1457 machine=clipper
1458 ## We'll use the catch-all code at the bottom to guess the
1459 ## operating system.
1460 ;;
1461
1462 ## Convex
1463 *-convex-bsd* | *-convex-convexos* )
1464 machine=convex opsys=bsd4-3
1465 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
1466 NON_GNU_CPP="cc -E -P"
1467 ;;
1468
1469 ## Cubix QBx/386
1470 i[3456]86-cubix-sysv* )
1471 machine=intel386 opsys=usg5-3
1472 ;;
1473
1474 ## Cydra 5
1475 cydra*-cydrome-sysv* )
1476 machine=cydra5 opsys=usg5-3
1477 ;;
1478
1479 ## Data General AViiON Machines
1480 ## DG changed naming conventions with the release of 5.4.4.10, they
1481 ## dropped the initial 5.4 but left the intervening R. Because of the
1482 ## R this shouldn't conflict with older versions of the OS (which I
1483 ## think were named like dgux4.*). In addition, DG new AViiONs series
1484 ## uses either Motorola M88k or Intel Pentium CPUs.
1485 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
1486 machine=aviion opsys=dgux4
1487 ;;
1488 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
1489 ## This name is dgux5-4-3 instead of dgux5-4r3
1490 ## to avoid a file name conflict on MSDOS.
1491 machine=aviion opsys=dgux5-4-3
1492 ;;
1493 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
1494 machine=aviion opsys=dgux5-4r2
1495 ;;
1496 m88k-dg-dgux* )
1497 machine=aviion opsys=dgux
1498 ;;
1499
1500 ## Data General AViiON Intel (x86) Machines
1501 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
1502 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
1503 i[345]86-dg-dguxR4* )
1504 machine=aviion-intel opsys=dgux4
1505 ;;
1506
1507 ## DECstations
1508 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1509 machine=pmax opsys=bsd4-2
1510 ;;
1511 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1512 machine=pmax opsys=bsd4-3
1513 ;;
1514 mips-dec-ultrix* )
1515 machine=pmax opsys=ultrix4-3
1516 ;;
1517 mips-dec-osf* )
1518 machine=pmax opsys=osf1
1519 ;;
1520 mips-dec-mach_bsd4.3* )
1521 machine=pmax opsys=mach-bsd4-3
1522 ;;
1523
1524 ## Motorola Delta machines
1525 m68k-motorola-sysv* | m68000-motorola-sysv* )
1526 machine=delta opsys=usg5-3
1527 if test -z "`type gnucc | grep 'not found'`"
1528 then
1529 if test -s /etc/167config
1530 then CC="gnucc -m68040"
1531 else CC="gnucc -m68881"
1532 fi
1533 else
1534 if test -z "`type gcc | grep 'not found'`"
1535 then CC=gcc
1536 else CC=cc
1537 fi
1538 fi
1539 ;;
1540 m88k-motorola-sysv4* )
1541 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1542 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1543 # I hope there are not other 4.0 versions for this machine
1544 # which really need usg5-4 instead.
1545 machine=delta88k opsys=usg5-4-2
1546 ;;
1547 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1548 machine=delta88k opsys=usg5-3
1549 ;;
1550
1551 ## Dual machines
1552 m68*-dual-sysv* )
1553 machine=dual opsys=usg5-2
1554 ;;
1555 m68*-dual-uniplus* )
1556 machine=dual opsys=unipl5-2
1557 ;;
1558
1559 ## Elxsi 6400
1560 elxsi-elxsi-sysv* )
1561 machine=elxsi opsys=usg5-2
1562 ;;
1563
1564 ## Encore machines
1565 ns16k-encore-bsd* )
1566 machine=ns16000 opsys=umax
1567 ;;
1568
65171e3a
DL
1569 ## The GEC 63 - apparently, this port isn't really finished yet.
1570 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
1571
1572 ## Gould Power Node and NP1
1573 pn-gould-bsd4.2* )
1574 machine=gould opsys=bsd4-2
1575 ;;
1576 pn-gould-bsd4.3* )
1577 machine=gould opsys=bsd4-3
1578 ;;
1579 np1-gould-bsd* )
1580 machine=gould-np1 opsys=bsd4-3
1581 ;;
1582
1583 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
1584 ## as far as Emacs is concerned).
1585 m88k-harris-cxux* )
1586 # Build needs to be different on 7.0 and later releases
1587 case "`uname -r`" in
1588 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
1589 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
1590 esac
1591 NON_GNU_CPP="/lib/cpp"
1592 ;;
1593 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
1594 m68k-harris-cxux* )
1595 machine=nh3000 opsys=cxux
1596 ;;
1597 ## Harris power pc NightHawk running Power UNIX (Series 6000)
1598 powerpc-harris-powerunix )
1599 machine=nh6000 opsys=powerunix
1600 NON_GNU_CPP="cc -Xo -E -P"
1601 ;;
1602 ## SR2001/SR2201 running HI-UX/MPP
1603 hppa1.1-hitachi-hiuxmpp* )
1604 machine=sr2k opsys=hiuxmpp
1605 ;;
89a336fa
GM
1606 hppa1.1-hitachi-hiuxwe2* )
1607 machine=sr2k opsys=hiuxwe2
1608 ;;
ba4481b5
DL
1609 ## Honeywell XPS100
1610 xps*-honeywell-sysv* )
1611 machine=xps100 opsys=usg5-2
1612 ;;
1613
1614 ## HP 9000 series 200 or 300
1615 m68*-hp-bsd* )
1616 machine=hp9000s300 opsys=bsd4-3
1617 ;;
1618 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
1619 m68*-hp-hpux* )
1620 case "`uname -r`" in
1621 ## Someone's system reports A.B8.05 for this.
1622 ## I wonder what other possibilities there are.
1623 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
1624 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
1625 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
1626 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
1627 *) machine=hp9000s300 opsys=hpux ;;
1628 esac
1629 ;;
1630
1631 ## HP 9000 series 700 and 800, running HP/UX
1632 hppa*-hp-hpux7* )
1633 machine=hp800 opsys=hpux
1634 ;;
1635 hppa*-hp-hpux8* )
1636 machine=hp800 opsys=hpux8
1637 ;;
1638 hppa*-hp-hpux9shr* )
1639 machine=hp800 opsys=hpux9shr
1640 ;;
1641 hppa*-hp-hpux9* )
1642 machine=hp800 opsys=hpux9
1643 ;;
cc227489 1644 hppa*-hp-hpux10* )
ba4481b5
DL
1645 machine=hp800 opsys=hpux10
1646 ;;
cc227489
MB
1647 hppa*-hp-hpux1[1-9]* )
1648 machine=hp800 opsys=hpux11
1649 ;;
ba4481b5
DL
1650
1651 ## HP 9000 series 700 and 800, running HP/UX
1652 hppa*-hp-hpux* )
1653 ## Cross-compilation? Nah!
1654 case "`uname -r`" in
1655 ## Someone's system reports A.B8.05 for this.
1656 ## I wonder what other possibilities there are.
1657 *.B8.* ) machine=hp800 opsys=hpux8 ;;
1658 *.08.* ) machine=hp800 opsys=hpux8 ;;
1659 *.09.* ) machine=hp800 opsys=hpux9 ;;
1660 *) machine=hp800 opsys=hpux10 ;;
1661 esac
1662 ;;
1663 hppa*-*-nextstep* )
1664 machine=hp800 opsys=nextstep
1665 ;;
1666
1667 ## Orion machines
1668 orion-orion-bsd* )
1669 machine=orion opsys=bsd4-2
1670 ;;
1671 clipper-orion-bsd* )
1672 machine=orion105 opsys=bsd4-2
1673 ;;
1674
1675 ## IBM machines
1676 i[3456]86-ibm-aix1.1* )
1677 machine=ibmps2-aix opsys=usg5-2-2
1678 ;;
1679 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
1680 machine=ibmps2-aix opsys=usg5-3
1681 ;;
1682 i370-ibm-aix*)
1683 machine=ibm370aix opsys=usg5-3
1684 ;;
138f0859
GM
1685 s390-*-linux-gnu)
1686 machine=ibms390 opsys=gnu-linux
1687 ;;
ba4481b5
DL
1688 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
1689 machine=ibmrs6000 opsys=aix3-1
1690 ;;
1691 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
1692 machine=ibmrs6000 opsys=aix3-2-5
1693 ;;
1694 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
1695 machine=ibmrs6000 opsys=aix4-1
1696 ;;
1697 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
1698 machine=ibmrs6000 opsys=aix4-2
1699 ;;
1700 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
1701 machine=ibmrs6000 opsys=aix4
1702 ;;
1703 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
1704 machine=ibmrs6000 opsys=aix4-1
1705 ;;
1706 rs6000-ibm-aix* | powerpc-ibm-aix* )
1707 machine=ibmrs6000 opsys=aix3-2
1708 ;;
1709 romp-ibm-bsd4.3* )
1710 machine=ibmrt opsys=bsd4-3
1711 ;;
1712 romp-ibm-bsd4.2* )
1713 machine=ibmrt opsys=bsd4-2
1714 ;;
1715 romp-ibm-aos4.3* )
1716 machine=ibmrt opsys=bsd4-3
1717 ;;
1718 romp-ibm-aos4.2* )
1719 machine=ibmrt opsys=bsd4-2
1720 ;;
1721 romp-ibm-aos* )
1722 machine=ibmrt opsys=bsd4-3
1723 ;;
1724 romp-ibm-bsd* )
1725 machine=ibmrt opsys=bsd4-3
1726 ;;
1727 romp-ibm-aix* )
1728 machine=ibmrt-aix opsys=usg5-2-2
1729 ;;
1730
1731 ## Integrated Solutions `Optimum V'
1732 m68*-isi-bsd4.2* )
1733 machine=isi-ov opsys=bsd4-2
1734 ;;
1735 m68*-isi-bsd4.3* )
1736 machine=isi-ov opsys=bsd4-3
1737 ;;
1738
1739 ## Intel 386 machines where we do care about the manufacturer
1740 i[3456]86-intsys-sysv* )
1741 machine=is386 opsys=usg5-2-2
1742 ;;
1743
1744 ## Prime EXL
1745 i[3456]86-prime-sysv* )
1746 machine=i386 opsys=usg5-3
1747 ;;
1748
1749 ## Sequent Symmetry running Dynix
1750 i[3456]86-sequent-bsd* )
1751 machine=symmetry opsys=bsd4-3
1752 ;;
1753
1754 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
1755 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
1756 machine=sequent-ptx opsys=ptx4
1757 NON_GNU_CPP=/lib/cpp
1758 ;;
1759
1760 ## Sequent Symmetry running DYNIX/ptx
1761 ## Use the old cpp rather than the newer ANSI one.
1762 i[3456]86-sequent-ptx* )
1763 machine=sequent-ptx opsys=ptx
1764 NON_GNU_CPP="/lib/cpp"
1765 ;;
1766
1767 ## ncr machine running svr4.3.
1768 i[3456]86-ncr-sysv4.3 )
1769 machine=ncr386 opsys=usg5-4-3
1770 ;;
1771
1772 ## Unspecified sysv on an ncr machine defaults to svr4.2.
1773 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
1774 i[3456]86-ncr-sysv* )
1775 machine=ncr386 opsys=usg5-4-2
1776 ;;
1777
1778 ## Intel Paragon OSF/1
1779 i860-intel-osf1* )
1780 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
1781 ;;
1782
1783 ## Intel 860
1784 i860-*-sysv4* )
1785 machine=i860 opsys=usg5-4
1786 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
1787 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
1788 ;;
1789
c76e04a8
GM
1790 ## Macintosh PowerPC
1791 powerpc*-*-linux-gnu* )
1792 machine=macppc opsys=gnu-linux
1793 ;;
1794
ba4481b5
DL
1795 ## Masscomp machines
1796 m68*-masscomp-rtu* )
1797 machine=masscomp opsys=rtu
1798 ;;
1799
1800 ## Megatest machines
1801 m68*-megatest-bsd* )
1802 machine=mega68 opsys=bsd4-2
1803 ;;
1804
1805 ## Workstations sold by MIPS
1806 ## This is not necessarily all workstations using the MIPS processor -
1807 ## Irises are produced by SGI, and DECstations by DEC.
1808
1809 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
1810 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
1811 ## it gives for choosing between the alternatives seems to be "Use
1812 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
1813 ## the BSD world." I'll assume that these are instructions for
1814 ## handling two odd situations, and that every other situation
1815 ## should use mips.h and usg5-2-2, they being listed first.
1816 mips-mips-usg* )
1817 machine=mips4
1818 ## Fall through to the general code at the bottom to decide on the OS.
1819 ;;
1820 mips-mips-riscos4* )
1821 machine=mips4 opsys=bsd4-3
1822 NON_GNU_CC="cc -systype bsd43"
1823 NON_GNU_CPP="cc -systype bsd43 -E"
1824 ;;
1825 mips-mips-riscos5* )
1826 machine=mips4 opsys=riscos5
1827 NON_GNU_CC="cc -systype bsd43"
1828 NON_GNU_CPP="cc -systype bsd43 -E"
1829 ;;
1830 mips-mips-bsd* )
1831 machine=mips opsys=bsd4-3
1832 ;;
1833 mips-mips-* )
1834 machine=mips opsys=usg5-2-2
1835 ;;
1836
1837 ## NeXT
1838 m68*-next-* | m68k-*-nextstep* )
1839 machine=m68k opsys=nextstep
1840 ;;
1841
1842 ## The complete machine from National Semiconductor
1843 ns32k-ns-genix* )
1844 machine=ns32000 opsys=usg5-2
1845 ;;
1846
1847 ## NCR machines
1848 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
1849 machine=tower32 opsys=usg5-2-2
1850 ;;
1851 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
1852 machine=tower32v3 opsys=usg5-3
1853 ;;
1854
1855 ## NEC EWS4800
1856 mips-nec-sysv4*)
1857 machine=ews4800 opsys=ux4800
1858 ;;
1859
1860 ## Nixdorf Targon 31
1861 m68*-nixdorf-sysv* )
1862 machine=targon31 opsys=usg5-2-2
1863 ;;
1864
1865 ## Nu (TI or LMI)
1866 m68*-nu-sysv* )
1867 machine=nu opsys=usg5-2
1868 ;;
1869
1870 ## Plexus
1871 m68*-plexus-sysv* )
1872 machine=plexus opsys=usg5-2
1873 ;;
1874
1875 ## PowerPC reference platform
1876 powerpcle-*-solaris2* )
1877 machine=prep
1878 opsys=sol2-5
1879 ;;
1880
1881 ## Pyramid machines
1882 ## I don't really have any idea what sort of processor the Pyramid has,
1883 ## so I'm assuming it is its own architecture.
1884 pyramid-pyramid-bsd* )
1885 machine=pyramid opsys=bsd4-2
1886 ;;
1887
1888 ## Sequent Balance
1889 ns32k-sequent-bsd4.2* )
1890 machine=sequent opsys=bsd4-2
1891 ;;
1892 ns32k-sequent-bsd4.3* )
1893 machine=sequent opsys=bsd4-3
1894 ;;
1895
1896 ## Siemens Nixdorf
1897 mips-siemens-sysv* | mips-sni-sysv*)
1898 machine=mips-siemens opsys=usg5-4
1899 NON_GNU_CC=/usr/ccs/bin/cc
1900 NON_GNU_CPP=/usr/ccs/lib/cpp
1901 ;;
1902
1903 ## Silicon Graphics machines
1904 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
1905 m68*-sgi-iris3.5* )
1906 machine=irist opsys=iris3-5
1907 ;;
1908 m68*-sgi-iris3.6* | m68*-sgi-iris*)
1909 machine=irist opsys=iris3-6
1910 ;;
1911 ## Iris 4D
1912 mips-sgi-irix3* )
1913 machine=iris4d opsys=irix3-3
1914 ;;
1915 mips-sgi-irix4* )
1916 machine=iris4d opsys=irix4-0
1917 ;;
1918 mips-sgi-irix6.5 )
1919 machine=iris4d opsys=irix6-5
946173ad
DL
1920 # Without defining _LANGUAGE_C, things get masked out in the headers
1921 # so that, for instance, grepping for `free' in stdlib.h fails and
1922 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
1923 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 1924 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
1925 ;;
1926 mips-sgi-irix6* )
1927 machine=iris4d opsys=irix6-0
c4bb2108 1928 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
1929 # but presumably it does no harm.
1930 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 1931 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
1932 NON_GCC_TEST_OPTIONS=-32
1933 ;;
1934 mips-sgi-irix5.[01]* )
1935 machine=iris4d opsys=irix5-0
1936 ;;
1937 mips-sgi-irix5* | mips-sgi-irix* )
1938 machine=iris4d opsys=irix5-2
1939 ;;
1940
1941 ## SONY machines
1942 m68*-sony-bsd4.2* )
1943 machine=news opsys=bsd4-2
1944 ;;
1945 m68*-sony-bsd4.3* )
1946 machine=news opsys=bsd4-3
1947 ;;
1948 m68*-sony-newsos3* | m68*-sony-news3*)
1949 machine=news opsys=bsd4-3
1950 ;;
1951 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
1952 machine=news-risc opsys=bsd4-3
1953 ;;
1954 mips-sony-newsos6* )
1955 machine=news-r6 opsys=newsos6
1956 ;;
1957 mips-sony-news* )
1958 machine=news-risc opsys=newsos5
1959 ;;
1960
1961 ## Stride
1962 m68*-stride-sysv* )
1963 machine=stride opsys=usg5-2
1964 ;;
1965
1966 ## Suns
1967 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
1968 machine=sparc opsys=gnu-linux
1969 ;;
1970
d054101f 1971 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
1972 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
1973 | rs6000-*-solaris2*)
1974 case "${canonical}" in
1975 m68*-sunos1* ) machine=sun1 ;;
1976 m68*-sunos2* ) machine=sun2 ;;
1977 m68* ) machine=sun3 ;;
1978 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
1979 i[3456]86-*-* ) machine=intel386 ;;
1980 powerpcle* ) machine=powerpcle ;;
1981 powerpc* | rs6000* ) machine=ibmrs6000 ;;
1982 sparc* ) machine=sparc ;;
1983 * ) unported=yes ;;
1984 esac
1985 case "${canonical}" in
1986 ## The Sun386 didn't get past 4.0.
1987 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
1988 *-sunos4.0* ) opsys=sunos4-0 ;;
1989 *-sunos4.1.[3-9]*noshare )
1990 ## This name is sunos413 instead of sunos4-1-3
1991 ## to avoid a file name conflict on MSDOS.
1992 opsys=sunos413
1993 NON_GNU_CPP=/usr/lib/cpp
1994 NON_GCC_TEST_OPTIONS=-Bstatic
1995 GCC_TEST_OPTIONS=-static
1996 ;;
1997 *-sunos4.1.[3-9]* | *-sunos4shr*)
1998 opsys=sunos4shr
1999 NON_GNU_CPP=/usr/lib/cpp
2000 ;;
2001 *-sunos4* | *-sunos )
2002 opsys=sunos4-1
2003 NON_GCC_TEST_OPTIONS=-Bstatic
2004 GCC_TEST_OPTIONS=-static
2005 ;;
2006 *-sunos5.3* | *-solaris2.3* )
2007 opsys=sol2-3
2008 NON_GNU_CPP=/usr/ccs/lib/cpp
2009 ;;
2010 *-sunos5.4* | *-solaris2.4* )
2011 opsys=sol2-4
2012 NON_GNU_CPP=/usr/ccs/lib/cpp
2013 RANLIB="ar -ts"
2014 ;;
2015 *-sunos5.5* | *-solaris2.5* )
2016 opsys=sol2-5
2017 NON_GNU_CPP=/usr/ccs/lib/cpp
2018 RANLIB="ar -ts"
2019 ;;
2020 *-sunos5* | *-solaris* )
2021 opsys=sol2-5
2022 NON_GNU_CPP=/usr/ccs/lib/cpp
2023 ;;
2024 * ) opsys=bsd4-2 ;;
2025 esac
2026 ## Watch out for a compiler that we know will not work.
2027 case "${canonical}" in
2028 *-solaris* | *-sunos5* )
2029 if [ "x$CC" = x/usr/ucb/cc ]; then
2030 ## /usr/ucb/cc doesn't work;
2031 ## we should find some other compiler that does work.
2032 unset CC
2033 fi
2034 ;;
2035 *) ;;
2036 esac
2037 ;;
2038 sparc-*-nextstep* )
2039 machine=sparc opsys=nextstep
2040 ;;
2041
2042 ## Tadpole 68k
2043 m68*-tadpole-sysv* )
2044 machine=tad68k opsys=usg5-3
2045 ;;
2046
2047 ## Tahoe machines
2048 tahoe-tahoe-bsd4.2* )
2049 machine=tahoe opsys=bsd4-2
2050 ;;
2051 tahoe-tahoe-bsd4.3* )
2052 machine=tahoe opsys=bsd4-3
2053 ;;
2054
2055 ## Tandem Integrity S2
2056 mips-tandem-sysv* )
2057 machine=tandem-s2 opsys=usg5-3
2058 ;;
2059
2060 ## Tektronix XD88
2061 m88k-tektronix-sysv3* )
2062 machine=tekxd88 opsys=usg5-3
2063 ;;
2064
2065 ## Tektronix 16000 box (6130?)
2066 ns16k-tektronix-bsd* )
2067 machine=ns16000 opsys=bsd4-2
2068 ;;
2069 ## Tektronix 4300
2070 ## src/m/tek4300.h hints that this is a m68k machine.
2071 m68*-tektronix-bsd* )
2072 machine=tek4300 opsys=bsd4-3
2073 ;;
2074
2075 ## Titan P2 or P3
2076 ## We seem to have lost the machine-description file titan.h!
2077 titan-titan-sysv* )
2078 machine=titan opsys=usg5-3
2079 ;;
2080
2081 ## Ustation E30 (SS5E)
2082 m68*-unisys-uniplus* )
2083 machine=ustation opsystem=unipl5-2
2084 ;;
2085
2086 ## Vaxen.
2087 vax-dec-* )
2088 machine=vax
2089 case "${canonical}" in
2090 *-bsd4.1* ) opsys=bsd4-1 ;;
2091 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
2092 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
2093 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
2094 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
2095 *-vms* ) opsys=vms ;;
2096 * ) unported=yes
2097 esac
2098 ;;
2099
2100 ## Whitechapel MG1
2101 ns16k-whitechapel-* )
2102 machine=mg1
2103 ## We don't know what sort of OS runs on these; we'll let the
2104 ## operating system guessing code below try.
2105 ;;
2106
2107 ## Wicat
2108 m68*-wicat-sysv* )
2109 machine=wicat opsys=usg5-2
2110 ;;
2111
f4988be7
GM
2112 ## IA-64
2113 ia64*-*-linux* )
2114 machine=ia64 opsys=gnu-linux
2115 ;;
2116
ba4481b5
DL
2117 ## Intel 386 machines where we don't care about the manufacturer
2118 i[3456]86-*-* )
2119 machine=intel386
2120 case "${canonical}" in
9f817ea4 2121 *-lynxos* ) opsys=lynxos ;;
ba4481b5
DL
2122 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
2123 *-isc2.2* ) opsys=isc2-2 ;;
2124 *-isc4.0* ) opsys=isc4-0 ;;
2125 *-isc4.* ) opsys=isc4-1
2126 GCC_TEST_OPTIONS=-posix
2127 NON_GCC_TEST_OPTIONS=-Xp
2128 ;;
2129 *-isc* ) opsys=isc3-0 ;;
2130 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
2131 *-esix* ) opsys=esix ;;
2132 *-xenix* ) opsys=xenix ;;
2133 *-linux-gnu* ) opsys=gnu-linux ;;
2134 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 2135 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
2136 NON_GNU_CPP=/lib/cpp
2137 # Prevent -belf from being passed to $CPP.
2138 # /lib/cpp does not accept it.
2139 OVERRIDE_CPPFLAGS=" "
2140 ;;
2141 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2142 *-386bsd* ) opsys=386bsd ;;
2143 *-freebsd* ) opsys=freebsd ;;
2144 *-nextstep* ) opsys=nextstep ;;
2145 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2146 esac
2147 ;;
2148
2149 ## m68k Linux-based GNU system
2150 m68k-*-linux-gnu* )
2151 machine=m68k opsys=gnu-linux
2152 ;;
2153
2154 ## Mips Linux-based GNU system
2155 mips-*-linux-gnu* )
2156 machine=mips opsys=gnu-linux
2157 ;;
2158
2159 ## UXP/DS
2160 sparc-fujitsu-sysv4* )
2161 machine=sparc opsys=uxpds
2162 NON_GNU_CPP=/usr/ccs/lib/cpp
2163 RANLIB="ar -ts"
2164 ;;
2165
2166 ## UXP/V
2167 f301-fujitsu-uxpv4.1)
2168 machine=f301 opsys=uxpv
2169 ;;
2170
2171 * )
2172 unported=yes
2173 ;;
2174esac
2175
2176### If the code above didn't choose an operating system, just choose
2177### an operating system based on the configuration name. You really
2178### only want to use this when you have no idea what the right
2179### operating system is; if you know what operating systems a machine
2180### runs, it's cleaner to make it explicit in the case statement
2181### above.
2182if test x"${opsys}" = x; then
2183 case "${canonical}" in
2184 *-gnu* ) opsys=gnu ;;
2185 *-bsd4.[01] ) opsys=bsd4-1 ;;
2186 *-bsd4.2 ) opsys=bsd4-2 ;;
2187 *-bsd4.3 ) opsys=bsd4-3 ;;
2188 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
2189 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
2190 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
2191 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
2192 *-sysv4.2uw* ) opsys=unixware ;;
2193 *-sysv4.1* | *-sysvr4.1* )
2194 NON_GNU_CPP=/usr/lib/cpp
2195 opsys=usg5-4 ;;
2196 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2197 if [ x$NON_GNU_CPP = x ]; then
2198 if [ -f /usr/ccs/lib/cpp ]; then
2199 NON_GNU_CPP=/usr/ccs/lib/cpp
2200 else
2201 NON_GNU_CPP=/lib/cpp
2202 fi
2203 fi
2204 opsys=usg5-4-2 ;;
2205 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2206 * )
2207 unported=yes
2208 ;;
2209 esac
2210fi
2211
ba4481b5 2212if test $unported = yes; then
b1b84649 2213 { { echo "$as_me:2213: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2214Check \`etc/MACHINES' for recognized configuration names." >&5
2215echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2216Check \`etc/MACHINES' for recognized configuration names." >&2;}
2217 { (exit 1); exit 1; }; }
ba4481b5
DL
2218fi
2219
2220machfile="m/${machine}.h"
2221opsysfile="s/${opsys}.h"
2222
ba4481b5
DL
2223#### Choose a compiler.
2224test -n "$CC" && cc_specified=yes
2225
2226# Save the value of CFLAGS that the user specified.
2227SPECIFIED_CFLAGS="$CFLAGS"
2228
2229case ${with_gcc} in
2230 "yes" ) CC="gcc" GCC=yes ;;
2231 "no" ) : ${CC=cc} ;;
503d2be0
AS
2232 * )
2233esac
2234ac_ext=c
2235ac_cpp='$CPP $CPPFLAGS'
2236ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2237ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2238ac_compiler_gnu=$ac_cv_c_compiler_gnu
2239if test -n "$ac_tool_prefix"; then
2240 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2241set dummy ${ac_tool_prefix}gcc; ac_word=$2
b1b84649 2242echo "$as_me:2242: checking for $ac_word" >&5
503d2be0
AS
2243echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2244if test "${ac_cv_prog_CC+set}" = set; then
2245 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2246else
2247 if test -n "$CC"; then
2248 ac_cv_prog_CC="$CC" # Let the user override the test.
2249else
503d2be0
AS
2250 ac_save_IFS=$IFS; IFS=$ac_path_separator
2251ac_dummy="$PATH"
2252for ac_dir in $ac_dummy; do
2253 IFS=$ac_save_IFS
2254 test -z "$ac_dir" && ac_dir=.
2255 $as_executable_p "$ac_dir/$ac_word" || continue
2256ac_cv_prog_CC="${ac_tool_prefix}gcc"
b1b84649 2257echo "$as_me:2257: found $ac_dir/$ac_word" >&5
503d2be0
AS
2258break
2259done
2260
ba4481b5
DL
2261fi
2262fi
503d2be0 2263CC=$ac_cv_prog_CC
ba4481b5 2264if test -n "$CC"; then
b1b84649 2265 echo "$as_me:2265: result: $CC" >&5
503d2be0
AS
2266echo "${ECHO_T}$CC" >&6
2267else
b1b84649 2268 echo "$as_me:2268: result: no" >&5
503d2be0
AS
2269echo "${ECHO_T}no" >&6
2270fi
2271
2272fi
2273if test -z "$ac_cv_prog_CC"; then
2274 ac_ct_CC=$CC
2275 # Extract the first word of "gcc", so it can be a program name with args.
2276set dummy gcc; ac_word=$2
b1b84649 2277echo "$as_me:2277: checking for $ac_word" >&5
503d2be0
AS
2278echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2279if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2280 echo $ECHO_N "(cached) $ECHO_C" >&6
2281else
2282 if test -n "$ac_ct_CC"; then
2283 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2284else
2285 ac_save_IFS=$IFS; IFS=$ac_path_separator
2286ac_dummy="$PATH"
2287for ac_dir in $ac_dummy; do
2288 IFS=$ac_save_IFS
2289 test -z "$ac_dir" && ac_dir=.
2290 $as_executable_p "$ac_dir/$ac_word" || continue
2291ac_cv_prog_ac_ct_CC="gcc"
b1b84649 2292echo "$as_me:2292: found $ac_dir/$ac_word" >&5
503d2be0
AS
2293break
2294done
2295
2296fi
2297fi
2298ac_ct_CC=$ac_cv_prog_ac_ct_CC
2299if test -n "$ac_ct_CC"; then
b1b84649 2300 echo "$as_me:2300: result: $ac_ct_CC" >&5
503d2be0 2301echo "${ECHO_T}$ac_ct_CC" >&6
ba4481b5 2302else
b1b84649 2303 echo "$as_me:2303: result: no" >&5
503d2be0
AS
2304echo "${ECHO_T}no" >&6
2305fi
2306
2307 CC=$ac_ct_CC
2308else
2309 CC="$ac_cv_prog_CC"
ba4481b5
DL
2310fi
2311
2312if test -z "$CC"; then
503d2be0
AS
2313 if test -n "$ac_tool_prefix"; then
2314 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2315set dummy ${ac_tool_prefix}cc; ac_word=$2
b1b84649 2316echo "$as_me:2316: checking for $ac_word" >&5
503d2be0
AS
2317echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2318if test "${ac_cv_prog_CC+set}" = set; then
2319 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2320else
2321 if test -n "$CC"; then
2322 ac_cv_prog_CC="$CC" # Let the user override the test.
2323else
503d2be0
AS
2324 ac_save_IFS=$IFS; IFS=$ac_path_separator
2325ac_dummy="$PATH"
2326for ac_dir in $ac_dummy; do
2327 IFS=$ac_save_IFS
2328 test -z "$ac_dir" && ac_dir=.
2329 $as_executable_p "$ac_dir/$ac_word" || continue
2330ac_cv_prog_CC="${ac_tool_prefix}cc"
b1b84649 2331echo "$as_me:2331: found $ac_dir/$ac_word" >&5
503d2be0
AS
2332break
2333done
2334
2335fi
2336fi
2337CC=$ac_cv_prog_CC
2338if test -n "$CC"; then
b1b84649 2339 echo "$as_me:2339: result: $CC" >&5
503d2be0
AS
2340echo "${ECHO_T}$CC" >&6
2341else
b1b84649 2342 echo "$as_me:2342: result: no" >&5
503d2be0
AS
2343echo "${ECHO_T}no" >&6
2344fi
2345
2346fi
2347if test -z "$ac_cv_prog_CC"; then
2348 ac_ct_CC=$CC
2349 # Extract the first word of "cc", so it can be a program name with args.
2350set dummy cc; ac_word=$2
b1b84649 2351echo "$as_me:2351: checking for $ac_word" >&5
503d2be0
AS
2352echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2353if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2354 echo $ECHO_N "(cached) $ECHO_C" >&6
2355else
2356 if test -n "$ac_ct_CC"; then
2357 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2358else
2359 ac_save_IFS=$IFS; IFS=$ac_path_separator
2360ac_dummy="$PATH"
2361for ac_dir in $ac_dummy; do
2362 IFS=$ac_save_IFS
2363 test -z "$ac_dir" && ac_dir=.
2364 $as_executable_p "$ac_dir/$ac_word" || continue
2365ac_cv_prog_ac_ct_CC="cc"
b1b84649 2366echo "$as_me:2366: found $ac_dir/$ac_word" >&5
503d2be0
AS
2367break
2368done
2369
2370fi
2371fi
2372ac_ct_CC=$ac_cv_prog_ac_ct_CC
2373if test -n "$ac_ct_CC"; then
b1b84649 2374 echo "$as_me:2374: result: $ac_ct_CC" >&5
503d2be0
AS
2375echo "${ECHO_T}$ac_ct_CC" >&6
2376else
b1b84649 2377 echo "$as_me:2377: result: no" >&5
503d2be0
AS
2378echo "${ECHO_T}no" >&6
2379fi
2380
2381 CC=$ac_ct_CC
2382else
2383 CC="$ac_cv_prog_CC"
2384fi
2385
2386fi
2387if test -z "$CC"; then
2388 # Extract the first word of "cc", so it can be a program name with args.
2389set dummy cc; ac_word=$2
b1b84649 2390echo "$as_me:2390: checking for $ac_word" >&5
503d2be0
AS
2391echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2392if test "${ac_cv_prog_CC+set}" = set; then
2393 echo $ECHO_N "(cached) $ECHO_C" >&6
2394else
2395 if test -n "$CC"; then
2396 ac_cv_prog_CC="$CC" # Let the user override the test.
2397else
2398 ac_prog_rejected=no
2399 ac_save_IFS=$IFS; IFS=$ac_path_separator
2400ac_dummy="$PATH"
2401for ac_dir in $ac_dummy; do
2402 IFS=$ac_save_IFS
2403 test -z "$ac_dir" && ac_dir=.
2404 $as_executable_p "$ac_dir/$ac_word" || continue
2405if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2406 ac_prog_rejected=yes
2407 continue
2408fi
2409ac_cv_prog_CC="cc"
b1b84649 2410echo "$as_me:2410: found $ac_dir/$ac_word" >&5
503d2be0
AS
2411break
2412done
2413
ba4481b5
DL
2414if test $ac_prog_rejected = yes; then
2415 # We found a bogon in the path, so make sure we never use it.
2416 set dummy $ac_cv_prog_CC
2417 shift
503d2be0 2418 if test $# != 0; then
ba4481b5
DL
2419 # We chose a different compiler from the bogus one.
2420 # However, it has the same basename, so the bogon will be chosen
2421 # first if we set CC to just the basename; use the full file name.
2422 shift
503d2be0 2423 set dummy "$ac_dir/$ac_word" ${1+"$@"}
ba4481b5
DL
2424 shift
2425 ac_cv_prog_CC="$@"
2426 fi
2427fi
2428fi
2429fi
503d2be0 2430CC=$ac_cv_prog_CC
ba4481b5 2431if test -n "$CC"; then
b1b84649 2432 echo "$as_me:2432: result: $CC" >&5
503d2be0 2433echo "${ECHO_T}$CC" >&6
ba4481b5 2434else
b1b84649 2435 echo "$as_me:2435: result: no" >&5
503d2be0 2436echo "${ECHO_T}no" >&6
ba4481b5
DL
2437fi
2438
503d2be0
AS
2439fi
2440if test -z "$CC"; then
2441 if test -n "$ac_tool_prefix"; then
2442 for ac_prog in cl
2443 do
2444 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2445set dummy $ac_tool_prefix$ac_prog; ac_word=$2
b1b84649 2446echo "$as_me:2446: checking for $ac_word" >&5
503d2be0
AS
2447echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2448if test "${ac_cv_prog_CC+set}" = set; then
2449 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2450else
2451 if test -n "$CC"; then
2452 ac_cv_prog_CC="$CC" # Let the user override the test.
2453else
503d2be0
AS
2454 ac_save_IFS=$IFS; IFS=$ac_path_separator
2455ac_dummy="$PATH"
2456for ac_dir in $ac_dummy; do
2457 IFS=$ac_save_IFS
2458 test -z "$ac_dir" && ac_dir=.
2459 $as_executable_p "$ac_dir/$ac_word" || continue
2460ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
b1b84649 2461echo "$as_me:2461: found $ac_dir/$ac_word" >&5
503d2be0
AS
2462break
2463done
2464
c4bb2108
DL
2465fi
2466fi
503d2be0 2467CC=$ac_cv_prog_CC
c4bb2108 2468if test -n "$CC"; then
b1b84649 2469 echo "$as_me:2469: result: $CC" >&5
503d2be0 2470echo "${ECHO_T}$CC" >&6
c4bb2108 2471else
b1b84649 2472 echo "$as_me:2472: result: no" >&5
503d2be0
AS
2473echo "${ECHO_T}no" >&6
2474fi
2475
2476 test -n "$CC" && break
2477 done
2478fi
2479if test -z "$CC"; then
2480 ac_ct_CC=$CC
2481 for ac_prog in cl
2482do
2483 # Extract the first word of "$ac_prog", so it can be a program name with args.
2484set dummy $ac_prog; ac_word=$2
b1b84649 2485echo "$as_me:2485: checking for $ac_word" >&5
503d2be0
AS
2486echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2487if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2488 echo $ECHO_N "(cached) $ECHO_C" >&6
2489else
2490 if test -n "$ac_ct_CC"; then
2491 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2492else
2493 ac_save_IFS=$IFS; IFS=$ac_path_separator
2494ac_dummy="$PATH"
2495for ac_dir in $ac_dummy; do
2496 IFS=$ac_save_IFS
2497 test -z "$ac_dir" && ac_dir=.
2498 $as_executable_p "$ac_dir/$ac_word" || continue
2499ac_cv_prog_ac_ct_CC="$ac_prog"
b1b84649 2500echo "$as_me:2500: found $ac_dir/$ac_word" >&5
503d2be0
AS
2501break
2502done
2503
c4bb2108 2504fi
503d2be0
AS
2505fi
2506ac_ct_CC=$ac_cv_prog_ac_ct_CC
2507if test -n "$ac_ct_CC"; then
b1b84649 2508 echo "$as_me:2508: result: $ac_ct_CC" >&5
503d2be0
AS
2509echo "${ECHO_T}$ac_ct_CC" >&6
2510else
b1b84649 2511 echo "$as_me:2511: result: no" >&5
503d2be0 2512echo "${ECHO_T}no" >&6
ba4481b5
DL
2513fi
2514
503d2be0
AS
2515 test -n "$ac_ct_CC" && break
2516done
ba4481b5 2517
503d2be0
AS
2518 CC=$ac_ct_CC
2519fi
2520
2521fi
ba4481b5 2522
b1b84649 2523test -z "$CC" && { { echo "$as_me:2523: error: no acceptable cc found in \$PATH" >&5
503d2be0
AS
2524echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
2525 { (exit 1); exit 1; }; }
c4bb2108 2526
503d2be0 2527# Provide some information about the compiler.
b1b84649 2528echo "$as_me:2528:" \
503d2be0
AS
2529 "checking for C compiler version" >&5
2530ac_compiler=`set X $ac_compile; echo $2`
b1b84649 2531{ (eval echo "$as_me:2531: \"$ac_compiler --version </dev/null >&5\"") >&5
503d2be0
AS
2532 (eval $ac_compiler --version </dev/null >&5) 2>&5
2533 ac_status=$?
b1b84649 2534 echo "$as_me:2534: \$? = $ac_status" >&5
503d2be0 2535 (exit $ac_status); }
b1b84649 2536{ (eval echo "$as_me:2536: \"$ac_compiler -v </dev/null >&5\"") >&5
503d2be0
AS
2537 (eval $ac_compiler -v </dev/null >&5) 2>&5
2538 ac_status=$?
b1b84649 2539 echo "$as_me:2539: \$? = $ac_status" >&5
503d2be0 2540 (exit $ac_status); }
b1b84649 2541{ (eval echo "$as_me:2541: \"$ac_compiler -V </dev/null >&5\"") >&5
503d2be0
AS
2542 (eval $ac_compiler -V </dev/null >&5) 2>&5
2543 ac_status=$?
b1b84649 2544 echo "$as_me:2544: \$? = $ac_status" >&5
503d2be0
AS
2545 (exit $ac_status); }
2546
2547cat >conftest.$ac_ext <<_ACEOF
b1b84649 2548#line 2548 "configure"
ba4481b5 2549#include "confdefs.h"
c4bb2108 2550
503d2be0
AS
2551int
2552main ()
2553{
2554
2555 ;
2556 return 0;
2557}
2558_ACEOF
2559ac_clean_files_save=$ac_clean_files
2560ac_clean_files="$ac_clean_files a.out a.exe"
2561# Try to create an executable without -o first, disregard a.out.
2562# It will help us diagnose broken compilers, and finding out an intuition
2563# of exeext.
b1b84649 2564echo "$as_me:2564: checking for C compiler default output" >&5
503d2be0
AS
2565echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2566ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
b1b84649 2567if { (eval echo "$as_me:2567: \"$ac_link_default\"") >&5
503d2be0
AS
2568 (eval $ac_link_default) 2>&5
2569 ac_status=$?
b1b84649 2570 echo "$as_me:2570: \$? = $ac_status" >&5
503d2be0
AS
2571 (exit $ac_status); }; then
2572 # Find the output, starting from the most likely. This scheme is
2573# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2574# resort.
2575for ac_file in `ls a.exe conftest.exe 2>/dev/null;
2576 ls a.out conftest 2>/dev/null;
2577 ls a.* conftest.* 2>/dev/null`; do
2578 case $ac_file in
2579 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2580 a.out ) # We found the default executable, but exeext='' is most
2581 # certainly right.
2582 break;;
2583 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2584 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2585 export ac_cv_exeext
2586 break;;
2587 * ) break;;
2588 esac
2589done
2590else
2591 echo "$as_me: failed program was:" >&5
2592cat conftest.$ac_ext >&5
b1b84649 2593{ { echo "$as_me:2593: error: C compiler cannot create executables" >&5
503d2be0
AS
2594echo "$as_me: error: C compiler cannot create executables" >&2;}
2595 { (exit 77); exit 77; }; }
2596fi
2597
2598ac_exeext=$ac_cv_exeext
b1b84649 2599echo "$as_me:2599: result: $ac_file" >&5
503d2be0
AS
2600echo "${ECHO_T}$ac_file" >&6
2601
2602# Check the compiler produces executables we can run. If not, either
2603# the compiler is broken, or we cross compile.
b1b84649 2604echo "$as_me:2604: checking whether the C compiler works" >&5
503d2be0
AS
2605echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2606# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2607# If not cross compiling, check that we can run a simple program.
2608if test "$cross_compiling" != yes; then
2609 if { ac_try='./$ac_file'
b1b84649 2610 { (eval echo "$as_me:2610: \"$ac_try\"") >&5
503d2be0
AS
2611 (eval $ac_try) 2>&5
2612 ac_status=$?
b1b84649 2613 echo "$as_me:2613: \$? = $ac_status" >&5
503d2be0
AS
2614 (exit $ac_status); }; }; then
2615 cross_compiling=no
ba4481b5 2616 else
503d2be0
AS
2617 if test "$cross_compiling" = maybe; then
2618 cross_compiling=yes
2619 else
b1b84649 2620 { { echo "$as_me:2620: error: cannot run C compiled programs.
503d2be0
AS
2621If you meant to cross compile, use \`--host'." >&5
2622echo "$as_me: error: cannot run C compiled programs.
2623If you meant to cross compile, use \`--host'." >&2;}
2624 { (exit 1); exit 1; }; }
2625 fi
ba4481b5 2626 fi
503d2be0 2627fi
b1b84649 2628echo "$as_me:2628: result: yes" >&5
503d2be0
AS
2629echo "${ECHO_T}yes" >&6
2630
2631rm -f a.out a.exe conftest$ac_cv_exeext
2632ac_clean_files=$ac_clean_files_save
2633# Check the compiler produces executables we can run. If not, either
2634# the compiler is broken, or we cross compile.
b1b84649 2635echo "$as_me:2635: checking whether we are cross compiling" >&5
503d2be0 2636echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
b1b84649 2637echo "$as_me:2637: result: $cross_compiling" >&5
503d2be0
AS
2638echo "${ECHO_T}$cross_compiling" >&6
2639
b1b84649 2640echo "$as_me:2640: checking for executable suffix" >&5
503d2be0 2641echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
b1b84649 2642if { (eval echo "$as_me:2642: \"$ac_link\"") >&5
503d2be0
AS
2643 (eval $ac_link) 2>&5
2644 ac_status=$?
b1b84649 2645 echo "$as_me:2645: \$? = $ac_status" >&5
503d2be0
AS
2646 (exit $ac_status); }; then
2647 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2648# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2649# work properly (i.e., refer to `conftest.exe'), while it won't with
2650# `rm'.
2651for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2652 case $ac_file in
2653 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2654 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2655 export ac_cv_exeext
2656 break;;
2657 * ) break;;
2658 esac
2659done
ba4481b5 2660else
b1b84649 2661 { { echo "$as_me:2661: error: cannot compute EXEEXT: cannot compile and link" >&5
503d2be0
AS
2662echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2663 { (exit 1); exit 1; }; }
ba4481b5 2664fi
ba4481b5 2665
503d2be0 2666rm -f conftest$ac_cv_exeext
b1b84649 2667echo "$as_me:2667: result: $ac_cv_exeext" >&5
503d2be0 2668echo "${ECHO_T}$ac_cv_exeext" >&6
ba4481b5 2669
503d2be0
AS
2670rm -f conftest.$ac_ext
2671EXEEXT=$ac_cv_exeext
2672ac_exeext=$EXEEXT
b1b84649 2673echo "$as_me:2673: checking for object suffix" >&5
503d2be0
AS
2674echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2675if test "${ac_cv_objext+set}" = set; then
2676 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 2677else
503d2be0 2678 cat >conftest.$ac_ext <<_ACEOF
b1b84649 2679#line 2679 "configure"
503d2be0 2680#include "confdefs.h"
ba4481b5 2681
503d2be0
AS
2682int
2683main ()
2684{
ba4481b5 2685
503d2be0
AS
2686 ;
2687 return 0;
2688}
2689_ACEOF
2690rm -f conftest.o conftest.obj
b1b84649 2691if { (eval echo "$as_me:2691: \"$ac_compile\"") >&5
503d2be0
AS
2692 (eval $ac_compile) 2>&5
2693 ac_status=$?
b1b84649 2694 echo "$as_me:2694: \$? = $ac_status" >&5
503d2be0
AS
2695 (exit $ac_status); }; then
2696 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2697 case $ac_file in
2698 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2699 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2700 break;;
2701 esac
2702done
c4bb2108 2703else
503d2be0
AS
2704 echo "$as_me: failed program was:" >&5
2705cat conftest.$ac_ext >&5
b1b84649 2706{ { echo "$as_me:2706: error: cannot compute OBJEXT: cannot compile" >&5
503d2be0
AS
2707echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2708 { (exit 1); exit 1; }; }
c4bb2108
DL
2709fi
2710
503d2be0
AS
2711rm -f conftest.$ac_cv_objext conftest.$ac_ext
2712fi
b1b84649 2713echo "$as_me:2713: result: $ac_cv_objext" >&5
503d2be0
AS
2714echo "${ECHO_T}$ac_cv_objext" >&6
2715OBJEXT=$ac_cv_objext
2716ac_objext=$OBJEXT
b1b84649 2717echo "$as_me:2717: checking whether we are using the GNU C compiler" >&5
503d2be0
AS
2718echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2719if test "${ac_cv_c_compiler_gnu+set}" = set; then
2720 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 2721else
503d2be0 2722 cat >conftest.$ac_ext <<_ACEOF
b1b84649 2723#line 2723 "configure"
503d2be0
AS
2724#include "confdefs.h"
2725
2726int
2727main ()
2728{
2729#ifndef __GNUC__
2730 choke me
2731#endif
2732
2733 ;
2734 return 0;
2735}
2736_ACEOF
2737rm -f conftest.$ac_objext
b1b84649 2738if { (eval echo "$as_me:2738: \"$ac_compile\"") >&5
503d2be0
AS
2739 (eval $ac_compile) 2>&5
2740 ac_status=$?
b1b84649 2741 echo "$as_me:2741: \$? = $ac_status" >&5
503d2be0
AS
2742 (exit $ac_status); } &&
2743 { ac_try='test -s conftest.$ac_objext'
b1b84649 2744 { (eval echo "$as_me:2744: \"$ac_try\"") >&5
503d2be0
AS
2745 (eval $ac_try) 2>&5
2746 ac_status=$?
b1b84649 2747 echo "$as_me:2747: \$? = $ac_status" >&5
503d2be0
AS
2748 (exit $ac_status); }; }; then
2749 ac_compiler_gnu=yes
2750else
2751 echo "$as_me: failed program was:" >&5
2752cat conftest.$ac_ext >&5
2753ac_compiler_gnu=no
2754fi
2755rm -f conftest.$ac_objext conftest.$ac_ext
2756ac_cv_c_compiler_gnu=$ac_compiler_gnu
2757
2758fi
b1b84649 2759echo "$as_me:2759: result: $ac_cv_c_compiler_gnu" >&5
503d2be0
AS
2760echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2761GCC=`test $ac_compiler_gnu = yes && echo yes`
2762ac_test_CFLAGS=${CFLAGS+set}
2763ac_save_CFLAGS=$CFLAGS
2764CFLAGS="-g"
b1b84649 2765echo "$as_me:2765: checking whether $CC accepts -g" >&5
503d2be0
AS
2766echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2767if test "${ac_cv_prog_cc_g+set}" = set; then
2768 echo $ECHO_N "(cached) $ECHO_C" >&6
2769else
2770 cat >conftest.$ac_ext <<_ACEOF
b1b84649 2771#line 2771 "configure"
503d2be0
AS
2772#include "confdefs.h"
2773
2774int
2775main ()
2776{
2777
2778 ;
2779 return 0;
2780}
2781_ACEOF
2782rm -f conftest.$ac_objext
b1b84649 2783if { (eval echo "$as_me:2783: \"$ac_compile\"") >&5
503d2be0
AS
2784 (eval $ac_compile) 2>&5
2785 ac_status=$?
b1b84649 2786 echo "$as_me:2786: \$? = $ac_status" >&5
503d2be0
AS
2787 (exit $ac_status); } &&
2788 { ac_try='test -s conftest.$ac_objext'
b1b84649 2789 { (eval echo "$as_me:2789: \"$ac_try\"") >&5
503d2be0
AS
2790 (eval $ac_try) 2>&5
2791 ac_status=$?
b1b84649 2792 echo "$as_me:2792: \$? = $ac_status" >&5
503d2be0 2793 (exit $ac_status); }; }; then
ba4481b5
DL
2794 ac_cv_prog_cc_g=yes
2795else
503d2be0
AS
2796 echo "$as_me: failed program was:" >&5
2797cat conftest.$ac_ext >&5
2798ac_cv_prog_cc_g=no
ba4481b5 2799fi
503d2be0 2800rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 2801fi
b1b84649 2802echo "$as_me:2802: result: $ac_cv_prog_cc_g" >&5
503d2be0 2803echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c4bb2108 2804if test "$ac_test_CFLAGS" = set; then
503d2be0 2805 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
2806elif test $ac_cv_prog_cc_g = yes; then
2807 if test "$GCC" = yes; then
ba4481b5
DL
2808 CFLAGS="-g -O2"
2809 else
c4bb2108 2810 CFLAGS="-g"
ba4481b5 2811 fi
22afa6e8 2812else
c4bb2108
DL
2813 if test "$GCC" = yes; then
2814 CFLAGS="-O2"
2815 else
2816 CFLAGS=
2817 fi
ba4481b5 2818fi
503d2be0
AS
2819# Some people use a C++ compiler to compile C. Since we use `exit',
2820# in C++ we need to declare it. In case someone uses the same compiler
2821# for both compiling C and C++ we need to have the C++ compiler decide
2822# the declaration of exit, since it's the most demanding environment.
2823cat >conftest.$ac_ext <<_ACEOF
2824#ifndef __cplusplus
2825 choke me
2826#endif
2827_ACEOF
2828rm -f conftest.$ac_objext
b1b84649 2829if { (eval echo "$as_me:2829: \"$ac_compile\"") >&5
503d2be0
AS
2830 (eval $ac_compile) 2>&5
2831 ac_status=$?
b1b84649 2832 echo "$as_me:2832: \$? = $ac_status" >&5
503d2be0
AS
2833 (exit $ac_status); } &&
2834 { ac_try='test -s conftest.$ac_objext'
b1b84649 2835 { (eval echo "$as_me:2835: \"$ac_try\"") >&5
503d2be0
AS
2836 (eval $ac_try) 2>&5
2837 ac_status=$?
b1b84649 2838 echo "$as_me:2838: \$? = $ac_status" >&5
503d2be0
AS
2839 (exit $ac_status); }; }; then
2840 for ac_declaration in \
2841 ''\
2842 '#include <stdlib.h>' \
2843 'extern "C" void std::exit (int) throw (); using std::exit;' \
2844 'extern "C" void std::exit (int); using std::exit;' \
2845 'extern "C" void exit (int) throw ();' \
2846 'extern "C" void exit (int);' \
2847 'void exit (int);'
2848do
2849 cat >conftest.$ac_ext <<_ACEOF
b1b84649 2850#line 2850 "configure"
503d2be0
AS
2851#include "confdefs.h"
2852#include <stdlib.h>
2853$ac_declaration
2854int
2855main ()
2856{
2857exit (42);
2858 ;
2859 return 0;
2860}
2861_ACEOF
2862rm -f conftest.$ac_objext
b1b84649 2863if { (eval echo "$as_me:2863: \"$ac_compile\"") >&5
503d2be0
AS
2864 (eval $ac_compile) 2>&5
2865 ac_status=$?
b1b84649 2866 echo "$as_me:2866: \$? = $ac_status" >&5
503d2be0
AS
2867 (exit $ac_status); } &&
2868 { ac_try='test -s conftest.$ac_objext'
b1b84649 2869 { (eval echo "$as_me:2869: \"$ac_try\"") >&5
503d2be0
AS
2870 (eval $ac_try) 2>&5
2871 ac_status=$?
b1b84649 2872 echo "$as_me:2872: \$? = $ac_status" >&5
503d2be0
AS
2873 (exit $ac_status); }; }; then
2874 :
2875else
2876 echo "$as_me: failed program was:" >&5
2877cat conftest.$ac_ext >&5
2878continue
2879fi
2880rm -f conftest.$ac_objext conftest.$ac_ext
2881 cat >conftest.$ac_ext <<_ACEOF
b1b84649 2882#line 2882 "configure"
503d2be0
AS
2883#include "confdefs.h"
2884$ac_declaration
2885int
2886main ()
2887{
2888exit (42);
2889 ;
2890 return 0;
2891}
2892_ACEOF
2893rm -f conftest.$ac_objext
b1b84649 2894if { (eval echo "$as_me:2894: \"$ac_compile\"") >&5
503d2be0
AS
2895 (eval $ac_compile) 2>&5
2896 ac_status=$?
b1b84649 2897 echo "$as_me:2897: \$? = $ac_status" >&5
503d2be0
AS
2898 (exit $ac_status); } &&
2899 { ac_try='test -s conftest.$ac_objext'
b1b84649 2900 { (eval echo "$as_me:2900: \"$ac_try\"") >&5
503d2be0
AS
2901 (eval $ac_try) 2>&5
2902 ac_status=$?
b1b84649 2903 echo "$as_me:2903: \$? = $ac_status" >&5
503d2be0
AS
2904 (exit $ac_status); }; }; then
2905 break
2906else
2907 echo "$as_me: failed program was:" >&5
2908cat conftest.$ac_ext >&5
2909fi
2910rm -f conftest.$ac_objext conftest.$ac_ext
2911done
2912rm -f conftest*
2913if test -n "$ac_declaration"; then
2914 echo '#ifdef __cplusplus' >>confdefs.h
2915 echo $ac_declaration >>confdefs.h
2916 echo '#endif' >>confdefs.h
2917fi
ba4481b5 2918
503d2be0
AS
2919else
2920 echo "$as_me: failed program was:" >&5
2921cat conftest.$ac_ext >&5
2922fi
2923rm -f conftest.$ac_objext conftest.$ac_ext
2924ac_ext=c
2925ac_cpp='$CPP $CPPFLAGS'
2926ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2927ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2928ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
2929
2930# On Suns, sometimes $CPP names a directory.
2931if test -n "$CPP" && test -d "$CPP"; then
2932 CPP=
2933fi
2934
2935#### Some systems specify a CPP to use unless we are using GCC.
2936#### Now that we know whether we are using GCC, we can decide whether
2937#### to use that one.
2938if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
2939then
2940 CPP="$NON_GNU_CPP"
2941fi
2942
2943#### Some systems specify a CC to use unless we are using GCC.
2944#### Now that we know whether we are using GCC, we can decide whether
2945#### to use that one.
2946if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
2947 test x$cc_specified != xyes
2948then
2949 CC="$NON_GNU_CC"
2950fi
2951
2952if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
2953then
2954 CC="$CC $GCC_TEST_OPTIONS"
2955fi
2956
2957if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
2958then
2959 CC="$CC $NON_GCC_TEST_OPTIONS"
2960fi
2961
2962if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
2963then
2964 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
2965fi
2966
2967if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
2968then
2969 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
2970fi
2971
2972#### Some other nice autoconf tests. If you add a test here which
2973#### should make an entry in src/config.h, don't forget to add an
2974#### #undef clause to src/config.h.in for autoconf to modify.
2975
b1b84649 2976echo "$as_me:2976: checking whether ln -s works" >&5
503d2be0
AS
2977echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2978LN_S=$as_ln_s
2979if test "$LN_S" = "ln -s"; then
b1b84649 2980 echo "$as_me:2980: result: yes" >&5
503d2be0 2981echo "${ECHO_T}yes" >&6
ba4481b5 2982else
b1b84649 2983 echo "$as_me:2983: result: no, using $LN_S" >&5
503d2be0 2984echo "${ECHO_T}no, using $LN_S" >&6
ba4481b5
DL
2985fi
2986
503d2be0
AS
2987ac_ext=c
2988ac_cpp='$CPP $CPPFLAGS'
2989ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2990ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2991ac_compiler_gnu=$ac_cv_c_compiler_gnu
b1b84649 2992echo "$as_me:2992: checking how to run the C preprocessor" >&5
503d2be0 2993echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
ba4481b5
DL
2994# On Suns, sometimes $CPP names a directory.
2995if test -n "$CPP" && test -d "$CPP"; then
2996 CPP=
2997fi
2998if test -z "$CPP"; then
503d2be0
AS
2999 if test "${ac_cv_prog_CPP+set}" = set; then
3000 echo $ECHO_N "(cached) $ECHO_C" >&6
3001else
3002 # Double quotes because CPP needs to be expanded
3003 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3004 do
3005 ac_preproc_ok=false
3006for ac_c_preproc_warn_flag in '' yes
3007do
3008 # Use a header file that comes with gcc, so configuring glibc
3009 # with a fresh cross-compiler works.
ba4481b5 3010 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
3011 # not just through cpp. "Syntax error" is here to catch this case.
3012 cat >conftest.$ac_ext <<_ACEOF
b1b84649 3013#line 3013 "configure"
ba4481b5
DL
3014#include "confdefs.h"
3015#include <assert.h>
503d2be0
AS
3016 Syntax error
3017_ACEOF
b1b84649 3018if { (eval echo "$as_me:3018: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3019 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3020 ac_status=$?
3021 egrep -v '^ *\+' conftest.er1 >conftest.err
3022 rm -f conftest.er1
3023 cat conftest.err >&5
b1b84649 3024 echo "$as_me:3024: \$? = $ac_status" >&5
503d2be0
AS
3025 (exit $ac_status); } >/dev/null; then
3026 if test -s conftest.err; then
3027 ac_cpp_err=$ac_c_preproc_warn_flag
3028 else
3029 ac_cpp_err=
3030 fi
3031else
3032 ac_cpp_err=yes
3033fi
3034if test -z "$ac_cpp_err"; then
ba4481b5
DL
3035 :
3036else
503d2be0 3037 echo "$as_me: failed program was:" >&5
ba4481b5 3038 cat conftest.$ac_ext >&5
503d2be0
AS
3039 # Broken: fails on valid input.
3040continue
3041fi
3042rm -f conftest.err conftest.$ac_ext
3043
3044 # OK, works on sane cases. Now check whether non-existent headers
3045 # can be detected and how.
3046 cat >conftest.$ac_ext <<_ACEOF
b1b84649 3047#line 3047 "configure"
503d2be0
AS
3048#include "confdefs.h"
3049#include <ac_nonexistent.h>
3050_ACEOF
b1b84649 3051if { (eval echo "$as_me:3051: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3052 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3053 ac_status=$?
3054 egrep -v '^ *\+' conftest.er1 >conftest.err
3055 rm -f conftest.er1
3056 cat conftest.err >&5
b1b84649 3057 echo "$as_me:3057: \$? = $ac_status" >&5
503d2be0
AS
3058 (exit $ac_status); } >/dev/null; then
3059 if test -s conftest.err; then
3060 ac_cpp_err=$ac_c_preproc_warn_flag
3061 else
3062 ac_cpp_err=
3063 fi
3064else
3065 ac_cpp_err=yes
3066fi
3067if test -z "$ac_cpp_err"; then
3068 # Broken: success on invalid input.
3069continue
c4bb2108 3070else
503d2be0 3071 echo "$as_me: failed program was:" >&5
c4bb2108 3072 cat conftest.$ac_ext >&5
503d2be0
AS
3073 # Passes both tests.
3074ac_preproc_ok=:
3075break
3076fi
3077rm -f conftest.err conftest.$ac_ext
3078
3079done
3080# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3081rm -f conftest.err conftest.$ac_ext
3082if $ac_preproc_ok; then
3083 break
3084fi
3085
3086 done
3087 ac_cv_prog_CPP=$CPP
3088
3089fi
3090 CPP=$ac_cv_prog_CPP
3091else
3092 ac_cv_prog_CPP=$CPP
3093fi
b1b84649 3094echo "$as_me:3094: result: $CPP" >&5
503d2be0
AS
3095echo "${ECHO_T}$CPP" >&6
3096ac_preproc_ok=false
3097for ac_c_preproc_warn_flag in '' yes
3098do
3099 # Use a header file that comes with gcc, so configuring glibc
3100 # with a fresh cross-compiler works.
3101 # On the NeXT, cc -E runs the code through the compiler's parser,
3102 # not just through cpp. "Syntax error" is here to catch this case.
3103 cat >conftest.$ac_ext <<_ACEOF
b1b84649 3104#line 3104 "configure"
c4bb2108
DL
3105#include "confdefs.h"
3106#include <assert.h>
503d2be0
AS
3107 Syntax error
3108_ACEOF
b1b84649 3109if { (eval echo "$as_me:3109: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3110 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3111 ac_status=$?
3112 egrep -v '^ *\+' conftest.er1 >conftest.err
3113 rm -f conftest.er1
3114 cat conftest.err >&5
b1b84649 3115 echo "$as_me:3115: \$? = $ac_status" >&5
503d2be0
AS
3116 (exit $ac_status); } >/dev/null; then
3117 if test -s conftest.err; then
3118 ac_cpp_err=$ac_c_preproc_warn_flag
3119 else
3120 ac_cpp_err=
3121 fi
3122else
3123 ac_cpp_err=yes
3124fi
3125if test -z "$ac_cpp_err"; then
ba4481b5
DL
3126 :
3127else
503d2be0 3128 echo "$as_me: failed program was:" >&5
ba4481b5 3129 cat conftest.$ac_ext >&5
503d2be0
AS
3130 # Broken: fails on valid input.
3131continue
3132fi
3133rm -f conftest.err conftest.$ac_ext
3134
3135 # OK, works on sane cases. Now check whether non-existent headers
3136 # can be detected and how.
3137 cat >conftest.$ac_ext <<_ACEOF
b1b84649 3138#line 3138 "configure"
503d2be0
AS
3139#include "confdefs.h"
3140#include <ac_nonexistent.h>
3141_ACEOF
b1b84649 3142if { (eval echo "$as_me:3142: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3143 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3144 ac_status=$?
3145 egrep -v '^ *\+' conftest.er1 >conftest.err
3146 rm -f conftest.er1
3147 cat conftest.err >&5
b1b84649 3148 echo "$as_me:3148: \$? = $ac_status" >&5
503d2be0
AS
3149 (exit $ac_status); } >/dev/null; then
3150 if test -s conftest.err; then
3151 ac_cpp_err=$ac_c_preproc_warn_flag
3152 else
3153 ac_cpp_err=
3154 fi
3155else
3156 ac_cpp_err=yes
c4bb2108 3157fi
503d2be0
AS
3158if test -z "$ac_cpp_err"; then
3159 # Broken: success on invalid input.
3160continue
3161else
3162 echo "$as_me: failed program was:" >&5
3163 cat conftest.$ac_ext >&5
3164 # Passes both tests.
3165ac_preproc_ok=:
3166break
ba4481b5 3167fi
503d2be0
AS
3168rm -f conftest.err conftest.$ac_ext
3169
3170done
3171# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3172rm -f conftest.err conftest.$ac_ext
3173if $ac_preproc_ok; then
3174 :
ba4481b5 3175else
b1b84649 3176 { { echo "$as_me:3176: error: C preprocessor \"$CPP\" fails sanity check" >&5
503d2be0
AS
3177echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3178 { (exit 1); exit 1; }; }
ba4481b5 3179fi
503d2be0
AS
3180
3181ac_ext=c
3182ac_cpp='$CPP $CPPFLAGS'
3183ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3184ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3185ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
3186
3187# Find a good install program. We prefer a C program (faster),
3188# so one script is as good as another. But avoid the broken or
3189# incompatible versions:
3190# SysV /etc/install, /usr/sbin/install
3191# SunOS /usr/etc/install
3192# IRIX /sbin/install
3193# AIX /bin/install
503d2be0 3194# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 3195# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
3196# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3197# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3198# ./install, which can be erroneously created by make from ./install.sh.
b1b84649 3199echo "$as_me:3199: checking for a BSD compatible install" >&5
503d2be0 3200echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
ba4481b5 3201if test -z "$INSTALL"; then
503d2be0
AS
3202if test "${ac_cv_path_install+set}" = set; then
3203 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3204else
503d2be0 3205 ac_save_IFS=$IFS; IFS=$ac_path_separator
ba4481b5 3206 for ac_dir in $PATH; do
503d2be0 3207 IFS=$ac_save_IFS
ba4481b5 3208 # Account for people who put trailing slashes in PATH elements.
503d2be0
AS
3209 case $ac_dir/ in
3210 / | ./ | .// | /cC/* \
3211 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3212 | /usr/ucb/* ) ;;
ba4481b5
DL
3213 *)
3214 # OSF1 and SCO ODT 3.0 have their own names for install.
c4bb2108
DL
3215 # Don't use installbsd from OSF since it installs stuff as root
3216 # by default.
3217 for ac_prog in ginstall scoinst install; do
503d2be0 3218 if $as_executable_p "$ac_dir/$ac_prog"; then
ba4481b5 3219 if test $ac_prog = install &&
503d2be0 3220 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
ba4481b5
DL
3221 # AIX install. It has an incompatible calling convention.
3222 :
503d2be0
AS
3223 elif test $ac_prog = install &&
3224 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3225 # program-specific install script used by HP pwplus--don't use.
3226 :
ba4481b5
DL
3227 else
3228 ac_cv_path_install="$ac_dir/$ac_prog -c"
3229 break 2
3230 fi
3231 fi
3232 done
3233 ;;
3234 esac
3235 done
ba4481b5
DL
3236
3237fi
3238 if test "${ac_cv_path_install+set}" = set; then
503d2be0 3239 INSTALL=$ac_cv_path_install
ba4481b5
DL
3240 else
3241 # As a last resort, use the slow shell script. We don't cache a
3242 # path for INSTALL within a source directory, because that will
3243 # break other packages using the cache if that directory is
3244 # removed, or if the path is relative.
503d2be0 3245 INSTALL=$ac_install_sh
ba4481b5
DL
3246 fi
3247fi
b1b84649 3248echo "$as_me:3248: result: $INSTALL" >&5
503d2be0 3249echo "${ECHO_T}$INSTALL" >&6
ba4481b5
DL
3250
3251# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3252# It thinks the first close brace ends the variable substitution.
3253test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3254
503d2be0 3255test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 3256
ba4481b5
DL
3257test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3258
3259for ac_prog in 'bison -y' byacc
3260do
503d2be0 3261 # Extract the first word of "$ac_prog", so it can be a program name with args.
ba4481b5 3262set dummy $ac_prog; ac_word=$2
b1b84649 3263echo "$as_me:3263: checking for $ac_word" >&5
503d2be0
AS
3264echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3265if test "${ac_cv_prog_YACC+set}" = set; then
3266 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3267else
3268 if test -n "$YACC"; then
3269 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3270else
503d2be0
AS
3271 ac_save_IFS=$IFS; IFS=$ac_path_separator
3272ac_dummy="$PATH"
3273for ac_dir in $ac_dummy; do
3274 IFS=$ac_save_IFS
3275 test -z "$ac_dir" && ac_dir=.
3276 $as_executable_p "$ac_dir/$ac_word" || continue
3277ac_cv_prog_YACC="$ac_prog"
b1b84649 3278echo "$as_me:3278: found $ac_dir/$ac_word" >&5
503d2be0
AS
3279break
3280done
3281
ba4481b5
DL
3282fi
3283fi
503d2be0 3284YACC=$ac_cv_prog_YACC
ba4481b5 3285if test -n "$YACC"; then
b1b84649 3286 echo "$as_me:3286: result: $YACC" >&5
503d2be0 3287echo "${ECHO_T}$YACC" >&6
ba4481b5 3288else
b1b84649 3289 echo "$as_me:3289: result: no" >&5
503d2be0 3290echo "${ECHO_T}no" >&6
ba4481b5
DL
3291fi
3292
503d2be0 3293 test -n "$YACC" && break
ba4481b5
DL
3294done
3295test -n "$YACC" || YACC="yacc"
3296
7397acc4 3297if test "x$RANLIB" = x; then
503d2be0
AS
3298 if test -n "$ac_tool_prefix"; then
3299 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3300set dummy ${ac_tool_prefix}ranlib; ac_word=$2
b1b84649 3301echo "$as_me:3301: checking for $ac_word" >&5
503d2be0
AS
3302echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3303if test "${ac_cv_prog_RANLIB+set}" = set; then
3304 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
3305else
3306 if test -n "$RANLIB"; then
3307 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3308else
503d2be0
AS
3309 ac_save_IFS=$IFS; IFS=$ac_path_separator
3310ac_dummy="$PATH"
3311for ac_dir in $ac_dummy; do
3312 IFS=$ac_save_IFS
3313 test -z "$ac_dir" && ac_dir=.
3314 $as_executable_p "$ac_dir/$ac_word" || continue
3315ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
b1b84649 3316echo "$as_me:3316: found $ac_dir/$ac_word" >&5
503d2be0
AS
3317break
3318done
3319
7397acc4
DL
3320fi
3321fi
503d2be0 3322RANLIB=$ac_cv_prog_RANLIB
7397acc4 3323if test -n "$RANLIB"; then
b1b84649 3324 echo "$as_me:3324: result: $RANLIB" >&5
503d2be0
AS
3325echo "${ECHO_T}$RANLIB" >&6
3326else
b1b84649 3327 echo "$as_me:3327: result: no" >&5
503d2be0
AS
3328echo "${ECHO_T}no" >&6
3329fi
3330
3331fi
3332if test -z "$ac_cv_prog_RANLIB"; then
3333 ac_ct_RANLIB=$RANLIB
3334 # Extract the first word of "ranlib", so it can be a program name with args.
3335set dummy ranlib; ac_word=$2
b1b84649 3336echo "$as_me:3336: checking for $ac_word" >&5
503d2be0
AS
3337echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3338if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3339 echo $ECHO_N "(cached) $ECHO_C" >&6
3340else
3341 if test -n "$ac_ct_RANLIB"; then
3342 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3343else
3344 ac_save_IFS=$IFS; IFS=$ac_path_separator
3345ac_dummy="$PATH"
3346for ac_dir in $ac_dummy; do
3347 IFS=$ac_save_IFS
3348 test -z "$ac_dir" && ac_dir=.
3349 $as_executable_p "$ac_dir/$ac_word" || continue
3350ac_cv_prog_ac_ct_RANLIB="ranlib"
b1b84649 3351echo "$as_me:3351: found $ac_dir/$ac_word" >&5
503d2be0
AS
3352break
3353done
3354
3355 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3356fi
3357fi
3358ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3359if test -n "$ac_ct_RANLIB"; then
b1b84649 3360 echo "$as_me:3360: result: $ac_ct_RANLIB" >&5
503d2be0
AS
3361echo "${ECHO_T}$ac_ct_RANLIB" >&6
3362else
b1b84649 3363 echo "$as_me:3363: result: no" >&5
503d2be0
AS
3364echo "${ECHO_T}no" >&6
3365fi
3366
3367 RANLIB=$ac_ct_RANLIB
7397acc4 3368else
503d2be0 3369 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
3370fi
3371
3372fi
ba4481b5 3373
b1b84649 3374echo "$as_me:3374: checking for AIX" >&5
503d2be0
AS
3375echo $ECHO_N "checking for AIX... $ECHO_C" >&6
3376cat >conftest.$ac_ext <<_ACEOF
b1b84649 3377#line 3377 "configure"
ba4481b5
DL
3378#include "confdefs.h"
3379#ifdef _AIX
3380 yes
3381#endif
3382
503d2be0 3383_ACEOF
ba4481b5
DL
3384if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3385 egrep "yes" >/dev/null 2>&1; then
b1b84649 3386 echo "$as_me:3386: result: yes" >&5
503d2be0
AS
3387echo "${ECHO_T}yes" >&6
3388cat >>confdefs.h <<\EOF
ba4481b5
DL
3389#define _ALL_SOURCE 1
3390EOF
3391
3392else
b1b84649 3393 echo "$as_me:3393: result: no" >&5
503d2be0 3394echo "${ECHO_T}no" >&6
ba4481b5
DL
3395fi
3396rm -f conftest*
3397
3b33a005
DL
3398#### Extract some information from the operating system and machine files.
3399
b1b84649 3400{ echo "$as_me:3400: checking the machine- and system-dependent files to find out
3b33a005 3401 - which libraries the lib-src programs will want, and
503d2be0
AS
3402 - whether the GNU malloc routines are usable..." >&5
3403echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 3404 - which libraries the lib-src programs will want, and
503d2be0 3405 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
3406
3407### First figure out CFLAGS (which we use for running the compiler here)
3408### and REAL_CFLAGS (which we use for real compilation).
3409### The two are the same except on a few systems, where they are made
3410### different to work around various lossages. For example,
3411### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
3412### as implying static linking.
3413
3414### If the CFLAGS env var is specified, we use that value
3415### instead of the default.
3416
3417### It's not important that this name contain the PID; you can't run
3418### two configures in the same directory and have anything work
3419### anyway.
3420tempcname="conftest.c"
3421
3422echo '
3423#include "'${srcdir}'/src/'${opsysfile}'"
3424#include "'${srcdir}'/src/'${machfile}'"
3425#ifndef LIBS_MACHINE
3426#define LIBS_MACHINE
3427#endif
3428#ifndef LIBS_SYSTEM
3429#define LIBS_SYSTEM
3430#endif
3431#ifndef C_SWITCH_SYSTEM
3432#define C_SWITCH_SYSTEM
3433#endif
3434#ifndef C_SWITCH_MACHINE
3435#define C_SWITCH_MACHINE
3436#endif
3437configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
3438configure___ c_switch_system=C_SWITCH_SYSTEM
3439configure___ c_switch_machine=C_SWITCH_MACHINE
3440
3441#ifndef LIB_X11_LIB
3442#define LIB_X11_LIB -lX11
3443#endif
3444
3445#ifndef LIBX11_MACHINE
3446#define LIBX11_MACHINE
3447#endif
3448
3449#ifndef LIBX11_SYSTEM
3450#define LIBX11_SYSTEM
3451#endif
3452configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
3453
3454#ifdef UNEXEC
3455configure___ unexec=UNEXEC
3456#else
3457configure___ unexec=unexec.o
3458#endif
3459
3460#ifdef SYSTEM_MALLOC
3461configure___ system_malloc=yes
3462#else
3463configure___ system_malloc=no
3464#endif
3465
ef9e4345
GM
3466#ifdef USE_MMAP_FOR_BUFFERS
3467configure___ use_mmap_for_buffers=yes
73b77ee5 3468#else
ef9e4345 3469configure___ use_mmap_for_buffers=no
73b77ee5
GM
3470#endif
3471
3b33a005
DL
3472#ifndef C_DEBUG_SWITCH
3473#define C_DEBUG_SWITCH -g
3474#endif
3475
3476#ifndef C_OPTIMIZE_SWITCH
3477#ifdef __GNUC__
3478#define C_OPTIMIZE_SWITCH -O2
3479#else
3480#define C_OPTIMIZE_SWITCH -O
3481#endif
3482#endif
3483
3484#ifndef LD_SWITCH_MACHINE
3485#define LD_SWITCH_MACHINE
3486#endif
3487
3488#ifndef LD_SWITCH_SYSTEM
3489#define LD_SWITCH_SYSTEM
3490#endif
3491
3492#ifndef LD_SWITCH_X_SITE_AUX
3493#define LD_SWITCH_X_SITE_AUX
503d2be0 3494#endif
3b33a005
DL
3495
3496configure___ ld_switch_system=LD_SWITCH_SYSTEM
3497configure___ ld_switch_machine=LD_SWITCH_MACHINE
3498
3499#ifdef THIS_IS_CONFIGURE
3500
3501/* Get the CFLAGS for tests in configure. */
3502#ifdef __GNUC__
3503configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3504#else
3505configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3506#endif
3507
3508#else /* not THIS_IS_CONFIGURE */
3509
3510/* Get the CFLAGS for real compilation. */
3511#ifdef __GNUC__
3512configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3513#else
3514configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3515#endif
3516
3517#endif /* not THIS_IS_CONFIGURE */
3518' > ${tempcname}
3519
3520# The value of CPP is a quoted variable reference, so we need to do this
3521# to get its actual value...
3522CPP=`eval "echo $CPP"`
3523eval `${CPP} -Isrc ${tempcname} \
3524 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3525if test "x$SPECIFIED_CFLAGS" = x; then
3526 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
3527 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3528else
3529 REAL_CFLAGS="$CFLAGS"
3530fi
3531rm ${tempcname}
3532
3533ac_link="$ac_link $ld_switch_machine $ld_switch_system"
3534
3535### Make sure subsequent tests use flags consistent with the build flags.
3536
3537if test x"${OVERRIDE_CPPFLAGS}" != x; then
3538 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
3539else
3540 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
3541fi
3542
503d2be0 3543# Check whether --enable-largefile or --disable-largefile was given.
f4988be7
GM
3544if test "${enable_largefile+set}" = set; then
3545 enableval="$enable_largefile"
f4988be7 3546
503d2be0
AS
3547fi;
3548if test "$enable_largefile" != no; then
f4988be7 3549
b1b84649 3550 echo "$as_me:3550: checking for special C compiler options needed for large files" >&5
503d2be0
AS
3551echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
3552if test "${ac_cv_sys_largefile_CC+set}" = set; then
3553 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3554else
f4988be7 3555 ac_cv_sys_largefile_CC=no
503d2be0
AS
3556 if test "$GCC" != yes; then
3557 ac_save_CC=$CC
3558 while :; do
3559 # IRIX 6.2 and later do not support large files by default,
3560 # so use the C compiler's -n32 option if that helps.
3561 cat >conftest.$ac_ext <<_ACEOF
b1b84649 3562#line 3562 "configure"
b192d653 3563#include "confdefs.h"
f4988be7 3564#include <sys/types.h>
503d2be0
AS
3565 /* Check that off_t can represent 2**63 - 1 correctly.
3566 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3567 since some C++ compilers masquerading as C compilers
3568 incorrectly reject 9223372036854775807. */
3569#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3570 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3571 && LARGE_OFF_T % 2147483647 == 1)
3572 ? 1 : -1];
3573int
3574main ()
3575{
f4988be7 3576
503d2be0
AS
3577 ;
3578 return 0;
3579}
3580_ACEOF
3581 rm -f conftest.$ac_objext
b1b84649 3582if { (eval echo "$as_me:3582: \"$ac_compile\"") >&5
503d2be0
AS
3583 (eval $ac_compile) 2>&5
3584 ac_status=$?
b1b84649 3585 echo "$as_me:3585: \$? = $ac_status" >&5
503d2be0
AS
3586 (exit $ac_status); } &&
3587 { ac_try='test -s conftest.$ac_objext'
b1b84649 3588 { (eval echo "$as_me:3588: \"$ac_try\"") >&5
503d2be0
AS
3589 (eval $ac_try) 2>&5
3590 ac_status=$?
b1b84649 3591 echo "$as_me:3591: \$? = $ac_status" >&5
503d2be0
AS
3592 (exit $ac_status); }; }; then
3593 break
b192d653 3594else
503d2be0
AS
3595 echo "$as_me: failed program was:" >&5
3596cat conftest.$ac_ext >&5
3597fi
3598rm -f conftest.$ac_objext
3599 CC="$CC -n32"
3600 rm -f conftest.$ac_objext
b1b84649 3601if { (eval echo "$as_me:3601: \"$ac_compile\"") >&5
503d2be0
AS
3602 (eval $ac_compile) 2>&5
3603 ac_status=$?
b1b84649 3604 echo "$as_me:3604: \$? = $ac_status" >&5
503d2be0
AS
3605 (exit $ac_status); } &&
3606 { ac_try='test -s conftest.$ac_objext'
b1b84649 3607 { (eval echo "$as_me:3607: \"$ac_try\"") >&5
503d2be0
AS
3608 (eval $ac_try) 2>&5
3609 ac_status=$?
b1b84649 3610 echo "$as_me:3610: \$? = $ac_status" >&5
503d2be0
AS
3611 (exit $ac_status); }; }; then
3612 ac_cv_sys_largefile_CC=' -n32'; break
3613else
3614 echo "$as_me: failed program was:" >&5
3615cat conftest.$ac_ext >&5
3616fi
3617rm -f conftest.$ac_objext
3618 break
3619 done
3620 CC=$ac_save_CC
3621 rm -f conftest.$ac_ext
3622 fi
b192d653 3623fi
b1b84649 3624echo "$as_me:3624: result: $ac_cv_sys_largefile_CC" >&5
503d2be0
AS
3625echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
3626 if test "$ac_cv_sys_largefile_CC" != no; then
3627 CC=$CC$ac_cv_sys_largefile_CC
3628 fi
b192d653 3629
b1b84649 3630 echo "$as_me:3630: checking for _FILE_OFFSET_BITS value needed for large files" >&5
503d2be0
AS
3631echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
3632if test "${ac_cv_sys_file_offset_bits+set}" = set; then
3633 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3634else
503d2be0 3635 while :; do
f4988be7 3636 ac_cv_sys_file_offset_bits=no
503d2be0 3637 cat >conftest.$ac_ext <<_ACEOF
b1b84649 3638#line 3638 "configure"
f4988be7
GM
3639#include "confdefs.h"
3640#include <sys/types.h>
503d2be0
AS
3641 /* Check that off_t can represent 2**63 - 1 correctly.
3642 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3643 since some C++ compilers masquerading as C compilers
3644 incorrectly reject 9223372036854775807. */
3645#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3646 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3647 && LARGE_OFF_T % 2147483647 == 1)
3648 ? 1 : -1];
3649int
3650main ()
3651{
f4988be7 3652
503d2be0
AS
3653 ;
3654 return 0;
3655}
3656_ACEOF
3657rm -f conftest.$ac_objext
b1b84649 3658if { (eval echo "$as_me:3658: \"$ac_compile\"") >&5
503d2be0
AS
3659 (eval $ac_compile) 2>&5
3660 ac_status=$?
b1b84649 3661 echo "$as_me:3661: \$? = $ac_status" >&5
503d2be0
AS
3662 (exit $ac_status); } &&
3663 { ac_try='test -s conftest.$ac_objext'
b1b84649 3664 { (eval echo "$as_me:3664: \"$ac_try\"") >&5
503d2be0
AS
3665 (eval $ac_try) 2>&5
3666 ac_status=$?
b1b84649 3667 echo "$as_me:3667: \$? = $ac_status" >&5
503d2be0
AS
3668 (exit $ac_status); }; }; then
3669 break
f4988be7 3670else
503d2be0
AS
3671 echo "$as_me: failed program was:" >&5
3672cat conftest.$ac_ext >&5
3673fi
3674rm -f conftest.$ac_objext conftest.$ac_ext
3675 cat >conftest.$ac_ext <<_ACEOF
b1b84649 3676#line 3676 "configure"
ba4481b5 3677#include "confdefs.h"
f4988be7
GM
3678#define _FILE_OFFSET_BITS 64
3679#include <sys/types.h>
503d2be0
AS
3680 /* Check that off_t can represent 2**63 - 1 correctly.
3681 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3682 since some C++ compilers masquerading as C compilers
3683 incorrectly reject 9223372036854775807. */
3684#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3685 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3686 && LARGE_OFF_T % 2147483647 == 1)
3687 ? 1 : -1];
3688int
3689main ()
3690{
3691
3692 ;
3693 return 0;
3694}
3695_ACEOF
3696rm -f conftest.$ac_objext
b1b84649 3697if { (eval echo "$as_me:3697: \"$ac_compile\"") >&5
503d2be0
AS
3698 (eval $ac_compile) 2>&5
3699 ac_status=$?
b1b84649 3700 echo "$as_me:3700: \$? = $ac_status" >&5
503d2be0
AS
3701 (exit $ac_status); } &&
3702 { ac_try='test -s conftest.$ac_objext'
b1b84649 3703 { (eval echo "$as_me:3703: \"$ac_try\"") >&5
503d2be0
AS
3704 (eval $ac_try) 2>&5
3705 ac_status=$?
b1b84649 3706 echo "$as_me:3706: \$? = $ac_status" >&5
503d2be0
AS
3707 (exit $ac_status); }; }; then
3708 ac_cv_sys_file_offset_bits=64; break
3709else
3710 echo "$as_me: failed program was:" >&5
3711cat conftest.$ac_ext >&5
3712fi
3713rm -f conftest.$ac_objext conftest.$ac_ext
3714 break
3715done
ba4481b5 3716fi
b1b84649 3717echo "$as_me:3717: result: $ac_cv_sys_file_offset_bits" >&5
503d2be0
AS
3718echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
3719if test "$ac_cv_sys_file_offset_bits" != no; then
ba4481b5 3720
503d2be0 3721cat >>confdefs.h <<EOF
f4988be7 3722#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
ba4481b5 3723EOF
f4988be7 3724
503d2be0
AS
3725fi
3726rm -f conftest*
b1b84649 3727 echo "$as_me:3727: checking for _LARGE_FILES value needed for large files" >&5
503d2be0
AS
3728echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
3729if test "${ac_cv_sys_large_files+set}" = set; then
3730 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3731else
503d2be0 3732 while :; do
f4988be7 3733 ac_cv_sys_large_files=no
503d2be0 3734 cat >conftest.$ac_ext <<_ACEOF
b1b84649 3735#line 3735 "configure"
f4988be7 3736#include "confdefs.h"
503d2be0
AS
3737#include <sys/types.h>
3738 /* Check that off_t can represent 2**63 - 1 correctly.
3739 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3740 since some C++ compilers masquerading as C compilers
3741 incorrectly reject 9223372036854775807. */
3742#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3743 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3744 && LARGE_OFF_T % 2147483647 == 1)
3745 ? 1 : -1];
3746int
3747main ()
3748{
ba4481b5 3749
503d2be0
AS
3750 ;
3751 return 0;
3752}
3753_ACEOF
3754rm -f conftest.$ac_objext
b1b84649 3755if { (eval echo "$as_me:3755: \"$ac_compile\"") >&5
503d2be0
AS
3756 (eval $ac_compile) 2>&5
3757 ac_status=$?
b1b84649 3758 echo "$as_me:3758: \$? = $ac_status" >&5
503d2be0
AS
3759 (exit $ac_status); } &&
3760 { ac_try='test -s conftest.$ac_objext'
b1b84649 3761 { (eval echo "$as_me:3761: \"$ac_try\"") >&5
503d2be0
AS
3762 (eval $ac_try) 2>&5
3763 ac_status=$?
b1b84649 3764 echo "$as_me:3764: \$? = $ac_status" >&5
503d2be0
AS
3765 (exit $ac_status); }; }; then
3766 break
ba4481b5 3767else
503d2be0
AS
3768 echo "$as_me: failed program was:" >&5
3769cat conftest.$ac_ext >&5
3770fi
3771rm -f conftest.$ac_objext conftest.$ac_ext
3772 cat >conftest.$ac_ext <<_ACEOF
b1b84649 3773#line 3773 "configure"
ba4481b5 3774#include "confdefs.h"
f4988be7 3775#define _LARGE_FILES 1
503d2be0
AS
3776#include <sys/types.h>
3777 /* Check that off_t can represent 2**63 - 1 correctly.
3778 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3779 since some C++ compilers masquerading as C compilers
3780 incorrectly reject 9223372036854775807. */
3781#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3782 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3783 && LARGE_OFF_T % 2147483647 == 1)
3784 ? 1 : -1];
3785int
3786main ()
3787{
f4988be7 3788
503d2be0
AS
3789 ;
3790 return 0;
3791}
3792_ACEOF
3793rm -f conftest.$ac_objext
b1b84649 3794if { (eval echo "$as_me:3794: \"$ac_compile\"") >&5
503d2be0
AS
3795 (eval $ac_compile) 2>&5
3796 ac_status=$?
b1b84649 3797 echo "$as_me:3797: \$? = $ac_status" >&5
503d2be0
AS
3798 (exit $ac_status); } &&
3799 { ac_try='test -s conftest.$ac_objext'
b1b84649 3800 { (eval echo "$as_me:3800: \"$ac_try\"") >&5
503d2be0
AS
3801 (eval $ac_try) 2>&5
3802 ac_status=$?
b1b84649 3803 echo "$as_me:3803: \$? = $ac_status" >&5
503d2be0
AS
3804 (exit $ac_status); }; }; then
3805 ac_cv_sys_large_files=1; break
3806else
3807 echo "$as_me: failed program was:" >&5
3808cat conftest.$ac_ext >&5
3809fi
3810rm -f conftest.$ac_objext conftest.$ac_ext
3811 break
3812done
ba4481b5 3813fi
b1b84649 3814echo "$as_me:3814: result: $ac_cv_sys_large_files" >&5
503d2be0
AS
3815echo "${ECHO_T}$ac_cv_sys_large_files" >&6
3816if test "$ac_cv_sys_large_files" != no; then
ba4481b5 3817
503d2be0 3818cat >>confdefs.h <<EOF
f4988be7 3819#define _LARGE_FILES $ac_cv_sys_large_files
ba4481b5
DL
3820EOF
3821
503d2be0
AS
3822fi
3823rm -f conftest*
3824fi
ba4481b5 3825
f4988be7 3826# Sound support for GNU/Linux and the free BSDs.
503d2be0
AS
3827
3828for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
f4988be7 3829do
503d2be0 3830as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b1b84649 3831echo "$as_me:3831: checking for $ac_header" >&5
503d2be0
AS
3832echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3833if eval "test \"\${$as_ac_Header+set}\" = set"; then
3834 echo $ECHO_N "(cached) $ECHO_C" >&6
3835else
3836 cat >conftest.$ac_ext <<_ACEOF
b1b84649 3837#line 3837 "configure"
503d2be0
AS
3838#include "confdefs.h"
3839#include <$ac_header>
3840_ACEOF
b1b84649 3841if { (eval echo "$as_me:3841: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3842 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3843 ac_status=$?
3844 egrep -v '^ *\+' conftest.er1 >conftest.err
3845 rm -f conftest.er1
3846 cat conftest.err >&5
b1b84649 3847 echo "$as_me:3847: \$? = $ac_status" >&5
503d2be0
AS
3848 (exit $ac_status); } >/dev/null; then
3849 if test -s conftest.err; then
3850 ac_cpp_err=$ac_c_preproc_warn_flag
3851 else
3852 ac_cpp_err=
3853 fi
3854else
3855 ac_cpp_err=yes
3856fi
3857if test -z "$ac_cpp_err"; then
3858 eval "$as_ac_Header=yes"
3859else
3860 echo "$as_me: failed program was:" >&5
ba4481b5 3861 cat conftest.$ac_ext >&5
503d2be0 3862 eval "$as_ac_Header=no"
ba4481b5 3863fi
503d2be0 3864rm -f conftest.err conftest.$ac_ext
ba4481b5 3865fi
b1b84649 3866echo "$as_me:3866: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
3867echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3868if test `eval echo '${'$as_ac_Header'}'` = yes; then
3869 cat >>confdefs.h <<EOF
3870#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba4481b5 3871EOF
503d2be0 3872
ba4481b5 3873fi
f4988be7 3874done
ba4481b5 3875
f4988be7 3876# Emulation library used on NetBSD.
b1b84649 3877echo "$as_me:3877: checking for _oss_ioctl in -lossaudio" >&5
503d2be0
AS
3878echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6
3879if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
3880 echo $ECHO_N "(cached) $ECHO_C" >&6
65171e3a 3881else
503d2be0 3882 ac_check_lib_save_LIBS=$LIBS
f4988be7 3883LIBS="-lossaudio $LIBS"
503d2be0 3884cat >conftest.$ac_ext <<_ACEOF
b1b84649 3885#line 3885 "configure"
65171e3a 3886#include "confdefs.h"
503d2be0 3887
f4988be7 3888/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
3889#ifdef __cplusplus
3890extern "C"
3891#endif
f4988be7 3892/* We use char because int might match the return type of a gcc2
503d2be0
AS
3893 builtin and then its argument prototype would still apply. */
3894char _oss_ioctl ();
3895int
3896main ()
3897{
3898_oss_ioctl ();
3899 ;
3900 return 0;
3901}
3902_ACEOF
3903rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 3904if { (eval echo "$as_me:3904: \"$ac_link\"") >&5
503d2be0
AS
3905 (eval $ac_link) 2>&5
3906 ac_status=$?
b1b84649 3907 echo "$as_me:3907: \$? = $ac_status" >&5
503d2be0
AS
3908 (exit $ac_status); } &&
3909 { ac_try='test -s conftest$ac_exeext'
b1b84649 3910 { (eval echo "$as_me:3910: \"$ac_try\"") >&5
503d2be0
AS
3911 (eval $ac_try) 2>&5
3912 ac_status=$?
b1b84649 3913 echo "$as_me:3913: \$? = $ac_status" >&5
503d2be0
AS
3914 (exit $ac_status); }; }; then
3915 ac_cv_lib_ossaudio__oss_ioctl=yes
3916else
3917 echo "$as_me: failed program was:" >&5
3918cat conftest.$ac_ext >&5
3919ac_cv_lib_ossaudio__oss_ioctl=no
3920fi
3921rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3922LIBS=$ac_check_lib_save_LIBS
3923fi
b1b84649 3924echo "$as_me:3924: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
503d2be0
AS
3925echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6
3926if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
f4988be7
GM
3927 LIBSOUND=-lossaudio
3928else
503d2be0 3929 LIBSOUND=
f4988be7 3930fi
65171e3a 3931
503d2be0 3932for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
f4988be7 3933 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
b1b84649 3934 termcap.h stdio_ext.h fcntl.h term.h strings.h coff.h
f4988be7 3935do
503d2be0 3936as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b1b84649 3937echo "$as_me:3937: checking for $ac_header" >&5
503d2be0
AS
3938echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3939if eval "test \"\${$as_ac_Header+set}\" = set"; then
3940 echo $ECHO_N "(cached) $ECHO_C" >&6
3941else
3942 cat >conftest.$ac_ext <<_ACEOF
b1b84649 3943#line 3943 "configure"
503d2be0
AS
3944#include "confdefs.h"
3945#include <$ac_header>
3946_ACEOF
b1b84649 3947if { (eval echo "$as_me:3947: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3948 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3949 ac_status=$?
3950 egrep -v '^ *\+' conftest.er1 >conftest.err
3951 rm -f conftest.er1
3952 cat conftest.err >&5
b1b84649 3953 echo "$as_me:3953: \$? = $ac_status" >&5
503d2be0
AS
3954 (exit $ac_status); } >/dev/null; then
3955 if test -s conftest.err; then
3956 ac_cpp_err=$ac_c_preproc_warn_flag
3957 else
3958 ac_cpp_err=
3959 fi
3960else
3961 ac_cpp_err=yes
3962fi
3963if test -z "$ac_cpp_err"; then
3964 eval "$as_ac_Header=yes"
3965else
3966 echo "$as_me: failed program was:" >&5
ba4481b5 3967 cat conftest.$ac_ext >&5
503d2be0 3968 eval "$as_ac_Header=no"
ba4481b5 3969fi
503d2be0 3970rm -f conftest.err conftest.$ac_ext
ba4481b5 3971fi
b1b84649 3972echo "$as_me:3972: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
3973echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3974if test `eval echo '${'$as_ac_Header'}'` = yes; then
3975 cat >>confdefs.h <<EOF
3976#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba4481b5 3977EOF
503d2be0 3978
ba4481b5 3979fi
f4988be7 3980done
ba4481b5 3981
b1b84649 3982echo "$as_me:3982: checking for ANSI C header files" >&5
503d2be0
AS
3983echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3984if test "${ac_cv_header_stdc+set}" = set; then
3985 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3986else
503d2be0 3987 cat >conftest.$ac_ext <<_ACEOF
b1b84649 3988#line 3988 "configure"
ba4481b5 3989#include "confdefs.h"
f4988be7
GM
3990#include <stdlib.h>
3991#include <stdarg.h>
3992#include <string.h>
3993#include <float.h>
503d2be0
AS
3994
3995_ACEOF
b1b84649 3996if { (eval echo "$as_me:3996: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3997 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3998 ac_status=$?
3999 egrep -v '^ *\+' conftest.er1 >conftest.err
4000 rm -f conftest.er1
4001 cat conftest.err >&5
b1b84649 4002 echo "$as_me:4002: \$? = $ac_status" >&5
503d2be0
AS
4003 (exit $ac_status); } >/dev/null; then
4004 if test -s conftest.err; then
4005 ac_cpp_err=$ac_c_preproc_warn_flag
4006 else
4007 ac_cpp_err=
4008 fi
4009else
4010 ac_cpp_err=yes
4011fi
4012if test -z "$ac_cpp_err"; then
f4988be7 4013 ac_cv_header_stdc=yes
ba4481b5 4014else
503d2be0 4015 echo "$as_me: failed program was:" >&5
ba4481b5 4016 cat conftest.$ac_ext >&5
f4988be7 4017 ac_cv_header_stdc=no
ba4481b5 4018fi
503d2be0 4019rm -f conftest.err conftest.$ac_ext
ba4481b5 4020
f4988be7
GM
4021if test $ac_cv_header_stdc = yes; then
4022 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
503d2be0 4023 cat >conftest.$ac_ext <<_ACEOF
b1b84649 4024#line 4024 "configure"
f4988be7
GM
4025#include "confdefs.h"
4026#include <string.h>
503d2be0
AS
4027
4028_ACEOF
f4988be7
GM
4029if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4030 egrep "memchr" >/dev/null 2>&1; then
4031 :
4032else
f4988be7
GM
4033 ac_cv_header_stdc=no
4034fi
4035rm -f conftest*
4036
4037fi
4038
4039if test $ac_cv_header_stdc = yes; then
4040 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
503d2be0 4041 cat >conftest.$ac_ext <<_ACEOF
b1b84649 4042#line 4042 "configure"
f4988be7
GM
4043#include "confdefs.h"
4044#include <stdlib.h>
503d2be0
AS
4045
4046_ACEOF
f4988be7
GM
4047if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4048 egrep "free" >/dev/null 2>&1; then
4049 :
4050else
f4988be7
GM
4051 ac_cv_header_stdc=no
4052fi
4053rm -f conftest*
4054
4055fi
4056
4057if test $ac_cv_header_stdc = yes; then
4058 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
503d2be0 4059 if test "$cross_compiling" = yes; then
f4988be7
GM
4060 :
4061else
503d2be0 4062 cat >conftest.$ac_ext <<_ACEOF
b1b84649 4063#line 4063 "configure"
f4988be7
GM
4064#include "confdefs.h"
4065#include <ctype.h>
503d2be0
AS
4066#if ((' ' & 0x0FF) == 0x020)
4067# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4068# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4069#else
4070# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4071 || ('j' <= (c) && (c) <= 'r') \
4072 || ('s' <= (c) && (c) <= 'z'))
4073# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4074#endif
f4988be7 4075
503d2be0
AS
4076#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4077int
4078main ()
4079{
4080 int i;
4081 for (i = 0; i < 256; i++)
4082 if (XOR (islower (i), ISLOWER (i))
4083 || toupper (i) != TOUPPER (i))
4084 exit(2);
4085 exit (0);
4086}
4087_ACEOF
4088rm -f conftest$ac_exeext
b1b84649 4089if { (eval echo "$as_me:4089: \"$ac_link\"") >&5
503d2be0
AS
4090 (eval $ac_link) 2>&5
4091 ac_status=$?
b1b84649 4092 echo "$as_me:4092: \$? = $ac_status" >&5
503d2be0 4093 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b1b84649 4094 { (eval echo "$as_me:4094: \"$ac_try\"") >&5
503d2be0
AS
4095 (eval $ac_try) 2>&5
4096 ac_status=$?
b1b84649 4097 echo "$as_me:4097: \$? = $ac_status" >&5
503d2be0 4098 (exit $ac_status); }; }; then
f4988be7
GM
4099 :
4100else
503d2be0
AS
4101 echo "$as_me: program exited with status $ac_status" >&5
4102echo "$as_me: failed program was:" >&5
4103cat conftest.$ac_ext >&5
4104ac_cv_header_stdc=no
f4988be7 4105fi
503d2be0 4106rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
f4988be7 4107fi
f4988be7
GM
4108fi
4109fi
b1b84649 4110echo "$as_me:4110: result: $ac_cv_header_stdc" >&5
503d2be0 4111echo "${ECHO_T}$ac_cv_header_stdc" >&6
f4988be7 4112if test $ac_cv_header_stdc = yes; then
503d2be0
AS
4113
4114cat >>confdefs.h <<\EOF
f4988be7
GM
4115#define STDC_HEADERS 1
4116EOF
4117
4118fi
4119
b1b84649 4120echo "$as_me:4120: checking whether time.h and sys/time.h may both be included" >&5
503d2be0
AS
4121echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
4122if test "${ac_cv_header_time+set}" = set; then
4123 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4124else
503d2be0 4125 cat >conftest.$ac_ext <<_ACEOF
b1b84649 4126#line 4126 "configure"
f4988be7
GM
4127#include "confdefs.h"
4128#include <sys/types.h>
4129#include <sys/time.h>
4130#include <time.h>
503d2be0
AS
4131
4132int
4133main ()
4134{
4135if ((struct tm *) 0)
4136return 0;
4137 ;
4138 return 0;
4139}
4140_ACEOF
4141rm -f conftest.$ac_objext
b1b84649 4142if { (eval echo "$as_me:4142: \"$ac_compile\"") >&5
503d2be0
AS
4143 (eval $ac_compile) 2>&5
4144 ac_status=$?
b1b84649 4145 echo "$as_me:4145: \$? = $ac_status" >&5
503d2be0
AS
4146 (exit $ac_status); } &&
4147 { ac_try='test -s conftest.$ac_objext'
b1b84649 4148 { (eval echo "$as_me:4148: \"$ac_try\"") >&5
503d2be0
AS
4149 (eval $ac_try) 2>&5
4150 ac_status=$?
b1b84649 4151 echo "$as_me:4151: \$? = $ac_status" >&5
503d2be0 4152 (exit $ac_status); }; }; then
f4988be7
GM
4153 ac_cv_header_time=yes
4154else
503d2be0
AS
4155 echo "$as_me: failed program was:" >&5
4156cat conftest.$ac_ext >&5
4157ac_cv_header_time=no
f4988be7 4158fi
503d2be0 4159rm -f conftest.$ac_objext conftest.$ac_ext
f4988be7 4160fi
b1b84649 4161echo "$as_me:4161: result: $ac_cv_header_time" >&5
503d2be0 4162echo "${ECHO_T}$ac_cv_header_time" >&6
f4988be7 4163if test $ac_cv_header_time = yes; then
503d2be0
AS
4164
4165cat >>confdefs.h <<\EOF
f4988be7
GM
4166#define TIME_WITH_SYS_TIME 1
4167EOF
4168
4169fi
4170
b1b84649 4171echo "$as_me:4171: checking for sys_siglist declaration in signal.h or unistd.h" >&5
503d2be0
AS
4172echo $ECHO_N "checking for sys_siglist declaration in signal.h or unistd.h... $ECHO_C" >&6
4173if test "${ac_cv_decl_sys_siglist+set}" = set; then
4174 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4175else
503d2be0 4176 cat >conftest.$ac_ext <<_ACEOF
b1b84649 4177#line 4177 "configure"
f4988be7
GM
4178#include "confdefs.h"
4179#include <sys/types.h>
4180#include <signal.h>
4181/* NetBSD declares sys_siglist in unistd.h. */
503d2be0
AS
4182#if HAVE_UNISTD_H
4183# include <unistd.h>
f4988be7 4184#endif
503d2be0
AS
4185
4186int
4187main ()
4188{
f4988be7 4189char *msg = *(sys_siglist + 1);
503d2be0
AS
4190 ;
4191 return 0;
4192}
4193_ACEOF
4194rm -f conftest.$ac_objext
b1b84649 4195if { (eval echo "$as_me:4195: \"$ac_compile\"") >&5
503d2be0
AS
4196 (eval $ac_compile) 2>&5
4197 ac_status=$?
b1b84649 4198 echo "$as_me:4198: \$? = $ac_status" >&5
503d2be0
AS
4199 (exit $ac_status); } &&
4200 { ac_try='test -s conftest.$ac_objext'
b1b84649 4201 { (eval echo "$as_me:4201: \"$ac_try\"") >&5
503d2be0
AS
4202 (eval $ac_try) 2>&5
4203 ac_status=$?
b1b84649 4204 echo "$as_me:4204: \$? = $ac_status" >&5
503d2be0 4205 (exit $ac_status); }; }; then
f4988be7
GM
4206 ac_cv_decl_sys_siglist=yes
4207else
503d2be0
AS
4208 echo "$as_me: failed program was:" >&5
4209cat conftest.$ac_ext >&5
4210ac_cv_decl_sys_siglist=no
f4988be7 4211fi
503d2be0 4212rm -f conftest.$ac_objext conftest.$ac_ext
f4988be7 4213fi
b1b84649 4214echo "$as_me:4214: result: $ac_cv_decl_sys_siglist" >&5
503d2be0 4215echo "${ECHO_T}$ac_cv_decl_sys_siglist" >&6
f4988be7 4216if test $ac_cv_decl_sys_siglist = yes; then
503d2be0
AS
4217
4218cat >>confdefs.h <<\EOF
f4988be7
GM
4219#define SYS_SIGLIST_DECLARED 1
4220EOF
4221
4222fi
4223
b1b84649 4224echo "$as_me:4224: checking for sys/wait.h that is POSIX.1 compatible" >&5
503d2be0
AS
4225echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
4226if test "${ac_cv_header_sys_wait_h+set}" = set; then
4227 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4228else
503d2be0 4229 cat >conftest.$ac_ext <<_ACEOF
b1b84649 4230#line 4230 "configure"
f4988be7
GM
4231#include "confdefs.h"
4232#include <sys/types.h>
4233#include <sys/wait.h>
4234#ifndef WEXITSTATUS
503d2be0 4235# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
f4988be7
GM
4236#endif
4237#ifndef WIFEXITED
503d2be0 4238# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
f4988be7 4239#endif
503d2be0
AS
4240
4241int
4242main ()
4243{
4244 int s;
4245 wait (&s);
4246 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4247 ;
4248 return 0;
4249}
4250_ACEOF
4251rm -f conftest.$ac_objext
b1b84649 4252if { (eval echo "$as_me:4252: \"$ac_compile\"") >&5
503d2be0
AS
4253 (eval $ac_compile) 2>&5
4254 ac_status=$?
b1b84649 4255 echo "$as_me:4255: \$? = $ac_status" >&5
503d2be0
AS
4256 (exit $ac_status); } &&
4257 { ac_try='test -s conftest.$ac_objext'
b1b84649 4258 { (eval echo "$as_me:4258: \"$ac_try\"") >&5
503d2be0
AS
4259 (eval $ac_try) 2>&5
4260 ac_status=$?
b1b84649 4261 echo "$as_me:4261: \$? = $ac_status" >&5
503d2be0 4262 (exit $ac_status); }; }; then
f4988be7
GM
4263 ac_cv_header_sys_wait_h=yes
4264else
503d2be0
AS
4265 echo "$as_me: failed program was:" >&5
4266cat conftest.$ac_ext >&5
4267ac_cv_header_sys_wait_h=no
f4988be7 4268fi
503d2be0 4269rm -f conftest.$ac_objext conftest.$ac_ext
f4988be7 4270fi
b1b84649 4271echo "$as_me:4271: result: $ac_cv_header_sys_wait_h" >&5
503d2be0 4272echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
f4988be7 4273if test $ac_cv_header_sys_wait_h = yes; then
503d2be0
AS
4274
4275cat >>confdefs.h <<\EOF
f4988be7
GM
4276#define HAVE_SYS_WAIT_H 1
4277EOF
4278
4279fi
4280
b1b84649 4281echo "$as_me:4281: checking for struct utimbuf" >&5
503d2be0
AS
4282echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
4283if test "${emacs_cv_struct_utimbuf+set}" = set; then
4284 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4285else
503d2be0 4286 cat >conftest.$ac_ext <<_ACEOF
b1b84649 4287#line 4287 "configure"
f4988be7
GM
4288#include "confdefs.h"
4289#ifdef TIME_WITH_SYS_TIME
4290#include <sys/time.h>
4291#include <time.h>
4292#else
4293#ifdef HAVE_SYS_TIME_H
4294#include <sys/time.h>
4295#else
4296#include <time.h>
4297#endif
4298#endif
4299#ifdef HAVE_UTIME_H
4300#include <utime.h>
4301#endif
503d2be0
AS
4302int
4303main ()
4304{
f4988be7 4305static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
4306 ;
4307 return 0;
4308}
4309_ACEOF
4310rm -f conftest.$ac_objext
b1b84649 4311if { (eval echo "$as_me:4311: \"$ac_compile\"") >&5
503d2be0
AS
4312 (eval $ac_compile) 2>&5
4313 ac_status=$?
b1b84649 4314 echo "$as_me:4314: \$? = $ac_status" >&5
503d2be0
AS
4315 (exit $ac_status); } &&
4316 { ac_try='test -s conftest.$ac_objext'
b1b84649 4317 { (eval echo "$as_me:4317: \"$ac_try\"") >&5
503d2be0
AS
4318 (eval $ac_try) 2>&5
4319 ac_status=$?
b1b84649 4320 echo "$as_me:4320: \$? = $ac_status" >&5
503d2be0 4321 (exit $ac_status); }; }; then
f4988be7
GM
4322 emacs_cv_struct_utimbuf=yes
4323else
503d2be0
AS
4324 echo "$as_me: failed program was:" >&5
4325cat conftest.$ac_ext >&5
4326emacs_cv_struct_utimbuf=no
f4988be7 4327fi
503d2be0 4328rm -f conftest.$ac_objext conftest.$ac_ext
f4988be7 4329fi
b1b84649 4330echo "$as_me:4330: result: $emacs_cv_struct_utimbuf" >&5
503d2be0 4331echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6
f4988be7 4332if test $emacs_cv_struct_utimbuf = yes; then
503d2be0 4333 cat >>confdefs.h <<\EOF
f4988be7
GM
4334#define HAVE_STRUCT_UTIMBUF 1
4335EOF
4336
4337fi
4338
b1b84649 4339echo "$as_me:4339: checking return type of signal handlers" >&5
503d2be0
AS
4340echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4341if test "${ac_cv_type_signal+set}" = set; then
4342 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4343else
503d2be0 4344 cat >conftest.$ac_ext <<_ACEOF
b1b84649 4345#line 4345 "configure"
f4988be7
GM
4346#include "confdefs.h"
4347#include <sys/types.h>
4348#include <signal.h>
4349#ifdef signal
503d2be0 4350# undef signal
f4988be7
GM
4351#endif
4352#ifdef __cplusplus
4353extern "C" void (*signal (int, void (*)(int)))(int);
4354#else
4355void (*signal ()) ();
4356#endif
4357
503d2be0
AS
4358int
4359main ()
4360{
f4988be7 4361int i;
503d2be0
AS
4362 ;
4363 return 0;
4364}
4365_ACEOF
4366rm -f conftest.$ac_objext
b1b84649 4367if { (eval echo "$as_me:4367: \"$ac_compile\"") >&5
503d2be0
AS
4368 (eval $ac_compile) 2>&5
4369 ac_status=$?
b1b84649 4370 echo "$as_me:4370: \$? = $ac_status" >&5
503d2be0
AS
4371 (exit $ac_status); } &&
4372 { ac_try='test -s conftest.$ac_objext'
b1b84649 4373 { (eval echo "$as_me:4373: \"$ac_try\"") >&5
503d2be0
AS
4374 (eval $ac_try) 2>&5
4375 ac_status=$?
b1b84649 4376 echo "$as_me:4376: \$? = $ac_status" >&5
503d2be0 4377 (exit $ac_status); }; }; then
f4988be7
GM
4378 ac_cv_type_signal=void
4379else
503d2be0
AS
4380 echo "$as_me: failed program was:" >&5
4381cat conftest.$ac_ext >&5
4382ac_cv_type_signal=int
f4988be7 4383fi
503d2be0 4384rm -f conftest.$ac_objext conftest.$ac_ext
f4988be7 4385fi
b1b84649 4386echo "$as_me:4386: result: $ac_cv_type_signal" >&5
503d2be0 4387echo "${ECHO_T}$ac_cv_type_signal" >&6
f4988be7 4388
503d2be0 4389cat >>confdefs.h <<EOF
f4988be7 4390#define RETSIGTYPE $ac_cv_type_signal
ba4481b5
DL
4391EOF
4392
b1b84649 4393echo "$as_me:4393: checking for speed_t" >&5
503d2be0
AS
4394echo $ECHO_N "checking for speed_t... $ECHO_C" >&6
4395if test "${emacs_cv_speed_t+set}" = set; then
4396 echo $ECHO_N "(cached) $ECHO_C" >&6
34ec9ebe 4397else
503d2be0 4398 cat >conftest.$ac_ext <<_ACEOF
b1b84649 4399#line 4399 "configure"
34ec9ebe
GM
4400#include "confdefs.h"
4401#include <termios.h>
503d2be0
AS
4402int
4403main ()
4404{
34ec9ebe 4405speed_t x = 1;
503d2be0
AS
4406 ;
4407 return 0;
4408}
4409_ACEOF
4410rm -f conftest.$ac_objext
b1b84649 4411if { (eval echo "$as_me:4411: \"$ac_compile\"") >&5
503d2be0
AS
4412 (eval $ac_compile) 2>&5
4413 ac_status=$?
b1b84649 4414 echo "$as_me:4414: \$? = $ac_status" >&5
503d2be0
AS
4415 (exit $ac_status); } &&
4416 { ac_try='test -s conftest.$ac_objext'
b1b84649 4417 { (eval echo "$as_me:4417: \"$ac_try\"") >&5
503d2be0
AS
4418 (eval $ac_try) 2>&5
4419 ac_status=$?
b1b84649 4420 echo "$as_me:4420: \$? = $ac_status" >&5
503d2be0 4421 (exit $ac_status); }; }; then
34ec9ebe
GM
4422 emacs_cv_speed_t=yes
4423else
503d2be0
AS
4424 echo "$as_me: failed program was:" >&5
4425cat conftest.$ac_ext >&5
4426emacs_cv_speed_t=no
34ec9ebe 4427fi
503d2be0 4428rm -f conftest.$ac_objext conftest.$ac_ext
34ec9ebe 4429fi
b1b84649 4430echo "$as_me:4430: result: $emacs_cv_speed_t" >&5
503d2be0 4431echo "${ECHO_T}$emacs_cv_speed_t" >&6
34ec9ebe 4432if test $emacs_cv_speed_t = yes; then
503d2be0 4433 cat >>confdefs.h <<\EOF
34ec9ebe
GM
4434#define HAVE_SPEED_T 1
4435EOF
4436
4437fi
4438
b1b84649 4439echo "$as_me:4439: checking for struct timeval" >&5
503d2be0
AS
4440echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
4441if test "${emacs_cv_struct_timeval+set}" = set; then
4442 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4443else
503d2be0 4444 cat >conftest.$ac_ext <<_ACEOF
b1b84649 4445#line 4445 "configure"
ba4481b5
DL
4446#include "confdefs.h"
4447#ifdef TIME_WITH_SYS_TIME
4448#include <sys/time.h>
4449#include <time.h>
4450#else
4451#ifdef HAVE_SYS_TIME_H
4452#include <sys/time.h>
4453#else
4454#include <time.h>
4455#endif
4456#endif
503d2be0
AS
4457int
4458main ()
4459{
ba4481b5 4460static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
4461 ;
4462 return 0;
4463}
4464_ACEOF
4465rm -f conftest.$ac_objext
b1b84649 4466if { (eval echo "$as_me:4466: \"$ac_compile\"") >&5
503d2be0
AS
4467 (eval $ac_compile) 2>&5
4468 ac_status=$?
b1b84649 4469 echo "$as_me:4469: \$? = $ac_status" >&5
503d2be0
AS
4470 (exit $ac_status); } &&
4471 { ac_try='test -s conftest.$ac_objext'
b1b84649 4472 { (eval echo "$as_me:4472: \"$ac_try\"") >&5
503d2be0
AS
4473 (eval $ac_try) 2>&5
4474 ac_status=$?
b1b84649 4475 echo "$as_me:4475: \$? = $ac_status" >&5
503d2be0 4476 (exit $ac_status); }; }; then
ba4481b5
DL
4477 emacs_cv_struct_timeval=yes
4478else
503d2be0
AS
4479 echo "$as_me: failed program was:" >&5
4480cat conftest.$ac_ext >&5
4481emacs_cv_struct_timeval=no
ba4481b5 4482fi
503d2be0 4483rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 4484fi
b1b84649 4485echo "$as_me:4485: result: $emacs_cv_struct_timeval" >&5
503d2be0 4486echo "${ECHO_T}$emacs_cv_struct_timeval" >&6
ba4481b5
DL
4487HAVE_TIMEVAL=$emacs_cv_struct_timeval
4488if test $emacs_cv_struct_timeval = yes; then
503d2be0 4489 cat >>confdefs.h <<\EOF
ba4481b5
DL
4490#define HAVE_TIMEVAL 1
4491EOF
4492
4493fi
4494
b1b84649 4495echo "$as_me:4495: checking for struct exception" >&5
503d2be0
AS
4496echo $ECHO_N "checking for struct exception... $ECHO_C" >&6
4497if test "${emacs_cv_struct_exception+set}" = set; then
4498 echo $ECHO_N "(cached) $ECHO_C" >&6
d42122a3 4499else
503d2be0 4500 cat >conftest.$ac_ext <<_ACEOF
b1b84649 4501#line 4501 "configure"
d42122a3
DL
4502#include "confdefs.h"
4503#include <math.h>
503d2be0
AS
4504int
4505main ()
4506{
d42122a3 4507static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
4508 ;
4509 return 0;
4510}
4511_ACEOF
4512rm -f conftest.$ac_objext
b1b84649 4513if { (eval echo "$as_me:4513: \"$ac_compile\"") >&5
503d2be0
AS
4514 (eval $ac_compile) 2>&5
4515 ac_status=$?
b1b84649 4516 echo "$as_me:4516: \$? = $ac_status" >&5
503d2be0
AS
4517 (exit $ac_status); } &&
4518 { ac_try='test -s conftest.$ac_objext'
b1b84649 4519 { (eval echo "$as_me:4519: \"$ac_try\"") >&5
503d2be0
AS
4520 (eval $ac_try) 2>&5
4521 ac_status=$?
b1b84649 4522 echo "$as_me:4522: \$? = $ac_status" >&5
503d2be0 4523 (exit $ac_status); }; }; then
d42122a3
DL
4524 emacs_cv_struct_exception=yes
4525else
503d2be0
AS
4526 echo "$as_me: failed program was:" >&5
4527cat conftest.$ac_ext >&5
4528emacs_cv_struct_exception=no
d42122a3 4529fi
503d2be0 4530rm -f conftest.$ac_objext conftest.$ac_ext
d42122a3 4531fi
b1b84649 4532echo "$as_me:4532: result: $emacs_cv_struct_exception" >&5
503d2be0 4533echo "${ECHO_T}$emacs_cv_struct_exception" >&6
d42122a3
DL
4534HAVE_EXCEPTION=$emacs_cv_struct_exception
4535if test $emacs_cv_struct_exception != yes; then
503d2be0 4536 cat >>confdefs.h <<\EOF
d42122a3
DL
4537#define NO_MATHERR 1
4538EOF
4539
4540fi
4541
b1b84649 4542echo "$as_me:4542: checking whether struct tm is in sys/time.h or time.h" >&5
503d2be0
AS
4543echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
4544if test "${ac_cv_struct_tm+set}" = set; then
4545 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4546else
503d2be0 4547 cat >conftest.$ac_ext <<_ACEOF
b1b84649 4548#line 4548 "configure"
ba4481b5
DL
4549#include "confdefs.h"
4550#include <sys/types.h>
4551#include <time.h>
503d2be0
AS
4552
4553int
4554main ()
4555{
ba4481b5 4556struct tm *tp; tp->tm_sec;
503d2be0
AS
4557 ;
4558 return 0;
4559}
4560_ACEOF
4561rm -f conftest.$ac_objext
b1b84649 4562if { (eval echo "$as_me:4562: \"$ac_compile\"") >&5
503d2be0
AS
4563 (eval $ac_compile) 2>&5
4564 ac_status=$?
b1b84649 4565 echo "$as_me:4565: \$? = $ac_status" >&5
503d2be0
AS
4566 (exit $ac_status); } &&
4567 { ac_try='test -s conftest.$ac_objext'
b1b84649 4568 { (eval echo "$as_me:4568: \"$ac_try\"") >&5
503d2be0
AS
4569 (eval $ac_try) 2>&5
4570 ac_status=$?
b1b84649 4571 echo "$as_me:4571: \$? = $ac_status" >&5
503d2be0 4572 (exit $ac_status); }; }; then
ba4481b5
DL
4573 ac_cv_struct_tm=time.h
4574else
503d2be0
AS
4575 echo "$as_me: failed program was:" >&5
4576cat conftest.$ac_ext >&5
4577ac_cv_struct_tm=sys/time.h
ba4481b5 4578fi
503d2be0 4579rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 4580fi
b1b84649 4581echo "$as_me:4581: result: $ac_cv_struct_tm" >&5
503d2be0 4582echo "${ECHO_T}$ac_cv_struct_tm" >&6
ba4481b5 4583if test $ac_cv_struct_tm = sys/time.h; then
503d2be0
AS
4584
4585cat >>confdefs.h <<\EOF
ba4481b5
DL
4586#define TM_IN_SYS_TIME 1
4587EOF
4588
4589fi
4590
b1b84649 4591echo "$as_me:4591: checking for struct tm.tm_zone" >&5
503d2be0
AS
4592echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
4593if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
4594 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4595else
503d2be0 4596 cat >conftest.$ac_ext <<_ACEOF
b1b84649 4597#line 4597 "configure"
ba4481b5
DL
4598#include "confdefs.h"
4599#include <sys/types.h>
4600#include <$ac_cv_struct_tm>
503d2be0
AS
4601
4602int
4603main ()
4604{
4605static struct tm ac_aggr;
4606if (ac_aggr.tm_zone)
4607return 0;
4608 ;
4609 return 0;
4610}
4611_ACEOF
4612rm -f conftest.$ac_objext
b1b84649 4613if { (eval echo "$as_me:4613: \"$ac_compile\"") >&5
503d2be0
AS
4614 (eval $ac_compile) 2>&5
4615 ac_status=$?
b1b84649 4616 echo "$as_me:4616: \$? = $ac_status" >&5
503d2be0
AS
4617 (exit $ac_status); } &&
4618 { ac_try='test -s conftest.$ac_objext'
b1b84649 4619 { (eval echo "$as_me:4619: \"$ac_try\"") >&5
503d2be0
AS
4620 (eval $ac_try) 2>&5
4621 ac_status=$?
b1b84649 4622 echo "$as_me:4622: \$? = $ac_status" >&5
503d2be0
AS
4623 (exit $ac_status); }; }; then
4624 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 4625else
503d2be0
AS
4626 echo "$as_me: failed program was:" >&5
4627cat conftest.$ac_ext >&5
4628ac_cv_member_struct_tm_tm_zone=no
ba4481b5 4629fi
503d2be0
AS
4630rm -f conftest.$ac_objext conftest.$ac_ext
4631fi
b1b84649 4632echo "$as_me:4632: result: $ac_cv_member_struct_tm_tm_zone" >&5
503d2be0
AS
4633echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
4634if test $ac_cv_member_struct_tm_tm_zone = yes; then
4635
4636cat >>confdefs.h <<EOF
4637#define HAVE_STRUCT_TM_TM_ZONE 1
4638EOF
4639
ba4481b5
DL
4640fi
4641
503d2be0
AS
4642if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
4643
4644cat >>confdefs.h <<\EOF
ba4481b5
DL
4645#define HAVE_TM_ZONE 1
4646EOF
4647
4648else
b1b84649 4649 echo "$as_me:4649: checking for tzname" >&5
503d2be0
AS
4650echo $ECHO_N "checking for tzname... $ECHO_C" >&6
4651if test "${ac_cv_var_tzname+set}" = set; then
4652 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4653else
503d2be0 4654 cat >conftest.$ac_ext <<_ACEOF
b1b84649 4655#line 4655 "configure"
ba4481b5
DL
4656#include "confdefs.h"
4657#include <time.h>
4658#ifndef tzname /* For SGI. */
4659extern char *tzname[]; /* RS6000 and others reject char **tzname. */
4660#endif
503d2be0
AS
4661
4662int
4663main ()
4664{
ba4481b5 4665atoi(*tzname);
503d2be0
AS
4666 ;
4667 return 0;
4668}
4669_ACEOF
4670rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 4671if { (eval echo "$as_me:4671: \"$ac_link\"") >&5
503d2be0
AS
4672 (eval $ac_link) 2>&5
4673 ac_status=$?
b1b84649 4674 echo "$as_me:4674: \$? = $ac_status" >&5
503d2be0
AS
4675 (exit $ac_status); } &&
4676 { ac_try='test -s conftest$ac_exeext'
b1b84649 4677 { (eval echo "$as_me:4677: \"$ac_try\"") >&5
503d2be0
AS
4678 (eval $ac_try) 2>&5
4679 ac_status=$?
b1b84649 4680 echo "$as_me:4680: \$? = $ac_status" >&5
503d2be0 4681 (exit $ac_status); }; }; then
ba4481b5
DL
4682 ac_cv_var_tzname=yes
4683else
503d2be0
AS
4684 echo "$as_me: failed program was:" >&5
4685cat conftest.$ac_ext >&5
4686ac_cv_var_tzname=no
ba4481b5 4687fi
503d2be0 4688rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 4689fi
b1b84649 4690echo "$as_me:4690: result: $ac_cv_var_tzname" >&5
503d2be0 4691echo "${ECHO_T}$ac_cv_var_tzname" >&6
ba4481b5 4692 if test $ac_cv_var_tzname = yes; then
503d2be0
AS
4693
4694cat >>confdefs.h <<\EOF
ba4481b5
DL
4695#define HAVE_TZNAME 1
4696EOF
4697
4698 fi
4699fi
4700
b1b84649 4701echo "$as_me:4701: checking for tm_gmtoff in struct tm" >&5
503d2be0
AS
4702echo $ECHO_N "checking for tm_gmtoff in struct tm... $ECHO_C" >&6
4703if test "${emacs_cv_tm_gmtoff+set}" = set; then
4704 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 4705else
503d2be0 4706 cat >conftest.$ac_ext <<_ACEOF
b1b84649 4707#line 4707 "configure"
1113b624
PE
4708#include "confdefs.h"
4709#include <time.h>
503d2be0
AS
4710int
4711main ()
4712{
1113b624 4713struct tm t; t.tm_gmtoff = 0
503d2be0
AS
4714 ;
4715 return 0;
4716}
4717_ACEOF
4718rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 4719if { (eval echo "$as_me:4719: \"$ac_link\"") >&5
503d2be0
AS
4720 (eval $ac_link) 2>&5
4721 ac_status=$?
b1b84649 4722 echo "$as_me:4722: \$? = $ac_status" >&5
503d2be0
AS
4723 (exit $ac_status); } &&
4724 { ac_try='test -s conftest$ac_exeext'
b1b84649 4725 { (eval echo "$as_me:4725: \"$ac_try\"") >&5
503d2be0
AS
4726 (eval $ac_try) 2>&5
4727 ac_status=$?
b1b84649 4728 echo "$as_me:4728: \$? = $ac_status" >&5
503d2be0 4729 (exit $ac_status); }; }; then
1113b624
PE
4730 emacs_cv_tm_gmtoff=yes
4731else
503d2be0
AS
4732 echo "$as_me: failed program was:" >&5
4733cat conftest.$ac_ext >&5
4734emacs_cv_tm_gmtoff=no
1113b624 4735fi
503d2be0 4736rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1113b624 4737fi
b1b84649 4738echo "$as_me:4738: result: $emacs_cv_tm_gmtoff" >&5
503d2be0 4739echo "${ECHO_T}$emacs_cv_tm_gmtoff" >&6
1113b624 4740if test $emacs_cv_tm_gmtoff = yes; then
503d2be0 4741 cat >>confdefs.h <<\EOF
1113b624
PE
4742#define HAVE_TM_GMTOFF 1
4743EOF
4744
4745fi
ba4481b5 4746
b1b84649 4747echo "$as_me:4747: checking for $CC option to accept ANSI C" >&5
503d2be0
AS
4748echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
4749if test "${ac_cv_prog_cc_stdc+set}" = set; then
4750 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
4751else
4752 ac_cv_prog_cc_stdc=no
503d2be0
AS
4753ac_save_CC=$CC
4754cat >conftest.$ac_ext <<_ACEOF
b1b84649 4755#line 4755 "configure"
7397acc4
DL
4756#include "confdefs.h"
4757#include <stdarg.h>
4758#include <stdio.h>
4759#include <sys/types.h>
4760#include <sys/stat.h>
4761/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4762struct buf { int x; };
4763FILE * (*rcsopen) (struct buf *, struct stat *, int);
4764static char *e (p, i)
4765 char **p;
4766 int i;
4767{
4768 return p[i];
4769}
4770static char *f (char * (*g) (char **, int), char **p, ...)
4771{
4772 char *s;
4773 va_list v;
4774 va_start (v,p);
4775 s = g (p, va_arg (v,int));
4776 va_end (v);
4777 return s;
4778}
4779int test (int i, double x);
4780struct s1 {int (*f) (int a);};
4781struct s2 {int (*f) (double a);};
4782int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4783int argc;
4784char **argv;
503d2be0
AS
4785int
4786main ()
4787{
7397acc4 4788return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
503d2be0
AS
4789 ;
4790 return 0;
4791}
4792_ACEOF
4793# Don't try gcc -ansi; that turns off useful extensions and
4794# breaks some systems' header files.
4795# AIX -qlanglvl=ansi
4796# Ultrix and OSF/1 -std1
4797# HP-UX 10.20 and later -Ae
4798# HP-UX older versions -Aa -D_HPUX_SOURCE
4799# SVR4 -Xc -D__EXTENSIONS__
4800for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4801do
4802 CC="$ac_save_CC $ac_arg"
4803 rm -f conftest.$ac_objext
b1b84649 4804if { (eval echo "$as_me:4804: \"$ac_compile\"") >&5
503d2be0
AS
4805 (eval $ac_compile) 2>&5
4806 ac_status=$?
b1b84649 4807 echo "$as_me:4807: \$? = $ac_status" >&5
503d2be0
AS
4808 (exit $ac_status); } &&
4809 { ac_try='test -s conftest.$ac_objext'
b1b84649 4810 { (eval echo "$as_me:4810: \"$ac_try\"") >&5
503d2be0
AS
4811 (eval $ac_try) 2>&5
4812 ac_status=$?
b1b84649 4813 echo "$as_me:4813: \$? = $ac_status" >&5
503d2be0
AS
4814 (exit $ac_status); }; }; then
4815 ac_cv_prog_cc_stdc=$ac_arg
4816break
4817else
4818 echo "$as_me: failed program was:" >&5
4819cat conftest.$ac_ext >&5
4820fi
4821rm -f conftest.$ac_objext
7397acc4 4822done
503d2be0
AS
4823rm -f conftest.$ac_ext conftest.$ac_objext
4824CC=$ac_save_CC
7397acc4
DL
4825
4826fi
4827
4828case "x$ac_cv_prog_cc_stdc" in
4829 x|xno)
b1b84649 4830 echo "$as_me:4830: result: none needed" >&5
503d2be0 4831echo "${ECHO_T}none needed" >&6 ;;
7397acc4 4832 *)
b1b84649 4833 echo "$as_me:4833: result: $ac_cv_prog_cc_stdc" >&5
503d2be0 4834echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
7397acc4
DL
4835 CC="$CC $ac_cv_prog_cc_stdc" ;;
4836esac
4837
b1b84649 4838echo "$as_me:4838: checking for function prototypes" >&5
503d2be0 4839echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
7397acc4 4840if test "$ac_cv_prog_cc_stdc" != no; then
b1b84649 4841 echo "$as_me:4841: result: yes" >&5
503d2be0
AS
4842echo "${ECHO_T}yes" >&6
4843
4844cat >>confdefs.h <<\EOF
7397acc4
DL
4845#define PROTOTYPES 1
4846EOF
4847
4848else
b1b84649 4849 echo "$as_me:4849: result: no" >&5
503d2be0 4850echo "${ECHO_T}no" >&6
7397acc4
DL
4851fi
4852
b1b84649 4853echo "$as_me:4853: checking for working volatile" >&5
503d2be0
AS
4854echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
4855if test "${ac_cv_c_volatile+set}" = set; then
4856 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 4857else
503d2be0 4858 cat >conftest.$ac_ext <<_ACEOF
b1b84649 4859#line 4859 "configure"
7397acc4
DL
4860#include "confdefs.h"
4861
503d2be0
AS
4862int
4863main ()
4864{
7397acc4
DL
4865
4866volatile int x;
4867int * volatile y;
503d2be0
AS
4868 ;
4869 return 0;
4870}
4871_ACEOF
4872rm -f conftest.$ac_objext
b1b84649 4873if { (eval echo "$as_me:4873: \"$ac_compile\"") >&5
503d2be0
AS
4874 (eval $ac_compile) 2>&5
4875 ac_status=$?
b1b84649 4876 echo "$as_me:4876: \$? = $ac_status" >&5
503d2be0
AS
4877 (exit $ac_status); } &&
4878 { ac_try='test -s conftest.$ac_objext'
b1b84649 4879 { (eval echo "$as_me:4879: \"$ac_try\"") >&5
503d2be0
AS
4880 (eval $ac_try) 2>&5
4881 ac_status=$?
b1b84649 4882 echo "$as_me:4882: \$? = $ac_status" >&5
503d2be0 4883 (exit $ac_status); }; }; then
7397acc4
DL
4884 ac_cv_c_volatile=yes
4885else
503d2be0
AS
4886 echo "$as_me: failed program was:" >&5
4887cat conftest.$ac_ext >&5
4888ac_cv_c_volatile=no
7397acc4 4889fi
503d2be0 4890rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 4891fi
b1b84649 4892echo "$as_me:4892: result: $ac_cv_c_volatile" >&5
503d2be0 4893echo "${ECHO_T}$ac_cv_c_volatile" >&6
7397acc4 4894if test $ac_cv_c_volatile = no; then
503d2be0
AS
4895
4896cat >>confdefs.h <<\EOF
4897#define volatile
7397acc4
DL
4898EOF
4899
4900fi
4901
b1b84649 4902echo "$as_me:4902: checking for an ANSI C-conforming const" >&5
503d2be0
AS
4903echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
4904if test "${ac_cv_c_const+set}" = set; then
4905 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4906else
503d2be0 4907 cat >conftest.$ac_ext <<_ACEOF
b1b84649 4908#line 4908 "configure"
ba4481b5
DL
4909#include "confdefs.h"
4910
503d2be0
AS
4911int
4912main ()
4913{
4914/* FIXME: Include the comments suggested by Paul. */
4915#ifndef __cplusplus
4916 /* Ultrix mips cc rejects this. */
4917 typedef int charset[2];
4918 const charset x;
4919 /* SunOS 4.1.1 cc rejects this. */
4920 char const *const *ccp;
4921 char **p;
4922 /* NEC SVR4.0.2 mips cc rejects this. */
4923 struct point {int x, y;};
4924 static struct point const zero = {0,0};
4925 /* AIX XL C 1.02.0.0 rejects this.
4926 It does not let you subtract one const X* pointer from another in
4927 an arm of an if-expression whose if-part is not a constant
4928 expression */
4929 const char *g = "string";
4930 ccp = &g + (g ? g-g : 0);
4931 /* HPUX 7.0 cc rejects these. */
4932 ++ccp;
4933 p = (char**) ccp;
4934 ccp = (char const *const *) p;
4935 { /* SCO 3.2v4 cc rejects this. */
4936 char *t;
4937 char const *s = 0 ? (char *) 0 : (char const *) 0;
4938
4939 *t++ = 0;
4940 }
4941 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
4942 int x[] = {25, 17};
4943 const int *foo = &x[0];
4944 ++foo;
4945 }
4946 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4947 typedef const int *iptr;
4948 iptr p = 0;
4949 ++p;
4950 }
4951 { /* AIX XL C 1.02.0.0 rejects this saying
4952 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4953 struct s { int j; const int *ap[3]; };
4954 struct s *b; b->j = 5;
4955 }
4956 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4957 const int foo = 10;
4958 }
4959#endif
ba4481b5 4960
503d2be0
AS
4961 ;
4962 return 0;
ba4481b5 4963}
503d2be0
AS
4964_ACEOF
4965rm -f conftest.$ac_objext
b1b84649 4966if { (eval echo "$as_me:4966: \"$ac_compile\"") >&5
503d2be0
AS
4967 (eval $ac_compile) 2>&5
4968 ac_status=$?
b1b84649 4969 echo "$as_me:4969: \$? = $ac_status" >&5
503d2be0
AS
4970 (exit $ac_status); } &&
4971 { ac_try='test -s conftest.$ac_objext'
b1b84649 4972 { (eval echo "$as_me:4972: \"$ac_try\"") >&5
503d2be0
AS
4973 (eval $ac_try) 2>&5
4974 ac_status=$?
b1b84649 4975 echo "$as_me:4975: \$? = $ac_status" >&5
503d2be0 4976 (exit $ac_status); }; }; then
ba4481b5
DL
4977 ac_cv_c_const=yes
4978else
503d2be0
AS
4979 echo "$as_me: failed program was:" >&5
4980cat conftest.$ac_ext >&5
4981ac_cv_c_const=no
ba4481b5 4982fi
503d2be0 4983rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 4984fi
b1b84649 4985echo "$as_me:4985: result: $ac_cv_c_const" >&5
503d2be0 4986echo "${ECHO_T}$ac_cv_c_const" >&6
ba4481b5 4987if test $ac_cv_c_const = no; then
503d2be0
AS
4988
4989cat >>confdefs.h <<\EOF
4990#define const
ba4481b5
DL
4991EOF
4992
4993fi
4994
b1b84649 4995echo "$as_me:4995: checking for void * support" >&5
503d2be0
AS
4996echo $ECHO_N "checking for void * support... $ECHO_C" >&6
4997if test "${emacs_cv_void_star+set}" = set; then
4998 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 4999else
503d2be0 5000 cat >conftest.$ac_ext <<_ACEOF
b1b84649 5001#line 5001 "configure"
7397acc4
DL
5002#include "confdefs.h"
5003
503d2be0
AS
5004int
5005main ()
5006{
7397acc4 5007void * foo;
503d2be0
AS
5008 ;
5009 return 0;
5010}
5011_ACEOF
5012rm -f conftest.$ac_objext
b1b84649 5013if { (eval echo "$as_me:5013: \"$ac_compile\"") >&5
503d2be0
AS
5014 (eval $ac_compile) 2>&5
5015 ac_status=$?
b1b84649 5016 echo "$as_me:5016: \$? = $ac_status" >&5
503d2be0
AS
5017 (exit $ac_status); } &&
5018 { ac_try='test -s conftest.$ac_objext'
b1b84649 5019 { (eval echo "$as_me:5019: \"$ac_try\"") >&5
503d2be0
AS
5020 (eval $ac_try) 2>&5
5021 ac_status=$?
b1b84649 5022 echo "$as_me:5022: \$? = $ac_status" >&5
503d2be0 5023 (exit $ac_status); }; }; then
7397acc4
DL
5024 emacs_cv_void_star=yes
5025else
503d2be0
AS
5026 echo "$as_me: failed program was:" >&5
5027cat conftest.$ac_ext >&5
5028emacs_cv_void_star=no
7397acc4 5029fi
503d2be0 5030rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 5031fi
b1b84649 5032echo "$as_me:5032: result: $emacs_cv_void_star" >&5
503d2be0 5033echo "${ECHO_T}$emacs_cv_void_star" >&6
7397acc4 5034if test $emacs_cv_void_star = yes; then
503d2be0 5035 cat >>confdefs.h <<\EOF
7397acc4
DL
5036#define POINTER_TYPE void
5037EOF
5038
5039else
503d2be0 5040 cat >>confdefs.h <<\EOF
7397acc4
DL
5041#define POINTER_TYPE char
5042EOF
5043
5044fi
ba4481b5 5045
b1b84649 5046echo "$as_me:5046: checking whether ${MAKE-make} sets \${MAKE}" >&5
503d2be0
AS
5047echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
5048set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
5049if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
5050 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5051else
503d2be0 5052 cat >conftest.make <<\EOF
ba4481b5
DL
5053all:
5054 @echo 'ac_maketemp="${MAKE}"'
5055EOF
5056# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
503d2be0 5057eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
ba4481b5
DL
5058if test -n "$ac_maketemp"; then
5059 eval ac_cv_prog_make_${ac_make}_set=yes
5060else
5061 eval ac_cv_prog_make_${ac_make}_set=no
5062fi
503d2be0 5063rm -f conftest.make
ba4481b5
DL
5064fi
5065if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
b1b84649 5066 echo "$as_me:5066: result: yes" >&5
503d2be0 5067echo "${ECHO_T}yes" >&6
ba4481b5
DL
5068 SET_MAKE=
5069else
b1b84649 5070 echo "$as_me:5070: result: no" >&5
503d2be0 5071echo "${ECHO_T}no" >&6
ba4481b5
DL
5072 SET_MAKE="MAKE=${MAKE-make}"
5073fi
5074
b1b84649 5075echo "$as_me:5075: checking for long file names" >&5
503d2be0
AS
5076echo $ECHO_N "checking for long file names... $ECHO_C" >&6
5077if test "${ac_cv_sys_long_file_names+set}" = set; then
5078 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
5079else
5080 ac_cv_sys_long_file_names=yes
5081# Test for long file names in all the places we know might matter:
5082# . the current directory, where building will happen
5083# $prefix/lib where we will be installing things
5084# $exec_prefix/lib likewise
5085# eval it to expand exec_prefix.
5086# $TMPDIR if set, where it might want to write temporary files
5087# if $TMPDIR is not set:
5088# /tmp where it might want to write temporary files
5089# /var/tmp likewise
5090# /usr/tmp likewise
5091if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
503d2be0 5092 ac_tmpdirs=$TMPDIR
ba4481b5
DL
5093else
5094 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
5095fi
5096for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
5097 test -d $ac_dir || continue
5098 test -w $ac_dir || continue # It is less confusing to not echo anything here.
503d2be0
AS
5099 ac_xdir=$ac_dir/cf$$
5100 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
5101 ac_tf1=$ac_xdir/conftest9012345
5102 ac_tf2=$ac_xdir/conftest9012346
5103 (echo 1 >$ac_tf1) 2>/dev/null
5104 (echo 2 >$ac_tf2) 2>/dev/null
5105 ac_val=`cat $ac_tf1 2>/dev/null`
5106 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
ba4481b5 5107 ac_cv_sys_long_file_names=no
503d2be0 5108 rm -rf $ac_xdir 2>/dev/null
ba4481b5
DL
5109 break
5110 fi
503d2be0 5111 rm -rf $ac_xdir 2>/dev/null
ba4481b5
DL
5112done
5113fi
b1b84649 5114echo "$as_me:5114: result: $ac_cv_sys_long_file_names" >&5
503d2be0 5115echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
ba4481b5 5116if test $ac_cv_sys_long_file_names = yes; then
503d2be0
AS
5117
5118cat >>confdefs.h <<\EOF
ba4481b5
DL
5119#define HAVE_LONG_FILE_NAMES 1
5120EOF
5121
5122fi
5123
ba4481b5
DL
5124#### Choose a window system.
5125
b1b84649 5126echo "$as_me:5126: checking for X" >&5
503d2be0 5127echo $ECHO_N "checking for X... $ECHO_C" >&6
ba4481b5
DL
5128
5129# Check whether --with-x or --without-x was given.
5130if test "${with_x+set}" = set; then
5131 withval="$with_x"
ba4481b5 5132
503d2be0 5133fi;
ba4481b5
DL
5134# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5135if test "x$with_x" = xno; then
5136 # The user explicitly disabled X.
5137 have_x=disabled
5138else
5139 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5140 # Both variables are already set.
5141 have_x=yes
5142 else
503d2be0
AS
5143 if test "${ac_cv_have_x+set}" = set; then
5144 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
5145else
5146 # One or both of the vars are not set, and there is no cached value.
503d2be0
AS
5147ac_x_includes=no ac_x_libraries=no
5148rm -fr conftest.dir
5149if mkdir conftest.dir; then
5150 cd conftest.dir
ba4481b5 5151 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
503d2be0 5152 cat >Imakefile <<'EOF'
ba4481b5
DL
5153acfindx:
5154 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5155EOF
5156 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5157 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5158 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5159 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5160 for ac_extension in a so sl; do
5161 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
503d2be0 5162 test -f $ac_im_libdir/libX11.$ac_extension; then
ba4481b5
DL
5163 ac_im_usrlibdir=$ac_im_libdir; break
5164 fi
5165 done
5166 # Screen out bogus values from the imake configuration. They are
5167 # bogus both because they are the default anyway, and because
5168 # using them would break gcc on systems where it needs fixed includes.
503d2be0 5169 case $ac_im_incroot in
ba4481b5 5170 /usr/include) ;;
503d2be0 5171 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
ba4481b5 5172 esac
503d2be0 5173 case $ac_im_usrlibdir in
ba4481b5 5174 /usr/lib | /lib) ;;
503d2be0 5175 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
ba4481b5
DL
5176 esac
5177 fi
5178 cd ..
503d2be0 5179 rm -fr conftest.dir
ba4481b5
DL
5180fi
5181
503d2be0
AS
5182# Standard set of common directories for X headers.
5183# Check X11 before X11Rn because it is often a symlink to the current release.
5184ac_x_header_dirs='
5185/usr/X11/include
5186/usr/X11R6/include
5187/usr/X11R5/include
5188/usr/X11R4/include
5189
5190/usr/include/X11
5191/usr/include/X11R6
5192/usr/include/X11R5
5193/usr/include/X11R4
5194
5195/usr/local/X11/include
5196/usr/local/X11R6/include
5197/usr/local/X11R5/include
5198/usr/local/X11R4/include
5199
5200/usr/local/include/X11
5201/usr/local/include/X11R6
5202/usr/local/include/X11R5
5203/usr/local/include/X11R4
5204
5205/usr/X386/include
5206/usr/x386/include
5207/usr/XFree86/include/X11
5208
5209/usr/include
5210/usr/local/include
5211/usr/unsupported/include
5212/usr/athena/include
5213/usr/local/x11r5/include
5214/usr/lpp/Xamples/include
5215
5216/usr/openwin/include
5217/usr/openwin/share/include'
5218
5219if test "$ac_x_includes" = no; then
5220 # Guess where to find include files, by looking for Intrinsic.h.
ba4481b5 5221 # First, try using that file with no special directory specified.
503d2be0 5222 cat >conftest.$ac_ext <<_ACEOF
b1b84649 5223#line 5223 "configure"
ba4481b5 5224#include "confdefs.h"
503d2be0
AS
5225#include <X11/Intrinsic.h>
5226_ACEOF
b1b84649 5227if { (eval echo "$as_me:5227: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
5228 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5229 ac_status=$?
5230 egrep -v '^ *\+' conftest.er1 >conftest.err
5231 rm -f conftest.er1
5232 cat conftest.err >&5
b1b84649 5233 echo "$as_me:5233: \$? = $ac_status" >&5
503d2be0
AS
5234 (exit $ac_status); } >/dev/null; then
5235 if test -s conftest.err; then
5236 ac_cpp_err=$ac_c_preproc_warn_flag
5237 else
5238 ac_cpp_err=
5239 fi
5240else
5241 ac_cpp_err=yes
5242fi
5243if test -z "$ac_cpp_err"; then
ba4481b5
DL
5244 # We can compile using X headers with no special include directory.
5245ac_x_includes=
5246else
503d2be0 5247 echo "$as_me: failed program was:" >&5
ba4481b5 5248 cat conftest.$ac_ext >&5
503d2be0
AS
5249 for ac_dir in $ac_x_header_dirs; do
5250 if test -r "$ac_dir/X11/Intrinsic.h"; then
5251 ac_x_includes=$ac_dir
5252 break
5253 fi
5254done
ba4481b5 5255fi
503d2be0
AS
5256rm -f conftest.err conftest.$ac_ext
5257fi # $ac_x_includes = no
ba4481b5 5258
503d2be0 5259if test "$ac_x_libraries" = no; then
ba4481b5 5260 # Check for the libraries.
ba4481b5
DL
5261 # See if we find them without any special options.
5262 # Don't add to $LIBS permanently.
503d2be0
AS
5263 ac_save_LIBS=$LIBS
5264 LIBS="-lXt $LIBS"
5265 cat >conftest.$ac_ext <<_ACEOF
b1b84649 5266#line 5266 "configure"
ba4481b5 5267#include "confdefs.h"
503d2be0
AS
5268#include <X11/Intrinsic.h>
5269int
5270main ()
5271{
5272XtMalloc (0)
5273 ;
5274 return 0;
5275}
5276_ACEOF
5277rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 5278if { (eval echo "$as_me:5278: \"$ac_link\"") >&5
503d2be0
AS
5279 (eval $ac_link) 2>&5
5280 ac_status=$?
b1b84649 5281 echo "$as_me:5281: \$? = $ac_status" >&5
503d2be0
AS
5282 (exit $ac_status); } &&
5283 { ac_try='test -s conftest$ac_exeext'
b1b84649 5284 { (eval echo "$as_me:5284: \"$ac_try\"") >&5
503d2be0
AS
5285 (eval $ac_try) 2>&5
5286 ac_status=$?
b1b84649 5287 echo "$as_me:5287: \$? = $ac_status" >&5
503d2be0
AS
5288 (exit $ac_status); }; }; then
5289 LIBS=$ac_save_LIBS
ba4481b5
DL
5290# We can link X programs with no special library path.
5291ac_x_libraries=
5292else
503d2be0
AS
5293 echo "$as_me: failed program was:" >&5
5294cat conftest.$ac_ext >&5
5295LIBS=$ac_save_LIBS
5296for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
ba4481b5 5297do
503d2be0 5298 # Don't even attempt the hair of trying to link an X program!
ba4481b5 5299 for ac_extension in a so sl; do
503d2be0 5300 if test -r $ac_dir/libXt.$ac_extension; then
ba4481b5
DL
5301 ac_x_libraries=$ac_dir
5302 break 2
5303 fi
5304 done
5305done
5306fi
503d2be0
AS
5307rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5308fi # $ac_x_libraries = no
ba4481b5 5309
503d2be0 5310if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
ba4481b5
DL
5311 # Didn't find X anywhere. Cache the known absence of X.
5312 ac_cv_have_x="have_x=no"
5313else
5314 # Record where we found X for the cache.
5315 ac_cv_have_x="have_x=yes \
5316 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5317fi
5318fi
503d2be0 5319
ba4481b5
DL
5320 fi
5321 eval "$ac_cv_have_x"
5322fi # $with_x != no
5323
5324if test "$have_x" != yes; then
b1b84649 5325 echo "$as_me:5325: result: $have_x" >&5
503d2be0 5326echo "${ECHO_T}$have_x" >&6
ba4481b5
DL
5327 no_x=yes
5328else
5329 # If each of the values was on the command line, it overrides each guess.
5330 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5331 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5332 # Update the cache value to reflect the command line values.
5333 ac_cv_have_x="have_x=yes \
5334 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
b1b84649 5335 echo "$as_me:5335: result: libraries $x_libraries, headers $x_includes" >&5
503d2be0 5336echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
ba4481b5
DL
5337fi
5338
5339if test "$no_x" = yes; then
5340 window_system=none
5341else
5342 window_system=x11
5343fi
5344
5345if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
5346 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
5347 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
5348 x_default_search_path=""
5349 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
f5215ba5
GM
5350 x_search_path="\
5351${x_library}/X11/%L/%T/%N%C%S:\
5352${x_library}/X11/%l/%T/%N%C%S:\
5353${x_library}/X11/%T/%N%C%S:\
5354${x_library}/X11/%L/%T/%N%S:\
5355${x_library}/X11/%l/%T/%N%S:\
5356${x_library}/X11/%T/%N%S"
ba4481b5
DL
5357 if test x"${x_default_search_path}" = x; then
5358 x_default_search_path=${x_search_path}
5359 else
5360 x_default_search_path="${x_search_path}:${x_default_search_path}"
5361 fi
5362 done
5363fi
5364if test "${x_includes}" != NONE && test -n "${x_includes}"; then
5365 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
5366fi
5367
5368if test x"${x_includes}" = x; then
5369 bitmapdir=/usr/include/X11/bitmaps
5370else
5371 # accumulate include directories that have X11 bitmap subdirectories
5372 bmd_acc="dummyval"
5373 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
5374 if test -d "${bmd}/X11/bitmaps"; then
5375 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
946173ad
DL
5376 fi
5377 if test -d "${bmd}/bitmaps"; then
ba4481b5
DL
5378 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
5379 fi
5380 done
5381 if test ${bmd_acc} != "dummyval"; then
5382 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
5383 fi
5384fi
5385
5386case "${window_system}" in
5387 x11 )
5388 HAVE_X_WINDOWS=yes
5389 HAVE_X11=yes
5390 case "${with_x_toolkit}" in
5391 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
5392 motif ) USE_X_TOOLKIT=MOTIF ;;
5393 no ) USE_X_TOOLKIT=none ;;
5394 * ) USE_X_TOOLKIT=maybe ;;
5395 esac
5396 ;;
5397 none )
5398 HAVE_X_WINDOWS=no
5399 HAVE_X11=no
5400 USE_X_TOOLKIT=none
5401 ;;
5402esac
5403
5404### If we're using X11, we should use the X menu package.
5405HAVE_MENUS=no
5406case ${HAVE_X11} in
5407 yes ) HAVE_MENUS=yes ;;
5408esac
503d2be0 5409
ba4481b5
DL
5410if test "${opsys}" = "hpux9"; then
5411 case "${x_libraries}" in
5412 *X11R4* )
5413 opsysfile="s/hpux9-x11r4.h"
5414 ;;
5415 esac
5416fi
5417
5418if test "${opsys}" = "hpux9shr"; then
5419 case "${x_libraries}" in
5420 *X11R4* )
5421 opsysfile="s/hpux9shxr4.h"
5422 ;;
5423 esac
5424fi
5425
ba4481b5
DL
5426### Compute the unexec source name from the object name.
5427UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
5428
5429# Do the opsystem or machine files prohibit the use of the GNU malloc?
5430# Assume not, until told otherwise.
5431GNU_MALLOC=yes
5432doug_lea_malloc=yes
b1b84649 5433echo "$as_me:5433: checking for malloc_get_state" >&5
503d2be0
AS
5434echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6
5435if test "${ac_cv_func_malloc_get_state+set}" = set; then
5436 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5437else
503d2be0 5438 cat >conftest.$ac_ext <<_ACEOF
b1b84649 5439#line 5439 "configure"
ba4481b5
DL
5440#include "confdefs.h"
5441/* System header to define __stub macros and hopefully few prototypes,
503d2be0 5442 which can conflict with char malloc_get_state (); below. */
ba4481b5
DL
5443#include <assert.h>
5444/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
5445#ifdef __cplusplus
5446extern "C"
5447#endif
ba4481b5 5448/* We use char because int might match the return type of a gcc2
503d2be0
AS
5449 builtin and then its argument prototype would still apply. */
5450char malloc_get_state ();
5451char (*f) ();
ba4481b5 5452
503d2be0
AS
5453int
5454main ()
5455{
ba4481b5
DL
5456/* The GNU C library defines this for functions which it implements
5457 to always fail with ENOSYS. Some functions are actually named
5458 something starting with __ and the normal name is an alias. */
5459#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
5460choke me
5461#else
503d2be0 5462f = malloc_get_state;
ba4481b5
DL
5463#endif
5464
503d2be0
AS
5465 ;
5466 return 0;
5467}
5468_ACEOF
5469rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 5470if { (eval echo "$as_me:5470: \"$ac_link\"") >&5
503d2be0
AS
5471 (eval $ac_link) 2>&5
5472 ac_status=$?
b1b84649 5473 echo "$as_me:5473: \$? = $ac_status" >&5
503d2be0
AS
5474 (exit $ac_status); } &&
5475 { ac_try='test -s conftest$ac_exeext'
b1b84649 5476 { (eval echo "$as_me:5476: \"$ac_try\"") >&5
503d2be0
AS
5477 (eval $ac_try) 2>&5
5478 ac_status=$?
b1b84649 5479 echo "$as_me:5479: \$? = $ac_status" >&5
503d2be0
AS
5480 (exit $ac_status); }; }; then
5481 ac_cv_func_malloc_get_state=yes
5482else
5483 echo "$as_me: failed program was:" >&5
5484cat conftest.$ac_ext >&5
5485ac_cv_func_malloc_get_state=no
5486fi
5487rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5488fi
b1b84649 5489echo "$as_me:5489: result: $ac_cv_func_malloc_get_state" >&5
503d2be0
AS
5490echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6
5491if test $ac_cv_func_malloc_get_state = yes; then
ba4481b5
DL
5492 :
5493else
503d2be0 5494 doug_lea_malloc=no
ba4481b5
DL
5495fi
5496
b1b84649 5497echo "$as_me:5497: checking for malloc_set_state" >&5
503d2be0
AS
5498echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6
5499if test "${ac_cv_func_malloc_set_state+set}" = set; then
5500 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5501else
503d2be0 5502 cat >conftest.$ac_ext <<_ACEOF
b1b84649 5503#line 5503 "configure"
ba4481b5
DL
5504#include "confdefs.h"
5505/* System header to define __stub macros and hopefully few prototypes,
503d2be0 5506 which can conflict with char malloc_set_state (); below. */
ba4481b5
DL
5507#include <assert.h>
5508/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
5509#ifdef __cplusplus
5510extern "C"
5511#endif
ba4481b5 5512/* We use char because int might match the return type of a gcc2
503d2be0
AS
5513 builtin and then its argument prototype would still apply. */
5514char malloc_set_state ();
5515char (*f) ();
ba4481b5 5516
503d2be0
AS
5517int
5518main ()
5519{
ba4481b5
DL
5520/* The GNU C library defines this for functions which it implements
5521 to always fail with ENOSYS. Some functions are actually named
5522 something starting with __ and the normal name is an alias. */
5523#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
5524choke me
5525#else
503d2be0 5526f = malloc_set_state;
ba4481b5
DL
5527#endif
5528
503d2be0
AS
5529 ;
5530 return 0;
5531}
5532_ACEOF
5533rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 5534if { (eval echo "$as_me:5534: \"$ac_link\"") >&5
503d2be0
AS
5535 (eval $ac_link) 2>&5
5536 ac_status=$?
b1b84649 5537 echo "$as_me:5537: \$? = $ac_status" >&5
503d2be0
AS
5538 (exit $ac_status); } &&
5539 { ac_try='test -s conftest$ac_exeext'
b1b84649 5540 { (eval echo "$as_me:5540: \"$ac_try\"") >&5
503d2be0
AS
5541 (eval $ac_try) 2>&5
5542 ac_status=$?
b1b84649 5543 echo "$as_me:5543: \$? = $ac_status" >&5
503d2be0
AS
5544 (exit $ac_status); }; }; then
5545 ac_cv_func_malloc_set_state=yes
5546else
5547 echo "$as_me: failed program was:" >&5
5548cat conftest.$ac_ext >&5
5549ac_cv_func_malloc_set_state=no
5550fi
5551rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5552fi
b1b84649 5553echo "$as_me:5553: result: $ac_cv_func_malloc_set_state" >&5
503d2be0
AS
5554echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6
5555if test $ac_cv_func_malloc_set_state = yes; then
ba4481b5
DL
5556 :
5557else
503d2be0 5558 doug_lea_malloc=no
ba4481b5
DL
5559fi
5560
b1b84649 5561echo "$as_me:5561: checking whether __after_morecore_hook exists" >&5
503d2be0
AS
5562echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6
5563if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
5564 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5565else
503d2be0 5566 cat >conftest.$ac_ext <<_ACEOF
b1b84649 5567#line 5567 "configure"
ba4481b5
DL
5568#include "confdefs.h"
5569extern void (* __after_morecore_hook)();
503d2be0
AS
5570int
5571main ()
5572{
ba4481b5 5573__after_morecore_hook = 0
503d2be0
AS
5574 ;
5575 return 0;
5576}
5577_ACEOF
5578rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 5579if { (eval echo "$as_me:5579: \"$ac_link\"") >&5
503d2be0
AS
5580 (eval $ac_link) 2>&5
5581 ac_status=$?
b1b84649 5582 echo "$as_me:5582: \$? = $ac_status" >&5
503d2be0
AS
5583 (exit $ac_status); } &&
5584 { ac_try='test -s conftest$ac_exeext'
b1b84649 5585 { (eval echo "$as_me:5585: \"$ac_try\"") >&5
503d2be0
AS
5586 (eval $ac_try) 2>&5
5587 ac_status=$?
b1b84649 5588 echo "$as_me:5588: \$? = $ac_status" >&5
503d2be0 5589 (exit $ac_status); }; }; then
ba4481b5
DL
5590 emacs_cv_var___after_morecore_hook=yes
5591else
503d2be0
AS
5592 echo "$as_me: failed program was:" >&5
5593cat conftest.$ac_ext >&5
5594emacs_cv_var___after_morecore_hook=no
ba4481b5 5595fi
503d2be0 5596rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 5597fi
b1b84649 5598echo "$as_me:5598: result: $emacs_cv_var___after_morecore_hook" >&5
503d2be0 5599echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6
ba4481b5
DL
5600if test $emacs_cv_var___after_morecore_hook = no; then
5601 doug_lea_malloc=no
5602fi
5603if test "${system_malloc}" = "yes"; then
5604 GNU_MALLOC=no
5605 GNU_MALLOC_reason="
5606 (The GNU allocators don't work with this system configuration.)"
5607fi
5608if test "$doug_lea_malloc" = "yes" ; then
5609 if test "$GNU_MALLOC" = yes ; then
5610 GNU_MALLOC_reason="
5611 (Using Doug Lea's new malloc from the GNU C Library.)"
5612 fi
503d2be0 5613 cat >>confdefs.h <<\EOF
ba4481b5
DL
5614#define DOUG_LEA_MALLOC 1
5615EOF
5616
5617fi
5618
5619if test x"${REL_ALLOC}" = x; then
5620 REL_ALLOC=${GNU_MALLOC}
5621fi
5622
503d2be0
AS
5623# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5624
5625for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5626 inttypes.h stdint.h unistd.h
5627do
5628as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b1b84649 5629echo "$as_me:5629: checking for $ac_header" >&5
503d2be0
AS
5630echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5631if eval "test \"\${$as_ac_Header+set}\" = set"; then
5632 echo $ECHO_N "(cached) $ECHO_C" >&6
5633else
5634 cat >conftest.$ac_ext <<_ACEOF
b1b84649 5635#line 5635 "configure"
503d2be0
AS
5636#include "confdefs.h"
5637$ac_includes_default
5638#include <$ac_header>
5639_ACEOF
5640rm -f conftest.$ac_objext
b1b84649 5641if { (eval echo "$as_me:5641: \"$ac_compile\"") >&5
503d2be0
AS
5642 (eval $ac_compile) 2>&5
5643 ac_status=$?
b1b84649 5644 echo "$as_me:5644: \$? = $ac_status" >&5
503d2be0
AS
5645 (exit $ac_status); } &&
5646 { ac_try='test -s conftest.$ac_objext'
b1b84649 5647 { (eval echo "$as_me:5647: \"$ac_try\"") >&5
503d2be0
AS
5648 (eval $ac_try) 2>&5
5649 ac_status=$?
b1b84649 5650 echo "$as_me:5650: \$? = $ac_status" >&5
503d2be0
AS
5651 (exit $ac_status); }; }; then
5652 eval "$as_ac_Header=yes"
5653else
5654 echo "$as_me: failed program was:" >&5
5655cat conftest.$ac_ext >&5
5656eval "$as_ac_Header=no"
5657fi
5658rm -f conftest.$ac_objext conftest.$ac_ext
5659fi
b1b84649 5660echo "$as_me:5660: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
5661echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5662if test `eval echo '${'$as_ac_Header'}'` = yes; then
5663 cat >>confdefs.h <<EOF
5664#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5665EOF
5666
5667fi
5668done
a55b799a 5669
503d2be0 5670for ac_header in stdlib.h unistd.h
73b77ee5 5671do
503d2be0 5672as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b1b84649 5673echo "$as_me:5673: checking for $ac_header" >&5
503d2be0
AS
5674echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5675if eval "test \"\${$as_ac_Header+set}\" = set"; then
5676 echo $ECHO_N "(cached) $ECHO_C" >&6
5677else
5678 cat >conftest.$ac_ext <<_ACEOF
b1b84649 5679#line 5679 "configure"
503d2be0
AS
5680#include "confdefs.h"
5681#include <$ac_header>
5682_ACEOF
b1b84649 5683if { (eval echo "$as_me:5683: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
5684 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5685 ac_status=$?
5686 egrep -v '^ *\+' conftest.er1 >conftest.err
5687 rm -f conftest.er1
5688 cat conftest.err >&5
b1b84649 5689 echo "$as_me:5689: \$? = $ac_status" >&5
503d2be0
AS
5690 (exit $ac_status); } >/dev/null; then
5691 if test -s conftest.err; then
5692 ac_cpp_err=$ac_c_preproc_warn_flag
5693 else
5694 ac_cpp_err=
5695 fi
5696else
5697 ac_cpp_err=yes
5698fi
5699if test -z "$ac_cpp_err"; then
5700 eval "$as_ac_Header=yes"
5701else
5702 echo "$as_me: failed program was:" >&5
ba4481b5 5703 cat conftest.$ac_ext >&5
503d2be0 5704 eval "$as_ac_Header=no"
ba4481b5 5705fi
503d2be0 5706rm -f conftest.err conftest.$ac_ext
ba4481b5 5707fi
b1b84649 5708echo "$as_me:5708: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
5709echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5710if test `eval echo '${'$as_ac_Header'}'` = yes; then
5711 cat >>confdefs.h <<EOF
5712#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba4481b5 5713EOF
503d2be0 5714
ba4481b5 5715fi
73b77ee5 5716done
ba4481b5 5717
73b77ee5 5718for ac_func in getpagesize
ba4481b5 5719do
503d2be0 5720as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b1b84649 5721echo "$as_me:5721: checking for $ac_func" >&5
503d2be0
AS
5722echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5723if eval "test \"\${$as_ac_var+set}\" = set"; then
5724 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5725else
503d2be0 5726 cat >conftest.$ac_ext <<_ACEOF
b1b84649 5727#line 5727 "configure"
ba4481b5
DL
5728#include "confdefs.h"
5729/* System header to define __stub macros and hopefully few prototypes,
503d2be0 5730 which can conflict with char $ac_func (); below. */
ba4481b5
DL
5731#include <assert.h>
5732/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
5733#ifdef __cplusplus
5734extern "C"
5735#endif
ba4481b5 5736/* We use char because int might match the return type of a gcc2
503d2be0
AS
5737 builtin and then its argument prototype would still apply. */
5738char $ac_func ();
5739char (*f) ();
ba4481b5 5740
503d2be0
AS
5741int
5742main ()
5743{
ba4481b5
DL
5744/* The GNU C library defines this for functions which it implements
5745 to always fail with ENOSYS. Some functions are actually named
5746 something starting with __ and the normal name is an alias. */
5747#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5748choke me
5749#else
503d2be0 5750f = $ac_func;
ba4481b5
DL
5751#endif
5752
503d2be0
AS
5753 ;
5754 return 0;
5755}
5756_ACEOF
5757rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 5758if { (eval echo "$as_me:5758: \"$ac_link\"") >&5
503d2be0
AS
5759 (eval $ac_link) 2>&5
5760 ac_status=$?
b1b84649 5761 echo "$as_me:5761: \$? = $ac_status" >&5
503d2be0
AS
5762 (exit $ac_status); } &&
5763 { ac_try='test -s conftest$ac_exeext'
b1b84649 5764 { (eval echo "$as_me:5764: \"$ac_try\"") >&5
503d2be0
AS
5765 (eval $ac_try) 2>&5
5766 ac_status=$?
b1b84649 5767 echo "$as_me:5767: \$? = $ac_status" >&5
503d2be0
AS
5768 (exit $ac_status); }; }; then
5769 eval "$as_ac_var=yes"
5770else
5771 echo "$as_me: failed program was:" >&5
5772cat conftest.$ac_ext >&5
5773eval "$as_ac_var=no"
5774fi
5775rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5776fi
b1b84649 5777echo "$as_me:5777: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
5778echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5779if test `eval echo '${'$as_ac_var'}'` = yes; then
5780 cat >>confdefs.h <<EOF
5781#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
ba4481b5 5782EOF
ba4481b5 5783
ba4481b5
DL
5784fi
5785done
5786
b1b84649 5787echo "$as_me:5787: checking for working mmap" >&5
503d2be0
AS
5788echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
5789if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
5790 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5
GM
5791else
5792 if test "$cross_compiling" = yes; then
5793 ac_cv_func_mmap_fixed_mapped=no
ba4481b5 5794else
503d2be0 5795 cat >conftest.$ac_ext <<_ACEOF
b1b84649 5796#line 5796 "configure"
ba4481b5 5797#include "confdefs.h"
503d2be0 5798$ac_includes_default
73b77ee5
GM
5799/* Thanks to Mike Haertel and Jim Avera for this test.
5800 Here is a matrix of mmap possibilities:
5801 mmap private not fixed
5802 mmap private fixed at somewhere currently unmapped
5803 mmap private fixed at somewhere already mapped
5804 mmap shared not fixed
5805 mmap shared fixed at somewhere currently unmapped
5806 mmap shared fixed at somewhere already mapped
5807 For private mappings, we should verify that changes cannot be read()
5808 back from the file, nor mmap's back from the file at a different
5809 address. (There have been systems where private was not correctly
5810 implemented like the infamous i386 svr4.0, and systems where the
1932bc86 5811 VM page cache was not coherent with the file system buffer cache
73b77ee5
GM
5812 like early versions of FreeBSD and possibly contemporary NetBSD.)
5813 For shared mappings, we should conversely verify that changes get
5814 propogated back to all the places they're supposed to be.
5815
5816 Grep wants private fixed already mapped.
5817 The main things grep needs to know about mmap are:
5818 * does it exist and is it safe to write into the mmap'd area
5819 * how to use it (BSD variants) */
503d2be0 5820
73b77ee5
GM
5821#include <fcntl.h>
5822#include <sys/mman.h>
5823
503d2be0 5824#if !STDC_HEADERS && !HAVE_STDLIB_H
1932bc86
DL
5825char *malloc ();
5826#endif
73b77ee5 5827
1932bc86
DL
5828/* This mess was copied from the GNU getpagesize.h. */
5829#if !HAVE_GETPAGESIZE
73b77ee5 5830/* Assume that all systems that can run configure have sys/param.h. */
1932bc86 5831# if !HAVE_SYS_PARAM_H
73b77ee5
GM
5832# define HAVE_SYS_PARAM_H 1
5833# endif
5834
5835# ifdef _SC_PAGESIZE
5836# define getpagesize() sysconf(_SC_PAGESIZE)
5837# else /* no _SC_PAGESIZE */
1932bc86 5838# if HAVE_SYS_PARAM_H
73b77ee5
GM
5839# include <sys/param.h>
5840# ifdef EXEC_PAGESIZE
5841# define getpagesize() EXEC_PAGESIZE
5842# else /* no EXEC_PAGESIZE */
5843# ifdef NBPG
5844# define getpagesize() NBPG * CLSIZE
5845# ifndef CLSIZE
5846# define CLSIZE 1
5847# endif /* no CLSIZE */
5848# else /* no NBPG */
5849# ifdef NBPC
5850# define getpagesize() NBPC
5851# else /* no NBPC */
5852# ifdef PAGESIZE
5853# define getpagesize() PAGESIZE
5854# endif /* PAGESIZE */
5855# endif /* no NBPC */
5856# endif /* no NBPG */
5857# endif /* no EXEC_PAGESIZE */
5858# else /* no HAVE_SYS_PARAM_H */
5859# define getpagesize() 8192 /* punt totally */
5860# endif /* no HAVE_SYS_PARAM_H */
5861# endif /* no _SC_PAGESIZE */
5862
5863#endif /* no HAVE_GETPAGESIZE */
5864
73b77ee5 5865int
1932bc86 5866main ()
73b77ee5 5867{
1932bc86
DL
5868 char *data, *data2, *data3;
5869 int i, pagesize;
5870 int fd;
5871
5872 pagesize = getpagesize ();
5873
5874 /* First, make a file with some known garbage in it. */
5875 data = (char *) malloc (pagesize);
5876 if (!data)
5877 exit (1);
5878 for (i = 0; i < pagesize; ++i)
5879 *(data + i) = rand ();
5880 umask (0);
503d2be0 5881 fd = creat ("conftest.mmap", 0600);
1932bc86
DL
5882 if (fd < 0)
5883 exit (1);
5884 if (write (fd, data, pagesize) != pagesize)
5885 exit (1);
5886 close (fd);
73b77ee5 5887
1932bc86
DL
5888 /* Next, try to mmap the file at a fixed address which already has
5889 something else allocated at it. If we can, also make sure that
5890 we see the same garbage. */
503d2be0 5891 fd = open ("conftest.mmap", O_RDWR);
1932bc86
DL
5892 if (fd < 0)
5893 exit (1);
5894 data2 = (char *) malloc (2 * pagesize);
5895 if (!data2)
5896 exit (1);
5897 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5898 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
5899 MAP_PRIVATE | MAP_FIXED, fd, 0L))
5900 exit (1);
5901 for (i = 0; i < pagesize; ++i)
5902 if (*(data + i) != *(data2 + i))
5903 exit (1);
5904
5905 /* Finally, make sure that changes to the mapped area do not
5906 percolate back to the file as seen by read(). (This is a bug on
5907 some variants of i386 svr4.0.) */
5908 for (i = 0; i < pagesize; ++i)
5909 *(data2 + i) = *(data2 + i) + 1;
5910 data3 = (char *) malloc (pagesize);
5911 if (!data3)
5912 exit (1);
5913 if (read (fd, data3, pagesize) != pagesize)
5914 exit (1);
5915 for (i = 0; i < pagesize; ++i)
5916 if (*(data + i) != *(data3 + i))
5917 exit (1);
5918 close (fd);
1932bc86
DL
5919 exit (0);
5920}
503d2be0
AS
5921_ACEOF
5922rm -f conftest$ac_exeext
b1b84649 5923if { (eval echo "$as_me:5923: \"$ac_link\"") >&5
503d2be0
AS
5924 (eval $ac_link) 2>&5
5925 ac_status=$?
b1b84649 5926 echo "$as_me:5926: \$? = $ac_status" >&5
503d2be0 5927 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b1b84649 5928 { (eval echo "$as_me:5928: \"$ac_try\"") >&5
503d2be0
AS
5929 (eval $ac_try) 2>&5
5930 ac_status=$?
b1b84649 5931 echo "$as_me:5931: \$? = $ac_status" >&5
503d2be0 5932 (exit $ac_status); }; }; then
73b77ee5
GM
5933 ac_cv_func_mmap_fixed_mapped=yes
5934else
503d2be0
AS
5935 echo "$as_me: program exited with status $ac_status" >&5
5936echo "$as_me: failed program was:" >&5
5937cat conftest.$ac_ext >&5
5938ac_cv_func_mmap_fixed_mapped=no
73b77ee5 5939fi
503d2be0 5940rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
73b77ee5 5941fi
73b77ee5 5942fi
b1b84649 5943echo "$as_me:5943: result: $ac_cv_func_mmap_fixed_mapped" >&5
503d2be0 5944echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
73b77ee5 5945if test $ac_cv_func_mmap_fixed_mapped = yes; then
503d2be0
AS
5946
5947cat >>confdefs.h <<\EOF
73b77ee5
GM
5948#define HAVE_MMAP 1
5949EOF
5950
5951fi
503d2be0 5952rm -f conftest.mmap
73b77ee5 5953
ef9e4345
GM
5954if test $use_mmap_for_buffers = yes; then
5955 REL_ALLOC=no
73b77ee5
GM
5956fi
5957
5958LIBS="$libsrc_libs $LIBS"
5959
b1b84649 5960echo "$as_me:5960: checking for dnet_ntoa in -ldnet" >&5
503d2be0
AS
5961echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
5962if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
5963 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 5964else
503d2be0 5965 ac_check_lib_save_LIBS=$LIBS
73b77ee5 5966LIBS="-ldnet $LIBS"
503d2be0 5967cat >conftest.$ac_ext <<_ACEOF
b1b84649 5968#line 5968 "configure"
73b77ee5 5969#include "confdefs.h"
503d2be0 5970
73b77ee5 5971/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
5972#ifdef __cplusplus
5973extern "C"
5974#endif
73b77ee5 5975/* We use char because int might match the return type of a gcc2
503d2be0
AS
5976 builtin and then its argument prototype would still apply. */
5977char dnet_ntoa ();
5978int
5979main ()
5980{
5981dnet_ntoa ();
5982 ;
5983 return 0;
5984}
5985_ACEOF
5986rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 5987if { (eval echo "$as_me:5987: \"$ac_link\"") >&5
503d2be0
AS
5988 (eval $ac_link) 2>&5
5989 ac_status=$?
b1b84649 5990 echo "$as_me:5990: \$? = $ac_status" >&5
503d2be0
AS
5991 (exit $ac_status); } &&
5992 { ac_try='test -s conftest$ac_exeext'
b1b84649 5993 { (eval echo "$as_me:5993: \"$ac_try\"") >&5
503d2be0
AS
5994 (eval $ac_try) 2>&5
5995 ac_status=$?
b1b84649 5996 echo "$as_me:5996: \$? = $ac_status" >&5
503d2be0
AS
5997 (exit $ac_status); }; }; then
5998 ac_cv_lib_dnet_dnet_ntoa=yes
5999else
6000 echo "$as_me: failed program was:" >&5
6001cat conftest.$ac_ext >&5
6002ac_cv_lib_dnet_dnet_ntoa=no
6003fi
6004rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6005LIBS=$ac_check_lib_save_LIBS
6006fi
b1b84649 6007echo "$as_me:6007: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
503d2be0
AS
6008echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
6009if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
6010 cat >>confdefs.h <<EOF
6011#define HAVE_LIBDNET 1
73b77ee5
GM
6012EOF
6013
6014 LIBS="-ldnet $LIBS"
6015
73b77ee5
GM
6016fi
6017
b1b84649 6018echo "$as_me:6018: checking for main in -lXbsd" >&5
503d2be0
AS
6019echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6
6020if test "${ac_cv_lib_Xbsd_main+set}" = set; then
6021 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 6022else
503d2be0 6023 ac_check_lib_save_LIBS=$LIBS
73b77ee5 6024LIBS="-lXbsd $LIBS"
503d2be0 6025cat >conftest.$ac_ext <<_ACEOF
b1b84649 6026#line 6026 "configure"
73b77ee5
GM
6027#include "confdefs.h"
6028
503d2be0
AS
6029int
6030main ()
6031{
6032main ();
6033 ;
6034 return 0;
6035}
6036_ACEOF
6037rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 6038if { (eval echo "$as_me:6038: \"$ac_link\"") >&5
503d2be0
AS
6039 (eval $ac_link) 2>&5
6040 ac_status=$?
b1b84649 6041 echo "$as_me:6041: \$? = $ac_status" >&5
503d2be0
AS
6042 (exit $ac_status); } &&
6043 { ac_try='test -s conftest$ac_exeext'
b1b84649 6044 { (eval echo "$as_me:6044: \"$ac_try\"") >&5
503d2be0
AS
6045 (eval $ac_try) 2>&5
6046 ac_status=$?
b1b84649 6047 echo "$as_me:6047: \$? = $ac_status" >&5
503d2be0
AS
6048 (exit $ac_status); }; }; then
6049 ac_cv_lib_Xbsd_main=yes
6050else
6051 echo "$as_me: failed program was:" >&5
6052cat conftest.$ac_ext >&5
6053ac_cv_lib_Xbsd_main=no
6054fi
6055rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6056LIBS=$ac_check_lib_save_LIBS
6057fi
b1b84649 6058echo "$as_me:6058: result: $ac_cv_lib_Xbsd_main" >&5
503d2be0
AS
6059echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6
6060if test $ac_cv_lib_Xbsd_main = yes; then
73b77ee5 6061 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
73b77ee5
GM
6062fi
6063
b1b84649 6064echo "$as_me:6064: checking for cma_open in -lpthreads" >&5
503d2be0
AS
6065echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6
6066if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
6067 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 6068else
503d2be0 6069 ac_check_lib_save_LIBS=$LIBS
73b77ee5 6070LIBS="-lpthreads $LIBS"
503d2be0 6071cat >conftest.$ac_ext <<_ACEOF
b1b84649 6072#line 6072 "configure"
73b77ee5 6073#include "confdefs.h"
503d2be0 6074
73b77ee5 6075/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6076#ifdef __cplusplus
6077extern "C"
6078#endif
73b77ee5 6079/* We use char because int might match the return type of a gcc2
503d2be0
AS
6080 builtin and then its argument prototype would still apply. */
6081char cma_open ();
6082int
6083main ()
6084{
6085cma_open ();
6086 ;
6087 return 0;
6088}
6089_ACEOF
6090rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 6091if { (eval echo "$as_me:6091: \"$ac_link\"") >&5
503d2be0
AS
6092 (eval $ac_link) 2>&5
6093 ac_status=$?
b1b84649 6094 echo "$as_me:6094: \$? = $ac_status" >&5
503d2be0
AS
6095 (exit $ac_status); } &&
6096 { ac_try='test -s conftest$ac_exeext'
b1b84649 6097 { (eval echo "$as_me:6097: \"$ac_try\"") >&5
503d2be0
AS
6098 (eval $ac_try) 2>&5
6099 ac_status=$?
b1b84649 6100 echo "$as_me:6100: \$? = $ac_status" >&5
503d2be0
AS
6101 (exit $ac_status); }; }; then
6102 ac_cv_lib_pthreads_cma_open=yes
6103else
6104 echo "$as_me: failed program was:" >&5
6105cat conftest.$ac_ext >&5
6106ac_cv_lib_pthreads_cma_open=no
6107fi
6108rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6109LIBS=$ac_check_lib_save_LIBS
6110fi
b1b84649 6111echo "$as_me:6111: result: $ac_cv_lib_pthreads_cma_open" >&5
503d2be0
AS
6112echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6
6113if test $ac_cv_lib_pthreads_cma_open = yes; then
6114 cat >>confdefs.h <<EOF
6115#define HAVE_LIBPTHREADS 1
73b77ee5
GM
6116EOF
6117
6118 LIBS="-lpthreads $LIBS"
6119
73b77ee5
GM
6120fi
6121
b1b84649 6122echo "$as_me:6122: checking for XFree86 in /usr/X386" >&5
503d2be0 6123echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6
73b77ee5
GM
6124if test -d /usr/X386/include; then
6125 HAVE_XFREE386=yes
6126 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
6127else
6128 HAVE_XFREE386=no
6129fi
b1b84649 6130echo "$as_me:6130: result: $HAVE_XFREE386" >&5
503d2be0 6131echo "${ECHO_T}$HAVE_XFREE386" >&6
73b77ee5
GM
6132
6133# Change CFLAGS temporarily so that C_SWITCH_X_SITE gets used
6134# for the tests that follow. We set it back to REAL_CFLAGS later on.
6135
6136REAL_CPPFLAGS="$CPPFLAGS"
6137
6138if test "${HAVE_X11}" = "yes"; then
6139 DEFS="$C_SWITCH_X_SITE $DEFS"
6140 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
6141 LIBS="$LIBX $LIBS"
6142 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
6143 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
6144
6145 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
6146 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
6147 # but it's more convenient here to set LD_RUN_PATH
6148 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
6149 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
6150 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
6151 export LD_RUN_PATH
6152 fi
6153
6154 if test "${opsys}" = "gnu-linux"; then
b1b84649 6155 echo "$as_me:6155: checking whether X on GNU/Linux needs -b to link" >&5
503d2be0
AS
6156echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6
6157 cat >conftest.$ac_ext <<_ACEOF
b1b84649 6158#line 6158 "configure"
73b77ee5
GM
6159#include "confdefs.h"
6160
503d2be0
AS
6161int
6162main ()
6163{
73b77ee5 6164XOpenDisplay ("foo");
503d2be0
AS
6165 ;
6166 return 0;
6167}
6168_ACEOF
6169rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 6170if { (eval echo "$as_me:6170: \"$ac_link\"") >&5
503d2be0
AS
6171 (eval $ac_link) 2>&5
6172 ac_status=$?
b1b84649 6173 echo "$as_me:6173: \$? = $ac_status" >&5
503d2be0
AS
6174 (exit $ac_status); } &&
6175 { ac_try='test -s conftest$ac_exeext'
b1b84649 6176 { (eval echo "$as_me:6176: \"$ac_try\"") >&5
503d2be0
AS
6177 (eval $ac_try) 2>&5
6178 ac_status=$?
b1b84649 6179 echo "$as_me:6179: \$? = $ac_status" >&5
503d2be0 6180 (exit $ac_status); }; }; then
73b77ee5
GM
6181 xlinux_first_failure=no
6182else
503d2be0
AS
6183 echo "$as_me: failed program was:" >&5
6184cat conftest.$ac_ext >&5
6185xlinux_first_failure=yes
73b77ee5 6186fi
503d2be0 6187rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
73b77ee5
GM
6188 if test "${xlinux_first_failure}" = "yes"; then
6189 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
6190 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
6191 OLD_CPPFLAGS="$CPPFLAGS"
6192 OLD_LIBS="$LIBS"
6193 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
6194 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
6195 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
6196 LIBS="$LIBS -b i486-linuxaout"
503d2be0 6197 cat >conftest.$ac_ext <<_ACEOF
b1b84649 6198#line 6198 "configure"
73b77ee5
GM
6199#include "confdefs.h"
6200
503d2be0
AS
6201int
6202main ()
6203{
73b77ee5 6204XOpenDisplay ("foo");
503d2be0
AS
6205 ;
6206 return 0;
6207}
6208_ACEOF
6209rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 6210if { (eval echo "$as_me:6210: \"$ac_link\"") >&5
503d2be0
AS
6211 (eval $ac_link) 2>&5
6212 ac_status=$?
b1b84649 6213 echo "$as_me:6213: \$? = $ac_status" >&5
503d2be0
AS
6214 (exit $ac_status); } &&
6215 { ac_try='test -s conftest$ac_exeext'
b1b84649 6216 { (eval echo "$as_me:6216: \"$ac_try\"") >&5
503d2be0
AS
6217 (eval $ac_try) 2>&5
6218 ac_status=$?
b1b84649 6219 echo "$as_me:6219: \$? = $ac_status" >&5
503d2be0 6220 (exit $ac_status); }; }; then
73b77ee5
GM
6221 xlinux_second_failure=no
6222else
503d2be0
AS
6223 echo "$as_me: failed program was:" >&5
6224cat conftest.$ac_ext >&5
6225xlinux_second_failure=yes
73b77ee5 6226fi
503d2be0 6227rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
73b77ee5
GM
6228 if test "${xlinux_second_failure}" = "yes"; then
6229 # If we get the same failure with -b, there is no use adding -b.
6230 # So take it out. This plays safe.
6231 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
6232 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
6233 CPPFLAGS="$OLD_CPPFLAGS"
6234 LIBS="$OLD_LIBS"
b1b84649 6235 echo "$as_me:6235: result: no" >&5
503d2be0 6236echo "${ECHO_T}no" >&6
73b77ee5 6237 else
b1b84649 6238 echo "$as_me:6238: result: yes" >&5
503d2be0 6239echo "${ECHO_T}yes" >&6
73b77ee5
GM
6240 fi
6241 else
b1b84649 6242 echo "$as_me:6242: result: no" >&5
503d2be0 6243echo "${ECHO_T}no" >&6
73b77ee5
GM
6244 fi
6245 fi
6246
ac95a621
GM
6247 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
6248 # header files included from there.
b1b84649 6249 echo "$as_me:6249: checking for Xkb" >&5
503d2be0
AS
6250echo $ECHO_N "checking for Xkb... $ECHO_C" >&6
6251 cat >conftest.$ac_ext <<_ACEOF
b1b84649 6252#line 6252 "configure"
ac95a621
GM
6253#include "confdefs.h"
6254#include <X11/Xlib.h>
6255#include <X11/XKBlib.h>
503d2be0
AS
6256int
6257main ()
6258{
ac95a621 6259XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
503d2be0
AS
6260 ;
6261 return 0;
6262}
6263_ACEOF
6264rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 6265if { (eval echo "$as_me:6265: \"$ac_link\"") >&5
503d2be0
AS
6266 (eval $ac_link) 2>&5
6267 ac_status=$?
b1b84649 6268 echo "$as_me:6268: \$? = $ac_status" >&5
503d2be0
AS
6269 (exit $ac_status); } &&
6270 { ac_try='test -s conftest$ac_exeext'
b1b84649 6271 { (eval echo "$as_me:6271: \"$ac_try\"") >&5
503d2be0
AS
6272 (eval $ac_try) 2>&5
6273 ac_status=$?
b1b84649 6274 echo "$as_me:6274: \$? = $ac_status" >&5
503d2be0 6275 (exit $ac_status); }; }; then
ac95a621
GM
6276 emacs_xkb=yes
6277else
503d2be0
AS
6278 echo "$as_me: failed program was:" >&5
6279cat conftest.$ac_ext >&5
6280emacs_xkb=no
ac95a621 6281fi
503d2be0 6282rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
b1b84649 6283 echo "$as_me:6283: result: $emacs_xkb" >&5
503d2be0 6284echo "${ECHO_T}$emacs_xkb" >&6
ac95a621 6285 if test $emacs_xkb = yes; then
503d2be0 6286 cat >>confdefs.h <<\EOF
ac95a621
GM
6287#define HAVE_XKBGETKEYBOARD 1
6288EOF
6289
6290 fi
6291
503d2be0 6292for ac_func in XrmSetDatabase XScreenResourceString \
73b77ee5
GM
6293XScreenNumberOfScreen XSetWMProtocols
6294do
503d2be0 6295as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b1b84649 6296echo "$as_me:6296: checking for $ac_func" >&5
503d2be0
AS
6297echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6298if eval "test \"\${$as_ac_var+set}\" = set"; then
6299 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 6300else
503d2be0 6301 cat >conftest.$ac_ext <<_ACEOF
b1b84649 6302#line 6302 "configure"
73b77ee5
GM
6303#include "confdefs.h"
6304/* System header to define __stub macros and hopefully few prototypes,
503d2be0 6305 which can conflict with char $ac_func (); below. */
73b77ee5
GM
6306#include <assert.h>
6307/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6308#ifdef __cplusplus
6309extern "C"
6310#endif
73b77ee5 6311/* We use char because int might match the return type of a gcc2
503d2be0
AS
6312 builtin and then its argument prototype would still apply. */
6313char $ac_func ();
6314char (*f) ();
73b77ee5 6315
503d2be0
AS
6316int
6317main ()
6318{
73b77ee5
GM
6319/* The GNU C library defines this for functions which it implements
6320 to always fail with ENOSYS. Some functions are actually named
6321 something starting with __ and the normal name is an alias. */
6322#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6323choke me
6324#else
503d2be0 6325f = $ac_func;
73b77ee5
GM
6326#endif
6327
503d2be0
AS
6328 ;
6329 return 0;
6330}
6331_ACEOF
6332rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 6333if { (eval echo "$as_me:6333: \"$ac_link\"") >&5
503d2be0
AS
6334 (eval $ac_link) 2>&5
6335 ac_status=$?
b1b84649 6336 echo "$as_me:6336: \$? = $ac_status" >&5
503d2be0
AS
6337 (exit $ac_status); } &&
6338 { ac_try='test -s conftest$ac_exeext'
b1b84649 6339 { (eval echo "$as_me:6339: \"$ac_try\"") >&5
503d2be0
AS
6340 (eval $ac_try) 2>&5
6341 ac_status=$?
b1b84649 6342 echo "$as_me:6342: \$? = $ac_status" >&5
503d2be0
AS
6343 (exit $ac_status); }; }; then
6344 eval "$as_ac_var=yes"
6345else
6346 echo "$as_me: failed program was:" >&5
6347cat conftest.$ac_ext >&5
6348eval "$as_ac_var=no"
6349fi
6350rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6351fi
b1b84649 6352echo "$as_me:6352: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
6353echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6354if test `eval echo '${'$as_ac_var'}'` = yes; then
6355 cat >>confdefs.h <<EOF
6356#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
73b77ee5 6357EOF
73b77ee5 6358
73b77ee5
GM
6359fi
6360done
6361
6362fi
6363
6364if test "${window_system}" = "x11"; then
b1b84649 6365 echo "$as_me:6365: checking X11 version 6" >&5
503d2be0
AS
6366echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6
6367 if test "${emacs_cv_x11_version_6+set}" = set; then
6368 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 6369else
503d2be0 6370 cat >conftest.$ac_ext <<_ACEOF
b1b84649 6371#line 6371 "configure"
73b77ee5
GM
6372#include "confdefs.h"
6373#include <X11/Xlib.h>
503d2be0
AS
6374int
6375main ()
6376{
73b77ee5
GM
6377#if XlibSpecificationRelease < 6
6378fail;
6379#endif
6380
503d2be0
AS
6381 ;
6382 return 0;
6383}
6384_ACEOF
6385rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 6386if { (eval echo "$as_me:6386: \"$ac_link\"") >&5
503d2be0
AS
6387 (eval $ac_link) 2>&5
6388 ac_status=$?
b1b84649 6389 echo "$as_me:6389: \$? = $ac_status" >&5
503d2be0
AS
6390 (exit $ac_status); } &&
6391 { ac_try='test -s conftest$ac_exeext'
b1b84649 6392 { (eval echo "$as_me:6392: \"$ac_try\"") >&5
503d2be0
AS
6393 (eval $ac_try) 2>&5
6394 ac_status=$?
b1b84649 6395 echo "$as_me:6395: \$? = $ac_status" >&5
503d2be0 6396 (exit $ac_status); }; }; then
73b77ee5
GM
6397 emacs_cv_x11_version_6=yes
6398else
503d2be0
AS
6399 echo "$as_me: failed program was:" >&5
6400cat conftest.$ac_ext >&5
6401emacs_cv_x11_version_6=no
73b77ee5 6402fi
503d2be0 6403rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
73b77ee5
GM
6404fi
6405
6406 if test $emacs_cv_x11_version_6 = yes; then
b1b84649 6407 echo "$as_me:6407: result: 6 or newer" >&5
503d2be0
AS
6408echo "${ECHO_T}6 or newer" >&6
6409 cat >>confdefs.h <<\EOF
73b77ee5
GM
6410#define HAVE_X11R6 1
6411EOF
6412
6413 else
b1b84649 6414 echo "$as_me:6414: result: before 6" >&5
503d2be0 6415echo "${ECHO_T}before 6" >&6
ba4481b5
DL
6416 fi
6417fi
6418
6419if test "${window_system}" = "x11"; then
b1b84649 6420 echo "$as_me:6420: checking X11 version 5" >&5
503d2be0
AS
6421echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6
6422 if test "${emacs_cv_x11_version_5+set}" = set; then
6423 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6424else
503d2be0 6425 cat >conftest.$ac_ext <<_ACEOF
b1b84649 6426#line 6426 "configure"
ba4481b5
DL
6427#include "confdefs.h"
6428#include <X11/Xlib.h>
503d2be0
AS
6429int
6430main ()
6431{
ba4481b5
DL
6432#if XlibSpecificationRelease < 5
6433fail;
6434#endif
6435
503d2be0
AS
6436 ;
6437 return 0;
6438}
6439_ACEOF
6440rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 6441if { (eval echo "$as_me:6441: \"$ac_link\"") >&5
503d2be0
AS
6442 (eval $ac_link) 2>&5
6443 ac_status=$?
b1b84649 6444 echo "$as_me:6444: \$? = $ac_status" >&5
503d2be0
AS
6445 (exit $ac_status); } &&
6446 { ac_try='test -s conftest$ac_exeext'
b1b84649 6447 { (eval echo "$as_me:6447: \"$ac_try\"") >&5
503d2be0
AS
6448 (eval $ac_try) 2>&5
6449 ac_status=$?
b1b84649 6450 echo "$as_me:6450: \$? = $ac_status" >&5
503d2be0 6451 (exit $ac_status); }; }; then
ba4481b5
DL
6452 emacs_cv_x11_version_5=yes
6453else
503d2be0
AS
6454 echo "$as_me: failed program was:" >&5
6455cat conftest.$ac_ext >&5
6456emacs_cv_x11_version_5=no
ba4481b5 6457fi
503d2be0 6458rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5
DL
6459fi
6460
6461 if test $emacs_cv_x11_version_5 = yes; then
b1b84649 6462 echo "$as_me:6462: result: 5 or newer" >&5
503d2be0 6463echo "${ECHO_T}5 or newer" >&6
ba4481b5 6464 HAVE_X11R5=yes
503d2be0 6465 cat >>confdefs.h <<\EOF
ba4481b5
DL
6466#define HAVE_X11R5 1
6467EOF
6468
6469 else
6470 HAVE_X11R5=no
b1b84649 6471 echo "$as_me:6471: result: before 5" >&5
503d2be0 6472echo "${ECHO_T}before 5" >&6
ba4481b5
DL
6473 fi
6474fi
6475
6476if test x"${USE_X_TOOLKIT}" = xmaybe; then
6477 if test x"${HAVE_X11R5}" = xyes; then
b1b84649 6478 echo "$as_me:6478: checking X11 version 5 with Xaw" >&5
503d2be0
AS
6479echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6
6480 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
6481 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6482else
503d2be0 6483 cat >conftest.$ac_ext <<_ACEOF
b1b84649 6484#line 6484 "configure"
ba4481b5
DL
6485#include "confdefs.h"
6486
6487#include <X11/Intrinsic.h>
6488#include <X11/Xaw/Simple.h>
503d2be0
AS
6489int
6490main ()
6491{
ba4481b5 6492
503d2be0
AS
6493 ;
6494 return 0;
6495}
6496_ACEOF
6497rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 6498if { (eval echo "$as_me:6498: \"$ac_link\"") >&5
503d2be0
AS
6499 (eval $ac_link) 2>&5
6500 ac_status=$?
b1b84649 6501 echo "$as_me:6501: \$? = $ac_status" >&5
503d2be0
AS
6502 (exit $ac_status); } &&
6503 { ac_try='test -s conftest$ac_exeext'
b1b84649 6504 { (eval echo "$as_me:6504: \"$ac_try\"") >&5
503d2be0
AS
6505 (eval $ac_try) 2>&5
6506 ac_status=$?
b1b84649 6507 echo "$as_me:6507: \$? = $ac_status" >&5
503d2be0 6508 (exit $ac_status); }; }; then
ba4481b5
DL
6509 emacs_cv_x11_version_5_with_xaw=yes
6510else
503d2be0
AS
6511 echo "$as_me: failed program was:" >&5
6512cat conftest.$ac_ext >&5
6513emacs_cv_x11_version_5_with_xaw=no
ba4481b5 6514fi
503d2be0 6515rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5
DL
6516fi
6517
6518 if test $emacs_cv_x11_version_5_with_xaw = yes; then
b1b84649 6519 echo "$as_me:6519: result: 5 or newer, with Xaw; use toolkit by default" >&5
503d2be0 6520echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6
ba4481b5
DL
6521 USE_X_TOOLKIT=LUCID
6522 else
b1b84649 6523 echo "$as_me:6523: result: before 5 or no Xaw; do not use toolkit by default" >&5
503d2be0 6524echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6
ba4481b5
DL
6525 USE_X_TOOLKIT=none
6526 fi
6527 else
6528 USE_X_TOOLKIT=none
6529 fi
6530fi
6531
6532X_TOOLKIT_TYPE=$USE_X_TOOLKIT
6533
6534if test "${USE_X_TOOLKIT}" != "none"; then
b1b84649 6535 echo "$as_me:6535: checking X11 toolkit version" >&5
503d2be0
AS
6536echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6
6537 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
6538 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6539else
503d2be0 6540 cat >conftest.$ac_ext <<_ACEOF
b1b84649 6541#line 6541 "configure"
ba4481b5
DL
6542#include "confdefs.h"
6543#include <X11/Intrinsic.h>
503d2be0
AS
6544int
6545main ()
6546{
ba4481b5
DL
6547#if XtSpecificationRelease < 6
6548fail;
6549#endif
6550
503d2be0
AS
6551 ;
6552 return 0;
6553}
6554_ACEOF
6555rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 6556if { (eval echo "$as_me:6556: \"$ac_link\"") >&5
503d2be0
AS
6557 (eval $ac_link) 2>&5
6558 ac_status=$?
b1b84649 6559 echo "$as_me:6559: \$? = $ac_status" >&5
503d2be0
AS
6560 (exit $ac_status); } &&
6561 { ac_try='test -s conftest$ac_exeext'
b1b84649 6562 { (eval echo "$as_me:6562: \"$ac_try\"") >&5
503d2be0
AS
6563 (eval $ac_try) 2>&5
6564 ac_status=$?
b1b84649 6565 echo "$as_me:6565: \$? = $ac_status" >&5
503d2be0 6566 (exit $ac_status); }; }; then
ba4481b5
DL
6567 emacs_cv_x11_toolkit_version_6=yes
6568else
503d2be0
AS
6569 echo "$as_me: failed program was:" >&5
6570cat conftest.$ac_ext >&5
6571emacs_cv_x11_toolkit_version_6=no
ba4481b5 6572fi
503d2be0 6573rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5
DL
6574fi
6575
6576 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
6577 if test $emacs_cv_x11_toolkit_version_6 = yes; then
b1b84649 6578 echo "$as_me:6578: result: 6 or newer" >&5
503d2be0
AS
6579echo "${ECHO_T}6 or newer" >&6
6580 cat >>confdefs.h <<\EOF
ba4481b5
DL
6581#define HAVE_X11XTR6 1
6582EOF
6583
6584 else
b1b84649 6585 echo "$as_me:6585: result: before 6" >&5
503d2be0 6586echo "${ECHO_T}before 6" >&6
ba4481b5
DL
6587 fi
6588
6589 OLDLIBS="$LIBS"
6590 if test x$HAVE_X11XTR6 = xyes; then
6591 LIBS="-lXt -lSM -lICE $LIBS"
6592 else
6593 LIBS="-lXt $LIBS"
6594 fi
503d2be0 6595
b1b84649 6596echo "$as_me:6596: checking for XmuConvertStandardSelection in -lXmu" >&5
503d2be0
AS
6597echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6
6598if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
6599 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6600else
503d2be0 6601 ac_check_lib_save_LIBS=$LIBS
ba4481b5 6602LIBS="-lXmu $LIBS"
503d2be0 6603cat >conftest.$ac_ext <<_ACEOF
b1b84649 6604#line 6604 "configure"
ba4481b5 6605#include "confdefs.h"
503d2be0 6606
ba4481b5 6607/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6608#ifdef __cplusplus
6609extern "C"
6610#endif
ba4481b5 6611/* We use char because int might match the return type of a gcc2
503d2be0
AS
6612 builtin and then its argument prototype would still apply. */
6613char XmuConvertStandardSelection ();
6614int
6615main ()
6616{
6617XmuConvertStandardSelection ();
6618 ;
6619 return 0;
6620}
6621_ACEOF
6622rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 6623if { (eval echo "$as_me:6623: \"$ac_link\"") >&5
503d2be0
AS
6624 (eval $ac_link) 2>&5
6625 ac_status=$?
b1b84649 6626 echo "$as_me:6626: \$? = $ac_status" >&5
503d2be0
AS
6627 (exit $ac_status); } &&
6628 { ac_try='test -s conftest$ac_exeext'
b1b84649 6629 { (eval echo "$as_me:6629: \"$ac_try\"") >&5
503d2be0
AS
6630 (eval $ac_try) 2>&5
6631 ac_status=$?
b1b84649 6632 echo "$as_me:6632: \$? = $ac_status" >&5
503d2be0
AS
6633 (exit $ac_status); }; }; then
6634 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
6635else
6636 echo "$as_me: failed program was:" >&5
6637cat conftest.$ac_ext >&5
6638ac_cv_lib_Xmu_XmuConvertStandardSelection=no
6639fi
6640rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6641LIBS=$ac_check_lib_save_LIBS
6642fi
b1b84649 6643echo "$as_me:6643: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
503d2be0
AS
6644echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6
6645if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
6646 cat >>confdefs.h <<EOF
6647#define HAVE_LIBXMU 1
ba4481b5
DL
6648EOF
6649
6650 LIBS="-lXmu $LIBS"
6651
ba4481b5
DL
6652fi
6653
457b792c
GM
6654 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
6655fi
6656
6657# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
6658if test "${HAVE_X11}" = "yes"; then
6659 if test "${USE_X_TOOLKIT}" != "none"; then
503d2be0 6660
b1b84649 6661echo "$as_me:6661: checking for XShapeQueryExtension in -lXext" >&5
503d2be0
AS
6662echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6
6663if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
6664 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 6665else
503d2be0 6666 ac_check_lib_save_LIBS=$LIBS
457b792c 6667LIBS="-lXext $LIBS"
503d2be0 6668cat >conftest.$ac_ext <<_ACEOF
b1b84649 6669#line 6669 "configure"
457b792c 6670#include "confdefs.h"
503d2be0 6671
457b792c 6672/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6673#ifdef __cplusplus
6674extern "C"
6675#endif
457b792c 6676/* We use char because int might match the return type of a gcc2
503d2be0
AS
6677 builtin and then its argument prototype would still apply. */
6678char XShapeQueryExtension ();
6679int
6680main ()
6681{
6682XShapeQueryExtension ();
6683 ;
6684 return 0;
6685}
6686_ACEOF
6687rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 6688if { (eval echo "$as_me:6688: \"$ac_link\"") >&5
503d2be0
AS
6689 (eval $ac_link) 2>&5
6690 ac_status=$?
b1b84649 6691 echo "$as_me:6691: \$? = $ac_status" >&5
503d2be0
AS
6692 (exit $ac_status); } &&
6693 { ac_try='test -s conftest$ac_exeext'
b1b84649 6694 { (eval echo "$as_me:6694: \"$ac_try\"") >&5
503d2be0
AS
6695 (eval $ac_try) 2>&5
6696 ac_status=$?
b1b84649 6697 echo "$as_me:6697: \$? = $ac_status" >&5
503d2be0
AS
6698 (exit $ac_status); }; }; then
6699 ac_cv_lib_Xext_XShapeQueryExtension=yes
6700else
6701 echo "$as_me: failed program was:" >&5
6702cat conftest.$ac_ext >&5
6703ac_cv_lib_Xext_XShapeQueryExtension=no
6704fi
6705rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6706LIBS=$ac_check_lib_save_LIBS
6707fi
b1b84649 6708echo "$as_me:6708: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
503d2be0
AS
6709echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6
6710if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
6711 cat >>confdefs.h <<EOF
6712#define HAVE_LIBXEXT 1
457b792c
GM
6713EOF
6714
6715 LIBS="-lXext $LIBS"
6716
457b792c
GM
6717fi
6718
6719 fi
ba4481b5
DL
6720fi
6721
6722if test "${USE_X_TOOLKIT}" = "MOTIF"; then
b1b84649 6723 echo "$as_me:6723: checking for Motif version 2.1" >&5
503d2be0
AS
6724echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6
6725if test "${emacs_cv_motif_version_2_1+set}" = set; then
6726 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6727else
503d2be0 6728 cat >conftest.$ac_ext <<_ACEOF
b1b84649 6729#line 6729 "configure"
ba4481b5
DL
6730#include "confdefs.h"
6731#include <Xm/Xm.h>
503d2be0
AS
6732int
6733main ()
6734{
ba4481b5
DL
6735#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
6736int x = 5;
6737#else
6738Motif version prior to 2.1.
6739#endif
503d2be0
AS
6740 ;
6741 return 0;
6742}
6743_ACEOF
6744rm -f conftest.$ac_objext
b1b84649 6745if { (eval echo "$as_me:6745: \"$ac_compile\"") >&5
503d2be0
AS
6746 (eval $ac_compile) 2>&5
6747 ac_status=$?
b1b84649 6748 echo "$as_me:6748: \$? = $ac_status" >&5
503d2be0
AS
6749 (exit $ac_status); } &&
6750 { ac_try='test -s conftest.$ac_objext'
b1b84649 6751 { (eval echo "$as_me:6751: \"$ac_try\"") >&5
503d2be0
AS
6752 (eval $ac_try) 2>&5
6753 ac_status=$?
b1b84649 6754 echo "$as_me:6754: \$? = $ac_status" >&5
503d2be0 6755 (exit $ac_status); }; }; then
ba4481b5
DL
6756 emacs_cv_motif_version_2_1=yes
6757else
503d2be0
AS
6758 echo "$as_me: failed program was:" >&5
6759cat conftest.$ac_ext >&5
6760emacs_cv_motif_version_2_1=no
ba4481b5 6761fi
503d2be0 6762rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 6763fi
b1b84649 6764echo "$as_me:6764: result: $emacs_cv_motif_version_2_1" >&5
503d2be0 6765echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6
ba4481b5
DL
6766 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
6767 if test $emacs_cv_motif_version_2_1 = yes; then
169fe44e 6768 HAVE_LIBXP=no
503d2be0 6769 cat >>confdefs.h <<\EOF
ba4481b5
DL
6770#define HAVE_MOTIF_2_1 1
6771EOF
6772
b1b84649 6773 echo "$as_me:6773: checking for XpCreateContext in -lXp" >&5
503d2be0
AS
6774echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6
6775if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
6776 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6777else
503d2be0 6778 ac_check_lib_save_LIBS=$LIBS
457b792c 6779LIBS="-lXp $LIBS"
503d2be0 6780cat >conftest.$ac_ext <<_ACEOF
b1b84649 6781#line 6781 "configure"
ba4481b5 6782#include "confdefs.h"
503d2be0 6783
ba4481b5 6784/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6785#ifdef __cplusplus
6786extern "C"
6787#endif
ba4481b5 6788/* We use char because int might match the return type of a gcc2
503d2be0
AS
6789 builtin and then its argument prototype would still apply. */
6790char XpCreateContext ();
6791int
6792main ()
6793{
6794XpCreateContext ();
6795 ;
6796 return 0;
6797}
6798_ACEOF
6799rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 6800if { (eval echo "$as_me:6800: \"$ac_link\"") >&5
503d2be0
AS
6801 (eval $ac_link) 2>&5
6802 ac_status=$?
b1b84649 6803 echo "$as_me:6803: \$? = $ac_status" >&5
503d2be0
AS
6804 (exit $ac_status); } &&
6805 { ac_try='test -s conftest$ac_exeext'
b1b84649 6806 { (eval echo "$as_me:6806: \"$ac_try\"") >&5
503d2be0
AS
6807 (eval $ac_try) 2>&5
6808 ac_status=$?
b1b84649 6809 echo "$as_me:6809: \$? = $ac_status" >&5
503d2be0
AS
6810 (exit $ac_status); }; }; then
6811 ac_cv_lib_Xp_XpCreateContext=yes
6812else
6813 echo "$as_me: failed program was:" >&5
6814cat conftest.$ac_ext >&5
6815ac_cv_lib_Xp_XpCreateContext=no
6816fi
6817rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6818LIBS=$ac_check_lib_save_LIBS
6819fi
b1b84649 6820echo "$as_me:6820: result: $ac_cv_lib_Xp_XpCreateContext" >&5
503d2be0
AS
6821echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6
6822if test $ac_cv_lib_Xp_XpCreateContext = yes; then
48d4b120 6823 HAVE_LIBXP=yes
ba4481b5
DL
6824fi
6825
48d4b120 6826 if test ${HAVE_LIBXP} = yes; then
503d2be0 6827 cat >>confdefs.h <<\EOF
48d4b120
DL
6828#define HAVE_LIBXP 1
6829EOF
6830
503d2be0 6831 fi
ba4481b5
DL
6832 fi
6833fi
6834
6835### Is -lXaw3d available?
6836HAVE_XAW3D=no
6837if test "${HAVE_X11}" = "yes"; then
6838 if test "${USE_X_TOOLKIT}" != "none"; then
b1b84649 6839 echo "$as_me:6839: checking for X11/Xaw3d/Scrollbar.h" >&5
503d2be0
AS
6840echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6
6841if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
6842 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6843else
503d2be0 6844 cat >conftest.$ac_ext <<_ACEOF
b1b84649 6845#line 6845 "configure"
ba4481b5
DL
6846#include "confdefs.h"
6847#include <X11/Xaw3d/Scrollbar.h>
503d2be0 6848_ACEOF
b1b84649 6849if { (eval echo "$as_me:6849: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
6850 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6851 ac_status=$?
6852 egrep -v '^ *\+' conftest.er1 >conftest.err
6853 rm -f conftest.er1
6854 cat conftest.err >&5
b1b84649 6855 echo "$as_me:6855: \$? = $ac_status" >&5
503d2be0
AS
6856 (exit $ac_status); } >/dev/null; then
6857 if test -s conftest.err; then
6858 ac_cpp_err=$ac_c_preproc_warn_flag
6859 else
6860 ac_cpp_err=
6861 fi
6862else
6863 ac_cpp_err=yes
6864fi
6865if test -z "$ac_cpp_err"; then
6866 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 6867else
503d2be0 6868 echo "$as_me: failed program was:" >&5
ba4481b5 6869 cat conftest.$ac_ext >&5
503d2be0 6870 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 6871fi
503d2be0 6872rm -f conftest.err conftest.$ac_ext
ba4481b5 6873fi
b1b84649 6874echo "$as_me:6874: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
503d2be0
AS
6875echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6
6876if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
b1b84649 6877 echo "$as_me:6877: checking for XawScrollbarSetThumb in -lXaw3d" >&5
503d2be0
AS
6878echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6
6879if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
6880 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6881else
503d2be0 6882 ac_check_lib_save_LIBS=$LIBS
457b792c 6883LIBS="-lXaw3d $LIBS"
503d2be0 6884cat >conftest.$ac_ext <<_ACEOF
b1b84649 6885#line 6885 "configure"
ba4481b5 6886#include "confdefs.h"
503d2be0 6887
ba4481b5 6888/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6889#ifdef __cplusplus
6890extern "C"
6891#endif
ba4481b5 6892/* We use char because int might match the return type of a gcc2
503d2be0
AS
6893 builtin and then its argument prototype would still apply. */
6894char XawScrollbarSetThumb ();
6895int
6896main ()
6897{
6898XawScrollbarSetThumb ();
6899 ;
6900 return 0;
6901}
6902_ACEOF
6903rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 6904if { (eval echo "$as_me:6904: \"$ac_link\"") >&5
503d2be0
AS
6905 (eval $ac_link) 2>&5
6906 ac_status=$?
b1b84649 6907 echo "$as_me:6907: \$? = $ac_status" >&5
503d2be0
AS
6908 (exit $ac_status); } &&
6909 { ac_try='test -s conftest$ac_exeext'
b1b84649 6910 { (eval echo "$as_me:6910: \"$ac_try\"") >&5
503d2be0
AS
6911 (eval $ac_try) 2>&5
6912 ac_status=$?
b1b84649 6913 echo "$as_me:6913: \$? = $ac_status" >&5
503d2be0
AS
6914 (exit $ac_status); }; }; then
6915 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
6916else
6917 echo "$as_me: failed program was:" >&5
6918cat conftest.$ac_ext >&5
6919ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
6920fi
6921rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6922LIBS=$ac_check_lib_save_LIBS
6923fi
b1b84649 6924echo "$as_me:6924: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
503d2be0
AS
6925echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6
6926if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
ba4481b5 6927 HAVE_XAW3D=yes
ba4481b5
DL
6928fi
6929
ba4481b5
DL
6930fi
6931
ba4481b5 6932 if test "${HAVE_XAW3D}" = "yes"; then
503d2be0 6933 cat >>confdefs.h <<\EOF
ba4481b5
DL
6934#define HAVE_XAW3D 1
6935EOF
6936
6937 fi
6938 fi
6939fi
ba4481b5
DL
6940
6941USE_TOOLKIT_SCROLL_BARS=no
6942if test "${with_toolkit_scroll_bars}" != "no"; then
6943 if test "${USE_X_TOOLKIT}" != "none"; then
6944 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
503d2be0 6945 cat >>confdefs.h <<\EOF
ba4481b5
DL
6946#define USE_TOOLKIT_SCROLL_BARS 1
6947EOF
6948
6949 HAVE_XAW3D=no
6950 USE_TOOLKIT_SCROLL_BARS=yes
6951 elif test "${HAVE_XAW3D}" = "yes"; then
503d2be0 6952 cat >>confdefs.h <<\EOF
ba4481b5
DL
6953#define USE_TOOLKIT_SCROLL_BARS 1
6954EOF
6955
6956 USE_TOOLKIT_SCROLL_BARS=yes
6957 fi
6958 fi
6959fi
6960
1d36487c 6961if test "${with_xim}" != "no"; then
503d2be0 6962 cat >>confdefs.h <<\EOF
1d36487c
GM
6963#define USE_XIM 1
6964EOF
6965
6966fi
6967
ba4481b5
DL
6968### Use -lXpm if available, unless `--with-xpm=no'.
6969HAVE_XPM=no
6970if test "${HAVE_X11}" = "yes"; then
6971 if test "${with_xpm}" != "no"; then
b1b84649 6972 echo "$as_me:6972: checking for X11/xpm.h" >&5
503d2be0
AS
6973echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
6974if test "${ac_cv_header_X11_xpm_h+set}" = set; then
6975 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6976else
503d2be0 6977 cat >conftest.$ac_ext <<_ACEOF
b1b84649 6978#line 6978 "configure"
ba4481b5
DL
6979#include "confdefs.h"
6980#include <X11/xpm.h>
503d2be0 6981_ACEOF
b1b84649 6982if { (eval echo "$as_me:6982: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
6983 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6984 ac_status=$?
6985 egrep -v '^ *\+' conftest.er1 >conftest.err
6986 rm -f conftest.er1
6987 cat conftest.err >&5
b1b84649 6988 echo "$as_me:6988: \$? = $ac_status" >&5
503d2be0
AS
6989 (exit $ac_status); } >/dev/null; then
6990 if test -s conftest.err; then
6991 ac_cpp_err=$ac_c_preproc_warn_flag
6992 else
6993 ac_cpp_err=
6994 fi
6995else
6996 ac_cpp_err=yes
6997fi
6998if test -z "$ac_cpp_err"; then
6999 ac_cv_header_X11_xpm_h=yes
ba4481b5 7000else
503d2be0 7001 echo "$as_me: failed program was:" >&5
ba4481b5 7002 cat conftest.$ac_ext >&5
503d2be0 7003 ac_cv_header_X11_xpm_h=no
ba4481b5 7004fi
503d2be0 7005rm -f conftest.err conftest.$ac_ext
ba4481b5 7006fi
b1b84649 7007echo "$as_me:7007: result: $ac_cv_header_X11_xpm_h" >&5
503d2be0
AS
7008echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
7009if test $ac_cv_header_X11_xpm_h = yes; then
b1b84649 7010 echo "$as_me:7010: checking for XpmReadFileToPixmap in -lXpm" >&5
503d2be0
AS
7011echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6
7012if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
7013 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7014else
503d2be0 7015 ac_check_lib_save_LIBS=$LIBS
ba4481b5 7016LIBS="-lXpm -lX11 $LIBS"
503d2be0 7017cat >conftest.$ac_ext <<_ACEOF
b1b84649 7018#line 7018 "configure"
ba4481b5 7019#include "confdefs.h"
503d2be0 7020
ba4481b5 7021/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7022#ifdef __cplusplus
7023extern "C"
7024#endif
ba4481b5 7025/* We use char because int might match the return type of a gcc2
503d2be0
AS
7026 builtin and then its argument prototype would still apply. */
7027char XpmReadFileToPixmap ();
7028int
7029main ()
7030{
7031XpmReadFileToPixmap ();
7032 ;
7033 return 0;
7034}
7035_ACEOF
7036rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 7037if { (eval echo "$as_me:7037: \"$ac_link\"") >&5
503d2be0
AS
7038 (eval $ac_link) 2>&5
7039 ac_status=$?
b1b84649 7040 echo "$as_me:7040: \$? = $ac_status" >&5
503d2be0
AS
7041 (exit $ac_status); } &&
7042 { ac_try='test -s conftest$ac_exeext'
b1b84649 7043 { (eval echo "$as_me:7043: \"$ac_try\"") >&5
503d2be0
AS
7044 (eval $ac_try) 2>&5
7045 ac_status=$?
b1b84649 7046 echo "$as_me:7046: \$? = $ac_status" >&5
503d2be0
AS
7047 (exit $ac_status); }; }; then
7048 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
7049else
7050 echo "$as_me: failed program was:" >&5
7051cat conftest.$ac_ext >&5
7052ac_cv_lib_Xpm_XpmReadFileToPixmap=no
7053fi
7054rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7055LIBS=$ac_check_lib_save_LIBS
7056fi
b1b84649 7057echo "$as_me:7057: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
503d2be0
AS
7058echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6
7059if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
ba4481b5 7060 HAVE_XPM=yes
ba4481b5
DL
7061fi
7062
ba4481b5
DL
7063fi
7064
4b92c49a 7065 if test "${HAVE_XPM}" = "yes"; then
b1b84649 7066 echo "$as_me:7066: checking for XpmReturnAllocPixels preprocessor define" >&5
503d2be0
AS
7067echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6
7068 cat >conftest.$ac_ext <<_ACEOF
b1b84649 7069#line 7069 "configure"
4b92c49a
GM
7070#include "confdefs.h"
7071#include "X11/xpm.h"
7072#ifndef XpmReturnAllocPixels
7073no_return_alloc_pixels
7074#endif
503d2be0
AS
7075
7076_ACEOF
4b92c49a
GM
7077if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7078 egrep "no_return_alloc_pixels" >/dev/null 2>&1; then
4b92c49a
GM
7079 HAVE_XPM=no
7080else
4b92c49a
GM
7081 HAVE_XPM=yes
7082fi
7083rm -f conftest*
7084
5721ae13 7085 if test "${HAVE_XPM}" = "yes"; then
b1b84649 7086 echo "$as_me:7086: result: yes" >&5
503d2be0 7087echo "${ECHO_T}yes" >&6
5721ae13 7088 else
b1b84649 7089 echo "$as_me:7089: result: no" >&5
503d2be0 7090echo "${ECHO_T}no" >&6
5721ae13 7091 fi
ff8df3be 7092 fi
ba4481b5
DL
7093 fi
7094
7095 if test "${HAVE_XPM}" = "yes"; then
503d2be0 7096 cat >>confdefs.h <<\EOF
ba4481b5
DL
7097#define HAVE_XPM 1
7098EOF
7099
7100 fi
7101fi
503d2be0 7102
ba4481b5
DL
7103### Use -ljpeg if available, unless `--with-jpeg=no'.
7104HAVE_JPEG=no
7105if test "${HAVE_X11}" = "yes"; then
7106 if test "${with_jpeg}" != "no"; then
b1b84649 7107 echo "$as_me:7107: checking for jerror.h" >&5
503d2be0
AS
7108echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
7109if test "${ac_cv_header_jerror_h+set}" = set; then
7110 echo $ECHO_N "(cached) $ECHO_C" >&6
ffe36136 7111else
503d2be0 7112 cat >conftest.$ac_ext <<_ACEOF
b1b84649 7113#line 7113 "configure"
ffe36136
GM
7114#include "confdefs.h"
7115#include <jerror.h>
503d2be0 7116_ACEOF
b1b84649 7117if { (eval echo "$as_me:7117: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
7118 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7119 ac_status=$?
7120 egrep -v '^ *\+' conftest.er1 >conftest.err
7121 rm -f conftest.er1
7122 cat conftest.err >&5
b1b84649 7123 echo "$as_me:7123: \$? = $ac_status" >&5
503d2be0
AS
7124 (exit $ac_status); } >/dev/null; then
7125 if test -s conftest.err; then
7126 ac_cpp_err=$ac_c_preproc_warn_flag
7127 else
7128 ac_cpp_err=
7129 fi
7130else
7131 ac_cpp_err=yes
7132fi
7133if test -z "$ac_cpp_err"; then
7134 ac_cv_header_jerror_h=yes
ffe36136 7135else
503d2be0 7136 echo "$as_me: failed program was:" >&5
ffe36136 7137 cat conftest.$ac_ext >&5
503d2be0 7138 ac_cv_header_jerror_h=no
ffe36136 7139fi
503d2be0 7140rm -f conftest.err conftest.$ac_ext
ffe36136 7141fi
b1b84649 7142echo "$as_me:7142: result: $ac_cv_header_jerror_h" >&5
503d2be0
AS
7143echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
7144if test $ac_cv_header_jerror_h = yes; then
b1b84649 7145 echo "$as_me:7145: checking for jpeg_destroy_compress in -ljpeg" >&5
503d2be0
AS
7146echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6
7147if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
7148 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7149else
503d2be0 7150 ac_check_lib_save_LIBS=$LIBS
457b792c 7151LIBS="-ljpeg $LIBS"
503d2be0 7152cat >conftest.$ac_ext <<_ACEOF
b1b84649 7153#line 7153 "configure"
ba4481b5 7154#include "confdefs.h"
503d2be0 7155
ba4481b5 7156/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7157#ifdef __cplusplus
7158extern "C"
7159#endif
ba4481b5 7160/* We use char because int might match the return type of a gcc2
503d2be0
AS
7161 builtin and then its argument prototype would still apply. */
7162char jpeg_destroy_compress ();
7163int
7164main ()
7165{
7166jpeg_destroy_compress ();
7167 ;
7168 return 0;
7169}
7170_ACEOF
7171rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 7172if { (eval echo "$as_me:7172: \"$ac_link\"") >&5
503d2be0
AS
7173 (eval $ac_link) 2>&5
7174 ac_status=$?
b1b84649 7175 echo "$as_me:7175: \$? = $ac_status" >&5
503d2be0
AS
7176 (exit $ac_status); } &&
7177 { ac_try='test -s conftest$ac_exeext'
b1b84649 7178 { (eval echo "$as_me:7178: \"$ac_try\"") >&5
503d2be0
AS
7179 (eval $ac_try) 2>&5
7180 ac_status=$?
b1b84649 7181 echo "$as_me:7181: \$? = $ac_status" >&5
503d2be0
AS
7182 (exit $ac_status); }; }; then
7183 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
7184else
7185 echo "$as_me: failed program was:" >&5
7186cat conftest.$ac_ext >&5
7187ac_cv_lib_jpeg_jpeg_destroy_compress=no
7188fi
7189rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7190LIBS=$ac_check_lib_save_LIBS
7191fi
b1b84649 7192echo "$as_me:7192: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
503d2be0
AS
7193echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6
7194if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
ba4481b5 7195 HAVE_JPEG=yes
ffe36136
GM
7196fi
7197
ba4481b5
DL
7198fi
7199
ba4481b5
DL
7200 fi
7201
7202 if test "${HAVE_JPEG}" = "yes"; then
503d2be0 7203 cat >>confdefs.h <<\EOF
ba4481b5
DL
7204#define HAVE_JPEG 1
7205EOF
7206
7207 fi
7208fi
503d2be0 7209
ba4481b5
DL
7210### Use -lpng if available, unless `--with-png=no'.
7211HAVE_PNG=no
7212if test "${HAVE_X11}" = "yes"; then
7213 if test "${with_png}" != "no"; then
b1b84649 7214 echo "$as_me:7214: checking for png.h" >&5
503d2be0
AS
7215echo $ECHO_N "checking for png.h... $ECHO_C" >&6
7216if test "${ac_cv_header_png_h+set}" = set; then
7217 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7218else
503d2be0 7219 cat >conftest.$ac_ext <<_ACEOF
b1b84649 7220#line 7220 "configure"
ba4481b5
DL
7221#include "confdefs.h"
7222#include <png.h>
503d2be0 7223_ACEOF
b1b84649 7224if { (eval echo "$as_me:7224: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
7225 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7226 ac_status=$?
7227 egrep -v '^ *\+' conftest.er1 >conftest.err
7228 rm -f conftest.er1
7229 cat conftest.err >&5
b1b84649 7230 echo "$as_me:7230: \$? = $ac_status" >&5
503d2be0
AS
7231 (exit $ac_status); } >/dev/null; then
7232 if test -s conftest.err; then
7233 ac_cpp_err=$ac_c_preproc_warn_flag
7234 else
7235 ac_cpp_err=
7236 fi
7237else
7238 ac_cpp_err=yes
7239fi
7240if test -z "$ac_cpp_err"; then
7241 ac_cv_header_png_h=yes
ba4481b5 7242else
503d2be0 7243 echo "$as_me: failed program was:" >&5
ba4481b5 7244 cat conftest.$ac_ext >&5
503d2be0 7245 ac_cv_header_png_h=no
ba4481b5 7246fi
503d2be0 7247rm -f conftest.err conftest.$ac_ext
ba4481b5 7248fi
b1b84649 7249echo "$as_me:7249: result: $ac_cv_header_png_h" >&5
503d2be0
AS
7250echo "${ECHO_T}$ac_cv_header_png_h" >&6
7251if test $ac_cv_header_png_h = yes; then
b1b84649 7252 echo "$as_me:7252: checking for png_get_channels in -lpng" >&5
503d2be0
AS
7253echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6
7254if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
7255 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7256else
503d2be0 7257 ac_check_lib_save_LIBS=$LIBS
457b792c 7258LIBS="-lpng -lz -lm $LIBS"
503d2be0 7259cat >conftest.$ac_ext <<_ACEOF
b1b84649 7260#line 7260 "configure"
ba4481b5 7261#include "confdefs.h"
503d2be0 7262
ba4481b5 7263/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7264#ifdef __cplusplus
7265extern "C"
7266#endif
ba4481b5 7267/* We use char because int might match the return type of a gcc2
503d2be0
AS
7268 builtin and then its argument prototype would still apply. */
7269char png_get_channels ();
7270int
7271main ()
7272{
7273png_get_channels ();
7274 ;
7275 return 0;
7276}
7277_ACEOF
7278rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 7279if { (eval echo "$as_me:7279: \"$ac_link\"") >&5
503d2be0
AS
7280 (eval $ac_link) 2>&5
7281 ac_status=$?
b1b84649 7282 echo "$as_me:7282: \$? = $ac_status" >&5
503d2be0
AS
7283 (exit $ac_status); } &&
7284 { ac_try='test -s conftest$ac_exeext'
b1b84649 7285 { (eval echo "$as_me:7285: \"$ac_try\"") >&5
503d2be0
AS
7286 (eval $ac_try) 2>&5
7287 ac_status=$?
b1b84649 7288 echo "$as_me:7288: \$? = $ac_status" >&5
503d2be0
AS
7289 (exit $ac_status); }; }; then
7290 ac_cv_lib_png_png_get_channels=yes
7291else
7292 echo "$as_me: failed program was:" >&5
7293cat conftest.$ac_ext >&5
7294ac_cv_lib_png_png_get_channels=no
7295fi
7296rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7297LIBS=$ac_check_lib_save_LIBS
7298fi
b1b84649 7299echo "$as_me:7299: result: $ac_cv_lib_png_png_get_channels" >&5
503d2be0
AS
7300echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6
7301if test $ac_cv_lib_png_png_get_channels = yes; then
ba4481b5 7302 HAVE_PNG=yes
ba4481b5
DL
7303fi
7304
ba4481b5
DL
7305fi
7306
ba4481b5
DL
7307 fi
7308
7309 if test "${HAVE_PNG}" = "yes"; then
503d2be0 7310 cat >>confdefs.h <<\EOF
ba4481b5
DL
7311#define HAVE_PNG 1
7312EOF
7313
7314 fi
7315fi
503d2be0 7316
ba4481b5
DL
7317### Use -ltiff if available, unless `--with-tiff=no'.
7318HAVE_TIFF=no
7319if test "${HAVE_X11}" = "yes"; then
7320 if test "${with_tiff}" != "no"; then
b1b84649 7321 echo "$as_me:7321: checking for tiffio.h" >&5
503d2be0
AS
7322echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
7323if test "${ac_cv_header_tiffio_h+set}" = set; then
7324 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7325else
503d2be0 7326 cat >conftest.$ac_ext <<_ACEOF
b1b84649 7327#line 7327 "configure"
ba4481b5
DL
7328#include "confdefs.h"
7329#include <tiffio.h>
503d2be0 7330_ACEOF
b1b84649 7331if { (eval echo "$as_me:7331: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
7332 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7333 ac_status=$?
7334 egrep -v '^ *\+' conftest.er1 >conftest.err
7335 rm -f conftest.er1
7336 cat conftest.err >&5
b1b84649 7337 echo "$as_me:7337: \$? = $ac_status" >&5
503d2be0
AS
7338 (exit $ac_status); } >/dev/null; then
7339 if test -s conftest.err; then
7340 ac_cpp_err=$ac_c_preproc_warn_flag
7341 else
7342 ac_cpp_err=
7343 fi
7344else
7345 ac_cpp_err=yes
7346fi
7347if test -z "$ac_cpp_err"; then
7348 ac_cv_header_tiffio_h=yes
ba4481b5 7349else
503d2be0 7350 echo "$as_me: failed program was:" >&5
ba4481b5 7351 cat conftest.$ac_ext >&5
503d2be0 7352 ac_cv_header_tiffio_h=no
ba4481b5 7353fi
503d2be0 7354rm -f conftest.err conftest.$ac_ext
ba4481b5 7355fi
b1b84649 7356echo "$as_me:7356: result: $ac_cv_header_tiffio_h" >&5
503d2be0
AS
7357echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
7358if test $ac_cv_header_tiffio_h = yes; then
457b792c 7359 tifflibs="-lz -lm"
3b3cc4a4
KR
7360 # At least one tiff package requires the jpeg library.
7361 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
b1b84649 7362 echo "$as_me:7362: checking for TIFFGetVersion in -ltiff" >&5
503d2be0
AS
7363echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6
7364if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
7365 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7366else
503d2be0 7367 ac_check_lib_save_LIBS=$LIBS
3b3cc4a4 7368LIBS="-ltiff $tifflibs $LIBS"
503d2be0 7369cat >conftest.$ac_ext <<_ACEOF
b1b84649 7370#line 7370 "configure"
ba4481b5 7371#include "confdefs.h"
503d2be0 7372
ba4481b5 7373/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7374#ifdef __cplusplus
7375extern "C"
7376#endif
ba4481b5 7377/* We use char because int might match the return type of a gcc2
503d2be0
AS
7378 builtin and then its argument prototype would still apply. */
7379char TIFFGetVersion ();
7380int
7381main ()
7382{
7383TIFFGetVersion ();
7384 ;
7385 return 0;
7386}
7387_ACEOF
7388rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 7389if { (eval echo "$as_me:7389: \"$ac_link\"") >&5
503d2be0
AS
7390 (eval $ac_link) 2>&5
7391 ac_status=$?
b1b84649 7392 echo "$as_me:7392: \$? = $ac_status" >&5
503d2be0
AS
7393 (exit $ac_status); } &&
7394 { ac_try='test -s conftest$ac_exeext'
b1b84649 7395 { (eval echo "$as_me:7395: \"$ac_try\"") >&5
503d2be0
AS
7396 (eval $ac_try) 2>&5
7397 ac_status=$?
b1b84649 7398 echo "$as_me:7398: \$? = $ac_status" >&5
503d2be0
AS
7399 (exit $ac_status); }; }; then
7400 ac_cv_lib_tiff_TIFFGetVersion=yes
7401else
7402 echo "$as_me: failed program was:" >&5
7403cat conftest.$ac_ext >&5
7404ac_cv_lib_tiff_TIFFGetVersion=no
7405fi
7406rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7407LIBS=$ac_check_lib_save_LIBS
7408fi
b1b84649 7409echo "$as_me:7409: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
503d2be0
AS
7410echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6
7411if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
ba4481b5 7412 HAVE_TIFF=yes
ba4481b5
DL
7413fi
7414
ba4481b5
DL
7415fi
7416
ba4481b5
DL
7417 fi
7418
7419 if test "${HAVE_TIFF}" = "yes"; then
503d2be0 7420 cat >>confdefs.h <<\EOF
ba4481b5
DL
7421#define HAVE_TIFF 1
7422EOF
7423
7424 fi
7425fi
503d2be0 7426
ba4481b5
DL
7427### Use -lgif if available, unless `--with-gif=no'.
7428HAVE_GIF=no
7429if test "${HAVE_X11}" = "yes"; then
7430 if test "${with_gif}" != "no"; then
b1b84649 7431 echo "$as_me:7431: checking for gif_lib.h" >&5
503d2be0
AS
7432echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
7433if test "${ac_cv_header_gif_lib_h+set}" = set; then
7434 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7435else
503d2be0 7436 cat >conftest.$ac_ext <<_ACEOF
b1b84649 7437#line 7437 "configure"
ba4481b5
DL
7438#include "confdefs.h"
7439#include <gif_lib.h>
503d2be0 7440_ACEOF
b1b84649 7441if { (eval echo "$as_me:7441: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
7442 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7443 ac_status=$?
7444 egrep -v '^ *\+' conftest.er1 >conftest.err
7445 rm -f conftest.er1
7446 cat conftest.err >&5
b1b84649 7447 echo "$as_me:7447: \$? = $ac_status" >&5
503d2be0
AS
7448 (exit $ac_status); } >/dev/null; then
7449 if test -s conftest.err; then
7450 ac_cpp_err=$ac_c_preproc_warn_flag
7451 else
7452 ac_cpp_err=
7453 fi
7454else
7455 ac_cpp_err=yes
7456fi
7457if test -z "$ac_cpp_err"; then
7458 ac_cv_header_gif_lib_h=yes
ba4481b5 7459else
503d2be0 7460 echo "$as_me: failed program was:" >&5
ba4481b5 7461 cat conftest.$ac_ext >&5
503d2be0 7462 ac_cv_header_gif_lib_h=no
ba4481b5 7463fi
503d2be0 7464rm -f conftest.err conftest.$ac_ext
ba4481b5 7465fi
b1b84649 7466echo "$as_me:7466: result: $ac_cv_header_gif_lib_h" >&5
503d2be0
AS
7467echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
7468if test $ac_cv_header_gif_lib_h = yes; then
b1b84649 7469 echo "$as_me:7469: checking for DGifOpen in -lungif" >&5
503d2be0
AS
7470echo $ECHO_N "checking for DGifOpen in -lungif... $ECHO_C" >&6
7471if test "${ac_cv_lib_ungif_DGifOpen+set}" = set; then
7472 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7473else
503d2be0 7474 ac_check_lib_save_LIBS=$LIBS
457b792c 7475LIBS="-lungif $LIBS"
503d2be0 7476cat >conftest.$ac_ext <<_ACEOF
b1b84649 7477#line 7477 "configure"
ba4481b5 7478#include "confdefs.h"
503d2be0 7479
ba4481b5 7480/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7481#ifdef __cplusplus
7482extern "C"
7483#endif
ba4481b5 7484/* We use char because int might match the return type of a gcc2
503d2be0
AS
7485 builtin and then its argument prototype would still apply. */
7486char DGifOpen ();
7487int
7488main ()
7489{
7490DGifOpen ();
7491 ;
7492 return 0;
7493}
7494_ACEOF
7495rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 7496if { (eval echo "$as_me:7496: \"$ac_link\"") >&5
503d2be0
AS
7497 (eval $ac_link) 2>&5
7498 ac_status=$?
b1b84649 7499 echo "$as_me:7499: \$? = $ac_status" >&5
503d2be0
AS
7500 (exit $ac_status); } &&
7501 { ac_try='test -s conftest$ac_exeext'
b1b84649 7502 { (eval echo "$as_me:7502: \"$ac_try\"") >&5
503d2be0
AS
7503 (eval $ac_try) 2>&5
7504 ac_status=$?
b1b84649 7505 echo "$as_me:7505: \$? = $ac_status" >&5
503d2be0
AS
7506 (exit $ac_status); }; }; then
7507 ac_cv_lib_ungif_DGifOpen=yes
7508else
7509 echo "$as_me: failed program was:" >&5
7510cat conftest.$ac_ext >&5
7511ac_cv_lib_ungif_DGifOpen=no
7512fi
7513rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7514LIBS=$ac_check_lib_save_LIBS
7515fi
b1b84649 7516echo "$as_me:7516: result: $ac_cv_lib_ungif_DGifOpen" >&5
503d2be0
AS
7517echo "${ECHO_T}$ac_cv_lib_ungif_DGifOpen" >&6
7518if test $ac_cv_lib_ungif_DGifOpen = yes; then
ba4481b5 7519 HAVE_GIF=yes
ba4481b5
DL
7520fi
7521
ba4481b5
DL
7522fi
7523
ba4481b5
DL
7524 fi
7525
7526 if test "${HAVE_GIF}" = "yes"; then
503d2be0 7527 cat >>confdefs.h <<\EOF
ba4481b5
DL
7528#define HAVE_GIF 1
7529EOF
7530
7531 fi
7532fi
7533
7534# If netdb.h doesn't declare h_errno, we must declare it by hand.
b1b84649 7535echo "$as_me:7535: checking whether netdb declares h_errno" >&5
503d2be0
AS
7536echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6
7537if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
7538 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7539else
503d2be0 7540 cat >conftest.$ac_ext <<_ACEOF
b1b84649 7541#line 7541 "configure"
ba4481b5
DL
7542#include "confdefs.h"
7543#include <netdb.h>
503d2be0
AS
7544int
7545main ()
7546{
ba4481b5 7547return h_errno;
503d2be0
AS
7548 ;
7549 return 0;
7550}
7551_ACEOF
7552rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 7553if { (eval echo "$as_me:7553: \"$ac_link\"") >&5
503d2be0
AS
7554 (eval $ac_link) 2>&5
7555 ac_status=$?
b1b84649 7556 echo "$as_me:7556: \$? = $ac_status" >&5
503d2be0
AS
7557 (exit $ac_status); } &&
7558 { ac_try='test -s conftest$ac_exeext'
b1b84649 7559 { (eval echo "$as_me:7559: \"$ac_try\"") >&5
503d2be0
AS
7560 (eval $ac_try) 2>&5
7561 ac_status=$?
b1b84649 7562 echo "$as_me:7562: \$? = $ac_status" >&5
503d2be0 7563 (exit $ac_status); }; }; then
ba4481b5
DL
7564 emacs_cv_netdb_declares_h_errno=yes
7565else
503d2be0
AS
7566 echo "$as_me: failed program was:" >&5
7567cat conftest.$ac_ext >&5
7568emacs_cv_netdb_declares_h_errno=no
ba4481b5 7569fi
503d2be0 7570rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 7571fi
b1b84649 7572echo "$as_me:7572: result: $emacs_cv_netdb_declares_h_errno" >&5
503d2be0 7573echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6
ba4481b5 7574if test $emacs_cv_netdb_declares_h_errno = yes; then
503d2be0 7575 cat >>confdefs.h <<\EOF
ba4481b5
DL
7576#define HAVE_H_ERRNO 1
7577EOF
7578
7579fi
7580
7581# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7582# for constant arguments. Useless!
b1b84649 7583echo "$as_me:7583: checking for working alloca.h" >&5
503d2be0
AS
7584echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
7585if test "${ac_cv_working_alloca_h+set}" = set; then
7586 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7587else
503d2be0 7588 cat >conftest.$ac_ext <<_ACEOF
b1b84649 7589#line 7589 "configure"
ba4481b5
DL
7590#include "confdefs.h"
7591#include <alloca.h>
503d2be0
AS
7592int
7593main ()
7594{
7595char *p = (char *) alloca (2 * sizeof (int));
7596 ;
7597 return 0;
7598}
7599_ACEOF
7600rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 7601if { (eval echo "$as_me:7601: \"$ac_link\"") >&5
503d2be0
AS
7602 (eval $ac_link) 2>&5
7603 ac_status=$?
b1b84649 7604 echo "$as_me:7604: \$? = $ac_status" >&5
503d2be0
AS
7605 (exit $ac_status); } &&
7606 { ac_try='test -s conftest$ac_exeext'
b1b84649 7607 { (eval echo "$as_me:7607: \"$ac_try\"") >&5
503d2be0
AS
7608 (eval $ac_try) 2>&5
7609 ac_status=$?
b1b84649 7610 echo "$as_me:7610: \$? = $ac_status" >&5
503d2be0
AS
7611 (exit $ac_status); }; }; then
7612 ac_cv_working_alloca_h=yes
7613else
7614 echo "$as_me: failed program was:" >&5
7615cat conftest.$ac_ext >&5
7616ac_cv_working_alloca_h=no
7617fi
7618rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7619fi
b1b84649 7620echo "$as_me:7620: result: $ac_cv_working_alloca_h" >&5
503d2be0
AS
7621echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
7622if test $ac_cv_working_alloca_h = yes; then
7623
7624cat >>confdefs.h <<\EOF
ba4481b5
DL
7625#define HAVE_ALLOCA_H 1
7626EOF
7627
7628fi
7629
b1b84649 7630echo "$as_me:7630: checking for alloca" >&5
503d2be0
AS
7631echo $ECHO_N "checking for alloca... $ECHO_C" >&6
7632if test "${ac_cv_func_alloca_works+set}" = set; then
7633 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7634else
503d2be0 7635 cat >conftest.$ac_ext <<_ACEOF
b1b84649 7636#line 7636 "configure"
ba4481b5 7637#include "confdefs.h"
ba4481b5
DL
7638#ifdef __GNUC__
7639# define alloca __builtin_alloca
7640#else
c4bb2108
DL
7641# ifdef _MSC_VER
7642# include <malloc.h>
7643# define alloca _alloca
ba4481b5 7644# else
c4bb2108
DL
7645# if HAVE_ALLOCA_H
7646# include <alloca.h>
22afa6e8 7647# else
c4bb2108
DL
7648# ifdef _AIX
7649 #pragma alloca
7650# else
7651# ifndef alloca /* predefined by HP cc +Olibcalls */
ba4481b5 7652char *alloca ();
c4bb2108 7653# endif
ba4481b5
DL
7654# endif
7655# endif
7656# endif
7657#endif
7658
503d2be0
AS
7659int
7660main ()
7661{
7662char *p = (char *) alloca (1);
7663 ;
7664 return 0;
7665}
7666_ACEOF
7667rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 7668if { (eval echo "$as_me:7668: \"$ac_link\"") >&5
503d2be0
AS
7669 (eval $ac_link) 2>&5
7670 ac_status=$?
b1b84649 7671 echo "$as_me:7671: \$? = $ac_status" >&5
503d2be0
AS
7672 (exit $ac_status); } &&
7673 { ac_try='test -s conftest$ac_exeext'
b1b84649 7674 { (eval echo "$as_me:7674: \"$ac_try\"") >&5
503d2be0
AS
7675 (eval $ac_try) 2>&5
7676 ac_status=$?
b1b84649 7677 echo "$as_me:7677: \$? = $ac_status" >&5
503d2be0 7678 (exit $ac_status); }; }; then
ba4481b5
DL
7679 ac_cv_func_alloca_works=yes
7680else
503d2be0
AS
7681 echo "$as_me: failed program was:" >&5
7682cat conftest.$ac_ext >&5
7683ac_cv_func_alloca_works=no
ba4481b5 7684fi
503d2be0 7685rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 7686fi
b1b84649 7687echo "$as_me:7687: result: $ac_cv_func_alloca_works" >&5
503d2be0 7688echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
ba4481b5 7689
ba4481b5 7690if test $ac_cv_func_alloca_works = yes; then
503d2be0
AS
7691
7692cat >>confdefs.h <<\EOF
ba4481b5
DL
7693#define HAVE_ALLOCA 1
7694EOF
7695
503d2be0 7696else
ba4481b5 7697 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
503d2be0
AS
7698# that cause trouble. Some versions do not even contain alloca or
7699# contain a buggy version. If you still want to use their alloca,
7700# use ar to extract alloca.o from them instead of compiling alloca.c.
7701
7702ALLOCA=alloca.$ac_objext
7703
7704cat >>confdefs.h <<\EOF
ba4481b5
DL
7705#define C_ALLOCA 1
7706EOF
7707
b1b84649 7708echo "$as_me:7708: checking whether \`alloca.c' needs Cray hooks" >&5
503d2be0
AS
7709echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
7710if test "${ac_cv_os_cray+set}" = set; then
7711 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7712else
503d2be0 7713 cat >conftest.$ac_ext <<_ACEOF
b1b84649 7714#line 7714 "configure"
ba4481b5
DL
7715#include "confdefs.h"
7716#if defined(CRAY) && ! defined(CRAY2)
7717webecray
7718#else
7719wenotbecray
7720#endif
7721
503d2be0 7722_ACEOF
ba4481b5
DL
7723if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7724 egrep "webecray" >/dev/null 2>&1; then
ba4481b5
DL
7725 ac_cv_os_cray=yes
7726else
ba4481b5
DL
7727 ac_cv_os_cray=no
7728fi
7729rm -f conftest*
7730
7731fi
b1b84649 7732echo "$as_me:7732: result: $ac_cv_os_cray" >&5
503d2be0 7733echo "${ECHO_T}$ac_cv_os_cray" >&6
ba4481b5 7734if test $ac_cv_os_cray = yes; then
503d2be0
AS
7735 for ac_func in _getb67 GETB67 getb67; do
7736 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b1b84649 7737echo "$as_me:7737: checking for $ac_func" >&5
503d2be0
AS
7738echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7739if eval "test \"\${$as_ac_var+set}\" = set"; then
7740 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7741else
503d2be0 7742 cat >conftest.$ac_ext <<_ACEOF
b1b84649 7743#line 7743 "configure"
ba4481b5
DL
7744#include "confdefs.h"
7745/* System header to define __stub macros and hopefully few prototypes,
503d2be0 7746 which can conflict with char $ac_func (); below. */
ba4481b5
DL
7747#include <assert.h>
7748/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7749#ifdef __cplusplus
7750extern "C"
7751#endif
ba4481b5 7752/* We use char because int might match the return type of a gcc2
503d2be0
AS
7753 builtin and then its argument prototype would still apply. */
7754char $ac_func ();
7755char (*f) ();
ba4481b5 7756
503d2be0
AS
7757int
7758main ()
7759{
ba4481b5
DL
7760/* The GNU C library defines this for functions which it implements
7761 to always fail with ENOSYS. Some functions are actually named
7762 something starting with __ and the normal name is an alias. */
7763#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7764choke me
7765#else
503d2be0 7766f = $ac_func;
ba4481b5
DL
7767#endif
7768
503d2be0
AS
7769 ;
7770 return 0;
7771}
7772_ACEOF
7773rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 7774if { (eval echo "$as_me:7774: \"$ac_link\"") >&5
503d2be0
AS
7775 (eval $ac_link) 2>&5
7776 ac_status=$?
b1b84649 7777 echo "$as_me:7777: \$? = $ac_status" >&5
503d2be0
AS
7778 (exit $ac_status); } &&
7779 { ac_try='test -s conftest$ac_exeext'
b1b84649 7780 { (eval echo "$as_me:7780: \"$ac_try\"") >&5
503d2be0
AS
7781 (eval $ac_try) 2>&5
7782 ac_status=$?
b1b84649 7783 echo "$as_me:7783: \$? = $ac_status" >&5
503d2be0
AS
7784 (exit $ac_status); }; }; then
7785 eval "$as_ac_var=yes"
7786else
7787 echo "$as_me: failed program was:" >&5
7788cat conftest.$ac_ext >&5
7789eval "$as_ac_var=no"
7790fi
7791rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7792fi
b1b84649 7793echo "$as_me:7793: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
7794echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7795if test `eval echo '${'$as_ac_var'}'` = yes; then
7796
7797cat >>confdefs.h <<EOF
ba4481b5
DL
7798#define CRAY_STACKSEG_END $ac_func
7799EOF
7800
503d2be0 7801 break
ba4481b5
DL
7802fi
7803
503d2be0 7804 done
ba4481b5
DL
7805fi
7806
b1b84649 7807echo "$as_me:7807: checking stack direction for C alloca" >&5
503d2be0
AS
7808echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
7809if test "${ac_cv_c_stack_direction+set}" = set; then
7810 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
7811else
7812 if test "$cross_compiling" = yes; then
7813 ac_cv_c_stack_direction=0
7814else
503d2be0 7815 cat >conftest.$ac_ext <<_ACEOF
b1b84649 7816#line 7816 "configure"
ba4481b5 7817#include "confdefs.h"
503d2be0 7818int
ba4481b5
DL
7819find_stack_direction ()
7820{
7821 static char *addr = 0;
7822 auto char dummy;
7823 if (addr == 0)
7824 {
7825 addr = &dummy;
7826 return find_stack_direction ();
7827 }
7828 else
7829 return (&dummy > addr) ? 1 : -1;
7830}
503d2be0
AS
7831
7832int
ba4481b5
DL
7833main ()
7834{
503d2be0 7835 exit (find_stack_direction () < 0);
ba4481b5 7836}
503d2be0
AS
7837_ACEOF
7838rm -f conftest$ac_exeext
b1b84649 7839if { (eval echo "$as_me:7839: \"$ac_link\"") >&5
503d2be0
AS
7840 (eval $ac_link) 2>&5
7841 ac_status=$?
b1b84649 7842 echo "$as_me:7842: \$? = $ac_status" >&5
503d2be0 7843 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b1b84649 7844 { (eval echo "$as_me:7844: \"$ac_try\"") >&5
503d2be0
AS
7845 (eval $ac_try) 2>&5
7846 ac_status=$?
b1b84649 7847 echo "$as_me:7847: \$? = $ac_status" >&5
503d2be0 7848 (exit $ac_status); }; }; then
ba4481b5
DL
7849 ac_cv_c_stack_direction=1
7850else
503d2be0
AS
7851 echo "$as_me: program exited with status $ac_status" >&5
7852echo "$as_me: failed program was:" >&5
7853cat conftest.$ac_ext >&5
7854ac_cv_c_stack_direction=-1
ba4481b5 7855fi
503d2be0 7856rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 7857fi
ba4481b5 7858fi
b1b84649 7859echo "$as_me:7859: result: $ac_cv_c_stack_direction" >&5
503d2be0 7860echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
ba4481b5 7861
503d2be0 7862cat >>confdefs.h <<EOF
ba4481b5
DL
7863#define STACK_DIRECTION $ac_cv_c_stack_direction
7864EOF
7865
7866fi
7867
ba4481b5
DL
7868# fmod, logb, and frexp are found in -lm on most systems.
7869# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
503d2be0 7870
b1b84649 7871echo "$as_me:7871: checking for sqrt in -lm" >&5
503d2be0
AS
7872echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
7873if test "${ac_cv_lib_m_sqrt+set}" = set; then
7874 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7875else
503d2be0 7876 ac_check_lib_save_LIBS=$LIBS
ba4481b5 7877LIBS="-lm $LIBS"
503d2be0 7878cat >conftest.$ac_ext <<_ACEOF
b1b84649 7879#line 7879 "configure"
ba4481b5 7880#include "confdefs.h"
503d2be0 7881
ba4481b5 7882/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7883#ifdef __cplusplus
7884extern "C"
7885#endif
ba4481b5 7886/* We use char because int might match the return type of a gcc2
503d2be0
AS
7887 builtin and then its argument prototype would still apply. */
7888char sqrt ();
7889int
7890main ()
7891{
7892sqrt ();
7893 ;
7894 return 0;
7895}
7896_ACEOF
7897rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 7898if { (eval echo "$as_me:7898: \"$ac_link\"") >&5
503d2be0
AS
7899 (eval $ac_link) 2>&5
7900 ac_status=$?
b1b84649 7901 echo "$as_me:7901: \$? = $ac_status" >&5
503d2be0
AS
7902 (exit $ac_status); } &&
7903 { ac_try='test -s conftest$ac_exeext'
b1b84649 7904 { (eval echo "$as_me:7904: \"$ac_try\"") >&5
503d2be0
AS
7905 (eval $ac_try) 2>&5
7906 ac_status=$?
b1b84649 7907 echo "$as_me:7907: \$? = $ac_status" >&5
503d2be0
AS
7908 (exit $ac_status); }; }; then
7909 ac_cv_lib_m_sqrt=yes
7910else
7911 echo "$as_me: failed program was:" >&5
7912cat conftest.$ac_ext >&5
7913ac_cv_lib_m_sqrt=no
7914fi
7915rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7916LIBS=$ac_check_lib_save_LIBS
7917fi
b1b84649 7918echo "$as_me:7918: result: $ac_cv_lib_m_sqrt" >&5
503d2be0
AS
7919echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
7920if test $ac_cv_lib_m_sqrt = yes; then
7921 cat >>confdefs.h <<EOF
7922#define HAVE_LIBM 1
ba4481b5
DL
7923EOF
7924
7925 LIBS="-lm $LIBS"
7926
ba4481b5
DL
7927fi
7928
ba4481b5 7929# Check for mail-locking functions in a "mail" library
503d2be0 7930
b1b84649 7931echo "$as_me:7931: checking for maillock in -lmail" >&5
503d2be0
AS
7932echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6
7933if test "${ac_cv_lib_mail_maillock+set}" = set; then
7934 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7935else
503d2be0 7936 ac_check_lib_save_LIBS=$LIBS
ba4481b5 7937LIBS="-lmail $LIBS"
503d2be0 7938cat >conftest.$ac_ext <<_ACEOF
b1b84649 7939#line 7939 "configure"
ba4481b5 7940#include "confdefs.h"
503d2be0 7941
ba4481b5 7942/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7943#ifdef __cplusplus
7944extern "C"
7945#endif
ba4481b5 7946/* We use char because int might match the return type of a gcc2
503d2be0
AS
7947 builtin and then its argument prototype would still apply. */
7948char maillock ();
7949int
7950main ()
7951{
7952maillock ();
7953 ;
7954 return 0;
7955}
7956_ACEOF
7957rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 7958if { (eval echo "$as_me:7958: \"$ac_link\"") >&5
503d2be0
AS
7959 (eval $ac_link) 2>&5
7960 ac_status=$?
b1b84649 7961 echo "$as_me:7961: \$? = $ac_status" >&5
503d2be0
AS
7962 (exit $ac_status); } &&
7963 { ac_try='test -s conftest$ac_exeext'
b1b84649 7964 { (eval echo "$as_me:7964: \"$ac_try\"") >&5
503d2be0
AS
7965 (eval $ac_try) 2>&5
7966 ac_status=$?
b1b84649 7967 echo "$as_me:7967: \$? = $ac_status" >&5
503d2be0
AS
7968 (exit $ac_status); }; }; then
7969 ac_cv_lib_mail_maillock=yes
7970else
7971 echo "$as_me: failed program was:" >&5
7972cat conftest.$ac_ext >&5
7973ac_cv_lib_mail_maillock=no
7974fi
7975rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7976LIBS=$ac_check_lib_save_LIBS
7977fi
b1b84649 7978echo "$as_me:7978: result: $ac_cv_lib_mail_maillock" >&5
503d2be0
AS
7979echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6
7980if test $ac_cv_lib_mail_maillock = yes; then
7981 cat >>confdefs.h <<EOF
7982#define HAVE_LIBMAIL 1
ba4481b5
DL
7983EOF
7984
7985 LIBS="-lmail $LIBS"
7986
ba4481b5
DL
7987fi
7988
b1b84649 7989echo "$as_me:7989: checking for maillock in -llockfile" >&5
503d2be0
AS
7990echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6
7991if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
7992 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7993else
503d2be0 7994 ac_check_lib_save_LIBS=$LIBS
ba4481b5 7995LIBS="-llockfile $LIBS"
503d2be0 7996cat >conftest.$ac_ext <<_ACEOF
b1b84649 7997#line 7997 "configure"
ba4481b5 7998#include "confdefs.h"
503d2be0 7999
ba4481b5 8000/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8001#ifdef __cplusplus
8002extern "C"
8003#endif
ba4481b5 8004/* We use char because int might match the return type of a gcc2
503d2be0
AS
8005 builtin and then its argument prototype would still apply. */
8006char maillock ();
8007int
8008main ()
8009{
8010maillock ();
8011 ;
8012 return 0;
8013}
8014_ACEOF
8015rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 8016if { (eval echo "$as_me:8016: \"$ac_link\"") >&5
503d2be0
AS
8017 (eval $ac_link) 2>&5
8018 ac_status=$?
b1b84649 8019 echo "$as_me:8019: \$? = $ac_status" >&5
503d2be0
AS
8020 (exit $ac_status); } &&
8021 { ac_try='test -s conftest$ac_exeext'
b1b84649 8022 { (eval echo "$as_me:8022: \"$ac_try\"") >&5
503d2be0
AS
8023 (eval $ac_try) 2>&5
8024 ac_status=$?
b1b84649 8025 echo "$as_me:8025: \$? = $ac_status" >&5
503d2be0
AS
8026 (exit $ac_status); }; }; then
8027 ac_cv_lib_lockfile_maillock=yes
8028else
8029 echo "$as_me: failed program was:" >&5
8030cat conftest.$ac_ext >&5
8031ac_cv_lib_lockfile_maillock=no
8032fi
8033rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8034LIBS=$ac_check_lib_save_LIBS
8035fi
b1b84649 8036echo "$as_me:8036: result: $ac_cv_lib_lockfile_maillock" >&5
503d2be0
AS
8037echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6
8038if test $ac_cv_lib_lockfile_maillock = yes; then
8039 cat >>confdefs.h <<EOF
8040#define HAVE_LIBLOCKFILE 1
ba4481b5
DL
8041EOF
8042
8043 LIBS="-llockfile $LIBS"
8044
ba4481b5
DL
8045fi
8046
8047# If we have the shared liblockfile, assume we must use it for mail
8048# locking (e.g. Debian). If we couldn't link against liblockfile
8049# (no liblockfile.a installed), ensure that we don't need to.
8050if test "$ac_cv_lib_lockfile_maillock" = no; then
8051 # Extract the first word of "liblockfile.so", so it can be a program name with args.
8052set dummy liblockfile.so; ac_word=$2
b1b84649 8053echo "$as_me:8053: checking for $ac_word" >&5
503d2be0
AS
8054echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8055if test "${ac_cv_prog_liblockfile+set}" = set; then
8056 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
8057else
8058 if test -n "$liblockfile"; then
8059 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
8060else
503d2be0
AS
8061 ac_save_IFS=$IFS; IFS=$ac_path_separator
8062ac_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
8063for ac_dir in $ac_dummy; do
8064 IFS=$ac_save_IFS
8065 test -z "$ac_dir" && ac_dir=.
8066 $as_executable_p "$ac_dir/$ac_word" || continue
8067ac_cv_prog_liblockfile="yes"
b1b84649 8068echo "$as_me:8068: found $ac_dir/$ac_word" >&5
503d2be0
AS
8069break
8070done
8071
ba4481b5
DL
8072 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
8073fi
8074fi
503d2be0 8075liblockfile=$ac_cv_prog_liblockfile
ba4481b5 8076if test -n "$liblockfile"; then
b1b84649 8077 echo "$as_me:8077: result: $liblockfile" >&5
503d2be0 8078echo "${ECHO_T}$liblockfile" >&6
ba4481b5 8079else
b1b84649 8080 echo "$as_me:8080: result: no" >&5
503d2be0 8081echo "${ECHO_T}no" >&6
ba4481b5
DL
8082fi
8083
8084 if test $ac_cv_prog_liblockfile = yes; then
b1b84649 8085 { { echo "$as_me:8085: error: Shared liblockfile found but can't link against it.
503d2be0
AS
8086This probably means that movemail could lose mail.
8087There may be a \`development' package to install containing liblockfile." >&5
8088echo "$as_me: error: Shared liblockfile found but can't link against it.
ba4481b5 8089This probably means that movemail could lose mail.
503d2be0
AS
8090There may be a \`development' package to install containing liblockfile." >&2;}
8091 { (exit 1); exit 1; }; }
8092 else cat >>confdefs.h <<\EOF
ba4481b5
DL
8093#define LIBMAIL -llockfile
8094EOF
8095
8096 fi
8097 else :
8098fi
503d2be0 8099
ba4481b5
DL
8100for ac_func in touchlock
8101do
503d2be0 8102as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b1b84649 8103echo "$as_me:8103: checking for $ac_func" >&5
503d2be0
AS
8104echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8105if eval "test \"\${$as_ac_var+set}\" = set"; then
8106 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8107else
503d2be0 8108 cat >conftest.$ac_ext <<_ACEOF
b1b84649 8109#line 8109 "configure"
ba4481b5
DL
8110#include "confdefs.h"
8111/* System header to define __stub macros and hopefully few prototypes,
503d2be0 8112 which can conflict with char $ac_func (); below. */
ba4481b5
DL
8113#include <assert.h>
8114/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8115#ifdef __cplusplus
8116extern "C"
8117#endif
ba4481b5 8118/* We use char because int might match the return type of a gcc2
503d2be0
AS
8119 builtin and then its argument prototype would still apply. */
8120char $ac_func ();
8121char (*f) ();
ba4481b5 8122
503d2be0
AS
8123int
8124main ()
8125{
ba4481b5
DL
8126/* The GNU C library defines this for functions which it implements
8127 to always fail with ENOSYS. Some functions are actually named
8128 something starting with __ and the normal name is an alias. */
8129#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8130choke me
8131#else
503d2be0 8132f = $ac_func;
ba4481b5
DL
8133#endif
8134
503d2be0
AS
8135 ;
8136 return 0;
8137}
8138_ACEOF
8139rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 8140if { (eval echo "$as_me:8140: \"$ac_link\"") >&5
503d2be0
AS
8141 (eval $ac_link) 2>&5
8142 ac_status=$?
b1b84649 8143 echo "$as_me:8143: \$? = $ac_status" >&5
503d2be0
AS
8144 (exit $ac_status); } &&
8145 { ac_try='test -s conftest$ac_exeext'
b1b84649 8146 { (eval echo "$as_me:8146: \"$ac_try\"") >&5
503d2be0
AS
8147 (eval $ac_try) 2>&5
8148 ac_status=$?
b1b84649 8149 echo "$as_me:8149: \$? = $ac_status" >&5
503d2be0
AS
8150 (exit $ac_status); }; }; then
8151 eval "$as_ac_var=yes"
8152else
8153 echo "$as_me: failed program was:" >&5
8154cat conftest.$ac_ext >&5
8155eval "$as_ac_var=no"
8156fi
8157rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8158fi
b1b84649 8159echo "$as_me:8159: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
8160echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8161if test `eval echo '${'$as_ac_var'}'` = yes; then
8162 cat >>confdefs.h <<EOF
8163#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
ba4481b5 8164EOF
ba4481b5 8165
ba4481b5
DL
8166fi
8167done
8168
503d2be0 8169for ac_header in maillock.h
ba4481b5 8170do
503d2be0 8171as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b1b84649 8172echo "$as_me:8172: checking for $ac_header" >&5
503d2be0
AS
8173echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8174if eval "test \"\${$as_ac_Header+set}\" = set"; then
8175 echo $ECHO_N "(cached) $ECHO_C" >&6
8176else
8177 cat >conftest.$ac_ext <<_ACEOF
b1b84649 8178#line 8178 "configure"
503d2be0
AS
8179#include "confdefs.h"
8180#include <$ac_header>
8181_ACEOF
b1b84649 8182if { (eval echo "$as_me:8182: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
8183 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8184 ac_status=$?
8185 egrep -v '^ *\+' conftest.er1 >conftest.err
8186 rm -f conftest.er1
8187 cat conftest.err >&5
b1b84649 8188 echo "$as_me:8188: \$? = $ac_status" >&5
503d2be0
AS
8189 (exit $ac_status); } >/dev/null; then
8190 if test -s conftest.err; then
8191 ac_cpp_err=$ac_c_preproc_warn_flag
8192 else
8193 ac_cpp_err=
8194 fi
8195else
8196 ac_cpp_err=yes
8197fi
8198if test -z "$ac_cpp_err"; then
8199 eval "$as_ac_Header=yes"
8200else
8201 echo "$as_me: failed program was:" >&5
ba4481b5 8202 cat conftest.$ac_ext >&5
503d2be0 8203 eval "$as_ac_Header=no"
ba4481b5 8204fi
503d2be0 8205rm -f conftest.err conftest.$ac_ext
ba4481b5 8206fi
b1b84649 8207echo "$as_me:8207: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
8208echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8209if test `eval echo '${'$as_ac_Header'}'` = yes; then
8210 cat >>confdefs.h <<EOF
8211#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba4481b5 8212EOF
503d2be0 8213
ba4481b5
DL
8214fi
8215done
8216
48d4b120 8217for ac_func in gethostname getdomainname dup2 \
ba4481b5
DL
8218rename closedir mkdir rmdir sysinfo \
8219random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
8220strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
a3f08d9e 8221utimes setrlimit setpgid getcwd getwd shutdown strftime getaddrinfo \
03391420
DL
8222__fpending mblen mbrlen strsignal setitimer ualarm index rindex \
8223gai_strerror mkstemp
ba4481b5 8224do
503d2be0 8225as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b1b84649 8226echo "$as_me:8226: checking for $ac_func" >&5
503d2be0
AS
8227echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8228if eval "test \"\${$as_ac_var+set}\" = set"; then
8229 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8230else
503d2be0 8231 cat >conftest.$ac_ext <<_ACEOF
b1b84649 8232#line 8232 "configure"
ba4481b5
DL
8233#include "confdefs.h"
8234/* System header to define __stub macros and hopefully few prototypes,
503d2be0 8235 which can conflict with char $ac_func (); below. */
ba4481b5
DL
8236#include <assert.h>
8237/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8238#ifdef __cplusplus
8239extern "C"
8240#endif
ba4481b5 8241/* We use char because int might match the return type of a gcc2
503d2be0
AS
8242 builtin and then its argument prototype would still apply. */
8243char $ac_func ();
8244char (*f) ();
ba4481b5 8245
503d2be0
AS
8246int
8247main ()
8248{
ba4481b5
DL
8249/* The GNU C library defines this for functions which it implements
8250 to always fail with ENOSYS. Some functions are actually named
8251 something starting with __ and the normal name is an alias. */
8252#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8253choke me
8254#else
503d2be0 8255f = $ac_func;
ba4481b5
DL
8256#endif
8257
503d2be0
AS
8258 ;
8259 return 0;
8260}
8261_ACEOF
8262rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 8263if { (eval echo "$as_me:8263: \"$ac_link\"") >&5
503d2be0
AS
8264 (eval $ac_link) 2>&5
8265 ac_status=$?
b1b84649 8266 echo "$as_me:8266: \$? = $ac_status" >&5
503d2be0
AS
8267 (exit $ac_status); } &&
8268 { ac_try='test -s conftest$ac_exeext'
b1b84649 8269 { (eval echo "$as_me:8269: \"$ac_try\"") >&5
503d2be0
AS
8270 (eval $ac_try) 2>&5
8271 ac_status=$?
b1b84649 8272 echo "$as_me:8272: \$? = $ac_status" >&5
503d2be0
AS
8273 (exit $ac_status); }; }; then
8274 eval "$as_ac_var=yes"
8275else
8276 echo "$as_me: failed program was:" >&5
8277cat conftest.$ac_ext >&5
8278eval "$as_ac_var=no"
8279fi
8280rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8281fi
b1b84649 8282echo "$as_me:8282: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
8283echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8284if test `eval echo '${'$as_ac_var'}'` = yes; then
8285 cat >>confdefs.h <<EOF
8286#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
ba4481b5 8287EOF
ba4481b5 8288
ba4481b5
DL
8289fi
8290done
8291
503d2be0 8292for ac_header in sys/time.h unistd.h
b5de8dc0 8293do
503d2be0 8294as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b1b84649 8295echo "$as_me:8295: checking for $ac_header" >&5
503d2be0
AS
8296echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8297if eval "test \"\${$as_ac_Header+set}\" = set"; then
8298 echo $ECHO_N "(cached) $ECHO_C" >&6
8299else
8300 cat >conftest.$ac_ext <<_ACEOF
b1b84649 8301#line 8301 "configure"
503d2be0
AS
8302#include "confdefs.h"
8303#include <$ac_header>
8304_ACEOF
b1b84649 8305if { (eval echo "$as_me:8305: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
8306 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8307 ac_status=$?
8308 egrep -v '^ *\+' conftest.er1 >conftest.err
8309 rm -f conftest.er1
8310 cat conftest.err >&5
b1b84649 8311 echo "$as_me:8311: \$? = $ac_status" >&5
503d2be0
AS
8312 (exit $ac_status); } >/dev/null; then
8313 if test -s conftest.err; then
8314 ac_cpp_err=$ac_c_preproc_warn_flag
8315 else
8316 ac_cpp_err=
8317 fi
8318else
8319 ac_cpp_err=yes
8320fi
8321if test -z "$ac_cpp_err"; then
8322 eval "$as_ac_Header=yes"
8323else
8324 echo "$as_me: failed program was:" >&5
b5de8dc0 8325 cat conftest.$ac_ext >&5
503d2be0 8326 eval "$as_ac_Header=no"
b5de8dc0 8327fi
503d2be0 8328rm -f conftest.err conftest.$ac_ext
b5de8dc0 8329fi
b1b84649 8330echo "$as_me:8330: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
8331echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8332if test `eval echo '${'$as_ac_Header'}'` = yes; then
8333 cat >>confdefs.h <<EOF
8334#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
b5de8dc0 8335EOF
503d2be0 8336
b5de8dc0
DL
8337fi
8338done
8339
8340for ac_func in alarm
8341do
503d2be0 8342as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b1b84649 8343echo "$as_me:8343: checking for $ac_func" >&5
503d2be0
AS
8344echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8345if eval "test \"\${$as_ac_var+set}\" = set"; then
8346 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 8347else
503d2be0 8348 cat >conftest.$ac_ext <<_ACEOF
b1b84649 8349#line 8349 "configure"
b5de8dc0
DL
8350#include "confdefs.h"
8351/* System header to define __stub macros and hopefully few prototypes,
503d2be0 8352 which can conflict with char $ac_func (); below. */
b5de8dc0
DL
8353#include <assert.h>
8354/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8355#ifdef __cplusplus
8356extern "C"
8357#endif
b5de8dc0 8358/* We use char because int might match the return type of a gcc2
503d2be0
AS
8359 builtin and then its argument prototype would still apply. */
8360char $ac_func ();
8361char (*f) ();
b5de8dc0 8362
503d2be0
AS
8363int
8364main ()
8365{
b5de8dc0
DL
8366/* The GNU C library defines this for functions which it implements
8367 to always fail with ENOSYS. Some functions are actually named
8368 something starting with __ and the normal name is an alias. */
8369#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8370choke me
8371#else
503d2be0 8372f = $ac_func;
b5de8dc0
DL
8373#endif
8374
503d2be0
AS
8375 ;
8376 return 0;
8377}
8378_ACEOF
8379rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 8380if { (eval echo "$as_me:8380: \"$ac_link\"") >&5
503d2be0
AS
8381 (eval $ac_link) 2>&5
8382 ac_status=$?
b1b84649 8383 echo "$as_me:8383: \$? = $ac_status" >&5
503d2be0
AS
8384 (exit $ac_status); } &&
8385 { ac_try='test -s conftest$ac_exeext'
b1b84649 8386 { (eval echo "$as_me:8386: \"$ac_try\"") >&5
503d2be0
AS
8387 (eval $ac_try) 2>&5
8388 ac_status=$?
b1b84649 8389 echo "$as_me:8389: \$? = $ac_status" >&5
503d2be0
AS
8390 (exit $ac_status); }; }; then
8391 eval "$as_ac_var=yes"
8392else
8393 echo "$as_me: failed program was:" >&5
8394cat conftest.$ac_ext >&5
8395eval "$as_ac_var=no"
8396fi
8397rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8398fi
b1b84649 8399echo "$as_me:8399: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
8400echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8401if test `eval echo '${'$as_ac_var'}'` = yes; then
8402 cat >>confdefs.h <<EOF
8403#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
b5de8dc0 8404EOF
b5de8dc0 8405
b5de8dc0
DL
8406fi
8407done
8408
b1b84649 8409echo "$as_me:8409: checking for working mktime" >&5
503d2be0
AS
8410echo $ECHO_N "checking for working mktime... $ECHO_C" >&6
8411if test "${ac_cv_func_working_mktime+set}" = set; then
8412 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0
DL
8413else
8414 if test "$cross_compiling" = yes; then
8415 ac_cv_func_working_mktime=no
8416else
503d2be0 8417 cat >conftest.$ac_ext <<_ACEOF
b1b84649 8418#line 8418 "configure"
b5de8dc0 8419#include "confdefs.h"
503d2be0 8420/* Test program from Paul Eggert and Tony Leneis. */
b5de8dc0
DL
8421#if TIME_WITH_SYS_TIME
8422# include <sys/time.h>
8423# include <time.h>
8424#else
8425# if HAVE_SYS_TIME_H
8426# include <sys/time.h>
8427# else
8428# include <time.h>
8429# endif
8430#endif
8431
8432#if HAVE_UNISTD_H
8433# include <unistd.h>
8434#endif
8435
8436#if !HAVE_ALARM
8437# define alarm(X) /* empty */
8438#endif
8439
8440/* Work around redefinition to rpl_putenv by other config tests. */
8441#undef putenv
8442
8443static time_t time_t_max;
8444
8445/* Values we'll use to set the TZ environment variable. */
8446static const char *const tz_strings[] = {
8447 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
8448 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
8449};
8450#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
8451
8452/* Fail if mktime fails to convert a date in the spring-forward gap.
8453 Based on a problem report from Andreas Jaeger. */
8454static void
8455spring_forward_gap ()
8456{
503d2be0 8457 /* glibc (up to about 1998-10-07) failed this test. */
b5de8dc0
DL
8458 struct tm tm;
8459
8460 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
8461 instead of "TZ=America/Vancouver" in order to detect the bug even
8462 on systems that don't support the Olson extension, or don't have the
8463 full zoneinfo tables installed. */
8464 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
8465
8466 tm.tm_year = 98;
8467 tm.tm_mon = 3;
8468 tm.tm_mday = 5;
8469 tm.tm_hour = 2;
8470 tm.tm_min = 0;
8471 tm.tm_sec = 0;
8472 tm.tm_isdst = -1;
8473 if (mktime (&tm) == (time_t)-1)
8474 exit (1);
8475}
8476
8477static void
8478mktime_test (now)
8479 time_t now;
8480{
8481 struct tm *lt;
8482 if ((lt = localtime (&now)) && mktime (lt) != now)
8483 exit (1);
8484 now = time_t_max - now;
8485 if ((lt = localtime (&now)) && mktime (lt) != now)
8486 exit (1);
8487}
8488
8489static void
8490irix_6_4_bug ()
8491{
8492 /* Based on code from Ariel Faigon. */
8493 struct tm tm;
8494 tm.tm_year = 96;
8495 tm.tm_mon = 3;
8496 tm.tm_mday = 0;
8497 tm.tm_hour = 0;
8498 tm.tm_min = 0;
8499 tm.tm_sec = 0;
8500 tm.tm_isdst = -1;
8501 mktime (&tm);
8502 if (tm.tm_mon != 2 || tm.tm_mday != 31)
8503 exit (1);
8504}
8505
8506static void
8507bigtime_test (j)
8508 int j;
8509{
8510 struct tm tm;
8511 time_t now;
8512 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
8513 now = mktime (&tm);
8514 if (now != (time_t) -1)
8515 {
8516 struct tm *lt = localtime (&now);
8517 if (! (lt
8518 && lt->tm_year == tm.tm_year
8519 && lt->tm_mon == tm.tm_mon
8520 && lt->tm_mday == tm.tm_mday
8521 && lt->tm_hour == tm.tm_hour
8522 && lt->tm_min == tm.tm_min
8523 && lt->tm_sec == tm.tm_sec
8524 && lt->tm_yday == tm.tm_yday
8525 && lt->tm_wday == tm.tm_wday
8526 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
8527 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
8528 exit (1);
8529 }
8530}
8531
8532int
8533main ()
8534{
8535 time_t t, delta;
8536 int i, j;
8537
8538 /* This test makes some buggy mktime implementations loop.
8539 Give up after 60 seconds; a mktime slower than that
8540 isn't worth using anyway. */
8541 alarm (60);
8542
8543 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
8544 continue;
8545 time_t_max--;
8546 delta = time_t_max / 997; /* a suitable prime number */
8547 for (i = 0; i < N_STRINGS; i++)
8548 {
8549 if (tz_strings[i])
8550 putenv (tz_strings[i]);
8551
8552 for (t = 0; t <= time_t_max - delta; t += delta)
8553 mktime_test (t);
8554 mktime_test ((time_t) 60 * 60);
8555 mktime_test ((time_t) 60 * 60 * 24);
8556
8557 for (j = 1; 0 < j; j *= 2)
8558 bigtime_test (j);
8559 bigtime_test (j - 1);
8560 }
8561 irix_6_4_bug ();
8562 spring_forward_gap ();
8563 exit (0);
8564}
503d2be0
AS
8565_ACEOF
8566rm -f conftest$ac_exeext
b1b84649 8567if { (eval echo "$as_me:8567: \"$ac_link\"") >&5
503d2be0
AS
8568 (eval $ac_link) 2>&5
8569 ac_status=$?
b1b84649 8570 echo "$as_me:8570: \$? = $ac_status" >&5
503d2be0 8571 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b1b84649 8572 { (eval echo "$as_me:8572: \"$ac_try\"") >&5
503d2be0
AS
8573 (eval $ac_try) 2>&5
8574 ac_status=$?
b1b84649 8575 echo "$as_me:8575: \$? = $ac_status" >&5
503d2be0 8576 (exit $ac_status); }; }; then
b5de8dc0
DL
8577 ac_cv_func_working_mktime=yes
8578else
503d2be0
AS
8579 echo "$as_me: program exited with status $ac_status" >&5
8580echo "$as_me: failed program was:" >&5
8581cat conftest.$ac_ext >&5
8582ac_cv_func_working_mktime=no
b5de8dc0 8583fi
503d2be0 8584rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
b5de8dc0 8585fi
b5de8dc0 8586fi
b1b84649 8587echo "$as_me:8587: result: $ac_cv_func_working_mktime" >&5
503d2be0 8588echo "${ECHO_T}$ac_cv_func_working_mktime" >&6
b5de8dc0 8589if test $ac_cv_func_working_mktime = no; then
503d2be0 8590 LIBOBJS="$LIBOBJS mktime.$ac_objext"
b5de8dc0
DL
8591fi
8592
8593if test "$ac_cv_func_working_mktime" = no; then
503d2be0 8594 cat >>confdefs.h <<\EOF
b5de8dc0
DL
8595#define BROKEN_MKTIME 1
8596EOF
8597
8598fi
8599
4c343001
DL
8600ac_have_func=no # yes means we've found a way to get the load average.
8601
503d2be0
AS
8602ac_save_LIBS=$LIBS
8603
8604# Check for getloadavg, but be sure not to touch the cache variable.
b1b84649 8605(echo "$as_me:8605: checking for getloadavg" >&5
503d2be0
AS
8606echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6
8607if test "${ac_cv_func_getloadavg+set}" = set; then
8608 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 8609else
503d2be0 8610 cat >conftest.$ac_ext <<_ACEOF
b1b84649 8611#line 8611 "configure"
4c343001 8612#include "confdefs.h"
503d2be0
AS
8613/* System header to define __stub macros and hopefully few prototypes,
8614 which can conflict with char getloadavg (); below. */
8615#include <assert.h>
4c343001 8616/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8617#ifdef __cplusplus
8618extern "C"
8619#endif
4c343001 8620/* We use char because int might match the return type of a gcc2
503d2be0
AS
8621 builtin and then its argument prototype would still apply. */
8622char getloadavg ();
8623char (*f) ();
4c343001 8624
503d2be0
AS
8625int
8626main ()
8627{
8628/* The GNU C library defines this for functions which it implements
8629 to always fail with ENOSYS. Some functions are actually named
8630 something starting with __ and the normal name is an alias. */
8631#if defined (__stub_getloadavg) || defined (__stub___getloadavg)
8632choke me
8633#else
8634f = getloadavg;
8635#endif
4c343001 8636
503d2be0
AS
8637 ;
8638 return 0;
8639}
8640_ACEOF
8641rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 8642if { (eval echo "$as_me:8642: \"$ac_link\"") >&5
503d2be0
AS
8643 (eval $ac_link) 2>&5
8644 ac_status=$?
b1b84649 8645 echo "$as_me:8645: \$? = $ac_status" >&5
503d2be0
AS
8646 (exit $ac_status); } &&
8647 { ac_try='test -s conftest$ac_exeext'
b1b84649 8648 { (eval echo "$as_me:8648: \"$ac_try\"") >&5
503d2be0
AS
8649 (eval $ac_try) 2>&5
8650 ac_status=$?
b1b84649 8651 echo "$as_me:8651: \$? = $ac_status" >&5
503d2be0
AS
8652 (exit $ac_status); }; }; then
8653 ac_cv_func_getloadavg=yes
8654else
8655 echo "$as_me: failed program was:" >&5
8656cat conftest.$ac_ext >&5
8657ac_cv_func_getloadavg=no
8658fi
8659rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8660fi
b1b84649 8661echo "$as_me:8661: result: $ac_cv_func_getloadavg" >&5
503d2be0
AS
8662echo "${ECHO_T}$ac_cv_func_getloadavg" >&6
8663if test $ac_cv_func_getloadavg = yes; then
8664 exit 0
4c343001 8665else
503d2be0 8666 exit 1
4c343001 8667fi
503d2be0 8668) && ac_have_func=yes
4c343001 8669
503d2be0
AS
8670# On HPUX9, an unprivileged user can get load averages through this function.
8671
8672for ac_func in pstat_getdynamic
8673do
8674as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b1b84649 8675echo "$as_me:8675: checking for $ac_func" >&5
503d2be0
AS
8676echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8677if eval "test \"\${$as_ac_var+set}\" = set"; then
8678 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 8679else
503d2be0 8680 cat >conftest.$ac_ext <<_ACEOF
b1b84649 8681#line 8681 "configure"
4c343001 8682#include "confdefs.h"
503d2be0
AS
8683/* System header to define __stub macros and hopefully few prototypes,
8684 which can conflict with char $ac_func (); below. */
8685#include <assert.h>
4c343001 8686/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8687#ifdef __cplusplus
8688extern "C"
8689#endif
4c343001 8690/* We use char because int might match the return type of a gcc2
503d2be0
AS
8691 builtin and then its argument prototype would still apply. */
8692char $ac_func ();
8693char (*f) ();
8694
8695int
8696main ()
8697{
8698/* The GNU C library defines this for functions which it implements
8699 to always fail with ENOSYS. Some functions are actually named
8700 something starting with __ and the normal name is an alias. */
8701#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8702choke me
8703#else
8704f = $ac_func;
8705#endif
4c343001 8706
503d2be0
AS
8707 ;
8708 return 0;
8709}
8710_ACEOF
8711rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 8712if { (eval echo "$as_me:8712: \"$ac_link\"") >&5
503d2be0
AS
8713 (eval $ac_link) 2>&5
8714 ac_status=$?
b1b84649 8715 echo "$as_me:8715: \$? = $ac_status" >&5
503d2be0
AS
8716 (exit $ac_status); } &&
8717 { ac_try='test -s conftest$ac_exeext'
b1b84649 8718 { (eval echo "$as_me:8718: \"$ac_try\"") >&5
503d2be0
AS
8719 (eval $ac_try) 2>&5
8720 ac_status=$?
b1b84649 8721 echo "$as_me:8721: \$? = $ac_status" >&5
503d2be0
AS
8722 (exit $ac_status); }; }; then
8723 eval "$as_ac_var=yes"
8724else
8725 echo "$as_me: failed program was:" >&5
8726cat conftest.$ac_ext >&5
8727eval "$as_ac_var=no"
8728fi
8729rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8730fi
b1b84649 8731echo "$as_me:8731: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
8732echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8733if test `eval echo '${'$as_ac_var'}'` = yes; then
8734 cat >>confdefs.h <<EOF
8735#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4c343001 8736EOF
4c343001
DL
8737
8738fi
503d2be0
AS
8739done
8740
8741# Solaris has libkstat which does not require root.
4c343001 8742
b1b84649 8743echo "$as_me:8743: checking for kstat_open in -lkstat" >&5
503d2be0
AS
8744echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
8745if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
8746 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 8747else
503d2be0
AS
8748 ac_check_lib_save_LIBS=$LIBS
8749LIBS="-lkstat $LIBS"
8750cat >conftest.$ac_ext <<_ACEOF
b1b84649 8751#line 8751 "configure"
4c343001 8752#include "confdefs.h"
503d2be0 8753
4c343001 8754/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8755#ifdef __cplusplus
8756extern "C"
8757#endif
4c343001 8758/* We use char because int might match the return type of a gcc2
503d2be0
AS
8759 builtin and then its argument prototype would still apply. */
8760char kstat_open ();
8761int
8762main ()
8763{
8764kstat_open ();
8765 ;
8766 return 0;
8767}
8768_ACEOF
8769rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 8770if { (eval echo "$as_me:8770: \"$ac_link\"") >&5
503d2be0
AS
8771 (eval $ac_link) 2>&5
8772 ac_status=$?
b1b84649 8773 echo "$as_me:8773: \$? = $ac_status" >&5
503d2be0
AS
8774 (exit $ac_status); } &&
8775 { ac_try='test -s conftest$ac_exeext'
b1b84649 8776 { (eval echo "$as_me:8776: \"$ac_try\"") >&5
503d2be0
AS
8777 (eval $ac_try) 2>&5
8778 ac_status=$?
b1b84649 8779 echo "$as_me:8779: \$? = $ac_status" >&5
503d2be0
AS
8780 (exit $ac_status); }; }; then
8781 ac_cv_lib_kstat_kstat_open=yes
4c343001 8782else
503d2be0
AS
8783 echo "$as_me: failed program was:" >&5
8784cat conftest.$ac_ext >&5
8785ac_cv_lib_kstat_kstat_open=no
4c343001 8786fi
503d2be0
AS
8787rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8788LIBS=$ac_check_lib_save_LIBS
4c343001 8789fi
b1b84649 8790echo "$as_me:8790: result: $ac_cv_lib_kstat_kstat_open" >&5
503d2be0
AS
8791echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6
8792if test $ac_cv_lib_kstat_kstat_open = yes; then
8793 cat >>confdefs.h <<EOF
8794#define HAVE_LIBKSTAT 1
8795EOF
8796
8797 LIBS="-lkstat $LIBS"
8798
4c343001
DL
8799fi
8800
503d2be0 8801test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
4c343001 8802
503d2be0
AS
8803# Some systems with -lutil have (and need) -lkvm as well, some do not.
8804# On Solaris, -lkvm requires nlist from -lelf, so check that first
8805# to get the right answer into the cache.
8806# For kstat on solaris, we need libelf to force the definition of SVR4 below.
4c343001 8807if test $ac_have_func = no; then
b1b84649 8808 echo "$as_me:8808: checking for elf_begin in -lelf" >&5
503d2be0
AS
8809echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
8810if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
8811 echo $ECHO_N "(cached) $ECHO_C" >&6
8812else
8813 ac_check_lib_save_LIBS=$LIBS
8814LIBS="-lelf $LIBS"
8815cat >conftest.$ac_ext <<_ACEOF
b1b84649 8816#line 8816 "configure"
4c343001 8817#include "confdefs.h"
503d2be0 8818
4c343001 8819/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8820#ifdef __cplusplus
8821extern "C"
8822#endif
4c343001 8823/* We use char because int might match the return type of a gcc2
503d2be0
AS
8824 builtin and then its argument prototype would still apply. */
8825char elf_begin ();
8826int
8827main ()
8828{
8829elf_begin ();
8830 ;
8831 return 0;
8832}
8833_ACEOF
8834rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 8835if { (eval echo "$as_me:8835: \"$ac_link\"") >&5
503d2be0
AS
8836 (eval $ac_link) 2>&5
8837 ac_status=$?
b1b84649 8838 echo "$as_me:8838: \$? = $ac_status" >&5
503d2be0
AS
8839 (exit $ac_status); } &&
8840 { ac_try='test -s conftest$ac_exeext'
b1b84649 8841 { (eval echo "$as_me:8841: \"$ac_try\"") >&5
503d2be0
AS
8842 (eval $ac_try) 2>&5
8843 ac_status=$?
b1b84649 8844 echo "$as_me:8844: \$? = $ac_status" >&5
503d2be0
AS
8845 (exit $ac_status); }; }; then
8846 ac_cv_lib_elf_elf_begin=yes
8847else
8848 echo "$as_me: failed program was:" >&5
8849cat conftest.$ac_ext >&5
8850ac_cv_lib_elf_elf_begin=no
8851fi
8852rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8853LIBS=$ac_check_lib_save_LIBS
8854fi
b1b84649 8855echo "$as_me:8855: result: $ac_cv_lib_elf_elf_begin" >&5
503d2be0
AS
8856echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
8857if test $ac_cv_lib_elf_elf_begin = yes; then
8858 LIBS="-lelf $LIBS"
4c343001 8859fi
4c343001
DL
8860
8861fi
503d2be0 8862if test $ac_have_func = no; then
b1b84649 8863 echo "$as_me:8863: checking for kvm_open in -lkvm" >&5
503d2be0
AS
8864echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6
8865if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
8866 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 8867else
503d2be0
AS
8868 ac_check_lib_save_LIBS=$LIBS
8869LIBS="-lkvm $LIBS"
8870cat >conftest.$ac_ext <<_ACEOF
b1b84649 8871#line 8871 "configure"
503d2be0 8872#include "confdefs.h"
4c343001 8873
503d2be0
AS
8874/* Override any gcc2 internal prototype to avoid an error. */
8875#ifdef __cplusplus
8876extern "C"
8877#endif
8878/* We use char because int might match the return type of a gcc2
8879 builtin and then its argument prototype would still apply. */
8880char kvm_open ();
8881int
8882main ()
8883{
8884kvm_open ();
8885 ;
8886 return 0;
8887}
8888_ACEOF
8889rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 8890if { (eval echo "$as_me:8890: \"$ac_link\"") >&5
503d2be0
AS
8891 (eval $ac_link) 2>&5
8892 ac_status=$?
b1b84649 8893 echo "$as_me:8893: \$? = $ac_status" >&5
503d2be0
AS
8894 (exit $ac_status); } &&
8895 { ac_try='test -s conftest$ac_exeext'
b1b84649 8896 { (eval echo "$as_me:8896: \"$ac_try\"") >&5
503d2be0
AS
8897 (eval $ac_try) 2>&5
8898 ac_status=$?
b1b84649 8899 echo "$as_me:8899: \$? = $ac_status" >&5
503d2be0
AS
8900 (exit $ac_status); }; }; then
8901 ac_cv_lib_kvm_kvm_open=yes
8902else
8903 echo "$as_me: failed program was:" >&5
8904cat conftest.$ac_ext >&5
8905ac_cv_lib_kvm_kvm_open=no
8906fi
8907rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8908LIBS=$ac_check_lib_save_LIBS
8909fi
b1b84649 8910echo "$as_me:8910: result: $ac_cv_lib_kvm_kvm_open" >&5
503d2be0
AS
8911echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6
8912if test $ac_cv_lib_kvm_kvm_open = yes; then
8913 LIBS="-lkvm $LIBS"
4c343001
DL
8914fi
8915
503d2be0 8916 # Check for the 4.4BSD definition of getloadavg.
b1b84649 8917 echo "$as_me:8917: checking for getloadavg in -lutil" >&5
503d2be0
AS
8918echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6
8919if test "${ac_cv_lib_util_getloadavg+set}" = set; then
8920 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 8921else
503d2be0
AS
8922 ac_check_lib_save_LIBS=$LIBS
8923LIBS="-lutil $LIBS"
8924cat >conftest.$ac_ext <<_ACEOF
b1b84649 8925#line 8925 "configure"
4c343001 8926#include "confdefs.h"
503d2be0 8927
4c343001 8928/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8929#ifdef __cplusplus
8930extern "C"
8931#endif
8932/* We use char because int might match the return type of a gcc2
8933 builtin and then its argument prototype would still apply. */
8934char getloadavg ();
8935int
8936main ()
8937{
8938getloadavg ();
8939 ;
8940 return 0;
8941}
8942_ACEOF
8943rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 8944if { (eval echo "$as_me:8944: \"$ac_link\"") >&5
503d2be0
AS
8945 (eval $ac_link) 2>&5
8946 ac_status=$?
b1b84649 8947 echo "$as_me:8947: \$? = $ac_status" >&5
503d2be0
AS
8948 (exit $ac_status); } &&
8949 { ac_try='test -s conftest$ac_exeext'
b1b84649 8950 { (eval echo "$as_me:8950: \"$ac_try\"") >&5
503d2be0
AS
8951 (eval $ac_try) 2>&5
8952 ac_status=$?
b1b84649 8953 echo "$as_me:8953: \$? = $ac_status" >&5
503d2be0
AS
8954 (exit $ac_status); }; }; then
8955 ac_cv_lib_util_getloadavg=yes
8956else
8957 echo "$as_me: failed program was:" >&5
8958cat conftest.$ac_ext >&5
8959ac_cv_lib_util_getloadavg=no
8960fi
8961rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8962LIBS=$ac_check_lib_save_LIBS
8963fi
b1b84649 8964echo "$as_me:8964: result: $ac_cv_lib_util_getloadavg" >&5
503d2be0
AS
8965echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6
8966if test $ac_cv_lib_util_getloadavg = yes; then
8967 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
8968fi
8969
8970fi
8971
8972if test $ac_have_func = no; then
8973 # There is a commonly available library for RS/6000 AIX.
8974 # Since it is not a standard part of AIX, it might be installed locally.
8975 ac_getloadavg_LIBS=$LIBS
8976 LIBS="-L/usr/local/lib $LIBS"
b1b84649 8977 echo "$as_me:8977: checking for getloadavg in -lgetloadavg" >&5
503d2be0
AS
8978echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6
8979if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
8980 echo $ECHO_N "(cached) $ECHO_C" >&6
8981else
8982 ac_check_lib_save_LIBS=$LIBS
8983LIBS="-lgetloadavg $LIBS"
8984cat >conftest.$ac_ext <<_ACEOF
b1b84649 8985#line 8985 "configure"
503d2be0
AS
8986#include "confdefs.h"
8987
8988/* Override any gcc2 internal prototype to avoid an error. */
8989#ifdef __cplusplus
8990extern "C"
8991#endif
4c343001 8992/* We use char because int might match the return type of a gcc2
503d2be0
AS
8993 builtin and then its argument prototype would still apply. */
8994char getloadavg ();
8995int
8996main ()
8997{
8998getloadavg ();
8999 ;
9000 return 0;
9001}
9002_ACEOF
9003rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 9004if { (eval echo "$as_me:9004: \"$ac_link\"") >&5
503d2be0
AS
9005 (eval $ac_link) 2>&5
9006 ac_status=$?
b1b84649 9007 echo "$as_me:9007: \$? = $ac_status" >&5
503d2be0
AS
9008 (exit $ac_status); } &&
9009 { ac_try='test -s conftest$ac_exeext'
b1b84649 9010 { (eval echo "$as_me:9010: \"$ac_try\"") >&5
503d2be0
AS
9011 (eval $ac_try) 2>&5
9012 ac_status=$?
b1b84649 9013 echo "$as_me:9013: \$? = $ac_status" >&5
503d2be0
AS
9014 (exit $ac_status); }; }; then
9015 ac_cv_lib_getloadavg_getloadavg=yes
9016else
9017 echo "$as_me: failed program was:" >&5
9018cat conftest.$ac_ext >&5
9019ac_cv_lib_getloadavg_getloadavg=no
9020fi
9021rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9022LIBS=$ac_check_lib_save_LIBS
9023fi
b1b84649 9024echo "$as_me:9024: result: $ac_cv_lib_getloadavg_getloadavg" >&5
503d2be0
AS
9025echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6
9026if test $ac_cv_lib_getloadavg_getloadavg = yes; then
9027 LIBS="-lgetloadavg $LIBS"
9028else
9029 LIBS=$ac_getloadavg_LIBS
9030fi
9031
9032fi
9033
9034# Make sure it is really in the library, if we think we found it,
9035# otherwise set up the replacement function.
4c343001 9036
503d2be0
AS
9037for ac_func in getloadavg
9038do
9039as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b1b84649 9040echo "$as_me:9040: checking for $ac_func" >&5
503d2be0
AS
9041echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9042if eval "test \"\${$as_ac_var+set}\" = set"; then
9043 echo $ECHO_N "(cached) $ECHO_C" >&6
9044else
9045 cat >conftest.$ac_ext <<_ACEOF
b1b84649 9046#line 9046 "configure"
503d2be0
AS
9047#include "confdefs.h"
9048/* System header to define __stub macros and hopefully few prototypes,
9049 which can conflict with char $ac_func (); below. */
9050#include <assert.h>
9051/* Override any gcc2 internal prototype to avoid an error. */
9052#ifdef __cplusplus
9053extern "C"
9054#endif
9055/* We use char because int might match the return type of a gcc2
9056 builtin and then its argument prototype would still apply. */
9057char $ac_func ();
9058char (*f) ();
4c343001 9059
503d2be0
AS
9060int
9061main ()
9062{
4c343001
DL
9063/* The GNU C library defines this for functions which it implements
9064 to always fail with ENOSYS. Some functions are actually named
9065 something starting with __ and the normal name is an alias. */
9066#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9067choke me
9068#else
503d2be0 9069f = $ac_func;
4c343001
DL
9070#endif
9071
503d2be0
AS
9072 ;
9073 return 0;
9074}
9075_ACEOF
9076rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 9077if { (eval echo "$as_me:9077: \"$ac_link\"") >&5
503d2be0
AS
9078 (eval $ac_link) 2>&5
9079 ac_status=$?
b1b84649 9080 echo "$as_me:9080: \$? = $ac_status" >&5
503d2be0
AS
9081 (exit $ac_status); } &&
9082 { ac_try='test -s conftest$ac_exeext'
b1b84649 9083 { (eval echo "$as_me:9083: \"$ac_try\"") >&5
503d2be0
AS
9084 (eval $ac_try) 2>&5
9085 ac_status=$?
b1b84649 9086 echo "$as_me:9086: \$? = $ac_status" >&5
503d2be0
AS
9087 (exit $ac_status); }; }; then
9088 eval "$as_ac_var=yes"
4c343001 9089else
503d2be0
AS
9090 echo "$as_me: failed program was:" >&5
9091cat conftest.$ac_ext >&5
9092eval "$as_ac_var=no"
4c343001 9093fi
503d2be0 9094rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4c343001 9095fi
b1b84649 9096echo "$as_me:9096: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
9097echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9098if test `eval echo '${'$as_ac_var'}'` = yes; then
9099 cat >>confdefs.h <<EOF
9100#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4c343001 9101EOF
4c343001 9102
503d2be0
AS
9103else
9104 LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
4c343001 9105
503d2be0
AS
9106cat >>confdefs.h <<\EOF
9107#define C_GETLOADAVG 1
4c343001
DL
9108EOF
9109
503d2be0
AS
9110# Figure out what our getloadavg.c needs.
9111ac_have_func=no
b1b84649 9112echo "$as_me:9112: checking for sys/dg_sys_info.h" >&5
503d2be0
AS
9113echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
9114if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
9115 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9116else
503d2be0 9117 cat >conftest.$ac_ext <<_ACEOF
b1b84649 9118#line 9118 "configure"
4c343001
DL
9119#include "confdefs.h"
9120#include <sys/dg_sys_info.h>
503d2be0 9121_ACEOF
b1b84649 9122if { (eval echo "$as_me:9122: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9123 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9124 ac_status=$?
9125 egrep -v '^ *\+' conftest.er1 >conftest.err
9126 rm -f conftest.er1
9127 cat conftest.err >&5
b1b84649 9128 echo "$as_me:9128: \$? = $ac_status" >&5
503d2be0
AS
9129 (exit $ac_status); } >/dev/null; then
9130 if test -s conftest.err; then
9131 ac_cpp_err=$ac_c_preproc_warn_flag
9132 else
9133 ac_cpp_err=
9134 fi
9135else
9136 ac_cpp_err=yes
9137fi
9138if test -z "$ac_cpp_err"; then
9139 ac_cv_header_sys_dg_sys_info_h=yes
4c343001 9140else
503d2be0 9141 echo "$as_me: failed program was:" >&5
4c343001 9142 cat conftest.$ac_ext >&5
503d2be0 9143 ac_cv_header_sys_dg_sys_info_h=no
4c343001 9144fi
503d2be0 9145rm -f conftest.err conftest.$ac_ext
4c343001 9146fi
b1b84649 9147echo "$as_me:9147: result: $ac_cv_header_sys_dg_sys_info_h" >&5
503d2be0
AS
9148echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
9149if test $ac_cv_header_sys_dg_sys_info_h = yes; then
9150 ac_have_func=yes
9151
9152cat >>confdefs.h <<\EOF
4c343001
DL
9153#define DGUX 1
9154EOF
9155
b1b84649 9156echo "$as_me:9156: checking for dg_sys_info in -ldgc" >&5
503d2be0
AS
9157echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6
9158if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
9159 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9160else
503d2be0 9161 ac_check_lib_save_LIBS=$LIBS
4c343001 9162LIBS="-ldgc $LIBS"
503d2be0 9163cat >conftest.$ac_ext <<_ACEOF
b1b84649 9164#line 9164 "configure"
4c343001 9165#include "confdefs.h"
503d2be0 9166
4c343001 9167/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9168#ifdef __cplusplus
9169extern "C"
9170#endif
4c343001 9171/* We use char because int might match the return type of a gcc2
503d2be0
AS
9172 builtin and then its argument prototype would still apply. */
9173char dg_sys_info ();
9174int
9175main ()
9176{
9177dg_sys_info ();
9178 ;
9179 return 0;
9180}
9181_ACEOF
9182rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 9183if { (eval echo "$as_me:9183: \"$ac_link\"") >&5
503d2be0
AS
9184 (eval $ac_link) 2>&5
9185 ac_status=$?
b1b84649 9186 echo "$as_me:9186: \$? = $ac_status" >&5
503d2be0
AS
9187 (exit $ac_status); } &&
9188 { ac_try='test -s conftest$ac_exeext'
b1b84649 9189 { (eval echo "$as_me:9189: \"$ac_try\"") >&5
503d2be0
AS
9190 (eval $ac_try) 2>&5
9191 ac_status=$?
b1b84649 9192 echo "$as_me:9192: \$? = $ac_status" >&5
503d2be0
AS
9193 (exit $ac_status); }; }; then
9194 ac_cv_lib_dgc_dg_sys_info=yes
9195else
9196 echo "$as_me: failed program was:" >&5
9197cat conftest.$ac_ext >&5
9198ac_cv_lib_dgc_dg_sys_info=no
9199fi
9200rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9201LIBS=$ac_check_lib_save_LIBS
9202fi
b1b84649 9203echo "$as_me:9203: result: $ac_cv_lib_dgc_dg_sys_info" >&5
503d2be0
AS
9204echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6
9205if test $ac_cv_lib_dgc_dg_sys_info = yes; then
9206 cat >>confdefs.h <<EOF
9207#define HAVE_LIBDGC 1
4c343001 9208EOF
503d2be0
AS
9209
9210 LIBS="-ldgc $LIBS"
4c343001
DL
9211
9212fi
4c343001 9213
503d2be0 9214fi
4c343001 9215
b1b84649 9216echo "$as_me:9216: checking for locale.h" >&5
503d2be0
AS
9217echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
9218if test "${ac_cv_header_locale_h+set}" = set; then
9219 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9220else
503d2be0 9221 cat >conftest.$ac_ext <<_ACEOF
b1b84649 9222#line 9222 "configure"
503d2be0
AS
9223#include "confdefs.h"
9224#include <locale.h>
9225_ACEOF
b1b84649 9226if { (eval echo "$as_me:9226: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9227 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9228 ac_status=$?
9229 egrep -v '^ *\+' conftest.er1 >conftest.err
9230 rm -f conftest.er1
9231 cat conftest.err >&5
b1b84649 9232 echo "$as_me:9232: \$? = $ac_status" >&5
503d2be0
AS
9233 (exit $ac_status); } >/dev/null; then
9234 if test -s conftest.err; then
9235 ac_cpp_err=$ac_c_preproc_warn_flag
9236 else
9237 ac_cpp_err=
9238 fi
9239else
9240 ac_cpp_err=yes
4c343001 9241fi
503d2be0
AS
9242if test -z "$ac_cpp_err"; then
9243 ac_cv_header_locale_h=yes
9244else
9245 echo "$as_me: failed program was:" >&5
9246 cat conftest.$ac_ext >&5
9247 ac_cv_header_locale_h=no
9248fi
9249rm -f conftest.err conftest.$ac_ext
9250fi
b1b84649 9251echo "$as_me:9251: result: $ac_cv_header_locale_h" >&5
503d2be0 9252echo "${ECHO_T}$ac_cv_header_locale_h" >&6
4c343001 9253
503d2be0
AS
9254for ac_func in setlocale
9255do
9256as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b1b84649 9257echo "$as_me:9257: checking for $ac_func" >&5
503d2be0
AS
9258echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9259if eval "test \"\${$as_ac_var+set}\" = set"; then
9260 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9261else
503d2be0 9262 cat >conftest.$ac_ext <<_ACEOF
b1b84649 9263#line 9263 "configure"
503d2be0
AS
9264#include "confdefs.h"
9265/* System header to define __stub macros and hopefully few prototypes,
9266 which can conflict with char $ac_func (); below. */
9267#include <assert.h>
9268/* Override any gcc2 internal prototype to avoid an error. */
9269#ifdef __cplusplus
9270extern "C"
9271#endif
9272/* We use char because int might match the return type of a gcc2
9273 builtin and then its argument prototype would still apply. */
9274char $ac_func ();
9275char (*f) ();
9276
9277int
9278main ()
9279{
9280/* The GNU C library defines this for functions which it implements
9281 to always fail with ENOSYS. Some functions are actually named
9282 something starting with __ and the normal name is an alias. */
9283#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9284choke me
9285#else
9286f = $ac_func;
9287#endif
9288
9289 ;
9290 return 0;
9291}
9292_ACEOF
9293rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 9294if { (eval echo "$as_me:9294: \"$ac_link\"") >&5
503d2be0
AS
9295 (eval $ac_link) 2>&5
9296 ac_status=$?
b1b84649 9297 echo "$as_me:9297: \$? = $ac_status" >&5
503d2be0
AS
9298 (exit $ac_status); } &&
9299 { ac_try='test -s conftest$ac_exeext'
b1b84649 9300 { (eval echo "$as_me:9300: \"$ac_try\"") >&5
503d2be0
AS
9301 (eval $ac_try) 2>&5
9302 ac_status=$?
b1b84649 9303 echo "$as_me:9303: \$? = $ac_status" >&5
503d2be0
AS
9304 (exit $ac_status); }; }; then
9305 eval "$as_ac_var=yes"
9306else
9307 echo "$as_me: failed program was:" >&5
9308cat conftest.$ac_ext >&5
9309eval "$as_ac_var=no"
9310fi
9311rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9312fi
b1b84649 9313echo "$as_me:9313: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
9314echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9315if test `eval echo '${'$as_ac_var'}'` = yes; then
9316 cat >>confdefs.h <<EOF
9317#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9318EOF
9319
4c343001 9320fi
503d2be0 9321done
4c343001 9322
503d2be0
AS
9323# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
9324# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
9325# Irix 4.0.5F has the header but not the library.
9326if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
9327 ac_have_func=yes
4c343001 9328
503d2be0 9329cat >>confdefs.h <<\EOF
4c343001
DL
9330#define SVR4 1
9331EOF
9332
503d2be0 9333fi
4c343001 9334
503d2be0 9335if test $ac_have_func = no; then
b1b84649 9336 echo "$as_me:9336: checking for inq_stats/cpustats.h" >&5
503d2be0
AS
9337echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
9338if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
9339 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9340else
503d2be0 9341 cat >conftest.$ac_ext <<_ACEOF
b1b84649 9342#line 9342 "configure"
4c343001
DL
9343#include "confdefs.h"
9344#include <inq_stats/cpustats.h>
503d2be0 9345_ACEOF
b1b84649 9346if { (eval echo "$as_me:9346: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9347 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9348 ac_status=$?
9349 egrep -v '^ *\+' conftest.er1 >conftest.err
9350 rm -f conftest.er1
9351 cat conftest.err >&5
b1b84649 9352 echo "$as_me:9352: \$? = $ac_status" >&5
503d2be0
AS
9353 (exit $ac_status); } >/dev/null; then
9354 if test -s conftest.err; then
9355 ac_cpp_err=$ac_c_preproc_warn_flag
9356 else
9357 ac_cpp_err=
9358 fi
9359else
9360 ac_cpp_err=yes
9361fi
9362if test -z "$ac_cpp_err"; then
9363 ac_cv_header_inq_stats_cpustats_h=yes
4c343001 9364else
503d2be0 9365 echo "$as_me: failed program was:" >&5
4c343001 9366 cat conftest.$ac_ext >&5
503d2be0 9367 ac_cv_header_inq_stats_cpustats_h=no
4c343001 9368fi
503d2be0 9369rm -f conftest.err conftest.$ac_ext
4c343001 9370fi
b1b84649 9371echo "$as_me:9371: result: $ac_cv_header_inq_stats_cpustats_h" >&5
503d2be0
AS
9372echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
9373if test $ac_cv_header_inq_stats_cpustats_h = yes; then
9374 ac_have_func=yes
9375
9376cat >>confdefs.h <<\EOF
4c343001
DL
9377#define UMAX 1
9378EOF
9379
503d2be0 9380cat >>confdefs.h <<\EOF
4c343001
DL
9381#define UMAX4_3 1
9382EOF
9383
4c343001
DL
9384fi
9385
503d2be0 9386fi
4c343001 9387
503d2be0 9388if test $ac_have_func = no; then
b1b84649 9389 echo "$as_me:9389: checking for sys/cpustats.h" >&5
503d2be0
AS
9390echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
9391if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
9392 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9393else
503d2be0 9394 cat >conftest.$ac_ext <<_ACEOF
b1b84649 9395#line 9395 "configure"
4c343001
DL
9396#include "confdefs.h"
9397#include <sys/cpustats.h>
503d2be0 9398_ACEOF
b1b84649 9399if { (eval echo "$as_me:9399: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9400 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9401 ac_status=$?
9402 egrep -v '^ *\+' conftest.er1 >conftest.err
9403 rm -f conftest.er1
9404 cat conftest.err >&5
b1b84649 9405 echo "$as_me:9405: \$? = $ac_status" >&5
503d2be0
AS
9406 (exit $ac_status); } >/dev/null; then
9407 if test -s conftest.err; then
9408 ac_cpp_err=$ac_c_preproc_warn_flag
9409 else
9410 ac_cpp_err=
9411 fi
4c343001 9412else
503d2be0
AS
9413 ac_cpp_err=yes
9414fi
9415if test -z "$ac_cpp_err"; then
9416 ac_cv_header_sys_cpustats_h=yes
9417else
9418 echo "$as_me: failed program was:" >&5
4c343001 9419 cat conftest.$ac_ext >&5
503d2be0 9420 ac_cv_header_sys_cpustats_h=no
4c343001 9421fi
503d2be0 9422rm -f conftest.err conftest.$ac_ext
4c343001 9423fi
b1b84649 9424echo "$as_me:9424: result: $ac_cv_header_sys_cpustats_h" >&5
503d2be0
AS
9425echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
9426if test $ac_cv_header_sys_cpustats_h = yes; then
9427 ac_have_func=yes; cat >>confdefs.h <<\EOF
4c343001
DL
9428#define UMAX 1
9429EOF
9430
4c343001
DL
9431fi
9432
503d2be0 9433fi
4c343001 9434
503d2be0
AS
9435if test $ac_have_func = no; then
9436
9437for ac_header in mach/mach.h
4c343001 9438do
503d2be0 9439as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b1b84649 9440echo "$as_me:9440: checking for $ac_header" >&5
503d2be0
AS
9441echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9442if eval "test \"\${$as_ac_Header+set}\" = set"; then
9443 echo $ECHO_N "(cached) $ECHO_C" >&6
9444else
9445 cat >conftest.$ac_ext <<_ACEOF
b1b84649 9446#line 9446 "configure"
503d2be0
AS
9447#include "confdefs.h"
9448#include <$ac_header>
9449_ACEOF
b1b84649 9450if { (eval echo "$as_me:9450: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9451 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9452 ac_status=$?
9453 egrep -v '^ *\+' conftest.er1 >conftest.err
9454 rm -f conftest.er1
9455 cat conftest.err >&5
b1b84649 9456 echo "$as_me:9456: \$? = $ac_status" >&5
503d2be0
AS
9457 (exit $ac_status); } >/dev/null; then
9458 if test -s conftest.err; then
9459 ac_cpp_err=$ac_c_preproc_warn_flag
9460 else
9461 ac_cpp_err=
9462 fi
9463else
9464 ac_cpp_err=yes
9465fi
9466if test -z "$ac_cpp_err"; then
9467 eval "$as_ac_Header=yes"
9468else
9469 echo "$as_me: failed program was:" >&5
4c343001 9470 cat conftest.$ac_ext >&5
503d2be0 9471 eval "$as_ac_Header=no"
4c343001 9472fi
503d2be0 9473rm -f conftest.err conftest.$ac_ext
4c343001 9474fi
b1b84649 9475echo "$as_me:9475: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
9476echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9477if test `eval echo '${'$as_ac_Header'}'` = yes; then
9478 cat >>confdefs.h <<EOF
9479#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4c343001 9480EOF
503d2be0 9481
4c343001
DL
9482fi
9483done
9484
503d2be0 9485fi
4c343001 9486
503d2be0
AS
9487for ac_header in nlist.h
9488do
9489as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b1b84649 9490echo "$as_me:9490: checking for $ac_header" >&5
503d2be0
AS
9491echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9492if eval "test \"\${$as_ac_Header+set}\" = set"; then
9493 echo $ECHO_N "(cached) $ECHO_C" >&6
9494else
9495 cat >conftest.$ac_ext <<_ACEOF
b1b84649 9496#line 9496 "configure"
503d2be0
AS
9497#include "confdefs.h"
9498#include <$ac_header>
9499_ACEOF
b1b84649 9500if { (eval echo "$as_me:9500: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9501 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9502 ac_status=$?
9503 egrep -v '^ *\+' conftest.er1 >conftest.err
9504 rm -f conftest.er1
9505 cat conftest.err >&5
b1b84649 9506 echo "$as_me:9506: \$? = $ac_status" >&5
503d2be0
AS
9507 (exit $ac_status); } >/dev/null; then
9508 if test -s conftest.err; then
9509 ac_cpp_err=$ac_c_preproc_warn_flag
9510 else
9511 ac_cpp_err=
9512 fi
4c343001 9513else
503d2be0
AS
9514 ac_cpp_err=yes
9515fi
9516if test -z "$ac_cpp_err"; then
9517 eval "$as_ac_Header=yes"
4c343001 9518else
503d2be0 9519 echo "$as_me: failed program was:" >&5
4c343001 9520 cat conftest.$ac_ext >&5
503d2be0 9521 eval "$as_ac_Header=no"
4c343001 9522fi
503d2be0 9523rm -f conftest.err conftest.$ac_ext
4c343001 9524fi
b1b84649 9525echo "$as_me:9525: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
9526echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9527if test `eval echo '${'$as_ac_Header'}'` = yes; then
9528 cat >>confdefs.h <<EOF
9529#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4c343001 9530EOF
b1b84649 9531 echo "$as_me:9531: checking for struct nlist.n_un.n_name" >&5
503d2be0
AS
9532echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6
9533if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
9534 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9535else
503d2be0 9536 cat >conftest.$ac_ext <<_ACEOF
b1b84649 9537#line 9537 "configure"
4c343001
DL
9538#include "confdefs.h"
9539#include <nlist.h>
4c343001 9540
503d2be0
AS
9541int
9542main ()
9543{
9544static struct nlist ac_aggr;
9545if (ac_aggr.n_un.n_name)
9546return 0;
9547 ;
9548 return 0;
9549}
9550_ACEOF
9551rm -f conftest.$ac_objext
b1b84649 9552if { (eval echo "$as_me:9552: \"$ac_compile\"") >&5
503d2be0
AS
9553 (eval $ac_compile) 2>&5
9554 ac_status=$?
b1b84649 9555 echo "$as_me:9555: \$? = $ac_status" >&5
503d2be0
AS
9556 (exit $ac_status); } &&
9557 { ac_try='test -s conftest.$ac_objext'
b1b84649 9558 { (eval echo "$as_me:9558: \"$ac_try\"") >&5
503d2be0
AS
9559 (eval $ac_try) 2>&5
9560 ac_status=$?
b1b84649 9561 echo "$as_me:9561: \$? = $ac_status" >&5
503d2be0
AS
9562 (exit $ac_status); }; }; then
9563 ac_cv_member_struct_nlist_n_un_n_name=yes
9564else
9565 echo "$as_me: failed program was:" >&5
9566cat conftest.$ac_ext >&5
9567ac_cv_member_struct_nlist_n_un_n_name=no
9568fi
9569rm -f conftest.$ac_objext conftest.$ac_ext
9570fi
b1b84649 9571echo "$as_me:9571: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
503d2be0
AS
9572echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6
9573if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
9574
9575cat >>confdefs.h <<EOF
9576#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
9577EOF
9578
9579cat >>confdefs.h <<\EOF
4c343001
DL
9580#define NLIST_NAME_UNION 1
9581EOF
9582
4c343001 9583fi
503d2be0
AS
9584
9585fi
9586done
9587
9588fi
9589done
4c343001
DL
9590
9591# Some definitions of getloadavg require that the program be installed setgid.
b1b84649 9592echo "$as_me:9592: checking whether getloadavg requires setgid" >&5
503d2be0
AS
9593echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6
9594if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
9595 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9596else
503d2be0 9597 cat >conftest.$ac_ext <<_ACEOF
b1b84649 9598#line 9598 "configure"
4c343001
DL
9599#include "confdefs.h"
9600#include "$srcdir/getloadavg.c"
9601#ifdef LDAV_PRIVILEGED
9602Yowza Am I SETGID yet
9603#endif
503d2be0 9604_ACEOF
4c343001
DL
9605if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9606 egrep "Yowza Am I SETGID yet" >/dev/null 2>&1; then
4c343001
DL
9607 ac_cv_func_getloadavg_setgid=yes
9608else
4c343001
DL
9609 ac_cv_func_getloadavg_setgid=no
9610fi
9611rm -f conftest*
9612
9613fi
b1b84649 9614echo "$as_me:9614: result: $ac_cv_func_getloadavg_setgid" >&5
503d2be0 9615echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6
4c343001 9616if test $ac_cv_func_getloadavg_setgid = yes; then
503d2be0
AS
9617 NEED_SETGID=true
9618
9619cat >>confdefs.h <<\EOF
4c343001
DL
9620#define GETLOADAVG_PRIVILEGED 1
9621EOF
9622
9623else
9624 NEED_SETGID=false
9625fi
9626
9627if test $ac_cv_func_getloadavg_setgid = yes; then
b1b84649 9628 echo "$as_me:9628: checking group of /dev/kmem" >&5
503d2be0
AS
9629echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6
9630if test "${ac_cv_group_kmem+set}" = set; then
9631 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9632else
503d2be0 9633 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
4c343001
DL
9634 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
9635 # If we got an error (system does not support symlinks), try without -L.
9636 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
9637 ac_cv_group_kmem=`echo $ac_ls_output \
9638 | sed -ne 's/[ ][ ]*/ /g;
9639 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
9640 / /s/.* //;p;'`
9641
9642fi
b1b84649 9643echo "$as_me:9643: result: $ac_cv_group_kmem" >&5
503d2be0 9644echo "${ECHO_T}$ac_cv_group_kmem" >&6
4c343001
DL
9645 KMEM_GROUP=$ac_cv_group_kmem
9646fi
503d2be0
AS
9647if test "x$ac_save_LIBS" = x; then
9648 GETLOADAVG_LIBS=$LIBS
9649else
9650 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
9651fi
9652LIBS=$ac_save_LIBS
4c343001 9653
b1b84649 9654echo "$as_me:9654: checking for _LARGEFILE_SOURCE value needed for large files" >&5
503d2be0
AS
9655echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9656if test "${ac_cv_sys_largefile_source+set}" = set; then
9657 echo $ECHO_N "(cached) $ECHO_C" >&6
d42122a3 9658else
503d2be0 9659 while :; do
169fe44e 9660 ac_cv_sys_largefile_source=no
503d2be0 9661 cat >conftest.$ac_ext <<_ACEOF
b1b84649 9662#line 9662 "configure"
169fe44e
GM
9663#include "confdefs.h"
9664#include <stdio.h>
503d2be0
AS
9665int
9666main ()
9667{
169fe44e 9668return !fseeko;
503d2be0
AS
9669 ;
9670 return 0;
9671}
9672_ACEOF
9673rm -f conftest.$ac_objext
b1b84649 9674if { (eval echo "$as_me:9674: \"$ac_compile\"") >&5
503d2be0
AS
9675 (eval $ac_compile) 2>&5
9676 ac_status=$?
b1b84649 9677 echo "$as_me:9677: \$? = $ac_status" >&5
503d2be0
AS
9678 (exit $ac_status); } &&
9679 { ac_try='test -s conftest.$ac_objext'
b1b84649 9680 { (eval echo "$as_me:9680: \"$ac_try\"") >&5
503d2be0
AS
9681 (eval $ac_try) 2>&5
9682 ac_status=$?
b1b84649 9683 echo "$as_me:9683: \$? = $ac_status" >&5
503d2be0
AS
9684 (exit $ac_status); }; }; then
9685 break
169fe44e 9686else
503d2be0
AS
9687 echo "$as_me: failed program was:" >&5
9688cat conftest.$ac_ext >&5
9689fi
9690rm -f conftest.$ac_objext conftest.$ac_ext
9691 cat >conftest.$ac_ext <<_ACEOF
b1b84649 9692#line 9692 "configure"
d42122a3 9693#include "confdefs.h"
169fe44e
GM
9694#define _LARGEFILE_SOURCE 1
9695#include <stdio.h>
503d2be0
AS
9696int
9697main ()
9698{
169fe44e 9699return !fseeko;
503d2be0
AS
9700 ;
9701 return 0;
9702}
9703_ACEOF
9704rm -f conftest.$ac_objext
b1b84649 9705if { (eval echo "$as_me:9705: \"$ac_compile\"") >&5
503d2be0
AS
9706 (eval $ac_compile) 2>&5
9707 ac_status=$?
b1b84649 9708 echo "$as_me:9708: \$? = $ac_status" >&5
503d2be0
AS
9709 (exit $ac_status); } &&
9710 { ac_try='test -s conftest.$ac_objext'
b1b84649 9711 { (eval echo "$as_me:9711: \"$ac_try\"") >&5
503d2be0
AS
9712 (eval $ac_try) 2>&5
9713 ac_status=$?
b1b84649 9714 echo "$as_me:9714: \$? = $ac_status" >&5
503d2be0
AS
9715 (exit $ac_status); }; }; then
9716 ac_cv_sys_largefile_source=1; break
9717else
9718 echo "$as_me: failed program was:" >&5
9719cat conftest.$ac_ext >&5
9720fi
9721rm -f conftest.$ac_objext conftest.$ac_ext
9722 break
9723done
d42122a3 9724fi
b1b84649 9725echo "$as_me:9725: result: $ac_cv_sys_largefile_source" >&5
503d2be0
AS
9726echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9727if test "$ac_cv_sys_largefile_source" != no; then
d42122a3 9728
503d2be0 9729cat >>confdefs.h <<EOF
169fe44e 9730#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
d42122a3 9731EOF
169fe44e 9732
503d2be0
AS
9733fi
9734rm -f conftest*
169fe44e 9735
503d2be0
AS
9736# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9737# in glibc 2.1.3, but that breaks too many other things.
9738# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
b1b84649 9739echo "$as_me:9739: checking for fseeko" >&5
503d2be0
AS
9740echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9741if test "${ac_cv_func_fseeko+set}" = set; then
9742 echo $ECHO_N "(cached) $ECHO_C" >&6
d42122a3 9743else
503d2be0 9744 cat >conftest.$ac_ext <<_ACEOF
b1b84649 9745#line 9745 "configure"
169fe44e
GM
9746#include "confdefs.h"
9747#include <stdio.h>
503d2be0
AS
9748int
9749main ()
9750{
169fe44e 9751return fseeko && fseeko (stdin, 0, 0);
503d2be0
AS
9752 ;
9753 return 0;
9754}
9755_ACEOF
9756rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 9757if { (eval echo "$as_me:9757: \"$ac_link\"") >&5
503d2be0
AS
9758 (eval $ac_link) 2>&5
9759 ac_status=$?
b1b84649 9760 echo "$as_me:9760: \$? = $ac_status" >&5
503d2be0
AS
9761 (exit $ac_status); } &&
9762 { ac_try='test -s conftest$ac_exeext'
b1b84649 9763 { (eval echo "$as_me:9763: \"$ac_try\"") >&5
503d2be0
AS
9764 (eval $ac_try) 2>&5
9765 ac_status=$?
b1b84649 9766 echo "$as_me:9766: \$? = $ac_status" >&5
503d2be0 9767 (exit $ac_status); }; }; then
169fe44e
GM
9768 ac_cv_func_fseeko=yes
9769else
503d2be0
AS
9770 echo "$as_me: failed program was:" >&5
9771cat conftest.$ac_ext >&5
9772ac_cv_func_fseeko=no
169fe44e 9773fi
503d2be0 9774rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
d42122a3 9775fi
b1b84649 9776echo "$as_me:9776: result: $ac_cv_func_fseeko" >&5
503d2be0
AS
9777echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9778if test $ac_cv_func_fseeko = yes; then
d42122a3 9779
503d2be0 9780cat >>confdefs.h <<\EOF
169fe44e
GM
9781#define HAVE_FSEEKO 1
9782EOF
9783
503d2be0 9784fi
d42122a3 9785
169fe44e 9786# UNIX98 PTYs.
503d2be0 9787
087121cc
GM
9788for ac_func in grantpt
9789do
503d2be0 9790as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b1b84649 9791echo "$as_me:9791: checking for $ac_func" >&5
503d2be0
AS
9792echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9793if eval "test \"\${$as_ac_var+set}\" = set"; then
9794 echo $ECHO_N "(cached) $ECHO_C" >&6
087121cc 9795else
503d2be0 9796 cat >conftest.$ac_ext <<_ACEOF
b1b84649 9797#line 9797 "configure"
087121cc
GM
9798#include "confdefs.h"
9799/* System header to define __stub macros and hopefully few prototypes,
503d2be0 9800 which can conflict with char $ac_func (); below. */
087121cc
GM
9801#include <assert.h>
9802/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9803#ifdef __cplusplus
9804extern "C"
9805#endif
087121cc 9806/* We use char because int might match the return type of a gcc2
503d2be0
AS
9807 builtin and then its argument prototype would still apply. */
9808char $ac_func ();
9809char (*f) ();
087121cc 9810
503d2be0
AS
9811int
9812main ()
9813{
087121cc
GM
9814/* The GNU C library defines this for functions which it implements
9815 to always fail with ENOSYS. Some functions are actually named
9816 something starting with __ and the normal name is an alias. */
9817#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9818choke me
9819#else
503d2be0 9820f = $ac_func;
087121cc
GM
9821#endif
9822
503d2be0
AS
9823 ;
9824 return 0;
9825}
9826_ACEOF
9827rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 9828if { (eval echo "$as_me:9828: \"$ac_link\"") >&5
503d2be0
AS
9829 (eval $ac_link) 2>&5
9830 ac_status=$?
b1b84649 9831 echo "$as_me:9831: \$? = $ac_status" >&5
503d2be0
AS
9832 (exit $ac_status); } &&
9833 { ac_try='test -s conftest$ac_exeext'
b1b84649 9834 { (eval echo "$as_me:9834: \"$ac_try\"") >&5
503d2be0
AS
9835 (eval $ac_try) 2>&5
9836 ac_status=$?
b1b84649 9837 echo "$as_me:9837: \$? = $ac_status" >&5
503d2be0
AS
9838 (exit $ac_status); }; }; then
9839 eval "$as_ac_var=yes"
9840else
9841 echo "$as_me: failed program was:" >&5
9842cat conftest.$ac_ext >&5
9843eval "$as_ac_var=no"
9844fi
9845rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9846fi
b1b84649 9847echo "$as_me:9847: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
9848echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9849if test `eval echo '${'$as_ac_var'}'` = yes; then
9850 cat >>confdefs.h <<EOF
9851#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
087121cc 9852EOF
087121cc 9853
087121cc
GM
9854fi
9855done
9856
087121cc 9857# PTY-related GNU extensions.
503d2be0 9858
087121cc
GM
9859for ac_func in getpt
9860do
503d2be0 9861as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b1b84649 9862echo "$as_me:9862: checking for $ac_func" >&5
503d2be0
AS
9863echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9864if eval "test \"\${$as_ac_var+set}\" = set"; then
9865 echo $ECHO_N "(cached) $ECHO_C" >&6
087121cc 9866else
503d2be0 9867 cat >conftest.$ac_ext <<_ACEOF
b1b84649 9868#line 9868 "configure"
087121cc
GM
9869#include "confdefs.h"
9870/* System header to define __stub macros and hopefully few prototypes,
503d2be0 9871 which can conflict with char $ac_func (); below. */
087121cc
GM
9872#include <assert.h>
9873/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9874#ifdef __cplusplus
9875extern "C"
9876#endif
087121cc 9877/* We use char because int might match the return type of a gcc2
503d2be0
AS
9878 builtin and then its argument prototype would still apply. */
9879char $ac_func ();
9880char (*f) ();
087121cc 9881
503d2be0
AS
9882int
9883main ()
9884{
087121cc
GM
9885/* The GNU C library defines this for functions which it implements
9886 to always fail with ENOSYS. Some functions are actually named
9887 something starting with __ and the normal name is an alias. */
9888#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9889choke me
9890#else
503d2be0 9891f = $ac_func;
087121cc
GM
9892#endif
9893
503d2be0
AS
9894 ;
9895 return 0;
9896}
9897_ACEOF
9898rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 9899if { (eval echo "$as_me:9899: \"$ac_link\"") >&5
503d2be0
AS
9900 (eval $ac_link) 2>&5
9901 ac_status=$?
b1b84649 9902 echo "$as_me:9902: \$? = $ac_status" >&5
503d2be0
AS
9903 (exit $ac_status); } &&
9904 { ac_try='test -s conftest$ac_exeext'
b1b84649 9905 { (eval echo "$as_me:9905: \"$ac_try\"") >&5
503d2be0
AS
9906 (eval $ac_try) 2>&5
9907 ac_status=$?
b1b84649 9908 echo "$as_me:9908: \$? = $ac_status" >&5
503d2be0
AS
9909 (exit $ac_status); }; }; then
9910 eval "$as_ac_var=yes"
9911else
9912 echo "$as_me: failed program was:" >&5
9913cat conftest.$ac_ext >&5
9914eval "$as_ac_var=no"
9915fi
9916rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9917fi
b1b84649 9918echo "$as_me:9918: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
9919echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9920if test `eval echo '${'$as_ac_var'}'` = yes; then
9921 cat >>confdefs.h <<EOF
9922#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
087121cc 9923EOF
087121cc 9924
087121cc
GM
9925fi
9926done
9927
ba4481b5
DL
9928# Check this now, so that we will NOT find the above functions in ncurses.
9929# That is because we have not set up to link ncurses in lib-src.
9930# It's better to believe a function is not available
9931# than to expect to find it in ncurses.
503d2be0 9932
b1b84649 9933echo "$as_me:9933: checking for tparm in -lncurses" >&5
503d2be0
AS
9934echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6
9935if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
9936 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9937else
503d2be0 9938 ac_check_lib_save_LIBS=$LIBS
ba4481b5 9939LIBS="-lncurses $LIBS"
503d2be0 9940cat >conftest.$ac_ext <<_ACEOF
b1b84649 9941#line 9941 "configure"
ba4481b5 9942#include "confdefs.h"
503d2be0 9943
ba4481b5 9944/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9945#ifdef __cplusplus
9946extern "C"
9947#endif
ba4481b5 9948/* We use char because int might match the return type of a gcc2
503d2be0
AS
9949 builtin and then its argument prototype would still apply. */
9950char tparm ();
9951int
9952main ()
9953{
9954tparm ();
9955 ;
9956 return 0;
9957}
9958_ACEOF
9959rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 9960if { (eval echo "$as_me:9960: \"$ac_link\"") >&5
503d2be0
AS
9961 (eval $ac_link) 2>&5
9962 ac_status=$?
b1b84649 9963 echo "$as_me:9963: \$? = $ac_status" >&5
503d2be0
AS
9964 (exit $ac_status); } &&
9965 { ac_try='test -s conftest$ac_exeext'
b1b84649 9966 { (eval echo "$as_me:9966: \"$ac_try\"") >&5
503d2be0
AS
9967 (eval $ac_try) 2>&5
9968 ac_status=$?
b1b84649 9969 echo "$as_me:9969: \$? = $ac_status" >&5
503d2be0
AS
9970 (exit $ac_status); }; }; then
9971 ac_cv_lib_ncurses_tparm=yes
9972else
9973 echo "$as_me: failed program was:" >&5
9974cat conftest.$ac_ext >&5
9975ac_cv_lib_ncurses_tparm=no
9976fi
9977rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9978LIBS=$ac_check_lib_save_LIBS
9979fi
b1b84649 9980echo "$as_me:9980: result: $ac_cv_lib_ncurses_tparm" >&5
503d2be0
AS
9981echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6
9982if test $ac_cv_lib_ncurses_tparm = yes; then
9983 cat >>confdefs.h <<EOF
9984#define HAVE_LIBNCURSES 1
ba4481b5
DL
9985EOF
9986
9987 LIBS="-lncurses $LIBS"
9988
ba4481b5
DL
9989fi
9990
84e70f78
KR
9991# Do we need the Hesiod library to provide the support routines?
9992if test "$with_hesiod" = yes ; then
9993 # Don't set $LIBS here -- see comments above.
9994 resolv=no
b1b84649 9995 echo "$as_me:9995: checking for res_send" >&5
84e70f78
KR
9996echo $ECHO_N "checking for res_send... $ECHO_C" >&6
9997if test "${ac_cv_func_res_send+set}" = set; then
9998 echo $ECHO_N "(cached) $ECHO_C" >&6
9999else
10000 cat >conftest.$ac_ext <<_ACEOF
b1b84649 10001#line 10001 "configure"
84e70f78
KR
10002#include "confdefs.h"
10003/* System header to define __stub macros and hopefully few prototypes,
10004 which can conflict with char res_send (); below. */
10005#include <assert.h>
10006/* Override any gcc2 internal prototype to avoid an error. */
10007#ifdef __cplusplus
10008extern "C"
10009#endif
10010/* We use char because int might match the return type of a gcc2
10011 builtin and then its argument prototype would still apply. */
10012char res_send ();
10013char (*f) ();
10014
10015int
10016main ()
10017{
10018/* The GNU C library defines this for functions which it implements
10019 to always fail with ENOSYS. Some functions are actually named
10020 something starting with __ and the normal name is an alias. */
10021#if defined (__stub_res_send) || defined (__stub___res_send)
10022choke me
10023#else
10024f = res_send;
10025#endif
10026
10027 ;
10028 return 0;
10029}
10030_ACEOF
10031rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 10032if { (eval echo "$as_me:10032: \"$ac_link\"") >&5
84e70f78
KR
10033 (eval $ac_link) 2>&5
10034 ac_status=$?
b1b84649 10035 echo "$as_me:10035: \$? = $ac_status" >&5
84e70f78
KR
10036 (exit $ac_status); } &&
10037 { ac_try='test -s conftest$ac_exeext'
b1b84649 10038 { (eval echo "$as_me:10038: \"$ac_try\"") >&5
84e70f78
KR
10039 (eval $ac_try) 2>&5
10040 ac_status=$?
b1b84649 10041 echo "$as_me:10041: \$? = $ac_status" >&5
84e70f78
KR
10042 (exit $ac_status); }; }; then
10043 ac_cv_func_res_send=yes
10044else
10045 echo "$as_me: failed program was:" >&5
10046cat conftest.$ac_ext >&5
10047ac_cv_func_res_send=no
10048fi
10049rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10050fi
b1b84649 10051echo "$as_me:10051: result: $ac_cv_func_res_send" >&5
84e70f78
KR
10052echo "${ECHO_T}$ac_cv_func_res_send" >&6
10053if test $ac_cv_func_res_send = yes; then
10054 :
10055else
b1b84649 10056 echo "$as_me:10056: checking for __res_send" >&5
84e70f78
KR
10057echo $ECHO_N "checking for __res_send... $ECHO_C" >&6
10058if test "${ac_cv_func___res_send+set}" = set; then
10059 echo $ECHO_N "(cached) $ECHO_C" >&6
10060else
10061 cat >conftest.$ac_ext <<_ACEOF
b1b84649 10062#line 10062 "configure"
84e70f78
KR
10063#include "confdefs.h"
10064/* System header to define __stub macros and hopefully few prototypes,
10065 which can conflict with char __res_send (); below. */
10066#include <assert.h>
10067/* Override any gcc2 internal prototype to avoid an error. */
10068#ifdef __cplusplus
10069extern "C"
10070#endif
10071/* We use char because int might match the return type of a gcc2
10072 builtin and then its argument prototype would still apply. */
10073char __res_send ();
10074char (*f) ();
10075
10076int
10077main ()
10078{
10079/* The GNU C library defines this for functions which it implements
10080 to always fail with ENOSYS. Some functions are actually named
10081 something starting with __ and the normal name is an alias. */
10082#if defined (__stub___res_send) || defined (__stub_____res_send)
10083choke me
10084#else
10085f = __res_send;
10086#endif
10087
10088 ;
10089 return 0;
10090}
10091_ACEOF
10092rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 10093if { (eval echo "$as_me:10093: \"$ac_link\"") >&5
84e70f78
KR
10094 (eval $ac_link) 2>&5
10095 ac_status=$?
b1b84649 10096 echo "$as_me:10096: \$? = $ac_status" >&5
84e70f78
KR
10097 (exit $ac_status); } &&
10098 { ac_try='test -s conftest$ac_exeext'
b1b84649 10099 { (eval echo "$as_me:10099: \"$ac_try\"") >&5
84e70f78
KR
10100 (eval $ac_try) 2>&5
10101 ac_status=$?
b1b84649 10102 echo "$as_me:10102: \$? = $ac_status" >&5
84e70f78
KR
10103 (exit $ac_status); }; }; then
10104 ac_cv_func___res_send=yes
10105else
10106 echo "$as_me: failed program was:" >&5
10107cat conftest.$ac_ext >&5
10108ac_cv_func___res_send=no
10109fi
10110rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10111fi
b1b84649 10112echo "$as_me:10112: result: $ac_cv_func___res_send" >&5
84e70f78
KR
10113echo "${ECHO_T}$ac_cv_func___res_send" >&6
10114if test $ac_cv_func___res_send = yes; then
10115 :
10116else
b1b84649 10117 echo "$as_me:10117: checking for res_send in -lresolv" >&5
84e70f78
KR
10118echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6
10119if test "${ac_cv_lib_resolv_res_send+set}" = set; then
10120 echo $ECHO_N "(cached) $ECHO_C" >&6
10121else
10122 ac_check_lib_save_LIBS=$LIBS
10123LIBS="-lresolv $LIBS"
10124cat >conftest.$ac_ext <<_ACEOF
b1b84649 10125#line 10125 "configure"
84e70f78
KR
10126#include "confdefs.h"
10127
10128/* Override any gcc2 internal prototype to avoid an error. */
10129#ifdef __cplusplus
10130extern "C"
10131#endif
10132/* We use char because int might match the return type of a gcc2
10133 builtin and then its argument prototype would still apply. */
10134char res_send ();
10135int
10136main ()
10137{
10138res_send ();
10139 ;
10140 return 0;
10141}
10142_ACEOF
10143rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 10144if { (eval echo "$as_me:10144: \"$ac_link\"") >&5
84e70f78
KR
10145 (eval $ac_link) 2>&5
10146 ac_status=$?
b1b84649 10147 echo "$as_me:10147: \$? = $ac_status" >&5
84e70f78
KR
10148 (exit $ac_status); } &&
10149 { ac_try='test -s conftest$ac_exeext'
b1b84649 10150 { (eval echo "$as_me:10150: \"$ac_try\"") >&5
84e70f78
KR
10151 (eval $ac_try) 2>&5
10152 ac_status=$?
b1b84649 10153 echo "$as_me:10153: \$? = $ac_status" >&5
84e70f78
KR
10154 (exit $ac_status); }; }; then
10155 ac_cv_lib_resolv_res_send=yes
10156else
10157 echo "$as_me: failed program was:" >&5
10158cat conftest.$ac_ext >&5
10159ac_cv_lib_resolv_res_send=no
10160fi
10161rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10162LIBS=$ac_check_lib_save_LIBS
10163fi
b1b84649 10164echo "$as_me:10164: result: $ac_cv_lib_resolv_res_send" >&5
84e70f78
KR
10165echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6
10166if test $ac_cv_lib_resolv_res_send = yes; then
10167 resolv=yes
10168else
b1b84649 10169 echo "$as_me:10169: checking for __res_send in -lresolv" >&5
84e70f78
KR
10170echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6
10171if test "${ac_cv_lib_resolv___res_send+set}" = set; then
10172 echo $ECHO_N "(cached) $ECHO_C" >&6
10173else
10174 ac_check_lib_save_LIBS=$LIBS
10175LIBS="-lresolv $LIBS"
10176cat >conftest.$ac_ext <<_ACEOF
b1b84649 10177#line 10177 "configure"
84e70f78
KR
10178#include "confdefs.h"
10179
10180/* Override any gcc2 internal prototype to avoid an error. */
10181#ifdef __cplusplus
10182extern "C"
10183#endif
10184/* We use char because int might match the return type of a gcc2
10185 builtin and then its argument prototype would still apply. */
10186char __res_send ();
10187int
10188main ()
10189{
10190__res_send ();
10191 ;
10192 return 0;
10193}
10194_ACEOF
10195rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 10196if { (eval echo "$as_me:10196: \"$ac_link\"") >&5
84e70f78
KR
10197 (eval $ac_link) 2>&5
10198 ac_status=$?
b1b84649 10199 echo "$as_me:10199: \$? = $ac_status" >&5
84e70f78
KR
10200 (exit $ac_status); } &&
10201 { ac_try='test -s conftest$ac_exeext'
b1b84649 10202 { (eval echo "$as_me:10202: \"$ac_try\"") >&5
84e70f78
KR
10203 (eval $ac_try) 2>&5
10204 ac_status=$?
b1b84649 10205 echo "$as_me:10205: \$? = $ac_status" >&5
84e70f78
KR
10206 (exit $ac_status); }; }; then
10207 ac_cv_lib_resolv___res_send=yes
10208else
10209 echo "$as_me: failed program was:" >&5
10210cat conftest.$ac_ext >&5
10211ac_cv_lib_resolv___res_send=no
10212fi
10213rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10214LIBS=$ac_check_lib_save_LIBS
10215fi
b1b84649 10216echo "$as_me:10216: result: $ac_cv_lib_resolv___res_send" >&5
84e70f78
KR
10217echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6
10218if test $ac_cv_lib_resolv___res_send = yes; then
10219 resolv=yes
10220fi
10221
10222fi
10223
10224fi
10225
10226fi
10227
10228 if test "$resolv" = yes ; then
10229 RESOLVLIB=-lresolv
10230 cat >>confdefs.h <<\EOF
10231#define HAVE_LIBRESOLV 1
10232EOF
10233
10234 else
10235 RESOLVLIB=
10236 fi
b1b84649 10237 echo "$as_me:10237: checking for hes_getmailhost" >&5
84e70f78
KR
10238echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6
10239if test "${ac_cv_func_hes_getmailhost+set}" = set; then
10240 echo $ECHO_N "(cached) $ECHO_C" >&6
10241else
10242 cat >conftest.$ac_ext <<_ACEOF
b1b84649 10243#line 10243 "configure"
84e70f78
KR
10244#include "confdefs.h"
10245/* System header to define __stub macros and hopefully few prototypes,
10246 which can conflict with char hes_getmailhost (); below. */
10247#include <assert.h>
10248/* Override any gcc2 internal prototype to avoid an error. */
10249#ifdef __cplusplus
10250extern "C"
10251#endif
10252/* We use char because int might match the return type of a gcc2
10253 builtin and then its argument prototype would still apply. */
10254char hes_getmailhost ();
10255char (*f) ();
10256
10257int
10258main ()
10259{
10260/* The GNU C library defines this for functions which it implements
10261 to always fail with ENOSYS. Some functions are actually named
10262 something starting with __ and the normal name is an alias. */
10263#if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
10264choke me
10265#else
10266f = hes_getmailhost;
10267#endif
10268
10269 ;
10270 return 0;
10271}
10272_ACEOF
10273rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 10274if { (eval echo "$as_me:10274: \"$ac_link\"") >&5
84e70f78
KR
10275 (eval $ac_link) 2>&5
10276 ac_status=$?
b1b84649 10277 echo "$as_me:10277: \$? = $ac_status" >&5
84e70f78
KR
10278 (exit $ac_status); } &&
10279 { ac_try='test -s conftest$ac_exeext'
b1b84649 10280 { (eval echo "$as_me:10280: \"$ac_try\"") >&5
84e70f78
KR
10281 (eval $ac_try) 2>&5
10282 ac_status=$?
b1b84649 10283 echo "$as_me:10283: \$? = $ac_status" >&5
84e70f78
KR
10284 (exit $ac_status); }; }; then
10285 ac_cv_func_hes_getmailhost=yes
10286else
10287 echo "$as_me: failed program was:" >&5
10288cat conftest.$ac_ext >&5
10289ac_cv_func_hes_getmailhost=no
10290fi
10291rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10292fi
b1b84649 10293echo "$as_me:10293: result: $ac_cv_func_hes_getmailhost" >&5
84e70f78
KR
10294echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6
10295if test $ac_cv_func_hes_getmailhost = yes; then
10296 :
10297else
b1b84649 10298 echo "$as_me:10298: checking for hes_getmailhost in -lhesiod" >&5
84e70f78
KR
10299echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6
10300if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
10301 echo $ECHO_N "(cached) $ECHO_C" >&6
10302else
10303 ac_check_lib_save_LIBS=$LIBS
10304LIBS="-lhesiod $RESOLVLIB $LIBS"
10305cat >conftest.$ac_ext <<_ACEOF
b1b84649 10306#line 10306 "configure"
84e70f78
KR
10307#include "confdefs.h"
10308
10309/* Override any gcc2 internal prototype to avoid an error. */
10310#ifdef __cplusplus
10311extern "C"
10312#endif
10313/* We use char because int might match the return type of a gcc2
10314 builtin and then its argument prototype would still apply. */
10315char hes_getmailhost ();
10316int
10317main ()
10318{
10319hes_getmailhost ();
10320 ;
10321 return 0;
10322}
10323_ACEOF
10324rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 10325if { (eval echo "$as_me:10325: \"$ac_link\"") >&5
84e70f78
KR
10326 (eval $ac_link) 2>&5
10327 ac_status=$?
b1b84649 10328 echo "$as_me:10328: \$? = $ac_status" >&5
84e70f78
KR
10329 (exit $ac_status); } &&
10330 { ac_try='test -s conftest$ac_exeext'
b1b84649 10331 { (eval echo "$as_me:10331: \"$ac_try\"") >&5
84e70f78
KR
10332 (eval $ac_try) 2>&5
10333 ac_status=$?
b1b84649 10334 echo "$as_me:10334: \$? = $ac_status" >&5
84e70f78
KR
10335 (exit $ac_status); }; }; then
10336 ac_cv_lib_hesiod_hes_getmailhost=yes
10337else
10338 echo "$as_me: failed program was:" >&5
10339cat conftest.$ac_ext >&5
10340ac_cv_lib_hesiod_hes_getmailhost=no
10341fi
10342rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10343LIBS=$ac_check_lib_save_LIBS
10344fi
b1b84649 10345echo "$as_me:10345: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
84e70f78
KR
10346echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6
10347if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
10348 cat >>confdefs.h <<\EOF
10349#define HAVE_LIBHESIOD 1
10350EOF
10351
10352else
10353 :
10354fi
10355
10356fi
10357
10358fi
10359
a21616bd
KR
10360# These tell us which Kerberos-related libraries to use.
10361if test "${with_kerberos+set}" = set; then
503d2be0 10362
b1b84649 10363echo "$as_me:10363: checking for com_err in -lcom_err" >&5
503d2be0
AS
10364echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
10365if test "${ac_cv_lib_com_err_com_err+set}" = set; then
10366 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10367else
503d2be0 10368 ac_check_lib_save_LIBS=$LIBS
a21616bd 10369LIBS="-lcom_err $LIBS"
503d2be0 10370cat >conftest.$ac_ext <<_ACEOF
b1b84649 10371#line 10371 "configure"
a21616bd 10372#include "confdefs.h"
503d2be0 10373
a21616bd 10374/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10375#ifdef __cplusplus
10376extern "C"
10377#endif
a21616bd 10378/* We use char because int might match the return type of a gcc2
503d2be0
AS
10379 builtin and then its argument prototype would still apply. */
10380char com_err ();
10381int
10382main ()
10383{
10384com_err ();
10385 ;
10386 return 0;
10387}
10388_ACEOF
10389rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 10390if { (eval echo "$as_me:10390: \"$ac_link\"") >&5
503d2be0
AS
10391 (eval $ac_link) 2>&5
10392 ac_status=$?
b1b84649 10393 echo "$as_me:10393: \$? = $ac_status" >&5
503d2be0
AS
10394 (exit $ac_status); } &&
10395 { ac_try='test -s conftest$ac_exeext'
b1b84649 10396 { (eval echo "$as_me:10396: \"$ac_try\"") >&5
503d2be0
AS
10397 (eval $ac_try) 2>&5
10398 ac_status=$?
b1b84649 10399 echo "$as_me:10399: \$? = $ac_status" >&5
503d2be0
AS
10400 (exit $ac_status); }; }; then
10401 ac_cv_lib_com_err_com_err=yes
10402else
10403 echo "$as_me: failed program was:" >&5
10404cat conftest.$ac_ext >&5
10405ac_cv_lib_com_err_com_err=no
10406fi
10407rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10408LIBS=$ac_check_lib_save_LIBS
10409fi
b1b84649 10410echo "$as_me:10410: result: $ac_cv_lib_com_err_com_err" >&5
503d2be0
AS
10411echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
10412if test $ac_cv_lib_com_err_com_err = yes; then
10413 cat >>confdefs.h <<EOF
10414#define HAVE_LIBCOM_ERR 1
a21616bd
KR
10415EOF
10416
10417 LIBS="-lcom_err $LIBS"
10418
a21616bd
KR
10419fi
10420
b1b84649 10421echo "$as_me:10421: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
503d2be0
AS
10422echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6
10423if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
10424 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10425else
503d2be0 10426 ac_check_lib_save_LIBS=$LIBS
a21616bd 10427LIBS="-lk5crypto $LIBS"
503d2be0 10428cat >conftest.$ac_ext <<_ACEOF
b1b84649 10429#line 10429 "configure"
a21616bd 10430#include "confdefs.h"
503d2be0 10431
a21616bd 10432/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10433#ifdef __cplusplus
10434extern "C"
10435#endif
a21616bd 10436/* We use char because int might match the return type of a gcc2
503d2be0
AS
10437 builtin and then its argument prototype would still apply. */
10438char mit_des_cbc_encrypt ();
10439int
10440main ()
10441{
10442mit_des_cbc_encrypt ();
10443 ;
10444 return 0;
10445}
10446_ACEOF
10447rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 10448if { (eval echo "$as_me:10448: \"$ac_link\"") >&5
503d2be0
AS
10449 (eval $ac_link) 2>&5
10450 ac_status=$?
b1b84649 10451 echo "$as_me:10451: \$? = $ac_status" >&5
503d2be0
AS
10452 (exit $ac_status); } &&
10453 { ac_try='test -s conftest$ac_exeext'
b1b84649 10454 { (eval echo "$as_me:10454: \"$ac_try\"") >&5
503d2be0
AS
10455 (eval $ac_try) 2>&5
10456 ac_status=$?
b1b84649 10457 echo "$as_me:10457: \$? = $ac_status" >&5
503d2be0
AS
10458 (exit $ac_status); }; }; then
10459 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
10460else
10461 echo "$as_me: failed program was:" >&5
10462cat conftest.$ac_ext >&5
10463ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
10464fi
10465rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10466LIBS=$ac_check_lib_save_LIBS
10467fi
b1b84649 10468echo "$as_me:10468: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
10469echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6
10470if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
10471 cat >>confdefs.h <<EOF
10472#define HAVE_LIBK5CRYPTO 1
a21616bd
KR
10473EOF
10474
10475 LIBS="-lk5crypto $LIBS"
10476
a21616bd
KR
10477fi
10478
b1b84649 10479echo "$as_me:10479: checking for mit_des_cbc_encrypt in -lcrypto" >&5
503d2be0
AS
10480echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6
10481if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
10482 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10483else
503d2be0 10484 ac_check_lib_save_LIBS=$LIBS
a21616bd 10485LIBS="-lcrypto $LIBS"
503d2be0 10486cat >conftest.$ac_ext <<_ACEOF
b1b84649 10487#line 10487 "configure"
a21616bd 10488#include "confdefs.h"
503d2be0 10489
a21616bd 10490/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10491#ifdef __cplusplus
10492extern "C"
10493#endif
a21616bd 10494/* We use char because int might match the return type of a gcc2
503d2be0
AS
10495 builtin and then its argument prototype would still apply. */
10496char mit_des_cbc_encrypt ();
10497int
10498main ()
10499{
10500mit_des_cbc_encrypt ();
10501 ;
10502 return 0;
10503}
10504_ACEOF
10505rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 10506if { (eval echo "$as_me:10506: \"$ac_link\"") >&5
503d2be0
AS
10507 (eval $ac_link) 2>&5
10508 ac_status=$?
b1b84649 10509 echo "$as_me:10509: \$? = $ac_status" >&5
503d2be0
AS
10510 (exit $ac_status); } &&
10511 { ac_try='test -s conftest$ac_exeext'
b1b84649 10512 { (eval echo "$as_me:10512: \"$ac_try\"") >&5
503d2be0
AS
10513 (eval $ac_try) 2>&5
10514 ac_status=$?
b1b84649 10515 echo "$as_me:10515: \$? = $ac_status" >&5
503d2be0
AS
10516 (exit $ac_status); }; }; then
10517 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
10518else
10519 echo "$as_me: failed program was:" >&5
10520cat conftest.$ac_ext >&5
10521ac_cv_lib_crypto_mit_des_cbc_encrypt=no
10522fi
10523rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10524LIBS=$ac_check_lib_save_LIBS
10525fi
b1b84649 10526echo "$as_me:10526: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
10527echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6
10528if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
10529 cat >>confdefs.h <<EOF
10530#define HAVE_LIBCRYPTO 1
a21616bd
KR
10531EOF
10532
10533 LIBS="-lcrypto $LIBS"
10534
a21616bd
KR
10535fi
10536
b1b84649 10537echo "$as_me:10537: checking for krb5_init_context in -lkrb5" >&5
503d2be0
AS
10538echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6
10539if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
10540 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10541else
503d2be0 10542 ac_check_lib_save_LIBS=$LIBS
a21616bd 10543LIBS="-lkrb5 $LIBS"
503d2be0 10544cat >conftest.$ac_ext <<_ACEOF
b1b84649 10545#line 10545 "configure"
a21616bd 10546#include "confdefs.h"
a21616bd 10547
503d2be0
AS
10548/* Override any gcc2 internal prototype to avoid an error. */
10549#ifdef __cplusplus
10550extern "C"
10551#endif
10552/* We use char because int might match the return type of a gcc2
10553 builtin and then its argument prototype would still apply. */
10554char krb5_init_context ();
10555int
10556main ()
10557{
10558krb5_init_context ();
10559 ;
10560 return 0;
10561}
10562_ACEOF
10563rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 10564if { (eval echo "$as_me:10564: \"$ac_link\"") >&5
503d2be0
AS
10565 (eval $ac_link) 2>&5
10566 ac_status=$?
b1b84649 10567 echo "$as_me:10567: \$? = $ac_status" >&5
503d2be0
AS
10568 (exit $ac_status); } &&
10569 { ac_try='test -s conftest$ac_exeext'
b1b84649 10570 { (eval echo "$as_me:10570: \"$ac_try\"") >&5
503d2be0
AS
10571 (eval $ac_try) 2>&5
10572 ac_status=$?
b1b84649 10573 echo "$as_me:10573: \$? = $ac_status" >&5
503d2be0
AS
10574 (exit $ac_status); }; }; then
10575 ac_cv_lib_krb5_krb5_init_context=yes
10576else
10577 echo "$as_me: failed program was:" >&5
10578cat conftest.$ac_ext >&5
10579ac_cv_lib_krb5_krb5_init_context=no
10580fi
10581rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10582LIBS=$ac_check_lib_save_LIBS
10583fi
b1b84649 10584echo "$as_me:10584: result: $ac_cv_lib_krb5_krb5_init_context" >&5
503d2be0
AS
10585echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6
10586if test $ac_cv_lib_krb5_krb5_init_context = yes; then
10587 cat >>confdefs.h <<EOF
10588#define HAVE_LIBKRB5 1
a21616bd
KR
10589EOF
10590
10591 LIBS="-lkrb5 $LIBS"
10592
a21616bd
KR
10593fi
10594
10595 if test "${with_kerberos5+set}" != set; then
503d2be0 10596
b1b84649 10597echo "$as_me:10597: checking for des_cbc_encrypt in -ldes425" >&5
503d2be0
AS
10598echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
10599if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
10600 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10601else
503d2be0 10602 ac_check_lib_save_LIBS=$LIBS
a21616bd 10603LIBS="-ldes425 $LIBS"
503d2be0 10604cat >conftest.$ac_ext <<_ACEOF
b1b84649 10605#line 10605 "configure"
a21616bd 10606#include "confdefs.h"
503d2be0 10607
a21616bd 10608/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10609#ifdef __cplusplus
10610extern "C"
10611#endif
a21616bd 10612/* We use char because int might match the return type of a gcc2
503d2be0
AS
10613 builtin and then its argument prototype would still apply. */
10614char des_cbc_encrypt ();
10615int
10616main ()
10617{
10618des_cbc_encrypt ();
10619 ;
10620 return 0;
10621}
10622_ACEOF
10623rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 10624if { (eval echo "$as_me:10624: \"$ac_link\"") >&5
503d2be0
AS
10625 (eval $ac_link) 2>&5
10626 ac_status=$?
b1b84649 10627 echo "$as_me:10627: \$? = $ac_status" >&5
503d2be0
AS
10628 (exit $ac_status); } &&
10629 { ac_try='test -s conftest$ac_exeext'
b1b84649 10630 { (eval echo "$as_me:10630: \"$ac_try\"") >&5
503d2be0
AS
10631 (eval $ac_try) 2>&5
10632 ac_status=$?
b1b84649 10633 echo "$as_me:10633: \$? = $ac_status" >&5
503d2be0
AS
10634 (exit $ac_status); }; }; then
10635 ac_cv_lib_des425_des_cbc_encrypt=yes
10636else
10637 echo "$as_me: failed program was:" >&5
10638cat conftest.$ac_ext >&5
10639ac_cv_lib_des425_des_cbc_encrypt=no
10640fi
10641rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10642LIBS=$ac_check_lib_save_LIBS
10643fi
b1b84649 10644echo "$as_me:10644: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
503d2be0
AS
10645echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
10646if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
10647 cat >>confdefs.h <<EOF
10648#define HAVE_LIBDES425 1
a21616bd
KR
10649EOF
10650
10651 LIBS="-ldes425 $LIBS"
10652
10653else
503d2be0 10654
b1b84649 10655echo "$as_me:10655: checking for des_cbc_encrypt in -ldes" >&5
503d2be0
AS
10656echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
10657if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
10658 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10659else
503d2be0 10660 ac_check_lib_save_LIBS=$LIBS
a21616bd 10661LIBS="-ldes $LIBS"
503d2be0 10662cat >conftest.$ac_ext <<_ACEOF
b1b84649 10663#line 10663 "configure"
a21616bd 10664#include "confdefs.h"
503d2be0 10665
a21616bd 10666/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10667#ifdef __cplusplus
10668extern "C"
10669#endif
a21616bd 10670/* We use char because int might match the return type of a gcc2
503d2be0
AS
10671 builtin and then its argument prototype would still apply. */
10672char des_cbc_encrypt ();
10673int
10674main ()
10675{
10676des_cbc_encrypt ();
10677 ;
10678 return 0;
10679}
10680_ACEOF
10681rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 10682if { (eval echo "$as_me:10682: \"$ac_link\"") >&5
503d2be0
AS
10683 (eval $ac_link) 2>&5
10684 ac_status=$?
b1b84649 10685 echo "$as_me:10685: \$? = $ac_status" >&5
503d2be0
AS
10686 (exit $ac_status); } &&
10687 { ac_try='test -s conftest$ac_exeext'
b1b84649 10688 { (eval echo "$as_me:10688: \"$ac_try\"") >&5
503d2be0
AS
10689 (eval $ac_try) 2>&5
10690 ac_status=$?
b1b84649 10691 echo "$as_me:10691: \$? = $ac_status" >&5
503d2be0
AS
10692 (exit $ac_status); }; }; then
10693 ac_cv_lib_des_des_cbc_encrypt=yes
10694else
10695 echo "$as_me: failed program was:" >&5
10696cat conftest.$ac_ext >&5
10697ac_cv_lib_des_des_cbc_encrypt=no
10698fi
10699rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10700LIBS=$ac_check_lib_save_LIBS
10701fi
b1b84649 10702echo "$as_me:10702: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
503d2be0
AS
10703echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
10704if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
10705 cat >>confdefs.h <<EOF
10706#define HAVE_LIBDES 1
a21616bd
KR
10707EOF
10708
10709 LIBS="-ldes $LIBS"
10710
a21616bd
KR
10711fi
10712
10713fi
10714
b1b84649 10715echo "$as_me:10715: checking for krb_get_cred in -lkrb4" >&5
503d2be0
AS
10716echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6
10717if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
10718 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10719else
503d2be0 10720 ac_check_lib_save_LIBS=$LIBS
a21616bd 10721LIBS="-lkrb4 $LIBS"
503d2be0 10722cat >conftest.$ac_ext <<_ACEOF
b1b84649 10723#line 10723 "configure"
a21616bd 10724#include "confdefs.h"
503d2be0 10725
a21616bd 10726/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10727#ifdef __cplusplus
10728extern "C"
10729#endif
a21616bd 10730/* We use char because int might match the return type of a gcc2
503d2be0
AS
10731 builtin and then its argument prototype would still apply. */
10732char krb_get_cred ();
10733int
10734main ()
10735{
10736krb_get_cred ();
10737 ;
10738 return 0;
10739}
10740_ACEOF
10741rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 10742if { (eval echo "$as_me:10742: \"$ac_link\"") >&5
503d2be0
AS
10743 (eval $ac_link) 2>&5
10744 ac_status=$?
b1b84649 10745 echo "$as_me:10745: \$? = $ac_status" >&5
503d2be0
AS
10746 (exit $ac_status); } &&
10747 { ac_try='test -s conftest$ac_exeext'
b1b84649 10748 { (eval echo "$as_me:10748: \"$ac_try\"") >&5
503d2be0
AS
10749 (eval $ac_try) 2>&5
10750 ac_status=$?
b1b84649 10751 echo "$as_me:10751: \$? = $ac_status" >&5
503d2be0
AS
10752 (exit $ac_status); }; }; then
10753 ac_cv_lib_krb4_krb_get_cred=yes
10754else
10755 echo "$as_me: failed program was:" >&5
10756cat conftest.$ac_ext >&5
10757ac_cv_lib_krb4_krb_get_cred=no
10758fi
10759rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10760LIBS=$ac_check_lib_save_LIBS
10761fi
b1b84649 10762echo "$as_me:10762: result: $ac_cv_lib_krb4_krb_get_cred" >&5
503d2be0
AS
10763echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6
10764if test $ac_cv_lib_krb4_krb_get_cred = yes; then
10765 cat >>confdefs.h <<EOF
10766#define HAVE_LIBKRB4 1
a21616bd
KR
10767EOF
10768
10769 LIBS="-lkrb4 $LIBS"
10770
10771else
503d2be0 10772
b1b84649 10773echo "$as_me:10773: checking for krb_get_cred in -lkrb" >&5
503d2be0
AS
10774echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6
10775if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
10776 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10777else
503d2be0 10778 ac_check_lib_save_LIBS=$LIBS
a21616bd 10779LIBS="-lkrb $LIBS"
503d2be0 10780cat >conftest.$ac_ext <<_ACEOF
b1b84649 10781#line 10781 "configure"
a21616bd 10782#include "confdefs.h"
503d2be0 10783
a21616bd 10784/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10785#ifdef __cplusplus
10786extern "C"
10787#endif
a21616bd 10788/* We use char because int might match the return type of a gcc2
503d2be0
AS
10789 builtin and then its argument prototype would still apply. */
10790char krb_get_cred ();
10791int
10792main ()
10793{
10794krb_get_cred ();
10795 ;
10796 return 0;
10797}
10798_ACEOF
10799rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 10800if { (eval echo "$as_me:10800: \"$ac_link\"") >&5
503d2be0
AS
10801 (eval $ac_link) 2>&5
10802 ac_status=$?
b1b84649 10803 echo "$as_me:10803: \$? = $ac_status" >&5
503d2be0
AS
10804 (exit $ac_status); } &&
10805 { ac_try='test -s conftest$ac_exeext'
b1b84649 10806 { (eval echo "$as_me:10806: \"$ac_try\"") >&5
503d2be0
AS
10807 (eval $ac_try) 2>&5
10808 ac_status=$?
b1b84649 10809 echo "$as_me:10809: \$? = $ac_status" >&5
503d2be0
AS
10810 (exit $ac_status); }; }; then
10811 ac_cv_lib_krb_krb_get_cred=yes
10812else
10813 echo "$as_me: failed program was:" >&5
10814cat conftest.$ac_ext >&5
10815ac_cv_lib_krb_krb_get_cred=no
10816fi
10817rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10818LIBS=$ac_check_lib_save_LIBS
10819fi
b1b84649 10820echo "$as_me:10820: result: $ac_cv_lib_krb_krb_get_cred" >&5
503d2be0
AS
10821echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6
10822if test $ac_cv_lib_krb_krb_get_cred = yes; then
10823 cat >>confdefs.h <<EOF
10824#define HAVE_LIBKRB 1
a21616bd
KR
10825EOF
10826
10827 LIBS="-lkrb $LIBS"
10828
a21616bd
KR
10829fi
10830
10831fi
10832
10833 fi
10834
10835 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
10836
10837for ac_header in krb5.h
a21616bd 10838do
503d2be0 10839as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b1b84649 10840echo "$as_me:10840: checking for $ac_header" >&5
503d2be0
AS
10841echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10842if eval "test \"\${$as_ac_Header+set}\" = set"; then
10843 echo $ECHO_N "(cached) $ECHO_C" >&6
10844else
10845 cat >conftest.$ac_ext <<_ACEOF
b1b84649 10846#line 10846 "configure"
503d2be0
AS
10847#include "confdefs.h"
10848#include <$ac_header>
10849_ACEOF
b1b84649 10850if { (eval echo "$as_me:10850: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
10851 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10852 ac_status=$?
10853 egrep -v '^ *\+' conftest.er1 >conftest.err
10854 rm -f conftest.er1
10855 cat conftest.err >&5
b1b84649 10856 echo "$as_me:10856: \$? = $ac_status" >&5
503d2be0
AS
10857 (exit $ac_status); } >/dev/null; then
10858 if test -s conftest.err; then
10859 ac_cpp_err=$ac_c_preproc_warn_flag
10860 else
10861 ac_cpp_err=
10862 fi
10863else
10864 ac_cpp_err=yes
10865fi
10866if test -z "$ac_cpp_err"; then
10867 eval "$as_ac_Header=yes"
10868else
10869 echo "$as_me: failed program was:" >&5
a21616bd 10870 cat conftest.$ac_ext >&5
503d2be0 10871 eval "$as_ac_Header=no"
a21616bd 10872fi
503d2be0 10873rm -f conftest.err conftest.$ac_ext
a21616bd 10874fi
b1b84649 10875echo "$as_me:10875: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
10876echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10877if test `eval echo '${'$as_ac_Header'}'` = yes; then
10878 cat >>confdefs.h <<EOF
10879#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 10880EOF
503d2be0 10881
a21616bd
KR
10882fi
10883done
10884
10885 else
503d2be0
AS
10886
10887for ac_header in des.h
a21616bd 10888do
503d2be0 10889as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b1b84649 10890echo "$as_me:10890: checking for $ac_header" >&5
503d2be0
AS
10891echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10892if eval "test \"\${$as_ac_Header+set}\" = set"; then
10893 echo $ECHO_N "(cached) $ECHO_C" >&6
10894else
10895 cat >conftest.$ac_ext <<_ACEOF
b1b84649 10896#line 10896 "configure"
503d2be0
AS
10897#include "confdefs.h"
10898#include <$ac_header>
10899_ACEOF
b1b84649 10900if { (eval echo "$as_me:10900: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
10901 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10902 ac_status=$?
10903 egrep -v '^ *\+' conftest.er1 >conftest.err
10904 rm -f conftest.er1
10905 cat conftest.err >&5
b1b84649 10906 echo "$as_me:10906: \$? = $ac_status" >&5
503d2be0
AS
10907 (exit $ac_status); } >/dev/null; then
10908 if test -s conftest.err; then
10909 ac_cpp_err=$ac_c_preproc_warn_flag
10910 else
10911 ac_cpp_err=
10912 fi
10913else
10914 ac_cpp_err=yes
10915fi
10916if test -z "$ac_cpp_err"; then
10917 eval "$as_ac_Header=yes"
10918else
10919 echo "$as_me: failed program was:" >&5
a21616bd 10920 cat conftest.$ac_ext >&5
503d2be0 10921 eval "$as_ac_Header=no"
a21616bd 10922fi
503d2be0 10923rm -f conftest.err conftest.$ac_ext
a21616bd 10924fi
b1b84649 10925echo "$as_me:10925: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
10926echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10927if test `eval echo '${'$as_ac_Header'}'` = yes; then
10928 cat >>confdefs.h <<EOF
10929#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 10930EOF
503d2be0 10931
a21616bd 10932else
503d2be0
AS
10933
10934for ac_header in kerberosIV/des.h
a21616bd 10935do
503d2be0 10936as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b1b84649 10937echo "$as_me:10937: checking for $ac_header" >&5
503d2be0
AS
10938echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10939if eval "test \"\${$as_ac_Header+set}\" = set"; then
10940 echo $ECHO_N "(cached) $ECHO_C" >&6
10941else
10942 cat >conftest.$ac_ext <<_ACEOF
b1b84649 10943#line 10943 "configure"
503d2be0
AS
10944#include "confdefs.h"
10945#include <$ac_header>
10946_ACEOF
b1b84649 10947if { (eval echo "$as_me:10947: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
10948 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10949 ac_status=$?
10950 egrep -v '^ *\+' conftest.er1 >conftest.err
10951 rm -f conftest.er1
10952 cat conftest.err >&5
b1b84649 10953 echo "$as_me:10953: \$? = $ac_status" >&5
503d2be0
AS
10954 (exit $ac_status); } >/dev/null; then
10955 if test -s conftest.err; then
10956 ac_cpp_err=$ac_c_preproc_warn_flag
10957 else
10958 ac_cpp_err=
10959 fi
10960else
10961 ac_cpp_err=yes
10962fi
10963if test -z "$ac_cpp_err"; then
10964 eval "$as_ac_Header=yes"
10965else
10966 echo "$as_me: failed program was:" >&5
a21616bd 10967 cat conftest.$ac_ext >&5
503d2be0 10968 eval "$as_ac_Header=no"
a21616bd 10969fi
503d2be0 10970rm -f conftest.err conftest.$ac_ext
a21616bd 10971fi
b1b84649 10972echo "$as_me:10972: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
10973echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10974if test `eval echo '${'$as_ac_Header'}'` = yes; then
10975 cat >>confdefs.h <<EOF
10976#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 10977EOF
503d2be0 10978
a21616bd 10979else
503d2be0
AS
10980
10981for ac_header in kerberos/des.h
a21616bd 10982do
503d2be0 10983as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b1b84649 10984echo "$as_me:10984: checking for $ac_header" >&5
503d2be0
AS
10985echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10986if eval "test \"\${$as_ac_Header+set}\" = set"; then
10987 echo $ECHO_N "(cached) $ECHO_C" >&6
10988else
10989 cat >conftest.$ac_ext <<_ACEOF
b1b84649 10990#line 10990 "configure"
503d2be0
AS
10991#include "confdefs.h"
10992#include <$ac_header>
10993_ACEOF
b1b84649 10994if { (eval echo "$as_me:10994: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
10995 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10996 ac_status=$?
10997 egrep -v '^ *\+' conftest.er1 >conftest.err
10998 rm -f conftest.er1
10999 cat conftest.err >&5
b1b84649 11000 echo "$as_me:11000: \$? = $ac_status" >&5
503d2be0
AS
11001 (exit $ac_status); } >/dev/null; then
11002 if test -s conftest.err; then
11003 ac_cpp_err=$ac_c_preproc_warn_flag
11004 else
11005 ac_cpp_err=
11006 fi
11007else
11008 ac_cpp_err=yes
11009fi
11010if test -z "$ac_cpp_err"; then
11011 eval "$as_ac_Header=yes"
11012else
11013 echo "$as_me: failed program was:" >&5
a21616bd 11014 cat conftest.$ac_ext >&5
503d2be0 11015 eval "$as_ac_Header=no"
a21616bd 11016fi
503d2be0 11017rm -f conftest.err conftest.$ac_ext
a21616bd 11018fi
b1b84649 11019echo "$as_me:11019: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11020echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11021if test `eval echo '${'$as_ac_Header'}'` = yes; then
11022 cat >>confdefs.h <<EOF
11023#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 11024EOF
503d2be0 11025
a21616bd
KR
11026fi
11027done
11028
11029fi
11030done
11031
11032fi
11033done
11034
503d2be0 11035for ac_header in krb.h
a21616bd 11036do
503d2be0 11037as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b1b84649 11038echo "$as_me:11038: checking for $ac_header" >&5
503d2be0
AS
11039echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11040if eval "test \"\${$as_ac_Header+set}\" = set"; then
11041 echo $ECHO_N "(cached) $ECHO_C" >&6
11042else
11043 cat >conftest.$ac_ext <<_ACEOF
b1b84649 11044#line 11044 "configure"
503d2be0
AS
11045#include "confdefs.h"
11046#include <$ac_header>
11047_ACEOF
b1b84649 11048if { (eval echo "$as_me:11048: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11049 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11050 ac_status=$?
11051 egrep -v '^ *\+' conftest.er1 >conftest.err
11052 rm -f conftest.er1
11053 cat conftest.err >&5
b1b84649 11054 echo "$as_me:11054: \$? = $ac_status" >&5
503d2be0
AS
11055 (exit $ac_status); } >/dev/null; then
11056 if test -s conftest.err; then
11057 ac_cpp_err=$ac_c_preproc_warn_flag
11058 else
11059 ac_cpp_err=
11060 fi
11061else
11062 ac_cpp_err=yes
11063fi
11064if test -z "$ac_cpp_err"; then
11065 eval "$as_ac_Header=yes"
11066else
11067 echo "$as_me: failed program was:" >&5
a21616bd 11068 cat conftest.$ac_ext >&5
503d2be0 11069 eval "$as_ac_Header=no"
a21616bd 11070fi
503d2be0 11071rm -f conftest.err conftest.$ac_ext
a21616bd 11072fi
b1b84649 11073echo "$as_me:11073: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11074echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11075if test `eval echo '${'$as_ac_Header'}'` = yes; then
11076 cat >>confdefs.h <<EOF
11077#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 11078EOF
503d2be0 11079
a21616bd 11080else
503d2be0
AS
11081
11082for ac_header in kerberosIV/krb.h
a21616bd 11083do
503d2be0 11084as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b1b84649 11085echo "$as_me:11085: checking for $ac_header" >&5
503d2be0
AS
11086echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11087if eval "test \"\${$as_ac_Header+set}\" = set"; then
11088 echo $ECHO_N "(cached) $ECHO_C" >&6
11089else
11090 cat >conftest.$ac_ext <<_ACEOF
b1b84649 11091#line 11091 "configure"
503d2be0
AS
11092#include "confdefs.h"
11093#include <$ac_header>
11094_ACEOF
b1b84649 11095if { (eval echo "$as_me:11095: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11096 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11097 ac_status=$?
11098 egrep -v '^ *\+' conftest.er1 >conftest.err
11099 rm -f conftest.er1
11100 cat conftest.err >&5
b1b84649 11101 echo "$as_me:11101: \$? = $ac_status" >&5
503d2be0
AS
11102 (exit $ac_status); } >/dev/null; then
11103 if test -s conftest.err; then
11104 ac_cpp_err=$ac_c_preproc_warn_flag
11105 else
11106 ac_cpp_err=
11107 fi
11108else
11109 ac_cpp_err=yes
11110fi
11111if test -z "$ac_cpp_err"; then
11112 eval "$as_ac_Header=yes"
11113else
11114 echo "$as_me: failed program was:" >&5
a21616bd 11115 cat conftest.$ac_ext >&5
503d2be0 11116 eval "$as_ac_Header=no"
a21616bd 11117fi
503d2be0 11118rm -f conftest.err conftest.$ac_ext
a21616bd 11119fi
b1b84649 11120echo "$as_me:11120: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11121echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11122if test `eval echo '${'$as_ac_Header'}'` = yes; then
11123 cat >>confdefs.h <<EOF
11124#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 11125EOF
503d2be0 11126
a21616bd 11127else
503d2be0
AS
11128
11129for ac_header in kerberos/krb.h
a21616bd 11130do
503d2be0 11131as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b1b84649 11132echo "$as_me:11132: checking for $ac_header" >&5
503d2be0
AS
11133echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11134if eval "test \"\${$as_ac_Header+set}\" = set"; then
11135 echo $ECHO_N "(cached) $ECHO_C" >&6
11136else
11137 cat >conftest.$ac_ext <<_ACEOF
b1b84649 11138#line 11138 "configure"
503d2be0
AS
11139#include "confdefs.h"
11140#include <$ac_header>
11141_ACEOF
b1b84649 11142if { (eval echo "$as_me:11142: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11143 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11144 ac_status=$?
11145 egrep -v '^ *\+' conftest.er1 >conftest.err
11146 rm -f conftest.er1
11147 cat conftest.err >&5
b1b84649 11148 echo "$as_me:11148: \$? = $ac_status" >&5
503d2be0
AS
11149 (exit $ac_status); } >/dev/null; then
11150 if test -s conftest.err; then
11151 ac_cpp_err=$ac_c_preproc_warn_flag
11152 else
11153 ac_cpp_err=
11154 fi
11155else
11156 ac_cpp_err=yes
11157fi
11158if test -z "$ac_cpp_err"; then
11159 eval "$as_ac_Header=yes"
11160else
11161 echo "$as_me: failed program was:" >&5
a21616bd 11162 cat conftest.$ac_ext >&5
503d2be0 11163 eval "$as_ac_Header=no"
a21616bd 11164fi
503d2be0 11165rm -f conftest.err conftest.$ac_ext
a21616bd 11166fi
b1b84649 11167echo "$as_me:11167: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11168echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11169if test `eval echo '${'$as_ac_Header'}'` = yes; then
11170 cat >>confdefs.h <<EOF
11171#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 11172EOF
503d2be0 11173
a21616bd
KR
11174fi
11175done
11176
11177fi
11178done
11179
11180fi
11181done
11182
11183 fi
503d2be0
AS
11184
11185for ac_header in com_err.h
a21616bd 11186do
503d2be0 11187as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b1b84649 11188echo "$as_me:11188: checking for $ac_header" >&5
503d2be0
AS
11189echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11190if eval "test \"\${$as_ac_Header+set}\" = set"; then
11191 echo $ECHO_N "(cached) $ECHO_C" >&6
11192else
11193 cat >conftest.$ac_ext <<_ACEOF
b1b84649 11194#line 11194 "configure"
503d2be0
AS
11195#include "confdefs.h"
11196#include <$ac_header>
11197_ACEOF
b1b84649 11198if { (eval echo "$as_me:11198: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11199 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11200 ac_status=$?
11201 egrep -v '^ *\+' conftest.er1 >conftest.err
11202 rm -f conftest.er1
11203 cat conftest.err >&5
b1b84649 11204 echo "$as_me:11204: \$? = $ac_status" >&5
503d2be0
AS
11205 (exit $ac_status); } >/dev/null; then
11206 if test -s conftest.err; then
11207 ac_cpp_err=$ac_c_preproc_warn_flag
11208 else
11209 ac_cpp_err=
11210 fi
11211else
11212 ac_cpp_err=yes
11213fi
11214if test -z "$ac_cpp_err"; then
11215 eval "$as_ac_Header=yes"
11216else
11217 echo "$as_me: failed program was:" >&5
a21616bd 11218 cat conftest.$ac_ext >&5
503d2be0 11219 eval "$as_ac_Header=no"
a21616bd 11220fi
503d2be0 11221rm -f conftest.err conftest.$ac_ext
a21616bd 11222fi
b1b84649 11223echo "$as_me:11223: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11224echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11225if test `eval echo '${'$as_ac_Header'}'` = yes; then
11226 cat >>confdefs.h <<EOF
11227#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 11228EOF
503d2be0 11229
a21616bd
KR
11230fi
11231done
11232
11233fi
11234
ba4481b5
DL
11235# Solaris requires -lintl if you want strerror (which calls dgettext)
11236# to return localized messages.
503d2be0 11237
b1b84649 11238echo "$as_me:11238: checking for dgettext in -lintl" >&5
503d2be0
AS
11239echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
11240if test "${ac_cv_lib_intl_dgettext+set}" = set; then
11241 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11242else
503d2be0 11243 ac_check_lib_save_LIBS=$LIBS
ba4481b5 11244LIBS="-lintl $LIBS"
503d2be0 11245cat >conftest.$ac_ext <<_ACEOF
b1b84649 11246#line 11246 "configure"
ba4481b5 11247#include "confdefs.h"
503d2be0 11248
ba4481b5 11249/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11250#ifdef __cplusplus
11251extern "C"
11252#endif
ba4481b5 11253/* We use char because int might match the return type of a gcc2
503d2be0
AS
11254 builtin and then its argument prototype would still apply. */
11255char dgettext ();
11256int
11257main ()
11258{
11259dgettext ();
11260 ;
11261 return 0;
11262}
11263_ACEOF
11264rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 11265if { (eval echo "$as_me:11265: \"$ac_link\"") >&5
503d2be0
AS
11266 (eval $ac_link) 2>&5
11267 ac_status=$?
b1b84649 11268 echo "$as_me:11268: \$? = $ac_status" >&5
503d2be0
AS
11269 (exit $ac_status); } &&
11270 { ac_try='test -s conftest$ac_exeext'
b1b84649 11271 { (eval echo "$as_me:11271: \"$ac_try\"") >&5
503d2be0
AS
11272 (eval $ac_try) 2>&5
11273 ac_status=$?
b1b84649 11274 echo "$as_me:11274: \$? = $ac_status" >&5
503d2be0
AS
11275 (exit $ac_status); }; }; then
11276 ac_cv_lib_intl_dgettext=yes
11277else
11278 echo "$as_me: failed program was:" >&5
11279cat conftest.$ac_ext >&5
11280ac_cv_lib_intl_dgettext=no
11281fi
11282rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11283LIBS=$ac_check_lib_save_LIBS
11284fi
b1b84649 11285echo "$as_me:11285: result: $ac_cv_lib_intl_dgettext" >&5
503d2be0
AS
11286echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
11287if test $ac_cv_lib_intl_dgettext = yes; then
11288 cat >>confdefs.h <<EOF
11289#define HAVE_LIBINTL 1
ba4481b5
DL
11290EOF
11291
11292 LIBS="-lintl $LIBS"
11293
ba4481b5
DL
11294fi
11295
b1b84649 11296echo "$as_me:11296: checking whether localtime caches TZ" >&5
503d2be0
AS
11297echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6
11298if test "${emacs_cv_localtime_cache+set}" = set; then
11299 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
11300else
11301 if test x$ac_cv_func_tzset = xyes; then
11302if test "$cross_compiling" = yes; then
11303 # If we have tzset, assume the worst when cross-compiling.
11304emacs_cv_localtime_cache=yes
11305else
503d2be0 11306 cat >conftest.$ac_ext <<_ACEOF
b1b84649 11307#line 11307 "configure"
ba4481b5
DL
11308#include "confdefs.h"
11309#include <time.h>
ba4481b5
DL
11310extern char **environ;
11311unset_TZ ()
11312{
11313 char **from, **to;
11314 for (to = from = environ; (*to = *from); from++)
11315 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11316 to++;
11317}
11318char TZ_GMT0[] = "TZ=GMT0";
11319char TZ_PST8[] = "TZ=PST8";
11320main()
11321{
11322 time_t now = time ((time_t *) 0);
11323 int hour_GMT0, hour_unset;
11324 if (putenv (TZ_GMT0) != 0)
11325 exit (1);
11326 hour_GMT0 = localtime (&now)->tm_hour;
11327 unset_TZ ();
11328 hour_unset = localtime (&now)->tm_hour;
11329 if (putenv (TZ_PST8) != 0)
11330 exit (1);
11331 if (localtime (&now)->tm_hour == hour_GMT0)
11332 exit (1);
11333 unset_TZ ();
11334 if (localtime (&now)->tm_hour != hour_unset)
11335 exit (1);
11336 exit (0);
11337}
503d2be0
AS
11338_ACEOF
11339rm -f conftest$ac_exeext
b1b84649 11340if { (eval echo "$as_me:11340: \"$ac_link\"") >&5
503d2be0
AS
11341 (eval $ac_link) 2>&5
11342 ac_status=$?
b1b84649 11343 echo "$as_me:11343: \$? = $ac_status" >&5
503d2be0 11344 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b1b84649 11345 { (eval echo "$as_me:11345: \"$ac_try\"") >&5
503d2be0
AS
11346 (eval $ac_try) 2>&5
11347 ac_status=$?
b1b84649 11348 echo "$as_me:11348: \$? = $ac_status" >&5
503d2be0 11349 (exit $ac_status); }; }; then
ba4481b5
DL
11350 emacs_cv_localtime_cache=no
11351else
503d2be0
AS
11352 echo "$as_me: program exited with status $ac_status" >&5
11353echo "$as_me: failed program was:" >&5
11354cat conftest.$ac_ext >&5
11355emacs_cv_localtime_cache=yes
ba4481b5 11356fi
503d2be0 11357rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 11358fi
ba4481b5
DL
11359else
11360 # If we lack tzset, report that localtime does not cache TZ,
11361 # since we can't invalidate the cache if we don't have tzset.
11362 emacs_cv_localtime_cache=no
11363fi
11364fi
b1b84649 11365echo "$as_me:11365: result: $emacs_cv_localtime_cache" >&5
503d2be0 11366echo "${ECHO_T}$emacs_cv_localtime_cache" >&6
ba4481b5 11367if test $emacs_cv_localtime_cache = yes; then
503d2be0 11368 cat >>confdefs.h <<\EOF
ba4481b5
DL
11369#define LOCALTIME_CACHE 1
11370EOF
11371
11372fi
11373
11374if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
11375
11376for ac_func in gettimeofday
48d4b120 11377do
503d2be0 11378as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b1b84649 11379echo "$as_me:11379: checking for $ac_func" >&5
503d2be0
AS
11380echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11381if eval "test \"\${$as_ac_var+set}\" = set"; then
11382 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 11383else
503d2be0 11384 cat >conftest.$ac_ext <<_ACEOF
b1b84649 11385#line 11385 "configure"
48d4b120
DL
11386#include "confdefs.h"
11387/* System header to define __stub macros and hopefully few prototypes,
503d2be0 11388 which can conflict with char $ac_func (); below. */
48d4b120
DL
11389#include <assert.h>
11390/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11391#ifdef __cplusplus
11392extern "C"
11393#endif
48d4b120 11394/* We use char because int might match the return type of a gcc2
503d2be0
AS
11395 builtin and then its argument prototype would still apply. */
11396char $ac_func ();
11397char (*f) ();
48d4b120 11398
503d2be0
AS
11399int
11400main ()
11401{
48d4b120
DL
11402/* The GNU C library defines this for functions which it implements
11403 to always fail with ENOSYS. Some functions are actually named
11404 something starting with __ and the normal name is an alias. */
11405#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11406choke me
11407#else
503d2be0 11408f = $ac_func;
48d4b120
DL
11409#endif
11410
503d2be0
AS
11411 ;
11412 return 0;
11413}
11414_ACEOF
11415rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 11416if { (eval echo "$as_me:11416: \"$ac_link\"") >&5
503d2be0
AS
11417 (eval $ac_link) 2>&5
11418 ac_status=$?
b1b84649 11419 echo "$as_me:11419: \$? = $ac_status" >&5
503d2be0
AS
11420 (exit $ac_status); } &&
11421 { ac_try='test -s conftest$ac_exeext'
b1b84649 11422 { (eval echo "$as_me:11422: \"$ac_try\"") >&5
503d2be0
AS
11423 (eval $ac_try) 2>&5
11424 ac_status=$?
b1b84649 11425 echo "$as_me:11425: \$? = $ac_status" >&5
503d2be0
AS
11426 (exit $ac_status); }; }; then
11427 eval "$as_ac_var=yes"
11428else
11429 echo "$as_me: failed program was:" >&5
11430cat conftest.$ac_ext >&5
11431eval "$as_ac_var=no"
11432fi
11433rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11434fi
b1b84649 11435echo "$as_me:11435: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
11436echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11437if test `eval echo '${'$as_ac_var'}'` = yes; then
11438 cat >>confdefs.h <<EOF
11439#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
48d4b120 11440EOF
48d4b120 11441
48d4b120
DL
11442fi
11443done
11444
b1b84649 11445 echo "$as_me:11445: checking whether gettimeofday can accept two arguments" >&5
503d2be0
AS
11446echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6
11447if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
11448 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11449else
503d2be0 11450 cat >conftest.$ac_ext <<_ACEOF
b1b84649 11451#line 11451 "configure"
a3f08d9e 11452#include "confdefs.h"
ba4481b5 11453
a3f08d9e
DL
11454#ifdef TIME_WITH_SYS_TIME
11455#include <sys/time.h>
11456#include <time.h>
11457#else
11458#ifdef HAVE_SYS_TIME_H
11459#include <sys/time.h>
11460#else
11461#include <time.h>
11462#endif
11463#endif
503d2be0
AS
11464int
11465main ()
11466{
a3f08d9e 11467struct timeval time;
48d4b120 11468 gettimeofday (&time, 0);
503d2be0
AS
11469 ;
11470 return 0;
11471}
11472_ACEOF
11473rm -f conftest.$ac_objext
b1b84649 11474if { (eval echo "$as_me:11474: \"$ac_compile\"") >&5
503d2be0
AS
11475 (eval $ac_compile) 2>&5
11476 ac_status=$?
b1b84649 11477 echo "$as_me:11477: \$? = $ac_status" >&5
503d2be0
AS
11478 (exit $ac_status); } &&
11479 { ac_try='test -s conftest.$ac_objext'
b1b84649 11480 { (eval echo "$as_me:11480: \"$ac_try\"") >&5
503d2be0
AS
11481 (eval $ac_try) 2>&5
11482 ac_status=$?
b1b84649 11483 echo "$as_me:11483: \$? = $ac_status" >&5
503d2be0 11484 (exit $ac_status); }; }; then
ba4481b5
DL
11485 emacs_cv_gettimeofday_two_arguments=yes
11486else
503d2be0
AS
11487 echo "$as_me: failed program was:" >&5
11488cat conftest.$ac_ext >&5
11489emacs_cv_gettimeofday_two_arguments=no
ba4481b5 11490fi
503d2be0 11491rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 11492fi
b1b84649 11493echo "$as_me:11493: result: $emacs_cv_gettimeofday_two_arguments" >&5
503d2be0 11494echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6
ba4481b5 11495 if test $emacs_cv_gettimeofday_two_arguments = no; then
503d2be0 11496 cat >>confdefs.h <<\EOF
ba4481b5
DL
11497#define GETTIMEOFDAY_ONE_ARGUMENT 1
11498EOF
11499
11500 fi
11501fi
11502
48d4b120 11503if test "$ac_cv_func_gettimeofday" = yes; then
b1b84649 11504 echo "$as_me:11504: checking for struct timezone" >&5
503d2be0
AS
11505echo $ECHO_N "checking for struct timezone... $ECHO_C" >&6
11506if test "${emacs_cv_struct_timezone+set}" = set; then
11507 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 11508else
503d2be0 11509 cat >conftest.$ac_ext <<_ACEOF
b1b84649 11510#line 11510 "configure"
48d4b120
DL
11511#include "confdefs.h"
11512#include <sys/time.h>
503d2be0
AS
11513int
11514main ()
11515{
48d4b120 11516struct timezone tz;
503d2be0
AS
11517 ;
11518 return 0;
11519}
11520_ACEOF
11521rm -f conftest.$ac_objext
b1b84649 11522if { (eval echo "$as_me:11522: \"$ac_compile\"") >&5
503d2be0
AS
11523 (eval $ac_compile) 2>&5
11524 ac_status=$?
b1b84649 11525 echo "$as_me:11525: \$? = $ac_status" >&5
503d2be0
AS
11526 (exit $ac_status); } &&
11527 { ac_try='test -s conftest.$ac_objext'
b1b84649 11528 { (eval echo "$as_me:11528: \"$ac_try\"") >&5
503d2be0
AS
11529 (eval $ac_try) 2>&5
11530 ac_status=$?
b1b84649 11531 echo "$as_me:11531: \$? = $ac_status" >&5
503d2be0 11532 (exit $ac_status); }; }; then
48d4b120
DL
11533 if test "$cross_compiling" = yes; then
11534 emacs_cv_struct_timezone=yes
11535else
503d2be0 11536 cat >conftest.$ac_ext <<_ACEOF
b1b84649 11537#line 11537 "configure"
48d4b120
DL
11538#include "confdefs.h"
11539
11540#ifdef TIME_WITH_SYS_TIME
11541#include <sys/time.h>
11542#include <time.h>
11543#else
11544#ifdef HAVE_SYS_TIME_H
11545#include <sys/time.h>
11546#else
11547#include <time.h>
11548#endif
11549#endif
11550main () {
11551 struct timeval time;
11552 struct timezone dummy;
11553 exit (gettimeofday (&time, &dummy));
11554}
503d2be0
AS
11555_ACEOF
11556rm -f conftest$ac_exeext
b1b84649 11557if { (eval echo "$as_me:11557: \"$ac_link\"") >&5
503d2be0
AS
11558 (eval $ac_link) 2>&5
11559 ac_status=$?
b1b84649 11560 echo "$as_me:11560: \$? = $ac_status" >&5
503d2be0 11561 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b1b84649 11562 { (eval echo "$as_me:11562: \"$ac_try\"") >&5
503d2be0
AS
11563 (eval $ac_try) 2>&5
11564 ac_status=$?
b1b84649 11565 echo "$as_me:11565: \$? = $ac_status" >&5
503d2be0 11566 (exit $ac_status); }; }; then
48d4b120
DL
11567 emacs_cv_struct_timezone=yes
11568else
503d2be0
AS
11569 echo "$as_me: program exited with status $ac_status" >&5
11570echo "$as_me: failed program was:" >&5
11571cat conftest.$ac_ext >&5
11572emacs_cv_struct_timezone=no
48d4b120 11573fi
503d2be0 11574rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
48d4b120 11575fi
48d4b120 11576else
503d2be0
AS
11577 echo "$as_me: failed program was:" >&5
11578cat conftest.$ac_ext >&5
11579emacs_cv_struct_timezone=no
48d4b120 11580fi
503d2be0 11581rm -f conftest.$ac_objext conftest.$ac_ext
48d4b120 11582fi
b1b84649 11583echo "$as_me:11583: result: $emacs_cv_struct_timezone" >&5
503d2be0 11584echo "${ECHO_T}$emacs_cv_struct_timezone" >&6
48d4b120
DL
11585fi
11586
ba4481b5 11587ok_so_far=yes
b1b84649 11588echo "$as_me:11588: checking for socket" >&5
503d2be0
AS
11589echo $ECHO_N "checking for socket... $ECHO_C" >&6
11590if test "${ac_cv_func_socket+set}" = set; then
11591 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11592else
503d2be0 11593 cat >conftest.$ac_ext <<_ACEOF
b1b84649 11594#line 11594 "configure"
ba4481b5
DL
11595#include "confdefs.h"
11596/* System header to define __stub macros and hopefully few prototypes,
503d2be0 11597 which can conflict with char socket (); below. */
ba4481b5
DL
11598#include <assert.h>
11599/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11600#ifdef __cplusplus
11601extern "C"
11602#endif
ba4481b5 11603/* We use char because int might match the return type of a gcc2
503d2be0
AS
11604 builtin and then its argument prototype would still apply. */
11605char socket ();
11606char (*f) ();
ba4481b5 11607
503d2be0
AS
11608int
11609main ()
11610{
ba4481b5
DL
11611/* The GNU C library defines this for functions which it implements
11612 to always fail with ENOSYS. Some functions are actually named
11613 something starting with __ and the normal name is an alias. */
11614#if defined (__stub_socket) || defined (__stub___socket)
11615choke me
11616#else
503d2be0 11617f = socket;
ba4481b5
DL
11618#endif
11619
503d2be0
AS
11620 ;
11621 return 0;
11622}
11623_ACEOF
11624rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 11625if { (eval echo "$as_me:11625: \"$ac_link\"") >&5
503d2be0
AS
11626 (eval $ac_link) 2>&5
11627 ac_status=$?
b1b84649 11628 echo "$as_me:11628: \$? = $ac_status" >&5
503d2be0
AS
11629 (exit $ac_status); } &&
11630 { ac_try='test -s conftest$ac_exeext'
b1b84649 11631 { (eval echo "$as_me:11631: \"$ac_try\"") >&5
503d2be0
AS
11632 (eval $ac_try) 2>&5
11633 ac_status=$?
b1b84649 11634 echo "$as_me:11634: \$? = $ac_status" >&5
503d2be0
AS
11635 (exit $ac_status); }; }; then
11636 ac_cv_func_socket=yes
11637else
11638 echo "$as_me: failed program was:" >&5
11639cat conftest.$ac_ext >&5
11640ac_cv_func_socket=no
11641fi
11642rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11643fi
b1b84649 11644echo "$as_me:11644: result: $ac_cv_func_socket" >&5
503d2be0
AS
11645echo "${ECHO_T}$ac_cv_func_socket" >&6
11646if test $ac_cv_func_socket = yes; then
ba4481b5
DL
11647 :
11648else
503d2be0 11649 ok_so_far=no
ba4481b5
DL
11650fi
11651
11652if test $ok_so_far = yes; then
b1b84649 11653 echo "$as_me:11653: checking for netinet/in.h" >&5
503d2be0
AS
11654echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
11655if test "${ac_cv_header_netinet_in_h+set}" = set; then
11656 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11657else
503d2be0 11658 cat >conftest.$ac_ext <<_ACEOF
b1b84649 11659#line 11659 "configure"
ba4481b5
DL
11660#include "confdefs.h"
11661#include <netinet/in.h>
503d2be0 11662_ACEOF
b1b84649 11663if { (eval echo "$as_me:11663: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11664 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11665 ac_status=$?
11666 egrep -v '^ *\+' conftest.er1 >conftest.err
11667 rm -f conftest.er1
11668 cat conftest.err >&5
b1b84649 11669 echo "$as_me:11669: \$? = $ac_status" >&5
503d2be0
AS
11670 (exit $ac_status); } >/dev/null; then
11671 if test -s conftest.err; then
11672 ac_cpp_err=$ac_c_preproc_warn_flag
11673 else
11674 ac_cpp_err=
11675 fi
11676else
11677 ac_cpp_err=yes
11678fi
11679if test -z "$ac_cpp_err"; then
11680 ac_cv_header_netinet_in_h=yes
ba4481b5 11681else
503d2be0 11682 echo "$as_me: failed program was:" >&5
ba4481b5 11683 cat conftest.$ac_ext >&5
503d2be0 11684 ac_cv_header_netinet_in_h=no
ba4481b5 11685fi
503d2be0 11686rm -f conftest.err conftest.$ac_ext
ba4481b5 11687fi
b1b84649 11688echo "$as_me:11688: result: $ac_cv_header_netinet_in_h" >&5
503d2be0
AS
11689echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
11690if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
11691 :
11692else
503d2be0 11693 ok_so_far=no
ba4481b5
DL
11694fi
11695
11696fi
11697if test $ok_so_far = yes; then
b1b84649 11698 echo "$as_me:11698: checking for arpa/inet.h" >&5
503d2be0
AS
11699echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
11700if test "${ac_cv_header_arpa_inet_h+set}" = set; then
11701 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11702else
503d2be0 11703 cat >conftest.$ac_ext <<_ACEOF
b1b84649 11704#line 11704 "configure"
ba4481b5
DL
11705#include "confdefs.h"
11706#include <arpa/inet.h>
503d2be0 11707_ACEOF
b1b84649 11708if { (eval echo "$as_me:11708: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11709 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11710 ac_status=$?
11711 egrep -v '^ *\+' conftest.er1 >conftest.err
11712 rm -f conftest.er1
11713 cat conftest.err >&5
b1b84649 11714 echo "$as_me:11714: \$? = $ac_status" >&5
503d2be0
AS
11715 (exit $ac_status); } >/dev/null; then
11716 if test -s conftest.err; then
11717 ac_cpp_err=$ac_c_preproc_warn_flag
11718 else
11719 ac_cpp_err=
11720 fi
11721else
11722 ac_cpp_err=yes
11723fi
11724if test -z "$ac_cpp_err"; then
11725 ac_cv_header_arpa_inet_h=yes
ba4481b5 11726else
503d2be0 11727 echo "$as_me: failed program was:" >&5
ba4481b5 11728 cat conftest.$ac_ext >&5
503d2be0 11729 ac_cv_header_arpa_inet_h=no
ba4481b5 11730fi
503d2be0 11731rm -f conftest.err conftest.$ac_ext
ba4481b5 11732fi
b1b84649 11733echo "$as_me:11733: result: $ac_cv_header_arpa_inet_h" >&5
503d2be0
AS
11734echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
11735if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
11736 :
11737else
503d2be0 11738 ok_so_far=no
ba4481b5
DL
11739fi
11740
11741fi
11742if test $ok_so_far = yes; then
503d2be0 11743 cat >>confdefs.h <<\EOF
ba4481b5
DL
11744#define HAVE_INET_SOCKETS 1
11745EOF
11746
11747fi
11748
11749if test -f /usr/lpp/X11/bin/smt.exp; then
503d2be0 11750 cat >>confdefs.h <<\EOF
ba4481b5
DL
11751#define HAVE_AIX_SMT_EXP 1
11752EOF
11753
11754fi
11755
b1b84649 11756echo "$as_me:11756: checking whether system supports dynamic ptys" >&5
503d2be0 11757echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6
3d9fec71 11758if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
b1b84649 11759 echo "$as_me:11759: result: yes" >&5
503d2be0
AS
11760echo "${ECHO_T}yes" >&6
11761 cat >>confdefs.h <<\EOF
3d9fec71
DL
11762#define HAVE_DEV_PTMX 1
11763EOF
11764
11765else
b1b84649 11766 echo "$as_me:11766: result: no" >&5
503d2be0 11767echo "${ECHO_T}no" >&6
3d9fec71
DL
11768fi
11769
b1b84649 11770echo "$as_me:11770: checking for pid_t" >&5
503d2be0
AS
11771echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
11772if test "${ac_cv_type_pid_t+set}" = set; then
11773 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 11774else
503d2be0 11775 cat >conftest.$ac_ext <<_ACEOF
b1b84649 11776#line 11776 "configure"
647847ea 11777#include "confdefs.h"
503d2be0
AS
11778$ac_includes_default
11779int
11780main ()
11781{
11782if ((pid_t *) 0)
11783 return 0;
11784if (sizeof (pid_t))
11785 return 0;
11786 ;
11787 return 0;
11788}
11789_ACEOF
11790rm -f conftest.$ac_objext
b1b84649 11791if { (eval echo "$as_me:11791: \"$ac_compile\"") >&5
503d2be0
AS
11792 (eval $ac_compile) 2>&5
11793 ac_status=$?
b1b84649 11794 echo "$as_me:11794: \$? = $ac_status" >&5
503d2be0
AS
11795 (exit $ac_status); } &&
11796 { ac_try='test -s conftest.$ac_objext'
b1b84649 11797 { (eval echo "$as_me:11797: \"$ac_try\"") >&5
503d2be0
AS
11798 (eval $ac_try) 2>&5
11799 ac_status=$?
b1b84649 11800 echo "$as_me:11800: \$? = $ac_status" >&5
503d2be0 11801 (exit $ac_status); }; }; then
647847ea
DL
11802 ac_cv_type_pid_t=yes
11803else
503d2be0
AS
11804 echo "$as_me: failed program was:" >&5
11805cat conftest.$ac_ext >&5
11806ac_cv_type_pid_t=no
647847ea 11807fi
503d2be0 11808rm -f conftest.$ac_objext conftest.$ac_ext
647847ea 11809fi
b1b84649 11810echo "$as_me:11810: result: $ac_cv_type_pid_t" >&5
503d2be0
AS
11811echo "${ECHO_T}$ac_cv_type_pid_t" >&6
11812if test $ac_cv_type_pid_t = yes; then
11813 :
11814else
11815
11816cat >>confdefs.h <<EOF
647847ea
DL
11817#define pid_t int
11818EOF
11819
11820fi
11821
503d2be0
AS
11822for ac_header in unistd.h vfork.h
11823do
11824as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b1b84649 11825echo "$as_me:11825: checking for $ac_header" >&5
503d2be0
AS
11826echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11827if eval "test \"\${$as_ac_Header+set}\" = set"; then
11828 echo $ECHO_N "(cached) $ECHO_C" >&6
11829else
11830 cat >conftest.$ac_ext <<_ACEOF
b1b84649 11831#line 11831 "configure"
503d2be0
AS
11832#include "confdefs.h"
11833#include <$ac_header>
11834_ACEOF
b1b84649 11835if { (eval echo "$as_me:11835: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11836 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11837 ac_status=$?
11838 egrep -v '^ *\+' conftest.er1 >conftest.err
11839 rm -f conftest.er1
11840 cat conftest.err >&5
b1b84649 11841 echo "$as_me:11841: \$? = $ac_status" >&5
503d2be0
AS
11842 (exit $ac_status); } >/dev/null; then
11843 if test -s conftest.err; then
11844 ac_cpp_err=$ac_c_preproc_warn_flag
11845 else
11846 ac_cpp_err=
11847 fi
647847ea 11848else
503d2be0
AS
11849 ac_cpp_err=yes
11850fi
11851if test -z "$ac_cpp_err"; then
11852 eval "$as_ac_Header=yes"
647847ea 11853else
503d2be0 11854 echo "$as_me: failed program was:" >&5
647847ea 11855 cat conftest.$ac_ext >&5
503d2be0 11856 eval "$as_ac_Header=no"
647847ea 11857fi
503d2be0 11858rm -f conftest.err conftest.$ac_ext
647847ea 11859fi
b1b84649 11860echo "$as_me:11860: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11861echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11862if test `eval echo '${'$as_ac_Header'}'` = yes; then
11863 cat >>confdefs.h <<EOF
11864#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
647847ea
DL
11865EOF
11866
73b77ee5 11867fi
503d2be0 11868done
73b77ee5 11869
503d2be0
AS
11870for ac_func in fork vfork
11871do
11872as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b1b84649 11873echo "$as_me:11873: checking for $ac_func" >&5
503d2be0
AS
11874echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11875if eval "test \"\${$as_ac_var+set}\" = set"; then
11876 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 11877else
503d2be0 11878 cat >conftest.$ac_ext <<_ACEOF
b1b84649 11879#line 11879 "configure"
fa0b693c
GM
11880#include "confdefs.h"
11881/* System header to define __stub macros and hopefully few prototypes,
503d2be0 11882 which can conflict with char $ac_func (); below. */
fa0b693c
GM
11883#include <assert.h>
11884/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11885#ifdef __cplusplus
11886extern "C"
11887#endif
fa0b693c 11888/* We use char because int might match the return type of a gcc2
503d2be0
AS
11889 builtin and then its argument prototype would still apply. */
11890char $ac_func ();
11891char (*f) ();
fa0b693c 11892
503d2be0
AS
11893int
11894main ()
11895{
fa0b693c
GM
11896/* The GNU C library defines this for functions which it implements
11897 to always fail with ENOSYS. Some functions are actually named
11898 something starting with __ and the normal name is an alias. */
503d2be0 11899#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
fa0b693c
GM
11900choke me
11901#else
503d2be0 11902f = $ac_func;
fa0b693c
GM
11903#endif
11904
503d2be0
AS
11905 ;
11906 return 0;
11907}
11908_ACEOF
11909rm -f conftest.$ac_objext conftest$ac_exeext
b1b84649 11910if { (eval echo "$as_me:11910: \"$ac_link\"") >&5
503d2be0
AS
11911 (eval $ac_link) 2>&5
11912 ac_status=$?
b1b84649 11913 echo "$as_me:11913: \$? = $ac_status" >&5
503d2be0
AS
11914 (exit $ac_status); } &&
11915 { ac_try='test -s conftest$ac_exeext'
b1b84649 11916 { (eval echo "$as_me:11916: \"$ac_try\"") >&5
503d2be0
AS
11917 (eval $ac_try) 2>&5
11918 ac_status=$?
b1b84649 11919 echo "$as_me:11919: \$? = $ac_status" >&5
503d2be0
AS
11920 (exit $ac_status); }; }; then
11921 eval "$as_ac_var=yes"
11922else
11923 echo "$as_me: failed program was:" >&5
11924cat conftest.$ac_ext >&5
11925eval "$as_ac_var=no"
11926fi
11927rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11928fi
b1b84649 11929echo "$as_me:11929: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
11930echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11931if test `eval echo '${'$as_ac_var'}'` = yes; then
11932 cat >>confdefs.h <<EOF
11933#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
fa0b693c 11934EOF
503d2be0 11935
fa0b693c 11936fi
503d2be0 11937done
fa0b693c 11938
503d2be0
AS
11939ac_cv_func_fork_works=$ac_cv_func_fork
11940if test "x$ac_cv_func_fork" = xyes; then
b1b84649 11941 echo "$as_me:11941: checking for working fork" >&5
503d2be0
AS
11942echo $ECHO_N "checking for working fork... $ECHO_C" >&6
11943if test "${ac_cv_func_fork_works+set}" = set; then
11944 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 11945else
503d2be0
AS
11946 if test "$cross_compiling" = yes; then
11947 ac_cv_func_fork_works=cross
11948else
11949 cat >conftest.$ac_ext <<_ACEOF
11950