(eval-after-load): Make it work with features as well.
[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
ba5da88a
PJ
1249test -z "$build_alias" &&
1250 build_alias=$ac_cv_build
1251
1252echo "$as_me:1252: checking host system type" >&5
503d2be0
AS
1253echo $ECHO_N "checking host system type... $ECHO_C" >&6
1254if test "${ac_cv_host+set}" = set; then
1255 echo $ECHO_N "(cached) $ECHO_C" >&6
1256else
1257 ac_cv_host_alias=$host_alias
1258test -z "$ac_cv_host_alias" &&
1259 ac_cv_host_alias=$ac_cv_build_alias
1260ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
ba5da88a 1261 { { echo "$as_me:1261: error: $ac_config_sub $ac_cv_host_alias failed" >&5
503d2be0
AS
1262echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1263 { (exit 1); exit 1; }; }
1264
1265fi
ba5da88a 1266echo "$as_me:1266: result: $ac_cv_host" >&5
503d2be0
AS
1267echo "${ECHO_T}$ac_cv_host" >&6
1268host=$ac_cv_host
1269host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1270host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1271host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ba4481b5 1272
ba5da88a
PJ
1273test -z "$host_alias" &&
1274 host_alias=$ac_cv_host
1275
ba4481b5 1276canonical=$host
531a3336 1277configuration=${host_alias-$host}
ba4481b5 1278
ba4481b5
DL
1279### If you add support for a new configuration, add code to this
1280### switch statement to recognize your configuration name and select
1281### the appropriate operating system and machine description files.
1282
1283### You would hope that you could choose an m/*.h file pretty much
1284### based on the machine portion of the configuration name, and an s-
1285### file based on the operating system portion. However, it turns out
1286### that each m/*.h file is pretty manufacturer-specific - for
1287### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
1288### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
1289### machines. So we basically have to have a special case for each
1290### configuration name.
1291###
1292### As far as handling version numbers on operating systems is
1293### concerned, make sure things will fail in a fixable way. If
1294### /etc/MACHINES doesn't say anything about version numbers, be
1295### prepared to handle anything reasonably. If version numbers
1296### matter, be sure /etc/MACHINES says something about it.
1297###
1298### Eric Raymond says we should accept strings like "sysvr4" to mean
1299### "System V Release 4"; he writes, "The old convention encouraged
1300### confusion between `system' and `release' levels'."
1301
1302machine='' opsys='' unported=no
1303case "${canonical}" in
1304
1305 ## NetBSD ports
1306 *-*-netbsd* )
1307 opsys=netbsd
1308 case "${canonical}" in
1309 alpha*-*-netbsd*) machine=alpha ;;
1310 i[3456]86-*-netbsd*) machine=intel386 ;;
1311 m68k-*-netbsd*)
1312 # This is somewhat bogus.
1313 machine=hp9000s300 ;;
1314 powerpc-apple-netbsd*) machine=macppc ;;
1315 mips-*-netbsd*) machine=pmax ;;
2df636f4 1316 mipsel-*-netbsd*) machine=pmax ;;
ba4481b5 1317 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 1318 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 1319 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 1320 vax-*-netbsd*) machine=vax ;;
2df636f4 1321 arm-*-netbsd*) machine=arm ;;
ba4481b5
DL
1322 esac
1323 ;;
1324
1325 ## OpenBSD ports
1326 *-*-openbsd* )
1327 opsys=openbsd
1328 case "${canonical}" in
1329 alpha*-*-openbsd*) machine=alpha ;;
1330 i386-*-openbsd*) machine=intel386 ;;
1331 m68k-*-openbsd*) machine=hp9000s300 ;;
1332 mipsel-*-openbsd*) machine=pmax ;;
1333 ns32k-*-openbsd*) machine=ns32000 ;;
1334 sparc-*-openbsd*) machine=sparc ;;
1335 vax-*-openbsd*) machine=vax ;;
1336 esac
1337 ;;
1338
1339 ## Acorn RISCiX:
1340 arm-acorn-riscix1.1* )
1341 machine=acorn opsys=riscix1-1
1342 ;;
1343 arm-acorn-riscix1.2* | arm-acorn-riscix )
1344 ## This name is riscix12 instead of riscix1.2
1345 ## to avoid a file name conflict on MSDOS.
1346 machine=acorn opsys=riscix12
1347 ;;
1348
1349 ## BSDI ports
1350 *-*-bsdi* )
1351 opsys=bsdi
1352 case "${canonical}" in
1353 i[345]86-*-bsdi*) machine=intel386 ;;
1354 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 1355 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
1356 esac
1357 case "${canonical}" in
1358 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
1359 *-*-bsdi2.0* ) opsys=bsdos2 ;;
1360 *-*-bsdi2* ) opsys=bsdos2-1 ;;
1361 *-*-bsdi3* ) opsys=bsdos3 ;;
1362 *-*-bsdi4* ) opsys=bsdos4 ;;
1363 esac
1364 ;;
1365
1366 ## Alliant machines
1367 ## Strictly speaking, we need the version of the alliant operating
1368 ## system to choose the right machine file, but currently the
1369 ## configuration name doesn't tell us enough to choose the right
1370 ## one; we need to give alliants their own operating system name to
1371 ## do this right. When someone cares, they can help us.
1372 fx80-alliant-* )
1373 machine=alliant4 opsys=bsd4-2
1374 ;;
1375 i860-alliant-* )
1376 machine=alliant-2800 opsys=bsd4-3
1377 ;;
1378
1379 ## Alpha (DEC) machines.
1380 alpha*-dec-osf* )
1381 machine=alpha opsys=osf1
1382 # This is needed to find X11R6.1 libraries for certain tests.
1383 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
1384 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
1385 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
1386 # due to non-traditional preprocessing with the current compiler
1387 # defaults. OSF 4 can also have that compiler version, and there
1388 # seems always to have been a usable /usr/bin/cpp.
1389 NON_GNU_CPP=/usr/bin/cpp
ca512671 1390 case "${canonical}" in
a55b799a 1391 alpha*-dec-osf[5-9]*)
bb17930d 1392 opsys=osf5-0 ;;
ca512671 1393 esac
ba4481b5
DL
1394 ;;
1395
1396 alpha*-*-linux-gnu* )
1397 machine=alpha opsys=gnu-linux
1398 ;;
1399
c4bb2108
DL
1400 arm*-*-linux-gnu* )
1401 machine=arm opsys=gnu-linux
1402 ;;
1403
1404 ppc-*-linux | \
1405 powerpc-*-linux* )
3aeecf97 1406 machine=macppc opsys=gnu-linux
c4bb2108
DL
1407 ;;
1408
ba4481b5
DL
1409 ## Altos 3068
1410 m68*-altos-sysv* )
1411 machine=altos opsys=usg5-2
1412 ;;
1413
1414 ## Amdahl UTS
1415 580-amdahl-sysv* )
1416 machine=amdahl opsys=usg5-2-2
1417 ;;
1418
1419 ## Apollo, Domain/OS
1420 m68*-apollo-* )
1421 machine=apollo opsys=bsd4-3
1422 ;;
1423
1424 ## AT&T 3b2, 3b5, 3b15, 3b20
1425 we32k-att-sysv* )
1426 machine=att3b opsys=usg5-2-2
1427 ;;
1428
1429 ## AT&T 3b1 - The Mighty Unix PC!
1430 m68*-att-sysv* )
1431 machine=7300 opsys=usg5-2-2
1432 ;;
1433
1434 ## Bull dpx20
1435 rs6000-bull-bosx* )
1436 machine=ibmrs6000 opsys=aix3-2
1437 ;;
1438
1439 ## Bull dpx2
1440 m68*-bull-sysv3* )
1441 machine=dpx2 opsys=usg5-3
1442 ;;
1443
1444 ## Bull sps7
1445 m68*-bull-sysv2* )
1446 machine=sps7 opsys=usg5-2
1447 ;;
1448
1449 ## CCI 5/32, 6/32 -- see "Tahoe".
1450
1451 ## Celerity
1452 ## I don't know what configuration name to use for this; config.sub
1453 ## doesn't seem to know anything about it. Hey, Celerity users, get
1454 ## in touch with us!
1455 celerity-celerity-bsd* )
1456 machine=celerity opsys=bsd4-2
1457 ;;
1458
1459 ## Clipper
1460 ## What operating systems does this chip run that Emacs has been
1461 ## tested on?
1462 clipper-* )
1463 machine=clipper
1464 ## We'll use the catch-all code at the bottom to guess the
1465 ## operating system.
1466 ;;
1467
1468 ## Convex
1469 *-convex-bsd* | *-convex-convexos* )
1470 machine=convex opsys=bsd4-3
1471 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
1472 NON_GNU_CPP="cc -E -P"
1473 ;;
1474
1475 ## Cubix QBx/386
1476 i[3456]86-cubix-sysv* )
1477 machine=intel386 opsys=usg5-3
1478 ;;
1479
1480 ## Cydra 5
1481 cydra*-cydrome-sysv* )
1482 machine=cydra5 opsys=usg5-3
1483 ;;
1484
1485 ## Data General AViiON Machines
1486 ## DG changed naming conventions with the release of 5.4.4.10, they
1487 ## dropped the initial 5.4 but left the intervening R. Because of the
1488 ## R this shouldn't conflict with older versions of the OS (which I
1489 ## think were named like dgux4.*). In addition, DG new AViiONs series
1490 ## uses either Motorola M88k or Intel Pentium CPUs.
1491 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
1492 machine=aviion opsys=dgux4
1493 ;;
1494 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
1495 ## This name is dgux5-4-3 instead of dgux5-4r3
1496 ## to avoid a file name conflict on MSDOS.
1497 machine=aviion opsys=dgux5-4-3
1498 ;;
1499 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
1500 machine=aviion opsys=dgux5-4r2
1501 ;;
1502 m88k-dg-dgux* )
1503 machine=aviion opsys=dgux
1504 ;;
1505
1506 ## Data General AViiON Intel (x86) Machines
1507 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
1508 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
1509 i[345]86-dg-dguxR4* )
1510 machine=aviion-intel opsys=dgux4
1511 ;;
1512
1513 ## DECstations
1514 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1515 machine=pmax opsys=bsd4-2
1516 ;;
1517 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1518 machine=pmax opsys=bsd4-3
1519 ;;
1520 mips-dec-ultrix* )
1521 machine=pmax opsys=ultrix4-3
1522 ;;
1523 mips-dec-osf* )
1524 machine=pmax opsys=osf1
1525 ;;
1526 mips-dec-mach_bsd4.3* )
1527 machine=pmax opsys=mach-bsd4-3
1528 ;;
1529
1530 ## Motorola Delta machines
1531 m68k-motorola-sysv* | m68000-motorola-sysv* )
1532 machine=delta opsys=usg5-3
1533 if test -z "`type gnucc | grep 'not found'`"
1534 then
1535 if test -s /etc/167config
1536 then CC="gnucc -m68040"
1537 else CC="gnucc -m68881"
1538 fi
1539 else
1540 if test -z "`type gcc | grep 'not found'`"
1541 then CC=gcc
1542 else CC=cc
1543 fi
1544 fi
1545 ;;
1546 m88k-motorola-sysv4* )
1547 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1548 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1549 # I hope there are not other 4.0 versions for this machine
1550 # which really need usg5-4 instead.
1551 machine=delta88k opsys=usg5-4-2
1552 ;;
1553 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1554 machine=delta88k opsys=usg5-3
1555 ;;
1556
1557 ## Dual machines
1558 m68*-dual-sysv* )
1559 machine=dual opsys=usg5-2
1560 ;;
1561 m68*-dual-uniplus* )
1562 machine=dual opsys=unipl5-2
1563 ;;
1564
1565 ## Elxsi 6400
1566 elxsi-elxsi-sysv* )
1567 machine=elxsi opsys=usg5-2
1568 ;;
1569
1570 ## Encore machines
1571 ns16k-encore-bsd* )
1572 machine=ns16000 opsys=umax
1573 ;;
1574
65171e3a
DL
1575 ## The GEC 63 - apparently, this port isn't really finished yet.
1576 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
1577
1578 ## Gould Power Node and NP1
1579 pn-gould-bsd4.2* )
1580 machine=gould opsys=bsd4-2
1581 ;;
1582 pn-gould-bsd4.3* )
1583 machine=gould opsys=bsd4-3
1584 ;;
1585 np1-gould-bsd* )
1586 machine=gould-np1 opsys=bsd4-3
1587 ;;
1588
1589 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
1590 ## as far as Emacs is concerned).
1591 m88k-harris-cxux* )
1592 # Build needs to be different on 7.0 and later releases
1593 case "`uname -r`" in
1594 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
1595 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
1596 esac
1597 NON_GNU_CPP="/lib/cpp"
1598 ;;
1599 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
1600 m68k-harris-cxux* )
1601 machine=nh3000 opsys=cxux
1602 ;;
1603 ## Harris power pc NightHawk running Power UNIX (Series 6000)
1604 powerpc-harris-powerunix )
1605 machine=nh6000 opsys=powerunix
1606 NON_GNU_CPP="cc -Xo -E -P"
1607 ;;
1608 ## SR2001/SR2201 running HI-UX/MPP
1609 hppa1.1-hitachi-hiuxmpp* )
1610 machine=sr2k opsys=hiuxmpp
1611 ;;
89a336fa
GM
1612 hppa1.1-hitachi-hiuxwe2* )
1613 machine=sr2k opsys=hiuxwe2
1614 ;;
ba4481b5
DL
1615 ## Honeywell XPS100
1616 xps*-honeywell-sysv* )
1617 machine=xps100 opsys=usg5-2
1618 ;;
1619
1620 ## HP 9000 series 200 or 300
1621 m68*-hp-bsd* )
1622 machine=hp9000s300 opsys=bsd4-3
1623 ;;
1624 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
1625 m68*-hp-hpux* )
1626 case "`uname -r`" in
1627 ## Someone's system reports A.B8.05 for this.
1628 ## I wonder what other possibilities there are.
1629 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
1630 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
1631 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
1632 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
1633 *) machine=hp9000s300 opsys=hpux ;;
1634 esac
1635 ;;
1636
1637 ## HP 9000 series 700 and 800, running HP/UX
1638 hppa*-hp-hpux7* )
1639 machine=hp800 opsys=hpux
1640 ;;
1641 hppa*-hp-hpux8* )
1642 machine=hp800 opsys=hpux8
1643 ;;
1644 hppa*-hp-hpux9shr* )
1645 machine=hp800 opsys=hpux9shr
1646 ;;
1647 hppa*-hp-hpux9* )
1648 machine=hp800 opsys=hpux9
1649 ;;
cc227489 1650 hppa*-hp-hpux10* )
ba4481b5
DL
1651 machine=hp800 opsys=hpux10
1652 ;;
cc227489
MB
1653 hppa*-hp-hpux1[1-9]* )
1654 machine=hp800 opsys=hpux11
1655 ;;
ba4481b5
DL
1656
1657 ## HP 9000 series 700 and 800, running HP/UX
1658 hppa*-hp-hpux* )
1659 ## Cross-compilation? Nah!
1660 case "`uname -r`" in
1661 ## Someone's system reports A.B8.05 for this.
1662 ## I wonder what other possibilities there are.
1663 *.B8.* ) machine=hp800 opsys=hpux8 ;;
1664 *.08.* ) machine=hp800 opsys=hpux8 ;;
1665 *.09.* ) machine=hp800 opsys=hpux9 ;;
1666 *) machine=hp800 opsys=hpux10 ;;
1667 esac
1668 ;;
1669 hppa*-*-nextstep* )
1670 machine=hp800 opsys=nextstep
1671 ;;
1672
1673 ## Orion machines
1674 orion-orion-bsd* )
1675 machine=orion opsys=bsd4-2
1676 ;;
1677 clipper-orion-bsd* )
1678 machine=orion105 opsys=bsd4-2
1679 ;;
1680
1681 ## IBM machines
1682 i[3456]86-ibm-aix1.1* )
1683 machine=ibmps2-aix opsys=usg5-2-2
1684 ;;
1685 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
1686 machine=ibmps2-aix opsys=usg5-3
1687 ;;
1688 i370-ibm-aix*)
1689 machine=ibm370aix opsys=usg5-3
1690 ;;
138f0859
GM
1691 s390-*-linux-gnu)
1692 machine=ibms390 opsys=gnu-linux
1693 ;;
ba4481b5
DL
1694 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
1695 machine=ibmrs6000 opsys=aix3-1
1696 ;;
1697 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
1698 machine=ibmrs6000 opsys=aix3-2-5
1699 ;;
1700 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
1701 machine=ibmrs6000 opsys=aix4-1
1702 ;;
1703 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
1704 machine=ibmrs6000 opsys=aix4-2
1705 ;;
1706 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
1707 machine=ibmrs6000 opsys=aix4
1708 ;;
1709 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
1710 machine=ibmrs6000 opsys=aix4-1
1711 ;;
1712 rs6000-ibm-aix* | powerpc-ibm-aix* )
1713 machine=ibmrs6000 opsys=aix3-2
1714 ;;
1715 romp-ibm-bsd4.3* )
1716 machine=ibmrt opsys=bsd4-3
1717 ;;
1718 romp-ibm-bsd4.2* )
1719 machine=ibmrt opsys=bsd4-2
1720 ;;
1721 romp-ibm-aos4.3* )
1722 machine=ibmrt opsys=bsd4-3
1723 ;;
1724 romp-ibm-aos4.2* )
1725 machine=ibmrt opsys=bsd4-2
1726 ;;
1727 romp-ibm-aos* )
1728 machine=ibmrt opsys=bsd4-3
1729 ;;
1730 romp-ibm-bsd* )
1731 machine=ibmrt opsys=bsd4-3
1732 ;;
1733 romp-ibm-aix* )
1734 machine=ibmrt-aix opsys=usg5-2-2
1735 ;;
1736
1737 ## Integrated Solutions `Optimum V'
1738 m68*-isi-bsd4.2* )
1739 machine=isi-ov opsys=bsd4-2
1740 ;;
1741 m68*-isi-bsd4.3* )
1742 machine=isi-ov opsys=bsd4-3
1743 ;;
1744
1745 ## Intel 386 machines where we do care about the manufacturer
1746 i[3456]86-intsys-sysv* )
1747 machine=is386 opsys=usg5-2-2
1748 ;;
1749
1750 ## Prime EXL
1751 i[3456]86-prime-sysv* )
1752 machine=i386 opsys=usg5-3
1753 ;;
1754
1755 ## Sequent Symmetry running Dynix
1756 i[3456]86-sequent-bsd* )
1757 machine=symmetry opsys=bsd4-3
1758 ;;
1759
1760 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
1761 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
1762 machine=sequent-ptx opsys=ptx4
1763 NON_GNU_CPP=/lib/cpp
1764 ;;
1765
1766 ## Sequent Symmetry running DYNIX/ptx
1767 ## Use the old cpp rather than the newer ANSI one.
1768 i[3456]86-sequent-ptx* )
1769 machine=sequent-ptx opsys=ptx
1770 NON_GNU_CPP="/lib/cpp"
1771 ;;
1772
1773 ## ncr machine running svr4.3.
1774 i[3456]86-ncr-sysv4.3 )
1775 machine=ncr386 opsys=usg5-4-3
1776 ;;
1777
1778 ## Unspecified sysv on an ncr machine defaults to svr4.2.
1779 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
1780 i[3456]86-ncr-sysv* )
1781 machine=ncr386 opsys=usg5-4-2
1782 ;;
1783
1784 ## Intel Paragon OSF/1
1785 i860-intel-osf1* )
1786 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
1787 ;;
1788
1789 ## Intel 860
1790 i860-*-sysv4* )
1791 machine=i860 opsys=usg5-4
1792 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
1793 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
1794 ;;
1795
c76e04a8
GM
1796 ## Macintosh PowerPC
1797 powerpc*-*-linux-gnu* )
1798 machine=macppc opsys=gnu-linux
1799 ;;
1800
ba4481b5
DL
1801 ## Masscomp machines
1802 m68*-masscomp-rtu* )
1803 machine=masscomp opsys=rtu
1804 ;;
1805
1806 ## Megatest machines
1807 m68*-megatest-bsd* )
1808 machine=mega68 opsys=bsd4-2
1809 ;;
1810
1811 ## Workstations sold by MIPS
1812 ## This is not necessarily all workstations using the MIPS processor -
1813 ## Irises are produced by SGI, and DECstations by DEC.
1814
1815 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
1816 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
1817 ## it gives for choosing between the alternatives seems to be "Use
1818 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
1819 ## the BSD world." I'll assume that these are instructions for
1820 ## handling two odd situations, and that every other situation
1821 ## should use mips.h and usg5-2-2, they being listed first.
1822 mips-mips-usg* )
1823 machine=mips4
1824 ## Fall through to the general code at the bottom to decide on the OS.
1825 ;;
1826 mips-mips-riscos4* )
1827 machine=mips4 opsys=bsd4-3
1828 NON_GNU_CC="cc -systype bsd43"
1829 NON_GNU_CPP="cc -systype bsd43 -E"
1830 ;;
1831 mips-mips-riscos5* )
1832 machine=mips4 opsys=riscos5
1833 NON_GNU_CC="cc -systype bsd43"
1834 NON_GNU_CPP="cc -systype bsd43 -E"
1835 ;;
1836 mips-mips-bsd* )
1837 machine=mips opsys=bsd4-3
1838 ;;
1839 mips-mips-* )
1840 machine=mips opsys=usg5-2-2
1841 ;;
1842
1843 ## NeXT
1844 m68*-next-* | m68k-*-nextstep* )
1845 machine=m68k opsys=nextstep
1846 ;;
1847
1848 ## The complete machine from National Semiconductor
1849 ns32k-ns-genix* )
1850 machine=ns32000 opsys=usg5-2
1851 ;;
1852
1853 ## NCR machines
1854 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
1855 machine=tower32 opsys=usg5-2-2
1856 ;;
1857 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
1858 machine=tower32v3 opsys=usg5-3
1859 ;;
1860
1861 ## NEC EWS4800
1862 mips-nec-sysv4*)
1863 machine=ews4800 opsys=ux4800
1864 ;;
1865
1866 ## Nixdorf Targon 31
1867 m68*-nixdorf-sysv* )
1868 machine=targon31 opsys=usg5-2-2
1869 ;;
1870
1871 ## Nu (TI or LMI)
1872 m68*-nu-sysv* )
1873 machine=nu opsys=usg5-2
1874 ;;
1875
1876 ## Plexus
1877 m68*-plexus-sysv* )
1878 machine=plexus opsys=usg5-2
1879 ;;
1880
1881 ## PowerPC reference platform
1882 powerpcle-*-solaris2* )
1883 machine=prep
1884 opsys=sol2-5
1885 ;;
1886
1887 ## Pyramid machines
1888 ## I don't really have any idea what sort of processor the Pyramid has,
1889 ## so I'm assuming it is its own architecture.
1890 pyramid-pyramid-bsd* )
1891 machine=pyramid opsys=bsd4-2
1892 ;;
1893
1894 ## Sequent Balance
1895 ns32k-sequent-bsd4.2* )
1896 machine=sequent opsys=bsd4-2
1897 ;;
1898 ns32k-sequent-bsd4.3* )
1899 machine=sequent opsys=bsd4-3
1900 ;;
1901
1902 ## Siemens Nixdorf
1903 mips-siemens-sysv* | mips-sni-sysv*)
1904 machine=mips-siemens opsys=usg5-4
1905 NON_GNU_CC=/usr/ccs/bin/cc
1906 NON_GNU_CPP=/usr/ccs/lib/cpp
1907 ;;
1908
1909 ## Silicon Graphics machines
1910 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
1911 m68*-sgi-iris3.5* )
1912 machine=irist opsys=iris3-5
1913 ;;
1914 m68*-sgi-iris3.6* | m68*-sgi-iris*)
1915 machine=irist opsys=iris3-6
1916 ;;
1917 ## Iris 4D
1918 mips-sgi-irix3* )
1919 machine=iris4d opsys=irix3-3
1920 ;;
1921 mips-sgi-irix4* )
1922 machine=iris4d opsys=irix4-0
1923 ;;
1924 mips-sgi-irix6.5 )
1925 machine=iris4d opsys=irix6-5
946173ad
DL
1926 # Without defining _LANGUAGE_C, things get masked out in the headers
1927 # so that, for instance, grepping for `free' in stdlib.h fails and
1928 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
1929 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 1930 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
1931 ;;
1932 mips-sgi-irix6* )
1933 machine=iris4d opsys=irix6-0
c4bb2108 1934 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
1935 # but presumably it does no harm.
1936 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 1937 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
1938 NON_GCC_TEST_OPTIONS=-32
1939 ;;
1940 mips-sgi-irix5.[01]* )
1941 machine=iris4d opsys=irix5-0
1942 ;;
1943 mips-sgi-irix5* | mips-sgi-irix* )
1944 machine=iris4d opsys=irix5-2
1945 ;;
1946
1947 ## SONY machines
1948 m68*-sony-bsd4.2* )
1949 machine=news opsys=bsd4-2
1950 ;;
1951 m68*-sony-bsd4.3* )
1952 machine=news opsys=bsd4-3
1953 ;;
1954 m68*-sony-newsos3* | m68*-sony-news3*)
1955 machine=news opsys=bsd4-3
1956 ;;
1957 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
1958 machine=news-risc opsys=bsd4-3
1959 ;;
1960 mips-sony-newsos6* )
1961 machine=news-r6 opsys=newsos6
1962 ;;
1963 mips-sony-news* )
1964 machine=news-risc opsys=newsos5
1965 ;;
1966
1967 ## Stride
1968 m68*-stride-sysv* )
1969 machine=stride opsys=usg5-2
1970 ;;
1971
1972 ## Suns
1973 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
1974 machine=sparc opsys=gnu-linux
1975 ;;
1976
d054101f 1977 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
1978 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
1979 | rs6000-*-solaris2*)
1980 case "${canonical}" in
1981 m68*-sunos1* ) machine=sun1 ;;
1982 m68*-sunos2* ) machine=sun2 ;;
1983 m68* ) machine=sun3 ;;
1984 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
1985 i[3456]86-*-* ) machine=intel386 ;;
1986 powerpcle* ) machine=powerpcle ;;
1987 powerpc* | rs6000* ) machine=ibmrs6000 ;;
1988 sparc* ) machine=sparc ;;
1989 * ) unported=yes ;;
1990 esac
1991 case "${canonical}" in
1992 ## The Sun386 didn't get past 4.0.
1993 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
1994 *-sunos4.0* ) opsys=sunos4-0 ;;
1995 *-sunos4.1.[3-9]*noshare )
1996 ## This name is sunos413 instead of sunos4-1-3
1997 ## to avoid a file name conflict on MSDOS.
1998 opsys=sunos413
1999 NON_GNU_CPP=/usr/lib/cpp
2000 NON_GCC_TEST_OPTIONS=-Bstatic
2001 GCC_TEST_OPTIONS=-static
2002 ;;
2003 *-sunos4.1.[3-9]* | *-sunos4shr*)
2004 opsys=sunos4shr
2005 NON_GNU_CPP=/usr/lib/cpp
2006 ;;
2007 *-sunos4* | *-sunos )
2008 opsys=sunos4-1
2009 NON_GCC_TEST_OPTIONS=-Bstatic
2010 GCC_TEST_OPTIONS=-static
2011 ;;
2012 *-sunos5.3* | *-solaris2.3* )
2013 opsys=sol2-3
2014 NON_GNU_CPP=/usr/ccs/lib/cpp
2015 ;;
2016 *-sunos5.4* | *-solaris2.4* )
2017 opsys=sol2-4
2018 NON_GNU_CPP=/usr/ccs/lib/cpp
2019 RANLIB="ar -ts"
2020 ;;
2021 *-sunos5.5* | *-solaris2.5* )
2022 opsys=sol2-5
2023 NON_GNU_CPP=/usr/ccs/lib/cpp
2024 RANLIB="ar -ts"
2025 ;;
2026 *-sunos5* | *-solaris* )
2027 opsys=sol2-5
2028 NON_GNU_CPP=/usr/ccs/lib/cpp
2029 ;;
2030 * ) opsys=bsd4-2 ;;
2031 esac
2032 ## Watch out for a compiler that we know will not work.
2033 case "${canonical}" in
2034 *-solaris* | *-sunos5* )
2035 if [ "x$CC" = x/usr/ucb/cc ]; then
2036 ## /usr/ucb/cc doesn't work;
2037 ## we should find some other compiler that does work.
2038 unset CC
2039 fi
2040 ;;
2041 *) ;;
2042 esac
2043 ;;
2044 sparc-*-nextstep* )
2045 machine=sparc opsys=nextstep
2046 ;;
2047
2048 ## Tadpole 68k
2049 m68*-tadpole-sysv* )
2050 machine=tad68k opsys=usg5-3
2051 ;;
2052
2053 ## Tahoe machines
2054 tahoe-tahoe-bsd4.2* )
2055 machine=tahoe opsys=bsd4-2
2056 ;;
2057 tahoe-tahoe-bsd4.3* )
2058 machine=tahoe opsys=bsd4-3
2059 ;;
2060
2061 ## Tandem Integrity S2
2062 mips-tandem-sysv* )
2063 machine=tandem-s2 opsys=usg5-3
2064 ;;
2065
2066 ## Tektronix XD88
2067 m88k-tektronix-sysv3* )
2068 machine=tekxd88 opsys=usg5-3
2069 ;;
2070
2071 ## Tektronix 16000 box (6130?)
2072 ns16k-tektronix-bsd* )
2073 machine=ns16000 opsys=bsd4-2
2074 ;;
2075 ## Tektronix 4300
2076 ## src/m/tek4300.h hints that this is a m68k machine.
2077 m68*-tektronix-bsd* )
2078 machine=tek4300 opsys=bsd4-3
2079 ;;
2080
2081 ## Titan P2 or P3
2082 ## We seem to have lost the machine-description file titan.h!
2083 titan-titan-sysv* )
2084 machine=titan opsys=usg5-3
2085 ;;
2086
2087 ## Ustation E30 (SS5E)
2088 m68*-unisys-uniplus* )
2089 machine=ustation opsystem=unipl5-2
2090 ;;
2091
2092 ## Vaxen.
2093 vax-dec-* )
2094 machine=vax
2095 case "${canonical}" in
2096 *-bsd4.1* ) opsys=bsd4-1 ;;
2097 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
2098 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
2099 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
2100 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
2101 *-vms* ) opsys=vms ;;
2102 * ) unported=yes
2103 esac
2104 ;;
2105
2106 ## Whitechapel MG1
2107 ns16k-whitechapel-* )
2108 machine=mg1
2109 ## We don't know what sort of OS runs on these; we'll let the
2110 ## operating system guessing code below try.
2111 ;;
2112
2113 ## Wicat
2114 m68*-wicat-sysv* )
2115 machine=wicat opsys=usg5-2
2116 ;;
2117
f4988be7
GM
2118 ## IA-64
2119 ia64*-*-linux* )
2120 machine=ia64 opsys=gnu-linux
2121 ;;
2122
ba4481b5
DL
2123 ## Intel 386 machines where we don't care about the manufacturer
2124 i[3456]86-*-* )
2125 machine=intel386
2126 case "${canonical}" in
9f817ea4 2127 *-lynxos* ) opsys=lynxos ;;
ba4481b5
DL
2128 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
2129 *-isc2.2* ) opsys=isc2-2 ;;
2130 *-isc4.0* ) opsys=isc4-0 ;;
2131 *-isc4.* ) opsys=isc4-1
2132 GCC_TEST_OPTIONS=-posix
2133 NON_GCC_TEST_OPTIONS=-Xp
2134 ;;
2135 *-isc* ) opsys=isc3-0 ;;
2136 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
2137 *-esix* ) opsys=esix ;;
2138 *-xenix* ) opsys=xenix ;;
2139 *-linux-gnu* ) opsys=gnu-linux ;;
2140 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 2141 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
2142 NON_GNU_CPP=/lib/cpp
2143 # Prevent -belf from being passed to $CPP.
2144 # /lib/cpp does not accept it.
2145 OVERRIDE_CPPFLAGS=" "
2146 ;;
2147 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2148 *-386bsd* ) opsys=386bsd ;;
2149 *-freebsd* ) opsys=freebsd ;;
2150 *-nextstep* ) opsys=nextstep ;;
2151 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2152 esac
2153 ;;
2154
2155 ## m68k Linux-based GNU system
2156 m68k-*-linux-gnu* )
2157 machine=m68k opsys=gnu-linux
2158 ;;
2159
2160 ## Mips Linux-based GNU system
2161 mips-*-linux-gnu* )
2162 machine=mips opsys=gnu-linux
2163 ;;
2164
2165 ## UXP/DS
2166 sparc-fujitsu-sysv4* )
2167 machine=sparc opsys=uxpds
2168 NON_GNU_CPP=/usr/ccs/lib/cpp
2169 RANLIB="ar -ts"
2170 ;;
2171
2172 ## UXP/V
2173 f301-fujitsu-uxpv4.1)
2174 machine=f301 opsys=uxpv
2175 ;;
2176
2177 * )
2178 unported=yes
2179 ;;
2180esac
2181
2182### If the code above didn't choose an operating system, just choose
2183### an operating system based on the configuration name. You really
2184### only want to use this when you have no idea what the right
2185### operating system is; if you know what operating systems a machine
2186### runs, it's cleaner to make it explicit in the case statement
2187### above.
2188if test x"${opsys}" = x; then
2189 case "${canonical}" in
2190 *-gnu* ) opsys=gnu ;;
2191 *-bsd4.[01] ) opsys=bsd4-1 ;;
2192 *-bsd4.2 ) opsys=bsd4-2 ;;
2193 *-bsd4.3 ) opsys=bsd4-3 ;;
2194 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
2195 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
2196 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
2197 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
2198 *-sysv4.2uw* ) opsys=unixware ;;
2199 *-sysv4.1* | *-sysvr4.1* )
2200 NON_GNU_CPP=/usr/lib/cpp
2201 opsys=usg5-4 ;;
2202 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2203 if [ x$NON_GNU_CPP = x ]; then
2204 if [ -f /usr/ccs/lib/cpp ]; then
2205 NON_GNU_CPP=/usr/ccs/lib/cpp
2206 else
2207 NON_GNU_CPP=/lib/cpp
2208 fi
2209 fi
2210 opsys=usg5-4-2 ;;
2211 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2212 * )
2213 unported=yes
2214 ;;
2215 esac
2216fi
2217
ba4481b5 2218if test $unported = yes; then
ba5da88a 2219 { { echo "$as_me:2219: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2220Check \`etc/MACHINES' for recognized configuration names." >&5
2221echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2222Check \`etc/MACHINES' for recognized configuration names." >&2;}
2223 { (exit 1); exit 1; }; }
ba4481b5
DL
2224fi
2225
2226machfile="m/${machine}.h"
2227opsysfile="s/${opsys}.h"
2228
ba4481b5
DL
2229#### Choose a compiler.
2230test -n "$CC" && cc_specified=yes
2231
2232# Save the value of CFLAGS that the user specified.
2233SPECIFIED_CFLAGS="$CFLAGS"
2234
2235case ${with_gcc} in
2236 "yes" ) CC="gcc" GCC=yes ;;
2237 "no" ) : ${CC=cc} ;;
503d2be0
AS
2238 * )
2239esac
2240ac_ext=c
2241ac_cpp='$CPP $CPPFLAGS'
2242ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2243ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2244ac_compiler_gnu=$ac_cv_c_compiler_gnu
2245if test -n "$ac_tool_prefix"; then
2246 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2247set dummy ${ac_tool_prefix}gcc; ac_word=$2
ba5da88a 2248echo "$as_me:2248: checking for $ac_word" >&5
503d2be0
AS
2249echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2250if test "${ac_cv_prog_CC+set}" = set; then
2251 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2252else
2253 if test -n "$CC"; then
2254 ac_cv_prog_CC="$CC" # Let the user override the test.
2255else
503d2be0
AS
2256 ac_save_IFS=$IFS; IFS=$ac_path_separator
2257ac_dummy="$PATH"
2258for ac_dir in $ac_dummy; do
2259 IFS=$ac_save_IFS
2260 test -z "$ac_dir" && ac_dir=.
2261 $as_executable_p "$ac_dir/$ac_word" || continue
2262ac_cv_prog_CC="${ac_tool_prefix}gcc"
ba5da88a 2263echo "$as_me:2263: found $ac_dir/$ac_word" >&5
503d2be0
AS
2264break
2265done
2266
ba4481b5
DL
2267fi
2268fi
503d2be0 2269CC=$ac_cv_prog_CC
ba4481b5 2270if test -n "$CC"; then
ba5da88a 2271 echo "$as_me:2271: result: $CC" >&5
503d2be0
AS
2272echo "${ECHO_T}$CC" >&6
2273else
ba5da88a 2274 echo "$as_me:2274: result: no" >&5
503d2be0
AS
2275echo "${ECHO_T}no" >&6
2276fi
2277
2278fi
2279if test -z "$ac_cv_prog_CC"; then
2280 ac_ct_CC=$CC
2281 # Extract the first word of "gcc", so it can be a program name with args.
2282set dummy gcc; ac_word=$2
ba5da88a 2283echo "$as_me:2283: checking for $ac_word" >&5
503d2be0
AS
2284echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2285if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2286 echo $ECHO_N "(cached) $ECHO_C" >&6
2287else
2288 if test -n "$ac_ct_CC"; then
2289 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2290else
2291 ac_save_IFS=$IFS; IFS=$ac_path_separator
2292ac_dummy="$PATH"
2293for ac_dir in $ac_dummy; do
2294 IFS=$ac_save_IFS
2295 test -z "$ac_dir" && ac_dir=.
2296 $as_executable_p "$ac_dir/$ac_word" || continue
2297ac_cv_prog_ac_ct_CC="gcc"
ba5da88a 2298echo "$as_me:2298: found $ac_dir/$ac_word" >&5
503d2be0
AS
2299break
2300done
2301
2302fi
2303fi
2304ac_ct_CC=$ac_cv_prog_ac_ct_CC
2305if test -n "$ac_ct_CC"; then
ba5da88a 2306 echo "$as_me:2306: result: $ac_ct_CC" >&5
503d2be0 2307echo "${ECHO_T}$ac_ct_CC" >&6
ba4481b5 2308else
ba5da88a 2309 echo "$as_me:2309: result: no" >&5
503d2be0
AS
2310echo "${ECHO_T}no" >&6
2311fi
2312
2313 CC=$ac_ct_CC
2314else
2315 CC="$ac_cv_prog_CC"
ba4481b5
DL
2316fi
2317
2318if test -z "$CC"; then
503d2be0
AS
2319 if test -n "$ac_tool_prefix"; then
2320 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2321set dummy ${ac_tool_prefix}cc; ac_word=$2
ba5da88a 2322echo "$as_me:2322: checking for $ac_word" >&5
503d2be0
AS
2323echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2324if test "${ac_cv_prog_CC+set}" = set; then
2325 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2326else
2327 if test -n "$CC"; then
2328 ac_cv_prog_CC="$CC" # Let the user override the test.
2329else
503d2be0
AS
2330 ac_save_IFS=$IFS; IFS=$ac_path_separator
2331ac_dummy="$PATH"
2332for ac_dir in $ac_dummy; do
2333 IFS=$ac_save_IFS
2334 test -z "$ac_dir" && ac_dir=.
2335 $as_executable_p "$ac_dir/$ac_word" || continue
2336ac_cv_prog_CC="${ac_tool_prefix}cc"
ba5da88a 2337echo "$as_me:2337: found $ac_dir/$ac_word" >&5
503d2be0
AS
2338break
2339done
2340
2341fi
2342fi
2343CC=$ac_cv_prog_CC
2344if test -n "$CC"; then
ba5da88a 2345 echo "$as_me:2345: result: $CC" >&5
503d2be0
AS
2346echo "${ECHO_T}$CC" >&6
2347else
ba5da88a 2348 echo "$as_me:2348: result: no" >&5
503d2be0
AS
2349echo "${ECHO_T}no" >&6
2350fi
2351
2352fi
2353if test -z "$ac_cv_prog_CC"; then
2354 ac_ct_CC=$CC
2355 # Extract the first word of "cc", so it can be a program name with args.
2356set dummy cc; ac_word=$2
ba5da88a 2357echo "$as_me:2357: checking for $ac_word" >&5
503d2be0
AS
2358echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2359if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2360 echo $ECHO_N "(cached) $ECHO_C" >&6
2361else
2362 if test -n "$ac_ct_CC"; then
2363 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2364else
2365 ac_save_IFS=$IFS; IFS=$ac_path_separator
2366ac_dummy="$PATH"
2367for ac_dir in $ac_dummy; do
2368 IFS=$ac_save_IFS
2369 test -z "$ac_dir" && ac_dir=.
2370 $as_executable_p "$ac_dir/$ac_word" || continue
2371ac_cv_prog_ac_ct_CC="cc"
ba5da88a 2372echo "$as_me:2372: found $ac_dir/$ac_word" >&5
503d2be0
AS
2373break
2374done
2375
2376fi
2377fi
2378ac_ct_CC=$ac_cv_prog_ac_ct_CC
2379if test -n "$ac_ct_CC"; then
ba5da88a 2380 echo "$as_me:2380: result: $ac_ct_CC" >&5
503d2be0
AS
2381echo "${ECHO_T}$ac_ct_CC" >&6
2382else
ba5da88a 2383 echo "$as_me:2383: result: no" >&5
503d2be0
AS
2384echo "${ECHO_T}no" >&6
2385fi
2386
2387 CC=$ac_ct_CC
2388else
2389 CC="$ac_cv_prog_CC"
2390fi
2391
2392fi
2393if test -z "$CC"; then
2394 # Extract the first word of "cc", so it can be a program name with args.
2395set dummy cc; ac_word=$2
ba5da88a 2396echo "$as_me:2396: checking for $ac_word" >&5
503d2be0
AS
2397echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2398if test "${ac_cv_prog_CC+set}" = set; then
2399 echo $ECHO_N "(cached) $ECHO_C" >&6
2400else
2401 if test -n "$CC"; then
2402 ac_cv_prog_CC="$CC" # Let the user override the test.
2403else
2404 ac_prog_rejected=no
2405 ac_save_IFS=$IFS; IFS=$ac_path_separator
2406ac_dummy="$PATH"
2407for ac_dir in $ac_dummy; do
2408 IFS=$ac_save_IFS
2409 test -z "$ac_dir" && ac_dir=.
2410 $as_executable_p "$ac_dir/$ac_word" || continue
2411if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2412 ac_prog_rejected=yes
2413 continue
2414fi
2415ac_cv_prog_CC="cc"
ba5da88a 2416echo "$as_me:2416: found $ac_dir/$ac_word" >&5
503d2be0
AS
2417break
2418done
2419
ba4481b5
DL
2420if test $ac_prog_rejected = yes; then
2421 # We found a bogon in the path, so make sure we never use it.
2422 set dummy $ac_cv_prog_CC
2423 shift
503d2be0 2424 if test $# != 0; then
ba4481b5
DL
2425 # We chose a different compiler from the bogus one.
2426 # However, it has the same basename, so the bogon will be chosen
2427 # first if we set CC to just the basename; use the full file name.
2428 shift
503d2be0 2429 set dummy "$ac_dir/$ac_word" ${1+"$@"}
ba4481b5
DL
2430 shift
2431 ac_cv_prog_CC="$@"
2432 fi
2433fi
2434fi
2435fi
503d2be0 2436CC=$ac_cv_prog_CC
ba4481b5 2437if test -n "$CC"; then
ba5da88a 2438 echo "$as_me:2438: result: $CC" >&5
503d2be0 2439echo "${ECHO_T}$CC" >&6
ba4481b5 2440else
ba5da88a 2441 echo "$as_me:2441: result: no" >&5
503d2be0 2442echo "${ECHO_T}no" >&6
ba4481b5
DL
2443fi
2444
503d2be0
AS
2445fi
2446if test -z "$CC"; then
2447 if test -n "$ac_tool_prefix"; then
2448 for ac_prog in cl
2449 do
2450 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2451set dummy $ac_tool_prefix$ac_prog; ac_word=$2
ba5da88a 2452echo "$as_me:2452: checking for $ac_word" >&5
503d2be0
AS
2453echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2454if test "${ac_cv_prog_CC+set}" = set; then
2455 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2456else
2457 if test -n "$CC"; then
2458 ac_cv_prog_CC="$CC" # Let the user override the test.
2459else
503d2be0
AS
2460 ac_save_IFS=$IFS; IFS=$ac_path_separator
2461ac_dummy="$PATH"
2462for ac_dir in $ac_dummy; do
2463 IFS=$ac_save_IFS
2464 test -z "$ac_dir" && ac_dir=.
2465 $as_executable_p "$ac_dir/$ac_word" || continue
2466ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
ba5da88a 2467echo "$as_me:2467: found $ac_dir/$ac_word" >&5
503d2be0
AS
2468break
2469done
2470
c4bb2108
DL
2471fi
2472fi
503d2be0 2473CC=$ac_cv_prog_CC
c4bb2108 2474if test -n "$CC"; then
ba5da88a 2475 echo "$as_me:2475: result: $CC" >&5
503d2be0 2476echo "${ECHO_T}$CC" >&6
c4bb2108 2477else
ba5da88a 2478 echo "$as_me:2478: result: no" >&5
503d2be0
AS
2479echo "${ECHO_T}no" >&6
2480fi
2481
2482 test -n "$CC" && break
2483 done
2484fi
2485if test -z "$CC"; then
2486 ac_ct_CC=$CC
2487 for ac_prog in cl
2488do
2489 # Extract the first word of "$ac_prog", so it can be a program name with args.
2490set dummy $ac_prog; ac_word=$2
ba5da88a 2491echo "$as_me:2491: checking for $ac_word" >&5
503d2be0
AS
2492echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2493if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2494 echo $ECHO_N "(cached) $ECHO_C" >&6
2495else
2496 if test -n "$ac_ct_CC"; then
2497 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2498else
2499 ac_save_IFS=$IFS; IFS=$ac_path_separator
2500ac_dummy="$PATH"
2501for ac_dir in $ac_dummy; do
2502 IFS=$ac_save_IFS
2503 test -z "$ac_dir" && ac_dir=.
2504 $as_executable_p "$ac_dir/$ac_word" || continue
2505ac_cv_prog_ac_ct_CC="$ac_prog"
ba5da88a 2506echo "$as_me:2506: found $ac_dir/$ac_word" >&5
503d2be0
AS
2507break
2508done
2509
c4bb2108 2510fi
503d2be0
AS
2511fi
2512ac_ct_CC=$ac_cv_prog_ac_ct_CC
2513if test -n "$ac_ct_CC"; then
ba5da88a 2514 echo "$as_me:2514: result: $ac_ct_CC" >&5
503d2be0
AS
2515echo "${ECHO_T}$ac_ct_CC" >&6
2516else
ba5da88a 2517 echo "$as_me:2517: result: no" >&5
503d2be0 2518echo "${ECHO_T}no" >&6
ba4481b5
DL
2519fi
2520
503d2be0
AS
2521 test -n "$ac_ct_CC" && break
2522done
ba4481b5 2523
503d2be0
AS
2524 CC=$ac_ct_CC
2525fi
2526
2527fi
ba4481b5 2528
ba5da88a 2529test -z "$CC" && { { echo "$as_me:2529: error: no acceptable cc found in \$PATH" >&5
503d2be0
AS
2530echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
2531 { (exit 1); exit 1; }; }
c4bb2108 2532
503d2be0 2533# Provide some information about the compiler.
ba5da88a 2534echo "$as_me:2534:" \
503d2be0
AS
2535 "checking for C compiler version" >&5
2536ac_compiler=`set X $ac_compile; echo $2`
ba5da88a 2537{ (eval echo "$as_me:2537: \"$ac_compiler --version </dev/null >&5\"") >&5
503d2be0
AS
2538 (eval $ac_compiler --version </dev/null >&5) 2>&5
2539 ac_status=$?
ba5da88a 2540 echo "$as_me:2540: \$? = $ac_status" >&5
503d2be0 2541 (exit $ac_status); }
ba5da88a 2542{ (eval echo "$as_me:2542: \"$ac_compiler -v </dev/null >&5\"") >&5
503d2be0
AS
2543 (eval $ac_compiler -v </dev/null >&5) 2>&5
2544 ac_status=$?
ba5da88a 2545 echo "$as_me:2545: \$? = $ac_status" >&5
503d2be0 2546 (exit $ac_status); }
ba5da88a 2547{ (eval echo "$as_me:2547: \"$ac_compiler -V </dev/null >&5\"") >&5
503d2be0
AS
2548 (eval $ac_compiler -V </dev/null >&5) 2>&5
2549 ac_status=$?
ba5da88a 2550 echo "$as_me:2550: \$? = $ac_status" >&5
503d2be0
AS
2551 (exit $ac_status); }
2552
2553cat >conftest.$ac_ext <<_ACEOF
ba5da88a 2554#line 2554 "configure"
ba4481b5 2555#include "confdefs.h"
c4bb2108 2556
503d2be0
AS
2557int
2558main ()
2559{
2560
2561 ;
2562 return 0;
2563}
2564_ACEOF
2565ac_clean_files_save=$ac_clean_files
2566ac_clean_files="$ac_clean_files a.out a.exe"
2567# Try to create an executable without -o first, disregard a.out.
2568# It will help us diagnose broken compilers, and finding out an intuition
2569# of exeext.
ba5da88a 2570echo "$as_me:2570: checking for C compiler default output" >&5
503d2be0
AS
2571echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2572ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
ba5da88a 2573if { (eval echo "$as_me:2573: \"$ac_link_default\"") >&5
503d2be0
AS
2574 (eval $ac_link_default) 2>&5
2575 ac_status=$?
ba5da88a 2576 echo "$as_me:2576: \$? = $ac_status" >&5
503d2be0
AS
2577 (exit $ac_status); }; then
2578 # Find the output, starting from the most likely. This scheme is
2579# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2580# resort.
2581for ac_file in `ls a.exe conftest.exe 2>/dev/null;
2582 ls a.out conftest 2>/dev/null;
2583 ls a.* conftest.* 2>/dev/null`; do
2584 case $ac_file in
2585 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2586 a.out ) # We found the default executable, but exeext='' is most
2587 # certainly right.
2588 break;;
2589 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2590 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2591 export ac_cv_exeext
2592 break;;
2593 * ) break;;
2594 esac
2595done
2596else
2597 echo "$as_me: failed program was:" >&5
2598cat conftest.$ac_ext >&5
ba5da88a 2599{ { echo "$as_me:2599: error: C compiler cannot create executables" >&5
503d2be0
AS
2600echo "$as_me: error: C compiler cannot create executables" >&2;}
2601 { (exit 77); exit 77; }; }
2602fi
2603
2604ac_exeext=$ac_cv_exeext
ba5da88a 2605echo "$as_me:2605: result: $ac_file" >&5
503d2be0
AS
2606echo "${ECHO_T}$ac_file" >&6
2607
2608# Check the compiler produces executables we can run. If not, either
2609# the compiler is broken, or we cross compile.
ba5da88a 2610echo "$as_me:2610: checking whether the C compiler works" >&5
503d2be0
AS
2611echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2612# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2613# If not cross compiling, check that we can run a simple program.
2614if test "$cross_compiling" != yes; then
2615 if { ac_try='./$ac_file'
ba5da88a 2616 { (eval echo "$as_me:2616: \"$ac_try\"") >&5
503d2be0
AS
2617 (eval $ac_try) 2>&5
2618 ac_status=$?
ba5da88a 2619 echo "$as_me:2619: \$? = $ac_status" >&5
503d2be0
AS
2620 (exit $ac_status); }; }; then
2621 cross_compiling=no
ba4481b5 2622 else
503d2be0
AS
2623 if test "$cross_compiling" = maybe; then
2624 cross_compiling=yes
2625 else
ba5da88a 2626 { { echo "$as_me:2626: error: cannot run C compiled programs.
503d2be0
AS
2627If you meant to cross compile, use \`--host'." >&5
2628echo "$as_me: error: cannot run C compiled programs.
2629If you meant to cross compile, use \`--host'." >&2;}
2630 { (exit 1); exit 1; }; }
2631 fi
ba4481b5 2632 fi
503d2be0 2633fi
ba5da88a 2634echo "$as_me:2634: result: yes" >&5
503d2be0
AS
2635echo "${ECHO_T}yes" >&6
2636
2637rm -f a.out a.exe conftest$ac_cv_exeext
2638ac_clean_files=$ac_clean_files_save
2639# Check the compiler produces executables we can run. If not, either
2640# the compiler is broken, or we cross compile.
ba5da88a 2641echo "$as_me:2641: checking whether we are cross compiling" >&5
503d2be0 2642echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
ba5da88a 2643echo "$as_me:2643: result: $cross_compiling" >&5
503d2be0
AS
2644echo "${ECHO_T}$cross_compiling" >&6
2645
ba5da88a 2646echo "$as_me:2646: checking for executable suffix" >&5
503d2be0 2647echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
ba5da88a 2648if { (eval echo "$as_me:2648: \"$ac_link\"") >&5
503d2be0
AS
2649 (eval $ac_link) 2>&5
2650 ac_status=$?
ba5da88a 2651 echo "$as_me:2651: \$? = $ac_status" >&5
503d2be0
AS
2652 (exit $ac_status); }; then
2653 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2654# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2655# work properly (i.e., refer to `conftest.exe'), while it won't with
2656# `rm'.
2657for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2658 case $ac_file in
2659 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2660 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2661 export ac_cv_exeext
2662 break;;
2663 * ) break;;
2664 esac
2665done
ba4481b5 2666else
ba5da88a 2667 { { echo "$as_me:2667: error: cannot compute EXEEXT: cannot compile and link" >&5
503d2be0
AS
2668echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2669 { (exit 1); exit 1; }; }
ba4481b5 2670fi
ba4481b5 2671
503d2be0 2672rm -f conftest$ac_cv_exeext
ba5da88a 2673echo "$as_me:2673: result: $ac_cv_exeext" >&5
503d2be0 2674echo "${ECHO_T}$ac_cv_exeext" >&6
ba4481b5 2675
503d2be0
AS
2676rm -f conftest.$ac_ext
2677EXEEXT=$ac_cv_exeext
2678ac_exeext=$EXEEXT
ba5da88a 2679echo "$as_me:2679: checking for object suffix" >&5
503d2be0
AS
2680echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2681if test "${ac_cv_objext+set}" = set; then
2682 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 2683else
503d2be0 2684 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 2685#line 2685 "configure"
503d2be0 2686#include "confdefs.h"
ba4481b5 2687
503d2be0
AS
2688int
2689main ()
2690{
ba4481b5 2691
503d2be0
AS
2692 ;
2693 return 0;
2694}
2695_ACEOF
2696rm -f conftest.o conftest.obj
ba5da88a 2697if { (eval echo "$as_me:2697: \"$ac_compile\"") >&5
503d2be0
AS
2698 (eval $ac_compile) 2>&5
2699 ac_status=$?
ba5da88a 2700 echo "$as_me:2700: \$? = $ac_status" >&5
503d2be0
AS
2701 (exit $ac_status); }; then
2702 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2703 case $ac_file in
2704 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2705 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2706 break;;
2707 esac
2708done
c4bb2108 2709else
503d2be0
AS
2710 echo "$as_me: failed program was:" >&5
2711cat conftest.$ac_ext >&5
ba5da88a 2712{ { echo "$as_me:2712: error: cannot compute OBJEXT: cannot compile" >&5
503d2be0
AS
2713echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2714 { (exit 1); exit 1; }; }
c4bb2108
DL
2715fi
2716
503d2be0
AS
2717rm -f conftest.$ac_cv_objext conftest.$ac_ext
2718fi
ba5da88a 2719echo "$as_me:2719: result: $ac_cv_objext" >&5
503d2be0
AS
2720echo "${ECHO_T}$ac_cv_objext" >&6
2721OBJEXT=$ac_cv_objext
2722ac_objext=$OBJEXT
ba5da88a 2723echo "$as_me:2723: checking whether we are using the GNU C compiler" >&5
503d2be0
AS
2724echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2725if test "${ac_cv_c_compiler_gnu+set}" = set; then
2726 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 2727else
503d2be0 2728 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 2729#line 2729 "configure"
503d2be0
AS
2730#include "confdefs.h"
2731
2732int
2733main ()
2734{
2735#ifndef __GNUC__
2736 choke me
2737#endif
2738
2739 ;
2740 return 0;
2741}
2742_ACEOF
2743rm -f conftest.$ac_objext
ba5da88a 2744if { (eval echo "$as_me:2744: \"$ac_compile\"") >&5
503d2be0
AS
2745 (eval $ac_compile) 2>&5
2746 ac_status=$?
ba5da88a 2747 echo "$as_me:2747: \$? = $ac_status" >&5
503d2be0
AS
2748 (exit $ac_status); } &&
2749 { ac_try='test -s conftest.$ac_objext'
ba5da88a 2750 { (eval echo "$as_me:2750: \"$ac_try\"") >&5
503d2be0
AS
2751 (eval $ac_try) 2>&5
2752 ac_status=$?
ba5da88a 2753 echo "$as_me:2753: \$? = $ac_status" >&5
503d2be0
AS
2754 (exit $ac_status); }; }; then
2755 ac_compiler_gnu=yes
2756else
2757 echo "$as_me: failed program was:" >&5
2758cat conftest.$ac_ext >&5
2759ac_compiler_gnu=no
2760fi
2761rm -f conftest.$ac_objext conftest.$ac_ext
2762ac_cv_c_compiler_gnu=$ac_compiler_gnu
2763
2764fi
ba5da88a 2765echo "$as_me:2765: result: $ac_cv_c_compiler_gnu" >&5
503d2be0
AS
2766echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2767GCC=`test $ac_compiler_gnu = yes && echo yes`
2768ac_test_CFLAGS=${CFLAGS+set}
2769ac_save_CFLAGS=$CFLAGS
2770CFLAGS="-g"
ba5da88a 2771echo "$as_me:2771: checking whether $CC accepts -g" >&5
503d2be0
AS
2772echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2773if test "${ac_cv_prog_cc_g+set}" = set; then
2774 echo $ECHO_N "(cached) $ECHO_C" >&6
2775else
2776 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 2777#line 2777 "configure"
503d2be0
AS
2778#include "confdefs.h"
2779
2780int
2781main ()
2782{
2783
2784 ;
2785 return 0;
2786}
2787_ACEOF
2788rm -f conftest.$ac_objext
ba5da88a 2789if { (eval echo "$as_me:2789: \"$ac_compile\"") >&5
503d2be0
AS
2790 (eval $ac_compile) 2>&5
2791 ac_status=$?
ba5da88a 2792 echo "$as_me:2792: \$? = $ac_status" >&5
503d2be0
AS
2793 (exit $ac_status); } &&
2794 { ac_try='test -s conftest.$ac_objext'
ba5da88a 2795 { (eval echo "$as_me:2795: \"$ac_try\"") >&5
503d2be0
AS
2796 (eval $ac_try) 2>&5
2797 ac_status=$?
ba5da88a 2798 echo "$as_me:2798: \$? = $ac_status" >&5
503d2be0 2799 (exit $ac_status); }; }; then
ba4481b5
DL
2800 ac_cv_prog_cc_g=yes
2801else
503d2be0
AS
2802 echo "$as_me: failed program was:" >&5
2803cat conftest.$ac_ext >&5
2804ac_cv_prog_cc_g=no
ba4481b5 2805fi
503d2be0 2806rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 2807fi
ba5da88a 2808echo "$as_me:2808: result: $ac_cv_prog_cc_g" >&5
503d2be0 2809echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c4bb2108 2810if test "$ac_test_CFLAGS" = set; then
503d2be0 2811 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
2812elif test $ac_cv_prog_cc_g = yes; then
2813 if test "$GCC" = yes; then
ba4481b5
DL
2814 CFLAGS="-g -O2"
2815 else
c4bb2108 2816 CFLAGS="-g"
ba4481b5 2817 fi
22afa6e8 2818else
c4bb2108
DL
2819 if test "$GCC" = yes; then
2820 CFLAGS="-O2"
2821 else
2822 CFLAGS=
2823 fi
ba4481b5 2824fi
503d2be0
AS
2825# Some people use a C++ compiler to compile C. Since we use `exit',
2826# in C++ we need to declare it. In case someone uses the same compiler
2827# for both compiling C and C++ we need to have the C++ compiler decide
2828# the declaration of exit, since it's the most demanding environment.
2829cat >conftest.$ac_ext <<_ACEOF
2830#ifndef __cplusplus
2831 choke me
2832#endif
2833_ACEOF
2834rm -f conftest.$ac_objext
ba5da88a 2835if { (eval echo "$as_me:2835: \"$ac_compile\"") >&5
503d2be0
AS
2836 (eval $ac_compile) 2>&5
2837 ac_status=$?
ba5da88a 2838 echo "$as_me:2838: \$? = $ac_status" >&5
503d2be0
AS
2839 (exit $ac_status); } &&
2840 { ac_try='test -s conftest.$ac_objext'
ba5da88a 2841 { (eval echo "$as_me:2841: \"$ac_try\"") >&5
503d2be0
AS
2842 (eval $ac_try) 2>&5
2843 ac_status=$?
ba5da88a 2844 echo "$as_me:2844: \$? = $ac_status" >&5
503d2be0
AS
2845 (exit $ac_status); }; }; then
2846 for ac_declaration in \
2847 ''\
2848 '#include <stdlib.h>' \
2849 'extern "C" void std::exit (int) throw (); using std::exit;' \
2850 'extern "C" void std::exit (int); using std::exit;' \
2851 'extern "C" void exit (int) throw ();' \
2852 'extern "C" void exit (int);' \
2853 'void exit (int);'
2854do
2855 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 2856#line 2856 "configure"
503d2be0
AS
2857#include "confdefs.h"
2858#include <stdlib.h>
2859$ac_declaration
2860int
2861main ()
2862{
2863exit (42);
2864 ;
2865 return 0;
2866}
2867_ACEOF
2868rm -f conftest.$ac_objext
ba5da88a 2869if { (eval echo "$as_me:2869: \"$ac_compile\"") >&5
503d2be0
AS
2870 (eval $ac_compile) 2>&5
2871 ac_status=$?
ba5da88a 2872 echo "$as_me:2872: \$? = $ac_status" >&5
503d2be0
AS
2873 (exit $ac_status); } &&
2874 { ac_try='test -s conftest.$ac_objext'
ba5da88a 2875 { (eval echo "$as_me:2875: \"$ac_try\"") >&5
503d2be0
AS
2876 (eval $ac_try) 2>&5
2877 ac_status=$?
ba5da88a 2878 echo "$as_me:2878: \$? = $ac_status" >&5
503d2be0
AS
2879 (exit $ac_status); }; }; then
2880 :
2881else
2882 echo "$as_me: failed program was:" >&5
2883cat conftest.$ac_ext >&5
2884continue
2885fi
2886rm -f conftest.$ac_objext conftest.$ac_ext
2887 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 2888#line 2888 "configure"
503d2be0
AS
2889#include "confdefs.h"
2890$ac_declaration
2891int
2892main ()
2893{
2894exit (42);
2895 ;
2896 return 0;
2897}
2898_ACEOF
2899rm -f conftest.$ac_objext
ba5da88a 2900if { (eval echo "$as_me:2900: \"$ac_compile\"") >&5
503d2be0
AS
2901 (eval $ac_compile) 2>&5
2902 ac_status=$?
ba5da88a 2903 echo "$as_me:2903: \$? = $ac_status" >&5
503d2be0
AS
2904 (exit $ac_status); } &&
2905 { ac_try='test -s conftest.$ac_objext'
ba5da88a 2906 { (eval echo "$as_me:2906: \"$ac_try\"") >&5
503d2be0
AS
2907 (eval $ac_try) 2>&5
2908 ac_status=$?
ba5da88a 2909 echo "$as_me:2909: \$? = $ac_status" >&5
503d2be0
AS
2910 (exit $ac_status); }; }; then
2911 break
2912else
2913 echo "$as_me: failed program was:" >&5
2914cat conftest.$ac_ext >&5
2915fi
2916rm -f conftest.$ac_objext conftest.$ac_ext
2917done
2918rm -f conftest*
2919if test -n "$ac_declaration"; then
2920 echo '#ifdef __cplusplus' >>confdefs.h
2921 echo $ac_declaration >>confdefs.h
2922 echo '#endif' >>confdefs.h
2923fi
ba4481b5 2924
503d2be0
AS
2925else
2926 echo "$as_me: failed program was:" >&5
2927cat conftest.$ac_ext >&5
2928fi
2929rm -f conftest.$ac_objext conftest.$ac_ext
2930ac_ext=c
2931ac_cpp='$CPP $CPPFLAGS'
2932ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2933ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2934ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
2935
2936# On Suns, sometimes $CPP names a directory.
2937if test -n "$CPP" && test -d "$CPP"; then
2938 CPP=
2939fi
2940
2941#### Some systems specify a CPP to use unless we are using GCC.
2942#### Now that we know whether we are using GCC, we can decide whether
2943#### to use that one.
2944if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
2945then
2946 CPP="$NON_GNU_CPP"
2947fi
2948
2949#### Some systems specify a CC to use unless we are using GCC.
2950#### Now that we know whether we are using GCC, we can decide whether
2951#### to use that one.
2952if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
2953 test x$cc_specified != xyes
2954then
2955 CC="$NON_GNU_CC"
2956fi
2957
2958if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
2959then
2960 CC="$CC $GCC_TEST_OPTIONS"
2961fi
2962
2963if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
2964then
2965 CC="$CC $NON_GCC_TEST_OPTIONS"
2966fi
2967
2968if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
2969then
2970 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
2971fi
2972
2973if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
2974then
2975 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
2976fi
2977
2978#### Some other nice autoconf tests. If you add a test here which
2979#### should make an entry in src/config.h, don't forget to add an
2980#### #undef clause to src/config.h.in for autoconf to modify.
2981
ba5da88a 2982echo "$as_me:2982: checking whether ln -s works" >&5
503d2be0
AS
2983echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2984LN_S=$as_ln_s
2985if test "$LN_S" = "ln -s"; then
ba5da88a 2986 echo "$as_me:2986: result: yes" >&5
503d2be0 2987echo "${ECHO_T}yes" >&6
ba4481b5 2988else
ba5da88a 2989 echo "$as_me:2989: result: no, using $LN_S" >&5
503d2be0 2990echo "${ECHO_T}no, using $LN_S" >&6
ba4481b5
DL
2991fi
2992
503d2be0
AS
2993ac_ext=c
2994ac_cpp='$CPP $CPPFLAGS'
2995ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2996ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2997ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba5da88a 2998echo "$as_me:2998: checking how to run the C preprocessor" >&5
503d2be0 2999echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
ba4481b5
DL
3000# On Suns, sometimes $CPP names a directory.
3001if test -n "$CPP" && test -d "$CPP"; then
3002 CPP=
3003fi
3004if test -z "$CPP"; then
503d2be0
AS
3005 if test "${ac_cv_prog_CPP+set}" = set; then
3006 echo $ECHO_N "(cached) $ECHO_C" >&6
3007else
3008 # Double quotes because CPP needs to be expanded
3009 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3010 do
3011 ac_preproc_ok=false
3012for ac_c_preproc_warn_flag in '' yes
3013do
3014 # Use a header file that comes with gcc, so configuring glibc
3015 # with a fresh cross-compiler works.
ba4481b5 3016 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
3017 # not just through cpp. "Syntax error" is here to catch this case.
3018 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 3019#line 3019 "configure"
ba4481b5
DL
3020#include "confdefs.h"
3021#include <assert.h>
503d2be0
AS
3022 Syntax error
3023_ACEOF
ba5da88a 3024if { (eval echo "$as_me:3024: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3025 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3026 ac_status=$?
3027 egrep -v '^ *\+' conftest.er1 >conftest.err
3028 rm -f conftest.er1
3029 cat conftest.err >&5
ba5da88a 3030 echo "$as_me:3030: \$? = $ac_status" >&5
503d2be0
AS
3031 (exit $ac_status); } >/dev/null; then
3032 if test -s conftest.err; then
3033 ac_cpp_err=$ac_c_preproc_warn_flag
3034 else
3035 ac_cpp_err=
3036 fi
3037else
3038 ac_cpp_err=yes
3039fi
3040if test -z "$ac_cpp_err"; then
ba4481b5
DL
3041 :
3042else
503d2be0 3043 echo "$as_me: failed program was:" >&5
ba4481b5 3044 cat conftest.$ac_ext >&5
503d2be0
AS
3045 # Broken: fails on valid input.
3046continue
3047fi
3048rm -f conftest.err conftest.$ac_ext
3049
3050 # OK, works on sane cases. Now check whether non-existent headers
3051 # can be detected and how.
3052 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 3053#line 3053 "configure"
503d2be0
AS
3054#include "confdefs.h"
3055#include <ac_nonexistent.h>
3056_ACEOF
ba5da88a 3057if { (eval echo "$as_me:3057: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3058 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3059 ac_status=$?
3060 egrep -v '^ *\+' conftest.er1 >conftest.err
3061 rm -f conftest.er1
3062 cat conftest.err >&5
ba5da88a 3063 echo "$as_me:3063: \$? = $ac_status" >&5
503d2be0
AS
3064 (exit $ac_status); } >/dev/null; then
3065 if test -s conftest.err; then
3066 ac_cpp_err=$ac_c_preproc_warn_flag
3067 else
3068 ac_cpp_err=
3069 fi
3070else
3071 ac_cpp_err=yes
3072fi
3073if test -z "$ac_cpp_err"; then
3074 # Broken: success on invalid input.
3075continue
c4bb2108 3076else
503d2be0 3077 echo "$as_me: failed program was:" >&5
c4bb2108 3078 cat conftest.$ac_ext >&5
503d2be0
AS
3079 # Passes both tests.
3080ac_preproc_ok=:
3081break
3082fi
3083rm -f conftest.err conftest.$ac_ext
3084
3085done
3086# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3087rm -f conftest.err conftest.$ac_ext
3088if $ac_preproc_ok; then
3089 break
3090fi
3091
3092 done
3093 ac_cv_prog_CPP=$CPP
3094
3095fi
3096 CPP=$ac_cv_prog_CPP
3097else
3098 ac_cv_prog_CPP=$CPP
3099fi
ba5da88a 3100echo "$as_me:3100: result: $CPP" >&5
503d2be0
AS
3101echo "${ECHO_T}$CPP" >&6
3102ac_preproc_ok=false
3103for ac_c_preproc_warn_flag in '' yes
3104do
3105 # Use a header file that comes with gcc, so configuring glibc
3106 # with a fresh cross-compiler works.
3107 # On the NeXT, cc -E runs the code through the compiler's parser,
3108 # not just through cpp. "Syntax error" is here to catch this case.
3109 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 3110#line 3110 "configure"
c4bb2108
DL
3111#include "confdefs.h"
3112#include <assert.h>
503d2be0
AS
3113 Syntax error
3114_ACEOF
ba5da88a 3115if { (eval echo "$as_me:3115: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3116 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3117 ac_status=$?
3118 egrep -v '^ *\+' conftest.er1 >conftest.err
3119 rm -f conftest.er1
3120 cat conftest.err >&5
ba5da88a 3121 echo "$as_me:3121: \$? = $ac_status" >&5
503d2be0
AS
3122 (exit $ac_status); } >/dev/null; then
3123 if test -s conftest.err; then
3124 ac_cpp_err=$ac_c_preproc_warn_flag
3125 else
3126 ac_cpp_err=
3127 fi
3128else
3129 ac_cpp_err=yes
3130fi
3131if test -z "$ac_cpp_err"; then
ba4481b5
DL
3132 :
3133else
503d2be0 3134 echo "$as_me: failed program was:" >&5
ba4481b5 3135 cat conftest.$ac_ext >&5
503d2be0
AS
3136 # Broken: fails on valid input.
3137continue
3138fi
3139rm -f conftest.err conftest.$ac_ext
3140
3141 # OK, works on sane cases. Now check whether non-existent headers
3142 # can be detected and how.
3143 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 3144#line 3144 "configure"
503d2be0
AS
3145#include "confdefs.h"
3146#include <ac_nonexistent.h>
3147_ACEOF
ba5da88a 3148if { (eval echo "$as_me:3148: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3149 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3150 ac_status=$?
3151 egrep -v '^ *\+' conftest.er1 >conftest.err
3152 rm -f conftest.er1
3153 cat conftest.err >&5
ba5da88a 3154 echo "$as_me:3154: \$? = $ac_status" >&5
503d2be0
AS
3155 (exit $ac_status); } >/dev/null; then
3156 if test -s conftest.err; then
3157 ac_cpp_err=$ac_c_preproc_warn_flag
3158 else
3159 ac_cpp_err=
3160 fi
3161else
3162 ac_cpp_err=yes
c4bb2108 3163fi
503d2be0
AS
3164if test -z "$ac_cpp_err"; then
3165 # Broken: success on invalid input.
3166continue
3167else
3168 echo "$as_me: failed program was:" >&5
3169 cat conftest.$ac_ext >&5
3170 # Passes both tests.
3171ac_preproc_ok=:
3172break
ba4481b5 3173fi
503d2be0
AS
3174rm -f conftest.err conftest.$ac_ext
3175
3176done
3177# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3178rm -f conftest.err conftest.$ac_ext
3179if $ac_preproc_ok; then
3180 :
ba4481b5 3181else
ba5da88a 3182 { { echo "$as_me:3182: error: C preprocessor \"$CPP\" fails sanity check" >&5
503d2be0
AS
3183echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3184 { (exit 1); exit 1; }; }
ba4481b5 3185fi
503d2be0
AS
3186
3187ac_ext=c
3188ac_cpp='$CPP $CPPFLAGS'
3189ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3190ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3191ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
3192
3193# Find a good install program. We prefer a C program (faster),
3194# so one script is as good as another. But avoid the broken or
3195# incompatible versions:
3196# SysV /etc/install, /usr/sbin/install
3197# SunOS /usr/etc/install
3198# IRIX /sbin/install
3199# AIX /bin/install
503d2be0 3200# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 3201# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
3202# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3203# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3204# ./install, which can be erroneously created by make from ./install.sh.
ba5da88a 3205echo "$as_me:3205: checking for a BSD compatible install" >&5
503d2be0 3206echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
ba4481b5 3207if test -z "$INSTALL"; then
503d2be0
AS
3208if test "${ac_cv_path_install+set}" = set; then
3209 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3210else
503d2be0 3211 ac_save_IFS=$IFS; IFS=$ac_path_separator
ba4481b5 3212 for ac_dir in $PATH; do
503d2be0 3213 IFS=$ac_save_IFS
ba4481b5 3214 # Account for people who put trailing slashes in PATH elements.
503d2be0
AS
3215 case $ac_dir/ in
3216 / | ./ | .// | /cC/* \
3217 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3218 | /usr/ucb/* ) ;;
ba4481b5
DL
3219 *)
3220 # OSF1 and SCO ODT 3.0 have their own names for install.
c4bb2108
DL
3221 # Don't use installbsd from OSF since it installs stuff as root
3222 # by default.
3223 for ac_prog in ginstall scoinst install; do
503d2be0 3224 if $as_executable_p "$ac_dir/$ac_prog"; then
ba4481b5 3225 if test $ac_prog = install &&
503d2be0 3226 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
ba4481b5
DL
3227 # AIX install. It has an incompatible calling convention.
3228 :
503d2be0
AS
3229 elif test $ac_prog = install &&
3230 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3231 # program-specific install script used by HP pwplus--don't use.
3232 :
ba4481b5
DL
3233 else
3234 ac_cv_path_install="$ac_dir/$ac_prog -c"
3235 break 2
3236 fi
3237 fi
3238 done
3239 ;;
3240 esac
3241 done
ba4481b5
DL
3242
3243fi
3244 if test "${ac_cv_path_install+set}" = set; then
503d2be0 3245 INSTALL=$ac_cv_path_install
ba4481b5
DL
3246 else
3247 # As a last resort, use the slow shell script. We don't cache a
3248 # path for INSTALL within a source directory, because that will
3249 # break other packages using the cache if that directory is
3250 # removed, or if the path is relative.
503d2be0 3251 INSTALL=$ac_install_sh
ba4481b5
DL
3252 fi
3253fi
ba5da88a 3254echo "$as_me:3254: result: $INSTALL" >&5
503d2be0 3255echo "${ECHO_T}$INSTALL" >&6
ba4481b5
DL
3256
3257# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3258# It thinks the first close brace ends the variable substitution.
3259test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3260
503d2be0 3261test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 3262
ba4481b5
DL
3263test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3264
3265for ac_prog in 'bison -y' byacc
3266do
503d2be0 3267 # Extract the first word of "$ac_prog", so it can be a program name with args.
ba4481b5 3268set dummy $ac_prog; ac_word=$2
ba5da88a 3269echo "$as_me:3269: checking for $ac_word" >&5
503d2be0
AS
3270echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3271if test "${ac_cv_prog_YACC+set}" = set; then
3272 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3273else
3274 if test -n "$YACC"; then
3275 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3276else
503d2be0
AS
3277 ac_save_IFS=$IFS; IFS=$ac_path_separator
3278ac_dummy="$PATH"
3279for ac_dir in $ac_dummy; do
3280 IFS=$ac_save_IFS
3281 test -z "$ac_dir" && ac_dir=.
3282 $as_executable_p "$ac_dir/$ac_word" || continue
3283ac_cv_prog_YACC="$ac_prog"
ba5da88a 3284echo "$as_me:3284: found $ac_dir/$ac_word" >&5
503d2be0
AS
3285break
3286done
3287
ba4481b5
DL
3288fi
3289fi
503d2be0 3290YACC=$ac_cv_prog_YACC
ba4481b5 3291if test -n "$YACC"; then
ba5da88a 3292 echo "$as_me:3292: result: $YACC" >&5
503d2be0 3293echo "${ECHO_T}$YACC" >&6
ba4481b5 3294else
ba5da88a 3295 echo "$as_me:3295: result: no" >&5
503d2be0 3296echo "${ECHO_T}no" >&6
ba4481b5
DL
3297fi
3298
503d2be0 3299 test -n "$YACC" && break
ba4481b5
DL
3300done
3301test -n "$YACC" || YACC="yacc"
3302
7397acc4 3303if test "x$RANLIB" = x; then
503d2be0
AS
3304 if test -n "$ac_tool_prefix"; then
3305 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3306set dummy ${ac_tool_prefix}ranlib; ac_word=$2
ba5da88a 3307echo "$as_me:3307: checking for $ac_word" >&5
503d2be0
AS
3308echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3309if test "${ac_cv_prog_RANLIB+set}" = set; then
3310 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
3311else
3312 if test -n "$RANLIB"; then
3313 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3314else
503d2be0
AS
3315 ac_save_IFS=$IFS; IFS=$ac_path_separator
3316ac_dummy="$PATH"
3317for ac_dir in $ac_dummy; do
3318 IFS=$ac_save_IFS
3319 test -z "$ac_dir" && ac_dir=.
3320 $as_executable_p "$ac_dir/$ac_word" || continue
3321ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
ba5da88a 3322echo "$as_me:3322: found $ac_dir/$ac_word" >&5
503d2be0
AS
3323break
3324done
3325
7397acc4
DL
3326fi
3327fi
503d2be0 3328RANLIB=$ac_cv_prog_RANLIB
7397acc4 3329if test -n "$RANLIB"; then
ba5da88a 3330 echo "$as_me:3330: result: $RANLIB" >&5
503d2be0
AS
3331echo "${ECHO_T}$RANLIB" >&6
3332else
ba5da88a 3333 echo "$as_me:3333: result: no" >&5
503d2be0
AS
3334echo "${ECHO_T}no" >&6
3335fi
3336
3337fi
3338if test -z "$ac_cv_prog_RANLIB"; then
3339 ac_ct_RANLIB=$RANLIB
3340 # Extract the first word of "ranlib", so it can be a program name with args.
3341set dummy ranlib; ac_word=$2
ba5da88a 3342echo "$as_me:3342: checking for $ac_word" >&5
503d2be0
AS
3343echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3344if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3345 echo $ECHO_N "(cached) $ECHO_C" >&6
3346else
3347 if test -n "$ac_ct_RANLIB"; then
3348 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3349else
3350 ac_save_IFS=$IFS; IFS=$ac_path_separator
3351ac_dummy="$PATH"
3352for ac_dir in $ac_dummy; do
3353 IFS=$ac_save_IFS
3354 test -z "$ac_dir" && ac_dir=.
3355 $as_executable_p "$ac_dir/$ac_word" || continue
3356ac_cv_prog_ac_ct_RANLIB="ranlib"
ba5da88a 3357echo "$as_me:3357: found $ac_dir/$ac_word" >&5
503d2be0
AS
3358break
3359done
3360
3361 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3362fi
3363fi
3364ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3365if test -n "$ac_ct_RANLIB"; then
ba5da88a 3366 echo "$as_me:3366: result: $ac_ct_RANLIB" >&5
503d2be0
AS
3367echo "${ECHO_T}$ac_ct_RANLIB" >&6
3368else
ba5da88a 3369 echo "$as_me:3369: result: no" >&5
503d2be0
AS
3370echo "${ECHO_T}no" >&6
3371fi
3372
3373 RANLIB=$ac_ct_RANLIB
7397acc4 3374else
503d2be0 3375 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
3376fi
3377
3378fi
ba4481b5 3379
ba5da88a 3380echo "$as_me:3380: checking for AIX" >&5
503d2be0
AS
3381echo $ECHO_N "checking for AIX... $ECHO_C" >&6
3382cat >conftest.$ac_ext <<_ACEOF
ba5da88a 3383#line 3383 "configure"
ba4481b5
DL
3384#include "confdefs.h"
3385#ifdef _AIX
3386 yes
3387#endif
3388
503d2be0 3389_ACEOF
ba4481b5
DL
3390if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3391 egrep "yes" >/dev/null 2>&1; then
ba5da88a 3392 echo "$as_me:3392: result: yes" >&5
503d2be0
AS
3393echo "${ECHO_T}yes" >&6
3394cat >>confdefs.h <<\EOF
ba4481b5
DL
3395#define _ALL_SOURCE 1
3396EOF
3397
3398else
ba5da88a 3399 echo "$as_me:3399: result: no" >&5
503d2be0 3400echo "${ECHO_T}no" >&6
ba4481b5
DL
3401fi
3402rm -f conftest*
3403
3b33a005
DL
3404#### Extract some information from the operating system and machine files.
3405
ba5da88a 3406{ echo "$as_me:3406: checking the machine- and system-dependent files to find out
3b33a005 3407 - which libraries the lib-src programs will want, and
503d2be0
AS
3408 - whether the GNU malloc routines are usable..." >&5
3409echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 3410 - which libraries the lib-src programs will want, and
503d2be0 3411 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
3412
3413### First figure out CFLAGS (which we use for running the compiler here)
3414### and REAL_CFLAGS (which we use for real compilation).
3415### The two are the same except on a few systems, where they are made
3416### different to work around various lossages. For example,
3417### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
3418### as implying static linking.
3419
3420### If the CFLAGS env var is specified, we use that value
3421### instead of the default.
3422
3423### It's not important that this name contain the PID; you can't run
3424### two configures in the same directory and have anything work
3425### anyway.
3426tempcname="conftest.c"
3427
3428echo '
3429#include "'${srcdir}'/src/'${opsysfile}'"
3430#include "'${srcdir}'/src/'${machfile}'"
3431#ifndef LIBS_MACHINE
3432#define LIBS_MACHINE
3433#endif
3434#ifndef LIBS_SYSTEM
3435#define LIBS_SYSTEM
3436#endif
3437#ifndef C_SWITCH_SYSTEM
3438#define C_SWITCH_SYSTEM
3439#endif
3440#ifndef C_SWITCH_MACHINE
3441#define C_SWITCH_MACHINE
3442#endif
3443configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
3444configure___ c_switch_system=C_SWITCH_SYSTEM
3445configure___ c_switch_machine=C_SWITCH_MACHINE
3446
3447#ifndef LIB_X11_LIB
3448#define LIB_X11_LIB -lX11
3449#endif
3450
3451#ifndef LIBX11_MACHINE
3452#define LIBX11_MACHINE
3453#endif
3454
3455#ifndef LIBX11_SYSTEM
3456#define LIBX11_SYSTEM
3457#endif
3458configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
3459
3460#ifdef UNEXEC
3461configure___ unexec=UNEXEC
3462#else
3463configure___ unexec=unexec.o
3464#endif
3465
3466#ifdef SYSTEM_MALLOC
3467configure___ system_malloc=yes
3468#else
3469configure___ system_malloc=no
3470#endif
3471
ef9e4345
GM
3472#ifdef USE_MMAP_FOR_BUFFERS
3473configure___ use_mmap_for_buffers=yes
73b77ee5 3474#else
ef9e4345 3475configure___ use_mmap_for_buffers=no
73b77ee5
GM
3476#endif
3477
3b33a005
DL
3478#ifndef C_DEBUG_SWITCH
3479#define C_DEBUG_SWITCH -g
3480#endif
3481
3482#ifndef C_OPTIMIZE_SWITCH
3483#ifdef __GNUC__
3484#define C_OPTIMIZE_SWITCH -O2
3485#else
3486#define C_OPTIMIZE_SWITCH -O
3487#endif
3488#endif
3489
3490#ifndef LD_SWITCH_MACHINE
3491#define LD_SWITCH_MACHINE
3492#endif
3493
3494#ifndef LD_SWITCH_SYSTEM
3495#define LD_SWITCH_SYSTEM
3496#endif
3497
3498#ifndef LD_SWITCH_X_SITE_AUX
3499#define LD_SWITCH_X_SITE_AUX
503d2be0 3500#endif
3b33a005
DL
3501
3502configure___ ld_switch_system=LD_SWITCH_SYSTEM
3503configure___ ld_switch_machine=LD_SWITCH_MACHINE
3504
3505#ifdef THIS_IS_CONFIGURE
3506
3507/* Get the CFLAGS for tests in configure. */
3508#ifdef __GNUC__
3509configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3510#else
3511configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3512#endif
3513
3514#else /* not THIS_IS_CONFIGURE */
3515
3516/* Get the CFLAGS for real compilation. */
3517#ifdef __GNUC__
3518configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3519#else
3520configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3521#endif
3522
3523#endif /* not THIS_IS_CONFIGURE */
3524' > ${tempcname}
3525
3526# The value of CPP is a quoted variable reference, so we need to do this
3527# to get its actual value...
3528CPP=`eval "echo $CPP"`
3529eval `${CPP} -Isrc ${tempcname} \
3530 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3531if test "x$SPECIFIED_CFLAGS" = x; then
3532 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
3533 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3534else
3535 REAL_CFLAGS="$CFLAGS"
3536fi
3537rm ${tempcname}
3538
3539ac_link="$ac_link $ld_switch_machine $ld_switch_system"
3540
3541### Make sure subsequent tests use flags consistent with the build flags.
3542
3543if test x"${OVERRIDE_CPPFLAGS}" != x; then
3544 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
3545else
3546 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
3547fi
3548
503d2be0 3549# Check whether --enable-largefile or --disable-largefile was given.
f4988be7
GM
3550if test "${enable_largefile+set}" = set; then
3551 enableval="$enable_largefile"
f4988be7 3552
503d2be0
AS
3553fi;
3554if test "$enable_largefile" != no; then
f4988be7 3555
ba5da88a 3556 echo "$as_me:3556: checking for special C compiler options needed for large files" >&5
503d2be0
AS
3557echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
3558if test "${ac_cv_sys_largefile_CC+set}" = set; then
3559 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3560else
f4988be7 3561 ac_cv_sys_largefile_CC=no
503d2be0
AS
3562 if test "$GCC" != yes; then
3563 ac_save_CC=$CC
3564 while :; do
3565 # IRIX 6.2 and later do not support large files by default,
3566 # so use the C compiler's -n32 option if that helps.
3567 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 3568#line 3568 "configure"
b192d653 3569#include "confdefs.h"
f4988be7 3570#include <sys/types.h>
503d2be0
AS
3571 /* Check that off_t can represent 2**63 - 1 correctly.
3572 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3573 since some C++ compilers masquerading as C compilers
3574 incorrectly reject 9223372036854775807. */
3575#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3576 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3577 && LARGE_OFF_T % 2147483647 == 1)
3578 ? 1 : -1];
3579int
3580main ()
3581{
f4988be7 3582
503d2be0
AS
3583 ;
3584 return 0;
3585}
3586_ACEOF
3587 rm -f conftest.$ac_objext
ba5da88a 3588if { (eval echo "$as_me:3588: \"$ac_compile\"") >&5
503d2be0
AS
3589 (eval $ac_compile) 2>&5
3590 ac_status=$?
ba5da88a 3591 echo "$as_me:3591: \$? = $ac_status" >&5
503d2be0
AS
3592 (exit $ac_status); } &&
3593 { ac_try='test -s conftest.$ac_objext'
ba5da88a 3594 { (eval echo "$as_me:3594: \"$ac_try\"") >&5
503d2be0
AS
3595 (eval $ac_try) 2>&5
3596 ac_status=$?
ba5da88a 3597 echo "$as_me:3597: \$? = $ac_status" >&5
503d2be0
AS
3598 (exit $ac_status); }; }; then
3599 break
b192d653 3600else
503d2be0
AS
3601 echo "$as_me: failed program was:" >&5
3602cat conftest.$ac_ext >&5
3603fi
3604rm -f conftest.$ac_objext
3605 CC="$CC -n32"
3606 rm -f conftest.$ac_objext
ba5da88a 3607if { (eval echo "$as_me:3607: \"$ac_compile\"") >&5
503d2be0
AS
3608 (eval $ac_compile) 2>&5
3609 ac_status=$?
ba5da88a 3610 echo "$as_me:3610: \$? = $ac_status" >&5
503d2be0
AS
3611 (exit $ac_status); } &&
3612 { ac_try='test -s conftest.$ac_objext'
ba5da88a 3613 { (eval echo "$as_me:3613: \"$ac_try\"") >&5
503d2be0
AS
3614 (eval $ac_try) 2>&5
3615 ac_status=$?
ba5da88a 3616 echo "$as_me:3616: \$? = $ac_status" >&5
503d2be0
AS
3617 (exit $ac_status); }; }; then
3618 ac_cv_sys_largefile_CC=' -n32'; break
3619else
3620 echo "$as_me: failed program was:" >&5
3621cat conftest.$ac_ext >&5
3622fi
3623rm -f conftest.$ac_objext
3624 break
3625 done
3626 CC=$ac_save_CC
3627 rm -f conftest.$ac_ext
3628 fi
b192d653 3629fi
ba5da88a 3630echo "$as_me:3630: result: $ac_cv_sys_largefile_CC" >&5
503d2be0
AS
3631echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
3632 if test "$ac_cv_sys_largefile_CC" != no; then
3633 CC=$CC$ac_cv_sys_largefile_CC
3634 fi
b192d653 3635
ba5da88a 3636 echo "$as_me:3636: checking for _FILE_OFFSET_BITS value needed for large files" >&5
503d2be0
AS
3637echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
3638if test "${ac_cv_sys_file_offset_bits+set}" = set; then
3639 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3640else
503d2be0 3641 while :; do
f4988be7 3642 ac_cv_sys_file_offset_bits=no
503d2be0 3643 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 3644#line 3644 "configure"
f4988be7
GM
3645#include "confdefs.h"
3646#include <sys/types.h>
503d2be0
AS
3647 /* Check that off_t can represent 2**63 - 1 correctly.
3648 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3649 since some C++ compilers masquerading as C compilers
3650 incorrectly reject 9223372036854775807. */
3651#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3652 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3653 && LARGE_OFF_T % 2147483647 == 1)
3654 ? 1 : -1];
3655int
3656main ()
3657{
f4988be7 3658
503d2be0
AS
3659 ;
3660 return 0;
3661}
3662_ACEOF
3663rm -f conftest.$ac_objext
ba5da88a 3664if { (eval echo "$as_me:3664: \"$ac_compile\"") >&5
503d2be0
AS
3665 (eval $ac_compile) 2>&5
3666 ac_status=$?
ba5da88a 3667 echo "$as_me:3667: \$? = $ac_status" >&5
503d2be0
AS
3668 (exit $ac_status); } &&
3669 { ac_try='test -s conftest.$ac_objext'
ba5da88a 3670 { (eval echo "$as_me:3670: \"$ac_try\"") >&5
503d2be0
AS
3671 (eval $ac_try) 2>&5
3672 ac_status=$?
ba5da88a 3673 echo "$as_me:3673: \$? = $ac_status" >&5
503d2be0
AS
3674 (exit $ac_status); }; }; then
3675 break
f4988be7 3676else
503d2be0
AS
3677 echo "$as_me: failed program was:" >&5
3678cat conftest.$ac_ext >&5
3679fi
3680rm -f conftest.$ac_objext conftest.$ac_ext
3681 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 3682#line 3682 "configure"
ba4481b5 3683#include "confdefs.h"
f4988be7
GM
3684#define _FILE_OFFSET_BITS 64
3685#include <sys/types.h>
503d2be0
AS
3686 /* Check that off_t can represent 2**63 - 1 correctly.
3687 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3688 since some C++ compilers masquerading as C compilers
3689 incorrectly reject 9223372036854775807. */
3690#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3691 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3692 && LARGE_OFF_T % 2147483647 == 1)
3693 ? 1 : -1];
3694int
3695main ()
3696{
3697
3698 ;
3699 return 0;
3700}
3701_ACEOF
3702rm -f conftest.$ac_objext
ba5da88a 3703if { (eval echo "$as_me:3703: \"$ac_compile\"") >&5
503d2be0
AS
3704 (eval $ac_compile) 2>&5
3705 ac_status=$?
ba5da88a 3706 echo "$as_me:3706: \$? = $ac_status" >&5
503d2be0
AS
3707 (exit $ac_status); } &&
3708 { ac_try='test -s conftest.$ac_objext'
ba5da88a 3709 { (eval echo "$as_me:3709: \"$ac_try\"") >&5
503d2be0
AS
3710 (eval $ac_try) 2>&5
3711 ac_status=$?
ba5da88a 3712 echo "$as_me:3712: \$? = $ac_status" >&5
503d2be0
AS
3713 (exit $ac_status); }; }; then
3714 ac_cv_sys_file_offset_bits=64; break
3715else
3716 echo "$as_me: failed program was:" >&5
3717cat conftest.$ac_ext >&5
3718fi
3719rm -f conftest.$ac_objext conftest.$ac_ext
3720 break
3721done
ba4481b5 3722fi
ba5da88a 3723echo "$as_me:3723: result: $ac_cv_sys_file_offset_bits" >&5
503d2be0
AS
3724echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
3725if test "$ac_cv_sys_file_offset_bits" != no; then
ba4481b5 3726
503d2be0 3727cat >>confdefs.h <<EOF
f4988be7 3728#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
ba4481b5 3729EOF
f4988be7 3730
503d2be0
AS
3731fi
3732rm -f conftest*
ba5da88a 3733 echo "$as_me:3733: checking for _LARGE_FILES value needed for large files" >&5
503d2be0
AS
3734echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
3735if test "${ac_cv_sys_large_files+set}" = set; then
3736 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3737else
503d2be0 3738 while :; do
f4988be7 3739 ac_cv_sys_large_files=no
503d2be0 3740 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 3741#line 3741 "configure"
f4988be7 3742#include "confdefs.h"
503d2be0
AS
3743#include <sys/types.h>
3744 /* Check that off_t can represent 2**63 - 1 correctly.
3745 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3746 since some C++ compilers masquerading as C compilers
3747 incorrectly reject 9223372036854775807. */
3748#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3749 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3750 && LARGE_OFF_T % 2147483647 == 1)
3751 ? 1 : -1];
3752int
3753main ()
3754{
ba4481b5 3755
503d2be0
AS
3756 ;
3757 return 0;
3758}
3759_ACEOF
3760rm -f conftest.$ac_objext
ba5da88a 3761if { (eval echo "$as_me:3761: \"$ac_compile\"") >&5
503d2be0
AS
3762 (eval $ac_compile) 2>&5
3763 ac_status=$?
ba5da88a 3764 echo "$as_me:3764: \$? = $ac_status" >&5
503d2be0
AS
3765 (exit $ac_status); } &&
3766 { ac_try='test -s conftest.$ac_objext'
ba5da88a 3767 { (eval echo "$as_me:3767: \"$ac_try\"") >&5
503d2be0
AS
3768 (eval $ac_try) 2>&5
3769 ac_status=$?
ba5da88a 3770 echo "$as_me:3770: \$? = $ac_status" >&5
503d2be0
AS
3771 (exit $ac_status); }; }; then
3772 break
ba4481b5 3773else
503d2be0
AS
3774 echo "$as_me: failed program was:" >&5
3775cat conftest.$ac_ext >&5
3776fi
3777rm -f conftest.$ac_objext conftest.$ac_ext
3778 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 3779#line 3779 "configure"
ba4481b5 3780#include "confdefs.h"
f4988be7 3781#define _LARGE_FILES 1
503d2be0
AS
3782#include <sys/types.h>
3783 /* Check that off_t can represent 2**63 - 1 correctly.
3784 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3785 since some C++ compilers masquerading as C compilers
3786 incorrectly reject 9223372036854775807. */
3787#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3788 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3789 && LARGE_OFF_T % 2147483647 == 1)
3790 ? 1 : -1];
3791int
3792main ()
3793{
f4988be7 3794
503d2be0
AS
3795 ;
3796 return 0;
3797}
3798_ACEOF
3799rm -f conftest.$ac_objext
ba5da88a 3800if { (eval echo "$as_me:3800: \"$ac_compile\"") >&5
503d2be0
AS
3801 (eval $ac_compile) 2>&5
3802 ac_status=$?
ba5da88a 3803 echo "$as_me:3803: \$? = $ac_status" >&5
503d2be0
AS
3804 (exit $ac_status); } &&
3805 { ac_try='test -s conftest.$ac_objext'
ba5da88a 3806 { (eval echo "$as_me:3806: \"$ac_try\"") >&5
503d2be0
AS
3807 (eval $ac_try) 2>&5
3808 ac_status=$?
ba5da88a 3809 echo "$as_me:3809: \$? = $ac_status" >&5
503d2be0
AS
3810 (exit $ac_status); }; }; then
3811 ac_cv_sys_large_files=1; break
3812else
3813 echo "$as_me: failed program was:" >&5
3814cat conftest.$ac_ext >&5
3815fi
3816rm -f conftest.$ac_objext conftest.$ac_ext
3817 break
3818done
ba4481b5 3819fi
ba5da88a 3820echo "$as_me:3820: result: $ac_cv_sys_large_files" >&5
503d2be0
AS
3821echo "${ECHO_T}$ac_cv_sys_large_files" >&6
3822if test "$ac_cv_sys_large_files" != no; then
ba4481b5 3823
503d2be0 3824cat >>confdefs.h <<EOF
f4988be7 3825#define _LARGE_FILES $ac_cv_sys_large_files
ba4481b5
DL
3826EOF
3827
503d2be0
AS
3828fi
3829rm -f conftest*
3830fi
ba4481b5 3831
f4988be7 3832# Sound support for GNU/Linux and the free BSDs.
503d2be0
AS
3833
3834for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
f4988be7 3835do
503d2be0 3836as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ba5da88a 3837echo "$as_me:3837: checking for $ac_header" >&5
503d2be0
AS
3838echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3839if eval "test \"\${$as_ac_Header+set}\" = set"; then
3840 echo $ECHO_N "(cached) $ECHO_C" >&6
3841else
3842 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 3843#line 3843 "configure"
503d2be0
AS
3844#include "confdefs.h"
3845#include <$ac_header>
3846_ACEOF
ba5da88a 3847if { (eval echo "$as_me:3847: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3848 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3849 ac_status=$?
3850 egrep -v '^ *\+' conftest.er1 >conftest.err
3851 rm -f conftest.er1
3852 cat conftest.err >&5
ba5da88a 3853 echo "$as_me:3853: \$? = $ac_status" >&5
503d2be0
AS
3854 (exit $ac_status); } >/dev/null; then
3855 if test -s conftest.err; then
3856 ac_cpp_err=$ac_c_preproc_warn_flag
3857 else
3858 ac_cpp_err=
3859 fi
3860else
3861 ac_cpp_err=yes
3862fi
3863if test -z "$ac_cpp_err"; then
3864 eval "$as_ac_Header=yes"
3865else
3866 echo "$as_me: failed program was:" >&5
ba4481b5 3867 cat conftest.$ac_ext >&5
503d2be0 3868 eval "$as_ac_Header=no"
ba4481b5 3869fi
503d2be0 3870rm -f conftest.err conftest.$ac_ext
ba4481b5 3871fi
ba5da88a 3872echo "$as_me:3872: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
3873echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3874if test `eval echo '${'$as_ac_Header'}'` = yes; then
3875 cat >>confdefs.h <<EOF
3876#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba4481b5 3877EOF
503d2be0 3878
ba4481b5 3879fi
f4988be7 3880done
ba4481b5 3881
f4988be7 3882# Emulation library used on NetBSD.
ba5da88a 3883echo "$as_me:3883: checking for _oss_ioctl in -lossaudio" >&5
503d2be0
AS
3884echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6
3885if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
3886 echo $ECHO_N "(cached) $ECHO_C" >&6
65171e3a 3887else
503d2be0 3888 ac_check_lib_save_LIBS=$LIBS
f4988be7 3889LIBS="-lossaudio $LIBS"
503d2be0 3890cat >conftest.$ac_ext <<_ACEOF
ba5da88a 3891#line 3891 "configure"
65171e3a 3892#include "confdefs.h"
503d2be0 3893
f4988be7 3894/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
3895#ifdef __cplusplus
3896extern "C"
3897#endif
f4988be7 3898/* We use char because int might match the return type of a gcc2
503d2be0
AS
3899 builtin and then its argument prototype would still apply. */
3900char _oss_ioctl ();
3901int
3902main ()
3903{
3904_oss_ioctl ();
3905 ;
3906 return 0;
3907}
3908_ACEOF
3909rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 3910if { (eval echo "$as_me:3910: \"$ac_link\"") >&5
503d2be0
AS
3911 (eval $ac_link) 2>&5
3912 ac_status=$?
ba5da88a 3913 echo "$as_me:3913: \$? = $ac_status" >&5
503d2be0
AS
3914 (exit $ac_status); } &&
3915 { ac_try='test -s conftest$ac_exeext'
ba5da88a 3916 { (eval echo "$as_me:3916: \"$ac_try\"") >&5
503d2be0
AS
3917 (eval $ac_try) 2>&5
3918 ac_status=$?
ba5da88a 3919 echo "$as_me:3919: \$? = $ac_status" >&5
503d2be0
AS
3920 (exit $ac_status); }; }; then
3921 ac_cv_lib_ossaudio__oss_ioctl=yes
3922else
3923 echo "$as_me: failed program was:" >&5
3924cat conftest.$ac_ext >&5
3925ac_cv_lib_ossaudio__oss_ioctl=no
3926fi
3927rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3928LIBS=$ac_check_lib_save_LIBS
3929fi
ba5da88a 3930echo "$as_me:3930: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
503d2be0
AS
3931echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6
3932if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
f4988be7
GM
3933 LIBSOUND=-lossaudio
3934else
503d2be0 3935 LIBSOUND=
f4988be7 3936fi
65171e3a 3937
503d2be0 3938for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
f4988be7 3939 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
bb17930d 3940 termcap.h stdio_ext.h fcntl.h term.h strings.h
f4988be7 3941do
503d2be0 3942as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ba5da88a 3943echo "$as_me:3943: checking for $ac_header" >&5
503d2be0
AS
3944echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3945if eval "test \"\${$as_ac_Header+set}\" = set"; then
3946 echo $ECHO_N "(cached) $ECHO_C" >&6
3947else
3948 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 3949#line 3949 "configure"
503d2be0
AS
3950#include "confdefs.h"
3951#include <$ac_header>
3952_ACEOF
ba5da88a 3953if { (eval echo "$as_me:3953: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3954 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3955 ac_status=$?
3956 egrep -v '^ *\+' conftest.er1 >conftest.err
3957 rm -f conftest.er1
3958 cat conftest.err >&5
ba5da88a 3959 echo "$as_me:3959: \$? = $ac_status" >&5
503d2be0
AS
3960 (exit $ac_status); } >/dev/null; then
3961 if test -s conftest.err; then
3962 ac_cpp_err=$ac_c_preproc_warn_flag
3963 else
3964 ac_cpp_err=
3965 fi
3966else
3967 ac_cpp_err=yes
3968fi
3969if test -z "$ac_cpp_err"; then
3970 eval "$as_ac_Header=yes"
3971else
3972 echo "$as_me: failed program was:" >&5
ba4481b5 3973 cat conftest.$ac_ext >&5
503d2be0 3974 eval "$as_ac_Header=no"
ba4481b5 3975fi
503d2be0 3976rm -f conftest.err conftest.$ac_ext
ba4481b5 3977fi
ba5da88a 3978echo "$as_me:3978: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
3979echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3980if test `eval echo '${'$as_ac_Header'}'` = yes; then
3981 cat >>confdefs.h <<EOF
3982#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba4481b5 3983EOF
503d2be0 3984
ba4481b5 3985fi
f4988be7 3986done
ba4481b5 3987
ba5da88a 3988echo "$as_me:3988: checking for ANSI C header files" >&5
503d2be0
AS
3989echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3990if test "${ac_cv_header_stdc+set}" = set; then
3991 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3992else
503d2be0 3993 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 3994#line 3994 "configure"
ba4481b5 3995#include "confdefs.h"
f4988be7
GM
3996#include <stdlib.h>
3997#include <stdarg.h>
3998#include <string.h>
3999#include <float.h>
503d2be0
AS
4000
4001_ACEOF
ba5da88a 4002if { (eval echo "$as_me:4002: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
4003 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4004 ac_status=$?
4005 egrep -v '^ *\+' conftest.er1 >conftest.err
4006 rm -f conftest.er1
4007 cat conftest.err >&5
ba5da88a 4008 echo "$as_me:4008: \$? = $ac_status" >&5
503d2be0
AS
4009 (exit $ac_status); } >/dev/null; then
4010 if test -s conftest.err; then
4011 ac_cpp_err=$ac_c_preproc_warn_flag
4012 else
4013 ac_cpp_err=
4014 fi
4015else
4016 ac_cpp_err=yes
4017fi
4018if test -z "$ac_cpp_err"; then
f4988be7 4019 ac_cv_header_stdc=yes
ba4481b5 4020else
503d2be0 4021 echo "$as_me: failed program was:" >&5
ba4481b5 4022 cat conftest.$ac_ext >&5
f4988be7 4023 ac_cv_header_stdc=no
ba4481b5 4024fi
503d2be0 4025rm -f conftest.err conftest.$ac_ext
ba4481b5 4026
f4988be7
GM
4027if test $ac_cv_header_stdc = yes; then
4028 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
503d2be0 4029 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 4030#line 4030 "configure"
f4988be7
GM
4031#include "confdefs.h"
4032#include <string.h>
503d2be0
AS
4033
4034_ACEOF
f4988be7
GM
4035if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4036 egrep "memchr" >/dev/null 2>&1; then
4037 :
4038else
f4988be7
GM
4039 ac_cv_header_stdc=no
4040fi
4041rm -f conftest*
4042
4043fi
4044
4045if test $ac_cv_header_stdc = yes; then
4046 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
503d2be0 4047 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 4048#line 4048 "configure"
f4988be7
GM
4049#include "confdefs.h"
4050#include <stdlib.h>
503d2be0
AS
4051
4052_ACEOF
f4988be7
GM
4053if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4054 egrep "free" >/dev/null 2>&1; then
4055 :
4056else
f4988be7
GM
4057 ac_cv_header_stdc=no
4058fi
4059rm -f conftest*
4060
4061fi
4062
4063if test $ac_cv_header_stdc = yes; then
4064 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
503d2be0 4065 if test "$cross_compiling" = yes; then
f4988be7
GM
4066 :
4067else
503d2be0 4068 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 4069#line 4069 "configure"
f4988be7
GM
4070#include "confdefs.h"
4071#include <ctype.h>
503d2be0
AS
4072#if ((' ' & 0x0FF) == 0x020)
4073# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4074# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4075#else
4076# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4077 || ('j' <= (c) && (c) <= 'r') \
4078 || ('s' <= (c) && (c) <= 'z'))
4079# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4080#endif
f4988be7 4081
503d2be0
AS
4082#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4083int
4084main ()
4085{
4086 int i;
4087 for (i = 0; i < 256; i++)
4088 if (XOR (islower (i), ISLOWER (i))
4089 || toupper (i) != TOUPPER (i))
4090 exit(2);
4091 exit (0);
4092}
4093_ACEOF
4094rm -f conftest$ac_exeext
ba5da88a 4095if { (eval echo "$as_me:4095: \"$ac_link\"") >&5
503d2be0
AS
4096 (eval $ac_link) 2>&5
4097 ac_status=$?
ba5da88a 4098 echo "$as_me:4098: \$? = $ac_status" >&5
503d2be0 4099 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ba5da88a 4100 { (eval echo "$as_me:4100: \"$ac_try\"") >&5
503d2be0
AS
4101 (eval $ac_try) 2>&5
4102 ac_status=$?
ba5da88a 4103 echo "$as_me:4103: \$? = $ac_status" >&5
503d2be0 4104 (exit $ac_status); }; }; then
f4988be7
GM
4105 :
4106else
503d2be0
AS
4107 echo "$as_me: program exited with status $ac_status" >&5
4108echo "$as_me: failed program was:" >&5
4109cat conftest.$ac_ext >&5
4110ac_cv_header_stdc=no
f4988be7 4111fi
503d2be0 4112rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
f4988be7 4113fi
f4988be7
GM
4114fi
4115fi
ba5da88a 4116echo "$as_me:4116: result: $ac_cv_header_stdc" >&5
503d2be0 4117echo "${ECHO_T}$ac_cv_header_stdc" >&6
f4988be7 4118if test $ac_cv_header_stdc = yes; then
503d2be0
AS
4119
4120cat >>confdefs.h <<\EOF
f4988be7
GM
4121#define STDC_HEADERS 1
4122EOF
4123
4124fi
4125
ba5da88a 4126echo "$as_me:4126: checking whether time.h and sys/time.h may both be included" >&5
503d2be0
AS
4127echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
4128if test "${ac_cv_header_time+set}" = set; then
4129 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4130else
503d2be0 4131 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 4132#line 4132 "configure"
f4988be7
GM
4133#include "confdefs.h"
4134#include <sys/types.h>
4135#include <sys/time.h>
4136#include <time.h>
503d2be0
AS
4137
4138int
4139main ()
4140{
4141if ((struct tm *) 0)
4142return 0;
4143 ;
4144 return 0;
4145}
4146_ACEOF
4147rm -f conftest.$ac_objext
ba5da88a 4148if { (eval echo "$as_me:4148: \"$ac_compile\"") >&5
503d2be0
AS
4149 (eval $ac_compile) 2>&5
4150 ac_status=$?
ba5da88a 4151 echo "$as_me:4151: \$? = $ac_status" >&5
503d2be0
AS
4152 (exit $ac_status); } &&
4153 { ac_try='test -s conftest.$ac_objext'
ba5da88a 4154 { (eval echo "$as_me:4154: \"$ac_try\"") >&5
503d2be0
AS
4155 (eval $ac_try) 2>&5
4156 ac_status=$?
ba5da88a 4157 echo "$as_me:4157: \$? = $ac_status" >&5
503d2be0 4158 (exit $ac_status); }; }; then
f4988be7
GM
4159 ac_cv_header_time=yes
4160else
503d2be0
AS
4161 echo "$as_me: failed program was:" >&5
4162cat conftest.$ac_ext >&5
4163ac_cv_header_time=no
f4988be7 4164fi
503d2be0 4165rm -f conftest.$ac_objext conftest.$ac_ext
f4988be7 4166fi
ba5da88a 4167echo "$as_me:4167: result: $ac_cv_header_time" >&5
503d2be0 4168echo "${ECHO_T}$ac_cv_header_time" >&6
f4988be7 4169if test $ac_cv_header_time = yes; then
503d2be0
AS
4170
4171cat >>confdefs.h <<\EOF
f4988be7
GM
4172#define TIME_WITH_SYS_TIME 1
4173EOF
4174
4175fi
4176
ba5da88a 4177echo "$as_me:4177: checking for sys_siglist declaration in signal.h or unistd.h" >&5
503d2be0
AS
4178echo $ECHO_N "checking for sys_siglist declaration in signal.h or unistd.h... $ECHO_C" >&6
4179if test "${ac_cv_decl_sys_siglist+set}" = set; then
4180 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4181else
503d2be0 4182 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 4183#line 4183 "configure"
f4988be7
GM
4184#include "confdefs.h"
4185#include <sys/types.h>
4186#include <signal.h>
4187/* NetBSD declares sys_siglist in unistd.h. */
503d2be0
AS
4188#if HAVE_UNISTD_H
4189# include <unistd.h>
f4988be7 4190#endif
503d2be0
AS
4191
4192int
4193main ()
4194{
f4988be7 4195char *msg = *(sys_siglist + 1);
503d2be0
AS
4196 ;
4197 return 0;
4198}
4199_ACEOF
4200rm -f conftest.$ac_objext
ba5da88a 4201if { (eval echo "$as_me:4201: \"$ac_compile\"") >&5
503d2be0
AS
4202 (eval $ac_compile) 2>&5
4203 ac_status=$?
ba5da88a 4204 echo "$as_me:4204: \$? = $ac_status" >&5
503d2be0
AS
4205 (exit $ac_status); } &&
4206 { ac_try='test -s conftest.$ac_objext'
ba5da88a 4207 { (eval echo "$as_me:4207: \"$ac_try\"") >&5
503d2be0
AS
4208 (eval $ac_try) 2>&5
4209 ac_status=$?
ba5da88a 4210 echo "$as_me:4210: \$? = $ac_status" >&5
503d2be0 4211 (exit $ac_status); }; }; then
f4988be7
GM
4212 ac_cv_decl_sys_siglist=yes
4213else
503d2be0
AS
4214 echo "$as_me: failed program was:" >&5
4215cat conftest.$ac_ext >&5
4216ac_cv_decl_sys_siglist=no
f4988be7 4217fi
503d2be0 4218rm -f conftest.$ac_objext conftest.$ac_ext
f4988be7 4219fi
ba5da88a 4220echo "$as_me:4220: result: $ac_cv_decl_sys_siglist" >&5
503d2be0 4221echo "${ECHO_T}$ac_cv_decl_sys_siglist" >&6
f4988be7 4222if test $ac_cv_decl_sys_siglist = yes; then
503d2be0
AS
4223
4224cat >>confdefs.h <<\EOF
f4988be7
GM
4225#define SYS_SIGLIST_DECLARED 1
4226EOF
4227
4228fi
4229
ba5da88a 4230echo "$as_me:4230: checking for sys/wait.h that is POSIX.1 compatible" >&5
503d2be0
AS
4231echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
4232if test "${ac_cv_header_sys_wait_h+set}" = set; then
4233 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4234else
503d2be0 4235 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 4236#line 4236 "configure"
f4988be7
GM
4237#include "confdefs.h"
4238#include <sys/types.h>
4239#include <sys/wait.h>
4240#ifndef WEXITSTATUS
503d2be0 4241# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
f4988be7
GM
4242#endif
4243#ifndef WIFEXITED
503d2be0 4244# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
f4988be7 4245#endif
503d2be0
AS
4246
4247int
4248main ()
4249{
4250 int s;
4251 wait (&s);
4252 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4253 ;
4254 return 0;
4255}
4256_ACEOF
4257rm -f conftest.$ac_objext
ba5da88a 4258if { (eval echo "$as_me:4258: \"$ac_compile\"") >&5
503d2be0
AS
4259 (eval $ac_compile) 2>&5
4260 ac_status=$?
ba5da88a 4261 echo "$as_me:4261: \$? = $ac_status" >&5
503d2be0
AS
4262 (exit $ac_status); } &&
4263 { ac_try='test -s conftest.$ac_objext'
ba5da88a 4264 { (eval echo "$as_me:4264: \"$ac_try\"") >&5
503d2be0
AS
4265 (eval $ac_try) 2>&5
4266 ac_status=$?
ba5da88a 4267 echo "$as_me:4267: \$? = $ac_status" >&5
503d2be0 4268 (exit $ac_status); }; }; then
f4988be7
GM
4269 ac_cv_header_sys_wait_h=yes
4270else
503d2be0
AS
4271 echo "$as_me: failed program was:" >&5
4272cat conftest.$ac_ext >&5
4273ac_cv_header_sys_wait_h=no
f4988be7 4274fi
503d2be0 4275rm -f conftest.$ac_objext conftest.$ac_ext
f4988be7 4276fi
ba5da88a 4277echo "$as_me:4277: result: $ac_cv_header_sys_wait_h" >&5
503d2be0 4278echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
f4988be7 4279if test $ac_cv_header_sys_wait_h = yes; then
503d2be0
AS
4280
4281cat >>confdefs.h <<\EOF
f4988be7
GM
4282#define HAVE_SYS_WAIT_H 1
4283EOF
4284
4285fi
4286
ba5da88a 4287echo "$as_me:4287: checking for struct utimbuf" >&5
503d2be0
AS
4288echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
4289if test "${emacs_cv_struct_utimbuf+set}" = set; then
4290 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4291else
503d2be0 4292 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 4293#line 4293 "configure"
f4988be7
GM
4294#include "confdefs.h"
4295#ifdef TIME_WITH_SYS_TIME
4296#include <sys/time.h>
4297#include <time.h>
4298#else
4299#ifdef HAVE_SYS_TIME_H
4300#include <sys/time.h>
4301#else
4302#include <time.h>
4303#endif
4304#endif
4305#ifdef HAVE_UTIME_H
4306#include <utime.h>
4307#endif
503d2be0
AS
4308int
4309main ()
4310{
f4988be7 4311static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
4312 ;
4313 return 0;
4314}
4315_ACEOF
4316rm -f conftest.$ac_objext
ba5da88a 4317if { (eval echo "$as_me:4317: \"$ac_compile\"") >&5
503d2be0
AS
4318 (eval $ac_compile) 2>&5
4319 ac_status=$?
ba5da88a 4320 echo "$as_me:4320: \$? = $ac_status" >&5
503d2be0
AS
4321 (exit $ac_status); } &&
4322 { ac_try='test -s conftest.$ac_objext'
ba5da88a 4323 { (eval echo "$as_me:4323: \"$ac_try\"") >&5
503d2be0
AS
4324 (eval $ac_try) 2>&5
4325 ac_status=$?
ba5da88a 4326 echo "$as_me:4326: \$? = $ac_status" >&5
503d2be0 4327 (exit $ac_status); }; }; then
f4988be7
GM
4328 emacs_cv_struct_utimbuf=yes
4329else
503d2be0
AS
4330 echo "$as_me: failed program was:" >&5
4331cat conftest.$ac_ext >&5
4332emacs_cv_struct_utimbuf=no
f4988be7 4333fi
503d2be0 4334rm -f conftest.$ac_objext conftest.$ac_ext
f4988be7 4335fi
ba5da88a 4336echo "$as_me:4336: result: $emacs_cv_struct_utimbuf" >&5
503d2be0 4337echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6
f4988be7 4338if test $emacs_cv_struct_utimbuf = yes; then
503d2be0 4339 cat >>confdefs.h <<\EOF
f4988be7
GM
4340#define HAVE_STRUCT_UTIMBUF 1
4341EOF
4342
4343fi
4344
ba5da88a 4345echo "$as_me:4345: checking return type of signal handlers" >&5
503d2be0
AS
4346echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4347if test "${ac_cv_type_signal+set}" = set; then
4348 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4349else
503d2be0 4350 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 4351#line 4351 "configure"
f4988be7
GM
4352#include "confdefs.h"
4353#include <sys/types.h>
4354#include <signal.h>
4355#ifdef signal
503d2be0 4356# undef signal
f4988be7
GM
4357#endif
4358#ifdef __cplusplus
4359extern "C" void (*signal (int, void (*)(int)))(int);
4360#else
4361void (*signal ()) ();
4362#endif
4363
503d2be0
AS
4364int
4365main ()
4366{
f4988be7 4367int i;
503d2be0
AS
4368 ;
4369 return 0;
4370}
4371_ACEOF
4372rm -f conftest.$ac_objext
ba5da88a 4373if { (eval echo "$as_me:4373: \"$ac_compile\"") >&5
503d2be0
AS
4374 (eval $ac_compile) 2>&5
4375 ac_status=$?
ba5da88a 4376 echo "$as_me:4376: \$? = $ac_status" >&5
503d2be0
AS
4377 (exit $ac_status); } &&
4378 { ac_try='test -s conftest.$ac_objext'
ba5da88a 4379 { (eval echo "$as_me:4379: \"$ac_try\"") >&5
503d2be0
AS
4380 (eval $ac_try) 2>&5
4381 ac_status=$?
ba5da88a 4382 echo "$as_me:4382: \$? = $ac_status" >&5
503d2be0 4383 (exit $ac_status); }; }; then
f4988be7
GM
4384 ac_cv_type_signal=void
4385else
503d2be0
AS
4386 echo "$as_me: failed program was:" >&5
4387cat conftest.$ac_ext >&5
4388ac_cv_type_signal=int
f4988be7 4389fi
503d2be0 4390rm -f conftest.$ac_objext conftest.$ac_ext
f4988be7 4391fi
ba5da88a 4392echo "$as_me:4392: result: $ac_cv_type_signal" >&5
503d2be0 4393echo "${ECHO_T}$ac_cv_type_signal" >&6
f4988be7 4394
503d2be0 4395cat >>confdefs.h <<EOF
f4988be7 4396#define RETSIGTYPE $ac_cv_type_signal
ba4481b5
DL
4397EOF
4398
ba5da88a 4399echo "$as_me:4399: checking for speed_t" >&5
503d2be0
AS
4400echo $ECHO_N "checking for speed_t... $ECHO_C" >&6
4401if test "${emacs_cv_speed_t+set}" = set; then
4402 echo $ECHO_N "(cached) $ECHO_C" >&6
34ec9ebe 4403else
503d2be0 4404 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 4405#line 4405 "configure"
34ec9ebe
GM
4406#include "confdefs.h"
4407#include <termios.h>
503d2be0
AS
4408int
4409main ()
4410{
34ec9ebe 4411speed_t x = 1;
503d2be0
AS
4412 ;
4413 return 0;
4414}
4415_ACEOF
4416rm -f conftest.$ac_objext
ba5da88a 4417if { (eval echo "$as_me:4417: \"$ac_compile\"") >&5
503d2be0
AS
4418 (eval $ac_compile) 2>&5
4419 ac_status=$?
ba5da88a 4420 echo "$as_me:4420: \$? = $ac_status" >&5
503d2be0
AS
4421 (exit $ac_status); } &&
4422 { ac_try='test -s conftest.$ac_objext'
ba5da88a 4423 { (eval echo "$as_me:4423: \"$ac_try\"") >&5
503d2be0
AS
4424 (eval $ac_try) 2>&5
4425 ac_status=$?
ba5da88a 4426 echo "$as_me:4426: \$? = $ac_status" >&5
503d2be0 4427 (exit $ac_status); }; }; then
34ec9ebe
GM
4428 emacs_cv_speed_t=yes
4429else
503d2be0
AS
4430 echo "$as_me: failed program was:" >&5
4431cat conftest.$ac_ext >&5
4432emacs_cv_speed_t=no
34ec9ebe 4433fi
503d2be0 4434rm -f conftest.$ac_objext conftest.$ac_ext
34ec9ebe 4435fi
ba5da88a 4436echo "$as_me:4436: result: $emacs_cv_speed_t" >&5
503d2be0 4437echo "${ECHO_T}$emacs_cv_speed_t" >&6
34ec9ebe 4438if test $emacs_cv_speed_t = yes; then
503d2be0 4439 cat >>confdefs.h <<\EOF
34ec9ebe
GM
4440#define HAVE_SPEED_T 1
4441EOF
4442
4443fi
4444
ba5da88a 4445echo "$as_me:4445: checking for struct timeval" >&5
503d2be0
AS
4446echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
4447if test "${emacs_cv_struct_timeval+set}" = set; then
4448 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4449else
503d2be0 4450 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 4451#line 4451 "configure"
ba4481b5
DL
4452#include "confdefs.h"
4453#ifdef TIME_WITH_SYS_TIME
4454#include <sys/time.h>
4455#include <time.h>
4456#else
4457#ifdef HAVE_SYS_TIME_H
4458#include <sys/time.h>
4459#else
4460#include <time.h>
4461#endif
4462#endif
503d2be0
AS
4463int
4464main ()
4465{
ba4481b5 4466static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
4467 ;
4468 return 0;
4469}
4470_ACEOF
4471rm -f conftest.$ac_objext
ba5da88a 4472if { (eval echo "$as_me:4472: \"$ac_compile\"") >&5
503d2be0
AS
4473 (eval $ac_compile) 2>&5
4474 ac_status=$?
ba5da88a 4475 echo "$as_me:4475: \$? = $ac_status" >&5
503d2be0
AS
4476 (exit $ac_status); } &&
4477 { ac_try='test -s conftest.$ac_objext'
ba5da88a 4478 { (eval echo "$as_me:4478: \"$ac_try\"") >&5
503d2be0
AS
4479 (eval $ac_try) 2>&5
4480 ac_status=$?
ba5da88a 4481 echo "$as_me:4481: \$? = $ac_status" >&5
503d2be0 4482 (exit $ac_status); }; }; then
ba4481b5
DL
4483 emacs_cv_struct_timeval=yes
4484else
503d2be0
AS
4485 echo "$as_me: failed program was:" >&5
4486cat conftest.$ac_ext >&5
4487emacs_cv_struct_timeval=no
ba4481b5 4488fi
503d2be0 4489rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 4490fi
ba5da88a 4491echo "$as_me:4491: result: $emacs_cv_struct_timeval" >&5
503d2be0 4492echo "${ECHO_T}$emacs_cv_struct_timeval" >&6
ba4481b5
DL
4493HAVE_TIMEVAL=$emacs_cv_struct_timeval
4494if test $emacs_cv_struct_timeval = yes; then
503d2be0 4495 cat >>confdefs.h <<\EOF
ba4481b5
DL
4496#define HAVE_TIMEVAL 1
4497EOF
4498
4499fi
4500
ba5da88a 4501echo "$as_me:4501: checking for struct exception" >&5
503d2be0
AS
4502echo $ECHO_N "checking for struct exception... $ECHO_C" >&6
4503if test "${emacs_cv_struct_exception+set}" = set; then
4504 echo $ECHO_N "(cached) $ECHO_C" >&6
d42122a3 4505else
503d2be0 4506 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 4507#line 4507 "configure"
d42122a3
DL
4508#include "confdefs.h"
4509#include <math.h>
503d2be0
AS
4510int
4511main ()
4512{
d42122a3 4513static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
4514 ;
4515 return 0;
4516}
4517_ACEOF
4518rm -f conftest.$ac_objext
ba5da88a 4519if { (eval echo "$as_me:4519: \"$ac_compile\"") >&5
503d2be0
AS
4520 (eval $ac_compile) 2>&5
4521 ac_status=$?
ba5da88a 4522 echo "$as_me:4522: \$? = $ac_status" >&5
503d2be0
AS
4523 (exit $ac_status); } &&
4524 { ac_try='test -s conftest.$ac_objext'
ba5da88a 4525 { (eval echo "$as_me:4525: \"$ac_try\"") >&5
503d2be0
AS
4526 (eval $ac_try) 2>&5
4527 ac_status=$?
ba5da88a 4528 echo "$as_me:4528: \$? = $ac_status" >&5
503d2be0 4529 (exit $ac_status); }; }; then
d42122a3
DL
4530 emacs_cv_struct_exception=yes
4531else
503d2be0
AS
4532 echo "$as_me: failed program was:" >&5
4533cat conftest.$ac_ext >&5
4534emacs_cv_struct_exception=no
d42122a3 4535fi
503d2be0 4536rm -f conftest.$ac_objext conftest.$ac_ext
d42122a3 4537fi
ba5da88a 4538echo "$as_me:4538: result: $emacs_cv_struct_exception" >&5
503d2be0 4539echo "${ECHO_T}$emacs_cv_struct_exception" >&6
d42122a3
DL
4540HAVE_EXCEPTION=$emacs_cv_struct_exception
4541if test $emacs_cv_struct_exception != yes; then
503d2be0 4542 cat >>confdefs.h <<\EOF
d42122a3
DL
4543#define NO_MATHERR 1
4544EOF
4545
4546fi
4547
ba5da88a 4548echo "$as_me:4548: checking whether struct tm is in sys/time.h or time.h" >&5
503d2be0
AS
4549echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
4550if test "${ac_cv_struct_tm+set}" = set; then
4551 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4552else
503d2be0 4553 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 4554#line 4554 "configure"
ba4481b5
DL
4555#include "confdefs.h"
4556#include <sys/types.h>
4557#include <time.h>
503d2be0
AS
4558
4559int
4560main ()
4561{
ba4481b5 4562struct tm *tp; tp->tm_sec;
503d2be0
AS
4563 ;
4564 return 0;
4565}
4566_ACEOF
4567rm -f conftest.$ac_objext
ba5da88a 4568if { (eval echo "$as_me:4568: \"$ac_compile\"") >&5
503d2be0
AS
4569 (eval $ac_compile) 2>&5
4570 ac_status=$?
ba5da88a 4571 echo "$as_me:4571: \$? = $ac_status" >&5
503d2be0
AS
4572 (exit $ac_status); } &&
4573 { ac_try='test -s conftest.$ac_objext'
ba5da88a 4574 { (eval echo "$as_me:4574: \"$ac_try\"") >&5
503d2be0
AS
4575 (eval $ac_try) 2>&5
4576 ac_status=$?
ba5da88a 4577 echo "$as_me:4577: \$? = $ac_status" >&5
503d2be0 4578 (exit $ac_status); }; }; then
ba4481b5
DL
4579 ac_cv_struct_tm=time.h
4580else
503d2be0
AS
4581 echo "$as_me: failed program was:" >&5
4582cat conftest.$ac_ext >&5
4583ac_cv_struct_tm=sys/time.h
ba4481b5 4584fi
503d2be0 4585rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 4586fi
ba5da88a 4587echo "$as_me:4587: result: $ac_cv_struct_tm" >&5
503d2be0 4588echo "${ECHO_T}$ac_cv_struct_tm" >&6
ba4481b5 4589if test $ac_cv_struct_tm = sys/time.h; then
503d2be0
AS
4590
4591cat >>confdefs.h <<\EOF
ba4481b5
DL
4592#define TM_IN_SYS_TIME 1
4593EOF
4594
4595fi
4596
ba5da88a 4597echo "$as_me:4597: checking for struct tm.tm_zone" >&5
503d2be0
AS
4598echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
4599if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
4600 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4601else
503d2be0 4602 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 4603#line 4603 "configure"
ba4481b5
DL
4604#include "confdefs.h"
4605#include <sys/types.h>
4606#include <$ac_cv_struct_tm>
503d2be0
AS
4607
4608int
4609main ()
4610{
4611static struct tm ac_aggr;
4612if (ac_aggr.tm_zone)
4613return 0;
4614 ;
4615 return 0;
4616}
4617_ACEOF
4618rm -f conftest.$ac_objext
ba5da88a 4619if { (eval echo "$as_me:4619: \"$ac_compile\"") >&5
503d2be0
AS
4620 (eval $ac_compile) 2>&5
4621 ac_status=$?
ba5da88a 4622 echo "$as_me:4622: \$? = $ac_status" >&5
503d2be0
AS
4623 (exit $ac_status); } &&
4624 { ac_try='test -s conftest.$ac_objext'
ba5da88a 4625 { (eval echo "$as_me:4625: \"$ac_try\"") >&5
503d2be0
AS
4626 (eval $ac_try) 2>&5
4627 ac_status=$?
ba5da88a 4628 echo "$as_me:4628: \$? = $ac_status" >&5
503d2be0
AS
4629 (exit $ac_status); }; }; then
4630 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 4631else
503d2be0
AS
4632 echo "$as_me: failed program was:" >&5
4633cat conftest.$ac_ext >&5
4634ac_cv_member_struct_tm_tm_zone=no
ba4481b5 4635fi
503d2be0
AS
4636rm -f conftest.$ac_objext conftest.$ac_ext
4637fi
ba5da88a 4638echo "$as_me:4638: result: $ac_cv_member_struct_tm_tm_zone" >&5
503d2be0
AS
4639echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
4640if test $ac_cv_member_struct_tm_tm_zone = yes; then
4641
4642cat >>confdefs.h <<EOF
4643#define HAVE_STRUCT_TM_TM_ZONE 1
4644EOF
4645
ba4481b5
DL
4646fi
4647
503d2be0
AS
4648if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
4649
4650cat >>confdefs.h <<\EOF
ba4481b5
DL
4651#define HAVE_TM_ZONE 1
4652EOF
4653
4654else
ba5da88a 4655 echo "$as_me:4655: checking for tzname" >&5
503d2be0
AS
4656echo $ECHO_N "checking for tzname... $ECHO_C" >&6
4657if test "${ac_cv_var_tzname+set}" = set; then
4658 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4659else
503d2be0 4660 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 4661#line 4661 "configure"
ba4481b5
DL
4662#include "confdefs.h"
4663#include <time.h>
4664#ifndef tzname /* For SGI. */
4665extern char *tzname[]; /* RS6000 and others reject char **tzname. */
4666#endif
503d2be0
AS
4667
4668int
4669main ()
4670{
ba4481b5 4671atoi(*tzname);
503d2be0
AS
4672 ;
4673 return 0;
4674}
4675_ACEOF
4676rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 4677if { (eval echo "$as_me:4677: \"$ac_link\"") >&5
503d2be0
AS
4678 (eval $ac_link) 2>&5
4679 ac_status=$?
ba5da88a 4680 echo "$as_me:4680: \$? = $ac_status" >&5
503d2be0
AS
4681 (exit $ac_status); } &&
4682 { ac_try='test -s conftest$ac_exeext'
ba5da88a 4683 { (eval echo "$as_me:4683: \"$ac_try\"") >&5
503d2be0
AS
4684 (eval $ac_try) 2>&5
4685 ac_status=$?
ba5da88a 4686 echo "$as_me:4686: \$? = $ac_status" >&5
503d2be0 4687 (exit $ac_status); }; }; then
ba4481b5
DL
4688 ac_cv_var_tzname=yes
4689else
503d2be0
AS
4690 echo "$as_me: failed program was:" >&5
4691cat conftest.$ac_ext >&5
4692ac_cv_var_tzname=no
ba4481b5 4693fi
503d2be0 4694rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 4695fi
ba5da88a 4696echo "$as_me:4696: result: $ac_cv_var_tzname" >&5
503d2be0 4697echo "${ECHO_T}$ac_cv_var_tzname" >&6
ba4481b5 4698 if test $ac_cv_var_tzname = yes; then
503d2be0
AS
4699
4700cat >>confdefs.h <<\EOF
ba4481b5
DL
4701#define HAVE_TZNAME 1
4702EOF
4703
4704 fi
4705fi
4706
ba5da88a 4707echo "$as_me:4707: checking for tm_gmtoff in struct tm" >&5
503d2be0
AS
4708echo $ECHO_N "checking for tm_gmtoff in struct tm... $ECHO_C" >&6
4709if test "${emacs_cv_tm_gmtoff+set}" = set; then
4710 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 4711else
503d2be0 4712 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 4713#line 4713 "configure"
1113b624
PE
4714#include "confdefs.h"
4715#include <time.h>
503d2be0
AS
4716int
4717main ()
4718{
1113b624 4719struct tm t; t.tm_gmtoff = 0
503d2be0
AS
4720 ;
4721 return 0;
4722}
4723_ACEOF
4724rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 4725if { (eval echo "$as_me:4725: \"$ac_link\"") >&5
503d2be0
AS
4726 (eval $ac_link) 2>&5
4727 ac_status=$?
ba5da88a 4728 echo "$as_me:4728: \$? = $ac_status" >&5
503d2be0
AS
4729 (exit $ac_status); } &&
4730 { ac_try='test -s conftest$ac_exeext'
ba5da88a 4731 { (eval echo "$as_me:4731: \"$ac_try\"") >&5
503d2be0
AS
4732 (eval $ac_try) 2>&5
4733 ac_status=$?
ba5da88a 4734 echo "$as_me:4734: \$? = $ac_status" >&5
503d2be0 4735 (exit $ac_status); }; }; then
1113b624
PE
4736 emacs_cv_tm_gmtoff=yes
4737else
503d2be0
AS
4738 echo "$as_me: failed program was:" >&5
4739cat conftest.$ac_ext >&5
4740emacs_cv_tm_gmtoff=no
1113b624 4741fi
503d2be0 4742rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1113b624 4743fi
ba5da88a 4744echo "$as_me:4744: result: $emacs_cv_tm_gmtoff" >&5
503d2be0 4745echo "${ECHO_T}$emacs_cv_tm_gmtoff" >&6
1113b624 4746if test $emacs_cv_tm_gmtoff = yes; then
503d2be0 4747 cat >>confdefs.h <<\EOF
1113b624
PE
4748#define HAVE_TM_GMTOFF 1
4749EOF
4750
4751fi
ba4481b5 4752
ba5da88a 4753echo "$as_me:4753: checking for $CC option to accept ANSI C" >&5
503d2be0
AS
4754echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
4755if test "${ac_cv_prog_cc_stdc+set}" = set; then
4756 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
4757else
4758 ac_cv_prog_cc_stdc=no
503d2be0
AS
4759ac_save_CC=$CC
4760cat >conftest.$ac_ext <<_ACEOF
ba5da88a 4761#line 4761 "configure"
7397acc4
DL
4762#include "confdefs.h"
4763#include <stdarg.h>
4764#include <stdio.h>
4765#include <sys/types.h>
4766#include <sys/stat.h>
4767/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4768struct buf { int x; };
4769FILE * (*rcsopen) (struct buf *, struct stat *, int);
4770static char *e (p, i)
4771 char **p;
4772 int i;
4773{
4774 return p[i];
4775}
4776static char *f (char * (*g) (char **, int), char **p, ...)
4777{
4778 char *s;
4779 va_list v;
4780 va_start (v,p);
4781 s = g (p, va_arg (v,int));
4782 va_end (v);
4783 return s;
4784}
4785int test (int i, double x);
4786struct s1 {int (*f) (int a);};
4787struct s2 {int (*f) (double a);};
4788int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4789int argc;
4790char **argv;
503d2be0
AS
4791int
4792main ()
4793{
7397acc4 4794return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
503d2be0
AS
4795 ;
4796 return 0;
4797}
4798_ACEOF
4799# Don't try gcc -ansi; that turns off useful extensions and
4800# breaks some systems' header files.
4801# AIX -qlanglvl=ansi
4802# Ultrix and OSF/1 -std1
4803# HP-UX 10.20 and later -Ae
4804# HP-UX older versions -Aa -D_HPUX_SOURCE
4805# SVR4 -Xc -D__EXTENSIONS__
4806for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4807do
4808 CC="$ac_save_CC $ac_arg"
4809 rm -f conftest.$ac_objext
ba5da88a 4810if { (eval echo "$as_me:4810: \"$ac_compile\"") >&5
503d2be0
AS
4811 (eval $ac_compile) 2>&5
4812 ac_status=$?
ba5da88a 4813 echo "$as_me:4813: \$? = $ac_status" >&5
503d2be0
AS
4814 (exit $ac_status); } &&
4815 { ac_try='test -s conftest.$ac_objext'
ba5da88a 4816 { (eval echo "$as_me:4816: \"$ac_try\"") >&5
503d2be0
AS
4817 (eval $ac_try) 2>&5
4818 ac_status=$?
ba5da88a 4819 echo "$as_me:4819: \$? = $ac_status" >&5
503d2be0
AS
4820 (exit $ac_status); }; }; then
4821 ac_cv_prog_cc_stdc=$ac_arg
4822break
4823else
4824 echo "$as_me: failed program was:" >&5
4825cat conftest.$ac_ext >&5
4826fi
4827rm -f conftest.$ac_objext
7397acc4 4828done
503d2be0
AS
4829rm -f conftest.$ac_ext conftest.$ac_objext
4830CC=$ac_save_CC
7397acc4
DL
4831
4832fi
4833
4834case "x$ac_cv_prog_cc_stdc" in
4835 x|xno)
ba5da88a 4836 echo "$as_me:4836: result: none needed" >&5
503d2be0 4837echo "${ECHO_T}none needed" >&6 ;;
7397acc4 4838 *)
ba5da88a 4839 echo "$as_me:4839: result: $ac_cv_prog_cc_stdc" >&5
503d2be0 4840echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
7397acc4
DL
4841 CC="$CC $ac_cv_prog_cc_stdc" ;;
4842esac
4843
ba5da88a 4844echo "$as_me:4844: checking for function prototypes" >&5
503d2be0 4845echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
7397acc4 4846if test "$ac_cv_prog_cc_stdc" != no; then
ba5da88a 4847 echo "$as_me:4847: result: yes" >&5
503d2be0
AS
4848echo "${ECHO_T}yes" >&6
4849
4850cat >>confdefs.h <<\EOF
7397acc4
DL
4851#define PROTOTYPES 1
4852EOF
4853
4854else
ba5da88a 4855 echo "$as_me:4855: result: no" >&5
503d2be0 4856echo "${ECHO_T}no" >&6
7397acc4
DL
4857fi
4858
ba5da88a 4859echo "$as_me:4859: checking for working volatile" >&5
503d2be0
AS
4860echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
4861if test "${ac_cv_c_volatile+set}" = set; then
4862 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 4863else
503d2be0 4864 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 4865#line 4865 "configure"
7397acc4
DL
4866#include "confdefs.h"
4867
503d2be0
AS
4868int
4869main ()
4870{
7397acc4
DL
4871
4872volatile int x;
4873int * volatile y;
503d2be0
AS
4874 ;
4875 return 0;
4876}
4877_ACEOF
4878rm -f conftest.$ac_objext
ba5da88a 4879if { (eval echo "$as_me:4879: \"$ac_compile\"") >&5
503d2be0
AS
4880 (eval $ac_compile) 2>&5
4881 ac_status=$?
ba5da88a 4882 echo "$as_me:4882: \$? = $ac_status" >&5
503d2be0
AS
4883 (exit $ac_status); } &&
4884 { ac_try='test -s conftest.$ac_objext'
ba5da88a 4885 { (eval echo "$as_me:4885: \"$ac_try\"") >&5
503d2be0
AS
4886 (eval $ac_try) 2>&5
4887 ac_status=$?
ba5da88a 4888 echo "$as_me:4888: \$? = $ac_status" >&5
503d2be0 4889 (exit $ac_status); }; }; then
7397acc4
DL
4890 ac_cv_c_volatile=yes
4891else
503d2be0
AS
4892 echo "$as_me: failed program was:" >&5
4893cat conftest.$ac_ext >&5
4894ac_cv_c_volatile=no
7397acc4 4895fi
503d2be0 4896rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 4897fi
ba5da88a 4898echo "$as_me:4898: result: $ac_cv_c_volatile" >&5
503d2be0 4899echo "${ECHO_T}$ac_cv_c_volatile" >&6
7397acc4 4900if test $ac_cv_c_volatile = no; then
503d2be0
AS
4901
4902cat >>confdefs.h <<\EOF
4903#define volatile
7397acc4
DL
4904EOF
4905
4906fi
4907
ba5da88a 4908echo "$as_me:4908: checking for an ANSI C-conforming const" >&5
503d2be0
AS
4909echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
4910if test "${ac_cv_c_const+set}" = set; then
4911 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4912else
503d2be0 4913 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 4914#line 4914 "configure"
ba4481b5
DL
4915#include "confdefs.h"
4916
503d2be0
AS
4917int
4918main ()
4919{
4920/* FIXME: Include the comments suggested by Paul. */
4921#ifndef __cplusplus
4922 /* Ultrix mips cc rejects this. */
4923 typedef int charset[2];
4924 const charset x;
4925 /* SunOS 4.1.1 cc rejects this. */
4926 char const *const *ccp;
4927 char **p;
4928 /* NEC SVR4.0.2 mips cc rejects this. */
4929 struct point {int x, y;};
4930 static struct point const zero = {0,0};
4931 /* AIX XL C 1.02.0.0 rejects this.
4932 It does not let you subtract one const X* pointer from another in
4933 an arm of an if-expression whose if-part is not a constant
4934 expression */
4935 const char *g = "string";
4936 ccp = &g + (g ? g-g : 0);
4937 /* HPUX 7.0 cc rejects these. */
4938 ++ccp;
4939 p = (char**) ccp;
4940 ccp = (char const *const *) p;
4941 { /* SCO 3.2v4 cc rejects this. */
4942 char *t;
4943 char const *s = 0 ? (char *) 0 : (char const *) 0;
4944
4945 *t++ = 0;
4946 }
4947 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
4948 int x[] = {25, 17};
4949 const int *foo = &x[0];
4950 ++foo;
4951 }
4952 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4953 typedef const int *iptr;
4954 iptr p = 0;
4955 ++p;
4956 }
4957 { /* AIX XL C 1.02.0.0 rejects this saying
4958 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4959 struct s { int j; const int *ap[3]; };
4960 struct s *b; b->j = 5;
4961 }
4962 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4963 const int foo = 10;
4964 }
4965#endif
ba4481b5 4966
503d2be0
AS
4967 ;
4968 return 0;
ba4481b5 4969}
503d2be0
AS
4970_ACEOF
4971rm -f conftest.$ac_objext
ba5da88a 4972if { (eval echo "$as_me:4972: \"$ac_compile\"") >&5
503d2be0
AS
4973 (eval $ac_compile) 2>&5
4974 ac_status=$?
ba5da88a 4975 echo "$as_me:4975: \$? = $ac_status" >&5
503d2be0
AS
4976 (exit $ac_status); } &&
4977 { ac_try='test -s conftest.$ac_objext'
ba5da88a 4978 { (eval echo "$as_me:4978: \"$ac_try\"") >&5
503d2be0
AS
4979 (eval $ac_try) 2>&5
4980 ac_status=$?
ba5da88a 4981 echo "$as_me:4981: \$? = $ac_status" >&5
503d2be0 4982 (exit $ac_status); }; }; then
ba4481b5
DL
4983 ac_cv_c_const=yes
4984else
503d2be0
AS
4985 echo "$as_me: failed program was:" >&5
4986cat conftest.$ac_ext >&5
4987ac_cv_c_const=no
ba4481b5 4988fi
503d2be0 4989rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 4990fi
ba5da88a 4991echo "$as_me:4991: result: $ac_cv_c_const" >&5
503d2be0 4992echo "${ECHO_T}$ac_cv_c_const" >&6
ba4481b5 4993if test $ac_cv_c_const = no; then
503d2be0
AS
4994
4995cat >>confdefs.h <<\EOF
4996#define const
ba4481b5
DL
4997EOF
4998
4999fi
5000
ba5da88a 5001echo "$as_me:5001: checking for void * support" >&5
503d2be0
AS
5002echo $ECHO_N "checking for void * support... $ECHO_C" >&6
5003if test "${emacs_cv_void_star+set}" = set; then
5004 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 5005else
503d2be0 5006 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 5007#line 5007 "configure"
7397acc4
DL
5008#include "confdefs.h"
5009
503d2be0
AS
5010int
5011main ()
5012{
7397acc4 5013void * foo;
503d2be0
AS
5014 ;
5015 return 0;
5016}
5017_ACEOF
5018rm -f conftest.$ac_objext
ba5da88a 5019if { (eval echo "$as_me:5019: \"$ac_compile\"") >&5
503d2be0
AS
5020 (eval $ac_compile) 2>&5
5021 ac_status=$?
ba5da88a 5022 echo "$as_me:5022: \$? = $ac_status" >&5
503d2be0
AS
5023 (exit $ac_status); } &&
5024 { ac_try='test -s conftest.$ac_objext'
ba5da88a 5025 { (eval echo "$as_me:5025: \"$ac_try\"") >&5
503d2be0
AS
5026 (eval $ac_try) 2>&5
5027 ac_status=$?
ba5da88a 5028 echo "$as_me:5028: \$? = $ac_status" >&5
503d2be0 5029 (exit $ac_status); }; }; then
7397acc4
DL
5030 emacs_cv_void_star=yes
5031else
503d2be0
AS
5032 echo "$as_me: failed program was:" >&5
5033cat conftest.$ac_ext >&5
5034emacs_cv_void_star=no
7397acc4 5035fi
503d2be0 5036rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 5037fi
ba5da88a 5038echo "$as_me:5038: result: $emacs_cv_void_star" >&5
503d2be0 5039echo "${ECHO_T}$emacs_cv_void_star" >&6
7397acc4 5040if test $emacs_cv_void_star = yes; then
503d2be0 5041 cat >>confdefs.h <<\EOF
7397acc4
DL
5042#define POINTER_TYPE void
5043EOF
5044
5045else
503d2be0 5046 cat >>confdefs.h <<\EOF
7397acc4
DL
5047#define POINTER_TYPE char
5048EOF
5049
5050fi
ba4481b5 5051
ba5da88a 5052echo "$as_me:5052: checking whether ${MAKE-make} sets \${MAKE}" >&5
503d2be0
AS
5053echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
5054set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
5055if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
5056 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5057else
503d2be0 5058 cat >conftest.make <<\EOF
ba4481b5
DL
5059all:
5060 @echo 'ac_maketemp="${MAKE}"'
5061EOF
5062# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
503d2be0 5063eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
ba4481b5
DL
5064if test -n "$ac_maketemp"; then
5065 eval ac_cv_prog_make_${ac_make}_set=yes
5066else
5067 eval ac_cv_prog_make_${ac_make}_set=no
5068fi
503d2be0 5069rm -f conftest.make
ba4481b5
DL
5070fi
5071if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
ba5da88a 5072 echo "$as_me:5072: result: yes" >&5
503d2be0 5073echo "${ECHO_T}yes" >&6
ba4481b5
DL
5074 SET_MAKE=
5075else
ba5da88a 5076 echo "$as_me:5076: result: no" >&5
503d2be0 5077echo "${ECHO_T}no" >&6
ba4481b5
DL
5078 SET_MAKE="MAKE=${MAKE-make}"
5079fi
5080
ba5da88a 5081echo "$as_me:5081: checking for long file names" >&5
503d2be0
AS
5082echo $ECHO_N "checking for long file names... $ECHO_C" >&6
5083if test "${ac_cv_sys_long_file_names+set}" = set; then
5084 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
5085else
5086 ac_cv_sys_long_file_names=yes
5087# Test for long file names in all the places we know might matter:
5088# . the current directory, where building will happen
5089# $prefix/lib where we will be installing things
5090# $exec_prefix/lib likewise
5091# eval it to expand exec_prefix.
5092# $TMPDIR if set, where it might want to write temporary files
5093# if $TMPDIR is not set:
5094# /tmp where it might want to write temporary files
5095# /var/tmp likewise
5096# /usr/tmp likewise
5097if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
503d2be0 5098 ac_tmpdirs=$TMPDIR
ba4481b5
DL
5099else
5100 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
5101fi
5102for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
5103 test -d $ac_dir || continue
5104 test -w $ac_dir || continue # It is less confusing to not echo anything here.
503d2be0
AS
5105 ac_xdir=$ac_dir/cf$$
5106 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
5107 ac_tf1=$ac_xdir/conftest9012345
5108 ac_tf2=$ac_xdir/conftest9012346
5109 (echo 1 >$ac_tf1) 2>/dev/null
5110 (echo 2 >$ac_tf2) 2>/dev/null
5111 ac_val=`cat $ac_tf1 2>/dev/null`
5112 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
ba4481b5 5113 ac_cv_sys_long_file_names=no
503d2be0 5114 rm -rf $ac_xdir 2>/dev/null
ba4481b5
DL
5115 break
5116 fi
503d2be0 5117 rm -rf $ac_xdir 2>/dev/null
ba4481b5
DL
5118done
5119fi
ba5da88a 5120echo "$as_me:5120: result: $ac_cv_sys_long_file_names" >&5
503d2be0 5121echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
ba4481b5 5122if test $ac_cv_sys_long_file_names = yes; then
503d2be0
AS
5123
5124cat >>confdefs.h <<\EOF
ba4481b5
DL
5125#define HAVE_LONG_FILE_NAMES 1
5126EOF
5127
5128fi
5129
ba4481b5
DL
5130#### Choose a window system.
5131
ba5da88a 5132echo "$as_me:5132: checking for X" >&5
503d2be0 5133echo $ECHO_N "checking for X... $ECHO_C" >&6
ba4481b5
DL
5134
5135# Check whether --with-x or --without-x was given.
5136if test "${with_x+set}" = set; then
5137 withval="$with_x"
ba4481b5 5138
503d2be0 5139fi;
ba4481b5
DL
5140# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5141if test "x$with_x" = xno; then
5142 # The user explicitly disabled X.
5143 have_x=disabled
5144else
5145 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5146 # Both variables are already set.
5147 have_x=yes
5148 else
503d2be0
AS
5149 if test "${ac_cv_have_x+set}" = set; then
5150 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
5151else
5152 # One or both of the vars are not set, and there is no cached value.
503d2be0
AS
5153ac_x_includes=no ac_x_libraries=no
5154rm -fr conftest.dir
5155if mkdir conftest.dir; then
5156 cd conftest.dir
ba4481b5 5157 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
503d2be0 5158 cat >Imakefile <<'EOF'
ba4481b5
DL
5159acfindx:
5160 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5161EOF
5162 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5163 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5164 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5165 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5166 for ac_extension in a so sl; do
5167 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
503d2be0 5168 test -f $ac_im_libdir/libX11.$ac_extension; then
ba4481b5
DL
5169 ac_im_usrlibdir=$ac_im_libdir; break
5170 fi
5171 done
5172 # Screen out bogus values from the imake configuration. They are
5173 # bogus both because they are the default anyway, and because
5174 # using them would break gcc on systems where it needs fixed includes.
503d2be0 5175 case $ac_im_incroot in
ba4481b5 5176 /usr/include) ;;
503d2be0 5177 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
ba4481b5 5178 esac
503d2be0 5179 case $ac_im_usrlibdir in
ba4481b5 5180 /usr/lib | /lib) ;;
503d2be0 5181 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
ba4481b5
DL
5182 esac
5183 fi
5184 cd ..
503d2be0 5185 rm -fr conftest.dir
ba4481b5
DL
5186fi
5187
503d2be0
AS
5188# Standard set of common directories for X headers.
5189# Check X11 before X11Rn because it is often a symlink to the current release.
5190ac_x_header_dirs='
5191/usr/X11/include
5192/usr/X11R6/include
5193/usr/X11R5/include
5194/usr/X11R4/include
5195
5196/usr/include/X11
5197/usr/include/X11R6
5198/usr/include/X11R5
5199/usr/include/X11R4
5200
5201/usr/local/X11/include
5202/usr/local/X11R6/include
5203/usr/local/X11R5/include
5204/usr/local/X11R4/include
5205
5206/usr/local/include/X11
5207/usr/local/include/X11R6
5208/usr/local/include/X11R5
5209/usr/local/include/X11R4
5210
5211/usr/X386/include
5212/usr/x386/include
5213/usr/XFree86/include/X11
5214
5215/usr/include
5216/usr/local/include
5217/usr/unsupported/include
5218/usr/athena/include
5219/usr/local/x11r5/include
5220/usr/lpp/Xamples/include
5221
5222/usr/openwin/include
5223/usr/openwin/share/include'
5224
5225if test "$ac_x_includes" = no; then
5226 # Guess where to find include files, by looking for Intrinsic.h.
ba4481b5 5227 # First, try using that file with no special directory specified.
503d2be0 5228 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 5229#line 5229 "configure"
ba4481b5 5230#include "confdefs.h"
503d2be0
AS
5231#include <X11/Intrinsic.h>
5232_ACEOF
ba5da88a 5233if { (eval echo "$as_me:5233: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
5234 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5235 ac_status=$?
5236 egrep -v '^ *\+' conftest.er1 >conftest.err
5237 rm -f conftest.er1
5238 cat conftest.err >&5
ba5da88a 5239 echo "$as_me:5239: \$? = $ac_status" >&5
503d2be0
AS
5240 (exit $ac_status); } >/dev/null; then
5241 if test -s conftest.err; then
5242 ac_cpp_err=$ac_c_preproc_warn_flag
5243 else
5244 ac_cpp_err=
5245 fi
5246else
5247 ac_cpp_err=yes
5248fi
5249if test -z "$ac_cpp_err"; then
ba4481b5
DL
5250 # We can compile using X headers with no special include directory.
5251ac_x_includes=
5252else
503d2be0 5253 echo "$as_me: failed program was:" >&5
ba4481b5 5254 cat conftest.$ac_ext >&5
503d2be0
AS
5255 for ac_dir in $ac_x_header_dirs; do
5256 if test -r "$ac_dir/X11/Intrinsic.h"; then
5257 ac_x_includes=$ac_dir
5258 break
5259 fi
5260done
ba4481b5 5261fi
503d2be0
AS
5262rm -f conftest.err conftest.$ac_ext
5263fi # $ac_x_includes = no
ba4481b5 5264
503d2be0 5265if test "$ac_x_libraries" = no; then
ba4481b5 5266 # Check for the libraries.
ba4481b5
DL
5267 # See if we find them without any special options.
5268 # Don't add to $LIBS permanently.
503d2be0
AS
5269 ac_save_LIBS=$LIBS
5270 LIBS="-lXt $LIBS"
5271 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 5272#line 5272 "configure"
ba4481b5 5273#include "confdefs.h"
503d2be0
AS
5274#include <X11/Intrinsic.h>
5275int
5276main ()
5277{
5278XtMalloc (0)
5279 ;
5280 return 0;
5281}
5282_ACEOF
5283rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 5284if { (eval echo "$as_me:5284: \"$ac_link\"") >&5
503d2be0
AS
5285 (eval $ac_link) 2>&5
5286 ac_status=$?
ba5da88a 5287 echo "$as_me:5287: \$? = $ac_status" >&5
503d2be0
AS
5288 (exit $ac_status); } &&
5289 { ac_try='test -s conftest$ac_exeext'
ba5da88a 5290 { (eval echo "$as_me:5290: \"$ac_try\"") >&5
503d2be0
AS
5291 (eval $ac_try) 2>&5
5292 ac_status=$?
ba5da88a 5293 echo "$as_me:5293: \$? = $ac_status" >&5
503d2be0
AS
5294 (exit $ac_status); }; }; then
5295 LIBS=$ac_save_LIBS
ba4481b5
DL
5296# We can link X programs with no special library path.
5297ac_x_libraries=
5298else
503d2be0
AS
5299 echo "$as_me: failed program was:" >&5
5300cat conftest.$ac_ext >&5
5301LIBS=$ac_save_LIBS
5302for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
ba4481b5 5303do
503d2be0 5304 # Don't even attempt the hair of trying to link an X program!
ba4481b5 5305 for ac_extension in a so sl; do
503d2be0 5306 if test -r $ac_dir/libXt.$ac_extension; then
ba4481b5
DL
5307 ac_x_libraries=$ac_dir
5308 break 2
5309 fi
5310 done
5311done
5312fi
503d2be0
AS
5313rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5314fi # $ac_x_libraries = no
ba4481b5 5315
503d2be0 5316if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
ba4481b5
DL
5317 # Didn't find X anywhere. Cache the known absence of X.
5318 ac_cv_have_x="have_x=no"
5319else
5320 # Record where we found X for the cache.
5321 ac_cv_have_x="have_x=yes \
5322 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5323fi
5324fi
503d2be0 5325
ba4481b5
DL
5326 fi
5327 eval "$ac_cv_have_x"
5328fi # $with_x != no
5329
5330if test "$have_x" != yes; then
ba5da88a 5331 echo "$as_me:5331: result: $have_x" >&5
503d2be0 5332echo "${ECHO_T}$have_x" >&6
ba4481b5
DL
5333 no_x=yes
5334else
5335 # If each of the values was on the command line, it overrides each guess.
5336 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5337 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5338 # Update the cache value to reflect the command line values.
5339 ac_cv_have_x="have_x=yes \
5340 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
ba5da88a 5341 echo "$as_me:5341: result: libraries $x_libraries, headers $x_includes" >&5
503d2be0 5342echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
ba4481b5
DL
5343fi
5344
5345if test "$no_x" = yes; then
5346 window_system=none
5347else
5348 window_system=x11
5349fi
5350
5351if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
5352 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
5353 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
5354 x_default_search_path=""
5355 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
f5215ba5
GM
5356 x_search_path="\
5357${x_library}/X11/%L/%T/%N%C%S:\
5358${x_library}/X11/%l/%T/%N%C%S:\
5359${x_library}/X11/%T/%N%C%S:\
5360${x_library}/X11/%L/%T/%N%S:\
5361${x_library}/X11/%l/%T/%N%S:\
5362${x_library}/X11/%T/%N%S"
ba4481b5
DL
5363 if test x"${x_default_search_path}" = x; then
5364 x_default_search_path=${x_search_path}
5365 else
5366 x_default_search_path="${x_search_path}:${x_default_search_path}"
5367 fi
5368 done
5369fi
5370if test "${x_includes}" != NONE && test -n "${x_includes}"; then
5371 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
5372fi
5373
5374if test x"${x_includes}" = x; then
5375 bitmapdir=/usr/include/X11/bitmaps
5376else
5377 # accumulate include directories that have X11 bitmap subdirectories
5378 bmd_acc="dummyval"
5379 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
5380 if test -d "${bmd}/X11/bitmaps"; then
5381 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
946173ad
DL
5382 fi
5383 if test -d "${bmd}/bitmaps"; then
ba4481b5
DL
5384 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
5385 fi
5386 done
5387 if test ${bmd_acc} != "dummyval"; then
5388 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
5389 fi
5390fi
5391
5392case "${window_system}" in
5393 x11 )
5394 HAVE_X_WINDOWS=yes
5395 HAVE_X11=yes
5396 case "${with_x_toolkit}" in
5397 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
5398 motif ) USE_X_TOOLKIT=MOTIF ;;
5399 no ) USE_X_TOOLKIT=none ;;
5400 * ) USE_X_TOOLKIT=maybe ;;
5401 esac
5402 ;;
5403 none )
5404 HAVE_X_WINDOWS=no
5405 HAVE_X11=no
5406 USE_X_TOOLKIT=none
5407 ;;
5408esac
5409
5410### If we're using X11, we should use the X menu package.
5411HAVE_MENUS=no
5412case ${HAVE_X11} in
5413 yes ) HAVE_MENUS=yes ;;
5414esac
503d2be0 5415
ba4481b5
DL
5416if test "${opsys}" = "hpux9"; then
5417 case "${x_libraries}" in
5418 *X11R4* )
5419 opsysfile="s/hpux9-x11r4.h"
5420 ;;
5421 esac
5422fi
5423
5424if test "${opsys}" = "hpux9shr"; then
5425 case "${x_libraries}" in
5426 *X11R4* )
5427 opsysfile="s/hpux9shxr4.h"
5428 ;;
5429 esac
5430fi
5431
ba4481b5
DL
5432### Compute the unexec source name from the object name.
5433UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
5434
5435# Do the opsystem or machine files prohibit the use of the GNU malloc?
5436# Assume not, until told otherwise.
5437GNU_MALLOC=yes
5438doug_lea_malloc=yes
ba5da88a 5439echo "$as_me:5439: checking for malloc_get_state" >&5
503d2be0
AS
5440echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6
5441if test "${ac_cv_func_malloc_get_state+set}" = set; then
5442 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5443else
503d2be0 5444 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 5445#line 5445 "configure"
ba4481b5
DL
5446#include "confdefs.h"
5447/* System header to define __stub macros and hopefully few prototypes,
503d2be0 5448 which can conflict with char malloc_get_state (); below. */
ba4481b5
DL
5449#include <assert.h>
5450/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
5451#ifdef __cplusplus
5452extern "C"
5453#endif
ba4481b5 5454/* We use char because int might match the return type of a gcc2
503d2be0
AS
5455 builtin and then its argument prototype would still apply. */
5456char malloc_get_state ();
5457char (*f) ();
ba4481b5 5458
503d2be0
AS
5459int
5460main ()
5461{
ba4481b5
DL
5462/* The GNU C library defines this for functions which it implements
5463 to always fail with ENOSYS. Some functions are actually named
5464 something starting with __ and the normal name is an alias. */
5465#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
5466choke me
5467#else
503d2be0 5468f = malloc_get_state;
ba4481b5
DL
5469#endif
5470
503d2be0
AS
5471 ;
5472 return 0;
5473}
5474_ACEOF
5475rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 5476if { (eval echo "$as_me:5476: \"$ac_link\"") >&5
503d2be0
AS
5477 (eval $ac_link) 2>&5
5478 ac_status=$?
ba5da88a 5479 echo "$as_me:5479: \$? = $ac_status" >&5
503d2be0
AS
5480 (exit $ac_status); } &&
5481 { ac_try='test -s conftest$ac_exeext'
ba5da88a 5482 { (eval echo "$as_me:5482: \"$ac_try\"") >&5
503d2be0
AS
5483 (eval $ac_try) 2>&5
5484 ac_status=$?
ba5da88a 5485 echo "$as_me:5485: \$? = $ac_status" >&5
503d2be0
AS
5486 (exit $ac_status); }; }; then
5487 ac_cv_func_malloc_get_state=yes
5488else
5489 echo "$as_me: failed program was:" >&5
5490cat conftest.$ac_ext >&5
5491ac_cv_func_malloc_get_state=no
5492fi
5493rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5494fi
ba5da88a 5495echo "$as_me:5495: result: $ac_cv_func_malloc_get_state" >&5
503d2be0
AS
5496echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6
5497if test $ac_cv_func_malloc_get_state = yes; then
ba4481b5
DL
5498 :
5499else
503d2be0 5500 doug_lea_malloc=no
ba4481b5
DL
5501fi
5502
ba5da88a 5503echo "$as_me:5503: checking for malloc_set_state" >&5
503d2be0
AS
5504echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6
5505if test "${ac_cv_func_malloc_set_state+set}" = set; then
5506 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5507else
503d2be0 5508 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 5509#line 5509 "configure"
ba4481b5
DL
5510#include "confdefs.h"
5511/* System header to define __stub macros and hopefully few prototypes,
503d2be0 5512 which can conflict with char malloc_set_state (); below. */
ba4481b5
DL
5513#include <assert.h>
5514/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
5515#ifdef __cplusplus
5516extern "C"
5517#endif
ba4481b5 5518/* We use char because int might match the return type of a gcc2
503d2be0
AS
5519 builtin and then its argument prototype would still apply. */
5520char malloc_set_state ();
5521char (*f) ();
ba4481b5 5522
503d2be0
AS
5523int
5524main ()
5525{
ba4481b5
DL
5526/* The GNU C library defines this for functions which it implements
5527 to always fail with ENOSYS. Some functions are actually named
5528 something starting with __ and the normal name is an alias. */
5529#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
5530choke me
5531#else
503d2be0 5532f = malloc_set_state;
ba4481b5
DL
5533#endif
5534
503d2be0
AS
5535 ;
5536 return 0;
5537}
5538_ACEOF
5539rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 5540if { (eval echo "$as_me:5540: \"$ac_link\"") >&5
503d2be0
AS
5541 (eval $ac_link) 2>&5
5542 ac_status=$?
ba5da88a 5543 echo "$as_me:5543: \$? = $ac_status" >&5
503d2be0
AS
5544 (exit $ac_status); } &&
5545 { ac_try='test -s conftest$ac_exeext'
ba5da88a 5546 { (eval echo "$as_me:5546: \"$ac_try\"") >&5
503d2be0
AS
5547 (eval $ac_try) 2>&5
5548 ac_status=$?
ba5da88a 5549 echo "$as_me:5549: \$? = $ac_status" >&5
503d2be0
AS
5550 (exit $ac_status); }; }; then
5551 ac_cv_func_malloc_set_state=yes
5552else
5553 echo "$as_me: failed program was:" >&5
5554cat conftest.$ac_ext >&5
5555ac_cv_func_malloc_set_state=no
5556fi
5557rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5558fi
ba5da88a 5559echo "$as_me:5559: result: $ac_cv_func_malloc_set_state" >&5
503d2be0
AS
5560echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6
5561if test $ac_cv_func_malloc_set_state = yes; then
ba4481b5
DL
5562 :
5563else
503d2be0 5564 doug_lea_malloc=no
ba4481b5
DL
5565fi
5566
ba5da88a 5567echo "$as_me:5567: checking whether __after_morecore_hook exists" >&5
503d2be0
AS
5568echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6
5569if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
5570 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5571else
503d2be0 5572 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 5573#line 5573 "configure"
ba4481b5
DL
5574#include "confdefs.h"
5575extern void (* __after_morecore_hook)();
503d2be0
AS
5576int
5577main ()
5578{
ba4481b5 5579__after_morecore_hook = 0
503d2be0
AS
5580 ;
5581 return 0;
5582}
5583_ACEOF
5584rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 5585if { (eval echo "$as_me:5585: \"$ac_link\"") >&5
503d2be0
AS
5586 (eval $ac_link) 2>&5
5587 ac_status=$?
ba5da88a 5588 echo "$as_me:5588: \$? = $ac_status" >&5
503d2be0
AS
5589 (exit $ac_status); } &&
5590 { ac_try='test -s conftest$ac_exeext'
ba5da88a 5591 { (eval echo "$as_me:5591: \"$ac_try\"") >&5
503d2be0
AS
5592 (eval $ac_try) 2>&5
5593 ac_status=$?
ba5da88a 5594 echo "$as_me:5594: \$? = $ac_status" >&5
503d2be0 5595 (exit $ac_status); }; }; then
ba4481b5
DL
5596 emacs_cv_var___after_morecore_hook=yes
5597else
503d2be0
AS
5598 echo "$as_me: failed program was:" >&5
5599cat conftest.$ac_ext >&5
5600emacs_cv_var___after_morecore_hook=no
ba4481b5 5601fi
503d2be0 5602rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 5603fi
ba5da88a 5604echo "$as_me:5604: result: $emacs_cv_var___after_morecore_hook" >&5
503d2be0 5605echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6
ba4481b5
DL
5606if test $emacs_cv_var___after_morecore_hook = no; then
5607 doug_lea_malloc=no
5608fi
5609if test "${system_malloc}" = "yes"; then
5610 GNU_MALLOC=no
5611 GNU_MALLOC_reason="
5612 (The GNU allocators don't work with this system configuration.)"
5613fi
5614if test "$doug_lea_malloc" = "yes" ; then
5615 if test "$GNU_MALLOC" = yes ; then
5616 GNU_MALLOC_reason="
5617 (Using Doug Lea's new malloc from the GNU C Library.)"
5618 fi
503d2be0 5619 cat >>confdefs.h <<\EOF
ba4481b5
DL
5620#define DOUG_LEA_MALLOC 1
5621EOF
5622
5623fi
5624
5625if test x"${REL_ALLOC}" = x; then
5626 REL_ALLOC=${GNU_MALLOC}
5627fi
5628
503d2be0
AS
5629# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5630
5631for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5632 inttypes.h stdint.h unistd.h
5633do
5634as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ba5da88a 5635echo "$as_me:5635: checking for $ac_header" >&5
503d2be0
AS
5636echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5637if eval "test \"\${$as_ac_Header+set}\" = set"; then
5638 echo $ECHO_N "(cached) $ECHO_C" >&6
5639else
5640 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 5641#line 5641 "configure"
503d2be0
AS
5642#include "confdefs.h"
5643$ac_includes_default
5644#include <$ac_header>
5645_ACEOF
5646rm -f conftest.$ac_objext
ba5da88a 5647if { (eval echo "$as_me:5647: \"$ac_compile\"") >&5
503d2be0
AS
5648 (eval $ac_compile) 2>&5
5649 ac_status=$?
ba5da88a 5650 echo "$as_me:5650: \$? = $ac_status" >&5
503d2be0
AS
5651 (exit $ac_status); } &&
5652 { ac_try='test -s conftest.$ac_objext'
ba5da88a 5653 { (eval echo "$as_me:5653: \"$ac_try\"") >&5
503d2be0
AS
5654 (eval $ac_try) 2>&5
5655 ac_status=$?
ba5da88a 5656 echo "$as_me:5656: \$? = $ac_status" >&5
503d2be0
AS
5657 (exit $ac_status); }; }; then
5658 eval "$as_ac_Header=yes"
5659else
5660 echo "$as_me: failed program was:" >&5
5661cat conftest.$ac_ext >&5
5662eval "$as_ac_Header=no"
5663fi
5664rm -f conftest.$ac_objext conftest.$ac_ext
5665fi
ba5da88a 5666echo "$as_me:5666: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
5667echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5668if test `eval echo '${'$as_ac_Header'}'` = yes; then
5669 cat >>confdefs.h <<EOF
5670#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5671EOF
5672
5673fi
5674done
a55b799a 5675
503d2be0 5676for ac_header in stdlib.h unistd.h
73b77ee5 5677do
503d2be0 5678as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ba5da88a 5679echo "$as_me:5679: checking for $ac_header" >&5
503d2be0
AS
5680echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5681if eval "test \"\${$as_ac_Header+set}\" = set"; then
5682 echo $ECHO_N "(cached) $ECHO_C" >&6
5683else
5684 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 5685#line 5685 "configure"
503d2be0
AS
5686#include "confdefs.h"
5687#include <$ac_header>
5688_ACEOF
ba5da88a 5689if { (eval echo "$as_me:5689: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
5690 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5691 ac_status=$?
5692 egrep -v '^ *\+' conftest.er1 >conftest.err
5693 rm -f conftest.er1
5694 cat conftest.err >&5
ba5da88a 5695 echo "$as_me:5695: \$? = $ac_status" >&5
503d2be0
AS
5696 (exit $ac_status); } >/dev/null; then
5697 if test -s conftest.err; then
5698 ac_cpp_err=$ac_c_preproc_warn_flag
5699 else
5700 ac_cpp_err=
5701 fi
5702else
5703 ac_cpp_err=yes
5704fi
5705if test -z "$ac_cpp_err"; then
5706 eval "$as_ac_Header=yes"
5707else
5708 echo "$as_me: failed program was:" >&5
ba4481b5 5709 cat conftest.$ac_ext >&5
503d2be0 5710 eval "$as_ac_Header=no"
ba4481b5 5711fi
503d2be0 5712rm -f conftest.err conftest.$ac_ext
ba4481b5 5713fi
ba5da88a 5714echo "$as_me:5714: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
5715echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5716if test `eval echo '${'$as_ac_Header'}'` = yes; then
5717 cat >>confdefs.h <<EOF
5718#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba4481b5 5719EOF
503d2be0 5720
ba4481b5 5721fi
73b77ee5 5722done
ba4481b5 5723
73b77ee5 5724for ac_func in getpagesize
ba4481b5 5725do
503d2be0 5726as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ba5da88a 5727echo "$as_me:5727: checking for $ac_func" >&5
503d2be0
AS
5728echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5729if eval "test \"\${$as_ac_var+set}\" = set"; then
5730 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5731else
503d2be0 5732 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 5733#line 5733 "configure"
ba4481b5
DL
5734#include "confdefs.h"
5735/* System header to define __stub macros and hopefully few prototypes,
503d2be0 5736 which can conflict with char $ac_func (); below. */
ba4481b5
DL
5737#include <assert.h>
5738/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
5739#ifdef __cplusplus
5740extern "C"
5741#endif
ba4481b5 5742/* We use char because int might match the return type of a gcc2
503d2be0
AS
5743 builtin and then its argument prototype would still apply. */
5744char $ac_func ();
5745char (*f) ();
ba4481b5 5746
503d2be0
AS
5747int
5748main ()
5749{
ba4481b5
DL
5750/* The GNU C library defines this for functions which it implements
5751 to always fail with ENOSYS. Some functions are actually named
5752 something starting with __ and the normal name is an alias. */
5753#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5754choke me
5755#else
503d2be0 5756f = $ac_func;
ba4481b5
DL
5757#endif
5758
503d2be0
AS
5759 ;
5760 return 0;
5761}
5762_ACEOF
5763rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 5764if { (eval echo "$as_me:5764: \"$ac_link\"") >&5
503d2be0
AS
5765 (eval $ac_link) 2>&5
5766 ac_status=$?
ba5da88a 5767 echo "$as_me:5767: \$? = $ac_status" >&5
503d2be0
AS
5768 (exit $ac_status); } &&
5769 { ac_try='test -s conftest$ac_exeext'
ba5da88a 5770 { (eval echo "$as_me:5770: \"$ac_try\"") >&5
503d2be0
AS
5771 (eval $ac_try) 2>&5
5772 ac_status=$?
ba5da88a 5773 echo "$as_me:5773: \$? = $ac_status" >&5
503d2be0
AS
5774 (exit $ac_status); }; }; then
5775 eval "$as_ac_var=yes"
5776else
5777 echo "$as_me: failed program was:" >&5
5778cat conftest.$ac_ext >&5
5779eval "$as_ac_var=no"
5780fi
5781rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5782fi
ba5da88a 5783echo "$as_me:5783: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
5784echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5785if test `eval echo '${'$as_ac_var'}'` = yes; then
5786 cat >>confdefs.h <<EOF
5787#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
ba4481b5 5788EOF
ba4481b5 5789
ba4481b5
DL
5790fi
5791done
5792
ba5da88a 5793echo "$as_me:5793: checking for working mmap" >&5
503d2be0
AS
5794echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
5795if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
5796 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5
GM
5797else
5798 if test "$cross_compiling" = yes; then
5799 ac_cv_func_mmap_fixed_mapped=no
ba4481b5 5800else
503d2be0 5801 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 5802#line 5802 "configure"
ba4481b5 5803#include "confdefs.h"
503d2be0 5804$ac_includes_default
73b77ee5
GM
5805/* Thanks to Mike Haertel and Jim Avera for this test.
5806 Here is a matrix of mmap possibilities:
5807 mmap private not fixed
5808 mmap private fixed at somewhere currently unmapped
5809 mmap private fixed at somewhere already mapped
5810 mmap shared not fixed
5811 mmap shared fixed at somewhere currently unmapped
5812 mmap shared fixed at somewhere already mapped
5813 For private mappings, we should verify that changes cannot be read()
5814 back from the file, nor mmap's back from the file at a different
5815 address. (There have been systems where private was not correctly
5816 implemented like the infamous i386 svr4.0, and systems where the
1932bc86 5817 VM page cache was not coherent with the file system buffer cache
73b77ee5
GM
5818 like early versions of FreeBSD and possibly contemporary NetBSD.)
5819 For shared mappings, we should conversely verify that changes get
5820 propogated back to all the places they're supposed to be.
5821
5822 Grep wants private fixed already mapped.
5823 The main things grep needs to know about mmap are:
5824 * does it exist and is it safe to write into the mmap'd area
5825 * how to use it (BSD variants) */
503d2be0 5826
73b77ee5
GM
5827#include <fcntl.h>
5828#include <sys/mman.h>
5829
503d2be0 5830#if !STDC_HEADERS && !HAVE_STDLIB_H
1932bc86
DL
5831char *malloc ();
5832#endif
73b77ee5 5833
1932bc86
DL
5834/* This mess was copied from the GNU getpagesize.h. */
5835#if !HAVE_GETPAGESIZE
73b77ee5 5836/* Assume that all systems that can run configure have sys/param.h. */
1932bc86 5837# if !HAVE_SYS_PARAM_H
73b77ee5
GM
5838# define HAVE_SYS_PARAM_H 1
5839# endif
5840
5841# ifdef _SC_PAGESIZE
5842# define getpagesize() sysconf(_SC_PAGESIZE)
5843# else /* no _SC_PAGESIZE */
1932bc86 5844# if HAVE_SYS_PARAM_H
73b77ee5
GM
5845# include <sys/param.h>
5846# ifdef EXEC_PAGESIZE
5847# define getpagesize() EXEC_PAGESIZE
5848# else /* no EXEC_PAGESIZE */
5849# ifdef NBPG
5850# define getpagesize() NBPG * CLSIZE
5851# ifndef CLSIZE
5852# define CLSIZE 1
5853# endif /* no CLSIZE */
5854# else /* no NBPG */
5855# ifdef NBPC
5856# define getpagesize() NBPC
5857# else /* no NBPC */
5858# ifdef PAGESIZE
5859# define getpagesize() PAGESIZE
5860# endif /* PAGESIZE */
5861# endif /* no NBPC */
5862# endif /* no NBPG */
5863# endif /* no EXEC_PAGESIZE */
5864# else /* no HAVE_SYS_PARAM_H */
5865# define getpagesize() 8192 /* punt totally */
5866# endif /* no HAVE_SYS_PARAM_H */
5867# endif /* no _SC_PAGESIZE */
5868
5869#endif /* no HAVE_GETPAGESIZE */
5870
73b77ee5 5871int
1932bc86 5872main ()
73b77ee5 5873{
1932bc86
DL
5874 char *data, *data2, *data3;
5875 int i, pagesize;
5876 int fd;
5877
5878 pagesize = getpagesize ();
5879
5880 /* First, make a file with some known garbage in it. */
5881 data = (char *) malloc (pagesize);
5882 if (!data)
5883 exit (1);
5884 for (i = 0; i < pagesize; ++i)
5885 *(data + i) = rand ();
5886 umask (0);
503d2be0 5887 fd = creat ("conftest.mmap", 0600);
1932bc86
DL
5888 if (fd < 0)
5889 exit (1);
5890 if (write (fd, data, pagesize) != pagesize)
5891 exit (1);
5892 close (fd);
73b77ee5 5893
1932bc86
DL
5894 /* Next, try to mmap the file at a fixed address which already has
5895 something else allocated at it. If we can, also make sure that
5896 we see the same garbage. */
503d2be0 5897 fd = open ("conftest.mmap", O_RDWR);
1932bc86
DL
5898 if (fd < 0)
5899 exit (1);
5900 data2 = (char *) malloc (2 * pagesize);
5901 if (!data2)
5902 exit (1);
5903 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5904 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
5905 MAP_PRIVATE | MAP_FIXED, fd, 0L))
5906 exit (1);
5907 for (i = 0; i < pagesize; ++i)
5908 if (*(data + i) != *(data2 + i))
5909 exit (1);
5910
5911 /* Finally, make sure that changes to the mapped area do not
5912 percolate back to the file as seen by read(). (This is a bug on
5913 some variants of i386 svr4.0.) */
5914 for (i = 0; i < pagesize; ++i)
5915 *(data2 + i) = *(data2 + i) + 1;
5916 data3 = (char *) malloc (pagesize);
5917 if (!data3)
5918 exit (1);
5919 if (read (fd, data3, pagesize) != pagesize)
5920 exit (1);
5921 for (i = 0; i < pagesize; ++i)
5922 if (*(data + i) != *(data3 + i))
5923 exit (1);
5924 close (fd);
1932bc86
DL
5925 exit (0);
5926}
503d2be0
AS
5927_ACEOF
5928rm -f conftest$ac_exeext
ba5da88a 5929if { (eval echo "$as_me:5929: \"$ac_link\"") >&5
503d2be0
AS
5930 (eval $ac_link) 2>&5
5931 ac_status=$?
ba5da88a 5932 echo "$as_me:5932: \$? = $ac_status" >&5
503d2be0 5933 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ba5da88a 5934 { (eval echo "$as_me:5934: \"$ac_try\"") >&5
503d2be0
AS
5935 (eval $ac_try) 2>&5
5936 ac_status=$?
ba5da88a 5937 echo "$as_me:5937: \$? = $ac_status" >&5
503d2be0 5938 (exit $ac_status); }; }; then
73b77ee5
GM
5939 ac_cv_func_mmap_fixed_mapped=yes
5940else
503d2be0
AS
5941 echo "$as_me: program exited with status $ac_status" >&5
5942echo "$as_me: failed program was:" >&5
5943cat conftest.$ac_ext >&5
5944ac_cv_func_mmap_fixed_mapped=no
73b77ee5 5945fi
503d2be0 5946rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
73b77ee5 5947fi
73b77ee5 5948fi
ba5da88a 5949echo "$as_me:5949: result: $ac_cv_func_mmap_fixed_mapped" >&5
503d2be0 5950echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
73b77ee5 5951if test $ac_cv_func_mmap_fixed_mapped = yes; then
503d2be0
AS
5952
5953cat >>confdefs.h <<\EOF
73b77ee5
GM
5954#define HAVE_MMAP 1
5955EOF
5956
5957fi
503d2be0 5958rm -f conftest.mmap
73b77ee5 5959
ef9e4345
GM
5960if test $use_mmap_for_buffers = yes; then
5961 REL_ALLOC=no
73b77ee5
GM
5962fi
5963
5964LIBS="$libsrc_libs $LIBS"
5965
ba5da88a 5966echo "$as_me:5966: checking for dnet_ntoa in -ldnet" >&5
503d2be0
AS
5967echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
5968if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
5969 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 5970else
503d2be0 5971 ac_check_lib_save_LIBS=$LIBS
73b77ee5 5972LIBS="-ldnet $LIBS"
503d2be0 5973cat >conftest.$ac_ext <<_ACEOF
ba5da88a 5974#line 5974 "configure"
73b77ee5 5975#include "confdefs.h"
503d2be0 5976
73b77ee5 5977/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
5978#ifdef __cplusplus
5979extern "C"
5980#endif
73b77ee5 5981/* We use char because int might match the return type of a gcc2
503d2be0
AS
5982 builtin and then its argument prototype would still apply. */
5983char dnet_ntoa ();
5984int
5985main ()
5986{
5987dnet_ntoa ();
5988 ;
5989 return 0;
5990}
5991_ACEOF
5992rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 5993if { (eval echo "$as_me:5993: \"$ac_link\"") >&5
503d2be0
AS
5994 (eval $ac_link) 2>&5
5995 ac_status=$?
ba5da88a 5996 echo "$as_me:5996: \$? = $ac_status" >&5
503d2be0
AS
5997 (exit $ac_status); } &&
5998 { ac_try='test -s conftest$ac_exeext'
ba5da88a 5999 { (eval echo "$as_me:5999: \"$ac_try\"") >&5
503d2be0
AS
6000 (eval $ac_try) 2>&5
6001 ac_status=$?
ba5da88a 6002 echo "$as_me:6002: \$? = $ac_status" >&5
503d2be0
AS
6003 (exit $ac_status); }; }; then
6004 ac_cv_lib_dnet_dnet_ntoa=yes
6005else
6006 echo "$as_me: failed program was:" >&5
6007cat conftest.$ac_ext >&5
6008ac_cv_lib_dnet_dnet_ntoa=no
6009fi
6010rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6011LIBS=$ac_check_lib_save_LIBS
6012fi
ba5da88a 6013echo "$as_me:6013: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
503d2be0
AS
6014echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
6015if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
6016 cat >>confdefs.h <<EOF
6017#define HAVE_LIBDNET 1
73b77ee5
GM
6018EOF
6019
6020 LIBS="-ldnet $LIBS"
6021
73b77ee5
GM
6022fi
6023
ba5da88a 6024echo "$as_me:6024: checking for main in -lXbsd" >&5
503d2be0
AS
6025echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6
6026if test "${ac_cv_lib_Xbsd_main+set}" = set; then
6027 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 6028else
503d2be0 6029 ac_check_lib_save_LIBS=$LIBS
73b77ee5 6030LIBS="-lXbsd $LIBS"
503d2be0 6031cat >conftest.$ac_ext <<_ACEOF
ba5da88a 6032#line 6032 "configure"
73b77ee5
GM
6033#include "confdefs.h"
6034
503d2be0
AS
6035int
6036main ()
6037{
6038main ();
6039 ;
6040 return 0;
6041}
6042_ACEOF
6043rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 6044if { (eval echo "$as_me:6044: \"$ac_link\"") >&5
503d2be0
AS
6045 (eval $ac_link) 2>&5
6046 ac_status=$?
ba5da88a 6047 echo "$as_me:6047: \$? = $ac_status" >&5
503d2be0
AS
6048 (exit $ac_status); } &&
6049 { ac_try='test -s conftest$ac_exeext'
ba5da88a 6050 { (eval echo "$as_me:6050: \"$ac_try\"") >&5
503d2be0
AS
6051 (eval $ac_try) 2>&5
6052 ac_status=$?
ba5da88a 6053 echo "$as_me:6053: \$? = $ac_status" >&5
503d2be0
AS
6054 (exit $ac_status); }; }; then
6055 ac_cv_lib_Xbsd_main=yes
6056else
6057 echo "$as_me: failed program was:" >&5
6058cat conftest.$ac_ext >&5
6059ac_cv_lib_Xbsd_main=no
6060fi
6061rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6062LIBS=$ac_check_lib_save_LIBS
6063fi
ba5da88a 6064echo "$as_me:6064: result: $ac_cv_lib_Xbsd_main" >&5
503d2be0
AS
6065echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6
6066if test $ac_cv_lib_Xbsd_main = yes; then
73b77ee5 6067 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
73b77ee5
GM
6068fi
6069
ba5da88a 6070echo "$as_me:6070: checking for cma_open in -lpthreads" >&5
503d2be0
AS
6071echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6
6072if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
6073 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 6074else
503d2be0 6075 ac_check_lib_save_LIBS=$LIBS
73b77ee5 6076LIBS="-lpthreads $LIBS"
503d2be0 6077cat >conftest.$ac_ext <<_ACEOF
ba5da88a 6078#line 6078 "configure"
73b77ee5 6079#include "confdefs.h"
503d2be0 6080
73b77ee5 6081/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6082#ifdef __cplusplus
6083extern "C"
6084#endif
73b77ee5 6085/* We use char because int might match the return type of a gcc2
503d2be0
AS
6086 builtin and then its argument prototype would still apply. */
6087char cma_open ();
6088int
6089main ()
6090{
6091cma_open ();
6092 ;
6093 return 0;
6094}
6095_ACEOF
6096rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 6097if { (eval echo "$as_me:6097: \"$ac_link\"") >&5
503d2be0
AS
6098 (eval $ac_link) 2>&5
6099 ac_status=$?
ba5da88a 6100 echo "$as_me:6100: \$? = $ac_status" >&5
503d2be0
AS
6101 (exit $ac_status); } &&
6102 { ac_try='test -s conftest$ac_exeext'
ba5da88a 6103 { (eval echo "$as_me:6103: \"$ac_try\"") >&5
503d2be0
AS
6104 (eval $ac_try) 2>&5
6105 ac_status=$?
ba5da88a 6106 echo "$as_me:6106: \$? = $ac_status" >&5
503d2be0
AS
6107 (exit $ac_status); }; }; then
6108 ac_cv_lib_pthreads_cma_open=yes
6109else
6110 echo "$as_me: failed program was:" >&5
6111cat conftest.$ac_ext >&5
6112ac_cv_lib_pthreads_cma_open=no
6113fi
6114rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6115LIBS=$ac_check_lib_save_LIBS
6116fi
ba5da88a 6117echo "$as_me:6117: result: $ac_cv_lib_pthreads_cma_open" >&5
503d2be0
AS
6118echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6
6119if test $ac_cv_lib_pthreads_cma_open = yes; then
6120 cat >>confdefs.h <<EOF
6121#define HAVE_LIBPTHREADS 1
73b77ee5
GM
6122EOF
6123
6124 LIBS="-lpthreads $LIBS"
6125
73b77ee5
GM
6126fi
6127
ba5da88a 6128echo "$as_me:6128: checking for XFree86 in /usr/X386" >&5
503d2be0 6129echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6
73b77ee5
GM
6130if test -d /usr/X386/include; then
6131 HAVE_XFREE386=yes
6132 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
6133else
6134 HAVE_XFREE386=no
6135fi
ba5da88a 6136echo "$as_me:6136: result: $HAVE_XFREE386" >&5
503d2be0 6137echo "${ECHO_T}$HAVE_XFREE386" >&6
73b77ee5
GM
6138
6139# Change CFLAGS temporarily so that C_SWITCH_X_SITE gets used
6140# for the tests that follow. We set it back to REAL_CFLAGS later on.
6141
6142REAL_CPPFLAGS="$CPPFLAGS"
6143
6144if test "${HAVE_X11}" = "yes"; then
6145 DEFS="$C_SWITCH_X_SITE $DEFS"
6146 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
6147 LIBS="$LIBX $LIBS"
6148 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
6149 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
6150
6151 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
6152 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
6153 # but it's more convenient here to set LD_RUN_PATH
6154 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
6155 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
6156 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
6157 export LD_RUN_PATH
6158 fi
6159
6160 if test "${opsys}" = "gnu-linux"; then
ba5da88a 6161 echo "$as_me:6161: checking whether X on GNU/Linux needs -b to link" >&5
503d2be0
AS
6162echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6
6163 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 6164#line 6164 "configure"
73b77ee5
GM
6165#include "confdefs.h"
6166
503d2be0
AS
6167int
6168main ()
6169{
73b77ee5 6170XOpenDisplay ("foo");
503d2be0
AS
6171 ;
6172 return 0;
6173}
6174_ACEOF
6175rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 6176if { (eval echo "$as_me:6176: \"$ac_link\"") >&5
503d2be0
AS
6177 (eval $ac_link) 2>&5
6178 ac_status=$?
ba5da88a 6179 echo "$as_me:6179: \$? = $ac_status" >&5
503d2be0
AS
6180 (exit $ac_status); } &&
6181 { ac_try='test -s conftest$ac_exeext'
ba5da88a 6182 { (eval echo "$as_me:6182: \"$ac_try\"") >&5
503d2be0
AS
6183 (eval $ac_try) 2>&5
6184 ac_status=$?
ba5da88a 6185 echo "$as_me:6185: \$? = $ac_status" >&5
503d2be0 6186 (exit $ac_status); }; }; then
73b77ee5
GM
6187 xlinux_first_failure=no
6188else
503d2be0
AS
6189 echo "$as_me: failed program was:" >&5
6190cat conftest.$ac_ext >&5
6191xlinux_first_failure=yes
73b77ee5 6192fi
503d2be0 6193rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
73b77ee5
GM
6194 if test "${xlinux_first_failure}" = "yes"; then
6195 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
6196 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
6197 OLD_CPPFLAGS="$CPPFLAGS"
6198 OLD_LIBS="$LIBS"
6199 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
6200 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
6201 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
6202 LIBS="$LIBS -b i486-linuxaout"
503d2be0 6203 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 6204#line 6204 "configure"
73b77ee5
GM
6205#include "confdefs.h"
6206
503d2be0
AS
6207int
6208main ()
6209{
73b77ee5 6210XOpenDisplay ("foo");
503d2be0
AS
6211 ;
6212 return 0;
6213}
6214_ACEOF
6215rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 6216if { (eval echo "$as_me:6216: \"$ac_link\"") >&5
503d2be0
AS
6217 (eval $ac_link) 2>&5
6218 ac_status=$?
ba5da88a 6219 echo "$as_me:6219: \$? = $ac_status" >&5
503d2be0
AS
6220 (exit $ac_status); } &&
6221 { ac_try='test -s conftest$ac_exeext'
ba5da88a 6222 { (eval echo "$as_me:6222: \"$ac_try\"") >&5
503d2be0
AS
6223 (eval $ac_try) 2>&5
6224 ac_status=$?
ba5da88a 6225 echo "$as_me:6225: \$? = $ac_status" >&5
503d2be0 6226 (exit $ac_status); }; }; then
73b77ee5
GM
6227 xlinux_second_failure=no
6228else
503d2be0
AS
6229 echo "$as_me: failed program was:" >&5
6230cat conftest.$ac_ext >&5
6231xlinux_second_failure=yes
73b77ee5 6232fi
503d2be0 6233rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
73b77ee5
GM
6234 if test "${xlinux_second_failure}" = "yes"; then
6235 # If we get the same failure with -b, there is no use adding -b.
6236 # So take it out. This plays safe.
6237 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
6238 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
6239 CPPFLAGS="$OLD_CPPFLAGS"
6240 LIBS="$OLD_LIBS"
ba5da88a 6241 echo "$as_me:6241: result: no" >&5
503d2be0 6242echo "${ECHO_T}no" >&6
73b77ee5 6243 else
ba5da88a 6244 echo "$as_me:6244: result: yes" >&5
503d2be0 6245echo "${ECHO_T}yes" >&6
73b77ee5
GM
6246 fi
6247 else
ba5da88a 6248 echo "$as_me:6248: result: no" >&5
503d2be0 6249echo "${ECHO_T}no" >&6
73b77ee5
GM
6250 fi
6251 fi
6252
ac95a621
GM
6253 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
6254 # header files included from there.
ba5da88a 6255 echo "$as_me:6255: checking for Xkb" >&5
503d2be0
AS
6256echo $ECHO_N "checking for Xkb... $ECHO_C" >&6
6257 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 6258#line 6258 "configure"
ac95a621
GM
6259#include "confdefs.h"
6260#include <X11/Xlib.h>
6261#include <X11/XKBlib.h>
503d2be0
AS
6262int
6263main ()
6264{
ac95a621 6265XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
503d2be0
AS
6266 ;
6267 return 0;
6268}
6269_ACEOF
6270rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 6271if { (eval echo "$as_me:6271: \"$ac_link\"") >&5
503d2be0
AS
6272 (eval $ac_link) 2>&5
6273 ac_status=$?
ba5da88a 6274 echo "$as_me:6274: \$? = $ac_status" >&5
503d2be0
AS
6275 (exit $ac_status); } &&
6276 { ac_try='test -s conftest$ac_exeext'
ba5da88a 6277 { (eval echo "$as_me:6277: \"$ac_try\"") >&5
503d2be0
AS
6278 (eval $ac_try) 2>&5
6279 ac_status=$?
ba5da88a 6280 echo "$as_me:6280: \$? = $ac_status" >&5
503d2be0 6281 (exit $ac_status); }; }; then
ac95a621
GM
6282 emacs_xkb=yes
6283else
503d2be0
AS
6284 echo "$as_me: failed program was:" >&5
6285cat conftest.$ac_ext >&5
6286emacs_xkb=no
ac95a621 6287fi
503d2be0 6288rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba5da88a 6289 echo "$as_me:6289: result: $emacs_xkb" >&5
503d2be0 6290echo "${ECHO_T}$emacs_xkb" >&6
ac95a621 6291 if test $emacs_xkb = yes; then
503d2be0 6292 cat >>confdefs.h <<\EOF
ac95a621
GM
6293#define HAVE_XKBGETKEYBOARD 1
6294EOF
6295
6296 fi
6297
503d2be0 6298for ac_func in XrmSetDatabase XScreenResourceString \
73b77ee5
GM
6299XScreenNumberOfScreen XSetWMProtocols
6300do
503d2be0 6301as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ba5da88a 6302echo "$as_me:6302: checking for $ac_func" >&5
503d2be0
AS
6303echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6304if eval "test \"\${$as_ac_var+set}\" = set"; then
6305 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 6306else
503d2be0 6307 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 6308#line 6308 "configure"
73b77ee5
GM
6309#include "confdefs.h"
6310/* System header to define __stub macros and hopefully few prototypes,
503d2be0 6311 which can conflict with char $ac_func (); below. */
73b77ee5
GM
6312#include <assert.h>
6313/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6314#ifdef __cplusplus
6315extern "C"
6316#endif
73b77ee5 6317/* We use char because int might match the return type of a gcc2
503d2be0
AS
6318 builtin and then its argument prototype would still apply. */
6319char $ac_func ();
6320char (*f) ();
73b77ee5 6321
503d2be0
AS
6322int
6323main ()
6324{
73b77ee5
GM
6325/* The GNU C library defines this for functions which it implements
6326 to always fail with ENOSYS. Some functions are actually named
6327 something starting with __ and the normal name is an alias. */
6328#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6329choke me
6330#else
503d2be0 6331f = $ac_func;
73b77ee5
GM
6332#endif
6333
503d2be0
AS
6334 ;
6335 return 0;
6336}
6337_ACEOF
6338rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 6339if { (eval echo "$as_me:6339: \"$ac_link\"") >&5
503d2be0
AS
6340 (eval $ac_link) 2>&5
6341 ac_status=$?
ba5da88a 6342 echo "$as_me:6342: \$? = $ac_status" >&5
503d2be0
AS
6343 (exit $ac_status); } &&
6344 { ac_try='test -s conftest$ac_exeext'
ba5da88a 6345 { (eval echo "$as_me:6345: \"$ac_try\"") >&5
503d2be0
AS
6346 (eval $ac_try) 2>&5
6347 ac_status=$?
ba5da88a 6348 echo "$as_me:6348: \$? = $ac_status" >&5
503d2be0
AS
6349 (exit $ac_status); }; }; then
6350 eval "$as_ac_var=yes"
6351else
6352 echo "$as_me: failed program was:" >&5
6353cat conftest.$ac_ext >&5
6354eval "$as_ac_var=no"
6355fi
6356rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6357fi
ba5da88a 6358echo "$as_me:6358: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
6359echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6360if test `eval echo '${'$as_ac_var'}'` = yes; then
6361 cat >>confdefs.h <<EOF
6362#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
73b77ee5 6363EOF
73b77ee5 6364
73b77ee5
GM
6365fi
6366done
6367
6368fi
6369
6370if test "${window_system}" = "x11"; then
ba5da88a 6371 echo "$as_me:6371: checking X11 version 6" >&5
503d2be0
AS
6372echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6
6373 if test "${emacs_cv_x11_version_6+set}" = set; then
6374 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 6375else
503d2be0 6376 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 6377#line 6377 "configure"
73b77ee5
GM
6378#include "confdefs.h"
6379#include <X11/Xlib.h>
503d2be0
AS
6380int
6381main ()
6382{
73b77ee5
GM
6383#if XlibSpecificationRelease < 6
6384fail;
6385#endif
6386
503d2be0
AS
6387 ;
6388 return 0;
6389}
6390_ACEOF
6391rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 6392if { (eval echo "$as_me:6392: \"$ac_link\"") >&5
503d2be0
AS
6393 (eval $ac_link) 2>&5
6394 ac_status=$?
ba5da88a 6395 echo "$as_me:6395: \$? = $ac_status" >&5
503d2be0
AS
6396 (exit $ac_status); } &&
6397 { ac_try='test -s conftest$ac_exeext'
ba5da88a 6398 { (eval echo "$as_me:6398: \"$ac_try\"") >&5
503d2be0
AS
6399 (eval $ac_try) 2>&5
6400 ac_status=$?
ba5da88a 6401 echo "$as_me:6401: \$? = $ac_status" >&5
503d2be0 6402 (exit $ac_status); }; }; then
73b77ee5
GM
6403 emacs_cv_x11_version_6=yes
6404else
503d2be0
AS
6405 echo "$as_me: failed program was:" >&5
6406cat conftest.$ac_ext >&5
6407emacs_cv_x11_version_6=no
73b77ee5 6408fi
503d2be0 6409rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
73b77ee5
GM
6410fi
6411
6412 if test $emacs_cv_x11_version_6 = yes; then
ba5da88a 6413 echo "$as_me:6413: result: 6 or newer" >&5
503d2be0
AS
6414echo "${ECHO_T}6 or newer" >&6
6415 cat >>confdefs.h <<\EOF
73b77ee5
GM
6416#define HAVE_X11R6 1
6417EOF
6418
6419 else
ba5da88a 6420 echo "$as_me:6420: result: before 6" >&5
503d2be0 6421echo "${ECHO_T}before 6" >&6
ba4481b5
DL
6422 fi
6423fi
6424
6425if test "${window_system}" = "x11"; then
ba5da88a 6426 echo "$as_me:6426: checking X11 version 5" >&5
503d2be0
AS
6427echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6
6428 if test "${emacs_cv_x11_version_5+set}" = set; then
6429 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6430else
503d2be0 6431 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 6432#line 6432 "configure"
ba4481b5
DL
6433#include "confdefs.h"
6434#include <X11/Xlib.h>
503d2be0
AS
6435int
6436main ()
6437{
ba4481b5
DL
6438#if XlibSpecificationRelease < 5
6439fail;
6440#endif
6441
503d2be0
AS
6442 ;
6443 return 0;
6444}
6445_ACEOF
6446rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 6447if { (eval echo "$as_me:6447: \"$ac_link\"") >&5
503d2be0
AS
6448 (eval $ac_link) 2>&5
6449 ac_status=$?
ba5da88a 6450 echo "$as_me:6450: \$? = $ac_status" >&5
503d2be0
AS
6451 (exit $ac_status); } &&
6452 { ac_try='test -s conftest$ac_exeext'
ba5da88a 6453 { (eval echo "$as_me:6453: \"$ac_try\"") >&5
503d2be0
AS
6454 (eval $ac_try) 2>&5
6455 ac_status=$?
ba5da88a 6456 echo "$as_me:6456: \$? = $ac_status" >&5
503d2be0 6457 (exit $ac_status); }; }; then
ba4481b5
DL
6458 emacs_cv_x11_version_5=yes
6459else
503d2be0
AS
6460 echo "$as_me: failed program was:" >&5
6461cat conftest.$ac_ext >&5
6462emacs_cv_x11_version_5=no
ba4481b5 6463fi
503d2be0 6464rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5
DL
6465fi
6466
6467 if test $emacs_cv_x11_version_5 = yes; then
ba5da88a 6468 echo "$as_me:6468: result: 5 or newer" >&5
503d2be0 6469echo "${ECHO_T}5 or newer" >&6
ba4481b5 6470 HAVE_X11R5=yes
503d2be0 6471 cat >>confdefs.h <<\EOF
ba4481b5
DL
6472#define HAVE_X11R5 1
6473EOF
6474
6475 else
6476 HAVE_X11R5=no
ba5da88a 6477 echo "$as_me:6477: result: before 5" >&5
503d2be0 6478echo "${ECHO_T}before 5" >&6
ba4481b5
DL
6479 fi
6480fi
6481
6482if test x"${USE_X_TOOLKIT}" = xmaybe; then
6483 if test x"${HAVE_X11R5}" = xyes; then
ba5da88a 6484 echo "$as_me:6484: checking X11 version 5 with Xaw" >&5
503d2be0
AS
6485echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6
6486 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
6487 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6488else
503d2be0 6489 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 6490#line 6490 "configure"
ba4481b5
DL
6491#include "confdefs.h"
6492
6493#include <X11/Intrinsic.h>
6494#include <X11/Xaw/Simple.h>
503d2be0
AS
6495int
6496main ()
6497{
ba4481b5 6498
503d2be0
AS
6499 ;
6500 return 0;
6501}
6502_ACEOF
6503rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 6504if { (eval echo "$as_me:6504: \"$ac_link\"") >&5
503d2be0
AS
6505 (eval $ac_link) 2>&5
6506 ac_status=$?
ba5da88a 6507 echo "$as_me:6507: \$? = $ac_status" >&5
503d2be0
AS
6508 (exit $ac_status); } &&
6509 { ac_try='test -s conftest$ac_exeext'
ba5da88a 6510 { (eval echo "$as_me:6510: \"$ac_try\"") >&5
503d2be0
AS
6511 (eval $ac_try) 2>&5
6512 ac_status=$?
ba5da88a 6513 echo "$as_me:6513: \$? = $ac_status" >&5
503d2be0 6514 (exit $ac_status); }; }; then
ba4481b5
DL
6515 emacs_cv_x11_version_5_with_xaw=yes
6516else
503d2be0
AS
6517 echo "$as_me: failed program was:" >&5
6518cat conftest.$ac_ext >&5
6519emacs_cv_x11_version_5_with_xaw=no
ba4481b5 6520fi
503d2be0 6521rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5
DL
6522fi
6523
6524 if test $emacs_cv_x11_version_5_with_xaw = yes; then
ba5da88a 6525 echo "$as_me:6525: result: 5 or newer, with Xaw; use toolkit by default" >&5
503d2be0 6526echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6
ba4481b5
DL
6527 USE_X_TOOLKIT=LUCID
6528 else
ba5da88a 6529 echo "$as_me:6529: result: before 5 or no Xaw; do not use toolkit by default" >&5
503d2be0 6530echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6
ba4481b5
DL
6531 USE_X_TOOLKIT=none
6532 fi
6533 else
6534 USE_X_TOOLKIT=none
6535 fi
6536fi
6537
6538X_TOOLKIT_TYPE=$USE_X_TOOLKIT
6539
6540if test "${USE_X_TOOLKIT}" != "none"; then
ba5da88a 6541 echo "$as_me:6541: checking X11 toolkit version" >&5
503d2be0
AS
6542echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6
6543 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
6544 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6545else
503d2be0 6546 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 6547#line 6547 "configure"
ba4481b5
DL
6548#include "confdefs.h"
6549#include <X11/Intrinsic.h>
503d2be0
AS
6550int
6551main ()
6552{
ba4481b5
DL
6553#if XtSpecificationRelease < 6
6554fail;
6555#endif
6556
503d2be0
AS
6557 ;
6558 return 0;
6559}
6560_ACEOF
6561rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 6562if { (eval echo "$as_me:6562: \"$ac_link\"") >&5
503d2be0
AS
6563 (eval $ac_link) 2>&5
6564 ac_status=$?
ba5da88a 6565 echo "$as_me:6565: \$? = $ac_status" >&5
503d2be0
AS
6566 (exit $ac_status); } &&
6567 { ac_try='test -s conftest$ac_exeext'
ba5da88a 6568 { (eval echo "$as_me:6568: \"$ac_try\"") >&5
503d2be0
AS
6569 (eval $ac_try) 2>&5
6570 ac_status=$?
ba5da88a 6571 echo "$as_me:6571: \$? = $ac_status" >&5
503d2be0 6572 (exit $ac_status); }; }; then
ba4481b5
DL
6573 emacs_cv_x11_toolkit_version_6=yes
6574else
503d2be0
AS
6575 echo "$as_me: failed program was:" >&5
6576cat conftest.$ac_ext >&5
6577emacs_cv_x11_toolkit_version_6=no
ba4481b5 6578fi
503d2be0 6579rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5
DL
6580fi
6581
6582 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
6583 if test $emacs_cv_x11_toolkit_version_6 = yes; then
ba5da88a 6584 echo "$as_me:6584: result: 6 or newer" >&5
503d2be0
AS
6585echo "${ECHO_T}6 or newer" >&6
6586 cat >>confdefs.h <<\EOF
ba4481b5
DL
6587#define HAVE_X11XTR6 1
6588EOF
6589
6590 else
ba5da88a 6591 echo "$as_me:6591: result: before 6" >&5
503d2be0 6592echo "${ECHO_T}before 6" >&6
ba4481b5
DL
6593 fi
6594
6595 OLDLIBS="$LIBS"
6596 if test x$HAVE_X11XTR6 = xyes; then
6597 LIBS="-lXt -lSM -lICE $LIBS"
6598 else
6599 LIBS="-lXt $LIBS"
6600 fi
503d2be0 6601
ba5da88a 6602echo "$as_me:6602: checking for XmuConvertStandardSelection in -lXmu" >&5
503d2be0
AS
6603echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6
6604if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
6605 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6606else
503d2be0 6607 ac_check_lib_save_LIBS=$LIBS
ba4481b5 6608LIBS="-lXmu $LIBS"
503d2be0 6609cat >conftest.$ac_ext <<_ACEOF
ba5da88a 6610#line 6610 "configure"
ba4481b5 6611#include "confdefs.h"
503d2be0 6612
ba4481b5 6613/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6614#ifdef __cplusplus
6615extern "C"
6616#endif
ba4481b5 6617/* We use char because int might match the return type of a gcc2
503d2be0
AS
6618 builtin and then its argument prototype would still apply. */
6619char XmuConvertStandardSelection ();
6620int
6621main ()
6622{
6623XmuConvertStandardSelection ();
6624 ;
6625 return 0;
6626}
6627_ACEOF
6628rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 6629if { (eval echo "$as_me:6629: \"$ac_link\"") >&5
503d2be0
AS
6630 (eval $ac_link) 2>&5
6631 ac_status=$?
ba5da88a 6632 echo "$as_me:6632: \$? = $ac_status" >&5
503d2be0
AS
6633 (exit $ac_status); } &&
6634 { ac_try='test -s conftest$ac_exeext'
ba5da88a 6635 { (eval echo "$as_me:6635: \"$ac_try\"") >&5
503d2be0
AS
6636 (eval $ac_try) 2>&5
6637 ac_status=$?
ba5da88a 6638 echo "$as_me:6638: \$? = $ac_status" >&5
503d2be0
AS
6639 (exit $ac_status); }; }; then
6640 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
6641else
6642 echo "$as_me: failed program was:" >&5
6643cat conftest.$ac_ext >&5
6644ac_cv_lib_Xmu_XmuConvertStandardSelection=no
6645fi
6646rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6647LIBS=$ac_check_lib_save_LIBS
6648fi
ba5da88a 6649echo "$as_me:6649: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
503d2be0
AS
6650echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6
6651if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
6652 cat >>confdefs.h <<EOF
6653#define HAVE_LIBXMU 1
ba4481b5
DL
6654EOF
6655
6656 LIBS="-lXmu $LIBS"
6657
ba4481b5
DL
6658fi
6659
457b792c
GM
6660 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
6661fi
6662
6663# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
6664if test "${HAVE_X11}" = "yes"; then
6665 if test "${USE_X_TOOLKIT}" != "none"; then
503d2be0 6666
ba5da88a 6667echo "$as_me:6667: checking for XShapeQueryExtension in -lXext" >&5
503d2be0
AS
6668echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6
6669if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
6670 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 6671else
503d2be0 6672 ac_check_lib_save_LIBS=$LIBS
457b792c 6673LIBS="-lXext $LIBS"
503d2be0 6674cat >conftest.$ac_ext <<_ACEOF
ba5da88a 6675#line 6675 "configure"
457b792c 6676#include "confdefs.h"
503d2be0 6677
457b792c 6678/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6679#ifdef __cplusplus
6680extern "C"
6681#endif
457b792c 6682/* We use char because int might match the return type of a gcc2
503d2be0
AS
6683 builtin and then its argument prototype would still apply. */
6684char XShapeQueryExtension ();
6685int
6686main ()
6687{
6688XShapeQueryExtension ();
6689 ;
6690 return 0;
6691}
6692_ACEOF
6693rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 6694if { (eval echo "$as_me:6694: \"$ac_link\"") >&5
503d2be0
AS
6695 (eval $ac_link) 2>&5
6696 ac_status=$?
ba5da88a 6697 echo "$as_me:6697: \$? = $ac_status" >&5
503d2be0
AS
6698 (exit $ac_status); } &&
6699 { ac_try='test -s conftest$ac_exeext'
ba5da88a 6700 { (eval echo "$as_me:6700: \"$ac_try\"") >&5
503d2be0
AS
6701 (eval $ac_try) 2>&5
6702 ac_status=$?
ba5da88a 6703 echo "$as_me:6703: \$? = $ac_status" >&5
503d2be0
AS
6704 (exit $ac_status); }; }; then
6705 ac_cv_lib_Xext_XShapeQueryExtension=yes
6706else
6707 echo "$as_me: failed program was:" >&5
6708cat conftest.$ac_ext >&5
6709ac_cv_lib_Xext_XShapeQueryExtension=no
6710fi
6711rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6712LIBS=$ac_check_lib_save_LIBS
6713fi
ba5da88a 6714echo "$as_me:6714: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
503d2be0
AS
6715echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6
6716if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
6717 cat >>confdefs.h <<EOF
6718#define HAVE_LIBXEXT 1
457b792c
GM
6719EOF
6720
6721 LIBS="-lXext $LIBS"
6722
457b792c
GM
6723fi
6724
6725 fi
ba4481b5
DL
6726fi
6727
6728if test "${USE_X_TOOLKIT}" = "MOTIF"; then
ba5da88a 6729 echo "$as_me:6729: checking for Motif version 2.1" >&5
503d2be0
AS
6730echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6
6731if test "${emacs_cv_motif_version_2_1+set}" = set; then
6732 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6733else
503d2be0 6734 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 6735#line 6735 "configure"
ba4481b5
DL
6736#include "confdefs.h"
6737#include <Xm/Xm.h>
503d2be0
AS
6738int
6739main ()
6740{
ba4481b5
DL
6741#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
6742int x = 5;
6743#else
6744Motif version prior to 2.1.
6745#endif
503d2be0
AS
6746 ;
6747 return 0;
6748}
6749_ACEOF
6750rm -f conftest.$ac_objext
ba5da88a 6751if { (eval echo "$as_me:6751: \"$ac_compile\"") >&5
503d2be0
AS
6752 (eval $ac_compile) 2>&5
6753 ac_status=$?
ba5da88a 6754 echo "$as_me:6754: \$? = $ac_status" >&5
503d2be0
AS
6755 (exit $ac_status); } &&
6756 { ac_try='test -s conftest.$ac_objext'
ba5da88a 6757 { (eval echo "$as_me:6757: \"$ac_try\"") >&5
503d2be0
AS
6758 (eval $ac_try) 2>&5
6759 ac_status=$?
ba5da88a 6760 echo "$as_me:6760: \$? = $ac_status" >&5
503d2be0 6761 (exit $ac_status); }; }; then
ba4481b5
DL
6762 emacs_cv_motif_version_2_1=yes
6763else
503d2be0
AS
6764 echo "$as_me: failed program was:" >&5
6765cat conftest.$ac_ext >&5
6766emacs_cv_motif_version_2_1=no
ba4481b5 6767fi
503d2be0 6768rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 6769fi
ba5da88a 6770echo "$as_me:6770: result: $emacs_cv_motif_version_2_1" >&5
503d2be0 6771echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6
ba4481b5
DL
6772 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
6773 if test $emacs_cv_motif_version_2_1 = yes; then
169fe44e 6774 HAVE_LIBXP=no
503d2be0 6775 cat >>confdefs.h <<\EOF
ba4481b5
DL
6776#define HAVE_MOTIF_2_1 1
6777EOF
6778
ba5da88a 6779 echo "$as_me:6779: checking for XpCreateContext in -lXp" >&5
503d2be0
AS
6780echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6
6781if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
6782 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6783else
503d2be0 6784 ac_check_lib_save_LIBS=$LIBS
457b792c 6785LIBS="-lXp $LIBS"
503d2be0 6786cat >conftest.$ac_ext <<_ACEOF
ba5da88a 6787#line 6787 "configure"
ba4481b5 6788#include "confdefs.h"
503d2be0 6789
ba4481b5 6790/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6791#ifdef __cplusplus
6792extern "C"
6793#endif
ba4481b5 6794/* We use char because int might match the return type of a gcc2
503d2be0
AS
6795 builtin and then its argument prototype would still apply. */
6796char XpCreateContext ();
6797int
6798main ()
6799{
6800XpCreateContext ();
6801 ;
6802 return 0;
6803}
6804_ACEOF
6805rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 6806if { (eval echo "$as_me:6806: \"$ac_link\"") >&5
503d2be0
AS
6807 (eval $ac_link) 2>&5
6808 ac_status=$?
ba5da88a 6809 echo "$as_me:6809: \$? = $ac_status" >&5
503d2be0
AS
6810 (exit $ac_status); } &&
6811 { ac_try='test -s conftest$ac_exeext'
ba5da88a 6812 { (eval echo "$as_me:6812: \"$ac_try\"") >&5
503d2be0
AS
6813 (eval $ac_try) 2>&5
6814 ac_status=$?
ba5da88a 6815 echo "$as_me:6815: \$? = $ac_status" >&5
503d2be0
AS
6816 (exit $ac_status); }; }; then
6817 ac_cv_lib_Xp_XpCreateContext=yes
6818else
6819 echo "$as_me: failed program was:" >&5
6820cat conftest.$ac_ext >&5
6821ac_cv_lib_Xp_XpCreateContext=no
6822fi
6823rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6824LIBS=$ac_check_lib_save_LIBS
6825fi
ba5da88a 6826echo "$as_me:6826: result: $ac_cv_lib_Xp_XpCreateContext" >&5
503d2be0
AS
6827echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6
6828if test $ac_cv_lib_Xp_XpCreateContext = yes; then
48d4b120 6829 HAVE_LIBXP=yes
ba4481b5
DL
6830fi
6831
48d4b120 6832 if test ${HAVE_LIBXP} = yes; then
503d2be0 6833 cat >>confdefs.h <<\EOF
48d4b120
DL
6834#define HAVE_LIBXP 1
6835EOF
6836
503d2be0 6837 fi
ba4481b5
DL
6838 fi
6839fi
6840
6841### Is -lXaw3d available?
6842HAVE_XAW3D=no
6843if test "${HAVE_X11}" = "yes"; then
6844 if test "${USE_X_TOOLKIT}" != "none"; then
ba5da88a 6845 echo "$as_me:6845: checking for X11/Xaw3d/Scrollbar.h" >&5
503d2be0
AS
6846echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6
6847if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
6848 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6849else
503d2be0 6850 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 6851#line 6851 "configure"
ba4481b5
DL
6852#include "confdefs.h"
6853#include <X11/Xaw3d/Scrollbar.h>
503d2be0 6854_ACEOF
ba5da88a 6855if { (eval echo "$as_me:6855: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
6856 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6857 ac_status=$?
6858 egrep -v '^ *\+' conftest.er1 >conftest.err
6859 rm -f conftest.er1
6860 cat conftest.err >&5
ba5da88a 6861 echo "$as_me:6861: \$? = $ac_status" >&5
503d2be0
AS
6862 (exit $ac_status); } >/dev/null; then
6863 if test -s conftest.err; then
6864 ac_cpp_err=$ac_c_preproc_warn_flag
6865 else
6866 ac_cpp_err=
6867 fi
6868else
6869 ac_cpp_err=yes
6870fi
6871if test -z "$ac_cpp_err"; then
6872 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 6873else
503d2be0 6874 echo "$as_me: failed program was:" >&5
ba4481b5 6875 cat conftest.$ac_ext >&5
503d2be0 6876 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 6877fi
503d2be0 6878rm -f conftest.err conftest.$ac_ext
ba4481b5 6879fi
ba5da88a 6880echo "$as_me:6880: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
503d2be0
AS
6881echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6
6882if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
ba5da88a 6883 echo "$as_me:6883: checking for XawScrollbarSetThumb in -lXaw3d" >&5
503d2be0
AS
6884echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6
6885if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
6886 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6887else
503d2be0 6888 ac_check_lib_save_LIBS=$LIBS
457b792c 6889LIBS="-lXaw3d $LIBS"
503d2be0 6890cat >conftest.$ac_ext <<_ACEOF
ba5da88a 6891#line 6891 "configure"
ba4481b5 6892#include "confdefs.h"
503d2be0 6893
ba4481b5 6894/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6895#ifdef __cplusplus
6896extern "C"
6897#endif
ba4481b5 6898/* We use char because int might match the return type of a gcc2
503d2be0
AS
6899 builtin and then its argument prototype would still apply. */
6900char XawScrollbarSetThumb ();
6901int
6902main ()
6903{
6904XawScrollbarSetThumb ();
6905 ;
6906 return 0;
6907}
6908_ACEOF
6909rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 6910if { (eval echo "$as_me:6910: \"$ac_link\"") >&5
503d2be0
AS
6911 (eval $ac_link) 2>&5
6912 ac_status=$?
ba5da88a 6913 echo "$as_me:6913: \$? = $ac_status" >&5
503d2be0
AS
6914 (exit $ac_status); } &&
6915 { ac_try='test -s conftest$ac_exeext'
ba5da88a 6916 { (eval echo "$as_me:6916: \"$ac_try\"") >&5
503d2be0
AS
6917 (eval $ac_try) 2>&5
6918 ac_status=$?
ba5da88a 6919 echo "$as_me:6919: \$? = $ac_status" >&5
503d2be0
AS
6920 (exit $ac_status); }; }; then
6921 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
6922else
6923 echo "$as_me: failed program was:" >&5
6924cat conftest.$ac_ext >&5
6925ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
6926fi
6927rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6928LIBS=$ac_check_lib_save_LIBS
6929fi
ba5da88a 6930echo "$as_me:6930: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
503d2be0
AS
6931echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6
6932if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
ba4481b5 6933 HAVE_XAW3D=yes
ba4481b5
DL
6934fi
6935
ba4481b5
DL
6936fi
6937
ba4481b5 6938 if test "${HAVE_XAW3D}" = "yes"; then
503d2be0 6939 cat >>confdefs.h <<\EOF
ba4481b5
DL
6940#define HAVE_XAW3D 1
6941EOF
6942
6943 fi
6944 fi
6945fi
ba4481b5
DL
6946
6947USE_TOOLKIT_SCROLL_BARS=no
6948if test "${with_toolkit_scroll_bars}" != "no"; then
6949 if test "${USE_X_TOOLKIT}" != "none"; then
6950 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
503d2be0 6951 cat >>confdefs.h <<\EOF
ba4481b5
DL
6952#define USE_TOOLKIT_SCROLL_BARS 1
6953EOF
6954
6955 HAVE_XAW3D=no
6956 USE_TOOLKIT_SCROLL_BARS=yes
6957 elif test "${HAVE_XAW3D}" = "yes"; then
503d2be0 6958 cat >>confdefs.h <<\EOF
ba4481b5
DL
6959#define USE_TOOLKIT_SCROLL_BARS 1
6960EOF
6961
6962 USE_TOOLKIT_SCROLL_BARS=yes
6963 fi
6964 fi
6965fi
6966
1d36487c 6967if test "${with_xim}" != "no"; then
503d2be0 6968 cat >>confdefs.h <<\EOF
1d36487c
GM
6969#define USE_XIM 1
6970EOF
6971
6972fi
6973
ba4481b5
DL
6974### Use -lXpm if available, unless `--with-xpm=no'.
6975HAVE_XPM=no
6976if test "${HAVE_X11}" = "yes"; then
6977 if test "${with_xpm}" != "no"; then
ba5da88a 6978 echo "$as_me:6978: checking for X11/xpm.h" >&5
503d2be0
AS
6979echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
6980if test "${ac_cv_header_X11_xpm_h+set}" = set; then
6981 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6982else
503d2be0 6983 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 6984#line 6984 "configure"
ba4481b5
DL
6985#include "confdefs.h"
6986#include <X11/xpm.h>
503d2be0 6987_ACEOF
ba5da88a 6988if { (eval echo "$as_me:6988: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
6989 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6990 ac_status=$?
6991 egrep -v '^ *\+' conftest.er1 >conftest.err
6992 rm -f conftest.er1
6993 cat conftest.err >&5
ba5da88a 6994 echo "$as_me:6994: \$? = $ac_status" >&5
503d2be0
AS
6995 (exit $ac_status); } >/dev/null; then
6996 if test -s conftest.err; then
6997 ac_cpp_err=$ac_c_preproc_warn_flag
6998 else
6999 ac_cpp_err=
7000 fi
7001else
7002 ac_cpp_err=yes
7003fi
7004if test -z "$ac_cpp_err"; then
7005 ac_cv_header_X11_xpm_h=yes
ba4481b5 7006else
503d2be0 7007 echo "$as_me: failed program was:" >&5
ba4481b5 7008 cat conftest.$ac_ext >&5
503d2be0 7009 ac_cv_header_X11_xpm_h=no
ba4481b5 7010fi
503d2be0 7011rm -f conftest.err conftest.$ac_ext
ba4481b5 7012fi
ba5da88a 7013echo "$as_me:7013: result: $ac_cv_header_X11_xpm_h" >&5
503d2be0
AS
7014echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
7015if test $ac_cv_header_X11_xpm_h = yes; then
ba5da88a 7016 echo "$as_me:7016: checking for XpmReadFileToPixmap in -lXpm" >&5
503d2be0
AS
7017echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6
7018if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
7019 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7020else
503d2be0 7021 ac_check_lib_save_LIBS=$LIBS
ba4481b5 7022LIBS="-lXpm -lX11 $LIBS"
503d2be0 7023cat >conftest.$ac_ext <<_ACEOF
ba5da88a 7024#line 7024 "configure"
ba4481b5 7025#include "confdefs.h"
503d2be0 7026
ba4481b5 7027/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7028#ifdef __cplusplus
7029extern "C"
7030#endif
ba4481b5 7031/* We use char because int might match the return type of a gcc2
503d2be0
AS
7032 builtin and then its argument prototype would still apply. */
7033char XpmReadFileToPixmap ();
7034int
7035main ()
7036{
7037XpmReadFileToPixmap ();
7038 ;
7039 return 0;
7040}
7041_ACEOF
7042rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 7043if { (eval echo "$as_me:7043: \"$ac_link\"") >&5
503d2be0
AS
7044 (eval $ac_link) 2>&5
7045 ac_status=$?
ba5da88a 7046 echo "$as_me:7046: \$? = $ac_status" >&5
503d2be0
AS
7047 (exit $ac_status); } &&
7048 { ac_try='test -s conftest$ac_exeext'
ba5da88a 7049 { (eval echo "$as_me:7049: \"$ac_try\"") >&5
503d2be0
AS
7050 (eval $ac_try) 2>&5
7051 ac_status=$?
ba5da88a 7052 echo "$as_me:7052: \$? = $ac_status" >&5
503d2be0
AS
7053 (exit $ac_status); }; }; then
7054 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
7055else
7056 echo "$as_me: failed program was:" >&5
7057cat conftest.$ac_ext >&5
7058ac_cv_lib_Xpm_XpmReadFileToPixmap=no
7059fi
7060rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7061LIBS=$ac_check_lib_save_LIBS
7062fi
ba5da88a 7063echo "$as_me:7063: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
503d2be0
AS
7064echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6
7065if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
ba4481b5 7066 HAVE_XPM=yes
ba4481b5
DL
7067fi
7068
ba4481b5
DL
7069fi
7070
4b92c49a 7071 if test "${HAVE_XPM}" = "yes"; then
ba5da88a 7072 echo "$as_me:7072: checking for XpmReturnAllocPixels preprocessor define" >&5
503d2be0
AS
7073echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6
7074 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 7075#line 7075 "configure"
4b92c49a
GM
7076#include "confdefs.h"
7077#include "X11/xpm.h"
7078#ifndef XpmReturnAllocPixels
7079no_return_alloc_pixels
7080#endif
503d2be0
AS
7081
7082_ACEOF
4b92c49a
GM
7083if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7084 egrep "no_return_alloc_pixels" >/dev/null 2>&1; then
4b92c49a
GM
7085 HAVE_XPM=no
7086else
4b92c49a
GM
7087 HAVE_XPM=yes
7088fi
7089rm -f conftest*
7090
5721ae13 7091 if test "${HAVE_XPM}" = "yes"; then
ba5da88a 7092 echo "$as_me:7092: result: yes" >&5
503d2be0 7093echo "${ECHO_T}yes" >&6
5721ae13 7094 else
ba5da88a 7095 echo "$as_me:7095: result: no" >&5
503d2be0 7096echo "${ECHO_T}no" >&6
5721ae13 7097 fi
ff8df3be 7098 fi
ba4481b5
DL
7099 fi
7100
7101 if test "${HAVE_XPM}" = "yes"; then
503d2be0 7102 cat >>confdefs.h <<\EOF
ba4481b5
DL
7103#define HAVE_XPM 1
7104EOF
7105
7106 fi
7107fi
503d2be0 7108
ba4481b5
DL
7109### Use -ljpeg if available, unless `--with-jpeg=no'.
7110HAVE_JPEG=no
7111if test "${HAVE_X11}" = "yes"; then
7112 if test "${with_jpeg}" != "no"; then
ba5da88a 7113 echo "$as_me:7113: checking for jerror.h" >&5
503d2be0
AS
7114echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
7115if test "${ac_cv_header_jerror_h+set}" = set; then
7116 echo $ECHO_N "(cached) $ECHO_C" >&6
ffe36136 7117else
503d2be0 7118 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 7119#line 7119 "configure"
ffe36136
GM
7120#include "confdefs.h"
7121#include <jerror.h>
503d2be0 7122_ACEOF
ba5da88a 7123if { (eval echo "$as_me:7123: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
7124 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7125 ac_status=$?
7126 egrep -v '^ *\+' conftest.er1 >conftest.err
7127 rm -f conftest.er1
7128 cat conftest.err >&5
ba5da88a 7129 echo "$as_me:7129: \$? = $ac_status" >&5
503d2be0
AS
7130 (exit $ac_status); } >/dev/null; then
7131 if test -s conftest.err; then
7132 ac_cpp_err=$ac_c_preproc_warn_flag
7133 else
7134 ac_cpp_err=
7135 fi
7136else
7137 ac_cpp_err=yes
7138fi
7139if test -z "$ac_cpp_err"; then
7140 ac_cv_header_jerror_h=yes
ffe36136 7141else
503d2be0 7142 echo "$as_me: failed program was:" >&5
ffe36136 7143 cat conftest.$ac_ext >&5
503d2be0 7144 ac_cv_header_jerror_h=no
ffe36136 7145fi
503d2be0 7146rm -f conftest.err conftest.$ac_ext
ffe36136 7147fi
ba5da88a 7148echo "$as_me:7148: result: $ac_cv_header_jerror_h" >&5
503d2be0
AS
7149echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
7150if test $ac_cv_header_jerror_h = yes; then
ba5da88a 7151 echo "$as_me:7151: checking for jpeg_destroy_compress in -ljpeg" >&5
503d2be0
AS
7152echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6
7153if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
7154 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7155else
503d2be0 7156 ac_check_lib_save_LIBS=$LIBS
457b792c 7157LIBS="-ljpeg $LIBS"
503d2be0 7158cat >conftest.$ac_ext <<_ACEOF
ba5da88a 7159#line 7159 "configure"
ba4481b5 7160#include "confdefs.h"
503d2be0 7161
ba4481b5 7162/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7163#ifdef __cplusplus
7164extern "C"
7165#endif
ba4481b5 7166/* We use char because int might match the return type of a gcc2
503d2be0
AS
7167 builtin and then its argument prototype would still apply. */
7168char jpeg_destroy_compress ();
7169int
7170main ()
7171{
7172jpeg_destroy_compress ();
7173 ;
7174 return 0;
7175}
7176_ACEOF
7177rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 7178if { (eval echo "$as_me:7178: \"$ac_link\"") >&5
503d2be0
AS
7179 (eval $ac_link) 2>&5
7180 ac_status=$?
ba5da88a 7181 echo "$as_me:7181: \$? = $ac_status" >&5
503d2be0
AS
7182 (exit $ac_status); } &&
7183 { ac_try='test -s conftest$ac_exeext'
ba5da88a 7184 { (eval echo "$as_me:7184: \"$ac_try\"") >&5
503d2be0
AS
7185 (eval $ac_try) 2>&5
7186 ac_status=$?
ba5da88a 7187 echo "$as_me:7187: \$? = $ac_status" >&5
503d2be0
AS
7188 (exit $ac_status); }; }; then
7189 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
7190else
7191 echo "$as_me: failed program was:" >&5
7192cat conftest.$ac_ext >&5
7193ac_cv_lib_jpeg_jpeg_destroy_compress=no
7194fi
7195rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7196LIBS=$ac_check_lib_save_LIBS
7197fi
ba5da88a 7198echo "$as_me:7198: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
503d2be0
AS
7199echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6
7200if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
ba4481b5 7201 HAVE_JPEG=yes
ffe36136
GM
7202fi
7203
ba4481b5
DL
7204fi
7205
ba4481b5
DL
7206 fi
7207
7208 if test "${HAVE_JPEG}" = "yes"; then
503d2be0 7209 cat >>confdefs.h <<\EOF
ba4481b5
DL
7210#define HAVE_JPEG 1
7211EOF
7212
7213 fi
7214fi
503d2be0 7215
ba4481b5
DL
7216### Use -lpng if available, unless `--with-png=no'.
7217HAVE_PNG=no
7218if test "${HAVE_X11}" = "yes"; then
7219 if test "${with_png}" != "no"; then
ba5da88a 7220 echo "$as_me:7220: checking for png.h" >&5
503d2be0
AS
7221echo $ECHO_N "checking for png.h... $ECHO_C" >&6
7222if test "${ac_cv_header_png_h+set}" = set; then
7223 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7224else
503d2be0 7225 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 7226#line 7226 "configure"
ba4481b5
DL
7227#include "confdefs.h"
7228#include <png.h>
503d2be0 7229_ACEOF
ba5da88a 7230if { (eval echo "$as_me:7230: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
7231 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7232 ac_status=$?
7233 egrep -v '^ *\+' conftest.er1 >conftest.err
7234 rm -f conftest.er1
7235 cat conftest.err >&5
ba5da88a 7236 echo "$as_me:7236: \$? = $ac_status" >&5
503d2be0
AS
7237 (exit $ac_status); } >/dev/null; then
7238 if test -s conftest.err; then
7239 ac_cpp_err=$ac_c_preproc_warn_flag
7240 else
7241 ac_cpp_err=
7242 fi
7243else
7244 ac_cpp_err=yes
7245fi
7246if test -z "$ac_cpp_err"; then
7247 ac_cv_header_png_h=yes
ba4481b5 7248else
503d2be0 7249 echo "$as_me: failed program was:" >&5
ba4481b5 7250 cat conftest.$ac_ext >&5
503d2be0 7251 ac_cv_header_png_h=no
ba4481b5 7252fi
503d2be0 7253rm -f conftest.err conftest.$ac_ext
ba4481b5 7254fi
ba5da88a 7255echo "$as_me:7255: result: $ac_cv_header_png_h" >&5
503d2be0
AS
7256echo "${ECHO_T}$ac_cv_header_png_h" >&6
7257if test $ac_cv_header_png_h = yes; then
ba5da88a 7258 echo "$as_me:7258: checking for png_get_channels in -lpng" >&5
503d2be0
AS
7259echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6
7260if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
7261 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7262else
503d2be0 7263 ac_check_lib_save_LIBS=$LIBS
457b792c 7264LIBS="-lpng -lz -lm $LIBS"
503d2be0 7265cat >conftest.$ac_ext <<_ACEOF
ba5da88a 7266#line 7266 "configure"
ba4481b5 7267#include "confdefs.h"
503d2be0 7268
ba4481b5 7269/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7270#ifdef __cplusplus
7271extern "C"
7272#endif
ba4481b5 7273/* We use char because int might match the return type of a gcc2
503d2be0
AS
7274 builtin and then its argument prototype would still apply. */
7275char png_get_channels ();
7276int
7277main ()
7278{
7279png_get_channels ();
7280 ;
7281 return 0;
7282}
7283_ACEOF
7284rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 7285if { (eval echo "$as_me:7285: \"$ac_link\"") >&5
503d2be0
AS
7286 (eval $ac_link) 2>&5
7287 ac_status=$?
ba5da88a 7288 echo "$as_me:7288: \$? = $ac_status" >&5
503d2be0
AS
7289 (exit $ac_status); } &&
7290 { ac_try='test -s conftest$ac_exeext'
ba5da88a 7291 { (eval echo "$as_me:7291: \"$ac_try\"") >&5
503d2be0
AS
7292 (eval $ac_try) 2>&5
7293 ac_status=$?
ba5da88a 7294 echo "$as_me:7294: \$? = $ac_status" >&5
503d2be0
AS
7295 (exit $ac_status); }; }; then
7296 ac_cv_lib_png_png_get_channels=yes
7297else
7298 echo "$as_me: failed program was:" >&5
7299cat conftest.$ac_ext >&5
7300ac_cv_lib_png_png_get_channels=no
7301fi
7302rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7303LIBS=$ac_check_lib_save_LIBS
7304fi
ba5da88a 7305echo "$as_me:7305: result: $ac_cv_lib_png_png_get_channels" >&5
503d2be0
AS
7306echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6
7307if test $ac_cv_lib_png_png_get_channels = yes; then
ba4481b5 7308 HAVE_PNG=yes
ba4481b5
DL
7309fi
7310
ba4481b5
DL
7311fi
7312
ba4481b5
DL
7313 fi
7314
7315 if test "${HAVE_PNG}" = "yes"; then
503d2be0 7316 cat >>confdefs.h <<\EOF
ba4481b5
DL
7317#define HAVE_PNG 1
7318EOF
7319
7320 fi
7321fi
503d2be0 7322
ba4481b5
DL
7323### Use -ltiff if available, unless `--with-tiff=no'.
7324HAVE_TIFF=no
7325if test "${HAVE_X11}" = "yes"; then
7326 if test "${with_tiff}" != "no"; then
ba5da88a 7327 echo "$as_me:7327: checking for tiffio.h" >&5
503d2be0
AS
7328echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
7329if test "${ac_cv_header_tiffio_h+set}" = set; then
7330 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7331else
503d2be0 7332 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 7333#line 7333 "configure"
ba4481b5
DL
7334#include "confdefs.h"
7335#include <tiffio.h>
503d2be0 7336_ACEOF
ba5da88a 7337if { (eval echo "$as_me:7337: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
7338 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7339 ac_status=$?
7340 egrep -v '^ *\+' conftest.er1 >conftest.err
7341 rm -f conftest.er1
7342 cat conftest.err >&5
ba5da88a 7343 echo "$as_me:7343: \$? = $ac_status" >&5
503d2be0
AS
7344 (exit $ac_status); } >/dev/null; then
7345 if test -s conftest.err; then
7346 ac_cpp_err=$ac_c_preproc_warn_flag
7347 else
7348 ac_cpp_err=
7349 fi
7350else
7351 ac_cpp_err=yes
7352fi
7353if test -z "$ac_cpp_err"; then
7354 ac_cv_header_tiffio_h=yes
ba4481b5 7355else
503d2be0 7356 echo "$as_me: failed program was:" >&5
ba4481b5 7357 cat conftest.$ac_ext >&5
503d2be0 7358 ac_cv_header_tiffio_h=no
ba4481b5 7359fi
503d2be0 7360rm -f conftest.err conftest.$ac_ext
ba4481b5 7361fi
ba5da88a 7362echo "$as_me:7362: result: $ac_cv_header_tiffio_h" >&5
503d2be0
AS
7363echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
7364if test $ac_cv_header_tiffio_h = yes; then
457b792c 7365 tifflibs="-lz -lm"
3b3cc4a4
KR
7366 # At least one tiff package requires the jpeg library.
7367 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
ba5da88a 7368 echo "$as_me:7368: checking for TIFFGetVersion in -ltiff" >&5
503d2be0
AS
7369echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6
7370if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
7371 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7372else
503d2be0 7373 ac_check_lib_save_LIBS=$LIBS
3b3cc4a4 7374LIBS="-ltiff $tifflibs $LIBS"
503d2be0 7375cat >conftest.$ac_ext <<_ACEOF
ba5da88a 7376#line 7376 "configure"
ba4481b5 7377#include "confdefs.h"
503d2be0 7378
ba4481b5 7379/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7380#ifdef __cplusplus
7381extern "C"
7382#endif
ba4481b5 7383/* We use char because int might match the return type of a gcc2
503d2be0
AS
7384 builtin and then its argument prototype would still apply. */
7385char TIFFGetVersion ();
7386int
7387main ()
7388{
7389TIFFGetVersion ();
7390 ;
7391 return 0;
7392}
7393_ACEOF
7394rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 7395if { (eval echo "$as_me:7395: \"$ac_link\"") >&5
503d2be0
AS
7396 (eval $ac_link) 2>&5
7397 ac_status=$?
ba5da88a 7398 echo "$as_me:7398: \$? = $ac_status" >&5
503d2be0
AS
7399 (exit $ac_status); } &&
7400 { ac_try='test -s conftest$ac_exeext'
ba5da88a 7401 { (eval echo "$as_me:7401: \"$ac_try\"") >&5
503d2be0
AS
7402 (eval $ac_try) 2>&5
7403 ac_status=$?
ba5da88a 7404 echo "$as_me:7404: \$? = $ac_status" >&5
503d2be0
AS
7405 (exit $ac_status); }; }; then
7406 ac_cv_lib_tiff_TIFFGetVersion=yes
7407else
7408 echo "$as_me: failed program was:" >&5
7409cat conftest.$ac_ext >&5
7410ac_cv_lib_tiff_TIFFGetVersion=no
7411fi
7412rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7413LIBS=$ac_check_lib_save_LIBS
7414fi
ba5da88a 7415echo "$as_me:7415: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
503d2be0
AS
7416echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6
7417if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
ba4481b5 7418 HAVE_TIFF=yes
ba4481b5
DL
7419fi
7420
ba4481b5
DL
7421fi
7422
ba4481b5
DL
7423 fi
7424
7425 if test "${HAVE_TIFF}" = "yes"; then
503d2be0 7426 cat >>confdefs.h <<\EOF
ba4481b5
DL
7427#define HAVE_TIFF 1
7428EOF
7429
7430 fi
7431fi
503d2be0 7432
ba4481b5
DL
7433### Use -lgif if available, unless `--with-gif=no'.
7434HAVE_GIF=no
7435if test "${HAVE_X11}" = "yes"; then
7436 if test "${with_gif}" != "no"; then
ba5da88a 7437 echo "$as_me:7437: checking for gif_lib.h" >&5
503d2be0
AS
7438echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
7439if test "${ac_cv_header_gif_lib_h+set}" = set; then
7440 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7441else
503d2be0 7442 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 7443#line 7443 "configure"
ba4481b5
DL
7444#include "confdefs.h"
7445#include <gif_lib.h>
503d2be0 7446_ACEOF
ba5da88a 7447if { (eval echo "$as_me:7447: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
7448 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7449 ac_status=$?
7450 egrep -v '^ *\+' conftest.er1 >conftest.err
7451 rm -f conftest.er1
7452 cat conftest.err >&5
ba5da88a 7453 echo "$as_me:7453: \$? = $ac_status" >&5
503d2be0
AS
7454 (exit $ac_status); } >/dev/null; then
7455 if test -s conftest.err; then
7456 ac_cpp_err=$ac_c_preproc_warn_flag
7457 else
7458 ac_cpp_err=
7459 fi
7460else
7461 ac_cpp_err=yes
7462fi
7463if test -z "$ac_cpp_err"; then
7464 ac_cv_header_gif_lib_h=yes
ba4481b5 7465else
503d2be0 7466 echo "$as_me: failed program was:" >&5
ba4481b5 7467 cat conftest.$ac_ext >&5
503d2be0 7468 ac_cv_header_gif_lib_h=no
ba4481b5 7469fi
503d2be0 7470rm -f conftest.err conftest.$ac_ext
ba4481b5 7471fi
ba5da88a 7472echo "$as_me:7472: result: $ac_cv_header_gif_lib_h" >&5
503d2be0
AS
7473echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
7474if test $ac_cv_header_gif_lib_h = yes; then
ba5da88a 7475 echo "$as_me:7475: checking for DGifOpen in -lungif" >&5
503d2be0
AS
7476echo $ECHO_N "checking for DGifOpen in -lungif... $ECHO_C" >&6
7477if test "${ac_cv_lib_ungif_DGifOpen+set}" = set; then
7478 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7479else
503d2be0 7480 ac_check_lib_save_LIBS=$LIBS
457b792c 7481LIBS="-lungif $LIBS"
503d2be0 7482cat >conftest.$ac_ext <<_ACEOF
ba5da88a 7483#line 7483 "configure"
ba4481b5 7484#include "confdefs.h"
503d2be0 7485
ba4481b5 7486/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7487#ifdef __cplusplus
7488extern "C"
7489#endif
ba4481b5 7490/* We use char because int might match the return type of a gcc2
503d2be0
AS
7491 builtin and then its argument prototype would still apply. */
7492char DGifOpen ();
7493int
7494main ()
7495{
7496DGifOpen ();
7497 ;
7498 return 0;
7499}
7500_ACEOF
7501rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 7502if { (eval echo "$as_me:7502: \"$ac_link\"") >&5
503d2be0
AS
7503 (eval $ac_link) 2>&5
7504 ac_status=$?
ba5da88a 7505 echo "$as_me:7505: \$? = $ac_status" >&5
503d2be0
AS
7506 (exit $ac_status); } &&
7507 { ac_try='test -s conftest$ac_exeext'
ba5da88a 7508 { (eval echo "$as_me:7508: \"$ac_try\"") >&5
503d2be0
AS
7509 (eval $ac_try) 2>&5
7510 ac_status=$?
ba5da88a 7511 echo "$as_me:7511: \$? = $ac_status" >&5
503d2be0
AS
7512 (exit $ac_status); }; }; then
7513 ac_cv_lib_ungif_DGifOpen=yes
7514else
7515 echo "$as_me: failed program was:" >&5
7516cat conftest.$ac_ext >&5
7517ac_cv_lib_ungif_DGifOpen=no
7518fi
7519rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7520LIBS=$ac_check_lib_save_LIBS
7521fi
ba5da88a 7522echo "$as_me:7522: result: $ac_cv_lib_ungif_DGifOpen" >&5
503d2be0
AS
7523echo "${ECHO_T}$ac_cv_lib_ungif_DGifOpen" >&6
7524if test $ac_cv_lib_ungif_DGifOpen = yes; then
ba4481b5 7525 HAVE_GIF=yes
ba4481b5
DL
7526fi
7527
ba4481b5
DL
7528fi
7529
ba4481b5
DL
7530 fi
7531
7532 if test "${HAVE_GIF}" = "yes"; then
503d2be0 7533 cat >>confdefs.h <<\EOF
ba4481b5
DL
7534#define HAVE_GIF 1
7535EOF
7536
7537 fi
7538fi
7539
7540# If netdb.h doesn't declare h_errno, we must declare it by hand.
ba5da88a 7541echo "$as_me:7541: checking whether netdb declares h_errno" >&5
503d2be0
AS
7542echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6
7543if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
7544 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7545else
503d2be0 7546 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 7547#line 7547 "configure"
ba4481b5
DL
7548#include "confdefs.h"
7549#include <netdb.h>
503d2be0
AS
7550int
7551main ()
7552{
ba4481b5 7553return h_errno;
503d2be0
AS
7554 ;
7555 return 0;
7556}
7557_ACEOF
7558rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 7559if { (eval echo "$as_me:7559: \"$ac_link\"") >&5
503d2be0
AS
7560 (eval $ac_link) 2>&5
7561 ac_status=$?
ba5da88a 7562 echo "$as_me:7562: \$? = $ac_status" >&5
503d2be0
AS
7563 (exit $ac_status); } &&
7564 { ac_try='test -s conftest$ac_exeext'
ba5da88a 7565 { (eval echo "$as_me:7565: \"$ac_try\"") >&5
503d2be0
AS
7566 (eval $ac_try) 2>&5
7567 ac_status=$?
ba5da88a 7568 echo "$as_me:7568: \$? = $ac_status" >&5
503d2be0 7569 (exit $ac_status); }; }; then
ba4481b5
DL
7570 emacs_cv_netdb_declares_h_errno=yes
7571else
503d2be0
AS
7572 echo "$as_me: failed program was:" >&5
7573cat conftest.$ac_ext >&5
7574emacs_cv_netdb_declares_h_errno=no
ba4481b5 7575fi
503d2be0 7576rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 7577fi
ba5da88a 7578echo "$as_me:7578: result: $emacs_cv_netdb_declares_h_errno" >&5
503d2be0 7579echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6
ba4481b5 7580if test $emacs_cv_netdb_declares_h_errno = yes; then
503d2be0 7581 cat >>confdefs.h <<\EOF
ba4481b5
DL
7582#define HAVE_H_ERRNO 1
7583EOF
7584
7585fi
7586
7587# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7588# for constant arguments. Useless!
ba5da88a 7589echo "$as_me:7589: checking for working alloca.h" >&5
503d2be0
AS
7590echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
7591if test "${ac_cv_working_alloca_h+set}" = set; then
7592 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7593else
503d2be0 7594 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 7595#line 7595 "configure"
ba4481b5
DL
7596#include "confdefs.h"
7597#include <alloca.h>
503d2be0
AS
7598int
7599main ()
7600{
7601char *p = (char *) alloca (2 * sizeof (int));
7602 ;
7603 return 0;
7604}
7605_ACEOF
7606rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 7607if { (eval echo "$as_me:7607: \"$ac_link\"") >&5
503d2be0
AS
7608 (eval $ac_link) 2>&5
7609 ac_status=$?
ba5da88a 7610 echo "$as_me:7610: \$? = $ac_status" >&5
503d2be0
AS
7611 (exit $ac_status); } &&
7612 { ac_try='test -s conftest$ac_exeext'
ba5da88a 7613 { (eval echo "$as_me:7613: \"$ac_try\"") >&5
503d2be0
AS
7614 (eval $ac_try) 2>&5
7615 ac_status=$?
ba5da88a 7616 echo "$as_me:7616: \$? = $ac_status" >&5
503d2be0
AS
7617 (exit $ac_status); }; }; then
7618 ac_cv_working_alloca_h=yes
7619else
7620 echo "$as_me: failed program was:" >&5
7621cat conftest.$ac_ext >&5
7622ac_cv_working_alloca_h=no
7623fi
7624rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7625fi
ba5da88a 7626echo "$as_me:7626: result: $ac_cv_working_alloca_h" >&5
503d2be0
AS
7627echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
7628if test $ac_cv_working_alloca_h = yes; then
7629
7630cat >>confdefs.h <<\EOF
ba4481b5
DL
7631#define HAVE_ALLOCA_H 1
7632EOF
7633
7634fi
7635
ba5da88a 7636echo "$as_me:7636: checking for alloca" >&5
503d2be0
AS
7637echo $ECHO_N "checking for alloca... $ECHO_C" >&6
7638if test "${ac_cv_func_alloca_works+set}" = set; then
7639 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7640else
503d2be0 7641 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 7642#line 7642 "configure"
ba4481b5 7643#include "confdefs.h"
ba4481b5
DL
7644#ifdef __GNUC__
7645# define alloca __builtin_alloca
7646#else
c4bb2108
DL
7647# ifdef _MSC_VER
7648# include <malloc.h>
7649# define alloca _alloca
ba4481b5 7650# else
c4bb2108
DL
7651# if HAVE_ALLOCA_H
7652# include <alloca.h>
22afa6e8 7653# else
c4bb2108
DL
7654# ifdef _AIX
7655 #pragma alloca
7656# else
7657# ifndef alloca /* predefined by HP cc +Olibcalls */
ba4481b5 7658char *alloca ();
c4bb2108 7659# endif
ba4481b5
DL
7660# endif
7661# endif
7662# endif
7663#endif
7664
503d2be0
AS
7665int
7666main ()
7667{
7668char *p = (char *) alloca (1);
7669 ;
7670 return 0;
7671}
7672_ACEOF
7673rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 7674if { (eval echo "$as_me:7674: \"$ac_link\"") >&5
503d2be0
AS
7675 (eval $ac_link) 2>&5
7676 ac_status=$?
ba5da88a 7677 echo "$as_me:7677: \$? = $ac_status" >&5
503d2be0
AS
7678 (exit $ac_status); } &&
7679 { ac_try='test -s conftest$ac_exeext'
ba5da88a 7680 { (eval echo "$as_me:7680: \"$ac_try\"") >&5
503d2be0
AS
7681 (eval $ac_try) 2>&5
7682 ac_status=$?
ba5da88a 7683 echo "$as_me:7683: \$? = $ac_status" >&5
503d2be0 7684 (exit $ac_status); }; }; then
ba4481b5
DL
7685 ac_cv_func_alloca_works=yes
7686else
503d2be0
AS
7687 echo "$as_me: failed program was:" >&5
7688cat conftest.$ac_ext >&5
7689ac_cv_func_alloca_works=no
ba4481b5 7690fi
503d2be0 7691rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 7692fi
ba5da88a 7693echo "$as_me:7693: result: $ac_cv_func_alloca_works" >&5
503d2be0 7694echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
ba4481b5 7695
ba4481b5 7696if test $ac_cv_func_alloca_works = yes; then
503d2be0
AS
7697
7698cat >>confdefs.h <<\EOF
ba4481b5
DL
7699#define HAVE_ALLOCA 1
7700EOF
7701
503d2be0 7702else
ba4481b5 7703 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
503d2be0
AS
7704# that cause trouble. Some versions do not even contain alloca or
7705# contain a buggy version. If you still want to use their alloca,
7706# use ar to extract alloca.o from them instead of compiling alloca.c.
7707
7708ALLOCA=alloca.$ac_objext
7709
7710cat >>confdefs.h <<\EOF
ba4481b5
DL
7711#define C_ALLOCA 1
7712EOF
7713
ba5da88a 7714echo "$as_me:7714: checking whether \`alloca.c' needs Cray hooks" >&5
503d2be0
AS
7715echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
7716if test "${ac_cv_os_cray+set}" = set; then
7717 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7718else
503d2be0 7719 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 7720#line 7720 "configure"
ba4481b5
DL
7721#include "confdefs.h"
7722#if defined(CRAY) && ! defined(CRAY2)
7723webecray
7724#else
7725wenotbecray
7726#endif
7727
503d2be0 7728_ACEOF
ba4481b5
DL
7729if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7730 egrep "webecray" >/dev/null 2>&1; then
ba4481b5
DL
7731 ac_cv_os_cray=yes
7732else
ba4481b5
DL
7733 ac_cv_os_cray=no
7734fi
7735rm -f conftest*
7736
7737fi
ba5da88a 7738echo "$as_me:7738: result: $ac_cv_os_cray" >&5
503d2be0 7739echo "${ECHO_T}$ac_cv_os_cray" >&6
ba4481b5 7740if test $ac_cv_os_cray = yes; then
503d2be0
AS
7741 for ac_func in _getb67 GETB67 getb67; do
7742 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ba5da88a 7743echo "$as_me:7743: checking for $ac_func" >&5
503d2be0
AS
7744echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7745if eval "test \"\${$as_ac_var+set}\" = set"; then
7746 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7747else
503d2be0 7748 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 7749#line 7749 "configure"
ba4481b5
DL
7750#include "confdefs.h"
7751/* System header to define __stub macros and hopefully few prototypes,
503d2be0 7752 which can conflict with char $ac_func (); below. */
ba4481b5
DL
7753#include <assert.h>
7754/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7755#ifdef __cplusplus
7756extern "C"
7757#endif
ba4481b5 7758/* We use char because int might match the return type of a gcc2
503d2be0
AS
7759 builtin and then its argument prototype would still apply. */
7760char $ac_func ();
7761char (*f) ();
ba4481b5 7762
503d2be0
AS
7763int
7764main ()
7765{
ba4481b5
DL
7766/* The GNU C library defines this for functions which it implements
7767 to always fail with ENOSYS. Some functions are actually named
7768 something starting with __ and the normal name is an alias. */
7769#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7770choke me
7771#else
503d2be0 7772f = $ac_func;
ba4481b5
DL
7773#endif
7774
503d2be0
AS
7775 ;
7776 return 0;
7777}
7778_ACEOF
7779rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 7780if { (eval echo "$as_me:7780: \"$ac_link\"") >&5
503d2be0
AS
7781 (eval $ac_link) 2>&5
7782 ac_status=$?
ba5da88a 7783 echo "$as_me:7783: \$? = $ac_status" >&5
503d2be0
AS
7784 (exit $ac_status); } &&
7785 { ac_try='test -s conftest$ac_exeext'
ba5da88a 7786 { (eval echo "$as_me:7786: \"$ac_try\"") >&5
503d2be0
AS
7787 (eval $ac_try) 2>&5
7788 ac_status=$?
ba5da88a 7789 echo "$as_me:7789: \$? = $ac_status" >&5
503d2be0
AS
7790 (exit $ac_status); }; }; then
7791 eval "$as_ac_var=yes"
7792else
7793 echo "$as_me: failed program was:" >&5
7794cat conftest.$ac_ext >&5
7795eval "$as_ac_var=no"
7796fi
7797rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7798fi
ba5da88a 7799echo "$as_me:7799: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
7800echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7801if test `eval echo '${'$as_ac_var'}'` = yes; then
7802
7803cat >>confdefs.h <<EOF
ba4481b5
DL
7804#define CRAY_STACKSEG_END $ac_func
7805EOF
7806
503d2be0 7807 break
ba4481b5
DL
7808fi
7809
503d2be0 7810 done
ba4481b5
DL
7811fi
7812
ba5da88a 7813echo "$as_me:7813: checking stack direction for C alloca" >&5
503d2be0
AS
7814echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
7815if test "${ac_cv_c_stack_direction+set}" = set; then
7816 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
7817else
7818 if test "$cross_compiling" = yes; then
7819 ac_cv_c_stack_direction=0
7820else
503d2be0 7821 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 7822#line 7822 "configure"
ba4481b5 7823#include "confdefs.h"
503d2be0 7824int
ba4481b5
DL
7825find_stack_direction ()
7826{
7827 static char *addr = 0;
7828 auto char dummy;
7829 if (addr == 0)
7830 {
7831 addr = &dummy;
7832 return find_stack_direction ();
7833 }
7834 else
7835 return (&dummy > addr) ? 1 : -1;
7836}
503d2be0
AS
7837
7838int
ba4481b5
DL
7839main ()
7840{
503d2be0 7841 exit (find_stack_direction () < 0);
ba4481b5 7842}
503d2be0
AS
7843_ACEOF
7844rm -f conftest$ac_exeext
ba5da88a 7845if { (eval echo "$as_me:7845: \"$ac_link\"") >&5
503d2be0
AS
7846 (eval $ac_link) 2>&5
7847 ac_status=$?
ba5da88a 7848 echo "$as_me:7848: \$? = $ac_status" >&5
503d2be0 7849 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ba5da88a 7850 { (eval echo "$as_me:7850: \"$ac_try\"") >&5
503d2be0
AS
7851 (eval $ac_try) 2>&5
7852 ac_status=$?
ba5da88a 7853 echo "$as_me:7853: \$? = $ac_status" >&5
503d2be0 7854 (exit $ac_status); }; }; then
ba4481b5
DL
7855 ac_cv_c_stack_direction=1
7856else
503d2be0
AS
7857 echo "$as_me: program exited with status $ac_status" >&5
7858echo "$as_me: failed program was:" >&5
7859cat conftest.$ac_ext >&5
7860ac_cv_c_stack_direction=-1
ba4481b5 7861fi
503d2be0 7862rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 7863fi
ba4481b5 7864fi
ba5da88a 7865echo "$as_me:7865: result: $ac_cv_c_stack_direction" >&5
503d2be0 7866echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
ba4481b5 7867
503d2be0 7868cat >>confdefs.h <<EOF
ba4481b5
DL
7869#define STACK_DIRECTION $ac_cv_c_stack_direction
7870EOF
7871
7872fi
7873
ba4481b5
DL
7874# fmod, logb, and frexp are found in -lm on most systems.
7875# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
503d2be0 7876
ba5da88a 7877echo "$as_me:7877: checking for sqrt in -lm" >&5
503d2be0
AS
7878echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
7879if test "${ac_cv_lib_m_sqrt+set}" = set; then
7880 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7881else
503d2be0 7882 ac_check_lib_save_LIBS=$LIBS
ba4481b5 7883LIBS="-lm $LIBS"
503d2be0 7884cat >conftest.$ac_ext <<_ACEOF
ba5da88a 7885#line 7885 "configure"
ba4481b5 7886#include "confdefs.h"
503d2be0 7887
ba4481b5 7888/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7889#ifdef __cplusplus
7890extern "C"
7891#endif
ba4481b5 7892/* We use char because int might match the return type of a gcc2
503d2be0
AS
7893 builtin and then its argument prototype would still apply. */
7894char sqrt ();
7895int
7896main ()
7897{
7898sqrt ();
7899 ;
7900 return 0;
7901}
7902_ACEOF
7903rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 7904if { (eval echo "$as_me:7904: \"$ac_link\"") >&5
503d2be0
AS
7905 (eval $ac_link) 2>&5
7906 ac_status=$?
ba5da88a 7907 echo "$as_me:7907: \$? = $ac_status" >&5
503d2be0
AS
7908 (exit $ac_status); } &&
7909 { ac_try='test -s conftest$ac_exeext'
ba5da88a 7910 { (eval echo "$as_me:7910: \"$ac_try\"") >&5
503d2be0
AS
7911 (eval $ac_try) 2>&5
7912 ac_status=$?
ba5da88a 7913 echo "$as_me:7913: \$? = $ac_status" >&5
503d2be0
AS
7914 (exit $ac_status); }; }; then
7915 ac_cv_lib_m_sqrt=yes
7916else
7917 echo "$as_me: failed program was:" >&5
7918cat conftest.$ac_ext >&5
7919ac_cv_lib_m_sqrt=no
7920fi
7921rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7922LIBS=$ac_check_lib_save_LIBS
7923fi
ba5da88a 7924echo "$as_me:7924: result: $ac_cv_lib_m_sqrt" >&5
503d2be0
AS
7925echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
7926if test $ac_cv_lib_m_sqrt = yes; then
7927 cat >>confdefs.h <<EOF
7928#define HAVE_LIBM 1
ba4481b5
DL
7929EOF
7930
7931 LIBS="-lm $LIBS"
7932
ba4481b5
DL
7933fi
7934
ba4481b5 7935# Check for mail-locking functions in a "mail" library
503d2be0 7936
ba5da88a 7937echo "$as_me:7937: checking for maillock in -lmail" >&5
503d2be0
AS
7938echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6
7939if test "${ac_cv_lib_mail_maillock+set}" = set; then
7940 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7941else
503d2be0 7942 ac_check_lib_save_LIBS=$LIBS
ba4481b5 7943LIBS="-lmail $LIBS"
503d2be0 7944cat >conftest.$ac_ext <<_ACEOF
ba5da88a 7945#line 7945 "configure"
ba4481b5 7946#include "confdefs.h"
503d2be0 7947
ba4481b5 7948/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7949#ifdef __cplusplus
7950extern "C"
7951#endif
ba4481b5 7952/* We use char because int might match the return type of a gcc2
503d2be0
AS
7953 builtin and then its argument prototype would still apply. */
7954char maillock ();
7955int
7956main ()
7957{
7958maillock ();
7959 ;
7960 return 0;
7961}
7962_ACEOF
7963rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 7964if { (eval echo "$as_me:7964: \"$ac_link\"") >&5
503d2be0
AS
7965 (eval $ac_link) 2>&5
7966 ac_status=$?
ba5da88a 7967 echo "$as_me:7967: \$? = $ac_status" >&5
503d2be0
AS
7968 (exit $ac_status); } &&
7969 { ac_try='test -s conftest$ac_exeext'
ba5da88a 7970 { (eval echo "$as_me:7970: \"$ac_try\"") >&5
503d2be0
AS
7971 (eval $ac_try) 2>&5
7972 ac_status=$?
ba5da88a 7973 echo "$as_me:7973: \$? = $ac_status" >&5
503d2be0
AS
7974 (exit $ac_status); }; }; then
7975 ac_cv_lib_mail_maillock=yes
7976else
7977 echo "$as_me: failed program was:" >&5
7978cat conftest.$ac_ext >&5
7979ac_cv_lib_mail_maillock=no
7980fi
7981rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7982LIBS=$ac_check_lib_save_LIBS
7983fi
ba5da88a 7984echo "$as_me:7984: result: $ac_cv_lib_mail_maillock" >&5
503d2be0
AS
7985echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6
7986if test $ac_cv_lib_mail_maillock = yes; then
7987 cat >>confdefs.h <<EOF
7988#define HAVE_LIBMAIL 1
ba4481b5
DL
7989EOF
7990
7991 LIBS="-lmail $LIBS"
7992
ba4481b5
DL
7993fi
7994
ba5da88a 7995echo "$as_me:7995: checking for maillock in -llockfile" >&5
503d2be0
AS
7996echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6
7997if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
7998 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7999else
503d2be0 8000 ac_check_lib_save_LIBS=$LIBS
ba4481b5 8001LIBS="-llockfile $LIBS"
503d2be0 8002cat >conftest.$ac_ext <<_ACEOF
ba5da88a 8003#line 8003 "configure"
ba4481b5 8004#include "confdefs.h"
503d2be0 8005
ba4481b5 8006/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8007#ifdef __cplusplus
8008extern "C"
8009#endif
ba4481b5 8010/* We use char because int might match the return type of a gcc2
503d2be0
AS
8011 builtin and then its argument prototype would still apply. */
8012char maillock ();
8013int
8014main ()
8015{
8016maillock ();
8017 ;
8018 return 0;
8019}
8020_ACEOF
8021rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 8022if { (eval echo "$as_me:8022: \"$ac_link\"") >&5
503d2be0
AS
8023 (eval $ac_link) 2>&5
8024 ac_status=$?
ba5da88a 8025 echo "$as_me:8025: \$? = $ac_status" >&5
503d2be0
AS
8026 (exit $ac_status); } &&
8027 { ac_try='test -s conftest$ac_exeext'
ba5da88a 8028 { (eval echo "$as_me:8028: \"$ac_try\"") >&5
503d2be0
AS
8029 (eval $ac_try) 2>&5
8030 ac_status=$?
ba5da88a 8031 echo "$as_me:8031: \$? = $ac_status" >&5
503d2be0
AS
8032 (exit $ac_status); }; }; then
8033 ac_cv_lib_lockfile_maillock=yes
8034else
8035 echo "$as_me: failed program was:" >&5
8036cat conftest.$ac_ext >&5
8037ac_cv_lib_lockfile_maillock=no
8038fi
8039rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8040LIBS=$ac_check_lib_save_LIBS
8041fi
ba5da88a 8042echo "$as_me:8042: result: $ac_cv_lib_lockfile_maillock" >&5
503d2be0
AS
8043echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6
8044if test $ac_cv_lib_lockfile_maillock = yes; then
8045 cat >>confdefs.h <<EOF
8046#define HAVE_LIBLOCKFILE 1
ba4481b5
DL
8047EOF
8048
8049 LIBS="-llockfile $LIBS"
8050
ba4481b5
DL
8051fi
8052
8053# If we have the shared liblockfile, assume we must use it for mail
8054# locking (e.g. Debian). If we couldn't link against liblockfile
8055# (no liblockfile.a installed), ensure that we don't need to.
8056if test "$ac_cv_lib_lockfile_maillock" = no; then
8057 # Extract the first word of "liblockfile.so", so it can be a program name with args.
8058set dummy liblockfile.so; ac_word=$2
ba5da88a 8059echo "$as_me:8059: checking for $ac_word" >&5
503d2be0
AS
8060echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8061if test "${ac_cv_prog_liblockfile+set}" = set; then
8062 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
8063else
8064 if test -n "$liblockfile"; then
8065 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
8066else
503d2be0
AS
8067 ac_save_IFS=$IFS; IFS=$ac_path_separator
8068ac_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
8069for ac_dir in $ac_dummy; do
8070 IFS=$ac_save_IFS
8071 test -z "$ac_dir" && ac_dir=.
8072 $as_executable_p "$ac_dir/$ac_word" || continue
8073ac_cv_prog_liblockfile="yes"
ba5da88a 8074echo "$as_me:8074: found $ac_dir/$ac_word" >&5
503d2be0
AS
8075break
8076done
8077
ba4481b5
DL
8078 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
8079fi
8080fi
503d2be0 8081liblockfile=$ac_cv_prog_liblockfile
ba4481b5 8082if test -n "$liblockfile"; then
ba5da88a 8083 echo "$as_me:8083: result: $liblockfile" >&5
503d2be0 8084echo "${ECHO_T}$liblockfile" >&6
ba4481b5 8085else
ba5da88a 8086 echo "$as_me:8086: result: no" >&5
503d2be0 8087echo "${ECHO_T}no" >&6
ba4481b5
DL
8088fi
8089
8090 if test $ac_cv_prog_liblockfile = yes; then
ba5da88a 8091 { { echo "$as_me:8091: error: Shared liblockfile found but can't link against it.
503d2be0
AS
8092This probably means that movemail could lose mail.
8093There may be a \`development' package to install containing liblockfile." >&5
8094echo "$as_me: error: Shared liblockfile found but can't link against it.
ba4481b5 8095This probably means that movemail could lose mail.
503d2be0
AS
8096There may be a \`development' package to install containing liblockfile." >&2;}
8097 { (exit 1); exit 1; }; }
8098 else cat >>confdefs.h <<\EOF
ba4481b5
DL
8099#define LIBMAIL -llockfile
8100EOF
8101
8102 fi
8103 else :
8104fi
503d2be0 8105
ba4481b5
DL
8106for ac_func in touchlock
8107do
503d2be0 8108as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ba5da88a 8109echo "$as_me:8109: checking for $ac_func" >&5
503d2be0
AS
8110echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8111if eval "test \"\${$as_ac_var+set}\" = set"; then
8112 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8113else
503d2be0 8114 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 8115#line 8115 "configure"
ba4481b5
DL
8116#include "confdefs.h"
8117/* System header to define __stub macros and hopefully few prototypes,
503d2be0 8118 which can conflict with char $ac_func (); below. */
ba4481b5
DL
8119#include <assert.h>
8120/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8121#ifdef __cplusplus
8122extern "C"
8123#endif
ba4481b5 8124/* We use char because int might match the return type of a gcc2
503d2be0
AS
8125 builtin and then its argument prototype would still apply. */
8126char $ac_func ();
8127char (*f) ();
ba4481b5 8128
503d2be0
AS
8129int
8130main ()
8131{
ba4481b5
DL
8132/* The GNU C library defines this for functions which it implements
8133 to always fail with ENOSYS. Some functions are actually named
8134 something starting with __ and the normal name is an alias. */
8135#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8136choke me
8137#else
503d2be0 8138f = $ac_func;
ba4481b5
DL
8139#endif
8140
503d2be0
AS
8141 ;
8142 return 0;
8143}
8144_ACEOF
8145rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 8146if { (eval echo "$as_me:8146: \"$ac_link\"") >&5
503d2be0
AS
8147 (eval $ac_link) 2>&5
8148 ac_status=$?
ba5da88a 8149 echo "$as_me:8149: \$? = $ac_status" >&5
503d2be0
AS
8150 (exit $ac_status); } &&
8151 { ac_try='test -s conftest$ac_exeext'
ba5da88a 8152 { (eval echo "$as_me:8152: \"$ac_try\"") >&5
503d2be0
AS
8153 (eval $ac_try) 2>&5
8154 ac_status=$?
ba5da88a 8155 echo "$as_me:8155: \$? = $ac_status" >&5
503d2be0
AS
8156 (exit $ac_status); }; }; then
8157 eval "$as_ac_var=yes"
8158else
8159 echo "$as_me: failed program was:" >&5
8160cat conftest.$ac_ext >&5
8161eval "$as_ac_var=no"
8162fi
8163rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8164fi
ba5da88a 8165echo "$as_me:8165: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
8166echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8167if test `eval echo '${'$as_ac_var'}'` = yes; then
8168 cat >>confdefs.h <<EOF
8169#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
ba4481b5 8170EOF
ba4481b5 8171
ba4481b5
DL
8172fi
8173done
8174
503d2be0 8175for ac_header in maillock.h
ba4481b5 8176do
503d2be0 8177as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ba5da88a 8178echo "$as_me:8178: checking for $ac_header" >&5
503d2be0
AS
8179echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8180if eval "test \"\${$as_ac_Header+set}\" = set"; then
8181 echo $ECHO_N "(cached) $ECHO_C" >&6
8182else
8183 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 8184#line 8184 "configure"
503d2be0
AS
8185#include "confdefs.h"
8186#include <$ac_header>
8187_ACEOF
ba5da88a 8188if { (eval echo "$as_me:8188: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
8189 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8190 ac_status=$?
8191 egrep -v '^ *\+' conftest.er1 >conftest.err
8192 rm -f conftest.er1
8193 cat conftest.err >&5
ba5da88a 8194 echo "$as_me:8194: \$? = $ac_status" >&5
503d2be0
AS
8195 (exit $ac_status); } >/dev/null; then
8196 if test -s conftest.err; then
8197 ac_cpp_err=$ac_c_preproc_warn_flag
8198 else
8199 ac_cpp_err=
8200 fi
8201else
8202 ac_cpp_err=yes
8203fi
8204if test -z "$ac_cpp_err"; then
8205 eval "$as_ac_Header=yes"
8206else
8207 echo "$as_me: failed program was:" >&5
ba4481b5 8208 cat conftest.$ac_ext >&5
503d2be0 8209 eval "$as_ac_Header=no"
ba4481b5 8210fi
503d2be0 8211rm -f conftest.err conftest.$ac_ext
ba4481b5 8212fi
ba5da88a 8213echo "$as_me:8213: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
8214echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8215if test `eval echo '${'$as_ac_Header'}'` = yes; then
8216 cat >>confdefs.h <<EOF
8217#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba4481b5 8218EOF
503d2be0 8219
ba4481b5
DL
8220fi
8221done
8222
48d4b120 8223for ac_func in gethostname getdomainname dup2 \
ba4481b5
DL
8224rename closedir mkdir rmdir sysinfo \
8225random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
8226strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
a3f08d9e 8227utimes setrlimit setpgid getcwd getwd shutdown strftime getaddrinfo \
03391420
DL
8228__fpending mblen mbrlen strsignal setitimer ualarm index rindex \
8229gai_strerror mkstemp
ba4481b5 8230do
503d2be0 8231as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ba5da88a 8232echo "$as_me:8232: checking for $ac_func" >&5
503d2be0
AS
8233echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8234if eval "test \"\${$as_ac_var+set}\" = set"; then
8235 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8236else
503d2be0 8237 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 8238#line 8238 "configure"
ba4481b5
DL
8239#include "confdefs.h"
8240/* System header to define __stub macros and hopefully few prototypes,
503d2be0 8241 which can conflict with char $ac_func (); below. */
ba4481b5
DL
8242#include <assert.h>
8243/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8244#ifdef __cplusplus
8245extern "C"
8246#endif
ba4481b5 8247/* We use char because int might match the return type of a gcc2
503d2be0
AS
8248 builtin and then its argument prototype would still apply. */
8249char $ac_func ();
8250char (*f) ();
ba4481b5 8251
503d2be0
AS
8252int
8253main ()
8254{
ba4481b5
DL
8255/* The GNU C library defines this for functions which it implements
8256 to always fail with ENOSYS. Some functions are actually named
8257 something starting with __ and the normal name is an alias. */
8258#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8259choke me
8260#else
503d2be0 8261f = $ac_func;
ba4481b5
DL
8262#endif
8263
503d2be0
AS
8264 ;
8265 return 0;
8266}
8267_ACEOF
8268rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 8269if { (eval echo "$as_me:8269: \"$ac_link\"") >&5
503d2be0
AS
8270 (eval $ac_link) 2>&5
8271 ac_status=$?
ba5da88a 8272 echo "$as_me:8272: \$? = $ac_status" >&5
503d2be0
AS
8273 (exit $ac_status); } &&
8274 { ac_try='test -s conftest$ac_exeext'
ba5da88a 8275 { (eval echo "$as_me:8275: \"$ac_try\"") >&5
503d2be0
AS
8276 (eval $ac_try) 2>&5
8277 ac_status=$?
ba5da88a 8278 echo "$as_me:8278: \$? = $ac_status" >&5
503d2be0
AS
8279 (exit $ac_status); }; }; then
8280 eval "$as_ac_var=yes"
8281else
8282 echo "$as_me: failed program was:" >&5
8283cat conftest.$ac_ext >&5
8284eval "$as_ac_var=no"
8285fi
8286rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8287fi
ba5da88a 8288echo "$as_me:8288: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
8289echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8290if test `eval echo '${'$as_ac_var'}'` = yes; then
8291 cat >>confdefs.h <<EOF
8292#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
ba4481b5 8293EOF
ba4481b5 8294
ba4481b5
DL
8295fi
8296done
8297
503d2be0 8298for ac_header in sys/time.h unistd.h
b5de8dc0 8299do
503d2be0 8300as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ba5da88a 8301echo "$as_me:8301: checking for $ac_header" >&5
503d2be0
AS
8302echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8303if eval "test \"\${$as_ac_Header+set}\" = set"; then
8304 echo $ECHO_N "(cached) $ECHO_C" >&6
8305else
8306 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 8307#line 8307 "configure"
503d2be0
AS
8308#include "confdefs.h"
8309#include <$ac_header>
8310_ACEOF
ba5da88a 8311if { (eval echo "$as_me:8311: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
8312 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8313 ac_status=$?
8314 egrep -v '^ *\+' conftest.er1 >conftest.err
8315 rm -f conftest.er1
8316 cat conftest.err >&5
ba5da88a 8317 echo "$as_me:8317: \$? = $ac_status" >&5
503d2be0
AS
8318 (exit $ac_status); } >/dev/null; then
8319 if test -s conftest.err; then
8320 ac_cpp_err=$ac_c_preproc_warn_flag
8321 else
8322 ac_cpp_err=
8323 fi
8324else
8325 ac_cpp_err=yes
8326fi
8327if test -z "$ac_cpp_err"; then
8328 eval "$as_ac_Header=yes"
8329else
8330 echo "$as_me: failed program was:" >&5
b5de8dc0 8331 cat conftest.$ac_ext >&5
503d2be0 8332 eval "$as_ac_Header=no"
b5de8dc0 8333fi
503d2be0 8334rm -f conftest.err conftest.$ac_ext
b5de8dc0 8335fi
ba5da88a 8336echo "$as_me:8336: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
8337echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8338if test `eval echo '${'$as_ac_Header'}'` = yes; then
8339 cat >>confdefs.h <<EOF
8340#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
b5de8dc0 8341EOF
503d2be0 8342
b5de8dc0
DL
8343fi
8344done
8345
8346for ac_func in alarm
8347do
503d2be0 8348as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ba5da88a 8349echo "$as_me:8349: checking for $ac_func" >&5
503d2be0
AS
8350echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8351if eval "test \"\${$as_ac_var+set}\" = set"; then
8352 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 8353else
503d2be0 8354 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 8355#line 8355 "configure"
b5de8dc0
DL
8356#include "confdefs.h"
8357/* System header to define __stub macros and hopefully few prototypes,
503d2be0 8358 which can conflict with char $ac_func (); below. */
b5de8dc0
DL
8359#include <assert.h>
8360/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8361#ifdef __cplusplus
8362extern "C"
8363#endif
b5de8dc0 8364/* We use char because int might match the return type of a gcc2
503d2be0
AS
8365 builtin and then its argument prototype would still apply. */
8366char $ac_func ();
8367char (*f) ();
b5de8dc0 8368
503d2be0
AS
8369int
8370main ()
8371{
b5de8dc0
DL
8372/* The GNU C library defines this for functions which it implements
8373 to always fail with ENOSYS. Some functions are actually named
8374 something starting with __ and the normal name is an alias. */
8375#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8376choke me
8377#else
503d2be0 8378f = $ac_func;
b5de8dc0
DL
8379#endif
8380
503d2be0
AS
8381 ;
8382 return 0;
8383}
8384_ACEOF
8385rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 8386if { (eval echo "$as_me:8386: \"$ac_link\"") >&5
503d2be0
AS
8387 (eval $ac_link) 2>&5
8388 ac_status=$?
ba5da88a 8389 echo "$as_me:8389: \$? = $ac_status" >&5
503d2be0
AS
8390 (exit $ac_status); } &&
8391 { ac_try='test -s conftest$ac_exeext'
ba5da88a 8392 { (eval echo "$as_me:8392: \"$ac_try\"") >&5
503d2be0
AS
8393 (eval $ac_try) 2>&5
8394 ac_status=$?
ba5da88a 8395 echo "$as_me:8395: \$? = $ac_status" >&5
503d2be0
AS
8396 (exit $ac_status); }; }; then
8397 eval "$as_ac_var=yes"
8398else
8399 echo "$as_me: failed program was:" >&5
8400cat conftest.$ac_ext >&5
8401eval "$as_ac_var=no"
8402fi
8403rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8404fi
ba5da88a 8405echo "$as_me:8405: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
8406echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8407if test `eval echo '${'$as_ac_var'}'` = yes; then
8408 cat >>confdefs.h <<EOF
8409#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
b5de8dc0 8410EOF
b5de8dc0 8411
b5de8dc0
DL
8412fi
8413done
8414
ba5da88a 8415echo "$as_me:8415: checking for working mktime" >&5
503d2be0
AS
8416echo $ECHO_N "checking for working mktime... $ECHO_C" >&6
8417if test "${ac_cv_func_working_mktime+set}" = set; then
8418 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0
DL
8419else
8420 if test "$cross_compiling" = yes; then
8421 ac_cv_func_working_mktime=no
8422else
503d2be0 8423 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 8424#line 8424 "configure"
b5de8dc0 8425#include "confdefs.h"
503d2be0 8426/* Test program from Paul Eggert and Tony Leneis. */
b5de8dc0
DL
8427#if TIME_WITH_SYS_TIME
8428# include <sys/time.h>
8429# include <time.h>
8430#else
8431# if HAVE_SYS_TIME_H
8432# include <sys/time.h>
8433# else
8434# include <time.h>
8435# endif
8436#endif
8437
8438#if HAVE_UNISTD_H
8439# include <unistd.h>
8440#endif
8441
8442#if !HAVE_ALARM
8443# define alarm(X) /* empty */
8444#endif
8445
8446/* Work around redefinition to rpl_putenv by other config tests. */
8447#undef putenv
8448
8449static time_t time_t_max;
8450
8451/* Values we'll use to set the TZ environment variable. */
8452static const char *const tz_strings[] = {
8453 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
8454 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
8455};
8456#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
8457
8458/* Fail if mktime fails to convert a date in the spring-forward gap.
8459 Based on a problem report from Andreas Jaeger. */
8460static void
8461spring_forward_gap ()
8462{
503d2be0 8463 /* glibc (up to about 1998-10-07) failed this test. */
b5de8dc0
DL
8464 struct tm tm;
8465
8466 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
8467 instead of "TZ=America/Vancouver" in order to detect the bug even
8468 on systems that don't support the Olson extension, or don't have the
8469 full zoneinfo tables installed. */
8470 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
8471
8472 tm.tm_year = 98;
8473 tm.tm_mon = 3;
8474 tm.tm_mday = 5;
8475 tm.tm_hour = 2;
8476 tm.tm_min = 0;
8477 tm.tm_sec = 0;
8478 tm.tm_isdst = -1;
8479 if (mktime (&tm) == (time_t)-1)
8480 exit (1);
8481}
8482
8483static void
8484mktime_test (now)
8485 time_t now;
8486{
8487 struct tm *lt;
8488 if ((lt = localtime (&now)) && mktime (lt) != now)
8489 exit (1);
8490 now = time_t_max - now;
8491 if ((lt = localtime (&now)) && mktime (lt) != now)
8492 exit (1);
8493}
8494
8495static void
8496irix_6_4_bug ()
8497{
8498 /* Based on code from Ariel Faigon. */
8499 struct tm tm;
8500 tm.tm_year = 96;
8501 tm.tm_mon = 3;
8502 tm.tm_mday = 0;
8503 tm.tm_hour = 0;
8504 tm.tm_min = 0;
8505 tm.tm_sec = 0;
8506 tm.tm_isdst = -1;
8507 mktime (&tm);
8508 if (tm.tm_mon != 2 || tm.tm_mday != 31)
8509 exit (1);
8510}
8511
8512static void
8513bigtime_test (j)
8514 int j;
8515{
8516 struct tm tm;
8517 time_t now;
8518 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
8519 now = mktime (&tm);
8520 if (now != (time_t) -1)
8521 {
8522 struct tm *lt = localtime (&now);
8523 if (! (lt
8524 && lt->tm_year == tm.tm_year
8525 && lt->tm_mon == tm.tm_mon
8526 && lt->tm_mday == tm.tm_mday
8527 && lt->tm_hour == tm.tm_hour
8528 && lt->tm_min == tm.tm_min
8529 && lt->tm_sec == tm.tm_sec
8530 && lt->tm_yday == tm.tm_yday
8531 && lt->tm_wday == tm.tm_wday
8532 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
8533 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
8534 exit (1);
8535 }
8536}
8537
8538int
8539main ()
8540{
8541 time_t t, delta;
8542 int i, j;
8543
8544 /* This test makes some buggy mktime implementations loop.
8545 Give up after 60 seconds; a mktime slower than that
8546 isn't worth using anyway. */
8547 alarm (60);
8548
8549 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
8550 continue;
8551 time_t_max--;
8552 delta = time_t_max / 997; /* a suitable prime number */
8553 for (i = 0; i < N_STRINGS; i++)
8554 {
8555 if (tz_strings[i])
8556 putenv (tz_strings[i]);
8557
8558 for (t = 0; t <= time_t_max - delta; t += delta)
8559 mktime_test (t);
8560 mktime_test ((time_t) 60 * 60);
8561 mktime_test ((time_t) 60 * 60 * 24);
8562
8563 for (j = 1; 0 < j; j *= 2)
8564 bigtime_test (j);
8565 bigtime_test (j - 1);
8566 }
8567 irix_6_4_bug ();
8568 spring_forward_gap ();
8569 exit (0);
8570}
503d2be0
AS
8571_ACEOF
8572rm -f conftest$ac_exeext
ba5da88a 8573if { (eval echo "$as_me:8573: \"$ac_link\"") >&5
503d2be0
AS
8574 (eval $ac_link) 2>&5
8575 ac_status=$?
ba5da88a 8576 echo "$as_me:8576: \$? = $ac_status" >&5
503d2be0 8577 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ba5da88a 8578 { (eval echo "$as_me:8578: \"$ac_try\"") >&5
503d2be0
AS
8579 (eval $ac_try) 2>&5
8580 ac_status=$?
ba5da88a 8581 echo "$as_me:8581: \$? = $ac_status" >&5
503d2be0 8582 (exit $ac_status); }; }; then
b5de8dc0
DL
8583 ac_cv_func_working_mktime=yes
8584else
503d2be0
AS
8585 echo "$as_me: program exited with status $ac_status" >&5
8586echo "$as_me: failed program was:" >&5
8587cat conftest.$ac_ext >&5
8588ac_cv_func_working_mktime=no
b5de8dc0 8589fi
503d2be0 8590rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
b5de8dc0 8591fi
b5de8dc0 8592fi
ba5da88a 8593echo "$as_me:8593: result: $ac_cv_func_working_mktime" >&5
503d2be0 8594echo "${ECHO_T}$ac_cv_func_working_mktime" >&6
b5de8dc0 8595if test $ac_cv_func_working_mktime = no; then
503d2be0 8596 LIBOBJS="$LIBOBJS mktime.$ac_objext"
b5de8dc0
DL
8597fi
8598
8599if test "$ac_cv_func_working_mktime" = no; then
503d2be0 8600 cat >>confdefs.h <<\EOF
b5de8dc0
DL
8601#define BROKEN_MKTIME 1
8602EOF
8603
8604fi
8605
4c343001
DL
8606ac_have_func=no # yes means we've found a way to get the load average.
8607
503d2be0
AS
8608ac_save_LIBS=$LIBS
8609
8610# Check for getloadavg, but be sure not to touch the cache variable.
ba5da88a 8611(echo "$as_me:8611: checking for getloadavg" >&5
503d2be0
AS
8612echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6
8613if test "${ac_cv_func_getloadavg+set}" = set; then
8614 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 8615else
503d2be0 8616 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 8617#line 8617 "configure"
4c343001 8618#include "confdefs.h"
503d2be0
AS
8619/* System header to define __stub macros and hopefully few prototypes,
8620 which can conflict with char getloadavg (); below. */
8621#include <assert.h>
4c343001 8622/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8623#ifdef __cplusplus
8624extern "C"
8625#endif
4c343001 8626/* We use char because int might match the return type of a gcc2
503d2be0
AS
8627 builtin and then its argument prototype would still apply. */
8628char getloadavg ();
8629char (*f) ();
4c343001 8630
503d2be0
AS
8631int
8632main ()
8633{
8634/* The GNU C library defines this for functions which it implements
8635 to always fail with ENOSYS. Some functions are actually named
8636 something starting with __ and the normal name is an alias. */
8637#if defined (__stub_getloadavg) || defined (__stub___getloadavg)
8638choke me
8639#else
8640f = getloadavg;
8641#endif
4c343001 8642
503d2be0
AS
8643 ;
8644 return 0;
8645}
8646_ACEOF
8647rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 8648if { (eval echo "$as_me:8648: \"$ac_link\"") >&5
503d2be0
AS
8649 (eval $ac_link) 2>&5
8650 ac_status=$?
ba5da88a 8651 echo "$as_me:8651: \$? = $ac_status" >&5
503d2be0
AS
8652 (exit $ac_status); } &&
8653 { ac_try='test -s conftest$ac_exeext'
ba5da88a 8654 { (eval echo "$as_me:8654: \"$ac_try\"") >&5
503d2be0
AS
8655 (eval $ac_try) 2>&5
8656 ac_status=$?
ba5da88a 8657 echo "$as_me:8657: \$? = $ac_status" >&5
503d2be0
AS
8658 (exit $ac_status); }; }; then
8659 ac_cv_func_getloadavg=yes
8660else
8661 echo "$as_me: failed program was:" >&5
8662cat conftest.$ac_ext >&5
8663ac_cv_func_getloadavg=no
8664fi
8665rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8666fi
ba5da88a 8667echo "$as_me:8667: result: $ac_cv_func_getloadavg" >&5
503d2be0
AS
8668echo "${ECHO_T}$ac_cv_func_getloadavg" >&6
8669if test $ac_cv_func_getloadavg = yes; then
8670 exit 0
4c343001 8671else
503d2be0 8672 exit 1
4c343001 8673fi
503d2be0 8674) && ac_have_func=yes
4c343001 8675
503d2be0
AS
8676# On HPUX9, an unprivileged user can get load averages through this function.
8677
8678for ac_func in pstat_getdynamic
8679do
8680as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ba5da88a 8681echo "$as_me:8681: checking for $ac_func" >&5
503d2be0
AS
8682echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8683if eval "test \"\${$as_ac_var+set}\" = set"; then
8684 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 8685else
503d2be0 8686 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 8687#line 8687 "configure"
4c343001 8688#include "confdefs.h"
503d2be0
AS
8689/* System header to define __stub macros and hopefully few prototypes,
8690 which can conflict with char $ac_func (); below. */
8691#include <assert.h>
4c343001 8692/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8693#ifdef __cplusplus
8694extern "C"
8695#endif
4c343001 8696/* We use char because int might match the return type of a gcc2
503d2be0
AS
8697 builtin and then its argument prototype would still apply. */
8698char $ac_func ();
8699char (*f) ();
8700
8701int
8702main ()
8703{
8704/* The GNU C library defines this for functions which it implements
8705 to always fail with ENOSYS. Some functions are actually named
8706 something starting with __ and the normal name is an alias. */
8707#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8708choke me
8709#else
8710f = $ac_func;
8711#endif
4c343001 8712
503d2be0
AS
8713 ;
8714 return 0;
8715}
8716_ACEOF
8717rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 8718if { (eval echo "$as_me:8718: \"$ac_link\"") >&5
503d2be0
AS
8719 (eval $ac_link) 2>&5
8720 ac_status=$?
ba5da88a 8721 echo "$as_me:8721: \$? = $ac_status" >&5
503d2be0
AS
8722 (exit $ac_status); } &&
8723 { ac_try='test -s conftest$ac_exeext'
ba5da88a 8724 { (eval echo "$as_me:8724: \"$ac_try\"") >&5
503d2be0
AS
8725 (eval $ac_try) 2>&5
8726 ac_status=$?
ba5da88a 8727 echo "$as_me:8727: \$? = $ac_status" >&5
503d2be0
AS
8728 (exit $ac_status); }; }; then
8729 eval "$as_ac_var=yes"
8730else
8731 echo "$as_me: failed program was:" >&5
8732cat conftest.$ac_ext >&5
8733eval "$as_ac_var=no"
8734fi
8735rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8736fi
ba5da88a 8737echo "$as_me:8737: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
8738echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8739if test `eval echo '${'$as_ac_var'}'` = yes; then
8740 cat >>confdefs.h <<EOF
8741#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4c343001 8742EOF
4c343001
DL
8743
8744fi
503d2be0
AS
8745done
8746
8747# Solaris has libkstat which does not require root.
4c343001 8748
ba5da88a 8749echo "$as_me:8749: checking for kstat_open in -lkstat" >&5
503d2be0
AS
8750echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
8751if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
8752 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 8753else
503d2be0
AS
8754 ac_check_lib_save_LIBS=$LIBS
8755LIBS="-lkstat $LIBS"
8756cat >conftest.$ac_ext <<_ACEOF
ba5da88a 8757#line 8757 "configure"
4c343001 8758#include "confdefs.h"
503d2be0 8759
4c343001 8760/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8761#ifdef __cplusplus
8762extern "C"
8763#endif
4c343001 8764/* We use char because int might match the return type of a gcc2
503d2be0
AS
8765 builtin and then its argument prototype would still apply. */
8766char kstat_open ();
8767int
8768main ()
8769{
8770kstat_open ();
8771 ;
8772 return 0;
8773}
8774_ACEOF
8775rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 8776if { (eval echo "$as_me:8776: \"$ac_link\"") >&5
503d2be0
AS
8777 (eval $ac_link) 2>&5
8778 ac_status=$?
ba5da88a 8779 echo "$as_me:8779: \$? = $ac_status" >&5
503d2be0
AS
8780 (exit $ac_status); } &&
8781 { ac_try='test -s conftest$ac_exeext'
ba5da88a 8782 { (eval echo "$as_me:8782: \"$ac_try\"") >&5
503d2be0
AS
8783 (eval $ac_try) 2>&5
8784 ac_status=$?
ba5da88a 8785 echo "$as_me:8785: \$? = $ac_status" >&5
503d2be0
AS
8786 (exit $ac_status); }; }; then
8787 ac_cv_lib_kstat_kstat_open=yes
4c343001 8788else
503d2be0
AS
8789 echo "$as_me: failed program was:" >&5
8790cat conftest.$ac_ext >&5
8791ac_cv_lib_kstat_kstat_open=no
4c343001 8792fi
503d2be0
AS
8793rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8794LIBS=$ac_check_lib_save_LIBS
4c343001 8795fi
ba5da88a 8796echo "$as_me:8796: result: $ac_cv_lib_kstat_kstat_open" >&5
503d2be0
AS
8797echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6
8798if test $ac_cv_lib_kstat_kstat_open = yes; then
8799 cat >>confdefs.h <<EOF
8800#define HAVE_LIBKSTAT 1
8801EOF
8802
8803 LIBS="-lkstat $LIBS"
8804
4c343001
DL
8805fi
8806
503d2be0 8807test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
4c343001 8808
503d2be0
AS
8809# Some systems with -lutil have (and need) -lkvm as well, some do not.
8810# On Solaris, -lkvm requires nlist from -lelf, so check that first
8811# to get the right answer into the cache.
8812# For kstat on solaris, we need libelf to force the definition of SVR4 below.
4c343001 8813if test $ac_have_func = no; then
ba5da88a 8814 echo "$as_me:8814: checking for elf_begin in -lelf" >&5
503d2be0
AS
8815echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
8816if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
8817 echo $ECHO_N "(cached) $ECHO_C" >&6
8818else
8819 ac_check_lib_save_LIBS=$LIBS
8820LIBS="-lelf $LIBS"
8821cat >conftest.$ac_ext <<_ACEOF
ba5da88a 8822#line 8822 "configure"
4c343001 8823#include "confdefs.h"
503d2be0 8824
4c343001 8825/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8826#ifdef __cplusplus
8827extern "C"
8828#endif
4c343001 8829/* We use char because int might match the return type of a gcc2
503d2be0
AS
8830 builtin and then its argument prototype would still apply. */
8831char elf_begin ();
8832int
8833main ()
8834{
8835elf_begin ();
8836 ;
8837 return 0;
8838}
8839_ACEOF
8840rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 8841if { (eval echo "$as_me:8841: \"$ac_link\"") >&5
503d2be0
AS
8842 (eval $ac_link) 2>&5
8843 ac_status=$?
ba5da88a 8844 echo "$as_me:8844: \$? = $ac_status" >&5
503d2be0
AS
8845 (exit $ac_status); } &&
8846 { ac_try='test -s conftest$ac_exeext'
ba5da88a 8847 { (eval echo "$as_me:8847: \"$ac_try\"") >&5
503d2be0
AS
8848 (eval $ac_try) 2>&5
8849 ac_status=$?
ba5da88a 8850 echo "$as_me:8850: \$? = $ac_status" >&5
503d2be0
AS
8851 (exit $ac_status); }; }; then
8852 ac_cv_lib_elf_elf_begin=yes
8853else
8854 echo "$as_me: failed program was:" >&5
8855cat conftest.$ac_ext >&5
8856ac_cv_lib_elf_elf_begin=no
8857fi
8858rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8859LIBS=$ac_check_lib_save_LIBS
8860fi
ba5da88a 8861echo "$as_me:8861: result: $ac_cv_lib_elf_elf_begin" >&5
503d2be0
AS
8862echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
8863if test $ac_cv_lib_elf_elf_begin = yes; then
8864 LIBS="-lelf $LIBS"
4c343001 8865fi
4c343001
DL
8866
8867fi
503d2be0 8868if test $ac_have_func = no; then
ba5da88a 8869 echo "$as_me:8869: checking for kvm_open in -lkvm" >&5
503d2be0
AS
8870echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6
8871if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
8872 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 8873else
503d2be0
AS
8874 ac_check_lib_save_LIBS=$LIBS
8875LIBS="-lkvm $LIBS"
8876cat >conftest.$ac_ext <<_ACEOF
ba5da88a 8877#line 8877 "configure"
503d2be0 8878#include "confdefs.h"
4c343001 8879
503d2be0
AS
8880/* Override any gcc2 internal prototype to avoid an error. */
8881#ifdef __cplusplus
8882extern "C"
8883#endif
8884/* We use char because int might match the return type of a gcc2
8885 builtin and then its argument prototype would still apply. */
8886char kvm_open ();
8887int
8888main ()
8889{
8890kvm_open ();
8891 ;
8892 return 0;
8893}
8894_ACEOF
8895rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 8896if { (eval echo "$as_me:8896: \"$ac_link\"") >&5
503d2be0
AS
8897 (eval $ac_link) 2>&5
8898 ac_status=$?
ba5da88a 8899 echo "$as_me:8899: \$? = $ac_status" >&5
503d2be0
AS
8900 (exit $ac_status); } &&
8901 { ac_try='test -s conftest$ac_exeext'
ba5da88a 8902 { (eval echo "$as_me:8902: \"$ac_try\"") >&5
503d2be0
AS
8903 (eval $ac_try) 2>&5
8904 ac_status=$?
ba5da88a 8905 echo "$as_me:8905: \$? = $ac_status" >&5
503d2be0
AS
8906 (exit $ac_status); }; }; then
8907 ac_cv_lib_kvm_kvm_open=yes
8908else
8909 echo "$as_me: failed program was:" >&5
8910cat conftest.$ac_ext >&5
8911ac_cv_lib_kvm_kvm_open=no
8912fi
8913rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8914LIBS=$ac_check_lib_save_LIBS
8915fi
ba5da88a 8916echo "$as_me:8916: result: $ac_cv_lib_kvm_kvm_open" >&5
503d2be0
AS
8917echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6
8918if test $ac_cv_lib_kvm_kvm_open = yes; then
8919 LIBS="-lkvm $LIBS"
4c343001
DL
8920fi
8921
503d2be0 8922 # Check for the 4.4BSD definition of getloadavg.
ba5da88a 8923 echo "$as_me:8923: checking for getloadavg in -lutil" >&5
503d2be0
AS
8924echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6
8925if test "${ac_cv_lib_util_getloadavg+set}" = set; then
8926 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 8927else
503d2be0
AS
8928 ac_check_lib_save_LIBS=$LIBS
8929LIBS="-lutil $LIBS"
8930cat >conftest.$ac_ext <<_ACEOF
ba5da88a 8931#line 8931 "configure"
4c343001 8932#include "confdefs.h"
503d2be0 8933
4c343001 8934/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8935#ifdef __cplusplus
8936extern "C"
8937#endif
8938/* We use char because int might match the return type of a gcc2
8939 builtin and then its argument prototype would still apply. */
8940char getloadavg ();
8941int
8942main ()
8943{
8944getloadavg ();
8945 ;
8946 return 0;
8947}
8948_ACEOF
8949rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 8950if { (eval echo "$as_me:8950: \"$ac_link\"") >&5
503d2be0
AS
8951 (eval $ac_link) 2>&5
8952 ac_status=$?
ba5da88a 8953 echo "$as_me:8953: \$? = $ac_status" >&5
503d2be0
AS
8954 (exit $ac_status); } &&
8955 { ac_try='test -s conftest$ac_exeext'
ba5da88a 8956 { (eval echo "$as_me:8956: \"$ac_try\"") >&5
503d2be0
AS
8957 (eval $ac_try) 2>&5
8958 ac_status=$?
ba5da88a 8959 echo "$as_me:8959: \$? = $ac_status" >&5
503d2be0
AS
8960 (exit $ac_status); }; }; then
8961 ac_cv_lib_util_getloadavg=yes
8962else
8963 echo "$as_me: failed program was:" >&5
8964cat conftest.$ac_ext >&5
8965ac_cv_lib_util_getloadavg=no
8966fi
8967rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8968LIBS=$ac_check_lib_save_LIBS
8969fi
ba5da88a 8970echo "$as_me:8970: result: $ac_cv_lib_util_getloadavg" >&5
503d2be0
AS
8971echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6
8972if test $ac_cv_lib_util_getloadavg = yes; then
8973 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
8974fi
8975
8976fi
8977
8978if test $ac_have_func = no; then
8979 # There is a commonly available library for RS/6000 AIX.
8980 # Since it is not a standard part of AIX, it might be installed locally.
8981 ac_getloadavg_LIBS=$LIBS
8982 LIBS="-L/usr/local/lib $LIBS"
ba5da88a 8983 echo "$as_me:8983: checking for getloadavg in -lgetloadavg" >&5
503d2be0
AS
8984echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6
8985if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
8986 echo $ECHO_N "(cached) $ECHO_C" >&6
8987else
8988 ac_check_lib_save_LIBS=$LIBS
8989LIBS="-lgetloadavg $LIBS"
8990cat >conftest.$ac_ext <<_ACEOF
ba5da88a 8991#line 8991 "configure"
503d2be0
AS
8992#include "confdefs.h"
8993
8994/* Override any gcc2 internal prototype to avoid an error. */
8995#ifdef __cplusplus
8996extern "C"
8997#endif
4c343001 8998/* We use char because int might match the return type of a gcc2
503d2be0
AS
8999 builtin and then its argument prototype would still apply. */
9000char getloadavg ();
9001int
9002main ()
9003{
9004getloadavg ();
9005 ;
9006 return 0;
9007}
9008_ACEOF
9009rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 9010if { (eval echo "$as_me:9010: \"$ac_link\"") >&5
503d2be0
AS
9011 (eval $ac_link) 2>&5
9012 ac_status=$?
ba5da88a 9013 echo "$as_me:9013: \$? = $ac_status" >&5
503d2be0
AS
9014 (exit $ac_status); } &&
9015 { ac_try='test -s conftest$ac_exeext'
ba5da88a 9016 { (eval echo "$as_me:9016: \"$ac_try\"") >&5
503d2be0
AS
9017 (eval $ac_try) 2>&5
9018 ac_status=$?
ba5da88a 9019 echo "$as_me:9019: \$? = $ac_status" >&5
503d2be0
AS
9020 (exit $ac_status); }; }; then
9021 ac_cv_lib_getloadavg_getloadavg=yes
9022else
9023 echo "$as_me: failed program was:" >&5
9024cat conftest.$ac_ext >&5
9025ac_cv_lib_getloadavg_getloadavg=no
9026fi
9027rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9028LIBS=$ac_check_lib_save_LIBS
9029fi
ba5da88a 9030echo "$as_me:9030: result: $ac_cv_lib_getloadavg_getloadavg" >&5
503d2be0
AS
9031echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6
9032if test $ac_cv_lib_getloadavg_getloadavg = yes; then
9033 LIBS="-lgetloadavg $LIBS"
9034else
9035 LIBS=$ac_getloadavg_LIBS
9036fi
9037
9038fi
9039
9040# Make sure it is really in the library, if we think we found it,
9041# otherwise set up the replacement function.
4c343001 9042
503d2be0
AS
9043for ac_func in getloadavg
9044do
9045as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ba5da88a 9046echo "$as_me:9046: checking for $ac_func" >&5
503d2be0
AS
9047echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9048if eval "test \"\${$as_ac_var+set}\" = set"; then
9049 echo $ECHO_N "(cached) $ECHO_C" >&6
9050else
9051 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 9052#line 9052 "configure"
503d2be0
AS
9053#include "confdefs.h"
9054/* System header to define __stub macros and hopefully few prototypes,
9055 which can conflict with char $ac_func (); below. */
9056#include <assert.h>
9057/* Override any gcc2 internal prototype to avoid an error. */
9058#ifdef __cplusplus
9059extern "C"
9060#endif
9061/* We use char because int might match the return type of a gcc2
9062 builtin and then its argument prototype would still apply. */
9063char $ac_func ();
9064char (*f) ();
4c343001 9065
503d2be0
AS
9066int
9067main ()
9068{
4c343001
DL
9069/* The GNU C library defines this for functions which it implements
9070 to always fail with ENOSYS. Some functions are actually named
9071 something starting with __ and the normal name is an alias. */
9072#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9073choke me
9074#else
503d2be0 9075f = $ac_func;
4c343001
DL
9076#endif
9077
503d2be0
AS
9078 ;
9079 return 0;
9080}
9081_ACEOF
9082rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 9083if { (eval echo "$as_me:9083: \"$ac_link\"") >&5
503d2be0
AS
9084 (eval $ac_link) 2>&5
9085 ac_status=$?
ba5da88a 9086 echo "$as_me:9086: \$? = $ac_status" >&5
503d2be0
AS
9087 (exit $ac_status); } &&
9088 { ac_try='test -s conftest$ac_exeext'
ba5da88a 9089 { (eval echo "$as_me:9089: \"$ac_try\"") >&5
503d2be0
AS
9090 (eval $ac_try) 2>&5
9091 ac_status=$?
ba5da88a 9092 echo "$as_me:9092: \$? = $ac_status" >&5
503d2be0
AS
9093 (exit $ac_status); }; }; then
9094 eval "$as_ac_var=yes"
4c343001 9095else
503d2be0
AS
9096 echo "$as_me: failed program was:" >&5
9097cat conftest.$ac_ext >&5
9098eval "$as_ac_var=no"
4c343001 9099fi
503d2be0 9100rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4c343001 9101fi
ba5da88a 9102echo "$as_me:9102: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
9103echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9104if test `eval echo '${'$as_ac_var'}'` = yes; then
9105 cat >>confdefs.h <<EOF
9106#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4c343001 9107EOF
4c343001 9108
503d2be0
AS
9109else
9110 LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
4c343001 9111
503d2be0
AS
9112cat >>confdefs.h <<\EOF
9113#define C_GETLOADAVG 1
4c343001
DL
9114EOF
9115
503d2be0
AS
9116# Figure out what our getloadavg.c needs.
9117ac_have_func=no
ba5da88a 9118echo "$as_me:9118: checking for sys/dg_sys_info.h" >&5
503d2be0
AS
9119echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
9120if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
9121 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9122else
503d2be0 9123 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 9124#line 9124 "configure"
4c343001
DL
9125#include "confdefs.h"
9126#include <sys/dg_sys_info.h>
503d2be0 9127_ACEOF
ba5da88a 9128if { (eval echo "$as_me:9128: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9129 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9130 ac_status=$?
9131 egrep -v '^ *\+' conftest.er1 >conftest.err
9132 rm -f conftest.er1
9133 cat conftest.err >&5
ba5da88a 9134 echo "$as_me:9134: \$? = $ac_status" >&5
503d2be0
AS
9135 (exit $ac_status); } >/dev/null; then
9136 if test -s conftest.err; then
9137 ac_cpp_err=$ac_c_preproc_warn_flag
9138 else
9139 ac_cpp_err=
9140 fi
9141else
9142 ac_cpp_err=yes
9143fi
9144if test -z "$ac_cpp_err"; then
9145 ac_cv_header_sys_dg_sys_info_h=yes
4c343001 9146else
503d2be0 9147 echo "$as_me: failed program was:" >&5
4c343001 9148 cat conftest.$ac_ext >&5
503d2be0 9149 ac_cv_header_sys_dg_sys_info_h=no
4c343001 9150fi
503d2be0 9151rm -f conftest.err conftest.$ac_ext
4c343001 9152fi
ba5da88a 9153echo "$as_me:9153: result: $ac_cv_header_sys_dg_sys_info_h" >&5
503d2be0
AS
9154echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
9155if test $ac_cv_header_sys_dg_sys_info_h = yes; then
9156 ac_have_func=yes
9157
9158cat >>confdefs.h <<\EOF
4c343001
DL
9159#define DGUX 1
9160EOF
9161
ba5da88a 9162echo "$as_me:9162: checking for dg_sys_info in -ldgc" >&5
503d2be0
AS
9163echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6
9164if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
9165 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9166else
503d2be0 9167 ac_check_lib_save_LIBS=$LIBS
4c343001 9168LIBS="-ldgc $LIBS"
503d2be0 9169cat >conftest.$ac_ext <<_ACEOF
ba5da88a 9170#line 9170 "configure"
4c343001 9171#include "confdefs.h"
503d2be0 9172
4c343001 9173/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9174#ifdef __cplusplus
9175extern "C"
9176#endif
4c343001 9177/* We use char because int might match the return type of a gcc2
503d2be0
AS
9178 builtin and then its argument prototype would still apply. */
9179char dg_sys_info ();
9180int
9181main ()
9182{
9183dg_sys_info ();
9184 ;
9185 return 0;
9186}
9187_ACEOF
9188rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 9189if { (eval echo "$as_me:9189: \"$ac_link\"") >&5
503d2be0
AS
9190 (eval $ac_link) 2>&5
9191 ac_status=$?
ba5da88a 9192 echo "$as_me:9192: \$? = $ac_status" >&5
503d2be0
AS
9193 (exit $ac_status); } &&
9194 { ac_try='test -s conftest$ac_exeext'
ba5da88a 9195 { (eval echo "$as_me:9195: \"$ac_try\"") >&5
503d2be0
AS
9196 (eval $ac_try) 2>&5
9197 ac_status=$?
ba5da88a 9198 echo "$as_me:9198: \$? = $ac_status" >&5
503d2be0
AS
9199 (exit $ac_status); }; }; then
9200 ac_cv_lib_dgc_dg_sys_info=yes
9201else
9202 echo "$as_me: failed program was:" >&5
9203cat conftest.$ac_ext >&5
9204ac_cv_lib_dgc_dg_sys_info=no
9205fi
9206rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9207LIBS=$ac_check_lib_save_LIBS
9208fi
ba5da88a 9209echo "$as_me:9209: result: $ac_cv_lib_dgc_dg_sys_info" >&5
503d2be0
AS
9210echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6
9211if test $ac_cv_lib_dgc_dg_sys_info = yes; then
9212 cat >>confdefs.h <<EOF
9213#define HAVE_LIBDGC 1
4c343001 9214EOF
503d2be0
AS
9215
9216 LIBS="-ldgc $LIBS"
4c343001
DL
9217
9218fi
4c343001 9219
503d2be0 9220fi
4c343001 9221
ba5da88a 9222echo "$as_me:9222: checking for locale.h" >&5
503d2be0
AS
9223echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
9224if test "${ac_cv_header_locale_h+set}" = set; then
9225 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9226else
503d2be0 9227 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 9228#line 9228 "configure"
503d2be0
AS
9229#include "confdefs.h"
9230#include <locale.h>
9231_ACEOF
ba5da88a 9232if { (eval echo "$as_me:9232: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9233 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9234 ac_status=$?
9235 egrep -v '^ *\+' conftest.er1 >conftest.err
9236 rm -f conftest.er1
9237 cat conftest.err >&5
ba5da88a 9238 echo "$as_me:9238: \$? = $ac_status" >&5
503d2be0
AS
9239 (exit $ac_status); } >/dev/null; then
9240 if test -s conftest.err; then
9241 ac_cpp_err=$ac_c_preproc_warn_flag
9242 else
9243 ac_cpp_err=
9244 fi
9245else
9246 ac_cpp_err=yes
4c343001 9247fi
503d2be0
AS
9248if test -z "$ac_cpp_err"; then
9249 ac_cv_header_locale_h=yes
9250else
9251 echo "$as_me: failed program was:" >&5
9252 cat conftest.$ac_ext >&5
9253 ac_cv_header_locale_h=no
9254fi
9255rm -f conftest.err conftest.$ac_ext
9256fi
ba5da88a 9257echo "$as_me:9257: result: $ac_cv_header_locale_h" >&5
503d2be0 9258echo "${ECHO_T}$ac_cv_header_locale_h" >&6
4c343001 9259
503d2be0
AS
9260for ac_func in setlocale
9261do
9262as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ba5da88a 9263echo "$as_me:9263: checking for $ac_func" >&5
503d2be0
AS
9264echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9265if eval "test \"\${$as_ac_var+set}\" = set"; then
9266 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9267else
503d2be0 9268 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 9269#line 9269 "configure"
503d2be0
AS
9270#include "confdefs.h"
9271/* System header to define __stub macros and hopefully few prototypes,
9272 which can conflict with char $ac_func (); below. */
9273#include <assert.h>
9274/* Override any gcc2 internal prototype to avoid an error. */
9275#ifdef __cplusplus
9276extern "C"
9277#endif
9278/* We use char because int might match the return type of a gcc2
9279 builtin and then its argument prototype would still apply. */
9280char $ac_func ();
9281char (*f) ();
9282
9283int
9284main ()
9285{
9286/* The GNU C library defines this for functions which it implements
9287 to always fail with ENOSYS. Some functions are actually named
9288 something starting with __ and the normal name is an alias. */
9289#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9290choke me
9291#else
9292f = $ac_func;
9293#endif
9294
9295 ;
9296 return 0;
9297}
9298_ACEOF
9299rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 9300if { (eval echo "$as_me:9300: \"$ac_link\"") >&5
503d2be0
AS
9301 (eval $ac_link) 2>&5
9302 ac_status=$?
ba5da88a 9303 echo "$as_me:9303: \$? = $ac_status" >&5
503d2be0
AS
9304 (exit $ac_status); } &&
9305 { ac_try='test -s conftest$ac_exeext'
ba5da88a 9306 { (eval echo "$as_me:9306: \"$ac_try\"") >&5
503d2be0
AS
9307 (eval $ac_try) 2>&5
9308 ac_status=$?
ba5da88a 9309 echo "$as_me:9309: \$? = $ac_status" >&5
503d2be0
AS
9310 (exit $ac_status); }; }; then
9311 eval "$as_ac_var=yes"
9312else
9313 echo "$as_me: failed program was:" >&5
9314cat conftest.$ac_ext >&5
9315eval "$as_ac_var=no"
9316fi
9317rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9318fi
ba5da88a 9319echo "$as_me:9319: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
9320echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9321if test `eval echo '${'$as_ac_var'}'` = yes; then
9322 cat >>confdefs.h <<EOF
9323#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9324EOF
9325
4c343001 9326fi
503d2be0 9327done
4c343001 9328
503d2be0
AS
9329# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
9330# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
9331# Irix 4.0.5F has the header but not the library.
9332if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
9333 ac_have_func=yes
4c343001 9334
503d2be0 9335cat >>confdefs.h <<\EOF
4c343001
DL
9336#define SVR4 1
9337EOF
9338
503d2be0 9339fi
4c343001 9340
503d2be0 9341if test $ac_have_func = no; then
ba5da88a 9342 echo "$as_me:9342: checking for inq_stats/cpustats.h" >&5
503d2be0
AS
9343echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
9344if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
9345 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9346else
503d2be0 9347 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 9348#line 9348 "configure"
4c343001
DL
9349#include "confdefs.h"
9350#include <inq_stats/cpustats.h>
503d2be0 9351_ACEOF
ba5da88a 9352if { (eval echo "$as_me:9352: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9353 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9354 ac_status=$?
9355 egrep -v '^ *\+' conftest.er1 >conftest.err
9356 rm -f conftest.er1
9357 cat conftest.err >&5
ba5da88a 9358 echo "$as_me:9358: \$? = $ac_status" >&5
503d2be0
AS
9359 (exit $ac_status); } >/dev/null; then
9360 if test -s conftest.err; then
9361 ac_cpp_err=$ac_c_preproc_warn_flag
9362 else
9363 ac_cpp_err=
9364 fi
9365else
9366 ac_cpp_err=yes
9367fi
9368if test -z "$ac_cpp_err"; then
9369 ac_cv_header_inq_stats_cpustats_h=yes
4c343001 9370else
503d2be0 9371 echo "$as_me: failed program was:" >&5
4c343001 9372 cat conftest.$ac_ext >&5
503d2be0 9373 ac_cv_header_inq_stats_cpustats_h=no
4c343001 9374fi
503d2be0 9375rm -f conftest.err conftest.$ac_ext
4c343001 9376fi
ba5da88a 9377echo "$as_me:9377: result: $ac_cv_header_inq_stats_cpustats_h" >&5
503d2be0
AS
9378echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
9379if test $ac_cv_header_inq_stats_cpustats_h = yes; then
9380 ac_have_func=yes
9381
9382cat >>confdefs.h <<\EOF
4c343001
DL
9383#define UMAX 1
9384EOF
9385
503d2be0 9386cat >>confdefs.h <<\EOF
4c343001
DL
9387#define UMAX4_3 1
9388EOF
9389
4c343001
DL
9390fi
9391
503d2be0 9392fi
4c343001 9393
503d2be0 9394if test $ac_have_func = no; then
ba5da88a 9395 echo "$as_me:9395: checking for sys/cpustats.h" >&5
503d2be0
AS
9396echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
9397if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
9398 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9399else
503d2be0 9400 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 9401#line 9401 "configure"
4c343001
DL
9402#include "confdefs.h"
9403#include <sys/cpustats.h>
503d2be0 9404_ACEOF
ba5da88a 9405if { (eval echo "$as_me:9405: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9406 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9407 ac_status=$?
9408 egrep -v '^ *\+' conftest.er1 >conftest.err
9409 rm -f conftest.er1
9410 cat conftest.err >&5
ba5da88a 9411 echo "$as_me:9411: \$? = $ac_status" >&5
503d2be0
AS
9412 (exit $ac_status); } >/dev/null; then
9413 if test -s conftest.err; then
9414 ac_cpp_err=$ac_c_preproc_warn_flag
9415 else
9416 ac_cpp_err=
9417 fi
4c343001 9418else
503d2be0
AS
9419 ac_cpp_err=yes
9420fi
9421if test -z "$ac_cpp_err"; then
9422 ac_cv_header_sys_cpustats_h=yes
9423else
9424 echo "$as_me: failed program was:" >&5
4c343001 9425 cat conftest.$ac_ext >&5
503d2be0 9426 ac_cv_header_sys_cpustats_h=no
4c343001 9427fi
503d2be0 9428rm -f conftest.err conftest.$ac_ext
4c343001 9429fi
ba5da88a 9430echo "$as_me:9430: result: $ac_cv_header_sys_cpustats_h" >&5
503d2be0
AS
9431echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
9432if test $ac_cv_header_sys_cpustats_h = yes; then
9433 ac_have_func=yes; cat >>confdefs.h <<\EOF
4c343001
DL
9434#define UMAX 1
9435EOF
9436
4c343001
DL
9437fi
9438
503d2be0 9439fi
4c343001 9440
503d2be0
AS
9441if test $ac_have_func = no; then
9442
9443for ac_header in mach/mach.h
4c343001 9444do
503d2be0 9445as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ba5da88a 9446echo "$as_me:9446: checking for $ac_header" >&5
503d2be0
AS
9447echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9448if eval "test \"\${$as_ac_Header+set}\" = set"; then
9449 echo $ECHO_N "(cached) $ECHO_C" >&6
9450else
9451 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 9452#line 9452 "configure"
503d2be0
AS
9453#include "confdefs.h"
9454#include <$ac_header>
9455_ACEOF
ba5da88a 9456if { (eval echo "$as_me:9456: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9457 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9458 ac_status=$?
9459 egrep -v '^ *\+' conftest.er1 >conftest.err
9460 rm -f conftest.er1
9461 cat conftest.err >&5
ba5da88a 9462 echo "$as_me:9462: \$? = $ac_status" >&5
503d2be0
AS
9463 (exit $ac_status); } >/dev/null; then
9464 if test -s conftest.err; then
9465 ac_cpp_err=$ac_c_preproc_warn_flag
9466 else
9467 ac_cpp_err=
9468 fi
9469else
9470 ac_cpp_err=yes
9471fi
9472if test -z "$ac_cpp_err"; then
9473 eval "$as_ac_Header=yes"
9474else
9475 echo "$as_me: failed program was:" >&5
4c343001 9476 cat conftest.$ac_ext >&5
503d2be0 9477 eval "$as_ac_Header=no"
4c343001 9478fi
503d2be0 9479rm -f conftest.err conftest.$ac_ext
4c343001 9480fi
ba5da88a 9481echo "$as_me:9481: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
9482echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9483if test `eval echo '${'$as_ac_Header'}'` = yes; then
9484 cat >>confdefs.h <<EOF
9485#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4c343001 9486EOF
503d2be0 9487
4c343001
DL
9488fi
9489done
9490
503d2be0 9491fi
4c343001 9492
503d2be0
AS
9493for ac_header in nlist.h
9494do
9495as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ba5da88a 9496echo "$as_me:9496: checking for $ac_header" >&5
503d2be0
AS
9497echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9498if eval "test \"\${$as_ac_Header+set}\" = set"; then
9499 echo $ECHO_N "(cached) $ECHO_C" >&6
9500else
9501 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 9502#line 9502 "configure"
503d2be0
AS
9503#include "confdefs.h"
9504#include <$ac_header>
9505_ACEOF
ba5da88a 9506if { (eval echo "$as_me:9506: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9507 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9508 ac_status=$?
9509 egrep -v '^ *\+' conftest.er1 >conftest.err
9510 rm -f conftest.er1
9511 cat conftest.err >&5
ba5da88a 9512 echo "$as_me:9512: \$? = $ac_status" >&5
503d2be0
AS
9513 (exit $ac_status); } >/dev/null; then
9514 if test -s conftest.err; then
9515 ac_cpp_err=$ac_c_preproc_warn_flag
9516 else
9517 ac_cpp_err=
9518 fi
4c343001 9519else
503d2be0
AS
9520 ac_cpp_err=yes
9521fi
9522if test -z "$ac_cpp_err"; then
9523 eval "$as_ac_Header=yes"
4c343001 9524else
503d2be0 9525 echo "$as_me: failed program was:" >&5
4c343001 9526 cat conftest.$ac_ext >&5
503d2be0 9527 eval "$as_ac_Header=no"
4c343001 9528fi
503d2be0 9529rm -f conftest.err conftest.$ac_ext
4c343001 9530fi
ba5da88a 9531echo "$as_me:9531: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
9532echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9533if test `eval echo '${'$as_ac_Header'}'` = yes; then
9534 cat >>confdefs.h <<EOF
9535#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4c343001 9536EOF
ba5da88a 9537 echo "$as_me:9537: checking for struct nlist.n_un.n_name" >&5
503d2be0
AS
9538echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6
9539if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
9540 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9541else
503d2be0 9542 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 9543#line 9543 "configure"
4c343001
DL
9544#include "confdefs.h"
9545#include <nlist.h>
4c343001 9546
503d2be0
AS
9547int
9548main ()
9549{
9550static struct nlist ac_aggr;
9551if (ac_aggr.n_un.n_name)
9552return 0;
9553 ;
9554 return 0;
9555}
9556_ACEOF
9557rm -f conftest.$ac_objext
ba5da88a 9558if { (eval echo "$as_me:9558: \"$ac_compile\"") >&5
503d2be0
AS
9559 (eval $ac_compile) 2>&5
9560 ac_status=$?
ba5da88a 9561 echo "$as_me:9561: \$? = $ac_status" >&5
503d2be0
AS
9562 (exit $ac_status); } &&
9563 { ac_try='test -s conftest.$ac_objext'
ba5da88a 9564 { (eval echo "$as_me:9564: \"$ac_try\"") >&5
503d2be0
AS
9565 (eval $ac_try) 2>&5
9566 ac_status=$?
ba5da88a 9567 echo "$as_me:9567: \$? = $ac_status" >&5
503d2be0
AS
9568 (exit $ac_status); }; }; then
9569 ac_cv_member_struct_nlist_n_un_n_name=yes
9570else
9571 echo "$as_me: failed program was:" >&5
9572cat conftest.$ac_ext >&5
9573ac_cv_member_struct_nlist_n_un_n_name=no
9574fi
9575rm -f conftest.$ac_objext conftest.$ac_ext
9576fi
ba5da88a 9577echo "$as_me:9577: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
503d2be0
AS
9578echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6
9579if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
9580
9581cat >>confdefs.h <<EOF
9582#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
9583EOF
9584
9585cat >>confdefs.h <<\EOF
4c343001
DL
9586#define NLIST_NAME_UNION 1
9587EOF
9588
4c343001 9589fi
503d2be0
AS
9590
9591fi
9592done
9593
9594fi
9595done
4c343001
DL
9596
9597# Some definitions of getloadavg require that the program be installed setgid.
ba5da88a 9598echo "$as_me:9598: checking whether getloadavg requires setgid" >&5
503d2be0
AS
9599echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6
9600if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
9601 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9602else
503d2be0 9603 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 9604#line 9604 "configure"
4c343001
DL
9605#include "confdefs.h"
9606#include "$srcdir/getloadavg.c"
9607#ifdef LDAV_PRIVILEGED
9608Yowza Am I SETGID yet
9609#endif
503d2be0 9610_ACEOF
4c343001
DL
9611if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9612 egrep "Yowza Am I SETGID yet" >/dev/null 2>&1; then
4c343001
DL
9613 ac_cv_func_getloadavg_setgid=yes
9614else
4c343001
DL
9615 ac_cv_func_getloadavg_setgid=no
9616fi
9617rm -f conftest*
9618
9619fi
ba5da88a 9620echo "$as_me:9620: result: $ac_cv_func_getloadavg_setgid" >&5
503d2be0 9621echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6
4c343001 9622if test $ac_cv_func_getloadavg_setgid = yes; then
503d2be0
AS
9623 NEED_SETGID=true
9624
9625cat >>confdefs.h <<\EOF
4c343001
DL
9626#define GETLOADAVG_PRIVILEGED 1
9627EOF
9628
9629else
9630 NEED_SETGID=false
9631fi
9632
9633if test $ac_cv_func_getloadavg_setgid = yes; then
ba5da88a 9634 echo "$as_me:9634: checking group of /dev/kmem" >&5
503d2be0
AS
9635echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6
9636if test "${ac_cv_group_kmem+set}" = set; then
9637 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9638else
503d2be0 9639 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
4c343001
DL
9640 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
9641 # If we got an error (system does not support symlinks), try without -L.
9642 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
9643 ac_cv_group_kmem=`echo $ac_ls_output \
9644 | sed -ne 's/[ ][ ]*/ /g;
9645 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
9646 / /s/.* //;p;'`
9647
9648fi
ba5da88a 9649echo "$as_me:9649: result: $ac_cv_group_kmem" >&5
503d2be0 9650echo "${ECHO_T}$ac_cv_group_kmem" >&6
4c343001
DL
9651 KMEM_GROUP=$ac_cv_group_kmem
9652fi
503d2be0
AS
9653if test "x$ac_save_LIBS" = x; then
9654 GETLOADAVG_LIBS=$LIBS
9655else
9656 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
9657fi
9658LIBS=$ac_save_LIBS
4c343001 9659
ba5da88a 9660echo "$as_me:9660: checking for _LARGEFILE_SOURCE value needed for large files" >&5
503d2be0
AS
9661echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9662if test "${ac_cv_sys_largefile_source+set}" = set; then
9663 echo $ECHO_N "(cached) $ECHO_C" >&6
d42122a3 9664else
503d2be0 9665 while :; do
169fe44e 9666 ac_cv_sys_largefile_source=no
503d2be0 9667 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 9668#line 9668 "configure"
169fe44e
GM
9669#include "confdefs.h"
9670#include <stdio.h>
503d2be0
AS
9671int
9672main ()
9673{
169fe44e 9674return !fseeko;
503d2be0
AS
9675 ;
9676 return 0;
9677}
9678_ACEOF
9679rm -f conftest.$ac_objext
ba5da88a 9680if { (eval echo "$as_me:9680: \"$ac_compile\"") >&5
503d2be0
AS
9681 (eval $ac_compile) 2>&5
9682 ac_status=$?
ba5da88a 9683 echo "$as_me:9683: \$? = $ac_status" >&5
503d2be0
AS
9684 (exit $ac_status); } &&
9685 { ac_try='test -s conftest.$ac_objext'
ba5da88a 9686 { (eval echo "$as_me:9686: \"$ac_try\"") >&5
503d2be0
AS
9687 (eval $ac_try) 2>&5
9688 ac_status=$?
ba5da88a 9689 echo "$as_me:9689: \$? = $ac_status" >&5
503d2be0
AS
9690 (exit $ac_status); }; }; then
9691 break
169fe44e 9692else
503d2be0
AS
9693 echo "$as_me: failed program was:" >&5
9694cat conftest.$ac_ext >&5
9695fi
9696rm -f conftest.$ac_objext conftest.$ac_ext
9697 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 9698#line 9698 "configure"
d42122a3 9699#include "confdefs.h"
169fe44e
GM
9700#define _LARGEFILE_SOURCE 1
9701#include <stdio.h>
503d2be0
AS
9702int
9703main ()
9704{
169fe44e 9705return !fseeko;
503d2be0
AS
9706 ;
9707 return 0;
9708}
9709_ACEOF
9710rm -f conftest.$ac_objext
ba5da88a 9711if { (eval echo "$as_me:9711: \"$ac_compile\"") >&5
503d2be0
AS
9712 (eval $ac_compile) 2>&5
9713 ac_status=$?
ba5da88a 9714 echo "$as_me:9714: \$? = $ac_status" >&5
503d2be0
AS
9715 (exit $ac_status); } &&
9716 { ac_try='test -s conftest.$ac_objext'
ba5da88a 9717 { (eval echo "$as_me:9717: \"$ac_try\"") >&5
503d2be0
AS
9718 (eval $ac_try) 2>&5
9719 ac_status=$?
ba5da88a 9720 echo "$as_me:9720: \$? = $ac_status" >&5
503d2be0
AS
9721 (exit $ac_status); }; }; then
9722 ac_cv_sys_largefile_source=1; break
9723else
9724 echo "$as_me: failed program was:" >&5
9725cat conftest.$ac_ext >&5
9726fi
9727rm -f conftest.$ac_objext conftest.$ac_ext
9728 break
9729done
d42122a3 9730fi
ba5da88a 9731echo "$as_me:9731: result: $ac_cv_sys_largefile_source" >&5
503d2be0
AS
9732echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9733if test "$ac_cv_sys_largefile_source" != no; then
d42122a3 9734
503d2be0 9735cat >>confdefs.h <<EOF
169fe44e 9736#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
d42122a3 9737EOF
169fe44e 9738
503d2be0
AS
9739fi
9740rm -f conftest*
169fe44e 9741
503d2be0
AS
9742# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9743# in glibc 2.1.3, but that breaks too many other things.
9744# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
ba5da88a 9745echo "$as_me:9745: checking for fseeko" >&5
503d2be0
AS
9746echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9747if test "${ac_cv_func_fseeko+set}" = set; then
9748 echo $ECHO_N "(cached) $ECHO_C" >&6
d42122a3 9749else
503d2be0 9750 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 9751#line 9751 "configure"
169fe44e
GM
9752#include "confdefs.h"
9753#include <stdio.h>
503d2be0
AS
9754int
9755main ()
9756{
169fe44e 9757return fseeko && fseeko (stdin, 0, 0);
503d2be0
AS
9758 ;
9759 return 0;
9760}
9761_ACEOF
9762rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 9763if { (eval echo "$as_me:9763: \"$ac_link\"") >&5
503d2be0
AS
9764 (eval $ac_link) 2>&5
9765 ac_status=$?
ba5da88a 9766 echo "$as_me:9766: \$? = $ac_status" >&5
503d2be0
AS
9767 (exit $ac_status); } &&
9768 { ac_try='test -s conftest$ac_exeext'
ba5da88a 9769 { (eval echo "$as_me:9769: \"$ac_try\"") >&5
503d2be0
AS
9770 (eval $ac_try) 2>&5
9771 ac_status=$?
ba5da88a 9772 echo "$as_me:9772: \$? = $ac_status" >&5
503d2be0 9773 (exit $ac_status); }; }; then
169fe44e
GM
9774 ac_cv_func_fseeko=yes
9775else
503d2be0
AS
9776 echo "$as_me: failed program was:" >&5
9777cat conftest.$ac_ext >&5
9778ac_cv_func_fseeko=no
169fe44e 9779fi
503d2be0 9780rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
d42122a3 9781fi
ba5da88a 9782echo "$as_me:9782: result: $ac_cv_func_fseeko" >&5
503d2be0
AS
9783echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9784if test $ac_cv_func_fseeko = yes; then
d42122a3 9785
503d2be0 9786cat >>confdefs.h <<\EOF
169fe44e
GM
9787#define HAVE_FSEEKO 1
9788EOF
9789
503d2be0 9790fi
d42122a3 9791
169fe44e 9792# UNIX98 PTYs.
503d2be0 9793
087121cc
GM
9794for ac_func in grantpt
9795do
503d2be0 9796as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ba5da88a 9797echo "$as_me:9797: checking for $ac_func" >&5
503d2be0
AS
9798echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9799if eval "test \"\${$as_ac_var+set}\" = set"; then
9800 echo $ECHO_N "(cached) $ECHO_C" >&6
087121cc 9801else
503d2be0 9802 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 9803#line 9803 "configure"
087121cc
GM
9804#include "confdefs.h"
9805/* System header to define __stub macros and hopefully few prototypes,
503d2be0 9806 which can conflict with char $ac_func (); below. */
087121cc
GM
9807#include <assert.h>
9808/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9809#ifdef __cplusplus
9810extern "C"
9811#endif
087121cc 9812/* We use char because int might match the return type of a gcc2
503d2be0
AS
9813 builtin and then its argument prototype would still apply. */
9814char $ac_func ();
9815char (*f) ();
087121cc 9816
503d2be0
AS
9817int
9818main ()
9819{
087121cc
GM
9820/* The GNU C library defines this for functions which it implements
9821 to always fail with ENOSYS. Some functions are actually named
9822 something starting with __ and the normal name is an alias. */
9823#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9824choke me
9825#else
503d2be0 9826f = $ac_func;
087121cc
GM
9827#endif
9828
503d2be0
AS
9829 ;
9830 return 0;
9831}
9832_ACEOF
9833rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 9834if { (eval echo "$as_me:9834: \"$ac_link\"") >&5
503d2be0
AS
9835 (eval $ac_link) 2>&5
9836 ac_status=$?
ba5da88a 9837 echo "$as_me:9837: \$? = $ac_status" >&5
503d2be0
AS
9838 (exit $ac_status); } &&
9839 { ac_try='test -s conftest$ac_exeext'
ba5da88a 9840 { (eval echo "$as_me:9840: \"$ac_try\"") >&5
503d2be0
AS
9841 (eval $ac_try) 2>&5
9842 ac_status=$?
ba5da88a 9843 echo "$as_me:9843: \$? = $ac_status" >&5
503d2be0
AS
9844 (exit $ac_status); }; }; then
9845 eval "$as_ac_var=yes"
9846else
9847 echo "$as_me: failed program was:" >&5
9848cat conftest.$ac_ext >&5
9849eval "$as_ac_var=no"
9850fi
9851rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9852fi
ba5da88a 9853echo "$as_me:9853: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
9854echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9855if test `eval echo '${'$as_ac_var'}'` = yes; then
9856 cat >>confdefs.h <<EOF
9857#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
087121cc 9858EOF
087121cc 9859
087121cc
GM
9860fi
9861done
9862
087121cc 9863# PTY-related GNU extensions.
503d2be0 9864
087121cc
GM
9865for ac_func in getpt
9866do
503d2be0 9867as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ba5da88a 9868echo "$as_me:9868: checking for $ac_func" >&5
503d2be0
AS
9869echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9870if eval "test \"\${$as_ac_var+set}\" = set"; then
9871 echo $ECHO_N "(cached) $ECHO_C" >&6
087121cc 9872else
503d2be0 9873 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 9874#line 9874 "configure"
087121cc
GM
9875#include "confdefs.h"
9876/* System header to define __stub macros and hopefully few prototypes,
503d2be0 9877 which can conflict with char $ac_func (); below. */
087121cc
GM
9878#include <assert.h>
9879/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9880#ifdef __cplusplus
9881extern "C"
9882#endif
087121cc 9883/* We use char because int might match the return type of a gcc2
503d2be0
AS
9884 builtin and then its argument prototype would still apply. */
9885char $ac_func ();
9886char (*f) ();
087121cc 9887
503d2be0
AS
9888int
9889main ()
9890{
087121cc
GM
9891/* The GNU C library defines this for functions which it implements
9892 to always fail with ENOSYS. Some functions are actually named
9893 something starting with __ and the normal name is an alias. */
9894#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9895choke me
9896#else
503d2be0 9897f = $ac_func;
087121cc
GM
9898#endif
9899
503d2be0
AS
9900 ;
9901 return 0;
9902}
9903_ACEOF
9904rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 9905if { (eval echo "$as_me:9905: \"$ac_link\"") >&5
503d2be0
AS
9906 (eval $ac_link) 2>&5
9907 ac_status=$?
ba5da88a 9908 echo "$as_me:9908: \$? = $ac_status" >&5
503d2be0
AS
9909 (exit $ac_status); } &&
9910 { ac_try='test -s conftest$ac_exeext'
ba5da88a 9911 { (eval echo "$as_me:9911: \"$ac_try\"") >&5
503d2be0
AS
9912 (eval $ac_try) 2>&5
9913 ac_status=$?
ba5da88a 9914 echo "$as_me:9914: \$? = $ac_status" >&5
503d2be0
AS
9915 (exit $ac_status); }; }; then
9916 eval "$as_ac_var=yes"
9917else
9918 echo "$as_me: failed program was:" >&5
9919cat conftest.$ac_ext >&5
9920eval "$as_ac_var=no"
9921fi
9922rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9923fi
ba5da88a 9924echo "$as_me:9924: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
9925echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9926if test `eval echo '${'$as_ac_var'}'` = yes; then
9927 cat >>confdefs.h <<EOF
9928#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
087121cc 9929EOF
087121cc 9930
087121cc
GM
9931fi
9932done
9933
ba4481b5
DL
9934# Check this now, so that we will NOT find the above functions in ncurses.
9935# That is because we have not set up to link ncurses in lib-src.
9936# It's better to believe a function is not available
9937# than to expect to find it in ncurses.
503d2be0 9938
ba5da88a 9939echo "$as_me:9939: checking for tparm in -lncurses" >&5
503d2be0
AS
9940echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6
9941if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
9942 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9943else
503d2be0 9944 ac_check_lib_save_LIBS=$LIBS
ba4481b5 9945LIBS="-lncurses $LIBS"
503d2be0 9946cat >conftest.$ac_ext <<_ACEOF
ba5da88a 9947#line 9947 "configure"
ba4481b5 9948#include "confdefs.h"
503d2be0 9949
ba4481b5 9950/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9951#ifdef __cplusplus
9952extern "C"
9953#endif
ba4481b5 9954/* We use char because int might match the return type of a gcc2
503d2be0
AS
9955 builtin and then its argument prototype would still apply. */
9956char tparm ();
9957int
9958main ()
9959{
9960tparm ();
9961 ;
9962 return 0;
9963}
9964_ACEOF
9965rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 9966if { (eval echo "$as_me:9966: \"$ac_link\"") >&5
503d2be0
AS
9967 (eval $ac_link) 2>&5
9968 ac_status=$?
ba5da88a 9969 echo "$as_me:9969: \$? = $ac_status" >&5
503d2be0
AS
9970 (exit $ac_status); } &&
9971 { ac_try='test -s conftest$ac_exeext'
ba5da88a 9972 { (eval echo "$as_me:9972: \"$ac_try\"") >&5
503d2be0
AS
9973 (eval $ac_try) 2>&5
9974 ac_status=$?
ba5da88a 9975 echo "$as_me:9975: \$? = $ac_status" >&5
503d2be0
AS
9976 (exit $ac_status); }; }; then
9977 ac_cv_lib_ncurses_tparm=yes
9978else
9979 echo "$as_me: failed program was:" >&5
9980cat conftest.$ac_ext >&5
9981ac_cv_lib_ncurses_tparm=no
9982fi
9983rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9984LIBS=$ac_check_lib_save_LIBS
9985fi
ba5da88a 9986echo "$as_me:9986: result: $ac_cv_lib_ncurses_tparm" >&5
503d2be0
AS
9987echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6
9988if test $ac_cv_lib_ncurses_tparm = yes; then
9989 cat >>confdefs.h <<EOF
9990#define HAVE_LIBNCURSES 1
ba4481b5
DL
9991EOF
9992
9993 LIBS="-lncurses $LIBS"
9994
ba4481b5
DL
9995fi
9996
84e70f78
KR
9997# Do we need the Hesiod library to provide the support routines?
9998if test "$with_hesiod" = yes ; then
9999 # Don't set $LIBS here -- see comments above.
10000 resolv=no
ba5da88a 10001 echo "$as_me:10001: checking for res_send" >&5
84e70f78
KR
10002echo $ECHO_N "checking for res_send... $ECHO_C" >&6
10003if test "${ac_cv_func_res_send+set}" = set; then
10004 echo $ECHO_N "(cached) $ECHO_C" >&6
10005else
10006 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 10007#line 10007 "configure"
84e70f78
KR
10008#include "confdefs.h"
10009/* System header to define __stub macros and hopefully few prototypes,
10010 which can conflict with char res_send (); below. */
10011#include <assert.h>
10012/* Override any gcc2 internal prototype to avoid an error. */
10013#ifdef __cplusplus
10014extern "C"
10015#endif
10016/* We use char because int might match the return type of a gcc2
10017 builtin and then its argument prototype would still apply. */
10018char res_send ();
10019char (*f) ();
10020
10021int
10022main ()
10023{
10024/* The GNU C library defines this for functions which it implements
10025 to always fail with ENOSYS. Some functions are actually named
10026 something starting with __ and the normal name is an alias. */
10027#if defined (__stub_res_send) || defined (__stub___res_send)
10028choke me
10029#else
10030f = res_send;
10031#endif
10032
10033 ;
10034 return 0;
10035}
10036_ACEOF
10037rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 10038if { (eval echo "$as_me:10038: \"$ac_link\"") >&5
84e70f78
KR
10039 (eval $ac_link) 2>&5
10040 ac_status=$?
ba5da88a 10041 echo "$as_me:10041: \$? = $ac_status" >&5
84e70f78
KR
10042 (exit $ac_status); } &&
10043 { ac_try='test -s conftest$ac_exeext'
ba5da88a 10044 { (eval echo "$as_me:10044: \"$ac_try\"") >&5
84e70f78
KR
10045 (eval $ac_try) 2>&5
10046 ac_status=$?
ba5da88a 10047 echo "$as_me:10047: \$? = $ac_status" >&5
84e70f78
KR
10048 (exit $ac_status); }; }; then
10049 ac_cv_func_res_send=yes
10050else
10051 echo "$as_me: failed program was:" >&5
10052cat conftest.$ac_ext >&5
10053ac_cv_func_res_send=no
10054fi
10055rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10056fi
ba5da88a 10057echo "$as_me:10057: result: $ac_cv_func_res_send" >&5
84e70f78
KR
10058echo "${ECHO_T}$ac_cv_func_res_send" >&6
10059if test $ac_cv_func_res_send = yes; then
10060 :
10061else
ba5da88a 10062 echo "$as_me:10062: checking for __res_send" >&5
84e70f78
KR
10063echo $ECHO_N "checking for __res_send... $ECHO_C" >&6
10064if test "${ac_cv_func___res_send+set}" = set; then
10065 echo $ECHO_N "(cached) $ECHO_C" >&6
10066else
10067 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 10068#line 10068 "configure"
84e70f78
KR
10069#include "confdefs.h"
10070/* System header to define __stub macros and hopefully few prototypes,
10071 which can conflict with char __res_send (); below. */
10072#include <assert.h>
10073/* Override any gcc2 internal prototype to avoid an error. */
10074#ifdef __cplusplus
10075extern "C"
10076#endif
10077/* We use char because int might match the return type of a gcc2
10078 builtin and then its argument prototype would still apply. */
10079char __res_send ();
10080char (*f) ();
10081
10082int
10083main ()
10084{
10085/* The GNU C library defines this for functions which it implements
10086 to always fail with ENOSYS. Some functions are actually named
10087 something starting with __ and the normal name is an alias. */
10088#if defined (__stub___res_send) || defined (__stub_____res_send)
10089choke me
10090#else
10091f = __res_send;
10092#endif
10093
10094 ;
10095 return 0;
10096}
10097_ACEOF
10098rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 10099if { (eval echo "$as_me:10099: \"$ac_link\"") >&5
84e70f78
KR
10100 (eval $ac_link) 2>&5
10101 ac_status=$?
ba5da88a 10102 echo "$as_me:10102: \$? = $ac_status" >&5
84e70f78
KR
10103 (exit $ac_status); } &&
10104 { ac_try='test -s conftest$ac_exeext'
ba5da88a 10105 { (eval echo "$as_me:10105: \"$ac_try\"") >&5
84e70f78
KR
10106 (eval $ac_try) 2>&5
10107 ac_status=$?
ba5da88a 10108 echo "$as_me:10108: \$? = $ac_status" >&5
84e70f78
KR
10109 (exit $ac_status); }; }; then
10110 ac_cv_func___res_send=yes
10111else
10112 echo "$as_me: failed program was:" >&5
10113cat conftest.$ac_ext >&5
10114ac_cv_func___res_send=no
10115fi
10116rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10117fi
ba5da88a 10118echo "$as_me:10118: result: $ac_cv_func___res_send" >&5
84e70f78
KR
10119echo "${ECHO_T}$ac_cv_func___res_send" >&6
10120if test $ac_cv_func___res_send = yes; then
10121 :
10122else
ba5da88a 10123 echo "$as_me:10123: checking for res_send in -lresolv" >&5
84e70f78
KR
10124echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6
10125if test "${ac_cv_lib_resolv_res_send+set}" = set; then
10126 echo $ECHO_N "(cached) $ECHO_C" >&6
10127else
10128 ac_check_lib_save_LIBS=$LIBS
10129LIBS="-lresolv $LIBS"
10130cat >conftest.$ac_ext <<_ACEOF
ba5da88a 10131#line 10131 "configure"
84e70f78
KR
10132#include "confdefs.h"
10133
10134/* Override any gcc2 internal prototype to avoid an error. */
10135#ifdef __cplusplus
10136extern "C"
10137#endif
10138/* We use char because int might match the return type of a gcc2
10139 builtin and then its argument prototype would still apply. */
10140char res_send ();
10141int
10142main ()
10143{
10144res_send ();
10145 ;
10146 return 0;
10147}
10148_ACEOF
10149rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 10150if { (eval echo "$as_me:10150: \"$ac_link\"") >&5
84e70f78
KR
10151 (eval $ac_link) 2>&5
10152 ac_status=$?
ba5da88a 10153 echo "$as_me:10153: \$? = $ac_status" >&5
84e70f78
KR
10154 (exit $ac_status); } &&
10155 { ac_try='test -s conftest$ac_exeext'
ba5da88a 10156 { (eval echo "$as_me:10156: \"$ac_try\"") >&5
84e70f78
KR
10157 (eval $ac_try) 2>&5
10158 ac_status=$?
ba5da88a 10159 echo "$as_me:10159: \$? = $ac_status" >&5
84e70f78
KR
10160 (exit $ac_status); }; }; then
10161 ac_cv_lib_resolv_res_send=yes
10162else
10163 echo "$as_me: failed program was:" >&5
10164cat conftest.$ac_ext >&5
10165ac_cv_lib_resolv_res_send=no
10166fi
10167rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10168LIBS=$ac_check_lib_save_LIBS
10169fi
ba5da88a 10170echo "$as_me:10170: result: $ac_cv_lib_resolv_res_send" >&5
84e70f78
KR
10171echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6
10172if test $ac_cv_lib_resolv_res_send = yes; then
10173 resolv=yes
10174else
ba5da88a 10175 echo "$as_me:10175: checking for __res_send in -lresolv" >&5
84e70f78
KR
10176echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6
10177if test "${ac_cv_lib_resolv___res_send+set}" = set; then
10178 echo $ECHO_N "(cached) $ECHO_C" >&6
10179else
10180 ac_check_lib_save_LIBS=$LIBS
10181LIBS="-lresolv $LIBS"
10182cat >conftest.$ac_ext <<_ACEOF
ba5da88a 10183#line 10183 "configure"
84e70f78
KR
10184#include "confdefs.h"
10185
10186/* Override any gcc2 internal prototype to avoid an error. */
10187#ifdef __cplusplus
10188extern "C"
10189#endif
10190/* We use char because int might match the return type of a gcc2
10191 builtin and then its argument prototype would still apply. */
10192char __res_send ();
10193int
10194main ()
10195{
10196__res_send ();
10197 ;
10198 return 0;
10199}
10200_ACEOF
10201rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 10202if { (eval echo "$as_me:10202: \"$ac_link\"") >&5
84e70f78
KR
10203 (eval $ac_link) 2>&5
10204 ac_status=$?
ba5da88a 10205 echo "$as_me:10205: \$? = $ac_status" >&5
84e70f78
KR
10206 (exit $ac_status); } &&
10207 { ac_try='test -s conftest$ac_exeext'
ba5da88a 10208 { (eval echo "$as_me:10208: \"$ac_try\"") >&5
84e70f78
KR
10209 (eval $ac_try) 2>&5
10210 ac_status=$?
ba5da88a 10211 echo "$as_me:10211: \$? = $ac_status" >&5
84e70f78
KR
10212 (exit $ac_status); }; }; then
10213 ac_cv_lib_resolv___res_send=yes
10214else
10215 echo "$as_me: failed program was:" >&5
10216cat conftest.$ac_ext >&5
10217ac_cv_lib_resolv___res_send=no
10218fi
10219rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10220LIBS=$ac_check_lib_save_LIBS
10221fi
ba5da88a 10222echo "$as_me:10222: result: $ac_cv_lib_resolv___res_send" >&5
84e70f78
KR
10223echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6
10224if test $ac_cv_lib_resolv___res_send = yes; then
10225 resolv=yes
10226fi
10227
10228fi
10229
10230fi
10231
10232fi
10233
10234 if test "$resolv" = yes ; then
10235 RESOLVLIB=-lresolv
10236 cat >>confdefs.h <<\EOF
10237#define HAVE_LIBRESOLV 1
10238EOF
10239
10240 else
10241 RESOLVLIB=
10242 fi
ba5da88a 10243 echo "$as_me:10243: checking for hes_getmailhost" >&5
84e70f78
KR
10244echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6
10245if test "${ac_cv_func_hes_getmailhost+set}" = set; then
10246 echo $ECHO_N "(cached) $ECHO_C" >&6
10247else
10248 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 10249#line 10249 "configure"
84e70f78
KR
10250#include "confdefs.h"
10251/* System header to define __stub macros and hopefully few prototypes,
10252 which can conflict with char hes_getmailhost (); below. */
10253#include <assert.h>
10254/* Override any gcc2 internal prototype to avoid an error. */
10255#ifdef __cplusplus
10256extern "C"
10257#endif
10258/* We use char because int might match the return type of a gcc2
10259 builtin and then its argument prototype would still apply. */
10260char hes_getmailhost ();
10261char (*f) ();
10262
10263int
10264main ()
10265{
10266/* The GNU C library defines this for functions which it implements
10267 to always fail with ENOSYS. Some functions are actually named
10268 something starting with __ and the normal name is an alias. */
10269#if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
10270choke me
10271#else
10272f = hes_getmailhost;
10273#endif
10274
10275 ;
10276 return 0;
10277}
10278_ACEOF
10279rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 10280if { (eval echo "$as_me:10280: \"$ac_link\"") >&5
84e70f78
KR
10281 (eval $ac_link) 2>&5
10282 ac_status=$?
ba5da88a 10283 echo "$as_me:10283: \$? = $ac_status" >&5
84e70f78
KR
10284 (exit $ac_status); } &&
10285 { ac_try='test -s conftest$ac_exeext'
ba5da88a 10286 { (eval echo "$as_me:10286: \"$ac_try\"") >&5
84e70f78
KR
10287 (eval $ac_try) 2>&5
10288 ac_status=$?
ba5da88a 10289 echo "$as_me:10289: \$? = $ac_status" >&5
84e70f78
KR
10290 (exit $ac_status); }; }; then
10291 ac_cv_func_hes_getmailhost=yes
10292else
10293 echo "$as_me: failed program was:" >&5
10294cat conftest.$ac_ext >&5
10295ac_cv_func_hes_getmailhost=no
10296fi
10297rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10298fi
ba5da88a 10299echo "$as_me:10299: result: $ac_cv_func_hes_getmailhost" >&5
84e70f78
KR
10300echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6
10301if test $ac_cv_func_hes_getmailhost = yes; then
10302 :
10303else
ba5da88a 10304 echo "$as_me:10304: checking for hes_getmailhost in -lhesiod" >&5
84e70f78
KR
10305echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6
10306if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
10307 echo $ECHO_N "(cached) $ECHO_C" >&6
10308else
10309 ac_check_lib_save_LIBS=$LIBS
10310LIBS="-lhesiod $RESOLVLIB $LIBS"
10311cat >conftest.$ac_ext <<_ACEOF
ba5da88a 10312#line 10312 "configure"
84e70f78
KR
10313#include "confdefs.h"
10314
10315/* Override any gcc2 internal prototype to avoid an error. */
10316#ifdef __cplusplus
10317extern "C"
10318#endif
10319/* We use char because int might match the return type of a gcc2
10320 builtin and then its argument prototype would still apply. */
10321char hes_getmailhost ();
10322int
10323main ()
10324{
10325hes_getmailhost ();
10326 ;
10327 return 0;
10328}
10329_ACEOF
10330rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 10331if { (eval echo "$as_me:10331: \"$ac_link\"") >&5
84e70f78
KR
10332 (eval $ac_link) 2>&5
10333 ac_status=$?
ba5da88a 10334 echo "$as_me:10334: \$? = $ac_status" >&5
84e70f78
KR
10335 (exit $ac_status); } &&
10336 { ac_try='test -s conftest$ac_exeext'
ba5da88a 10337 { (eval echo "$as_me:10337: \"$ac_try\"") >&5
84e70f78
KR
10338 (eval $ac_try) 2>&5
10339 ac_status=$?
ba5da88a 10340 echo "$as_me:10340: \$? = $ac_status" >&5
84e70f78
KR
10341 (exit $ac_status); }; }; then
10342 ac_cv_lib_hesiod_hes_getmailhost=yes
10343else
10344 echo "$as_me: failed program was:" >&5
10345cat conftest.$ac_ext >&5
10346ac_cv_lib_hesiod_hes_getmailhost=no
10347fi
10348rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10349LIBS=$ac_check_lib_save_LIBS
10350fi
ba5da88a 10351echo "$as_me:10351: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
84e70f78
KR
10352echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6
10353if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
10354 cat >>confdefs.h <<\EOF
10355#define HAVE_LIBHESIOD 1
10356EOF
10357
10358else
10359 :
10360fi
10361
10362fi
10363
10364fi
10365
a21616bd
KR
10366# These tell us which Kerberos-related libraries to use.
10367if test "${with_kerberos+set}" = set; then
503d2be0 10368
ba5da88a 10369echo "$as_me:10369: checking for com_err in -lcom_err" >&5
503d2be0
AS
10370echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
10371if test "${ac_cv_lib_com_err_com_err+set}" = set; then
10372 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10373else
503d2be0 10374 ac_check_lib_save_LIBS=$LIBS
a21616bd 10375LIBS="-lcom_err $LIBS"
503d2be0 10376cat >conftest.$ac_ext <<_ACEOF
ba5da88a 10377#line 10377 "configure"
a21616bd 10378#include "confdefs.h"
503d2be0 10379
a21616bd 10380/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10381#ifdef __cplusplus
10382extern "C"
10383#endif
a21616bd 10384/* We use char because int might match the return type of a gcc2
503d2be0
AS
10385 builtin and then its argument prototype would still apply. */
10386char com_err ();
10387int
10388main ()
10389{
10390com_err ();
10391 ;
10392 return 0;
10393}
10394_ACEOF
10395rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 10396if { (eval echo "$as_me:10396: \"$ac_link\"") >&5
503d2be0
AS
10397 (eval $ac_link) 2>&5
10398 ac_status=$?
ba5da88a 10399 echo "$as_me:10399: \$? = $ac_status" >&5
503d2be0
AS
10400 (exit $ac_status); } &&
10401 { ac_try='test -s conftest$ac_exeext'
ba5da88a 10402 { (eval echo "$as_me:10402: \"$ac_try\"") >&5
503d2be0
AS
10403 (eval $ac_try) 2>&5
10404 ac_status=$?
ba5da88a 10405 echo "$as_me:10405: \$? = $ac_status" >&5
503d2be0
AS
10406 (exit $ac_status); }; }; then
10407 ac_cv_lib_com_err_com_err=yes
10408else
10409 echo "$as_me: failed program was:" >&5
10410cat conftest.$ac_ext >&5
10411ac_cv_lib_com_err_com_err=no
10412fi
10413rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10414LIBS=$ac_check_lib_save_LIBS
10415fi
ba5da88a 10416echo "$as_me:10416: result: $ac_cv_lib_com_err_com_err" >&5
503d2be0
AS
10417echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
10418if test $ac_cv_lib_com_err_com_err = yes; then
10419 cat >>confdefs.h <<EOF
10420#define HAVE_LIBCOM_ERR 1
a21616bd
KR
10421EOF
10422
10423 LIBS="-lcom_err $LIBS"
10424
a21616bd
KR
10425fi
10426
ba5da88a 10427echo "$as_me:10427: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
503d2be0
AS
10428echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6
10429if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
10430 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10431else
503d2be0 10432 ac_check_lib_save_LIBS=$LIBS
a21616bd 10433LIBS="-lk5crypto $LIBS"
503d2be0 10434cat >conftest.$ac_ext <<_ACEOF
ba5da88a 10435#line 10435 "configure"
a21616bd 10436#include "confdefs.h"
503d2be0 10437
a21616bd 10438/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10439#ifdef __cplusplus
10440extern "C"
10441#endif
a21616bd 10442/* We use char because int might match the return type of a gcc2
503d2be0
AS
10443 builtin and then its argument prototype would still apply. */
10444char mit_des_cbc_encrypt ();
10445int
10446main ()
10447{
10448mit_des_cbc_encrypt ();
10449 ;
10450 return 0;
10451}
10452_ACEOF
10453rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 10454if { (eval echo "$as_me:10454: \"$ac_link\"") >&5
503d2be0
AS
10455 (eval $ac_link) 2>&5
10456 ac_status=$?
ba5da88a 10457 echo "$as_me:10457: \$? = $ac_status" >&5
503d2be0
AS
10458 (exit $ac_status); } &&
10459 { ac_try='test -s conftest$ac_exeext'
ba5da88a 10460 { (eval echo "$as_me:10460: \"$ac_try\"") >&5
503d2be0
AS
10461 (eval $ac_try) 2>&5
10462 ac_status=$?
ba5da88a 10463 echo "$as_me:10463: \$? = $ac_status" >&5
503d2be0
AS
10464 (exit $ac_status); }; }; then
10465 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
10466else
10467 echo "$as_me: failed program was:" >&5
10468cat conftest.$ac_ext >&5
10469ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
10470fi
10471rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10472LIBS=$ac_check_lib_save_LIBS
10473fi
ba5da88a 10474echo "$as_me:10474: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
10475echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6
10476if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
10477 cat >>confdefs.h <<EOF
10478#define HAVE_LIBK5CRYPTO 1
a21616bd
KR
10479EOF
10480
10481 LIBS="-lk5crypto $LIBS"
10482
a21616bd
KR
10483fi
10484
ba5da88a 10485echo "$as_me:10485: checking for mit_des_cbc_encrypt in -lcrypto" >&5
503d2be0
AS
10486echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6
10487if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
10488 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10489else
503d2be0 10490 ac_check_lib_save_LIBS=$LIBS
a21616bd 10491LIBS="-lcrypto $LIBS"
503d2be0 10492cat >conftest.$ac_ext <<_ACEOF
ba5da88a 10493#line 10493 "configure"
a21616bd 10494#include "confdefs.h"
503d2be0 10495
a21616bd 10496/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10497#ifdef __cplusplus
10498extern "C"
10499#endif
a21616bd 10500/* We use char because int might match the return type of a gcc2
503d2be0
AS
10501 builtin and then its argument prototype would still apply. */
10502char mit_des_cbc_encrypt ();
10503int
10504main ()
10505{
10506mit_des_cbc_encrypt ();
10507 ;
10508 return 0;
10509}
10510_ACEOF
10511rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 10512if { (eval echo "$as_me:10512: \"$ac_link\"") >&5
503d2be0
AS
10513 (eval $ac_link) 2>&5
10514 ac_status=$?
ba5da88a 10515 echo "$as_me:10515: \$? = $ac_status" >&5
503d2be0
AS
10516 (exit $ac_status); } &&
10517 { ac_try='test -s conftest$ac_exeext'
ba5da88a 10518 { (eval echo "$as_me:10518: \"$ac_try\"") >&5
503d2be0
AS
10519 (eval $ac_try) 2>&5
10520 ac_status=$?
ba5da88a 10521 echo "$as_me:10521: \$? = $ac_status" >&5
503d2be0
AS
10522 (exit $ac_status); }; }; then
10523 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
10524else
10525 echo "$as_me: failed program was:" >&5
10526cat conftest.$ac_ext >&5
10527ac_cv_lib_crypto_mit_des_cbc_encrypt=no
10528fi
10529rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10530LIBS=$ac_check_lib_save_LIBS
10531fi
ba5da88a 10532echo "$as_me:10532: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
10533echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6
10534if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
10535 cat >>confdefs.h <<EOF
10536#define HAVE_LIBCRYPTO 1
a21616bd
KR
10537EOF
10538
10539 LIBS="-lcrypto $LIBS"
10540
a21616bd
KR
10541fi
10542
ba5da88a 10543echo "$as_me:10543: checking for krb5_init_context in -lkrb5" >&5
503d2be0
AS
10544echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6
10545if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
10546 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10547else
503d2be0 10548 ac_check_lib_save_LIBS=$LIBS
a21616bd 10549LIBS="-lkrb5 $LIBS"
503d2be0 10550cat >conftest.$ac_ext <<_ACEOF
ba5da88a 10551#line 10551 "configure"
a21616bd 10552#include "confdefs.h"
a21616bd 10553
503d2be0
AS
10554/* Override any gcc2 internal prototype to avoid an error. */
10555#ifdef __cplusplus
10556extern "C"
10557#endif
10558/* We use char because int might match the return type of a gcc2
10559 builtin and then its argument prototype would still apply. */
10560char krb5_init_context ();
10561int
10562main ()
10563{
10564krb5_init_context ();
10565 ;
10566 return 0;
10567}
10568_ACEOF
10569rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 10570if { (eval echo "$as_me:10570: \"$ac_link\"") >&5
503d2be0
AS
10571 (eval $ac_link) 2>&5
10572 ac_status=$?
ba5da88a 10573 echo "$as_me:10573: \$? = $ac_status" >&5
503d2be0
AS
10574 (exit $ac_status); } &&
10575 { ac_try='test -s conftest$ac_exeext'
ba5da88a 10576 { (eval echo "$as_me:10576: \"$ac_try\"") >&5
503d2be0
AS
10577 (eval $ac_try) 2>&5
10578 ac_status=$?
ba5da88a 10579 echo "$as_me:10579: \$? = $ac_status" >&5
503d2be0
AS
10580 (exit $ac_status); }; }; then
10581 ac_cv_lib_krb5_krb5_init_context=yes
10582else
10583 echo "$as_me: failed program was:" >&5
10584cat conftest.$ac_ext >&5
10585ac_cv_lib_krb5_krb5_init_context=no
10586fi
10587rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10588LIBS=$ac_check_lib_save_LIBS
10589fi
ba5da88a 10590echo "$as_me:10590: result: $ac_cv_lib_krb5_krb5_init_context" >&5
503d2be0
AS
10591echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6
10592if test $ac_cv_lib_krb5_krb5_init_context = yes; then
10593 cat >>confdefs.h <<EOF
10594#define HAVE_LIBKRB5 1
a21616bd
KR
10595EOF
10596
10597 LIBS="-lkrb5 $LIBS"
10598
a21616bd
KR
10599fi
10600
10601 if test "${with_kerberos5+set}" != set; then
503d2be0 10602
ba5da88a 10603echo "$as_me:10603: checking for des_cbc_encrypt in -ldes425" >&5
503d2be0
AS
10604echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
10605if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
10606 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10607else
503d2be0 10608 ac_check_lib_save_LIBS=$LIBS
a21616bd 10609LIBS="-ldes425 $LIBS"
503d2be0 10610cat >conftest.$ac_ext <<_ACEOF
ba5da88a 10611#line 10611 "configure"
a21616bd 10612#include "confdefs.h"
503d2be0 10613
a21616bd 10614/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10615#ifdef __cplusplus
10616extern "C"
10617#endif
a21616bd 10618/* We use char because int might match the return type of a gcc2
503d2be0
AS
10619 builtin and then its argument prototype would still apply. */
10620char des_cbc_encrypt ();
10621int
10622main ()
10623{
10624des_cbc_encrypt ();
10625 ;
10626 return 0;
10627}
10628_ACEOF
10629rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 10630if { (eval echo "$as_me:10630: \"$ac_link\"") >&5
503d2be0
AS
10631 (eval $ac_link) 2>&5
10632 ac_status=$?
ba5da88a 10633 echo "$as_me:10633: \$? = $ac_status" >&5
503d2be0
AS
10634 (exit $ac_status); } &&
10635 { ac_try='test -s conftest$ac_exeext'
ba5da88a 10636 { (eval echo "$as_me:10636: \"$ac_try\"") >&5
503d2be0
AS
10637 (eval $ac_try) 2>&5
10638 ac_status=$?
ba5da88a 10639 echo "$as_me:10639: \$? = $ac_status" >&5
503d2be0
AS
10640 (exit $ac_status); }; }; then
10641 ac_cv_lib_des425_des_cbc_encrypt=yes
10642else
10643 echo "$as_me: failed program was:" >&5
10644cat conftest.$ac_ext >&5
10645ac_cv_lib_des425_des_cbc_encrypt=no
10646fi
10647rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10648LIBS=$ac_check_lib_save_LIBS
10649fi
ba5da88a 10650echo "$as_me:10650: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
503d2be0
AS
10651echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
10652if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
10653 cat >>confdefs.h <<EOF
10654#define HAVE_LIBDES425 1
a21616bd
KR
10655EOF
10656
10657 LIBS="-ldes425 $LIBS"
10658
10659else
503d2be0 10660
ba5da88a 10661echo "$as_me:10661: checking for des_cbc_encrypt in -ldes" >&5
503d2be0
AS
10662echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
10663if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
10664 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10665else
503d2be0 10666 ac_check_lib_save_LIBS=$LIBS
a21616bd 10667LIBS="-ldes $LIBS"
503d2be0 10668cat >conftest.$ac_ext <<_ACEOF
ba5da88a 10669#line 10669 "configure"
a21616bd 10670#include "confdefs.h"
503d2be0 10671
a21616bd 10672/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10673#ifdef __cplusplus
10674extern "C"
10675#endif
a21616bd 10676/* We use char because int might match the return type of a gcc2
503d2be0
AS
10677 builtin and then its argument prototype would still apply. */
10678char des_cbc_encrypt ();
10679int
10680main ()
10681{
10682des_cbc_encrypt ();
10683 ;
10684 return 0;
10685}
10686_ACEOF
10687rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 10688if { (eval echo "$as_me:10688: \"$ac_link\"") >&5
503d2be0
AS
10689 (eval $ac_link) 2>&5
10690 ac_status=$?
ba5da88a 10691 echo "$as_me:10691: \$? = $ac_status" >&5
503d2be0
AS
10692 (exit $ac_status); } &&
10693 { ac_try='test -s conftest$ac_exeext'
ba5da88a 10694 { (eval echo "$as_me:10694: \"$ac_try\"") >&5
503d2be0
AS
10695 (eval $ac_try) 2>&5
10696 ac_status=$?
ba5da88a 10697 echo "$as_me:10697: \$? = $ac_status" >&5
503d2be0
AS
10698 (exit $ac_status); }; }; then
10699 ac_cv_lib_des_des_cbc_encrypt=yes
10700else
10701 echo "$as_me: failed program was:" >&5
10702cat conftest.$ac_ext >&5
10703ac_cv_lib_des_des_cbc_encrypt=no
10704fi
10705rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10706LIBS=$ac_check_lib_save_LIBS
10707fi
ba5da88a 10708echo "$as_me:10708: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
503d2be0
AS
10709echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
10710if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
10711 cat >>confdefs.h <<EOF
10712#define HAVE_LIBDES 1
a21616bd
KR
10713EOF
10714
10715 LIBS="-ldes $LIBS"
10716
a21616bd
KR
10717fi
10718
10719fi
10720
ba5da88a 10721echo "$as_me:10721: checking for krb_get_cred in -lkrb4" >&5
503d2be0
AS
10722echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6
10723if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
10724 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10725else
503d2be0 10726 ac_check_lib_save_LIBS=$LIBS
a21616bd 10727LIBS="-lkrb4 $LIBS"
503d2be0 10728cat >conftest.$ac_ext <<_ACEOF
ba5da88a 10729#line 10729 "configure"
a21616bd 10730#include "confdefs.h"
503d2be0 10731
a21616bd 10732/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10733#ifdef __cplusplus
10734extern "C"
10735#endif
a21616bd 10736/* We use char because int might match the return type of a gcc2
503d2be0
AS
10737 builtin and then its argument prototype would still apply. */
10738char krb_get_cred ();
10739int
10740main ()
10741{
10742krb_get_cred ();
10743 ;
10744 return 0;
10745}
10746_ACEOF
10747rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 10748if { (eval echo "$as_me:10748: \"$ac_link\"") >&5
503d2be0
AS
10749 (eval $ac_link) 2>&5
10750 ac_status=$?
ba5da88a 10751 echo "$as_me:10751: \$? = $ac_status" >&5
503d2be0
AS
10752 (exit $ac_status); } &&
10753 { ac_try='test -s conftest$ac_exeext'
ba5da88a 10754 { (eval echo "$as_me:10754: \"$ac_try\"") >&5
503d2be0
AS
10755 (eval $ac_try) 2>&5
10756 ac_status=$?
ba5da88a 10757 echo "$as_me:10757: \$? = $ac_status" >&5
503d2be0
AS
10758 (exit $ac_status); }; }; then
10759 ac_cv_lib_krb4_krb_get_cred=yes
10760else
10761 echo "$as_me: failed program was:" >&5
10762cat conftest.$ac_ext >&5
10763ac_cv_lib_krb4_krb_get_cred=no
10764fi
10765rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10766LIBS=$ac_check_lib_save_LIBS
10767fi
ba5da88a 10768echo "$as_me:10768: result: $ac_cv_lib_krb4_krb_get_cred" >&5
503d2be0
AS
10769echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6
10770if test $ac_cv_lib_krb4_krb_get_cred = yes; then
10771 cat >>confdefs.h <<EOF
10772#define HAVE_LIBKRB4 1
a21616bd
KR
10773EOF
10774
10775 LIBS="-lkrb4 $LIBS"
10776
10777else
503d2be0 10778
ba5da88a 10779echo "$as_me:10779: checking for krb_get_cred in -lkrb" >&5
503d2be0
AS
10780echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6
10781if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
10782 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10783else
503d2be0 10784 ac_check_lib_save_LIBS=$LIBS
a21616bd 10785LIBS="-lkrb $LIBS"
503d2be0 10786cat >conftest.$ac_ext <<_ACEOF
ba5da88a 10787#line 10787 "configure"
a21616bd 10788#include "confdefs.h"
503d2be0 10789
a21616bd 10790/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10791#ifdef __cplusplus
10792extern "C"
10793#endif
a21616bd 10794/* We use char because int might match the return type of a gcc2
503d2be0
AS
10795 builtin and then its argument prototype would still apply. */
10796char krb_get_cred ();
10797int
10798main ()
10799{
10800krb_get_cred ();
10801 ;
10802 return 0;
10803}
10804_ACEOF
10805rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 10806if { (eval echo "$as_me:10806: \"$ac_link\"") >&5
503d2be0
AS
10807 (eval $ac_link) 2>&5
10808 ac_status=$?
ba5da88a 10809 echo "$as_me:10809: \$? = $ac_status" >&5
503d2be0
AS
10810 (exit $ac_status); } &&
10811 { ac_try='test -s conftest$ac_exeext'
ba5da88a 10812 { (eval echo "$as_me:10812: \"$ac_try\"") >&5
503d2be0
AS
10813 (eval $ac_try) 2>&5
10814 ac_status=$?
ba5da88a 10815 echo "$as_me:10815: \$? = $ac_status" >&5
503d2be0
AS
10816 (exit $ac_status); }; }; then
10817 ac_cv_lib_krb_krb_get_cred=yes
10818else
10819 echo "$as_me: failed program was:" >&5
10820cat conftest.$ac_ext >&5
10821ac_cv_lib_krb_krb_get_cred=no
10822fi
10823rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10824LIBS=$ac_check_lib_save_LIBS
10825fi
ba5da88a 10826echo "$as_me:10826: result: $ac_cv_lib_krb_krb_get_cred" >&5
503d2be0
AS
10827echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6
10828if test $ac_cv_lib_krb_krb_get_cred = yes; then
10829 cat >>confdefs.h <<EOF
10830#define HAVE_LIBKRB 1
a21616bd
KR
10831EOF
10832
10833 LIBS="-lkrb $LIBS"
10834
a21616bd
KR
10835fi
10836
10837fi
10838
10839 fi
10840
10841 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
10842
10843for ac_header in krb5.h
a21616bd 10844do
503d2be0 10845as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ba5da88a 10846echo "$as_me:10846: checking for $ac_header" >&5
503d2be0
AS
10847echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10848if eval "test \"\${$as_ac_Header+set}\" = set"; then
10849 echo $ECHO_N "(cached) $ECHO_C" >&6
10850else
10851 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 10852#line 10852 "configure"
503d2be0
AS
10853#include "confdefs.h"
10854#include <$ac_header>
10855_ACEOF
ba5da88a 10856if { (eval echo "$as_me:10856: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
10857 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10858 ac_status=$?
10859 egrep -v '^ *\+' conftest.er1 >conftest.err
10860 rm -f conftest.er1
10861 cat conftest.err >&5
ba5da88a 10862 echo "$as_me:10862: \$? = $ac_status" >&5
503d2be0
AS
10863 (exit $ac_status); } >/dev/null; then
10864 if test -s conftest.err; then
10865 ac_cpp_err=$ac_c_preproc_warn_flag
10866 else
10867 ac_cpp_err=
10868 fi
10869else
10870 ac_cpp_err=yes
10871fi
10872if test -z "$ac_cpp_err"; then
10873 eval "$as_ac_Header=yes"
10874else
10875 echo "$as_me: failed program was:" >&5
a21616bd 10876 cat conftest.$ac_ext >&5
503d2be0 10877 eval "$as_ac_Header=no"
a21616bd 10878fi
503d2be0 10879rm -f conftest.err conftest.$ac_ext
a21616bd 10880fi
ba5da88a 10881echo "$as_me:10881: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
10882echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10883if test `eval echo '${'$as_ac_Header'}'` = yes; then
10884 cat >>confdefs.h <<EOF
10885#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 10886EOF
503d2be0 10887
a21616bd
KR
10888fi
10889done
10890
10891 else
503d2be0
AS
10892
10893for ac_header in des.h
a21616bd 10894do
503d2be0 10895as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ba5da88a 10896echo "$as_me:10896: checking for $ac_header" >&5
503d2be0
AS
10897echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10898if eval "test \"\${$as_ac_Header+set}\" = set"; then
10899 echo $ECHO_N "(cached) $ECHO_C" >&6
10900else
10901 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 10902#line 10902 "configure"
503d2be0
AS
10903#include "confdefs.h"
10904#include <$ac_header>
10905_ACEOF
ba5da88a 10906if { (eval echo "$as_me:10906: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
10907 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10908 ac_status=$?
10909 egrep -v '^ *\+' conftest.er1 >conftest.err
10910 rm -f conftest.er1
10911 cat conftest.err >&5
ba5da88a 10912 echo "$as_me:10912: \$? = $ac_status" >&5
503d2be0
AS
10913 (exit $ac_status); } >/dev/null; then
10914 if test -s conftest.err; then
10915 ac_cpp_err=$ac_c_preproc_warn_flag
10916 else
10917 ac_cpp_err=
10918 fi
10919else
10920 ac_cpp_err=yes
10921fi
10922if test -z "$ac_cpp_err"; then
10923 eval "$as_ac_Header=yes"
10924else
10925 echo "$as_me: failed program was:" >&5
a21616bd 10926 cat conftest.$ac_ext >&5
503d2be0 10927 eval "$as_ac_Header=no"
a21616bd 10928fi
503d2be0 10929rm -f conftest.err conftest.$ac_ext
a21616bd 10930fi
ba5da88a 10931echo "$as_me:10931: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
10932echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10933if test `eval echo '${'$as_ac_Header'}'` = yes; then
10934 cat >>confdefs.h <<EOF
10935#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 10936EOF
503d2be0 10937
a21616bd 10938else
503d2be0
AS
10939
10940for ac_header in kerberosIV/des.h
a21616bd 10941do
503d2be0 10942as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ba5da88a 10943echo "$as_me:10943: checking for $ac_header" >&5
503d2be0
AS
10944echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10945if eval "test \"\${$as_ac_Header+set}\" = set"; then
10946 echo $ECHO_N "(cached) $ECHO_C" >&6
10947else
10948 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 10949#line 10949 "configure"
503d2be0
AS
10950#include "confdefs.h"
10951#include <$ac_header>
10952_ACEOF
ba5da88a 10953if { (eval echo "$as_me:10953: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
10954 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10955 ac_status=$?
10956 egrep -v '^ *\+' conftest.er1 >conftest.err
10957 rm -f conftest.er1
10958 cat conftest.err >&5
ba5da88a 10959 echo "$as_me:10959: \$? = $ac_status" >&5
503d2be0
AS
10960 (exit $ac_status); } >/dev/null; then
10961 if test -s conftest.err; then
10962 ac_cpp_err=$ac_c_preproc_warn_flag
10963 else
10964 ac_cpp_err=
10965 fi
10966else
10967 ac_cpp_err=yes
10968fi
10969if test -z "$ac_cpp_err"; then
10970 eval "$as_ac_Header=yes"
10971else
10972 echo "$as_me: failed program was:" >&5
a21616bd 10973 cat conftest.$ac_ext >&5
503d2be0 10974 eval "$as_ac_Header=no"
a21616bd 10975fi
503d2be0 10976rm -f conftest.err conftest.$ac_ext
a21616bd 10977fi
ba5da88a 10978echo "$as_me:10978: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
10979echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10980if test `eval echo '${'$as_ac_Header'}'` = yes; then
10981 cat >>confdefs.h <<EOF
10982#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 10983EOF
503d2be0 10984
a21616bd 10985else
503d2be0
AS
10986
10987for ac_header in kerberos/des.h
a21616bd 10988do
503d2be0 10989as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ba5da88a 10990echo "$as_me:10990: checking for $ac_header" >&5
503d2be0
AS
10991echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10992if eval "test \"\${$as_ac_Header+set}\" = set"; then
10993 echo $ECHO_N "(cached) $ECHO_C" >&6
10994else
10995 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 10996#line 10996 "configure"
503d2be0
AS
10997#include "confdefs.h"
10998#include <$ac_header>
10999_ACEOF
ba5da88a 11000if { (eval echo "$as_me:11000: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11001 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11002 ac_status=$?
11003 egrep -v '^ *\+' conftest.er1 >conftest.err
11004 rm -f conftest.er1
11005 cat conftest.err >&5
ba5da88a 11006 echo "$as_me:11006: \$? = $ac_status" >&5
503d2be0
AS
11007 (exit $ac_status); } >/dev/null; then
11008 if test -s conftest.err; then
11009 ac_cpp_err=$ac_c_preproc_warn_flag
11010 else
11011 ac_cpp_err=
11012 fi
11013else
11014 ac_cpp_err=yes
11015fi
11016if test -z "$ac_cpp_err"; then
11017 eval "$as_ac_Header=yes"
11018else
11019 echo "$as_me: failed program was:" >&5
a21616bd 11020 cat conftest.$ac_ext >&5
503d2be0 11021 eval "$as_ac_Header=no"
a21616bd 11022fi
503d2be0 11023rm -f conftest.err conftest.$ac_ext
a21616bd 11024fi
ba5da88a 11025echo "$as_me:11025: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11026echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11027if test `eval echo '${'$as_ac_Header'}'` = yes; then
11028 cat >>confdefs.h <<EOF
11029#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 11030EOF
503d2be0 11031
a21616bd
KR
11032fi
11033done
11034
11035fi
11036done
11037
11038fi
11039done
11040
503d2be0 11041for ac_header in krb.h
a21616bd 11042do
503d2be0 11043as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ba5da88a 11044echo "$as_me:11044: checking for $ac_header" >&5
503d2be0
AS
11045echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11046if eval "test \"\${$as_ac_Header+set}\" = set"; then
11047 echo $ECHO_N "(cached) $ECHO_C" >&6
11048else
11049 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 11050#line 11050 "configure"
503d2be0
AS
11051#include "confdefs.h"
11052#include <$ac_header>
11053_ACEOF
ba5da88a 11054if { (eval echo "$as_me:11054: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11055 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11056 ac_status=$?
11057 egrep -v '^ *\+' conftest.er1 >conftest.err
11058 rm -f conftest.er1
11059 cat conftest.err >&5
ba5da88a 11060 echo "$as_me:11060: \$? = $ac_status" >&5
503d2be0
AS
11061 (exit $ac_status); } >/dev/null; then
11062 if test -s conftest.err; then
11063 ac_cpp_err=$ac_c_preproc_warn_flag
11064 else
11065 ac_cpp_err=
11066 fi
11067else
11068 ac_cpp_err=yes
11069fi
11070if test -z "$ac_cpp_err"; then
11071 eval "$as_ac_Header=yes"
11072else
11073 echo "$as_me: failed program was:" >&5
a21616bd 11074 cat conftest.$ac_ext >&5
503d2be0 11075 eval "$as_ac_Header=no"
a21616bd 11076fi
503d2be0 11077rm -f conftest.err conftest.$ac_ext
a21616bd 11078fi
ba5da88a 11079echo "$as_me:11079: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11080echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11081if test `eval echo '${'$as_ac_Header'}'` = yes; then
11082 cat >>confdefs.h <<EOF
11083#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 11084EOF
503d2be0 11085
a21616bd 11086else
503d2be0
AS
11087
11088for ac_header in kerberosIV/krb.h
a21616bd 11089do
503d2be0 11090as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ba5da88a 11091echo "$as_me:11091: checking for $ac_header" >&5
503d2be0
AS
11092echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11093if eval "test \"\${$as_ac_Header+set}\" = set"; then
11094 echo $ECHO_N "(cached) $ECHO_C" >&6
11095else
11096 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 11097#line 11097 "configure"
503d2be0
AS
11098#include "confdefs.h"
11099#include <$ac_header>
11100_ACEOF
ba5da88a 11101if { (eval echo "$as_me:11101: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11102 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11103 ac_status=$?
11104 egrep -v '^ *\+' conftest.er1 >conftest.err
11105 rm -f conftest.er1
11106 cat conftest.err >&5
ba5da88a 11107 echo "$as_me:11107: \$? = $ac_status" >&5
503d2be0
AS
11108 (exit $ac_status); } >/dev/null; then
11109 if test -s conftest.err; then
11110 ac_cpp_err=$ac_c_preproc_warn_flag
11111 else
11112 ac_cpp_err=
11113 fi
11114else
11115 ac_cpp_err=yes
11116fi
11117if test -z "$ac_cpp_err"; then
11118 eval "$as_ac_Header=yes"
11119else
11120 echo "$as_me: failed program was:" >&5
a21616bd 11121 cat conftest.$ac_ext >&5
503d2be0 11122 eval "$as_ac_Header=no"
a21616bd 11123fi
503d2be0 11124rm -f conftest.err conftest.$ac_ext
a21616bd 11125fi
ba5da88a 11126echo "$as_me:11126: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11127echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11128if test `eval echo '${'$as_ac_Header'}'` = yes; then
11129 cat >>confdefs.h <<EOF
11130#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 11131EOF
503d2be0 11132
a21616bd 11133else
503d2be0
AS
11134
11135for ac_header in kerberos/krb.h
a21616bd 11136do
503d2be0 11137as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ba5da88a 11138echo "$as_me:11138: checking for $ac_header" >&5
503d2be0
AS
11139echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11140if eval "test \"\${$as_ac_Header+set}\" = set"; then
11141 echo $ECHO_N "(cached) $ECHO_C" >&6
11142else
11143 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 11144#line 11144 "configure"
503d2be0
AS
11145#include "confdefs.h"
11146#include <$ac_header>
11147_ACEOF
ba5da88a 11148if { (eval echo "$as_me:11148: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11149 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11150 ac_status=$?
11151 egrep -v '^ *\+' conftest.er1 >conftest.err
11152 rm -f conftest.er1
11153 cat conftest.err >&5
ba5da88a 11154 echo "$as_me:11154: \$? = $ac_status" >&5
503d2be0
AS
11155 (exit $ac_status); } >/dev/null; then
11156 if test -s conftest.err; then
11157 ac_cpp_err=$ac_c_preproc_warn_flag
11158 else
11159 ac_cpp_err=
11160 fi
11161else
11162 ac_cpp_err=yes
11163fi
11164if test -z "$ac_cpp_err"; then
11165 eval "$as_ac_Header=yes"
11166else
11167 echo "$as_me: failed program was:" >&5
a21616bd 11168 cat conftest.$ac_ext >&5
503d2be0 11169 eval "$as_ac_Header=no"
a21616bd 11170fi
503d2be0 11171rm -f conftest.err conftest.$ac_ext
a21616bd 11172fi
ba5da88a 11173echo "$as_me:11173: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11174echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11175if test `eval echo '${'$as_ac_Header'}'` = yes; then
11176 cat >>confdefs.h <<EOF
11177#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 11178EOF
503d2be0 11179
a21616bd
KR
11180fi
11181done
11182
11183fi
11184done
11185
11186fi
11187done
11188
11189 fi
503d2be0
AS
11190
11191for ac_header in com_err.h
a21616bd 11192do
503d2be0 11193as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ba5da88a 11194echo "$as_me:11194: checking for $ac_header" >&5
503d2be0
AS
11195echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11196if eval "test \"\${$as_ac_Header+set}\" = set"; then
11197 echo $ECHO_N "(cached) $ECHO_C" >&6
11198else
11199 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 11200#line 11200 "configure"
503d2be0
AS
11201#include "confdefs.h"
11202#include <$ac_header>
11203_ACEOF
ba5da88a 11204if { (eval echo "$as_me:11204: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11205 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11206 ac_status=$?
11207 egrep -v '^ *\+' conftest.er1 >conftest.err
11208 rm -f conftest.er1
11209 cat conftest.err >&5
ba5da88a 11210 echo "$as_me:11210: \$? = $ac_status" >&5
503d2be0
AS
11211 (exit $ac_status); } >/dev/null; then
11212 if test -s conftest.err; then
11213 ac_cpp_err=$ac_c_preproc_warn_flag
11214 else
11215 ac_cpp_err=
11216 fi
11217else
11218 ac_cpp_err=yes
11219fi
11220if test -z "$ac_cpp_err"; then
11221 eval "$as_ac_Header=yes"
11222else
11223 echo "$as_me: failed program was:" >&5
a21616bd 11224 cat conftest.$ac_ext >&5
503d2be0 11225 eval "$as_ac_Header=no"
a21616bd 11226fi
503d2be0 11227rm -f conftest.err conftest.$ac_ext
a21616bd 11228fi
ba5da88a 11229echo "$as_me:11229: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11230echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11231if test `eval echo '${'$as_ac_Header'}'` = yes; then
11232 cat >>confdefs.h <<EOF
11233#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 11234EOF
503d2be0 11235
a21616bd
KR
11236fi
11237done
11238
11239fi
11240
ba4481b5
DL
11241# Solaris requires -lintl if you want strerror (which calls dgettext)
11242# to return localized messages.
503d2be0 11243
ba5da88a 11244echo "$as_me:11244: checking for dgettext in -lintl" >&5
503d2be0
AS
11245echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
11246if test "${ac_cv_lib_intl_dgettext+set}" = set; then
11247 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11248else
503d2be0 11249 ac_check_lib_save_LIBS=$LIBS
ba4481b5 11250LIBS="-lintl $LIBS"
503d2be0 11251cat >conftest.$ac_ext <<_ACEOF
ba5da88a 11252#line 11252 "configure"
ba4481b5 11253#include "confdefs.h"
503d2be0 11254
ba4481b5 11255/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11256#ifdef __cplusplus
11257extern "C"
11258#endif
ba4481b5 11259/* We use char because int might match the return type of a gcc2
503d2be0
AS
11260 builtin and then its argument prototype would still apply. */
11261char dgettext ();
11262int
11263main ()
11264{
11265dgettext ();
11266 ;
11267 return 0;
11268}
11269_ACEOF
11270rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 11271if { (eval echo "$as_me:11271: \"$ac_link\"") >&5
503d2be0
AS
11272 (eval $ac_link) 2>&5
11273 ac_status=$?
ba5da88a 11274 echo "$as_me:11274: \$? = $ac_status" >&5
503d2be0
AS
11275 (exit $ac_status); } &&
11276 { ac_try='test -s conftest$ac_exeext'
ba5da88a 11277 { (eval echo "$as_me:11277: \"$ac_try\"") >&5
503d2be0
AS
11278 (eval $ac_try) 2>&5
11279 ac_status=$?
ba5da88a 11280 echo "$as_me:11280: \$? = $ac_status" >&5
503d2be0
AS
11281 (exit $ac_status); }; }; then
11282 ac_cv_lib_intl_dgettext=yes
11283else
11284 echo "$as_me: failed program was:" >&5
11285cat conftest.$ac_ext >&5
11286ac_cv_lib_intl_dgettext=no
11287fi
11288rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11289LIBS=$ac_check_lib_save_LIBS
11290fi
ba5da88a 11291echo "$as_me:11291: result: $ac_cv_lib_intl_dgettext" >&5
503d2be0
AS
11292echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
11293if test $ac_cv_lib_intl_dgettext = yes; then
11294 cat >>confdefs.h <<EOF
11295#define HAVE_LIBINTL 1
ba4481b5
DL
11296EOF
11297
11298 LIBS="-lintl $LIBS"
11299
ba4481b5
DL
11300fi
11301
ba5da88a 11302echo "$as_me:11302: checking whether localtime caches TZ" >&5
503d2be0
AS
11303echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6
11304if test "${emacs_cv_localtime_cache+set}" = set; then
11305 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
11306else
11307 if test x$ac_cv_func_tzset = xyes; then
11308if test "$cross_compiling" = yes; then
11309 # If we have tzset, assume the worst when cross-compiling.
11310emacs_cv_localtime_cache=yes
11311else
503d2be0 11312 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 11313#line 11313 "configure"
ba4481b5
DL
11314#include "confdefs.h"
11315#include <time.h>
ba4481b5
DL
11316extern char **environ;
11317unset_TZ ()
11318{
11319 char **from, **to;
11320 for (to = from = environ; (*to = *from); from++)
11321 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11322 to++;
11323}
11324char TZ_GMT0[] = "TZ=GMT0";
11325char TZ_PST8[] = "TZ=PST8";
11326main()
11327{
11328 time_t now = time ((time_t *) 0);
11329 int hour_GMT0, hour_unset;
11330 if (putenv (TZ_GMT0) != 0)
11331 exit (1);
11332 hour_GMT0 = localtime (&now)->tm_hour;
11333 unset_TZ ();
11334 hour_unset = localtime (&now)->tm_hour;
11335 if (putenv (TZ_PST8) != 0)
11336 exit (1);
11337 if (localtime (&now)->tm_hour == hour_GMT0)
11338 exit (1);
11339 unset_TZ ();
11340 if (localtime (&now)->tm_hour != hour_unset)
11341 exit (1);
11342 exit (0);
11343}
503d2be0
AS
11344_ACEOF
11345rm -f conftest$ac_exeext
ba5da88a 11346if { (eval echo "$as_me:11346: \"$ac_link\"") >&5
503d2be0
AS
11347 (eval $ac_link) 2>&5
11348 ac_status=$?
ba5da88a 11349 echo "$as_me:11349: \$? = $ac_status" >&5
503d2be0 11350 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ba5da88a 11351 { (eval echo "$as_me:11351: \"$ac_try\"") >&5
503d2be0
AS
11352 (eval $ac_try) 2>&5
11353 ac_status=$?
ba5da88a 11354 echo "$as_me:11354: \$? = $ac_status" >&5
503d2be0 11355 (exit $ac_status); }; }; then
ba4481b5
DL
11356 emacs_cv_localtime_cache=no
11357else
503d2be0
AS
11358 echo "$as_me: program exited with status $ac_status" >&5
11359echo "$as_me: failed program was:" >&5
11360cat conftest.$ac_ext >&5
11361emacs_cv_localtime_cache=yes
ba4481b5 11362fi
503d2be0 11363rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 11364fi
ba4481b5
DL
11365else
11366 # If we lack tzset, report that localtime does not cache TZ,
11367 # since we can't invalidate the cache if we don't have tzset.
11368 emacs_cv_localtime_cache=no
11369fi
11370fi
ba5da88a 11371echo "$as_me:11371: result: $emacs_cv_localtime_cache" >&5
503d2be0 11372echo "${ECHO_T}$emacs_cv_localtime_cache" >&6
ba4481b5 11373if test $emacs_cv_localtime_cache = yes; then
503d2be0 11374 cat >>confdefs.h <<\EOF
ba4481b5
DL
11375#define LOCALTIME_CACHE 1
11376EOF
11377
11378fi
11379
11380if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
11381
11382for ac_func in gettimeofday
48d4b120 11383do
503d2be0 11384as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ba5da88a 11385echo "$as_me:11385: checking for $ac_func" >&5
503d2be0
AS
11386echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11387if eval "test \"\${$as_ac_var+set}\" = set"; then
11388 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 11389else
503d2be0 11390 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 11391#line 11391 "configure"
48d4b120
DL
11392#include "confdefs.h"
11393/* System header to define __stub macros and hopefully few prototypes,
503d2be0 11394 which can conflict with char $ac_func (); below. */
48d4b120
DL
11395#include <assert.h>
11396/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11397#ifdef __cplusplus
11398extern "C"
11399#endif
48d4b120 11400/* We use char because int might match the return type of a gcc2
503d2be0
AS
11401 builtin and then its argument prototype would still apply. */
11402char $ac_func ();
11403char (*f) ();
48d4b120 11404
503d2be0
AS
11405int
11406main ()
11407{
48d4b120
DL
11408/* The GNU C library defines this for functions which it implements
11409 to always fail with ENOSYS. Some functions are actually named
11410 something starting with __ and the normal name is an alias. */
11411#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11412choke me
11413#else
503d2be0 11414f = $ac_func;
48d4b120
DL
11415#endif
11416
503d2be0
AS
11417 ;
11418 return 0;
11419}
11420_ACEOF
11421rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 11422if { (eval echo "$as_me:11422: \"$ac_link\"") >&5
503d2be0
AS
11423 (eval $ac_link) 2>&5
11424 ac_status=$?
ba5da88a 11425 echo "$as_me:11425: \$? = $ac_status" >&5
503d2be0
AS
11426 (exit $ac_status); } &&
11427 { ac_try='test -s conftest$ac_exeext'
ba5da88a 11428 { (eval echo "$as_me:11428: \"$ac_try\"") >&5
503d2be0
AS
11429 (eval $ac_try) 2>&5
11430 ac_status=$?
ba5da88a 11431 echo "$as_me:11431: \$? = $ac_status" >&5
503d2be0
AS
11432 (exit $ac_status); }; }; then
11433 eval "$as_ac_var=yes"
11434else
11435 echo "$as_me: failed program was:" >&5
11436cat conftest.$ac_ext >&5
11437eval "$as_ac_var=no"
11438fi
11439rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11440fi
ba5da88a 11441echo "$as_me:11441: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
11442echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11443if test `eval echo '${'$as_ac_var'}'` = yes; then
11444 cat >>confdefs.h <<EOF
11445#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
48d4b120 11446EOF
48d4b120 11447
48d4b120
DL
11448fi
11449done
11450
ba5da88a 11451 echo "$as_me:11451: checking whether gettimeofday can accept two arguments" >&5
503d2be0
AS
11452echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6
11453if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
11454 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11455else
503d2be0 11456 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 11457#line 11457 "configure"
a3f08d9e 11458#include "confdefs.h"
ba4481b5 11459
a3f08d9e
DL
11460#ifdef TIME_WITH_SYS_TIME
11461#include <sys/time.h>
11462#include <time.h>
11463#else
11464#ifdef HAVE_SYS_TIME_H
11465#include <sys/time.h>
11466#else
11467#include <time.h>
11468#endif
11469#endif
503d2be0
AS
11470int
11471main ()
11472{
a3f08d9e 11473struct timeval time;
48d4b120 11474 gettimeofday (&time, 0);
503d2be0
AS
11475 ;
11476 return 0;
11477}
11478_ACEOF
11479rm -f conftest.$ac_objext
ba5da88a 11480if { (eval echo "$as_me:11480: \"$ac_compile\"") >&5
503d2be0
AS
11481 (eval $ac_compile) 2>&5
11482 ac_status=$?
ba5da88a 11483 echo "$as_me:11483: \$? = $ac_status" >&5
503d2be0
AS
11484 (exit $ac_status); } &&
11485 { ac_try='test -s conftest.$ac_objext'
ba5da88a 11486 { (eval echo "$as_me:11486: \"$ac_try\"") >&5
503d2be0
AS
11487 (eval $ac_try) 2>&5
11488 ac_status=$?
ba5da88a 11489 echo "$as_me:11489: \$? = $ac_status" >&5
503d2be0 11490 (exit $ac_status); }; }; then
ba4481b5
DL
11491 emacs_cv_gettimeofday_two_arguments=yes
11492else
503d2be0
AS
11493 echo "$as_me: failed program was:" >&5
11494cat conftest.$ac_ext >&5
11495emacs_cv_gettimeofday_two_arguments=no
ba4481b5 11496fi
503d2be0 11497rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 11498fi
ba5da88a 11499echo "$as_me:11499: result: $emacs_cv_gettimeofday_two_arguments" >&5
503d2be0 11500echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6
ba4481b5 11501 if test $emacs_cv_gettimeofday_two_arguments = no; then
503d2be0 11502 cat >>confdefs.h <<\EOF
ba4481b5
DL
11503#define GETTIMEOFDAY_ONE_ARGUMENT 1
11504EOF
11505
11506 fi
11507fi
11508
48d4b120 11509if test "$ac_cv_func_gettimeofday" = yes; then
ba5da88a 11510 echo "$as_me:11510: checking for struct timezone" >&5
503d2be0
AS
11511echo $ECHO_N "checking for struct timezone... $ECHO_C" >&6
11512if test "${emacs_cv_struct_timezone+set}" = set; then
11513 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 11514else
503d2be0 11515 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 11516#line 11516 "configure"
48d4b120
DL
11517#include "confdefs.h"
11518#include <sys/time.h>
503d2be0
AS
11519int
11520main ()
11521{
48d4b120 11522struct timezone tz;
503d2be0
AS
11523 ;
11524 return 0;
11525}
11526_ACEOF
11527rm -f conftest.$ac_objext
ba5da88a 11528if { (eval echo "$as_me:11528: \"$ac_compile\"") >&5
503d2be0
AS
11529 (eval $ac_compile) 2>&5
11530 ac_status=$?
ba5da88a 11531 echo "$as_me:11531: \$? = $ac_status" >&5
503d2be0
AS
11532 (exit $ac_status); } &&
11533 { ac_try='test -s conftest.$ac_objext'
ba5da88a 11534 { (eval echo "$as_me:11534: \"$ac_try\"") >&5
503d2be0
AS
11535 (eval $ac_try) 2>&5
11536 ac_status=$?
ba5da88a 11537 echo "$as_me:11537: \$? = $ac_status" >&5
503d2be0 11538 (exit $ac_status); }; }; then
48d4b120
DL
11539 if test "$cross_compiling" = yes; then
11540 emacs_cv_struct_timezone=yes
11541else
503d2be0 11542 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 11543#line 11543 "configure"
48d4b120
DL
11544#include "confdefs.h"
11545
11546#ifdef TIME_WITH_SYS_TIME
11547#include <sys/time.h>
11548#include <time.h>
11549#else
11550#ifdef HAVE_SYS_TIME_H
11551#include <sys/time.h>
11552#else
11553#include <time.h>
11554#endif
11555#endif
11556main () {
11557 struct timeval time;
11558 struct timezone dummy;
11559 exit (gettimeofday (&time, &dummy));
11560}
503d2be0
AS
11561_ACEOF
11562rm -f conftest$ac_exeext
ba5da88a 11563if { (eval echo "$as_me:11563: \"$ac_link\"") >&5
503d2be0
AS
11564 (eval $ac_link) 2>&5
11565 ac_status=$?
ba5da88a 11566 echo "$as_me:11566: \$? = $ac_status" >&5
503d2be0 11567 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ba5da88a 11568 { (eval echo "$as_me:11568: \"$ac_try\"") >&5
503d2be0
AS
11569 (eval $ac_try) 2>&5
11570 ac_status=$?
ba5da88a 11571 echo "$as_me:11571: \$? = $ac_status" >&5
503d2be0 11572 (exit $ac_status); }; }; then
48d4b120
DL
11573 emacs_cv_struct_timezone=yes
11574else
503d2be0
AS
11575 echo "$as_me: program exited with status $ac_status" >&5
11576echo "$as_me: failed program was:" >&5
11577cat conftest.$ac_ext >&5
11578emacs_cv_struct_timezone=no
48d4b120 11579fi
503d2be0 11580rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
48d4b120 11581fi
48d4b120 11582else
503d2be0
AS
11583 echo "$as_me: failed program was:" >&5
11584cat conftest.$ac_ext >&5
11585emacs_cv_struct_timezone=no
48d4b120 11586fi
503d2be0 11587rm -f conftest.$ac_objext conftest.$ac_ext
48d4b120 11588fi
ba5da88a 11589echo "$as_me:11589: result: $emacs_cv_struct_timezone" >&5
503d2be0 11590echo "${ECHO_T}$emacs_cv_struct_timezone" >&6
48d4b120
DL
11591fi
11592
ba4481b5 11593ok_so_far=yes
ba5da88a 11594echo "$as_me:11594: checking for socket" >&5
503d2be0
AS
11595echo $ECHO_N "checking for socket... $ECHO_C" >&6
11596if test "${ac_cv_func_socket+set}" = set; then
11597 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11598else
503d2be0 11599 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 11600#line 11600 "configure"
ba4481b5
DL
11601#include "confdefs.h"
11602/* System header to define __stub macros and hopefully few prototypes,
503d2be0 11603 which can conflict with char socket (); below. */
ba4481b5
DL
11604#include <assert.h>
11605/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11606#ifdef __cplusplus
11607extern "C"
11608#endif
ba4481b5 11609/* We use char because int might match the return type of a gcc2
503d2be0
AS
11610 builtin and then its argument prototype would still apply. */
11611char socket ();
11612char (*f) ();
ba4481b5 11613
503d2be0
AS
11614int
11615main ()
11616{
ba4481b5
DL
11617/* The GNU C library defines this for functions which it implements
11618 to always fail with ENOSYS. Some functions are actually named
11619 something starting with __ and the normal name is an alias. */
11620#if defined (__stub_socket) || defined (__stub___socket)
11621choke me
11622#else
503d2be0 11623f = socket;
ba4481b5
DL
11624#endif
11625
503d2be0
AS
11626 ;
11627 return 0;
11628}
11629_ACEOF
11630rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 11631if { (eval echo "$as_me:11631: \"$ac_link\"") >&5
503d2be0
AS
11632 (eval $ac_link) 2>&5
11633 ac_status=$?
ba5da88a 11634 echo "$as_me:11634: \$? = $ac_status" >&5
503d2be0
AS
11635 (exit $ac_status); } &&
11636 { ac_try='test -s conftest$ac_exeext'
ba5da88a 11637 { (eval echo "$as_me:11637: \"$ac_try\"") >&5
503d2be0
AS
11638 (eval $ac_try) 2>&5
11639 ac_status=$?
ba5da88a 11640 echo "$as_me:11640: \$? = $ac_status" >&5
503d2be0
AS
11641 (exit $ac_status); }; }; then
11642 ac_cv_func_socket=yes
11643else
11644 echo "$as_me: failed program was:" >&5
11645cat conftest.$ac_ext >&5
11646ac_cv_func_socket=no
11647fi
11648rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11649fi
ba5da88a 11650echo "$as_me:11650: result: $ac_cv_func_socket" >&5
503d2be0
AS
11651echo "${ECHO_T}$ac_cv_func_socket" >&6
11652if test $ac_cv_func_socket = yes; then
ba4481b5
DL
11653 :
11654else
503d2be0 11655 ok_so_far=no
ba4481b5
DL
11656fi
11657
11658if test $ok_so_far = yes; then
ba5da88a 11659 echo "$as_me:11659: checking for netinet/in.h" >&5
503d2be0
AS
11660echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
11661if test "${ac_cv_header_netinet_in_h+set}" = set; then
11662 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11663else
503d2be0 11664 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 11665#line 11665 "configure"
ba4481b5
DL
11666#include "confdefs.h"
11667#include <netinet/in.h>
503d2be0 11668_ACEOF
ba5da88a 11669if { (eval echo "$as_me:11669: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11670 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11671 ac_status=$?
11672 egrep -v '^ *\+' conftest.er1 >conftest.err
11673 rm -f conftest.er1
11674 cat conftest.err >&5
ba5da88a 11675 echo "$as_me:11675: \$? = $ac_status" >&5
503d2be0
AS
11676 (exit $ac_status); } >/dev/null; then
11677 if test -s conftest.err; then
11678 ac_cpp_err=$ac_c_preproc_warn_flag
11679 else
11680 ac_cpp_err=
11681 fi
11682else
11683 ac_cpp_err=yes
11684fi
11685if test -z "$ac_cpp_err"; then
11686 ac_cv_header_netinet_in_h=yes
ba4481b5 11687else
503d2be0 11688 echo "$as_me: failed program was:" >&5
ba4481b5 11689 cat conftest.$ac_ext >&5
503d2be0 11690 ac_cv_header_netinet_in_h=no
ba4481b5 11691fi
503d2be0 11692rm -f conftest.err conftest.$ac_ext
ba4481b5 11693fi
ba5da88a 11694echo "$as_me:11694: result: $ac_cv_header_netinet_in_h" >&5
503d2be0
AS
11695echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
11696if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
11697 :
11698else
503d2be0 11699 ok_so_far=no
ba4481b5
DL
11700fi
11701
11702fi
11703if test $ok_so_far = yes; then
ba5da88a 11704 echo "$as_me:11704: checking for arpa/inet.h" >&5
503d2be0
AS
11705echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
11706if test "${ac_cv_header_arpa_inet_h+set}" = set; then
11707 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11708else
503d2be0 11709 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 11710#line 11710 "configure"
ba4481b5
DL
11711#include "confdefs.h"
11712#include <arpa/inet.h>
503d2be0 11713_ACEOF
ba5da88a 11714if { (eval echo "$as_me:11714: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11715 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11716 ac_status=$?
11717 egrep -v '^ *\+' conftest.er1 >conftest.err
11718 rm -f conftest.er1
11719 cat conftest.err >&5
ba5da88a 11720 echo "$as_me:11720: \$? = $ac_status" >&5
503d2be0
AS
11721 (exit $ac_status); } >/dev/null; then
11722 if test -s conftest.err; then
11723 ac_cpp_err=$ac_c_preproc_warn_flag
11724 else
11725 ac_cpp_err=
11726 fi
11727else
11728 ac_cpp_err=yes
11729fi
11730if test -z "$ac_cpp_err"; then
11731 ac_cv_header_arpa_inet_h=yes
ba4481b5 11732else
503d2be0 11733 echo "$as_me: failed program was:" >&5
ba4481b5 11734 cat conftest.$ac_ext >&5
503d2be0 11735 ac_cv_header_arpa_inet_h=no
ba4481b5 11736fi
503d2be0 11737rm -f conftest.err conftest.$ac_ext
ba4481b5 11738fi
ba5da88a 11739echo "$as_me:11739: result: $ac_cv_header_arpa_inet_h" >&5
503d2be0
AS
11740echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
11741if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
11742 :
11743else
503d2be0 11744 ok_so_far=no
ba4481b5
DL
11745fi
11746
11747fi
11748if test $ok_so_far = yes; then
503d2be0 11749 cat >>confdefs.h <<\EOF
ba4481b5
DL
11750#define HAVE_INET_SOCKETS 1
11751EOF
11752
11753fi
11754
11755if test -f /usr/lpp/X11/bin/smt.exp; then
503d2be0 11756 cat >>confdefs.h <<\EOF
ba4481b5
DL
11757#define HAVE_AIX_SMT_EXP 1
11758EOF
11759
11760fi
11761
ba5da88a 11762echo "$as_me:11762: checking whether system supports dynamic ptys" >&5
503d2be0 11763echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6
3d9fec71 11764if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
ba5da88a 11765 echo "$as_me:11765: result: yes" >&5
503d2be0
AS
11766echo "${ECHO_T}yes" >&6
11767 cat >>confdefs.h <<\EOF
3d9fec71
DL
11768#define HAVE_DEV_PTMX 1
11769EOF
11770
11771else
ba5da88a 11772 echo "$as_me:11772: result: no" >&5
503d2be0 11773echo "${ECHO_T}no" >&6
3d9fec71
DL
11774fi
11775
ba5da88a 11776echo "$as_me:11776: checking for pid_t" >&5
503d2be0
AS
11777echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
11778if test "${ac_cv_type_pid_t+set}" = set; then
11779 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 11780else
503d2be0 11781 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 11782#line 11782 "configure"
647847ea 11783#include "confdefs.h"
503d2be0
AS
11784$ac_includes_default
11785int
11786main ()
11787{
11788if ((pid_t *) 0)
11789 return 0;
11790if (sizeof (pid_t))
11791 return 0;
11792 ;
11793 return 0;
11794}
11795_ACEOF
11796rm -f conftest.$ac_objext
ba5da88a 11797if { (eval echo "$as_me:11797: \"$ac_compile\"") >&5
503d2be0
AS
11798 (eval $ac_compile) 2>&5
11799 ac_status=$?
ba5da88a 11800 echo "$as_me:11800: \$? = $ac_status" >&5
503d2be0
AS
11801 (exit $ac_status); } &&
11802 { ac_try='test -s conftest.$ac_objext'
ba5da88a 11803 { (eval echo "$as_me:11803: \"$ac_try\"") >&5
503d2be0
AS
11804 (eval $ac_try) 2>&5
11805 ac_status=$?
ba5da88a 11806 echo "$as_me:11806: \$? = $ac_status" >&5
503d2be0 11807 (exit $ac_status); }; }; then
647847ea
DL
11808 ac_cv_type_pid_t=yes
11809else
503d2be0
AS
11810 echo "$as_me: failed program was:" >&5
11811cat conftest.$ac_ext >&5
11812ac_cv_type_pid_t=no
647847ea 11813fi
503d2be0 11814rm -f conftest.$ac_objext conftest.$ac_ext
647847ea 11815fi
ba5da88a 11816echo "$as_me:11816: result: $ac_cv_type_pid_t" >&5
503d2be0
AS
11817echo "${ECHO_T}$ac_cv_type_pid_t" >&6
11818if test $ac_cv_type_pid_t = yes; then
11819 :
11820else
11821
11822cat >>confdefs.h <<EOF
647847ea
DL
11823#define pid_t int
11824EOF
11825
11826fi
11827
503d2be0
AS
11828for ac_header in unistd.h vfork.h
11829do
11830as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ba5da88a 11831echo "$as_me:11831: checking for $ac_header" >&5
503d2be0
AS
11832echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11833if eval "test \"\${$as_ac_Header+set}\" = set"; then
11834 echo $ECHO_N "(cached) $ECHO_C" >&6
11835else
11836 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 11837#line 11837 "configure"
503d2be0
AS
11838#include "confdefs.h"
11839#include <$ac_header>
11840_ACEOF
ba5da88a 11841if { (eval echo "$as_me:11841: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11842 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11843 ac_status=$?
11844 egrep -v '^ *\+' conftest.er1 >conftest.err
11845 rm -f conftest.er1
11846 cat conftest.err >&5
ba5da88a 11847 echo "$as_me:11847: \$? = $ac_status" >&5
503d2be0
AS
11848 (exit $ac_status); } >/dev/null; then
11849 if test -s conftest.err; then
11850 ac_cpp_err=$ac_c_preproc_warn_flag
11851 else
11852 ac_cpp_err=
11853 fi
647847ea 11854else
503d2be0
AS
11855 ac_cpp_err=yes
11856fi
11857if test -z "$ac_cpp_err"; then
11858 eval "$as_ac_Header=yes"
647847ea 11859else
503d2be0 11860 echo "$as_me: failed program was:" >&5
647847ea 11861 cat conftest.$ac_ext >&5
503d2be0 11862 eval "$as_ac_Header=no"
647847ea 11863fi
503d2be0 11864rm -f conftest.err conftest.$ac_ext
647847ea 11865fi
ba5da88a 11866echo "$as_me:11866: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11867echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11868if test `eval echo '${'$as_ac_Header'}'` = yes; then
11869 cat >>confdefs.h <<EOF
11870#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
647847ea
DL
11871EOF
11872
73b77ee5 11873fi
503d2be0 11874done
73b77ee5 11875
503d2be0
AS
11876for ac_func in fork vfork
11877do
11878as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ba5da88a 11879echo "$as_me:11879: checking for $ac_func" >&5
503d2be0
AS
11880echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11881if eval "test \"\${$as_ac_var+set}\" = set"; then
11882 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 11883else
503d2be0 11884 cat >conftest.$ac_ext <<_ACEOF
ba5da88a 11885#line 11885 "configure"
fa0b693c
GM
11886#include "confdefs.h"
11887/* System header to define __stub macros and hopefully few prototypes,
503d2be0 11888 which can conflict with char $ac_func (); below. */
fa0b693c
GM
11889#include <assert.h>
11890/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11891#ifdef __cplusplus
11892extern "C"
11893#endif
fa0b693c 11894/* We use char because int might match the return type of a gcc2
503d2be0
AS
11895 builtin and then its argument prototype would still apply. */
11896char $ac_func ();
11897char (*f) ();
fa0b693c 11898
503d2be0
AS
11899int
11900main ()
11901{
fa0b693c
GM
11902/* The GNU C library defines this for functions which it implements
11903 to always fail with ENOSYS. Some functions are actually named
11904 something starting with __ and the normal name is an alias. */
503d2be0 11905#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
fa0b693c
GM
11906choke me
11907#else
503d2be0 11908f = $ac_func;
fa0b693c
GM
11909#endif
11910
503d2be0
AS
11911 ;
11912 return 0;
11913}
11914_ACEOF
11915rm -f conftest.$ac_objext conftest$ac_exeext
ba5da88a 11916if { (eval echo "$as_me:11916: \"$ac_link\"") >&5
503d2be0
AS
11917 (eval $ac_link) 2>&5
11918 ac_status=$?
ba5da88a 11919 echo "$as_me:11919: \$? = $ac_status" >&5
503d2be0
AS
11920 (exit $ac_status); } &&
11921 { ac_try='test -s conftest$ac_exeext'
ba5da88a 11922 { (eval echo "$as_me:11922: \"$ac_try\"") >&5
503d2be0
AS
11923 (eval $ac_try) 2>&5
11924 ac_status=$?
ba5da88a 11925 echo "$as_me:11925: \$? = $ac_status" >&5
503d2be0
AS
11926 (exit $ac_status); }; }; then
11927 eval "$as_ac_var=yes"
11928else
11929 echo "$as_me: failed program was:" >&5
11930cat conftest.$ac_ext >&5
11931eval "$as_ac_var=no"
11932fi
11933rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11934fi
ba5da88a 11935echo "$as_me:11935: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
11936echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11937if test `eval echo '${'$as_ac_var'}'` = yes; then
11938 cat >>confdefs.h <<EOF
11939#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
fa0b693c 11940EOF
503d2be0 11941
fa0b693c 11942fi
503d2be0 11943done
fa0b693c 11944
503d2be0
AS
11945ac_cv_func_fork_works=$ac_cv_func_fork
11946if test "x$ac_cv_func_fork" = xyes; then
ba5da88a 11947 echo "$as_me:11947: checking for working fork" >&5
503d2be0
AS
11948echo $ECHO_N "checking for working fork... $ECHO_C" >&6
11949if test "${ac_cv_func_fork_works+set}" = set; then
11950 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 11951else
503d2be0
AS
11952 if test "$cross_compiling" = yes; then
11953 ac_cv_func_fork_works=cross
11954else
11955 cat >conftest.$ac_ext <<_ACEOF
11956