(struct face) <colors_copied_bitwise_p>: New
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
503d2be0 3# Generated by Autoconf 2.52.
ba4481b5 4#
503d2be0
AS
5# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
6# Free Software Foundation, Inc.
ba4481b5
DL
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
503d2be0
AS
10# Avoid depending upon Character Ranges.
11as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14as_cr_digits='0123456789'
15as_cr_alnum=$as_cr_Letters$as_cr_digits
16
17# Sed expression to map a string onto a valid variable name.
18as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19
20# Sed expression to map a string onto a valid CPP name.
21as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
22
23# Be Bourne compatible
24if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25 emulate sh
26 NULLCMD=:
27elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28 set -o posix
29fi
30
31# Name of the executable.
32as_me=`echo "$0" |sed 's,.*[\\/],,'`
33
34if expr a : '\(a\)' >/dev/null 2>&1; then
35 as_expr=expr
36else
37 as_expr=false
38fi
39
40rm -f conf$$ conf$$.exe conf$$.file
41echo >conf$$.file
42if ln -s conf$$.file conf$$ 2>/dev/null; then
43 # We could just check for DJGPP; but this test a) works b) is more generic
44 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45 if test -f conf$$.exe; then
46 # Don't use ln at all; we don't have any links
47 as_ln_s='cp -p'
48 else
49 as_ln_s='ln -s'
50 fi
51elif ln conf$$.file conf$$ 2>/dev/null; then
52 as_ln_s=ln
53else
54 as_ln_s='cp -p'
55fi
56rm -f conf$$ conf$$.exe conf$$.file
57
58as_executable_p="test -f"
59
60# Support unset when possible.
61if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
62 as_unset=unset
63else
64 as_unset=false
65fi
66
67# NLS nuisances.
68$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
69$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
70$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
71$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
72$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
73$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
74$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
75$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
76
77# IFS
78# We need space, tab and new line, in precisely that order.
79as_nl='
80'
81IFS=" $as_nl"
82
83# CDPATH.
84$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
85
86# Name of the host.
87# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
88# so uname gets run too.
89ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
90
91exec 6>&1
92
93#
94# Initializations.
95#
ba4481b5 96ac_default_prefix=/usr/local
503d2be0
AS
97cross_compiling=no
98subdirs=
99MFLAGS= MAKEFLAGS=
100SHELL=${CONFIG_SHELL-/bin/sh}
101
102# Maximum number of lines to put in a shell here document.
103# This variable seems obsolete. It should probably be removed, and
104# only ac_max_sed_lines should be used.
105: ${ac_max_here_lines=38}
106
107ac_unique_file="src/lisp.h"
108# Factoring default headers for most tests.
109ac_includes_default="\
110#include <stdio.h>
111#if HAVE_SYS_TYPES_H
112# include <sys/types.h>
113#endif
114#if HAVE_SYS_STAT_H
115# include <sys/stat.h>
116#endif
117#if STDC_HEADERS
118# include <stdlib.h>
119# include <stddef.h>
120#else
121# if HAVE_STDLIB_H
122# include <stdlib.h>
123# endif
124#endif
125#if HAVE_STRING_H
126# if !STDC_HEADERS && HAVE_MEMORY_H
127# include <memory.h>
128# endif
129# include <string.h>
130#endif
131#if HAVE_STRINGS_H
132# include <strings.h>
133#endif
134#if HAVE_INTTYPES_H
135# include <inttypes.h>
136#else
137# if HAVE_STDINT_H
138# include <stdint.h>
139# endif
140#endif
141#if HAVE_UNISTD_H
142# include <unistd.h>
143#endif"
ba4481b5
DL
144
145# Initialize some variables set by options.
503d2be0
AS
146ac_init_help=
147ac_init_version=false
ba4481b5
DL
148# The variables have the same names as the options, with
149# dashes changed to underlines.
503d2be0 150cache_file=/dev/null
ba4481b5 151exec_prefix=NONE
ba4481b5 152no_create=
ba4481b5
DL
153no_recursion=
154prefix=NONE
155program_prefix=NONE
156program_suffix=NONE
157program_transform_name=s,x,x,
158silent=
159site=
160srcdir=
ba4481b5
DL
161verbose=
162x_includes=NONE
163x_libraries=NONE
503d2be0
AS
164
165# Installation directory options.
166# These are left unexpanded so users can "make install exec_prefix=/foo"
167# and all the variables that are supposed to be based on exec_prefix
168# by default will actually change.
169# Use braces instead of parens because sh, perl, etc. also accept them.
ba4481b5
DL
170bindir='${exec_prefix}/bin'
171sbindir='${exec_prefix}/sbin'
172libexecdir='${exec_prefix}/libexec'
173datadir='${prefix}/share'
174sysconfdir='${prefix}/etc'
175sharedstatedir='${prefix}/com'
176localstatedir='${prefix}/var'
177libdir='${exec_prefix}/lib'
178includedir='${prefix}/include'
179oldincludedir='/usr/include'
180infodir='${prefix}/info'
181mandir='${prefix}/man'
182
503d2be0
AS
183# Identity of this package.
184PACKAGE_NAME=
185PACKAGE_TARNAME=
186PACKAGE_VERSION=
187PACKAGE_STRING=
188PACKAGE_BUGREPORT=
ba4481b5
DL
189
190ac_prev=
191for ac_option
192do
ba4481b5
DL
193 # If the previous option needs an argument, assign it.
194 if test -n "$ac_prev"; then
195 eval "$ac_prev=\$ac_option"
196 ac_prev=
197 continue
198 fi
199
503d2be0 200 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
ba4481b5
DL
201
202 # Accept the important Cygnus configure options, so we can diagnose typos.
203
503d2be0 204 case $ac_option in
ba4481b5
DL
205
206 -bindir | --bindir | --bindi | --bind | --bin | --bi)
207 ac_prev=bindir ;;
208 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 209 bindir=$ac_optarg ;;
ba4481b5
DL
210
211 -build | --build | --buil | --bui | --bu)
503d2be0 212 ac_prev=build_alias ;;
ba4481b5 213 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 214 build_alias=$ac_optarg ;;
ba4481b5
DL
215
216 -cache-file | --cache-file | --cache-fil | --cache-fi \
217 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
218 ac_prev=cache_file ;;
219 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
220 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
221 cache_file=$ac_optarg ;;
222
223 --config-cache | -C)
224 cache_file=config.cache ;;
ba4481b5
DL
225
226 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
227 ac_prev=datadir ;;
228 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
229 | --da=*)
503d2be0 230 datadir=$ac_optarg ;;
ba4481b5
DL
231
232 -disable-* | --disable-*)
503d2be0 233 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 234 # Reject names that are not valid shell variable names.
503d2be0
AS
235 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
236 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
237 { (exit 1); exit 1; }; }
238 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
239 eval "enable_$ac_feature=no" ;;
ba4481b5
DL
240
241 -enable-* | --enable-*)
503d2be0 242 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 243 # Reject names that are not valid shell variable names.
503d2be0
AS
244 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246 { (exit 1); exit 1; }; }
247 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248 case $ac_option in
249 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
ba4481b5
DL
250 *) ac_optarg=yes ;;
251 esac
503d2be0 252 eval "enable_$ac_feature='$ac_optarg'" ;;
ba4481b5
DL
253
254 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
255 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
256 | --exec | --exe | --ex)
257 ac_prev=exec_prefix ;;
258 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
259 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
260 | --exec=* | --exe=* | --ex=*)
503d2be0 261 exec_prefix=$ac_optarg ;;
ba4481b5
DL
262
263 -gas | --gas | --ga | --g)
264 # Obsolete; use --with-gas.
265 with_gas=yes ;;
266
503d2be0
AS
267 -help | --help | --hel | --he | -h)
268 ac_init_help=long ;;
269 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
270 ac_init_help=recursive ;;
271 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
272 ac_init_help=short ;;
ba4481b5
DL
273
274 -host | --host | --hos | --ho)
503d2be0 275 ac_prev=host_alias ;;
ba4481b5 276 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 277 host_alias=$ac_optarg ;;
ba4481b5
DL
278
279 -includedir | --includedir | --includedi | --included | --include \
280 | --includ | --inclu | --incl | --inc)
281 ac_prev=includedir ;;
282 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
283 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 284 includedir=$ac_optarg ;;
ba4481b5
DL
285
286 -infodir | --infodir | --infodi | --infod | --info | --inf)
287 ac_prev=infodir ;;
288 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 289 infodir=$ac_optarg ;;
ba4481b5
DL
290
291 -libdir | --libdir | --libdi | --libd)
292 ac_prev=libdir ;;
293 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 294 libdir=$ac_optarg ;;
ba4481b5
DL
295
296 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
297 | --libexe | --libex | --libe)
298 ac_prev=libexecdir ;;
299 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
300 | --libexe=* | --libex=* | --libe=*)
503d2be0 301 libexecdir=$ac_optarg ;;
ba4481b5
DL
302
303 -localstatedir | --localstatedir | --localstatedi | --localstated \
304 | --localstate | --localstat | --localsta | --localst \
305 | --locals | --local | --loca | --loc | --lo)
306 ac_prev=localstatedir ;;
307 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
308 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
309 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
503d2be0 310 localstatedir=$ac_optarg ;;
ba4481b5
DL
311
312 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
313 ac_prev=mandir ;;
314 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 315 mandir=$ac_optarg ;;
ba4481b5
DL
316
317 -nfp | --nfp | --nf)
318 # Obsolete; use --without-fp.
319 with_fp=no ;;
320
321 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
322 | --no-cr | --no-c)
323 no_create=yes ;;
324
325 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
326 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
327 no_recursion=yes ;;
328
329 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
330 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
331 | --oldin | --oldi | --old | --ol | --o)
332 ac_prev=oldincludedir ;;
333 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
334 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
335 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 336 oldincludedir=$ac_optarg ;;
ba4481b5
DL
337
338 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
339 ac_prev=prefix ;;
340 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 341 prefix=$ac_optarg ;;
ba4481b5
DL
342
343 -program-prefix | --program-prefix | --program-prefi | --program-pref \
344 | --program-pre | --program-pr | --program-p)
345 ac_prev=program_prefix ;;
346 -program-prefix=* | --program-prefix=* | --program-prefi=* \
347 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 348 program_prefix=$ac_optarg ;;
ba4481b5
DL
349
350 -program-suffix | --program-suffix | --program-suffi | --program-suff \
351 | --program-suf | --program-su | --program-s)
352 ac_prev=program_suffix ;;
353 -program-suffix=* | --program-suffix=* | --program-suffi=* \
354 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 355 program_suffix=$ac_optarg ;;
ba4481b5
DL
356
357 -program-transform-name | --program-transform-name \
358 | --program-transform-nam | --program-transform-na \
359 | --program-transform-n | --program-transform- \
360 | --program-transform | --program-transfor \
361 | --program-transfo | --program-transf \
362 | --program-trans | --program-tran \
363 | --progr-tra | --program-tr | --program-t)
364 ac_prev=program_transform_name ;;
365 -program-transform-name=* | --program-transform-name=* \
366 | --program-transform-nam=* | --program-transform-na=* \
367 | --program-transform-n=* | --program-transform-=* \
368 | --program-transform=* | --program-transfor=* \
369 | --program-transfo=* | --program-transf=* \
370 | --program-trans=* | --program-tran=* \
371 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 372 program_transform_name=$ac_optarg ;;
ba4481b5
DL
373
374 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
375 | -silent | --silent | --silen | --sile | --sil)
376 silent=yes ;;
377
378 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
379 ac_prev=sbindir ;;
380 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
381 | --sbi=* | --sb=*)
503d2be0 382 sbindir=$ac_optarg ;;
ba4481b5
DL
383
384 -sharedstatedir | --sharedstatedir | --sharedstatedi \
385 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
386 | --sharedst | --shareds | --shared | --share | --shar \
387 | --sha | --sh)
388 ac_prev=sharedstatedir ;;
389 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
390 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
391 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
392 | --sha=* | --sh=*)
503d2be0 393 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
394
395 -site | --site | --sit)
396 ac_prev=site ;;
397 -site=* | --site=* | --sit=*)
503d2be0 398 site=$ac_optarg ;;
ba4481b5
DL
399
400 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
401 ac_prev=srcdir ;;
402 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 403 srcdir=$ac_optarg ;;
ba4481b5
DL
404
405 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
406 | --syscon | --sysco | --sysc | --sys | --sy)
407 ac_prev=sysconfdir ;;
408 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
409 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 410 sysconfdir=$ac_optarg ;;
ba4481b5
DL
411
412 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 413 ac_prev=target_alias ;;
ba4481b5 414 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 415 target_alias=$ac_optarg ;;
ba4481b5
DL
416
417 -v | -verbose | --verbose | --verbos | --verbo | --verb)
418 verbose=yes ;;
419
503d2be0
AS
420 -version | --version | --versio | --versi | --vers | -V)
421 ac_init_version=: ;;
ba4481b5
DL
422
423 -with-* | --with-*)
503d2be0 424 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 425 # Reject names that are not valid shell variable names.
503d2be0
AS
426 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
427 { echo "$as_me: error: invalid package name: $ac_package" >&2
428 { (exit 1); exit 1; }; }
ba4481b5 429 ac_package=`echo $ac_package| sed 's/-/_/g'`
503d2be0
AS
430 case $ac_option in
431 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
ba4481b5
DL
432 *) ac_optarg=yes ;;
433 esac
503d2be0 434 eval "with_$ac_package='$ac_optarg'" ;;
ba4481b5
DL
435
436 -without-* | --without-*)
503d2be0 437 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 438 # Reject names that are not valid shell variable names.
503d2be0
AS
439 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
440 { echo "$as_me: error: invalid package name: $ac_package" >&2
441 { (exit 1); exit 1; }; }
442 ac_package=`echo $ac_package | sed 's/-/_/g'`
443 eval "with_$ac_package=no" ;;
ba4481b5
DL
444
445 --x)
446 # Obsolete; use --with-x.
447 with_x=yes ;;
448
449 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
450 | --x-incl | --x-inc | --x-in | --x-i)
451 ac_prev=x_includes ;;
452 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
453 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 454 x_includes=$ac_optarg ;;
ba4481b5
DL
455
456 -x-libraries | --x-libraries | --x-librarie | --x-librari \
457 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
458 ac_prev=x_libraries ;;
459 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
460 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 461 x_libraries=$ac_optarg ;;
ba4481b5 462
503d2be0
AS
463 -*) { echo "$as_me: error: unrecognized option: $ac_option
464Try \`$0 --help' for more information." >&2
465 { (exit 1); exit 1; }; }
ba4481b5
DL
466 ;;
467
503d2be0
AS
468 *=*)
469 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
470 # Reject names that are not valid shell variable names.
471 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
472 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
473 { (exit 1); exit 1; }; }
474 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
475 eval "$ac_envvar='$ac_optarg'"
476 export $ac_envvar ;;
477
ba4481b5 478 *)
503d2be0
AS
479 # FIXME: should be removed in autoconf 3.0.
480 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
481 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
482 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
483 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
484 ;;
485
486 esac
487done
488
489if test -n "$ac_prev"; then
503d2be0
AS
490 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
491 { echo "$as_me: error: missing argument to $ac_option" >&2
492 { (exit 1); exit 1; }; }
ba4481b5 493fi
ba4481b5 494
503d2be0
AS
495# Be sure to have absolute paths.
496for ac_var in exec_prefix prefix
497do
498 eval ac_val=$`echo $ac_var`
499 case $ac_val in
500 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
501 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
502 { (exit 1); exit 1; }; };;
503 esac
504done
ba4481b5 505
503d2be0
AS
506# Be sure to have absolute paths.
507for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
508 localstatedir libdir includedir oldincludedir infodir mandir
ba4481b5 509do
503d2be0
AS
510 eval ac_val=$`echo $ac_var`
511 case $ac_val in
512 [\\/$]* | ?:[\\/]* ) ;;
513 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
514 { (exit 1); exit 1; }; };;
ba4481b5
DL
515 esac
516done
517
503d2be0
AS
518# There might be people who depend on the old broken behavior: `$host'
519# used to hold the argument of --host etc.
520build=$build_alias
521host=$host_alias
522target=$target_alias
523
524# FIXME: should be removed in autoconf 3.0.
525if test "x$host_alias" != x; then
526 if test "x$build_alias" = x; then
527 cross_compiling=maybe
528 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
529 If a cross compiler is detected then cross compile mode will be used." >&2
530 elif test "x$build_alias" != "x$host_alias"; then
531 cross_compiling=yes
532 fi
533fi
ba4481b5 534
503d2be0
AS
535ac_tool_prefix=
536test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 537
503d2be0 538test "$silent" = yes && exec 6>/dev/null
ba4481b5
DL
539
540# Find the source files, if location was not specified.
541if test -z "$srcdir"; then
542 ac_srcdir_defaulted=yes
543 # Try the directory containing this script, then its parent.
544 ac_prog=$0
503d2be0 545 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
ba4481b5
DL
546 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
547 srcdir=$ac_confdir
548 if test ! -r $srcdir/$ac_unique_file; then
549 srcdir=..
550 fi
551else
552 ac_srcdir_defaulted=no
553fi
554if test ! -r $srcdir/$ac_unique_file; then
555 if test "$ac_srcdir_defaulted" = yes; then
503d2be0
AS
556 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
557 { (exit 1); exit 1; }; }
ba4481b5 558 else
503d2be0
AS
559 { echo "$as_me: error: cannot find sources in $srcdir" >&2
560 { (exit 1); exit 1; }; }
ba4481b5
DL
561 fi
562fi
503d2be0
AS
563srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
564ac_env_build_alias_set=${build_alias+set}
565ac_env_build_alias_value=$build_alias
566ac_cv_env_build_alias_set=${build_alias+set}
567ac_cv_env_build_alias_value=$build_alias
568ac_env_host_alias_set=${host_alias+set}
569ac_env_host_alias_value=$host_alias
570ac_cv_env_host_alias_set=${host_alias+set}
571ac_cv_env_host_alias_value=$host_alias
572ac_env_target_alias_set=${target_alias+set}
573ac_env_target_alias_value=$target_alias
574ac_cv_env_target_alias_set=${target_alias+set}
575ac_cv_env_target_alias_value=$target_alias
576ac_env_CC_set=${CC+set}
577ac_env_CC_value=$CC
578ac_cv_env_CC_set=${CC+set}
579ac_cv_env_CC_value=$CC
580ac_env_CFLAGS_set=${CFLAGS+set}
581ac_env_CFLAGS_value=$CFLAGS
582ac_cv_env_CFLAGS_set=${CFLAGS+set}
583ac_cv_env_CFLAGS_value=$CFLAGS
584ac_env_LDFLAGS_set=${LDFLAGS+set}
585ac_env_LDFLAGS_value=$LDFLAGS
586ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
587ac_cv_env_LDFLAGS_value=$LDFLAGS
588ac_env_CPPFLAGS_set=${CPPFLAGS+set}
589ac_env_CPPFLAGS_value=$CPPFLAGS
590ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
591ac_cv_env_CPPFLAGS_value=$CPPFLAGS
592ac_env_CPP_set=${CPP+set}
593ac_env_CPP_value=$CPP
594ac_cv_env_CPP_set=${CPP+set}
595ac_cv_env_CPP_value=$CPP
596
597#
598# Report the --help message.
599#
600if test "$ac_init_help" = "long"; then
601 # Omit some internal or obsolete options to make the list less imposing.
602 # This message is too long to be a string in the A/UX 3.1 sh.
603 cat <<EOF
604\`configure' configures this package to adapt to many kinds of systems.
605
606Usage: $0 [OPTION]... [VAR=VALUE]...
607
608To assign environment variables (e.g., CC, CFLAGS...), specify them as
609VAR=VALUE. See below for descriptions of some of the useful variables.
610
611Defaults for the options are specified in brackets.
612
613Configuration:
614 -h, --help display this help and exit
615 --help=short display options specific to this package
616 --help=recursive display the short help of all the included packages
617 -V, --version display version information and exit
618 -q, --quiet, --silent do not print \`checking...' messages
619 --cache-file=FILE cache test results in FILE [disabled]
620 -C, --config-cache alias for \`--cache-file=config.cache'
621 -n, --no-create do not create output files
622 --srcdir=DIR find the sources in DIR [configure dir or \`..']
623
624EOF
625
626 cat <<EOF
627Installation directories:
628 --prefix=PREFIX install architecture-independent files in PREFIX
629 [$ac_default_prefix]
630 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
631 [PREFIX]
632
633By default, \`make install' will install all the files in
634\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
635an installation prefix other than \`$ac_default_prefix' using \`--prefix',
636for instance \`--prefix=\$HOME'.
637
638For better control, use the options below.
639
640Fine tuning of the installation directories:
641 --bindir=DIR user executables [EPREFIX/bin]
642 --sbindir=DIR system admin executables [EPREFIX/sbin]
643 --libexecdir=DIR program executables [EPREFIX/libexec]
644 --datadir=DIR read-only architecture-independent data [PREFIX/share]
645 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
646 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
647 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
648 --libdir=DIR object code libraries [EPREFIX/lib]
649 --includedir=DIR C header files [PREFIX/include]
650 --oldincludedir=DIR C header files for non-gcc [/usr/include]
651 --infodir=DIR info documentation [PREFIX/info]
652 --mandir=DIR man documentation [PREFIX/man]
653EOF
654
655 cat <<\EOF
656
657X features:
658 --x-includes=DIR X include files are in DIR
659 --x-libraries=DIR X library files are in DIR
660
661System types:
662 --build=BUILD configure for building on BUILD [guessed]
663 --host=HOST build programs to run on HOST [BUILD]
664EOF
665fi
666
667if test -n "$ac_init_help"; then
668
669 cat <<\EOF
670
671Optional Features:
672 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
673 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
674 --disable-largefile omit support for large files
675
676Optional Packages:
677 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
678 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
679 --without-gcc don't use GCC to compile Emacs if GCC is found
680 --without-pop don't support POP mail retrieval with movemail
681 --with-kerberos support Kerberos-authenticated POP
682 --with-kerberos5 support Kerberos version 5 authenticated POP
683 --with-hesiod support Hesiod to get the POP server host
684 --with-x-toolkit=KIT use an X toolkit (KIT = yes/lucid/athena/motif/no)
685 --with-xpm use -lXpm for displaying XPM images
686 --with-jpeg use -ljpeg for displaying JPEG images
687 --with-tiff use -ltiff for displaying TIFF images
688 --with-gif use -lungif for displaying GIF images
689 --with-png use -lpng for displaying PNG images
690 --without-toolkit-scroll-bars
691 don't use Motif or Xaw3d scroll bars
692 --without-xim don't use X11 XIM
693 --with-x use the X Window System
694
695Some influential environment variables:
696 CC C compiler command
697 CFLAGS C compiler flags
698 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
699 nonstandard directory <lib dir>
700 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
701 headers in a nonstandard directory <include dir>
702 CPP C preprocessor
703
704Use these variables to override the choices made by `configure' or to help
705it to find libraries and programs with nonstandard names/locations.
706
707EOF
708fi
709
710if test "$ac_init_help" = "recursive"; then
711 # If there are subdirs, report their specific --help.
712 ac_popdir=`pwd`
713 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
714 cd $ac_subdir
715 # A "../" for each directory in /$ac_subdir.
716 ac_dots=`echo $ac_subdir |
717 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
718
719 case $srcdir in
720 .) # No --srcdir option. We are building in place.
721 ac_sub_srcdir=$srcdir ;;
722 [\\/]* | ?:[\\/]* ) # Absolute path.
723 ac_sub_srcdir=$srcdir/$ac_subdir ;;
724 *) # Relative path.
725 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
726 esac
727
728 # Check for guested configure; otherwise get Cygnus style configure.
729 if test -f $ac_sub_srcdir/configure.gnu; then
730 echo
731 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
732 elif test -f $ac_sub_srcdir/configure; then
733 echo
734 $SHELL $ac_sub_srcdir/configure --help=recursive
735 elif test -f $ac_sub_srcdir/configure.ac ||
736 test -f $ac_sub_srcdir/configure.in; then
737 echo
738 $ac_configure --help
739 else
740 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
741 fi
742 cd $ac_popdir
743 done
744fi
745
746test -n "$ac_init_help" && exit 0
747if $ac_init_version; then
748 cat <<\EOF
749
750Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
751Free Software Foundation, Inc.
752This configure script is free software; the Free Software Foundation
753gives unlimited permission to copy, distribute and modify it.
754EOF
755 exit 0
756fi
757exec 5>config.log
758cat >&5 <<EOF
759This file contains any messages produced by compilers while
760running configure, to aid debugging if configure makes a mistake.
761
762It was created by $as_me, which was
763generated by GNU Autoconf 2.52. Invocation command line was
764
765 $ $0 $@
766
767EOF
768{
769cat <<_ASUNAME
770## ---------- ##
771## Platform. ##
772## ---------- ##
773
774hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
775uname -m = `(uname -m) 2>/dev/null || echo unknown`
776uname -r = `(uname -r) 2>/dev/null || echo unknown`
777uname -s = `(uname -s) 2>/dev/null || echo unknown`
778uname -v = `(uname -v) 2>/dev/null || echo unknown`
779
780/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
781/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
782
783/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
784/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
785/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
786hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
787/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
788/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
789/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
790
791PATH = $PATH
792
793_ASUNAME
794} >&5
795
796cat >&5 <<EOF
797## ------------ ##
798## Core tests. ##
799## ------------ ##
800
801EOF
802
803# Keep a trace of the command line.
804# Strip out --no-create and --no-recursion so they do not pile up.
805# Also quote any args containing shell meta-characters.
806ac_configure_args=
807ac_sep=
808for ac_arg
809do
810 case $ac_arg in
811 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
812 | --no-cr | --no-c) ;;
813 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
814 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
815 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
816 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
817 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
818 ac_sep=" " ;;
819 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
820 ac_sep=" " ;;
821 esac
822 # Get rid of the leading space.
823done
824
825# When interrupted or exit'd, cleanup temporary files, and complete
826# config.log. We remove comments because anyway the quotes in there
827# would cause problems or look ugly.
828trap 'exit_status=$?
829 # Save into config.log some information that might help in debugging.
830 echo >&5
831 echo "## ----------------- ##" >&5
832 echo "## Cache variables. ##" >&5
833 echo "## ----------------- ##" >&5
834 echo >&5
835 # The following way of writing the cache mishandles newlines in values,
836{
837 (set) 2>&1 |
838 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
839 *ac_space=\ *)
840 sed -n \
841 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
842 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
843 ;;
844 *)
845 sed -n \
846 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
847 ;;
848 esac;
849} >&5
850 sed "/^$/d" confdefs.h >conftest.log
851 if test -s conftest.log; then
852 echo >&5
853 echo "## ------------ ##" >&5
854 echo "## confdefs.h. ##" >&5
855 echo "## ------------ ##" >&5
856 echo >&5
857 cat conftest.log >&5
858 fi
859 (echo; echo) >&5
860 test "$ac_signal" != 0 &&
861 echo "$as_me: caught signal $ac_signal" >&5
862 echo "$as_me: exit $exit_status" >&5
863 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
864 exit $exit_status
865 ' 0
866for ac_signal in 1 2 13 15; do
867 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
868done
869ac_signal=0
870
871# confdefs.h avoids OS command line length limits that DEFS can exceed.
872rm -rf conftest* confdefs.h
873# AIX cpp loses on an empty file, so make sure it contains at least a newline.
874echo >confdefs.h
ba4481b5 875
503d2be0 876# Let the site file select an alternate cache file if it wants to.
ba4481b5
DL
877# Prefer explicitly selected file to automatically selected ones.
878if test -z "$CONFIG_SITE"; then
879 if test "x$prefix" != xNONE; then
880 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
881 else
882 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
883 fi
884fi
885for ac_site_file in $CONFIG_SITE; do
886 if test -r "$ac_site_file"; then
503d2be0
AS
887 { echo "$as_me:887: loading site script $ac_site_file" >&5
888echo "$as_me: loading site script $ac_site_file" >&6;}
889 cat "$ac_site_file" >&5
ba4481b5
DL
890 . "$ac_site_file"
891 fi
892done
893
894if test -r "$cache_file"; then
503d2be0
AS
895 # Some versions of bash will fail to source /dev/null (special
896 # files actually), so we avoid doing that.
897 if test -f "$cache_file"; then
898 { echo "$as_me:898: loading cache $cache_file" >&5
899echo "$as_me: loading cache $cache_file" >&6;}
900 case $cache_file in
901 [\\/]* | ?:[\\/]* ) . $cache_file;;
902 *) . ./$cache_file;;
903 esac
904 fi
ba4481b5 905else
503d2be0
AS
906 { echo "$as_me:906: creating cache $cache_file" >&5
907echo "$as_me: creating cache $cache_file" >&6;}
908 >$cache_file
909fi
910
911# Check that the precious variables saved in the cache have kept the same
912# value.
913ac_cache_corrupted=false
914for ac_var in `(set) 2>&1 |
915 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
916 eval ac_old_set=\$ac_cv_env_${ac_var}_set
917 eval ac_new_set=\$ac_env_${ac_var}_set
918 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
919 eval ac_new_val="\$ac_env_${ac_var}_value"
920 case $ac_old_set,$ac_new_set in
921 set,)
922 { echo "$as_me:922: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
923echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
924 ac_cache_corrupted=: ;;
925 ,set)
926 { echo "$as_me:926: error: \`$ac_var' was not set in the previous run" >&5
927echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
928 ac_cache_corrupted=: ;;
929 ,);;
930 *)
931 if test "x$ac_old_val" != "x$ac_new_val"; then
932 { echo "$as_me:932: error: \`$ac_var' has changed since the previous run:" >&5
933echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
934 { echo "$as_me:934: former value: $ac_old_val" >&5
935echo "$as_me: former value: $ac_old_val" >&2;}
936 { echo "$as_me:936: current value: $ac_new_val" >&5
937echo "$as_me: current value: $ac_new_val" >&2;}
938 ac_cache_corrupted=:
939 fi;;
940 esac
941 # Pass precious variables to config.status. It doesn't matter if
942 # we pass some twice (in addition to the command line arguments).
943 if test "$ac_new_set" = set; then
944 case $ac_new_val in
945 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
946 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
947 ac_configure_args="$ac_configure_args '$ac_arg'"
948 ;;
949 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
950 ;;
951 esac
952 fi
953done
954if $ac_cache_corrupted; then
955 { echo "$as_me:955: error: changes in the environment can compromise the build" >&5
956echo "$as_me: error: changes in the environment can compromise the build" >&2;}
957 { { echo "$as_me:957: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
958echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
959 { (exit 1); exit 1; }; }
ba4481b5
DL
960fi
961
962ac_ext=c
ba4481b5 963ac_cpp='$CPP $CPPFLAGS'
503d2be0
AS
964ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
965ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
966ac_compiler_gnu=$ac_cv_c_compiler_gnu
967
968case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
969 *c*,-n*) ECHO_N= ECHO_C='
970' ECHO_T=' ' ;;
971 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
972 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
973esac
974echo "#! $SHELL" >conftest.sh
975echo "exit 0" >>conftest.sh
976chmod +x conftest.sh
977if { (echo "$as_me:977: PATH=\".;.\"; conftest.sh") >&5
978 (PATH=".;."; conftest.sh) 2>&5
979 ac_status=$?
980 echo "$as_me:980: \$? = $ac_status" >&5
981 (exit $ac_status); }; then
982 ac_path_separator=';'
ba4481b5 983else
503d2be0 984 ac_path_separator=:
ba4481b5 985fi
503d2be0
AS
986PATH_SEPARATOR="$ac_path_separator"
987rm -f conftest.sh
ba4481b5 988
503d2be0 989ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5
DL
990
991lispdir='${datadir}/emacs/${version}/lisp'
992locallisppath='${datadir}/emacs/${version}/site-lisp:'\
993'${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
994lisppath='${locallisppath}:${lispdir}'
995etcdir='${datadir}/emacs/${version}/etc'
996archlibdir='${libexecdir}/emacs/${version}/${configuration}'
997docdir='${datadir}/emacs/${version}/etc'
998
999# Check whether --with-gcc or --without-gcc was given.
1000if test "${with_gcc+set}" = set; then
1001 withval="$with_gcc"
503d2be0
AS
1002
1003fi;
ba4481b5
DL
1004
1005# Check whether --with-pop or --without-pop was given.
1006if test "${with_pop+set}" = set; then
1007 withval="$with_pop"
243cf185 1008 if test "$withval" = yes; then
503d2be0 1009 cat >>confdefs.h <<\EOF
ba4481b5
DL
1010#define MAIL_USE_POP 1
1011EOF
1012
243cf185
DL
1013else :
1014fi
3d9fec71 1015else
503d2be0 1016 cat >>confdefs.h <<\EOF
3d9fec71
DL
1017#define MAIL_USE_POP 1
1018EOF
1019
503d2be0 1020fi;
ba4481b5 1021
a21616bd
KR
1022# Check whether --with-kerberos or --without-kerberos was given.
1023if test "${with_kerberos+set}" = set; then
1024 withval="$with_kerberos"
503d2be0 1025 cat >>confdefs.h <<\EOF
a21616bd
KR
1026#define KERBEROS 1
1027EOF
1028
503d2be0 1029fi;
a21616bd
KR
1030
1031# Check whether --with-kerberos5 or --without-kerberos5 was given.
1032if test "${with_kerberos5+set}" = set; then
1033 withval="$with_kerberos5"
1034 if test "${with_kerberos5+set}" = set; then
1035 if test "${with_kerberos+set}" != set; then
1036 with_kerberos=yes
503d2be0 1037 cat >>confdefs.h <<\EOF
a21616bd
KR
1038#define KERBEROS 1
1039EOF
1040
1041 fi
1042fi
503d2be0 1043cat >>confdefs.h <<\EOF
a21616bd
KR
1044#define KERBEROS5 1
1045EOF
1046
503d2be0 1047fi;
a21616bd 1048
ba4481b5
DL
1049# Check whether --with-hesiod or --without-hesiod was given.
1050if test "${with_hesiod+set}" = set; then
1051 withval="$with_hesiod"
503d2be0 1052 cat >>confdefs.h <<\EOF
ba4481b5
DL
1053#define HESIOD 1
1054EOF
1055
503d2be0 1056fi;
ba4481b5
DL
1057
1058# Check whether --with-x-toolkit or --without-x-toolkit was given.
1059if test "${with_x_toolkit+set}" = set; then
1060 withval="$with_x_toolkit"
1061 case "${withval}" in
1062 y | ye | yes ) val=athena ;;
1063 n | no ) val=no ;;
1064 l | lu | luc | luci | lucid ) val=lucid ;;
1065 a | at | ath | athe | athen | athena ) val=athena ;;
1066 m | mo | mot | moti | motif ) val=motif ;;
1067 * )
503d2be0 1068{ { echo "$as_me:1068: error: \`--with-x-toolkit=$withval' is invalid\;
ba4481b5 1069this option's value should be \`yes', \`no', \`lucid', \`athena', or \`motif'.
503d2be0
AS
1070Currently, \`yes', \`athena' and \`lucid' are synonyms." >&5
1071echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid\;
1072this option's value should be \`yes', \`no', \`lucid', \`athena', or \`motif'.
1073Currently, \`yes', \`athena' and \`lucid' are synonyms." >&2;}
1074 { (exit 1); exit 1; }; }
ba4481b5
DL
1075 ;;
1076 esac
1077 with_x_toolkit=$val
1078
503d2be0 1079fi;
ba4481b5
DL
1080
1081# Check whether --with-xpm or --without-xpm was given.
1082if test "${with_xpm+set}" = set; then
1083 withval="$with_xpm"
503d2be0
AS
1084
1085fi;
ba4481b5
DL
1086
1087# Check whether --with-jpeg or --without-jpeg was given.
1088if test "${with_jpeg+set}" = set; then
1089 withval="$with_jpeg"
503d2be0
AS
1090
1091fi;
ba4481b5
DL
1092
1093# Check whether --with-tiff or --without-tiff was given.
1094if test "${with_tiff+set}" = set; then
1095 withval="$with_tiff"
503d2be0
AS
1096
1097fi;
ba4481b5
DL
1098
1099# Check whether --with-gif or --without-gif was given.
1100if test "${with_gif+set}" = set; then
1101 withval="$with_gif"
503d2be0
AS
1102
1103fi;
ba4481b5
DL
1104
1105# Check whether --with-png or --without-png was given.
1106if test "${with_png+set}" = set; then
1107 withval="$with_png"
503d2be0
AS
1108
1109fi;
ba4481b5
DL
1110
1111# Check whether --with-toolkit-scroll-bars or --without-toolkit-scroll-bars was given.
1112if test "${with_toolkit_scroll_bars+set}" = set; then
1113 withval="$with_toolkit_scroll_bars"
503d2be0
AS
1114
1115fi;
ba4481b5 1116
1d36487c
GM
1117# Check whether --with-xim or --without-xim was given.
1118if test "${with_xim+set}" = set; then
1119 withval="$with_xim"
1d36487c 1120
503d2be0 1121fi;
ba4481b5
DL
1122
1123#### Make srcdir absolute, if it isn't already. It's important to
17494071 1124#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
1125#### give you automounter prefixes, which can go away. We do all this
1126#### so Emacs can find its files when run uninstalled.
17494071
GM
1127## Make sure CDPATH doesn't affect cd (in case PWD is relative).
1128unset CDPATH
ba4481b5
DL
1129case "${srcdir}" in
1130 /* ) ;;
1131 . )
1132 ## We may be able to use the $PWD environment variable to make this
1133 ## absolute. But sometimes PWD is inaccurate.
17494071 1134 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".${PWD}" ;
ba4481b5
DL
1135 then
1136 srcdir="$PWD"
1137 else
1138 srcdir="`(cd ${srcdir}; pwd)`"
1139 fi
1140 ;;
1141 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
1142esac
1143
1144#### Check if the source directory already has a configured system in it.
1145if test `pwd` != `(cd ${srcdir} && pwd)` \
1146 && test -f "${srcdir}/src/config.h" ; then
503d2be0
AS
1147 { echo "$as_me:1147: WARNING: The directory tree \`${srcdir}' is being used
1148 as a build directory right now; it has been configured in its own
1149 right. To configure in another directory as well, you MUST
1150 use GNU make. If you do not have GNU make, then you must
1151 now do \`make distclean' in ${srcdir},
1152 and then run $0 again." >&5
1153echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
1154 as a build directory right now; it has been configured in its own
1155 right. To configure in another directory as well, you MUST
1156 use GNU make. If you do not have GNU make, then you must
1157 now do \`make distclean' in ${srcdir},
503d2be0 1158 and then run $0 again." >&2;}
ba4481b5
DL
1159
1160 extrasub='/^VPATH[ ]*=/c\
1161vpath %.c $(srcdir)\
1162vpath %.h $(srcdir)\
1163vpath %.y $(srcdir)\
1164vpath %.l $(srcdir)\
1165vpath %.s $(srcdir)\
1166vpath %.in $(srcdir)\
1167vpath %.texi $(srcdir)'
1168fi
1169
1170#### Given the configuration name, set machfile and opsysfile to the
1171#### names of the m/*.h and s/*.h files we should use.
1172
1173### Canonicalize the configuration name.
1174
1175ac_aux_dir=
1176for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1177 if test -f $ac_dir/install-sh; then
1178 ac_aux_dir=$ac_dir
1179 ac_install_sh="$ac_aux_dir/install-sh -c"
1180 break
1181 elif test -f $ac_dir/install.sh; then
1182 ac_aux_dir=$ac_dir
1183 ac_install_sh="$ac_aux_dir/install.sh -c"
1184 break
503d2be0
AS
1185 elif test -f $ac_dir/shtool; then
1186 ac_aux_dir=$ac_dir
1187 ac_install_sh="$ac_aux_dir/shtool install -c"
1188 break
ba4481b5
DL
1189 fi
1190done
1191if test -z "$ac_aux_dir"; then
503d2be0
AS
1192 { { echo "$as_me:1192: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1193echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1194 { (exit 1); exit 1; }; }
ba4481b5 1195fi
503d2be0
AS
1196ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1197ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1198ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ba4481b5
DL
1199
1200# Make sure we can run config.sub.
503d2be0
AS
1201$ac_config_sub sun4 >/dev/null 2>&1 ||
1202 { { echo "$as_me:1202: error: cannot run $ac_config_sub" >&5
1203echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1204 { (exit 1); exit 1; }; }
1205
1206echo "$as_me:1206: checking build system type" >&5
1207echo $ECHO_N "checking build system type... $ECHO_C" >&6
1208if test "${ac_cv_build+set}" = set; then
1209 echo $ECHO_N "(cached) $ECHO_C" >&6
1210else
1211 ac_cv_build_alias=$build_alias
1212test -z "$ac_cv_build_alias" &&
1213 ac_cv_build_alias=`$ac_config_guess`
1214test -z "$ac_cv_build_alias" &&
1215 { { echo "$as_me:1215: error: cannot guess build type; you must specify one" >&5
1216echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1217 { (exit 1); exit 1; }; }
1218ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1219 { { echo "$as_me:1219: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1220echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1221 { (exit 1); exit 1; }; }
1222
1223fi
1224echo "$as_me:1224: result: $ac_cv_build" >&5
1225echo "${ECHO_T}$ac_cv_build" >&6
1226build=$ac_cv_build
1227build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1228build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1229build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1230
1231echo "$as_me:1231: checking host system type" >&5
1232echo $ECHO_N "checking host system type... $ECHO_C" >&6
1233if test "${ac_cv_host+set}" = set; then
1234 echo $ECHO_N "(cached) $ECHO_C" >&6
1235else
1236 ac_cv_host_alias=$host_alias
1237test -z "$ac_cv_host_alias" &&
1238 ac_cv_host_alias=$ac_cv_build_alias
1239ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1240 { { echo "$as_me:1240: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1241echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1242 { (exit 1); exit 1; }; }
1243
1244fi
1245echo "$as_me:1245: result: $ac_cv_host" >&5
1246echo "${ECHO_T}$ac_cv_host" >&6
1247host=$ac_cv_host
1248host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1249host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1250host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ba4481b5
DL
1251
1252canonical=$host
531a3336 1253configuration=${host_alias-$host}
ba4481b5 1254
ba4481b5
DL
1255### If you add support for a new configuration, add code to this
1256### switch statement to recognize your configuration name and select
1257### the appropriate operating system and machine description files.
1258
1259### You would hope that you could choose an m/*.h file pretty much
1260### based on the machine portion of the configuration name, and an s-
1261### file based on the operating system portion. However, it turns out
1262### that each m/*.h file is pretty manufacturer-specific - for
1263### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
1264### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
1265### machines. So we basically have to have a special case for each
1266### configuration name.
1267###
1268### As far as handling version numbers on operating systems is
1269### concerned, make sure things will fail in a fixable way. If
1270### /etc/MACHINES doesn't say anything about version numbers, be
1271### prepared to handle anything reasonably. If version numbers
1272### matter, be sure /etc/MACHINES says something about it.
1273###
1274### Eric Raymond says we should accept strings like "sysvr4" to mean
1275### "System V Release 4"; he writes, "The old convention encouraged
1276### confusion between `system' and `release' levels'."
1277
1278machine='' opsys='' unported=no
1279case "${canonical}" in
1280
1281 ## NetBSD ports
1282 *-*-netbsd* )
1283 opsys=netbsd
1284 case "${canonical}" in
1285 alpha*-*-netbsd*) machine=alpha ;;
1286 i[3456]86-*-netbsd*) machine=intel386 ;;
1287 m68k-*-netbsd*)
1288 # This is somewhat bogus.
1289 machine=hp9000s300 ;;
1290 powerpc-apple-netbsd*) machine=macppc ;;
1291 mips-*-netbsd*) machine=pmax ;;
2df636f4 1292 mipsel-*-netbsd*) machine=pmax ;;
ba4481b5 1293 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 1294 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 1295 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 1296 vax-*-netbsd*) machine=vax ;;
2df636f4 1297 arm-*-netbsd*) machine=arm ;;
ba4481b5
DL
1298 esac
1299 ;;
1300
1301 ## OpenBSD ports
1302 *-*-openbsd* )
1303 opsys=openbsd
1304 case "${canonical}" in
1305 alpha*-*-openbsd*) machine=alpha ;;
1306 i386-*-openbsd*) machine=intel386 ;;
1307 m68k-*-openbsd*) machine=hp9000s300 ;;
1308 mipsel-*-openbsd*) machine=pmax ;;
1309 ns32k-*-openbsd*) machine=ns32000 ;;
1310 sparc-*-openbsd*) machine=sparc ;;
1311 vax-*-openbsd*) machine=vax ;;
1312 esac
1313 ;;
1314
1315 ## Acorn RISCiX:
1316 arm-acorn-riscix1.1* )
1317 machine=acorn opsys=riscix1-1
1318 ;;
1319 arm-acorn-riscix1.2* | arm-acorn-riscix )
1320 ## This name is riscix12 instead of riscix1.2
1321 ## to avoid a file name conflict on MSDOS.
1322 machine=acorn opsys=riscix12
1323 ;;
1324
1325 ## BSDI ports
1326 *-*-bsdi* )
1327 opsys=bsdi
1328 case "${canonical}" in
1329 i[345]86-*-bsdi*) machine=intel386 ;;
1330 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 1331 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
1332 esac
1333 case "${canonical}" in
1334 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
1335 *-*-bsdi2.0* ) opsys=bsdos2 ;;
1336 *-*-bsdi2* ) opsys=bsdos2-1 ;;
1337 *-*-bsdi3* ) opsys=bsdos3 ;;
1338 *-*-bsdi4* ) opsys=bsdos4 ;;
1339 esac
1340 ;;
1341
1342 ## Alliant machines
1343 ## Strictly speaking, we need the version of the alliant operating
1344 ## system to choose the right machine file, but currently the
1345 ## configuration name doesn't tell us enough to choose the right
1346 ## one; we need to give alliants their own operating system name to
1347 ## do this right. When someone cares, they can help us.
1348 fx80-alliant-* )
1349 machine=alliant4 opsys=bsd4-2
1350 ;;
1351 i860-alliant-* )
1352 machine=alliant-2800 opsys=bsd4-3
1353 ;;
1354
1355 ## Alpha (DEC) machines.
1356 alpha*-dec-osf* )
1357 machine=alpha opsys=osf1
1358 # This is needed to find X11R6.1 libraries for certain tests.
1359 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
1360 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
1361 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
1362 # due to non-traditional preprocessing with the current compiler
1363 # defaults. OSF 4 can also have that compiler version, and there
1364 # seems always to have been a usable /usr/bin/cpp.
1365 NON_GNU_CPP=/usr/bin/cpp
ca512671 1366 case "${canonical}" in
a55b799a 1367 alpha*-dec-osf[5-9]*)
bb17930d 1368 opsys=osf5-0 ;;
ca512671 1369 esac
ba4481b5
DL
1370 ;;
1371
1372 alpha*-*-linux-gnu* )
1373 machine=alpha opsys=gnu-linux
1374 ;;
1375
c4bb2108
DL
1376 arm*-*-linux-gnu* )
1377 machine=arm opsys=gnu-linux
1378 ;;
1379
1380 ppc-*-linux | \
1381 powerpc-*-linux* )
3aeecf97 1382 machine=macppc opsys=gnu-linux
c4bb2108
DL
1383 ;;
1384
ba4481b5
DL
1385 ## Altos 3068
1386 m68*-altos-sysv* )
1387 machine=altos opsys=usg5-2
1388 ;;
1389
1390 ## Amdahl UTS
1391 580-amdahl-sysv* )
1392 machine=amdahl opsys=usg5-2-2
1393 ;;
1394
1395 ## Apollo, Domain/OS
1396 m68*-apollo-* )
1397 machine=apollo opsys=bsd4-3
1398 ;;
1399
1400 ## AT&T 3b2, 3b5, 3b15, 3b20
1401 we32k-att-sysv* )
1402 machine=att3b opsys=usg5-2-2
1403 ;;
1404
1405 ## AT&T 3b1 - The Mighty Unix PC!
1406 m68*-att-sysv* )
1407 machine=7300 opsys=usg5-2-2
1408 ;;
1409
1410 ## Bull dpx20
1411 rs6000-bull-bosx* )
1412 machine=ibmrs6000 opsys=aix3-2
1413 ;;
1414
1415 ## Bull dpx2
1416 m68*-bull-sysv3* )
1417 machine=dpx2 opsys=usg5-3
1418 ;;
1419
1420 ## Bull sps7
1421 m68*-bull-sysv2* )
1422 machine=sps7 opsys=usg5-2
1423 ;;
1424
1425 ## CCI 5/32, 6/32 -- see "Tahoe".
1426
1427 ## Celerity
1428 ## I don't know what configuration name to use for this; config.sub
1429 ## doesn't seem to know anything about it. Hey, Celerity users, get
1430 ## in touch with us!
1431 celerity-celerity-bsd* )
1432 machine=celerity opsys=bsd4-2
1433 ;;
1434
1435 ## Clipper
1436 ## What operating systems does this chip run that Emacs has been
1437 ## tested on?
1438 clipper-* )
1439 machine=clipper
1440 ## We'll use the catch-all code at the bottom to guess the
1441 ## operating system.
1442 ;;
1443
1444 ## Convex
1445 *-convex-bsd* | *-convex-convexos* )
1446 machine=convex opsys=bsd4-3
1447 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
1448 NON_GNU_CPP="cc -E -P"
1449 ;;
1450
1451 ## Cubix QBx/386
1452 i[3456]86-cubix-sysv* )
1453 machine=intel386 opsys=usg5-3
1454 ;;
1455
1456 ## Cydra 5
1457 cydra*-cydrome-sysv* )
1458 machine=cydra5 opsys=usg5-3
1459 ;;
1460
1461 ## Data General AViiON Machines
1462 ## DG changed naming conventions with the release of 5.4.4.10, they
1463 ## dropped the initial 5.4 but left the intervening R. Because of the
1464 ## R this shouldn't conflict with older versions of the OS (which I
1465 ## think were named like dgux4.*). In addition, DG new AViiONs series
1466 ## uses either Motorola M88k or Intel Pentium CPUs.
1467 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
1468 machine=aviion opsys=dgux4
1469 ;;
1470 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
1471 ## This name is dgux5-4-3 instead of dgux5-4r3
1472 ## to avoid a file name conflict on MSDOS.
1473 machine=aviion opsys=dgux5-4-3
1474 ;;
1475 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
1476 machine=aviion opsys=dgux5-4r2
1477 ;;
1478 m88k-dg-dgux* )
1479 machine=aviion opsys=dgux
1480 ;;
1481
1482 ## Data General AViiON Intel (x86) Machines
1483 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
1484 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
1485 i[345]86-dg-dguxR4* )
1486 machine=aviion-intel opsys=dgux4
1487 ;;
1488
1489 ## DECstations
1490 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1491 machine=pmax opsys=bsd4-2
1492 ;;
1493 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1494 machine=pmax opsys=bsd4-3
1495 ;;
1496 mips-dec-ultrix* )
1497 machine=pmax opsys=ultrix4-3
1498 ;;
1499 mips-dec-osf* )
1500 machine=pmax opsys=osf1
1501 ;;
1502 mips-dec-mach_bsd4.3* )
1503 machine=pmax opsys=mach-bsd4-3
1504 ;;
1505
1506 ## Motorola Delta machines
1507 m68k-motorola-sysv* | m68000-motorola-sysv* )
1508 machine=delta opsys=usg5-3
1509 if test -z "`type gnucc | grep 'not found'`"
1510 then
1511 if test -s /etc/167config
1512 then CC="gnucc -m68040"
1513 else CC="gnucc -m68881"
1514 fi
1515 else
1516 if test -z "`type gcc | grep 'not found'`"
1517 then CC=gcc
1518 else CC=cc
1519 fi
1520 fi
1521 ;;
1522 m88k-motorola-sysv4* )
1523 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1524 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1525 # I hope there are not other 4.0 versions for this machine
1526 # which really need usg5-4 instead.
1527 machine=delta88k opsys=usg5-4-2
1528 ;;
1529 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1530 machine=delta88k opsys=usg5-3
1531 ;;
1532
1533 ## Dual machines
1534 m68*-dual-sysv* )
1535 machine=dual opsys=usg5-2
1536 ;;
1537 m68*-dual-uniplus* )
1538 machine=dual opsys=unipl5-2
1539 ;;
1540
1541 ## Elxsi 6400
1542 elxsi-elxsi-sysv* )
1543 machine=elxsi opsys=usg5-2
1544 ;;
1545
1546 ## Encore machines
1547 ns16k-encore-bsd* )
1548 machine=ns16000 opsys=umax
1549 ;;
1550
65171e3a
DL
1551 ## The GEC 63 - apparently, this port isn't really finished yet.
1552 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
1553
1554 ## Gould Power Node and NP1
1555 pn-gould-bsd4.2* )
1556 machine=gould opsys=bsd4-2
1557 ;;
1558 pn-gould-bsd4.3* )
1559 machine=gould opsys=bsd4-3
1560 ;;
1561 np1-gould-bsd* )
1562 machine=gould-np1 opsys=bsd4-3
1563 ;;
1564
1565 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
1566 ## as far as Emacs is concerned).
1567 m88k-harris-cxux* )
1568 # Build needs to be different on 7.0 and later releases
1569 case "`uname -r`" in
1570 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
1571 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
1572 esac
1573 NON_GNU_CPP="/lib/cpp"
1574 ;;
1575 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
1576 m68k-harris-cxux* )
1577 machine=nh3000 opsys=cxux
1578 ;;
1579 ## Harris power pc NightHawk running Power UNIX (Series 6000)
1580 powerpc-harris-powerunix )
1581 machine=nh6000 opsys=powerunix
1582 NON_GNU_CPP="cc -Xo -E -P"
1583 ;;
1584 ## SR2001/SR2201 running HI-UX/MPP
1585 hppa1.1-hitachi-hiuxmpp* )
1586 machine=sr2k opsys=hiuxmpp
1587 ;;
89a336fa
GM
1588 hppa1.1-hitachi-hiuxwe2* )
1589 machine=sr2k opsys=hiuxwe2
1590 ;;
ba4481b5
DL
1591 ## Honeywell XPS100
1592 xps*-honeywell-sysv* )
1593 machine=xps100 opsys=usg5-2
1594 ;;
1595
1596 ## HP 9000 series 200 or 300
1597 m68*-hp-bsd* )
1598 machine=hp9000s300 opsys=bsd4-3
1599 ;;
1600 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
1601 m68*-hp-hpux* )
1602 case "`uname -r`" in
1603 ## Someone's system reports A.B8.05 for this.
1604 ## I wonder what other possibilities there are.
1605 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
1606 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
1607 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
1608 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
1609 *) machine=hp9000s300 opsys=hpux ;;
1610 esac
1611 ;;
1612
1613 ## HP 9000 series 700 and 800, running HP/UX
1614 hppa*-hp-hpux7* )
1615 machine=hp800 opsys=hpux
1616 ;;
1617 hppa*-hp-hpux8* )
1618 machine=hp800 opsys=hpux8
1619 ;;
1620 hppa*-hp-hpux9shr* )
1621 machine=hp800 opsys=hpux9shr
1622 ;;
1623 hppa*-hp-hpux9* )
1624 machine=hp800 opsys=hpux9
1625 ;;
1626 hppa*-hp-hpux1[0-9]* )
1627 machine=hp800 opsys=hpux10
1628 ;;
1629
1630 ## HP 9000 series 700 and 800, running HP/UX
1631 hppa*-hp-hpux* )
1632 ## Cross-compilation? Nah!
1633 case "`uname -r`" in
1634 ## Someone's system reports A.B8.05 for this.
1635 ## I wonder what other possibilities there are.
1636 *.B8.* ) machine=hp800 opsys=hpux8 ;;
1637 *.08.* ) machine=hp800 opsys=hpux8 ;;
1638 *.09.* ) machine=hp800 opsys=hpux9 ;;
1639 *) machine=hp800 opsys=hpux10 ;;
1640 esac
1641 ;;
1642 hppa*-*-nextstep* )
1643 machine=hp800 opsys=nextstep
1644 ;;
1645
1646 ## Orion machines
1647 orion-orion-bsd* )
1648 machine=orion opsys=bsd4-2
1649 ;;
1650 clipper-orion-bsd* )
1651 machine=orion105 opsys=bsd4-2
1652 ;;
1653
1654 ## IBM machines
1655 i[3456]86-ibm-aix1.1* )
1656 machine=ibmps2-aix opsys=usg5-2-2
1657 ;;
1658 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
1659 machine=ibmps2-aix opsys=usg5-3
1660 ;;
1661 i370-ibm-aix*)
1662 machine=ibm370aix opsys=usg5-3
1663 ;;
138f0859
GM
1664 s390-*-linux-gnu)
1665 machine=ibms390 opsys=gnu-linux
1666 ;;
ba4481b5
DL
1667 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
1668 machine=ibmrs6000 opsys=aix3-1
1669 ;;
1670 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
1671 machine=ibmrs6000 opsys=aix3-2-5
1672 ;;
1673 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
1674 machine=ibmrs6000 opsys=aix4-1
1675 ;;
1676 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
1677 machine=ibmrs6000 opsys=aix4-2
1678 ;;
1679 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
1680 machine=ibmrs6000 opsys=aix4
1681 ;;
1682 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
1683 machine=ibmrs6000 opsys=aix4-1
1684 ;;
1685 rs6000-ibm-aix* | powerpc-ibm-aix* )
1686 machine=ibmrs6000 opsys=aix3-2
1687 ;;
1688 romp-ibm-bsd4.3* )
1689 machine=ibmrt opsys=bsd4-3
1690 ;;
1691 romp-ibm-bsd4.2* )
1692 machine=ibmrt opsys=bsd4-2
1693 ;;
1694 romp-ibm-aos4.3* )
1695 machine=ibmrt opsys=bsd4-3
1696 ;;
1697 romp-ibm-aos4.2* )
1698 machine=ibmrt opsys=bsd4-2
1699 ;;
1700 romp-ibm-aos* )
1701 machine=ibmrt opsys=bsd4-3
1702 ;;
1703 romp-ibm-bsd* )
1704 machine=ibmrt opsys=bsd4-3
1705 ;;
1706 romp-ibm-aix* )
1707 machine=ibmrt-aix opsys=usg5-2-2
1708 ;;
1709
1710 ## Integrated Solutions `Optimum V'
1711 m68*-isi-bsd4.2* )
1712 machine=isi-ov opsys=bsd4-2
1713 ;;
1714 m68*-isi-bsd4.3* )
1715 machine=isi-ov opsys=bsd4-3
1716 ;;
1717
1718 ## Intel 386 machines where we do care about the manufacturer
1719 i[3456]86-intsys-sysv* )
1720 machine=is386 opsys=usg5-2-2
1721 ;;
1722
1723 ## Prime EXL
1724 i[3456]86-prime-sysv* )
1725 machine=i386 opsys=usg5-3
1726 ;;
1727
1728 ## Sequent Symmetry running Dynix
1729 i[3456]86-sequent-bsd* )
1730 machine=symmetry opsys=bsd4-3
1731 ;;
1732
1733 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
1734 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
1735 machine=sequent-ptx opsys=ptx4
1736 NON_GNU_CPP=/lib/cpp
1737 ;;
1738
1739 ## Sequent Symmetry running DYNIX/ptx
1740 ## Use the old cpp rather than the newer ANSI one.
1741 i[3456]86-sequent-ptx* )
1742 machine=sequent-ptx opsys=ptx
1743 NON_GNU_CPP="/lib/cpp"
1744 ;;
1745
1746 ## ncr machine running svr4.3.
1747 i[3456]86-ncr-sysv4.3 )
1748 machine=ncr386 opsys=usg5-4-3
1749 ;;
1750
1751 ## Unspecified sysv on an ncr machine defaults to svr4.2.
1752 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
1753 i[3456]86-ncr-sysv* )
1754 machine=ncr386 opsys=usg5-4-2
1755 ;;
1756
1757 ## Intel Paragon OSF/1
1758 i860-intel-osf1* )
1759 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
1760 ;;
1761
1762 ## Intel 860
1763 i860-*-sysv4* )
1764 machine=i860 opsys=usg5-4
1765 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
1766 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
1767 ;;
1768
c76e04a8
GM
1769 ## Macintosh PowerPC
1770 powerpc*-*-linux-gnu* )
1771 machine=macppc opsys=gnu-linux
1772 ;;
1773
ba4481b5
DL
1774 ## Masscomp machines
1775 m68*-masscomp-rtu* )
1776 machine=masscomp opsys=rtu
1777 ;;
1778
1779 ## Megatest machines
1780 m68*-megatest-bsd* )
1781 machine=mega68 opsys=bsd4-2
1782 ;;
1783
1784 ## Workstations sold by MIPS
1785 ## This is not necessarily all workstations using the MIPS processor -
1786 ## Irises are produced by SGI, and DECstations by DEC.
1787
1788 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
1789 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
1790 ## it gives for choosing between the alternatives seems to be "Use
1791 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
1792 ## the BSD world." I'll assume that these are instructions for
1793 ## handling two odd situations, and that every other situation
1794 ## should use mips.h and usg5-2-2, they being listed first.
1795 mips-mips-usg* )
1796 machine=mips4
1797 ## Fall through to the general code at the bottom to decide on the OS.
1798 ;;
1799 mips-mips-riscos4* )
1800 machine=mips4 opsys=bsd4-3
1801 NON_GNU_CC="cc -systype bsd43"
1802 NON_GNU_CPP="cc -systype bsd43 -E"
1803 ;;
1804 mips-mips-riscos5* )
1805 machine=mips4 opsys=riscos5
1806 NON_GNU_CC="cc -systype bsd43"
1807 NON_GNU_CPP="cc -systype bsd43 -E"
1808 ;;
1809 mips-mips-bsd* )
1810 machine=mips opsys=bsd4-3
1811 ;;
1812 mips-mips-* )
1813 machine=mips opsys=usg5-2-2
1814 ;;
1815
1816 ## NeXT
1817 m68*-next-* | m68k-*-nextstep* )
1818 machine=m68k opsys=nextstep
1819 ;;
1820
1821 ## The complete machine from National Semiconductor
1822 ns32k-ns-genix* )
1823 machine=ns32000 opsys=usg5-2
1824 ;;
1825
1826 ## NCR machines
1827 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
1828 machine=tower32 opsys=usg5-2-2
1829 ;;
1830 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
1831 machine=tower32v3 opsys=usg5-3
1832 ;;
1833
1834 ## NEC EWS4800
1835 mips-nec-sysv4*)
1836 machine=ews4800 opsys=ux4800
1837 ;;
1838
1839 ## Nixdorf Targon 31
1840 m68*-nixdorf-sysv* )
1841 machine=targon31 opsys=usg5-2-2
1842 ;;
1843
1844 ## Nu (TI or LMI)
1845 m68*-nu-sysv* )
1846 machine=nu opsys=usg5-2
1847 ;;
1848
1849 ## Plexus
1850 m68*-plexus-sysv* )
1851 machine=plexus opsys=usg5-2
1852 ;;
1853
1854 ## PowerPC reference platform
1855 powerpcle-*-solaris2* )
1856 machine=prep
1857 opsys=sol2-5
1858 ;;
1859
1860 ## Pyramid machines
1861 ## I don't really have any idea what sort of processor the Pyramid has,
1862 ## so I'm assuming it is its own architecture.
1863 pyramid-pyramid-bsd* )
1864 machine=pyramid opsys=bsd4-2
1865 ;;
1866
1867 ## Sequent Balance
1868 ns32k-sequent-bsd4.2* )
1869 machine=sequent opsys=bsd4-2
1870 ;;
1871 ns32k-sequent-bsd4.3* )
1872 machine=sequent opsys=bsd4-3
1873 ;;
1874
1875 ## Siemens Nixdorf
1876 mips-siemens-sysv* | mips-sni-sysv*)
1877 machine=mips-siemens opsys=usg5-4
1878 NON_GNU_CC=/usr/ccs/bin/cc
1879 NON_GNU_CPP=/usr/ccs/lib/cpp
1880 ;;
1881
1882 ## Silicon Graphics machines
1883 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
1884 m68*-sgi-iris3.5* )
1885 machine=irist opsys=iris3-5
1886 ;;
1887 m68*-sgi-iris3.6* | m68*-sgi-iris*)
1888 machine=irist opsys=iris3-6
1889 ;;
1890 ## Iris 4D
1891 mips-sgi-irix3* )
1892 machine=iris4d opsys=irix3-3
1893 ;;
1894 mips-sgi-irix4* )
1895 machine=iris4d opsys=irix4-0
1896 ;;
1897 mips-sgi-irix6.5 )
1898 machine=iris4d opsys=irix6-5
946173ad
DL
1899 # Without defining _LANGUAGE_C, things get masked out in the headers
1900 # so that, for instance, grepping for `free' in stdlib.h fails and
1901 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
1902 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 1903 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
1904 ;;
1905 mips-sgi-irix6* )
1906 machine=iris4d opsys=irix6-0
c4bb2108 1907 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
1908 # but presumably it does no harm.
1909 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 1910 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
1911 NON_GCC_TEST_OPTIONS=-32
1912 ;;
1913 mips-sgi-irix5.[01]* )
1914 machine=iris4d opsys=irix5-0
1915 ;;
1916 mips-sgi-irix5* | mips-sgi-irix* )
1917 machine=iris4d opsys=irix5-2
1918 ;;
1919
1920 ## SONY machines
1921 m68*-sony-bsd4.2* )
1922 machine=news opsys=bsd4-2
1923 ;;
1924 m68*-sony-bsd4.3* )
1925 machine=news opsys=bsd4-3
1926 ;;
1927 m68*-sony-newsos3* | m68*-sony-news3*)
1928 machine=news opsys=bsd4-3
1929 ;;
1930 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
1931 machine=news-risc opsys=bsd4-3
1932 ;;
1933 mips-sony-newsos6* )
1934 machine=news-r6 opsys=newsos6
1935 ;;
1936 mips-sony-news* )
1937 machine=news-risc opsys=newsos5
1938 ;;
1939
1940 ## Stride
1941 m68*-stride-sysv* )
1942 machine=stride opsys=usg5-2
1943 ;;
1944
1945 ## Suns
1946 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
1947 machine=sparc opsys=gnu-linux
1948 ;;
1949
d054101f 1950 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
1951 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
1952 | rs6000-*-solaris2*)
1953 case "${canonical}" in
1954 m68*-sunos1* ) machine=sun1 ;;
1955 m68*-sunos2* ) machine=sun2 ;;
1956 m68* ) machine=sun3 ;;
1957 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
1958 i[3456]86-*-* ) machine=intel386 ;;
1959 powerpcle* ) machine=powerpcle ;;
1960 powerpc* | rs6000* ) machine=ibmrs6000 ;;
1961 sparc* ) machine=sparc ;;
1962 * ) unported=yes ;;
1963 esac
1964 case "${canonical}" in
1965 ## The Sun386 didn't get past 4.0.
1966 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
1967 *-sunos4.0* ) opsys=sunos4-0 ;;
1968 *-sunos4.1.[3-9]*noshare )
1969 ## This name is sunos413 instead of sunos4-1-3
1970 ## to avoid a file name conflict on MSDOS.
1971 opsys=sunos413
1972 NON_GNU_CPP=/usr/lib/cpp
1973 NON_GCC_TEST_OPTIONS=-Bstatic
1974 GCC_TEST_OPTIONS=-static
1975 ;;
1976 *-sunos4.1.[3-9]* | *-sunos4shr*)
1977 opsys=sunos4shr
1978 NON_GNU_CPP=/usr/lib/cpp
1979 ;;
1980 *-sunos4* | *-sunos )
1981 opsys=sunos4-1
1982 NON_GCC_TEST_OPTIONS=-Bstatic
1983 GCC_TEST_OPTIONS=-static
1984 ;;
1985 *-sunos5.3* | *-solaris2.3* )
1986 opsys=sol2-3
1987 NON_GNU_CPP=/usr/ccs/lib/cpp
1988 ;;
1989 *-sunos5.4* | *-solaris2.4* )
1990 opsys=sol2-4
1991 NON_GNU_CPP=/usr/ccs/lib/cpp
1992 RANLIB="ar -ts"
1993 ;;
1994 *-sunos5.5* | *-solaris2.5* )
1995 opsys=sol2-5
1996 NON_GNU_CPP=/usr/ccs/lib/cpp
1997 RANLIB="ar -ts"
1998 ;;
1999 *-sunos5* | *-solaris* )
2000 opsys=sol2-5
2001 NON_GNU_CPP=/usr/ccs/lib/cpp
2002 ;;
2003 * ) opsys=bsd4-2 ;;
2004 esac
2005 ## Watch out for a compiler that we know will not work.
2006 case "${canonical}" in
2007 *-solaris* | *-sunos5* )
2008 if [ "x$CC" = x/usr/ucb/cc ]; then
2009 ## /usr/ucb/cc doesn't work;
2010 ## we should find some other compiler that does work.
2011 unset CC
2012 fi
2013 ;;
2014 *) ;;
2015 esac
2016 ;;
2017 sparc-*-nextstep* )
2018 machine=sparc opsys=nextstep
2019 ;;
2020
2021 ## Tadpole 68k
2022 m68*-tadpole-sysv* )
2023 machine=tad68k opsys=usg5-3
2024 ;;
2025
2026 ## Tahoe machines
2027 tahoe-tahoe-bsd4.2* )
2028 machine=tahoe opsys=bsd4-2
2029 ;;
2030 tahoe-tahoe-bsd4.3* )
2031 machine=tahoe opsys=bsd4-3
2032 ;;
2033
2034 ## Tandem Integrity S2
2035 mips-tandem-sysv* )
2036 machine=tandem-s2 opsys=usg5-3
2037 ;;
2038
2039 ## Tektronix XD88
2040 m88k-tektronix-sysv3* )
2041 machine=tekxd88 opsys=usg5-3
2042 ;;
2043
2044 ## Tektronix 16000 box (6130?)
2045 ns16k-tektronix-bsd* )
2046 machine=ns16000 opsys=bsd4-2
2047 ;;
2048 ## Tektronix 4300
2049 ## src/m/tek4300.h hints that this is a m68k machine.
2050 m68*-tektronix-bsd* )
2051 machine=tek4300 opsys=bsd4-3
2052 ;;
2053
2054 ## Titan P2 or P3
2055 ## We seem to have lost the machine-description file titan.h!
2056 titan-titan-sysv* )
2057 machine=titan opsys=usg5-3
2058 ;;
2059
2060 ## Ustation E30 (SS5E)
2061 m68*-unisys-uniplus* )
2062 machine=ustation opsystem=unipl5-2
2063 ;;
2064
2065 ## Vaxen.
2066 vax-dec-* )
2067 machine=vax
2068 case "${canonical}" in
2069 *-bsd4.1* ) opsys=bsd4-1 ;;
2070 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
2071 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
2072 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
2073 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
2074 *-vms* ) opsys=vms ;;
2075 * ) unported=yes
2076 esac
2077 ;;
2078
2079 ## Whitechapel MG1
2080 ns16k-whitechapel-* )
2081 machine=mg1
2082 ## We don't know what sort of OS runs on these; we'll let the
2083 ## operating system guessing code below try.
2084 ;;
2085
2086 ## Wicat
2087 m68*-wicat-sysv* )
2088 machine=wicat opsys=usg5-2
2089 ;;
2090
f4988be7
GM
2091 ## IA-64
2092 ia64*-*-linux* )
2093 machine=ia64 opsys=gnu-linux
2094 ;;
2095
ba4481b5
DL
2096 ## Intel 386 machines where we don't care about the manufacturer
2097 i[3456]86-*-* )
2098 machine=intel386
2099 case "${canonical}" in
9f817ea4 2100 *-lynxos* ) opsys=lynxos ;;
ba4481b5
DL
2101 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
2102 *-isc2.2* ) opsys=isc2-2 ;;
2103 *-isc4.0* ) opsys=isc4-0 ;;
2104 *-isc4.* ) opsys=isc4-1
2105 GCC_TEST_OPTIONS=-posix
2106 NON_GCC_TEST_OPTIONS=-Xp
2107 ;;
2108 *-isc* ) opsys=isc3-0 ;;
2109 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
2110 *-esix* ) opsys=esix ;;
2111 *-xenix* ) opsys=xenix ;;
2112 *-linux-gnu* ) opsys=gnu-linux ;;
2113 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 2114 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
2115 NON_GNU_CPP=/lib/cpp
2116 # Prevent -belf from being passed to $CPP.
2117 # /lib/cpp does not accept it.
2118 OVERRIDE_CPPFLAGS=" "
2119 ;;
2120 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2121 *-386bsd* ) opsys=386bsd ;;
2122 *-freebsd* ) opsys=freebsd ;;
2123 *-nextstep* ) opsys=nextstep ;;
2124 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2125 esac
2126 ;;
2127
2128 ## m68k Linux-based GNU system
2129 m68k-*-linux-gnu* )
2130 machine=m68k opsys=gnu-linux
2131 ;;
2132
2133 ## Mips Linux-based GNU system
2134 mips-*-linux-gnu* )
2135 machine=mips opsys=gnu-linux
2136 ;;
2137
2138 ## UXP/DS
2139 sparc-fujitsu-sysv4* )
2140 machine=sparc opsys=uxpds
2141 NON_GNU_CPP=/usr/ccs/lib/cpp
2142 RANLIB="ar -ts"
2143 ;;
2144
2145 ## UXP/V
2146 f301-fujitsu-uxpv4.1)
2147 machine=f301 opsys=uxpv
2148 ;;
2149
2150 * )
2151 unported=yes
2152 ;;
2153esac
2154
2155### If the code above didn't choose an operating system, just choose
2156### an operating system based on the configuration name. You really
2157### only want to use this when you have no idea what the right
2158### operating system is; if you know what operating systems a machine
2159### runs, it's cleaner to make it explicit in the case statement
2160### above.
2161if test x"${opsys}" = x; then
2162 case "${canonical}" in
2163 *-gnu* ) opsys=gnu ;;
2164 *-bsd4.[01] ) opsys=bsd4-1 ;;
2165 *-bsd4.2 ) opsys=bsd4-2 ;;
2166 *-bsd4.3 ) opsys=bsd4-3 ;;
2167 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
2168 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
2169 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
2170 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
2171 *-sysv4.2uw* ) opsys=unixware ;;
2172 *-sysv4.1* | *-sysvr4.1* )
2173 NON_GNU_CPP=/usr/lib/cpp
2174 opsys=usg5-4 ;;
2175 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2176 if [ x$NON_GNU_CPP = x ]; then
2177 if [ -f /usr/ccs/lib/cpp ]; then
2178 NON_GNU_CPP=/usr/ccs/lib/cpp
2179 else
2180 NON_GNU_CPP=/lib/cpp
2181 fi
2182 fi
2183 opsys=usg5-4-2 ;;
2184 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2185 * )
2186 unported=yes
2187 ;;
2188 esac
2189fi
2190
ba4481b5 2191if test $unported = yes; then
138f0859 2192 { { echo "$as_me:2192: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2193Check \`etc/MACHINES' for recognized configuration names." >&5
2194echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2195Check \`etc/MACHINES' for recognized configuration names." >&2;}
2196 { (exit 1); exit 1; }; }
ba4481b5
DL
2197fi
2198
2199machfile="m/${machine}.h"
2200opsysfile="s/${opsys}.h"
2201
ba4481b5
DL
2202#### Choose a compiler.
2203test -n "$CC" && cc_specified=yes
2204
2205# Save the value of CFLAGS that the user specified.
2206SPECIFIED_CFLAGS="$CFLAGS"
2207
2208case ${with_gcc} in
2209 "yes" ) CC="gcc" GCC=yes ;;
2210 "no" ) : ${CC=cc} ;;
503d2be0
AS
2211 * )
2212esac
2213ac_ext=c
2214ac_cpp='$CPP $CPPFLAGS'
2215ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2216ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2217ac_compiler_gnu=$ac_cv_c_compiler_gnu
2218if test -n "$ac_tool_prefix"; then
2219 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2220set dummy ${ac_tool_prefix}gcc; ac_word=$2
138f0859 2221echo "$as_me:2221: checking for $ac_word" >&5
503d2be0
AS
2222echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2223if test "${ac_cv_prog_CC+set}" = set; then
2224 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2225else
2226 if test -n "$CC"; then
2227 ac_cv_prog_CC="$CC" # Let the user override the test.
2228else
503d2be0
AS
2229 ac_save_IFS=$IFS; IFS=$ac_path_separator
2230ac_dummy="$PATH"
2231for ac_dir in $ac_dummy; do
2232 IFS=$ac_save_IFS
2233 test -z "$ac_dir" && ac_dir=.
2234 $as_executable_p "$ac_dir/$ac_word" || continue
2235ac_cv_prog_CC="${ac_tool_prefix}gcc"
138f0859 2236echo "$as_me:2236: found $ac_dir/$ac_word" >&5
503d2be0
AS
2237break
2238done
2239
ba4481b5
DL
2240fi
2241fi
503d2be0 2242CC=$ac_cv_prog_CC
ba4481b5 2243if test -n "$CC"; then
138f0859 2244 echo "$as_me:2244: result: $CC" >&5
503d2be0
AS
2245echo "${ECHO_T}$CC" >&6
2246else
138f0859 2247 echo "$as_me:2247: result: no" >&5
503d2be0
AS
2248echo "${ECHO_T}no" >&6
2249fi
2250
2251fi
2252if test -z "$ac_cv_prog_CC"; then
2253 ac_ct_CC=$CC
2254 # Extract the first word of "gcc", so it can be a program name with args.
2255set dummy gcc; ac_word=$2
138f0859 2256echo "$as_me:2256: checking for $ac_word" >&5
503d2be0
AS
2257echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2258if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2259 echo $ECHO_N "(cached) $ECHO_C" >&6
2260else
2261 if test -n "$ac_ct_CC"; then
2262 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2263else
2264 ac_save_IFS=$IFS; IFS=$ac_path_separator
2265ac_dummy="$PATH"
2266for ac_dir in $ac_dummy; do
2267 IFS=$ac_save_IFS
2268 test -z "$ac_dir" && ac_dir=.
2269 $as_executable_p "$ac_dir/$ac_word" || continue
2270ac_cv_prog_ac_ct_CC="gcc"
138f0859 2271echo "$as_me:2271: found $ac_dir/$ac_word" >&5
503d2be0
AS
2272break
2273done
2274
2275fi
2276fi
2277ac_ct_CC=$ac_cv_prog_ac_ct_CC
2278if test -n "$ac_ct_CC"; then
138f0859 2279 echo "$as_me:2279: result: $ac_ct_CC" >&5
503d2be0 2280echo "${ECHO_T}$ac_ct_CC" >&6
ba4481b5 2281else
138f0859 2282 echo "$as_me:2282: result: no" >&5
503d2be0
AS
2283echo "${ECHO_T}no" >&6
2284fi
2285
2286 CC=$ac_ct_CC
2287else
2288 CC="$ac_cv_prog_CC"
ba4481b5
DL
2289fi
2290
2291if test -z "$CC"; then
503d2be0
AS
2292 if test -n "$ac_tool_prefix"; then
2293 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2294set dummy ${ac_tool_prefix}cc; ac_word=$2
138f0859 2295echo "$as_me:2295: checking for $ac_word" >&5
503d2be0
AS
2296echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2297if test "${ac_cv_prog_CC+set}" = set; then
2298 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2299else
2300 if test -n "$CC"; then
2301 ac_cv_prog_CC="$CC" # Let the user override the test.
2302else
503d2be0
AS
2303 ac_save_IFS=$IFS; IFS=$ac_path_separator
2304ac_dummy="$PATH"
2305for ac_dir in $ac_dummy; do
2306 IFS=$ac_save_IFS
2307 test -z "$ac_dir" && ac_dir=.
2308 $as_executable_p "$ac_dir/$ac_word" || continue
2309ac_cv_prog_CC="${ac_tool_prefix}cc"
138f0859 2310echo "$as_me:2310: found $ac_dir/$ac_word" >&5
503d2be0
AS
2311break
2312done
2313
2314fi
2315fi
2316CC=$ac_cv_prog_CC
2317if test -n "$CC"; then
138f0859 2318 echo "$as_me:2318: result: $CC" >&5
503d2be0
AS
2319echo "${ECHO_T}$CC" >&6
2320else
138f0859 2321 echo "$as_me:2321: result: no" >&5
503d2be0
AS
2322echo "${ECHO_T}no" >&6
2323fi
2324
2325fi
2326if test -z "$ac_cv_prog_CC"; then
2327 ac_ct_CC=$CC
2328 # Extract the first word of "cc", so it can be a program name with args.
2329set dummy cc; ac_word=$2
138f0859 2330echo "$as_me:2330: checking for $ac_word" >&5
503d2be0
AS
2331echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2332if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2333 echo $ECHO_N "(cached) $ECHO_C" >&6
2334else
2335 if test -n "$ac_ct_CC"; then
2336 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2337else
2338 ac_save_IFS=$IFS; IFS=$ac_path_separator
2339ac_dummy="$PATH"
2340for ac_dir in $ac_dummy; do
2341 IFS=$ac_save_IFS
2342 test -z "$ac_dir" && ac_dir=.
2343 $as_executable_p "$ac_dir/$ac_word" || continue
2344ac_cv_prog_ac_ct_CC="cc"
138f0859 2345echo "$as_me:2345: found $ac_dir/$ac_word" >&5
503d2be0
AS
2346break
2347done
2348
2349fi
2350fi
2351ac_ct_CC=$ac_cv_prog_ac_ct_CC
2352if test -n "$ac_ct_CC"; then
138f0859 2353 echo "$as_me:2353: result: $ac_ct_CC" >&5
503d2be0
AS
2354echo "${ECHO_T}$ac_ct_CC" >&6
2355else
138f0859 2356 echo "$as_me:2356: result: no" >&5
503d2be0
AS
2357echo "${ECHO_T}no" >&6
2358fi
2359
2360 CC=$ac_ct_CC
2361else
2362 CC="$ac_cv_prog_CC"
2363fi
2364
2365fi
2366if test -z "$CC"; then
2367 # Extract the first word of "cc", so it can be a program name with args.
2368set dummy cc; ac_word=$2
138f0859 2369echo "$as_me:2369: checking for $ac_word" >&5
503d2be0
AS
2370echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2371if test "${ac_cv_prog_CC+set}" = set; then
2372 echo $ECHO_N "(cached) $ECHO_C" >&6
2373else
2374 if test -n "$CC"; then
2375 ac_cv_prog_CC="$CC" # Let the user override the test.
2376else
2377 ac_prog_rejected=no
2378 ac_save_IFS=$IFS; IFS=$ac_path_separator
2379ac_dummy="$PATH"
2380for ac_dir in $ac_dummy; do
2381 IFS=$ac_save_IFS
2382 test -z "$ac_dir" && ac_dir=.
2383 $as_executable_p "$ac_dir/$ac_word" || continue
2384if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2385 ac_prog_rejected=yes
2386 continue
2387fi
2388ac_cv_prog_CC="cc"
138f0859 2389echo "$as_me:2389: found $ac_dir/$ac_word" >&5
503d2be0
AS
2390break
2391done
2392
ba4481b5
DL
2393if test $ac_prog_rejected = yes; then
2394 # We found a bogon in the path, so make sure we never use it.
2395 set dummy $ac_cv_prog_CC
2396 shift
503d2be0 2397 if test $# != 0; then
ba4481b5
DL
2398 # We chose a different compiler from the bogus one.
2399 # However, it has the same basename, so the bogon will be chosen
2400 # first if we set CC to just the basename; use the full file name.
2401 shift
503d2be0 2402 set dummy "$ac_dir/$ac_word" ${1+"$@"}
ba4481b5
DL
2403 shift
2404 ac_cv_prog_CC="$@"
2405 fi
2406fi
2407fi
2408fi
503d2be0 2409CC=$ac_cv_prog_CC
ba4481b5 2410if test -n "$CC"; then
138f0859 2411 echo "$as_me:2411: result: $CC" >&5
503d2be0 2412echo "${ECHO_T}$CC" >&6
ba4481b5 2413else
138f0859 2414 echo "$as_me:2414: result: no" >&5
503d2be0 2415echo "${ECHO_T}no" >&6
ba4481b5
DL
2416fi
2417
503d2be0
AS
2418fi
2419if test -z "$CC"; then
2420 if test -n "$ac_tool_prefix"; then
2421 for ac_prog in cl
2422 do
2423 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2424set dummy $ac_tool_prefix$ac_prog; ac_word=$2
138f0859 2425echo "$as_me:2425: checking for $ac_word" >&5
503d2be0
AS
2426echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2427if test "${ac_cv_prog_CC+set}" = set; then
2428 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2429else
2430 if test -n "$CC"; then
2431 ac_cv_prog_CC="$CC" # Let the user override the test.
2432else
503d2be0
AS
2433 ac_save_IFS=$IFS; IFS=$ac_path_separator
2434ac_dummy="$PATH"
2435for ac_dir in $ac_dummy; do
2436 IFS=$ac_save_IFS
2437 test -z "$ac_dir" && ac_dir=.
2438 $as_executable_p "$ac_dir/$ac_word" || continue
2439ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
138f0859 2440echo "$as_me:2440: found $ac_dir/$ac_word" >&5
503d2be0
AS
2441break
2442done
2443
c4bb2108
DL
2444fi
2445fi
503d2be0 2446CC=$ac_cv_prog_CC
c4bb2108 2447if test -n "$CC"; then
138f0859 2448 echo "$as_me:2448: result: $CC" >&5
503d2be0 2449echo "${ECHO_T}$CC" >&6
c4bb2108 2450else
138f0859 2451 echo "$as_me:2451: result: no" >&5
503d2be0
AS
2452echo "${ECHO_T}no" >&6
2453fi
2454
2455 test -n "$CC" && break
2456 done
2457fi
2458if test -z "$CC"; then
2459 ac_ct_CC=$CC
2460 for ac_prog in cl
2461do
2462 # Extract the first word of "$ac_prog", so it can be a program name with args.
2463set dummy $ac_prog; ac_word=$2
138f0859 2464echo "$as_me:2464: checking for $ac_word" >&5
503d2be0
AS
2465echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2466if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2467 echo $ECHO_N "(cached) $ECHO_C" >&6
2468else
2469 if test -n "$ac_ct_CC"; then
2470 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2471else
2472 ac_save_IFS=$IFS; IFS=$ac_path_separator
2473ac_dummy="$PATH"
2474for ac_dir in $ac_dummy; do
2475 IFS=$ac_save_IFS
2476 test -z "$ac_dir" && ac_dir=.
2477 $as_executable_p "$ac_dir/$ac_word" || continue
2478ac_cv_prog_ac_ct_CC="$ac_prog"
138f0859 2479echo "$as_me:2479: found $ac_dir/$ac_word" >&5
503d2be0
AS
2480break
2481done
2482
c4bb2108 2483fi
503d2be0
AS
2484fi
2485ac_ct_CC=$ac_cv_prog_ac_ct_CC
2486if test -n "$ac_ct_CC"; then
138f0859 2487 echo "$as_me:2487: result: $ac_ct_CC" >&5
503d2be0
AS
2488echo "${ECHO_T}$ac_ct_CC" >&6
2489else
138f0859 2490 echo "$as_me:2490: result: no" >&5
503d2be0 2491echo "${ECHO_T}no" >&6
ba4481b5
DL
2492fi
2493
503d2be0
AS
2494 test -n "$ac_ct_CC" && break
2495done
ba4481b5 2496
503d2be0
AS
2497 CC=$ac_ct_CC
2498fi
2499
2500fi
ba4481b5 2501
138f0859 2502test -z "$CC" && { { echo "$as_me:2502: error: no acceptable cc found in \$PATH" >&5
503d2be0
AS
2503echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
2504 { (exit 1); exit 1; }; }
c4bb2108 2505
503d2be0 2506# Provide some information about the compiler.
138f0859 2507echo "$as_me:2507:" \
503d2be0
AS
2508 "checking for C compiler version" >&5
2509ac_compiler=`set X $ac_compile; echo $2`
138f0859 2510{ (eval echo "$as_me:2510: \"$ac_compiler --version </dev/null >&5\"") >&5
503d2be0
AS
2511 (eval $ac_compiler --version </dev/null >&5) 2>&5
2512 ac_status=$?
138f0859 2513 echo "$as_me:2513: \$? = $ac_status" >&5
503d2be0 2514 (exit $ac_status); }
138f0859 2515{ (eval echo "$as_me:2515: \"$ac_compiler -v </dev/null >&5\"") >&5
503d2be0
AS
2516 (eval $ac_compiler -v </dev/null >&5) 2>&5
2517 ac_status=$?
138f0859 2518 echo "$as_me:2518: \$? = $ac_status" >&5
503d2be0 2519 (exit $ac_status); }
138f0859 2520{ (eval echo "$as_me:2520: \"$ac_compiler -V </dev/null >&5\"") >&5
503d2be0
AS
2521 (eval $ac_compiler -V </dev/null >&5) 2>&5
2522 ac_status=$?
138f0859 2523 echo "$as_me:2523: \$? = $ac_status" >&5
503d2be0
AS
2524 (exit $ac_status); }
2525
2526cat >conftest.$ac_ext <<_ACEOF
138f0859 2527#line 2527 "configure"
ba4481b5 2528#include "confdefs.h"
c4bb2108 2529
503d2be0
AS
2530int
2531main ()
2532{
2533
2534 ;
2535 return 0;
2536}
2537_ACEOF
2538ac_clean_files_save=$ac_clean_files
2539ac_clean_files="$ac_clean_files a.out a.exe"
2540# Try to create an executable without -o first, disregard a.out.
2541# It will help us diagnose broken compilers, and finding out an intuition
2542# of exeext.
138f0859 2543echo "$as_me:2543: checking for C compiler default output" >&5
503d2be0
AS
2544echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2545ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
138f0859 2546if { (eval echo "$as_me:2546: \"$ac_link_default\"") >&5
503d2be0
AS
2547 (eval $ac_link_default) 2>&5
2548 ac_status=$?
138f0859 2549 echo "$as_me:2549: \$? = $ac_status" >&5
503d2be0
AS
2550 (exit $ac_status); }; then
2551 # Find the output, starting from the most likely. This scheme is
2552# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2553# resort.
2554for ac_file in `ls a.exe conftest.exe 2>/dev/null;
2555 ls a.out conftest 2>/dev/null;
2556 ls a.* conftest.* 2>/dev/null`; do
2557 case $ac_file in
2558 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2559 a.out ) # We found the default executable, but exeext='' is most
2560 # certainly right.
2561 break;;
2562 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2563 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2564 export ac_cv_exeext
2565 break;;
2566 * ) break;;
2567 esac
2568done
2569else
2570 echo "$as_me: failed program was:" >&5
2571cat conftest.$ac_ext >&5
138f0859 2572{ { echo "$as_me:2572: error: C compiler cannot create executables" >&5
503d2be0
AS
2573echo "$as_me: error: C compiler cannot create executables" >&2;}
2574 { (exit 77); exit 77; }; }
2575fi
2576
2577ac_exeext=$ac_cv_exeext
138f0859 2578echo "$as_me:2578: result: $ac_file" >&5
503d2be0
AS
2579echo "${ECHO_T}$ac_file" >&6
2580
2581# Check the compiler produces executables we can run. If not, either
2582# the compiler is broken, or we cross compile.
138f0859 2583echo "$as_me:2583: checking whether the C compiler works" >&5
503d2be0
AS
2584echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2585# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2586# If not cross compiling, check that we can run a simple program.
2587if test "$cross_compiling" != yes; then
2588 if { ac_try='./$ac_file'
138f0859 2589 { (eval echo "$as_me:2589: \"$ac_try\"") >&5
503d2be0
AS
2590 (eval $ac_try) 2>&5
2591 ac_status=$?
138f0859 2592 echo "$as_me:2592: \$? = $ac_status" >&5
503d2be0
AS
2593 (exit $ac_status); }; }; then
2594 cross_compiling=no
ba4481b5 2595 else
503d2be0
AS
2596 if test "$cross_compiling" = maybe; then
2597 cross_compiling=yes
2598 else
138f0859 2599 { { echo "$as_me:2599: error: cannot run C compiled programs.
503d2be0
AS
2600If you meant to cross compile, use \`--host'." >&5
2601echo "$as_me: error: cannot run C compiled programs.
2602If you meant to cross compile, use \`--host'." >&2;}
2603 { (exit 1); exit 1; }; }
2604 fi
ba4481b5 2605 fi
503d2be0 2606fi
138f0859 2607echo "$as_me:2607: result: yes" >&5
503d2be0
AS
2608echo "${ECHO_T}yes" >&6
2609
2610rm -f a.out a.exe conftest$ac_cv_exeext
2611ac_clean_files=$ac_clean_files_save
2612# Check the compiler produces executables we can run. If not, either
2613# the compiler is broken, or we cross compile.
138f0859 2614echo "$as_me:2614: checking whether we are cross compiling" >&5
503d2be0 2615echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
138f0859 2616echo "$as_me:2616: result: $cross_compiling" >&5
503d2be0
AS
2617echo "${ECHO_T}$cross_compiling" >&6
2618
138f0859 2619echo "$as_me:2619: checking for executable suffix" >&5
503d2be0 2620echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
138f0859 2621if { (eval echo "$as_me:2621: \"$ac_link\"") >&5
503d2be0
AS
2622 (eval $ac_link) 2>&5
2623 ac_status=$?
138f0859 2624 echo "$as_me:2624: \$? = $ac_status" >&5
503d2be0
AS
2625 (exit $ac_status); }; then
2626 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2627# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2628# work properly (i.e., refer to `conftest.exe'), while it won't with
2629# `rm'.
2630for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2631 case $ac_file in
2632 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2633 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2634 export ac_cv_exeext
2635 break;;
2636 * ) break;;
2637 esac
2638done
ba4481b5 2639else
138f0859 2640 { { echo "$as_me:2640: error: cannot compute EXEEXT: cannot compile and link" >&5
503d2be0
AS
2641echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2642 { (exit 1); exit 1; }; }
ba4481b5 2643fi
ba4481b5 2644
503d2be0 2645rm -f conftest$ac_cv_exeext
138f0859 2646echo "$as_me:2646: result: $ac_cv_exeext" >&5
503d2be0 2647echo "${ECHO_T}$ac_cv_exeext" >&6
ba4481b5 2648
503d2be0
AS
2649rm -f conftest.$ac_ext
2650EXEEXT=$ac_cv_exeext
2651ac_exeext=$EXEEXT
138f0859 2652echo "$as_me:2652: checking for object suffix" >&5
503d2be0
AS
2653echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2654if test "${ac_cv_objext+set}" = set; then
2655 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 2656else
503d2be0 2657 cat >conftest.$ac_ext <<_ACEOF
138f0859 2658#line 2658 "configure"
503d2be0 2659#include "confdefs.h"
ba4481b5 2660
503d2be0
AS
2661int
2662main ()
2663{
ba4481b5 2664
503d2be0
AS
2665 ;
2666 return 0;
2667}
2668_ACEOF
2669rm -f conftest.o conftest.obj
138f0859 2670if { (eval echo "$as_me:2670: \"$ac_compile\"") >&5
503d2be0
AS
2671 (eval $ac_compile) 2>&5
2672 ac_status=$?
138f0859 2673 echo "$as_me:2673: \$? = $ac_status" >&5
503d2be0
AS
2674 (exit $ac_status); }; then
2675 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2676 case $ac_file in
2677 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2678 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2679 break;;
2680 esac
2681done
c4bb2108 2682else
503d2be0
AS
2683 echo "$as_me: failed program was:" >&5
2684cat conftest.$ac_ext >&5
138f0859 2685{ { echo "$as_me:2685: error: cannot compute OBJEXT: cannot compile" >&5
503d2be0
AS
2686echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2687 { (exit 1); exit 1; }; }
c4bb2108
DL
2688fi
2689
503d2be0
AS
2690rm -f conftest.$ac_cv_objext conftest.$ac_ext
2691fi
138f0859 2692echo "$as_me:2692: result: $ac_cv_objext" >&5
503d2be0
AS
2693echo "${ECHO_T}$ac_cv_objext" >&6
2694OBJEXT=$ac_cv_objext
2695ac_objext=$OBJEXT
138f0859 2696echo "$as_me:2696: checking whether we are using the GNU C compiler" >&5
503d2be0
AS
2697echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2698if test "${ac_cv_c_compiler_gnu+set}" = set; then
2699 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 2700else
503d2be0 2701 cat >conftest.$ac_ext <<_ACEOF
138f0859 2702#line 2702 "configure"
503d2be0
AS
2703#include "confdefs.h"
2704
2705int
2706main ()
2707{
2708#ifndef __GNUC__
2709 choke me
2710#endif
2711
2712 ;
2713 return 0;
2714}
2715_ACEOF
2716rm -f conftest.$ac_objext
138f0859 2717if { (eval echo "$as_me:2717: \"$ac_compile\"") >&5
503d2be0
AS
2718 (eval $ac_compile) 2>&5
2719 ac_status=$?
138f0859 2720 echo "$as_me:2720: \$? = $ac_status" >&5
503d2be0
AS
2721 (exit $ac_status); } &&
2722 { ac_try='test -s conftest.$ac_objext'
138f0859 2723 { (eval echo "$as_me:2723: \"$ac_try\"") >&5
503d2be0
AS
2724 (eval $ac_try) 2>&5
2725 ac_status=$?
138f0859 2726 echo "$as_me:2726: \$? = $ac_status" >&5
503d2be0
AS
2727 (exit $ac_status); }; }; then
2728 ac_compiler_gnu=yes
2729else
2730 echo "$as_me: failed program was:" >&5
2731cat conftest.$ac_ext >&5
2732ac_compiler_gnu=no
2733fi
2734rm -f conftest.$ac_objext conftest.$ac_ext
2735ac_cv_c_compiler_gnu=$ac_compiler_gnu
2736
2737fi
138f0859 2738echo "$as_me:2738: result: $ac_cv_c_compiler_gnu" >&5
503d2be0
AS
2739echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2740GCC=`test $ac_compiler_gnu = yes && echo yes`
2741ac_test_CFLAGS=${CFLAGS+set}
2742ac_save_CFLAGS=$CFLAGS
2743CFLAGS="-g"
138f0859 2744echo "$as_me:2744: checking whether $CC accepts -g" >&5
503d2be0
AS
2745echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2746if test "${ac_cv_prog_cc_g+set}" = set; then
2747 echo $ECHO_N "(cached) $ECHO_C" >&6
2748else
2749 cat >conftest.$ac_ext <<_ACEOF
138f0859 2750#line 2750 "configure"
503d2be0
AS
2751#include "confdefs.h"
2752
2753int
2754main ()
2755{
2756
2757 ;
2758 return 0;
2759}
2760_ACEOF
2761rm -f conftest.$ac_objext
138f0859 2762if { (eval echo "$as_me:2762: \"$ac_compile\"") >&5
503d2be0
AS
2763 (eval $ac_compile) 2>&5
2764 ac_status=$?
138f0859 2765 echo "$as_me:2765: \$? = $ac_status" >&5
503d2be0
AS
2766 (exit $ac_status); } &&
2767 { ac_try='test -s conftest.$ac_objext'
138f0859 2768 { (eval echo "$as_me:2768: \"$ac_try\"") >&5
503d2be0
AS
2769 (eval $ac_try) 2>&5
2770 ac_status=$?
138f0859 2771 echo "$as_me:2771: \$? = $ac_status" >&5
503d2be0 2772 (exit $ac_status); }; }; then
ba4481b5
DL
2773 ac_cv_prog_cc_g=yes
2774else
503d2be0
AS
2775 echo "$as_me: failed program was:" >&5
2776cat conftest.$ac_ext >&5
2777ac_cv_prog_cc_g=no
ba4481b5 2778fi
503d2be0 2779rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 2780fi
138f0859 2781echo "$as_me:2781: result: $ac_cv_prog_cc_g" >&5
503d2be0 2782echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c4bb2108 2783if test "$ac_test_CFLAGS" = set; then
503d2be0 2784 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
2785elif test $ac_cv_prog_cc_g = yes; then
2786 if test "$GCC" = yes; then
ba4481b5
DL
2787 CFLAGS="-g -O2"
2788 else
c4bb2108 2789 CFLAGS="-g"
ba4481b5 2790 fi
22afa6e8 2791else
c4bb2108
DL
2792 if test "$GCC" = yes; then
2793 CFLAGS="-O2"
2794 else
2795 CFLAGS=
2796 fi
ba4481b5 2797fi
503d2be0
AS
2798# Some people use a C++ compiler to compile C. Since we use `exit',
2799# in C++ we need to declare it. In case someone uses the same compiler
2800# for both compiling C and C++ we need to have the C++ compiler decide
2801# the declaration of exit, since it's the most demanding environment.
2802cat >conftest.$ac_ext <<_ACEOF
2803#ifndef __cplusplus
2804 choke me
2805#endif
2806_ACEOF
2807rm -f conftest.$ac_objext
138f0859 2808if { (eval echo "$as_me:2808: \"$ac_compile\"") >&5
503d2be0
AS
2809 (eval $ac_compile) 2>&5
2810 ac_status=$?
138f0859 2811 echo "$as_me:2811: \$? = $ac_status" >&5
503d2be0
AS
2812 (exit $ac_status); } &&
2813 { ac_try='test -s conftest.$ac_objext'
138f0859 2814 { (eval echo "$as_me:2814: \"$ac_try\"") >&5
503d2be0
AS
2815 (eval $ac_try) 2>&5
2816 ac_status=$?
138f0859 2817 echo "$as_me:2817: \$? = $ac_status" >&5
503d2be0
AS
2818 (exit $ac_status); }; }; then
2819 for ac_declaration in \
2820 ''\
2821 '#include <stdlib.h>' \
2822 'extern "C" void std::exit (int) throw (); using std::exit;' \
2823 'extern "C" void std::exit (int); using std::exit;' \
2824 'extern "C" void exit (int) throw ();' \
2825 'extern "C" void exit (int);' \
2826 'void exit (int);'
2827do
2828 cat >conftest.$ac_ext <<_ACEOF
138f0859 2829#line 2829 "configure"
503d2be0
AS
2830#include "confdefs.h"
2831#include <stdlib.h>
2832$ac_declaration
2833int
2834main ()
2835{
2836exit (42);
2837 ;
2838 return 0;
2839}
2840_ACEOF
2841rm -f conftest.$ac_objext
138f0859 2842if { (eval echo "$as_me:2842: \"$ac_compile\"") >&5
503d2be0
AS
2843 (eval $ac_compile) 2>&5
2844 ac_status=$?
138f0859 2845 echo "$as_me:2845: \$? = $ac_status" >&5
503d2be0
AS
2846 (exit $ac_status); } &&
2847 { ac_try='test -s conftest.$ac_objext'
138f0859 2848 { (eval echo "$as_me:2848: \"$ac_try\"") >&5
503d2be0
AS
2849 (eval $ac_try) 2>&5
2850 ac_status=$?
138f0859 2851 echo "$as_me:2851: \$? = $ac_status" >&5
503d2be0
AS
2852 (exit $ac_status); }; }; then
2853 :
2854else
2855 echo "$as_me: failed program was:" >&5
2856cat conftest.$ac_ext >&5
2857continue
2858fi
2859rm -f conftest.$ac_objext conftest.$ac_ext
2860 cat >conftest.$ac_ext <<_ACEOF
138f0859 2861#line 2861 "configure"
503d2be0
AS
2862#include "confdefs.h"
2863$ac_declaration
2864int
2865main ()
2866{
2867exit (42);
2868 ;
2869 return 0;
2870}
2871_ACEOF
2872rm -f conftest.$ac_objext
138f0859 2873if { (eval echo "$as_me:2873: \"$ac_compile\"") >&5
503d2be0
AS
2874 (eval $ac_compile) 2>&5
2875 ac_status=$?
138f0859 2876 echo "$as_me:2876: \$? = $ac_status" >&5
503d2be0
AS
2877 (exit $ac_status); } &&
2878 { ac_try='test -s conftest.$ac_objext'
138f0859 2879 { (eval echo "$as_me:2879: \"$ac_try\"") >&5
503d2be0
AS
2880 (eval $ac_try) 2>&5
2881 ac_status=$?
138f0859 2882 echo "$as_me:2882: \$? = $ac_status" >&5
503d2be0
AS
2883 (exit $ac_status); }; }; then
2884 break
2885else
2886 echo "$as_me: failed program was:" >&5
2887cat conftest.$ac_ext >&5
2888fi
2889rm -f conftest.$ac_objext conftest.$ac_ext
2890done
2891rm -f conftest*
2892if test -n "$ac_declaration"; then
2893 echo '#ifdef __cplusplus' >>confdefs.h
2894 echo $ac_declaration >>confdefs.h
2895 echo '#endif' >>confdefs.h
2896fi
ba4481b5 2897
503d2be0
AS
2898else
2899 echo "$as_me: failed program was:" >&5
2900cat conftest.$ac_ext >&5
2901fi
2902rm -f conftest.$ac_objext conftest.$ac_ext
2903ac_ext=c
2904ac_cpp='$CPP $CPPFLAGS'
2905ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2906ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2907ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
2908
2909# On Suns, sometimes $CPP names a directory.
2910if test -n "$CPP" && test -d "$CPP"; then
2911 CPP=
2912fi
2913
2914#### Some systems specify a CPP to use unless we are using GCC.
2915#### Now that we know whether we are using GCC, we can decide whether
2916#### to use that one.
2917if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
2918then
2919 CPP="$NON_GNU_CPP"
2920fi
2921
2922#### Some systems specify a CC to use unless we are using GCC.
2923#### Now that we know whether we are using GCC, we can decide whether
2924#### to use that one.
2925if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
2926 test x$cc_specified != xyes
2927then
2928 CC="$NON_GNU_CC"
2929fi
2930
2931if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
2932then
2933 CC="$CC $GCC_TEST_OPTIONS"
2934fi
2935
2936if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
2937then
2938 CC="$CC $NON_GCC_TEST_OPTIONS"
2939fi
2940
2941if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
2942then
2943 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
2944fi
2945
2946if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
2947then
2948 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
2949fi
2950
2951#### Some other nice autoconf tests. If you add a test here which
2952#### should make an entry in src/config.h, don't forget to add an
2953#### #undef clause to src/config.h.in for autoconf to modify.
2954
138f0859 2955echo "$as_me:2955: checking whether ln -s works" >&5
503d2be0
AS
2956echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2957LN_S=$as_ln_s
2958if test "$LN_S" = "ln -s"; then
138f0859 2959 echo "$as_me:2959: result: yes" >&5
503d2be0 2960echo "${ECHO_T}yes" >&6
ba4481b5 2961else
138f0859 2962 echo "$as_me:2962: result: no, using $LN_S" >&5
503d2be0 2963echo "${ECHO_T}no, using $LN_S" >&6
ba4481b5
DL
2964fi
2965
503d2be0
AS
2966ac_ext=c
2967ac_cpp='$CPP $CPPFLAGS'
2968ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2969ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2970ac_compiler_gnu=$ac_cv_c_compiler_gnu
138f0859 2971echo "$as_me:2971: checking how to run the C preprocessor" >&5
503d2be0 2972echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
ba4481b5
DL
2973# On Suns, sometimes $CPP names a directory.
2974if test -n "$CPP" && test -d "$CPP"; then
2975 CPP=
2976fi
2977if test -z "$CPP"; then
503d2be0
AS
2978 if test "${ac_cv_prog_CPP+set}" = set; then
2979 echo $ECHO_N "(cached) $ECHO_C" >&6
2980else
2981 # Double quotes because CPP needs to be expanded
2982 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2983 do
2984 ac_preproc_ok=false
2985for ac_c_preproc_warn_flag in '' yes
2986do
2987 # Use a header file that comes with gcc, so configuring glibc
2988 # with a fresh cross-compiler works.
ba4481b5 2989 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
2990 # not just through cpp. "Syntax error" is here to catch this case.
2991 cat >conftest.$ac_ext <<_ACEOF
138f0859 2992#line 2992 "configure"
ba4481b5
DL
2993#include "confdefs.h"
2994#include <assert.h>
503d2be0
AS
2995 Syntax error
2996_ACEOF
138f0859 2997if { (eval echo "$as_me:2997: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
2998 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2999 ac_status=$?
3000 egrep -v '^ *\+' conftest.er1 >conftest.err
3001 rm -f conftest.er1
3002 cat conftest.err >&5
138f0859 3003 echo "$as_me:3003: \$? = $ac_status" >&5
503d2be0
AS
3004 (exit $ac_status); } >/dev/null; then
3005 if test -s conftest.err; then
3006 ac_cpp_err=$ac_c_preproc_warn_flag
3007 else
3008 ac_cpp_err=
3009 fi
3010else
3011 ac_cpp_err=yes
3012fi
3013if test -z "$ac_cpp_err"; then
ba4481b5
DL
3014 :
3015else
503d2be0 3016 echo "$as_me: failed program was:" >&5
ba4481b5 3017 cat conftest.$ac_ext >&5
503d2be0
AS
3018 # Broken: fails on valid input.
3019continue
3020fi
3021rm -f conftest.err conftest.$ac_ext
3022
3023 # OK, works on sane cases. Now check whether non-existent headers
3024 # can be detected and how.
3025 cat >conftest.$ac_ext <<_ACEOF
138f0859 3026#line 3026 "configure"
503d2be0
AS
3027#include "confdefs.h"
3028#include <ac_nonexistent.h>
3029_ACEOF
138f0859 3030if { (eval echo "$as_me:3030: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3031 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3032 ac_status=$?
3033 egrep -v '^ *\+' conftest.er1 >conftest.err
3034 rm -f conftest.er1
3035 cat conftest.err >&5
138f0859 3036 echo "$as_me:3036: \$? = $ac_status" >&5
503d2be0
AS
3037 (exit $ac_status); } >/dev/null; then
3038 if test -s conftest.err; then
3039 ac_cpp_err=$ac_c_preproc_warn_flag
3040 else
3041 ac_cpp_err=
3042 fi
3043else
3044 ac_cpp_err=yes
3045fi
3046if test -z "$ac_cpp_err"; then
3047 # Broken: success on invalid input.
3048continue
c4bb2108 3049else
503d2be0 3050 echo "$as_me: failed program was:" >&5
c4bb2108 3051 cat conftest.$ac_ext >&5
503d2be0
AS
3052 # Passes both tests.
3053ac_preproc_ok=:
3054break
3055fi
3056rm -f conftest.err conftest.$ac_ext
3057
3058done
3059# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3060rm -f conftest.err conftest.$ac_ext
3061if $ac_preproc_ok; then
3062 break
3063fi
3064
3065 done
3066 ac_cv_prog_CPP=$CPP
3067
3068fi
3069 CPP=$ac_cv_prog_CPP
3070else
3071 ac_cv_prog_CPP=$CPP
3072fi
138f0859 3073echo "$as_me:3073: result: $CPP" >&5
503d2be0
AS
3074echo "${ECHO_T}$CPP" >&6
3075ac_preproc_ok=false
3076for ac_c_preproc_warn_flag in '' yes
3077do
3078 # Use a header file that comes with gcc, so configuring glibc
3079 # with a fresh cross-compiler works.
3080 # On the NeXT, cc -E runs the code through the compiler's parser,
3081 # not just through cpp. "Syntax error" is here to catch this case.
3082 cat >conftest.$ac_ext <<_ACEOF
138f0859 3083#line 3083 "configure"
c4bb2108
DL
3084#include "confdefs.h"
3085#include <assert.h>
503d2be0
AS
3086 Syntax error
3087_ACEOF
138f0859 3088if { (eval echo "$as_me:3088: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3089 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3090 ac_status=$?
3091 egrep -v '^ *\+' conftest.er1 >conftest.err
3092 rm -f conftest.er1
3093 cat conftest.err >&5
138f0859 3094 echo "$as_me:3094: \$? = $ac_status" >&5
503d2be0
AS
3095 (exit $ac_status); } >/dev/null; then
3096 if test -s conftest.err; then
3097 ac_cpp_err=$ac_c_preproc_warn_flag
3098 else
3099 ac_cpp_err=
3100 fi
3101else
3102 ac_cpp_err=yes
3103fi
3104if test -z "$ac_cpp_err"; then
ba4481b5
DL
3105 :
3106else
503d2be0 3107 echo "$as_me: failed program was:" >&5
ba4481b5 3108 cat conftest.$ac_ext >&5
503d2be0
AS
3109 # Broken: fails on valid input.
3110continue
3111fi
3112rm -f conftest.err conftest.$ac_ext
3113
3114 # OK, works on sane cases. Now check whether non-existent headers
3115 # can be detected and how.
3116 cat >conftest.$ac_ext <<_ACEOF
138f0859 3117#line 3117 "configure"
503d2be0
AS
3118#include "confdefs.h"
3119#include <ac_nonexistent.h>
3120_ACEOF
138f0859 3121if { (eval echo "$as_me:3121: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3122 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3123 ac_status=$?
3124 egrep -v '^ *\+' conftest.er1 >conftest.err
3125 rm -f conftest.er1
3126 cat conftest.err >&5
138f0859 3127 echo "$as_me:3127: \$? = $ac_status" >&5
503d2be0
AS
3128 (exit $ac_status); } >/dev/null; then
3129 if test -s conftest.err; then
3130 ac_cpp_err=$ac_c_preproc_warn_flag
3131 else
3132 ac_cpp_err=
3133 fi
3134else
3135 ac_cpp_err=yes
c4bb2108 3136fi
503d2be0
AS
3137if test -z "$ac_cpp_err"; then
3138 # Broken: success on invalid input.
3139continue
3140else
3141 echo "$as_me: failed program was:" >&5
3142 cat conftest.$ac_ext >&5
3143 # Passes both tests.
3144ac_preproc_ok=:
3145break
ba4481b5 3146fi
503d2be0
AS
3147rm -f conftest.err conftest.$ac_ext
3148
3149done
3150# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3151rm -f conftest.err conftest.$ac_ext
3152if $ac_preproc_ok; then
3153 :
ba4481b5 3154else
138f0859 3155 { { echo "$as_me:3155: error: C preprocessor \"$CPP\" fails sanity check" >&5
503d2be0
AS
3156echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3157 { (exit 1); exit 1; }; }
ba4481b5 3158fi
503d2be0
AS
3159
3160ac_ext=c
3161ac_cpp='$CPP $CPPFLAGS'
3162ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3163ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3164ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
3165
3166# Find a good install program. We prefer a C program (faster),
3167# so one script is as good as another. But avoid the broken or
3168# incompatible versions:
3169# SysV /etc/install, /usr/sbin/install
3170# SunOS /usr/etc/install
3171# IRIX /sbin/install
3172# AIX /bin/install
503d2be0 3173# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 3174# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
3175# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3176# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3177# ./install, which can be erroneously created by make from ./install.sh.
138f0859 3178echo "$as_me:3178: checking for a BSD compatible install" >&5
503d2be0 3179echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
ba4481b5 3180if test -z "$INSTALL"; then
503d2be0
AS
3181if test "${ac_cv_path_install+set}" = set; then
3182 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3183else
503d2be0 3184 ac_save_IFS=$IFS; IFS=$ac_path_separator
ba4481b5 3185 for ac_dir in $PATH; do
503d2be0 3186 IFS=$ac_save_IFS
ba4481b5 3187 # Account for people who put trailing slashes in PATH elements.
503d2be0
AS
3188 case $ac_dir/ in
3189 / | ./ | .// | /cC/* \
3190 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3191 | /usr/ucb/* ) ;;
ba4481b5
DL
3192 *)
3193 # OSF1 and SCO ODT 3.0 have their own names for install.
c4bb2108
DL
3194 # Don't use installbsd from OSF since it installs stuff as root
3195 # by default.
3196 for ac_prog in ginstall scoinst install; do
503d2be0 3197 if $as_executable_p "$ac_dir/$ac_prog"; then
ba4481b5 3198 if test $ac_prog = install &&
503d2be0 3199 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
ba4481b5
DL
3200 # AIX install. It has an incompatible calling convention.
3201 :
503d2be0
AS
3202 elif test $ac_prog = install &&
3203 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3204 # program-specific install script used by HP pwplus--don't use.
3205 :
ba4481b5
DL
3206 else
3207 ac_cv_path_install="$ac_dir/$ac_prog -c"
3208 break 2
3209 fi
3210 fi
3211 done
3212 ;;
3213 esac
3214 done
ba4481b5
DL
3215
3216fi
3217 if test "${ac_cv_path_install+set}" = set; then
503d2be0 3218 INSTALL=$ac_cv_path_install
ba4481b5
DL
3219 else
3220 # As a last resort, use the slow shell script. We don't cache a
3221 # path for INSTALL within a source directory, because that will
3222 # break other packages using the cache if that directory is
3223 # removed, or if the path is relative.
503d2be0 3224 INSTALL=$ac_install_sh
ba4481b5
DL
3225 fi
3226fi
138f0859 3227echo "$as_me:3227: result: $INSTALL" >&5
503d2be0 3228echo "${ECHO_T}$INSTALL" >&6
ba4481b5
DL
3229
3230# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3231# It thinks the first close brace ends the variable substitution.
3232test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3233
503d2be0 3234test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 3235
ba4481b5
DL
3236test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3237
3238for ac_prog in 'bison -y' byacc
3239do
503d2be0 3240 # Extract the first word of "$ac_prog", so it can be a program name with args.
ba4481b5 3241set dummy $ac_prog; ac_word=$2
138f0859 3242echo "$as_me:3242: checking for $ac_word" >&5
503d2be0
AS
3243echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3244if test "${ac_cv_prog_YACC+set}" = set; then
3245 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3246else
3247 if test -n "$YACC"; then
3248 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3249else
503d2be0
AS
3250 ac_save_IFS=$IFS; IFS=$ac_path_separator
3251ac_dummy="$PATH"
3252for ac_dir in $ac_dummy; do
3253 IFS=$ac_save_IFS
3254 test -z "$ac_dir" && ac_dir=.
3255 $as_executable_p "$ac_dir/$ac_word" || continue
3256ac_cv_prog_YACC="$ac_prog"
138f0859 3257echo "$as_me:3257: found $ac_dir/$ac_word" >&5
503d2be0
AS
3258break
3259done
3260
ba4481b5
DL
3261fi
3262fi
503d2be0 3263YACC=$ac_cv_prog_YACC
ba4481b5 3264if test -n "$YACC"; then
138f0859 3265 echo "$as_me:3265: result: $YACC" >&5
503d2be0 3266echo "${ECHO_T}$YACC" >&6
ba4481b5 3267else
138f0859 3268 echo "$as_me:3268: result: no" >&5
503d2be0 3269echo "${ECHO_T}no" >&6
ba4481b5
DL
3270fi
3271
503d2be0 3272 test -n "$YACC" && break
ba4481b5
DL
3273done
3274test -n "$YACC" || YACC="yacc"
3275
7397acc4 3276if test "x$RANLIB" = x; then
503d2be0
AS
3277 if test -n "$ac_tool_prefix"; then
3278 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3279set dummy ${ac_tool_prefix}ranlib; ac_word=$2
138f0859 3280echo "$as_me:3280: checking for $ac_word" >&5
503d2be0
AS
3281echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3282if test "${ac_cv_prog_RANLIB+set}" = set; then
3283 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
3284else
3285 if test -n "$RANLIB"; then
3286 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3287else
503d2be0
AS
3288 ac_save_IFS=$IFS; IFS=$ac_path_separator
3289ac_dummy="$PATH"
3290for ac_dir in $ac_dummy; do
3291 IFS=$ac_save_IFS
3292 test -z "$ac_dir" && ac_dir=.
3293 $as_executable_p "$ac_dir/$ac_word" || continue
3294ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
138f0859 3295echo "$as_me:3295: found $ac_dir/$ac_word" >&5
503d2be0
AS
3296break
3297done
3298
7397acc4
DL
3299fi
3300fi
503d2be0 3301RANLIB=$ac_cv_prog_RANLIB
7397acc4 3302if test -n "$RANLIB"; then
138f0859 3303 echo "$as_me:3303: result: $RANLIB" >&5
503d2be0
AS
3304echo "${ECHO_T}$RANLIB" >&6
3305else
138f0859 3306 echo "$as_me:3306: result: no" >&5
503d2be0
AS
3307echo "${ECHO_T}no" >&6
3308fi
3309
3310fi
3311if test -z "$ac_cv_prog_RANLIB"; then
3312 ac_ct_RANLIB=$RANLIB
3313 # Extract the first word of "ranlib", so it can be a program name with args.
3314set dummy ranlib; ac_word=$2
138f0859 3315echo "$as_me:3315: checking for $ac_word" >&5
503d2be0
AS
3316echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3317if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3318 echo $ECHO_N "(cached) $ECHO_C" >&6
3319else
3320 if test -n "$ac_ct_RANLIB"; then
3321 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3322else
3323 ac_save_IFS=$IFS; IFS=$ac_path_separator
3324ac_dummy="$PATH"
3325for ac_dir in $ac_dummy; do
3326 IFS=$ac_save_IFS
3327 test -z "$ac_dir" && ac_dir=.
3328 $as_executable_p "$ac_dir/$ac_word" || continue
3329ac_cv_prog_ac_ct_RANLIB="ranlib"
138f0859 3330echo "$as_me:3330: found $ac_dir/$ac_word" >&5
503d2be0
AS
3331break
3332done
3333
3334 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3335fi
3336fi
3337ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3338if test -n "$ac_ct_RANLIB"; then
138f0859 3339 echo "$as_me:3339: result: $ac_ct_RANLIB" >&5
503d2be0
AS
3340echo "${ECHO_T}$ac_ct_RANLIB" >&6
3341else
138f0859 3342 echo "$as_me:3342: result: no" >&5
503d2be0
AS
3343echo "${ECHO_T}no" >&6
3344fi
3345
3346 RANLIB=$ac_ct_RANLIB
7397acc4 3347else
503d2be0 3348 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
3349fi
3350
3351fi
ba4481b5 3352
138f0859 3353echo "$as_me:3353: checking for AIX" >&5
503d2be0
AS
3354echo $ECHO_N "checking for AIX... $ECHO_C" >&6
3355cat >conftest.$ac_ext <<_ACEOF
138f0859 3356#line 3356 "configure"
ba4481b5
DL
3357#include "confdefs.h"
3358#ifdef _AIX
3359 yes
3360#endif
3361
503d2be0 3362_ACEOF
ba4481b5
DL
3363if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3364 egrep "yes" >/dev/null 2>&1; then
138f0859 3365 echo "$as_me:3365: result: yes" >&5
503d2be0
AS
3366echo "${ECHO_T}yes" >&6
3367cat >>confdefs.h <<\EOF
ba4481b5
DL
3368#define _ALL_SOURCE 1
3369EOF
3370
3371else
138f0859 3372 echo "$as_me:3372: result: no" >&5
503d2be0 3373echo "${ECHO_T}no" >&6
ba4481b5
DL
3374fi
3375rm -f conftest*
3376
3b33a005
DL
3377#### Extract some information from the operating system and machine files.
3378
138f0859 3379{ echo "$as_me:3379: checking the machine- and system-dependent files to find out
3b33a005 3380 - which libraries the lib-src programs will want, and
503d2be0
AS
3381 - whether the GNU malloc routines are usable..." >&5
3382echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 3383 - which libraries the lib-src programs will want, and
503d2be0 3384 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
3385
3386### First figure out CFLAGS (which we use for running the compiler here)
3387### and REAL_CFLAGS (which we use for real compilation).
3388### The two are the same except on a few systems, where they are made
3389### different to work around various lossages. For example,
3390### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
3391### as implying static linking.
3392
3393### If the CFLAGS env var is specified, we use that value
3394### instead of the default.
3395
3396### It's not important that this name contain the PID; you can't run
3397### two configures in the same directory and have anything work
3398### anyway.
3399tempcname="conftest.c"
3400
3401echo '
3402#include "'${srcdir}'/src/'${opsysfile}'"
3403#include "'${srcdir}'/src/'${machfile}'"
3404#ifndef LIBS_MACHINE
3405#define LIBS_MACHINE
3406#endif
3407#ifndef LIBS_SYSTEM
3408#define LIBS_SYSTEM
3409#endif
3410#ifndef C_SWITCH_SYSTEM
3411#define C_SWITCH_SYSTEM
3412#endif
3413#ifndef C_SWITCH_MACHINE
3414#define C_SWITCH_MACHINE
3415#endif
3416configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
3417configure___ c_switch_system=C_SWITCH_SYSTEM
3418configure___ c_switch_machine=C_SWITCH_MACHINE
3419
3420#ifndef LIB_X11_LIB
3421#define LIB_X11_LIB -lX11
3422#endif
3423
3424#ifndef LIBX11_MACHINE
3425#define LIBX11_MACHINE
3426#endif
3427
3428#ifndef LIBX11_SYSTEM
3429#define LIBX11_SYSTEM
3430#endif
3431configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
3432
3433#ifdef UNEXEC
3434configure___ unexec=UNEXEC
3435#else
3436configure___ unexec=unexec.o
3437#endif
3438
3439#ifdef SYSTEM_MALLOC
3440configure___ system_malloc=yes
3441#else
3442configure___ system_malloc=no
3443#endif
3444
ef9e4345
GM
3445#ifdef USE_MMAP_FOR_BUFFERS
3446configure___ use_mmap_for_buffers=yes
73b77ee5 3447#else
ef9e4345 3448configure___ use_mmap_for_buffers=no
73b77ee5
GM
3449#endif
3450
3b33a005
DL
3451#ifndef C_DEBUG_SWITCH
3452#define C_DEBUG_SWITCH -g
3453#endif
3454
3455#ifndef C_OPTIMIZE_SWITCH
3456#ifdef __GNUC__
3457#define C_OPTIMIZE_SWITCH -O2
3458#else
3459#define C_OPTIMIZE_SWITCH -O
3460#endif
3461#endif
3462
3463#ifndef LD_SWITCH_MACHINE
3464#define LD_SWITCH_MACHINE
3465#endif
3466
3467#ifndef LD_SWITCH_SYSTEM
3468#define LD_SWITCH_SYSTEM
3469#endif
3470
3471#ifndef LD_SWITCH_X_SITE_AUX
3472#define LD_SWITCH_X_SITE_AUX
503d2be0 3473#endif
3b33a005
DL
3474
3475configure___ ld_switch_system=LD_SWITCH_SYSTEM
3476configure___ ld_switch_machine=LD_SWITCH_MACHINE
3477
3478#ifdef THIS_IS_CONFIGURE
3479
3480/* Get the CFLAGS for tests in configure. */
3481#ifdef __GNUC__
3482configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3483#else
3484configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3485#endif
3486
3487#else /* not THIS_IS_CONFIGURE */
3488
3489/* Get the CFLAGS for real compilation. */
3490#ifdef __GNUC__
3491configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3492#else
3493configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3494#endif
3495
3496#endif /* not THIS_IS_CONFIGURE */
3497' > ${tempcname}
3498
3499# The value of CPP is a quoted variable reference, so we need to do this
3500# to get its actual value...
3501CPP=`eval "echo $CPP"`
3502eval `${CPP} -Isrc ${tempcname} \
3503 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3504if test "x$SPECIFIED_CFLAGS" = x; then
3505 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
3506 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3507else
3508 REAL_CFLAGS="$CFLAGS"
3509fi
3510rm ${tempcname}
3511
3512ac_link="$ac_link $ld_switch_machine $ld_switch_system"
3513
3514### Make sure subsequent tests use flags consistent with the build flags.
3515
3516if test x"${OVERRIDE_CPPFLAGS}" != x; then
3517 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
3518else
3519 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
3520fi
3521
503d2be0 3522# Check whether --enable-largefile or --disable-largefile was given.
f4988be7
GM
3523if test "${enable_largefile+set}" = set; then
3524 enableval="$enable_largefile"
f4988be7 3525
503d2be0
AS
3526fi;
3527if test "$enable_largefile" != no; then
f4988be7 3528
138f0859 3529 echo "$as_me:3529: checking for special C compiler options needed for large files" >&5
503d2be0
AS
3530echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
3531if test "${ac_cv_sys_largefile_CC+set}" = set; then
3532 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3533else
f4988be7 3534 ac_cv_sys_largefile_CC=no
503d2be0
AS
3535 if test "$GCC" != yes; then
3536 ac_save_CC=$CC
3537 while :; do
3538 # IRIX 6.2 and later do not support large files by default,
3539 # so use the C compiler's -n32 option if that helps.
3540 cat >conftest.$ac_ext <<_ACEOF
138f0859 3541#line 3541 "configure"
b192d653 3542#include "confdefs.h"
f4988be7 3543#include <sys/types.h>
503d2be0
AS
3544 /* Check that off_t can represent 2**63 - 1 correctly.
3545 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3546 since some C++ compilers masquerading as C compilers
3547 incorrectly reject 9223372036854775807. */
3548#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3549 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3550 && LARGE_OFF_T % 2147483647 == 1)
3551 ? 1 : -1];
3552int
3553main ()
3554{
f4988be7 3555
503d2be0
AS
3556 ;
3557 return 0;
3558}
3559_ACEOF
3560 rm -f conftest.$ac_objext
138f0859 3561if { (eval echo "$as_me:3561: \"$ac_compile\"") >&5
503d2be0
AS
3562 (eval $ac_compile) 2>&5
3563 ac_status=$?
138f0859 3564 echo "$as_me:3564: \$? = $ac_status" >&5
503d2be0
AS
3565 (exit $ac_status); } &&
3566 { ac_try='test -s conftest.$ac_objext'
138f0859 3567 { (eval echo "$as_me:3567: \"$ac_try\"") >&5
503d2be0
AS
3568 (eval $ac_try) 2>&5
3569 ac_status=$?
138f0859 3570 echo "$as_me:3570: \$? = $ac_status" >&5
503d2be0
AS
3571 (exit $ac_status); }; }; then
3572 break
b192d653 3573else
503d2be0
AS
3574 echo "$as_me: failed program was:" >&5
3575cat conftest.$ac_ext >&5
3576fi
3577rm -f conftest.$ac_objext
3578 CC="$CC -n32"
3579 rm -f conftest.$ac_objext
138f0859 3580if { (eval echo "$as_me:3580: \"$ac_compile\"") >&5
503d2be0
AS
3581 (eval $ac_compile) 2>&5
3582 ac_status=$?
138f0859 3583 echo "$as_me:3583: \$? = $ac_status" >&5
503d2be0
AS
3584 (exit $ac_status); } &&
3585 { ac_try='test -s conftest.$ac_objext'
138f0859 3586 { (eval echo "$as_me:3586: \"$ac_try\"") >&5
503d2be0
AS
3587 (eval $ac_try) 2>&5
3588 ac_status=$?
138f0859 3589 echo "$as_me:3589: \$? = $ac_status" >&5
503d2be0
AS
3590 (exit $ac_status); }; }; then
3591 ac_cv_sys_largefile_CC=' -n32'; break
3592else
3593 echo "$as_me: failed program was:" >&5
3594cat conftest.$ac_ext >&5
3595fi
3596rm -f conftest.$ac_objext
3597 break
3598 done
3599 CC=$ac_save_CC
3600 rm -f conftest.$ac_ext
3601 fi
b192d653 3602fi
138f0859 3603echo "$as_me:3603: result: $ac_cv_sys_largefile_CC" >&5
503d2be0
AS
3604echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
3605 if test "$ac_cv_sys_largefile_CC" != no; then
3606 CC=$CC$ac_cv_sys_largefile_CC
3607 fi
b192d653 3608
138f0859 3609 echo "$as_me:3609: checking for _FILE_OFFSET_BITS value needed for large files" >&5
503d2be0
AS
3610echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
3611if test "${ac_cv_sys_file_offset_bits+set}" = set; then
3612 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3613else
503d2be0 3614 while :; do
f4988be7 3615 ac_cv_sys_file_offset_bits=no
503d2be0 3616 cat >conftest.$ac_ext <<_ACEOF
138f0859 3617#line 3617 "configure"
f4988be7
GM
3618#include "confdefs.h"
3619#include <sys/types.h>
503d2be0
AS
3620 /* Check that off_t can represent 2**63 - 1 correctly.
3621 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3622 since some C++ compilers masquerading as C compilers
3623 incorrectly reject 9223372036854775807. */
3624#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3625 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3626 && LARGE_OFF_T % 2147483647 == 1)
3627 ? 1 : -1];
3628int
3629main ()
3630{
f4988be7 3631
503d2be0
AS
3632 ;
3633 return 0;
3634}
3635_ACEOF
3636rm -f conftest.$ac_objext
138f0859 3637if { (eval echo "$as_me:3637: \"$ac_compile\"") >&5
503d2be0
AS
3638 (eval $ac_compile) 2>&5
3639 ac_status=$?
138f0859 3640 echo "$as_me:3640: \$? = $ac_status" >&5
503d2be0
AS
3641 (exit $ac_status); } &&
3642 { ac_try='test -s conftest.$ac_objext'
138f0859 3643 { (eval echo "$as_me:3643: \"$ac_try\"") >&5
503d2be0
AS
3644 (eval $ac_try) 2>&5
3645 ac_status=$?
138f0859 3646 echo "$as_me:3646: \$? = $ac_status" >&5
503d2be0
AS
3647 (exit $ac_status); }; }; then
3648 break
f4988be7 3649else
503d2be0
AS
3650 echo "$as_me: failed program was:" >&5
3651cat conftest.$ac_ext >&5
3652fi
3653rm -f conftest.$ac_objext conftest.$ac_ext
3654 cat >conftest.$ac_ext <<_ACEOF
138f0859 3655#line 3655 "configure"
ba4481b5 3656#include "confdefs.h"
f4988be7
GM
3657#define _FILE_OFFSET_BITS 64
3658#include <sys/types.h>
503d2be0
AS
3659 /* Check that off_t can represent 2**63 - 1 correctly.
3660 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3661 since some C++ compilers masquerading as C compilers
3662 incorrectly reject 9223372036854775807. */
3663#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3664 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3665 && LARGE_OFF_T % 2147483647 == 1)
3666 ? 1 : -1];
3667int
3668main ()
3669{
3670
3671 ;
3672 return 0;
3673}
3674_ACEOF
3675rm -f conftest.$ac_objext
138f0859 3676if { (eval echo "$as_me:3676: \"$ac_compile\"") >&5
503d2be0
AS
3677 (eval $ac_compile) 2>&5
3678 ac_status=$?
138f0859 3679 echo "$as_me:3679: \$? = $ac_status" >&5
503d2be0
AS
3680 (exit $ac_status); } &&
3681 { ac_try='test -s conftest.$ac_objext'
138f0859 3682 { (eval echo "$as_me:3682: \"$ac_try\"") >&5
503d2be0
AS
3683 (eval $ac_try) 2>&5
3684 ac_status=$?
138f0859 3685 echo "$as_me:3685: \$? = $ac_status" >&5
503d2be0
AS
3686 (exit $ac_status); }; }; then
3687 ac_cv_sys_file_offset_bits=64; break
3688else
3689 echo "$as_me: failed program was:" >&5
3690cat conftest.$ac_ext >&5
3691fi
3692rm -f conftest.$ac_objext conftest.$ac_ext
3693 break
3694done
ba4481b5 3695fi
138f0859 3696echo "$as_me:3696: result: $ac_cv_sys_file_offset_bits" >&5
503d2be0
AS
3697echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
3698if test "$ac_cv_sys_file_offset_bits" != no; then
ba4481b5 3699
503d2be0 3700cat >>confdefs.h <<EOF
f4988be7 3701#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
ba4481b5 3702EOF
f4988be7 3703
503d2be0
AS
3704fi
3705rm -f conftest*
138f0859 3706 echo "$as_me:3706: checking for _LARGE_FILES value needed for large files" >&5
503d2be0
AS
3707echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
3708if test "${ac_cv_sys_large_files+set}" = set; then
3709 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3710else
503d2be0 3711 while :; do
f4988be7 3712 ac_cv_sys_large_files=no
503d2be0 3713 cat >conftest.$ac_ext <<_ACEOF
138f0859 3714#line 3714 "configure"
f4988be7 3715#include "confdefs.h"
503d2be0
AS
3716#include <sys/types.h>
3717 /* Check that off_t can represent 2**63 - 1 correctly.
3718 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3719 since some C++ compilers masquerading as C compilers
3720 incorrectly reject 9223372036854775807. */
3721#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3722 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3723 && LARGE_OFF_T % 2147483647 == 1)
3724 ? 1 : -1];
3725int
3726main ()
3727{
ba4481b5 3728
503d2be0
AS
3729 ;
3730 return 0;
3731}
3732_ACEOF
3733rm -f conftest.$ac_objext
138f0859 3734if { (eval echo "$as_me:3734: \"$ac_compile\"") >&5
503d2be0
AS
3735 (eval $ac_compile) 2>&5
3736 ac_status=$?
138f0859 3737 echo "$as_me:3737: \$? = $ac_status" >&5
503d2be0
AS
3738 (exit $ac_status); } &&
3739 { ac_try='test -s conftest.$ac_objext'
138f0859 3740 { (eval echo "$as_me:3740: \"$ac_try\"") >&5
503d2be0
AS
3741 (eval $ac_try) 2>&5
3742 ac_status=$?
138f0859 3743 echo "$as_me:3743: \$? = $ac_status" >&5
503d2be0
AS
3744 (exit $ac_status); }; }; then
3745 break
ba4481b5 3746else
503d2be0
AS
3747 echo "$as_me: failed program was:" >&5
3748cat conftest.$ac_ext >&5
3749fi
3750rm -f conftest.$ac_objext conftest.$ac_ext
3751 cat >conftest.$ac_ext <<_ACEOF
138f0859 3752#line 3752 "configure"
ba4481b5 3753#include "confdefs.h"
f4988be7 3754#define _LARGE_FILES 1
503d2be0
AS
3755#include <sys/types.h>
3756 /* Check that off_t can represent 2**63 - 1 correctly.
3757 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3758 since some C++ compilers masquerading as C compilers
3759 incorrectly reject 9223372036854775807. */
3760#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3761 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3762 && LARGE_OFF_T % 2147483647 == 1)
3763 ? 1 : -1];
3764int
3765main ()
3766{
f4988be7 3767
503d2be0
AS
3768 ;
3769 return 0;
3770}
3771_ACEOF
3772rm -f conftest.$ac_objext
138f0859 3773if { (eval echo "$as_me:3773: \"$ac_compile\"") >&5
503d2be0
AS
3774 (eval $ac_compile) 2>&5
3775 ac_status=$?
138f0859 3776 echo "$as_me:3776: \$? = $ac_status" >&5
503d2be0
AS
3777 (exit $ac_status); } &&
3778 { ac_try='test -s conftest.$ac_objext'
138f0859 3779 { (eval echo "$as_me:3779: \"$ac_try\"") >&5
503d2be0
AS
3780 (eval $ac_try) 2>&5
3781 ac_status=$?
138f0859 3782 echo "$as_me:3782: \$? = $ac_status" >&5
503d2be0
AS
3783 (exit $ac_status); }; }; then
3784 ac_cv_sys_large_files=1; break
3785else
3786 echo "$as_me: failed program was:" >&5
3787cat conftest.$ac_ext >&5
3788fi
3789rm -f conftest.$ac_objext conftest.$ac_ext
3790 break
3791done
ba4481b5 3792fi
138f0859 3793echo "$as_me:3793: result: $ac_cv_sys_large_files" >&5
503d2be0
AS
3794echo "${ECHO_T}$ac_cv_sys_large_files" >&6
3795if test "$ac_cv_sys_large_files" != no; then
ba4481b5 3796
503d2be0 3797cat >>confdefs.h <<EOF
f4988be7 3798#define _LARGE_FILES $ac_cv_sys_large_files
ba4481b5
DL
3799EOF
3800
503d2be0
AS
3801fi
3802rm -f conftest*
3803fi
ba4481b5 3804
f4988be7 3805# Sound support for GNU/Linux and the free BSDs.
503d2be0
AS
3806
3807for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
f4988be7 3808do
503d2be0 3809as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
138f0859 3810echo "$as_me:3810: checking for $ac_header" >&5
503d2be0
AS
3811echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3812if eval "test \"\${$as_ac_Header+set}\" = set"; then
3813 echo $ECHO_N "(cached) $ECHO_C" >&6
3814else
3815 cat >conftest.$ac_ext <<_ACEOF
138f0859 3816#line 3816 "configure"
503d2be0
AS
3817#include "confdefs.h"
3818#include <$ac_header>
3819_ACEOF
138f0859 3820if { (eval echo "$as_me:3820: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3821 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3822 ac_status=$?
3823 egrep -v '^ *\+' conftest.er1 >conftest.err
3824 rm -f conftest.er1
3825 cat conftest.err >&5
138f0859 3826 echo "$as_me:3826: \$? = $ac_status" >&5
503d2be0
AS
3827 (exit $ac_status); } >/dev/null; then
3828 if test -s conftest.err; then
3829 ac_cpp_err=$ac_c_preproc_warn_flag
3830 else
3831 ac_cpp_err=
3832 fi
3833else
3834 ac_cpp_err=yes
3835fi
3836if test -z "$ac_cpp_err"; then
3837 eval "$as_ac_Header=yes"
3838else
3839 echo "$as_me: failed program was:" >&5
ba4481b5 3840 cat conftest.$ac_ext >&5
503d2be0 3841 eval "$as_ac_Header=no"
ba4481b5 3842fi
503d2be0 3843rm -f conftest.err conftest.$ac_ext
ba4481b5 3844fi
138f0859 3845echo "$as_me:3845: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
3846echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3847if test `eval echo '${'$as_ac_Header'}'` = yes; then
3848 cat >>confdefs.h <<EOF
3849#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba4481b5 3850EOF
503d2be0 3851
ba4481b5 3852fi
f4988be7 3853done
ba4481b5 3854
f4988be7 3855# Emulation library used on NetBSD.
138f0859 3856echo "$as_me:3856: checking for _oss_ioctl in -lossaudio" >&5
503d2be0
AS
3857echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6
3858if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
3859 echo $ECHO_N "(cached) $ECHO_C" >&6
65171e3a 3860else
503d2be0 3861 ac_check_lib_save_LIBS=$LIBS
f4988be7 3862LIBS="-lossaudio $LIBS"
503d2be0 3863cat >conftest.$ac_ext <<_ACEOF
138f0859 3864#line 3864 "configure"
65171e3a 3865#include "confdefs.h"
503d2be0 3866
f4988be7 3867/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
3868#ifdef __cplusplus
3869extern "C"
3870#endif
f4988be7 3871/* We use char because int might match the return type of a gcc2
503d2be0
AS
3872 builtin and then its argument prototype would still apply. */
3873char _oss_ioctl ();
3874int
3875main ()
3876{
3877_oss_ioctl ();
3878 ;
3879 return 0;
3880}
3881_ACEOF
3882rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 3883if { (eval echo "$as_me:3883: \"$ac_link\"") >&5
503d2be0
AS
3884 (eval $ac_link) 2>&5
3885 ac_status=$?
138f0859 3886 echo "$as_me:3886: \$? = $ac_status" >&5
503d2be0
AS
3887 (exit $ac_status); } &&
3888 { ac_try='test -s conftest$ac_exeext'
138f0859 3889 { (eval echo "$as_me:3889: \"$ac_try\"") >&5
503d2be0
AS
3890 (eval $ac_try) 2>&5
3891 ac_status=$?
138f0859 3892 echo "$as_me:3892: \$? = $ac_status" >&5
503d2be0
AS
3893 (exit $ac_status); }; }; then
3894 ac_cv_lib_ossaudio__oss_ioctl=yes
3895else
3896 echo "$as_me: failed program was:" >&5
3897cat conftest.$ac_ext >&5
3898ac_cv_lib_ossaudio__oss_ioctl=no
3899fi
3900rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3901LIBS=$ac_check_lib_save_LIBS
3902fi
138f0859 3903echo "$as_me:3903: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
503d2be0
AS
3904echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6
3905if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
f4988be7
GM
3906 LIBSOUND=-lossaudio
3907else
503d2be0 3908 LIBSOUND=
f4988be7 3909fi
65171e3a 3910
503d2be0 3911for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
f4988be7 3912 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
bb17930d 3913 termcap.h stdio_ext.h fcntl.h term.h strings.h
f4988be7 3914do
503d2be0 3915as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
138f0859 3916echo "$as_me:3916: checking for $ac_header" >&5
503d2be0
AS
3917echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3918if eval "test \"\${$as_ac_Header+set}\" = set"; then
3919 echo $ECHO_N "(cached) $ECHO_C" >&6
3920else
3921 cat >conftest.$ac_ext <<_ACEOF
138f0859 3922#line 3922 "configure"
503d2be0
AS
3923#include "confdefs.h"
3924#include <$ac_header>
3925_ACEOF
138f0859 3926if { (eval echo "$as_me:3926: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3927 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3928 ac_status=$?
3929 egrep -v '^ *\+' conftest.er1 >conftest.err
3930 rm -f conftest.er1
3931 cat conftest.err >&5
138f0859 3932 echo "$as_me:3932: \$? = $ac_status" >&5
503d2be0
AS
3933 (exit $ac_status); } >/dev/null; then
3934 if test -s conftest.err; then
3935 ac_cpp_err=$ac_c_preproc_warn_flag
3936 else
3937 ac_cpp_err=
3938 fi
3939else
3940 ac_cpp_err=yes
3941fi
3942if test -z "$ac_cpp_err"; then
3943 eval "$as_ac_Header=yes"
3944else
3945 echo "$as_me: failed program was:" >&5
ba4481b5 3946 cat conftest.$ac_ext >&5
503d2be0 3947 eval "$as_ac_Header=no"
ba4481b5 3948fi
503d2be0 3949rm -f conftest.err conftest.$ac_ext
ba4481b5 3950fi
138f0859 3951echo "$as_me:3951: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
3952echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3953if test `eval echo '${'$as_ac_Header'}'` = yes; then
3954 cat >>confdefs.h <<EOF
3955#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba4481b5 3956EOF
503d2be0 3957
ba4481b5 3958fi
f4988be7 3959done
ba4481b5 3960
138f0859 3961echo "$as_me:3961: checking for ANSI C header files" >&5
503d2be0
AS
3962echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3963if test "${ac_cv_header_stdc+set}" = set; then
3964 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3965else
503d2be0 3966 cat >conftest.$ac_ext <<_ACEOF
138f0859 3967#line 3967 "configure"
ba4481b5 3968#include "confdefs.h"
f4988be7
GM
3969#include <stdlib.h>
3970#include <stdarg.h>
3971#include <string.h>
3972#include <float.h>
503d2be0
AS
3973
3974_ACEOF
138f0859 3975if { (eval echo "$as_me:3975: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3976 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3977 ac_status=$?
3978 egrep -v '^ *\+' conftest.er1 >conftest.err
3979 rm -f conftest.er1
3980 cat conftest.err >&5
138f0859 3981 echo "$as_me:3981: \$? = $ac_status" >&5
503d2be0
AS
3982 (exit $ac_status); } >/dev/null; then
3983 if test -s conftest.err; then
3984 ac_cpp_err=$ac_c_preproc_warn_flag
3985 else
3986 ac_cpp_err=
3987 fi
3988else
3989 ac_cpp_err=yes
3990fi
3991if test -z "$ac_cpp_err"; then
f4988be7 3992 ac_cv_header_stdc=yes
ba4481b5 3993else
503d2be0 3994 echo "$as_me: failed program was:" >&5
ba4481b5 3995 cat conftest.$ac_ext >&5
f4988be7 3996 ac_cv_header_stdc=no
ba4481b5 3997fi
503d2be0 3998rm -f conftest.err conftest.$ac_ext
ba4481b5 3999
f4988be7
GM
4000if test $ac_cv_header_stdc = yes; then
4001 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
503d2be0 4002 cat >conftest.$ac_ext <<_ACEOF
138f0859 4003#line 4003 "configure"
f4988be7
GM
4004#include "confdefs.h"
4005#include <string.h>
503d2be0
AS
4006
4007_ACEOF
f4988be7
GM
4008if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4009 egrep "memchr" >/dev/null 2>&1; then
4010 :
4011else
f4988be7
GM
4012 ac_cv_header_stdc=no
4013fi
4014rm -f conftest*
4015
4016fi
4017
4018if test $ac_cv_header_stdc = yes; then
4019 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
503d2be0 4020 cat >conftest.$ac_ext <<_ACEOF
138f0859 4021#line 4021 "configure"
f4988be7
GM
4022#include "confdefs.h"
4023#include <stdlib.h>
503d2be0
AS
4024
4025_ACEOF
f4988be7
GM
4026if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4027 egrep "free" >/dev/null 2>&1; then
4028 :
4029else
f4988be7
GM
4030 ac_cv_header_stdc=no
4031fi
4032rm -f conftest*
4033
4034fi
4035
4036if test $ac_cv_header_stdc = yes; then
4037 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
503d2be0 4038 if test "$cross_compiling" = yes; then
f4988be7
GM
4039 :
4040else
503d2be0 4041 cat >conftest.$ac_ext <<_ACEOF
138f0859 4042#line 4042 "configure"
f4988be7
GM
4043#include "confdefs.h"
4044#include <ctype.h>
503d2be0
AS
4045#if ((' ' & 0x0FF) == 0x020)
4046# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4047# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4048#else
4049# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4050 || ('j' <= (c) && (c) <= 'r') \
4051 || ('s' <= (c) && (c) <= 'z'))
4052# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4053#endif
f4988be7 4054
503d2be0
AS
4055#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4056int
4057main ()
4058{
4059 int i;
4060 for (i = 0; i < 256; i++)
4061 if (XOR (islower (i), ISLOWER (i))
4062 || toupper (i) != TOUPPER (i))
4063 exit(2);
4064 exit (0);
4065}
4066_ACEOF
4067rm -f conftest$ac_exeext
138f0859 4068if { (eval echo "$as_me:4068: \"$ac_link\"") >&5
503d2be0
AS
4069 (eval $ac_link) 2>&5
4070 ac_status=$?
138f0859 4071 echo "$as_me:4071: \$? = $ac_status" >&5
503d2be0 4072 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
138f0859 4073 { (eval echo "$as_me:4073: \"$ac_try\"") >&5
503d2be0
AS
4074 (eval $ac_try) 2>&5
4075 ac_status=$?
138f0859 4076 echo "$as_me:4076: \$? = $ac_status" >&5
503d2be0 4077 (exit $ac_status); }; }; then
f4988be7
GM
4078 :
4079else
503d2be0
AS
4080 echo "$as_me: program exited with status $ac_status" >&5
4081echo "$as_me: failed program was:" >&5
4082cat conftest.$ac_ext >&5
4083ac_cv_header_stdc=no
f4988be7 4084fi
503d2be0 4085rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
f4988be7 4086fi
f4988be7
GM
4087fi
4088fi
138f0859 4089echo "$as_me:4089: result: $ac_cv_header_stdc" >&5
503d2be0 4090echo "${ECHO_T}$ac_cv_header_stdc" >&6
f4988be7 4091if test $ac_cv_header_stdc = yes; then
503d2be0
AS
4092
4093cat >>confdefs.h <<\EOF
f4988be7
GM
4094#define STDC_HEADERS 1
4095EOF
4096
4097fi
4098
138f0859 4099echo "$as_me:4099: checking whether time.h and sys/time.h may both be included" >&5
503d2be0
AS
4100echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
4101if test "${ac_cv_header_time+set}" = set; then
4102 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4103else
503d2be0 4104 cat >conftest.$ac_ext <<_ACEOF
138f0859 4105#line 4105 "configure"
f4988be7
GM
4106#include "confdefs.h"
4107#include <sys/types.h>
4108#include <sys/time.h>
4109#include <time.h>
503d2be0
AS
4110
4111int
4112main ()
4113{
4114if ((struct tm *) 0)
4115return 0;
4116 ;
4117 return 0;
4118}
4119_ACEOF
4120rm -f conftest.$ac_objext
138f0859 4121if { (eval echo "$as_me:4121: \"$ac_compile\"") >&5
503d2be0
AS
4122 (eval $ac_compile) 2>&5
4123 ac_status=$?
138f0859 4124 echo "$as_me:4124: \$? = $ac_status" >&5
503d2be0
AS
4125 (exit $ac_status); } &&
4126 { ac_try='test -s conftest.$ac_objext'
138f0859 4127 { (eval echo "$as_me:4127: \"$ac_try\"") >&5
503d2be0
AS
4128 (eval $ac_try) 2>&5
4129 ac_status=$?
138f0859 4130 echo "$as_me:4130: \$? = $ac_status" >&5
503d2be0 4131 (exit $ac_status); }; }; then
f4988be7
GM
4132 ac_cv_header_time=yes
4133else
503d2be0
AS
4134 echo "$as_me: failed program was:" >&5
4135cat conftest.$ac_ext >&5
4136ac_cv_header_time=no
f4988be7 4137fi
503d2be0 4138rm -f conftest.$ac_objext conftest.$ac_ext
f4988be7 4139fi
138f0859 4140echo "$as_me:4140: result: $ac_cv_header_time" >&5
503d2be0 4141echo "${ECHO_T}$ac_cv_header_time" >&6
f4988be7 4142if test $ac_cv_header_time = yes; then
503d2be0
AS
4143
4144cat >>confdefs.h <<\EOF
f4988be7
GM
4145#define TIME_WITH_SYS_TIME 1
4146EOF
4147
4148fi
4149
138f0859 4150echo "$as_me:4150: checking for sys_siglist declaration in signal.h or unistd.h" >&5
503d2be0
AS
4151echo $ECHO_N "checking for sys_siglist declaration in signal.h or unistd.h... $ECHO_C" >&6
4152if test "${ac_cv_decl_sys_siglist+set}" = set; then
4153 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4154else
503d2be0 4155 cat >conftest.$ac_ext <<_ACEOF
138f0859 4156#line 4156 "configure"
f4988be7
GM
4157#include "confdefs.h"
4158#include <sys/types.h>
4159#include <signal.h>
4160/* NetBSD declares sys_siglist in unistd.h. */
503d2be0
AS
4161#if HAVE_UNISTD_H
4162# include <unistd.h>
f4988be7 4163#endif
503d2be0
AS
4164
4165int
4166main ()
4167{
f4988be7 4168char *msg = *(sys_siglist + 1);
503d2be0
AS
4169 ;
4170 return 0;
4171}
4172_ACEOF
4173rm -f conftest.$ac_objext
138f0859 4174if { (eval echo "$as_me:4174: \"$ac_compile\"") >&5
503d2be0
AS
4175 (eval $ac_compile) 2>&5
4176 ac_status=$?
138f0859 4177 echo "$as_me:4177: \$? = $ac_status" >&5
503d2be0
AS
4178 (exit $ac_status); } &&
4179 { ac_try='test -s conftest.$ac_objext'
138f0859 4180 { (eval echo "$as_me:4180: \"$ac_try\"") >&5
503d2be0
AS
4181 (eval $ac_try) 2>&5
4182 ac_status=$?
138f0859 4183 echo "$as_me:4183: \$? = $ac_status" >&5
503d2be0 4184 (exit $ac_status); }; }; then
f4988be7
GM
4185 ac_cv_decl_sys_siglist=yes
4186else
503d2be0
AS
4187 echo "$as_me: failed program was:" >&5
4188cat conftest.$ac_ext >&5
4189ac_cv_decl_sys_siglist=no
f4988be7 4190fi
503d2be0 4191rm -f conftest.$ac_objext conftest.$ac_ext
f4988be7 4192fi
138f0859 4193echo "$as_me:4193: result: $ac_cv_decl_sys_siglist" >&5
503d2be0 4194echo "${ECHO_T}$ac_cv_decl_sys_siglist" >&6
f4988be7 4195if test $ac_cv_decl_sys_siglist = yes; then
503d2be0
AS
4196
4197cat >>confdefs.h <<\EOF
f4988be7
GM
4198#define SYS_SIGLIST_DECLARED 1
4199EOF
4200
4201fi
4202
138f0859 4203echo "$as_me:4203: checking for sys/wait.h that is POSIX.1 compatible" >&5
503d2be0
AS
4204echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
4205if test "${ac_cv_header_sys_wait_h+set}" = set; then
4206 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4207else
503d2be0 4208 cat >conftest.$ac_ext <<_ACEOF
138f0859 4209#line 4209 "configure"
f4988be7
GM
4210#include "confdefs.h"
4211#include <sys/types.h>
4212#include <sys/wait.h>
4213#ifndef WEXITSTATUS
503d2be0 4214# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
f4988be7
GM
4215#endif
4216#ifndef WIFEXITED
503d2be0 4217# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
f4988be7 4218#endif
503d2be0
AS
4219
4220int
4221main ()
4222{
4223 int s;
4224 wait (&s);
4225 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4226 ;
4227 return 0;
4228}
4229_ACEOF
4230rm -f conftest.$ac_objext
138f0859 4231if { (eval echo "$as_me:4231: \"$ac_compile\"") >&5
503d2be0
AS
4232 (eval $ac_compile) 2>&5
4233 ac_status=$?
138f0859 4234 echo "$as_me:4234: \$? = $ac_status" >&5
503d2be0
AS
4235 (exit $ac_status); } &&
4236 { ac_try='test -s conftest.$ac_objext'
138f0859 4237 { (eval echo "$as_me:4237: \"$ac_try\"") >&5
503d2be0
AS
4238 (eval $ac_try) 2>&5
4239 ac_status=$?
138f0859 4240 echo "$as_me:4240: \$? = $ac_status" >&5
503d2be0 4241 (exit $ac_status); }; }; then
f4988be7
GM
4242 ac_cv_header_sys_wait_h=yes
4243else
503d2be0
AS
4244 echo "$as_me: failed program was:" >&5
4245cat conftest.$ac_ext >&5
4246ac_cv_header_sys_wait_h=no
f4988be7 4247fi
503d2be0 4248rm -f conftest.$ac_objext conftest.$ac_ext
f4988be7 4249fi
138f0859 4250echo "$as_me:4250: result: $ac_cv_header_sys_wait_h" >&5
503d2be0 4251echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
f4988be7 4252if test $ac_cv_header_sys_wait_h = yes; then
503d2be0
AS
4253
4254cat >>confdefs.h <<\EOF
f4988be7
GM
4255#define HAVE_SYS_WAIT_H 1
4256EOF
4257
4258fi
4259
138f0859 4260echo "$as_me:4260: checking for struct utimbuf" >&5
503d2be0
AS
4261echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
4262if test "${emacs_cv_struct_utimbuf+set}" = set; then
4263 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4264else
503d2be0 4265 cat >conftest.$ac_ext <<_ACEOF
138f0859 4266#line 4266 "configure"
f4988be7
GM
4267#include "confdefs.h"
4268#ifdef TIME_WITH_SYS_TIME
4269#include <sys/time.h>
4270#include <time.h>
4271#else
4272#ifdef HAVE_SYS_TIME_H
4273#include <sys/time.h>
4274#else
4275#include <time.h>
4276#endif
4277#endif
4278#ifdef HAVE_UTIME_H
4279#include <utime.h>
4280#endif
503d2be0
AS
4281int
4282main ()
4283{
f4988be7 4284static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
4285 ;
4286 return 0;
4287}
4288_ACEOF
4289rm -f conftest.$ac_objext
138f0859 4290if { (eval echo "$as_me:4290: \"$ac_compile\"") >&5
503d2be0
AS
4291 (eval $ac_compile) 2>&5
4292 ac_status=$?
138f0859 4293 echo "$as_me:4293: \$? = $ac_status" >&5
503d2be0
AS
4294 (exit $ac_status); } &&
4295 { ac_try='test -s conftest.$ac_objext'
138f0859 4296 { (eval echo "$as_me:4296: \"$ac_try\"") >&5
503d2be0
AS
4297 (eval $ac_try) 2>&5
4298 ac_status=$?
138f0859 4299 echo "$as_me:4299: \$? = $ac_status" >&5
503d2be0 4300 (exit $ac_status); }; }; then
f4988be7
GM
4301 emacs_cv_struct_utimbuf=yes
4302else
503d2be0
AS
4303 echo "$as_me: failed program was:" >&5
4304cat conftest.$ac_ext >&5
4305emacs_cv_struct_utimbuf=no
f4988be7 4306fi
503d2be0 4307rm -f conftest.$ac_objext conftest.$ac_ext
f4988be7 4308fi
138f0859 4309echo "$as_me:4309: result: $emacs_cv_struct_utimbuf" >&5
503d2be0 4310echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6
f4988be7 4311if test $emacs_cv_struct_utimbuf = yes; then
503d2be0 4312 cat >>confdefs.h <<\EOF
f4988be7
GM
4313#define HAVE_STRUCT_UTIMBUF 1
4314EOF
4315
4316fi
4317
138f0859 4318echo "$as_me:4318: checking return type of signal handlers" >&5
503d2be0
AS
4319echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4320if test "${ac_cv_type_signal+set}" = set; then
4321 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4322else
503d2be0 4323 cat >conftest.$ac_ext <<_ACEOF
138f0859 4324#line 4324 "configure"
f4988be7
GM
4325#include "confdefs.h"
4326#include <sys/types.h>
4327#include <signal.h>
4328#ifdef signal
503d2be0 4329# undef signal
f4988be7
GM
4330#endif
4331#ifdef __cplusplus
4332extern "C" void (*signal (int, void (*)(int)))(int);
4333#else
4334void (*signal ()) ();
4335#endif
4336
503d2be0
AS
4337int
4338main ()
4339{
f4988be7 4340int i;
503d2be0
AS
4341 ;
4342 return 0;
4343}
4344_ACEOF
4345rm -f conftest.$ac_objext
138f0859 4346if { (eval echo "$as_me:4346: \"$ac_compile\"") >&5
503d2be0
AS
4347 (eval $ac_compile) 2>&5
4348 ac_status=$?
138f0859 4349 echo "$as_me:4349: \$? = $ac_status" >&5
503d2be0
AS
4350 (exit $ac_status); } &&
4351 { ac_try='test -s conftest.$ac_objext'
138f0859 4352 { (eval echo "$as_me:4352: \"$ac_try\"") >&5
503d2be0
AS
4353 (eval $ac_try) 2>&5
4354 ac_status=$?
138f0859 4355 echo "$as_me:4355: \$? = $ac_status" >&5
503d2be0 4356 (exit $ac_status); }; }; then
f4988be7
GM
4357 ac_cv_type_signal=void
4358else
503d2be0
AS
4359 echo "$as_me: failed program was:" >&5
4360cat conftest.$ac_ext >&5
4361ac_cv_type_signal=int
f4988be7 4362fi
503d2be0 4363rm -f conftest.$ac_objext conftest.$ac_ext
f4988be7 4364fi
138f0859 4365echo "$as_me:4365: result: $ac_cv_type_signal" >&5
503d2be0 4366echo "${ECHO_T}$ac_cv_type_signal" >&6
f4988be7 4367
503d2be0 4368cat >>confdefs.h <<EOF
f4988be7 4369#define RETSIGTYPE $ac_cv_type_signal
ba4481b5
DL
4370EOF
4371
138f0859 4372echo "$as_me:4372: checking for speed_t" >&5
503d2be0
AS
4373echo $ECHO_N "checking for speed_t... $ECHO_C" >&6
4374if test "${emacs_cv_speed_t+set}" = set; then
4375 echo $ECHO_N "(cached) $ECHO_C" >&6
34ec9ebe 4376else
503d2be0 4377 cat >conftest.$ac_ext <<_ACEOF
138f0859 4378#line 4378 "configure"
34ec9ebe
GM
4379#include "confdefs.h"
4380#include <termios.h>
503d2be0
AS
4381int
4382main ()
4383{
34ec9ebe 4384speed_t x = 1;
503d2be0
AS
4385 ;
4386 return 0;
4387}
4388_ACEOF
4389rm -f conftest.$ac_objext
138f0859 4390if { (eval echo "$as_me:4390: \"$ac_compile\"") >&5
503d2be0
AS
4391 (eval $ac_compile) 2>&5
4392 ac_status=$?
138f0859 4393 echo "$as_me:4393: \$? = $ac_status" >&5
503d2be0
AS
4394 (exit $ac_status); } &&
4395 { ac_try='test -s conftest.$ac_objext'
138f0859 4396 { (eval echo "$as_me:4396: \"$ac_try\"") >&5
503d2be0
AS
4397 (eval $ac_try) 2>&5
4398 ac_status=$?
138f0859 4399 echo "$as_me:4399: \$? = $ac_status" >&5
503d2be0 4400 (exit $ac_status); }; }; then
34ec9ebe
GM
4401 emacs_cv_speed_t=yes
4402else
503d2be0
AS
4403 echo "$as_me: failed program was:" >&5
4404cat conftest.$ac_ext >&5
4405emacs_cv_speed_t=no
34ec9ebe 4406fi
503d2be0 4407rm -f conftest.$ac_objext conftest.$ac_ext
34ec9ebe 4408fi
138f0859 4409echo "$as_me:4409: result: $emacs_cv_speed_t" >&5
503d2be0 4410echo "${ECHO_T}$emacs_cv_speed_t" >&6
34ec9ebe 4411if test $emacs_cv_speed_t = yes; then
503d2be0 4412 cat >>confdefs.h <<\EOF
34ec9ebe
GM
4413#define HAVE_SPEED_T 1
4414EOF
4415
4416fi
4417
138f0859 4418echo "$as_me:4418: checking for struct timeval" >&5
503d2be0
AS
4419echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
4420if test "${emacs_cv_struct_timeval+set}" = set; then
4421 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4422else
503d2be0 4423 cat >conftest.$ac_ext <<_ACEOF
138f0859 4424#line 4424 "configure"
ba4481b5
DL
4425#include "confdefs.h"
4426#ifdef TIME_WITH_SYS_TIME
4427#include <sys/time.h>
4428#include <time.h>
4429#else
4430#ifdef HAVE_SYS_TIME_H
4431#include <sys/time.h>
4432#else
4433#include <time.h>
4434#endif
4435#endif
503d2be0
AS
4436int
4437main ()
4438{
ba4481b5 4439static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
4440 ;
4441 return 0;
4442}
4443_ACEOF
4444rm -f conftest.$ac_objext
138f0859 4445if { (eval echo "$as_me:4445: \"$ac_compile\"") >&5
503d2be0
AS
4446 (eval $ac_compile) 2>&5
4447 ac_status=$?
138f0859 4448 echo "$as_me:4448: \$? = $ac_status" >&5
503d2be0
AS
4449 (exit $ac_status); } &&
4450 { ac_try='test -s conftest.$ac_objext'
138f0859 4451 { (eval echo "$as_me:4451: \"$ac_try\"") >&5
503d2be0
AS
4452 (eval $ac_try) 2>&5
4453 ac_status=$?
138f0859 4454 echo "$as_me:4454: \$? = $ac_status" >&5
503d2be0 4455 (exit $ac_status); }; }; then
ba4481b5
DL
4456 emacs_cv_struct_timeval=yes
4457else
503d2be0
AS
4458 echo "$as_me: failed program was:" >&5
4459cat conftest.$ac_ext >&5
4460emacs_cv_struct_timeval=no
ba4481b5 4461fi
503d2be0 4462rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 4463fi
138f0859 4464echo "$as_me:4464: result: $emacs_cv_struct_timeval" >&5
503d2be0 4465echo "${ECHO_T}$emacs_cv_struct_timeval" >&6
ba4481b5
DL
4466HAVE_TIMEVAL=$emacs_cv_struct_timeval
4467if test $emacs_cv_struct_timeval = yes; then
503d2be0 4468 cat >>confdefs.h <<\EOF
ba4481b5
DL
4469#define HAVE_TIMEVAL 1
4470EOF
4471
4472fi
4473
138f0859 4474echo "$as_me:4474: checking for struct exception" >&5
503d2be0
AS
4475echo $ECHO_N "checking for struct exception... $ECHO_C" >&6
4476if test "${emacs_cv_struct_exception+set}" = set; then
4477 echo $ECHO_N "(cached) $ECHO_C" >&6
d42122a3 4478else
503d2be0 4479 cat >conftest.$ac_ext <<_ACEOF
138f0859 4480#line 4480 "configure"
d42122a3
DL
4481#include "confdefs.h"
4482#include <math.h>
503d2be0
AS
4483int
4484main ()
4485{
d42122a3 4486static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
4487 ;
4488 return 0;
4489}
4490_ACEOF
4491rm -f conftest.$ac_objext
138f0859 4492if { (eval echo "$as_me:4492: \"$ac_compile\"") >&5
503d2be0
AS
4493 (eval $ac_compile) 2>&5
4494 ac_status=$?
138f0859 4495 echo "$as_me:4495: \$? = $ac_status" >&5
503d2be0
AS
4496 (exit $ac_status); } &&
4497 { ac_try='test -s conftest.$ac_objext'
138f0859 4498 { (eval echo "$as_me:4498: \"$ac_try\"") >&5
503d2be0
AS
4499 (eval $ac_try) 2>&5
4500 ac_status=$?
138f0859 4501 echo "$as_me:4501: \$? = $ac_status" >&5
503d2be0 4502 (exit $ac_status); }; }; then
d42122a3
DL
4503 emacs_cv_struct_exception=yes
4504else
503d2be0
AS
4505 echo "$as_me: failed program was:" >&5
4506cat conftest.$ac_ext >&5
4507emacs_cv_struct_exception=no
d42122a3 4508fi
503d2be0 4509rm -f conftest.$ac_objext conftest.$ac_ext
d42122a3 4510fi
138f0859 4511echo "$as_me:4511: result: $emacs_cv_struct_exception" >&5
503d2be0 4512echo "${ECHO_T}$emacs_cv_struct_exception" >&6
d42122a3
DL
4513HAVE_EXCEPTION=$emacs_cv_struct_exception
4514if test $emacs_cv_struct_exception != yes; then
503d2be0 4515 cat >>confdefs.h <<\EOF
d42122a3
DL
4516#define NO_MATHERR 1
4517EOF
4518
4519fi
4520
138f0859 4521echo "$as_me:4521: checking whether struct tm is in sys/time.h or time.h" >&5
503d2be0
AS
4522echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
4523if test "${ac_cv_struct_tm+set}" = set; then
4524 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4525else
503d2be0 4526 cat >conftest.$ac_ext <<_ACEOF
138f0859 4527#line 4527 "configure"
ba4481b5
DL
4528#include "confdefs.h"
4529#include <sys/types.h>
4530#include <time.h>
503d2be0
AS
4531
4532int
4533main ()
4534{
ba4481b5 4535struct tm *tp; tp->tm_sec;
503d2be0
AS
4536 ;
4537 return 0;
4538}
4539_ACEOF
4540rm -f conftest.$ac_objext
138f0859 4541if { (eval echo "$as_me:4541: \"$ac_compile\"") >&5
503d2be0
AS
4542 (eval $ac_compile) 2>&5
4543 ac_status=$?
138f0859 4544 echo "$as_me:4544: \$? = $ac_status" >&5
503d2be0
AS
4545 (exit $ac_status); } &&
4546 { ac_try='test -s conftest.$ac_objext'
138f0859 4547 { (eval echo "$as_me:4547: \"$ac_try\"") >&5
503d2be0
AS
4548 (eval $ac_try) 2>&5
4549 ac_status=$?
138f0859 4550 echo "$as_me:4550: \$? = $ac_status" >&5
503d2be0 4551 (exit $ac_status); }; }; then
ba4481b5
DL
4552 ac_cv_struct_tm=time.h
4553else
503d2be0
AS
4554 echo "$as_me: failed program was:" >&5
4555cat conftest.$ac_ext >&5
4556ac_cv_struct_tm=sys/time.h
ba4481b5 4557fi
503d2be0 4558rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 4559fi
138f0859 4560echo "$as_me:4560: result: $ac_cv_struct_tm" >&5
503d2be0 4561echo "${ECHO_T}$ac_cv_struct_tm" >&6
ba4481b5 4562if test $ac_cv_struct_tm = sys/time.h; then
503d2be0
AS
4563
4564cat >>confdefs.h <<\EOF
ba4481b5
DL
4565#define TM_IN_SYS_TIME 1
4566EOF
4567
4568fi
4569
138f0859 4570echo "$as_me:4570: checking for struct tm.tm_zone" >&5
503d2be0
AS
4571echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
4572if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
4573 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4574else
503d2be0 4575 cat >conftest.$ac_ext <<_ACEOF
138f0859 4576#line 4576 "configure"
ba4481b5
DL
4577#include "confdefs.h"
4578#include <sys/types.h>
4579#include <$ac_cv_struct_tm>
503d2be0
AS
4580
4581int
4582main ()
4583{
4584static struct tm ac_aggr;
4585if (ac_aggr.tm_zone)
4586return 0;
4587 ;
4588 return 0;
4589}
4590_ACEOF
4591rm -f conftest.$ac_objext
138f0859 4592if { (eval echo "$as_me:4592: \"$ac_compile\"") >&5
503d2be0
AS
4593 (eval $ac_compile) 2>&5
4594 ac_status=$?
138f0859 4595 echo "$as_me:4595: \$? = $ac_status" >&5
503d2be0
AS
4596 (exit $ac_status); } &&
4597 { ac_try='test -s conftest.$ac_objext'
138f0859 4598 { (eval echo "$as_me:4598: \"$ac_try\"") >&5
503d2be0
AS
4599 (eval $ac_try) 2>&5
4600 ac_status=$?
138f0859 4601 echo "$as_me:4601: \$? = $ac_status" >&5
503d2be0
AS
4602 (exit $ac_status); }; }; then
4603 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 4604else
503d2be0
AS
4605 echo "$as_me: failed program was:" >&5
4606cat conftest.$ac_ext >&5
4607ac_cv_member_struct_tm_tm_zone=no
ba4481b5 4608fi
503d2be0
AS
4609rm -f conftest.$ac_objext conftest.$ac_ext
4610fi
138f0859 4611echo "$as_me:4611: result: $ac_cv_member_struct_tm_tm_zone" >&5
503d2be0
AS
4612echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
4613if test $ac_cv_member_struct_tm_tm_zone = yes; then
4614
4615cat >>confdefs.h <<EOF
4616#define HAVE_STRUCT_TM_TM_ZONE 1
4617EOF
4618
ba4481b5
DL
4619fi
4620
503d2be0
AS
4621if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
4622
4623cat >>confdefs.h <<\EOF
ba4481b5
DL
4624#define HAVE_TM_ZONE 1
4625EOF
4626
4627else
138f0859 4628 echo "$as_me:4628: checking for tzname" >&5
503d2be0
AS
4629echo $ECHO_N "checking for tzname... $ECHO_C" >&6
4630if test "${ac_cv_var_tzname+set}" = set; then
4631 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4632else
503d2be0 4633 cat >conftest.$ac_ext <<_ACEOF
138f0859 4634#line 4634 "configure"
ba4481b5
DL
4635#include "confdefs.h"
4636#include <time.h>
4637#ifndef tzname /* For SGI. */
4638extern char *tzname[]; /* RS6000 and others reject char **tzname. */
4639#endif
503d2be0
AS
4640
4641int
4642main ()
4643{
ba4481b5 4644atoi(*tzname);
503d2be0
AS
4645 ;
4646 return 0;
4647}
4648_ACEOF
4649rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 4650if { (eval echo "$as_me:4650: \"$ac_link\"") >&5
503d2be0
AS
4651 (eval $ac_link) 2>&5
4652 ac_status=$?
138f0859 4653 echo "$as_me:4653: \$? = $ac_status" >&5
503d2be0
AS
4654 (exit $ac_status); } &&
4655 { ac_try='test -s conftest$ac_exeext'
138f0859 4656 { (eval echo "$as_me:4656: \"$ac_try\"") >&5
503d2be0
AS
4657 (eval $ac_try) 2>&5
4658 ac_status=$?
138f0859 4659 echo "$as_me:4659: \$? = $ac_status" >&5
503d2be0 4660 (exit $ac_status); }; }; then
ba4481b5
DL
4661 ac_cv_var_tzname=yes
4662else
503d2be0
AS
4663 echo "$as_me: failed program was:" >&5
4664cat conftest.$ac_ext >&5
4665ac_cv_var_tzname=no
ba4481b5 4666fi
503d2be0 4667rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 4668fi
138f0859 4669echo "$as_me:4669: result: $ac_cv_var_tzname" >&5
503d2be0 4670echo "${ECHO_T}$ac_cv_var_tzname" >&6
ba4481b5 4671 if test $ac_cv_var_tzname = yes; then
503d2be0
AS
4672
4673cat >>confdefs.h <<\EOF
ba4481b5
DL
4674#define HAVE_TZNAME 1
4675EOF
4676
4677 fi
4678fi
4679
138f0859 4680echo "$as_me:4680: checking for tm_gmtoff in struct tm" >&5
503d2be0
AS
4681echo $ECHO_N "checking for tm_gmtoff in struct tm... $ECHO_C" >&6
4682if test "${emacs_cv_tm_gmtoff+set}" = set; then
4683 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 4684else
503d2be0 4685 cat >conftest.$ac_ext <<_ACEOF
138f0859 4686#line 4686 "configure"
1113b624
PE
4687#include "confdefs.h"
4688#include <time.h>
503d2be0
AS
4689int
4690main ()
4691{
1113b624 4692struct tm t; t.tm_gmtoff = 0
503d2be0
AS
4693 ;
4694 return 0;
4695}
4696_ACEOF
4697rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 4698if { (eval echo "$as_me:4698: \"$ac_link\"") >&5
503d2be0
AS
4699 (eval $ac_link) 2>&5
4700 ac_status=$?
138f0859 4701 echo "$as_me:4701: \$? = $ac_status" >&5
503d2be0
AS
4702 (exit $ac_status); } &&
4703 { ac_try='test -s conftest$ac_exeext'
138f0859 4704 { (eval echo "$as_me:4704: \"$ac_try\"") >&5
503d2be0
AS
4705 (eval $ac_try) 2>&5
4706 ac_status=$?
138f0859 4707 echo "$as_me:4707: \$? = $ac_status" >&5
503d2be0 4708 (exit $ac_status); }; }; then
1113b624
PE
4709 emacs_cv_tm_gmtoff=yes
4710else
503d2be0
AS
4711 echo "$as_me: failed program was:" >&5
4712cat conftest.$ac_ext >&5
4713emacs_cv_tm_gmtoff=no
1113b624 4714fi
503d2be0 4715rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1113b624 4716fi
138f0859 4717echo "$as_me:4717: result: $emacs_cv_tm_gmtoff" >&5
503d2be0 4718echo "${ECHO_T}$emacs_cv_tm_gmtoff" >&6
1113b624 4719if test $emacs_cv_tm_gmtoff = yes; then
503d2be0 4720 cat >>confdefs.h <<\EOF
1113b624
PE
4721#define HAVE_TM_GMTOFF 1
4722EOF
4723
4724fi
ba4481b5 4725
138f0859 4726echo "$as_me:4726: checking for $CC option to accept ANSI C" >&5
503d2be0
AS
4727echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
4728if test "${ac_cv_prog_cc_stdc+set}" = set; then
4729 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
4730else
4731 ac_cv_prog_cc_stdc=no
503d2be0
AS
4732ac_save_CC=$CC
4733cat >conftest.$ac_ext <<_ACEOF
138f0859 4734#line 4734 "configure"
7397acc4
DL
4735#include "confdefs.h"
4736#include <stdarg.h>
4737#include <stdio.h>
4738#include <sys/types.h>
4739#include <sys/stat.h>
4740/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4741struct buf { int x; };
4742FILE * (*rcsopen) (struct buf *, struct stat *, int);
4743static char *e (p, i)
4744 char **p;
4745 int i;
4746{
4747 return p[i];
4748}
4749static char *f (char * (*g) (char **, int), char **p, ...)
4750{
4751 char *s;
4752 va_list v;
4753 va_start (v,p);
4754 s = g (p, va_arg (v,int));
4755 va_end (v);
4756 return s;
4757}
4758int test (int i, double x);
4759struct s1 {int (*f) (int a);};
4760struct s2 {int (*f) (double a);};
4761int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4762int argc;
4763char **argv;
503d2be0
AS
4764int
4765main ()
4766{
7397acc4 4767return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
503d2be0
AS
4768 ;
4769 return 0;
4770}
4771_ACEOF
4772# Don't try gcc -ansi; that turns off useful extensions and
4773# breaks some systems' header files.
4774# AIX -qlanglvl=ansi
4775# Ultrix and OSF/1 -std1
4776# HP-UX 10.20 and later -Ae
4777# HP-UX older versions -Aa -D_HPUX_SOURCE
4778# SVR4 -Xc -D__EXTENSIONS__
4779for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4780do
4781 CC="$ac_save_CC $ac_arg"
4782 rm -f conftest.$ac_objext
138f0859 4783if { (eval echo "$as_me:4783: \"$ac_compile\"") >&5
503d2be0
AS
4784 (eval $ac_compile) 2>&5
4785 ac_status=$?
138f0859 4786 echo "$as_me:4786: \$? = $ac_status" >&5
503d2be0
AS
4787 (exit $ac_status); } &&
4788 { ac_try='test -s conftest.$ac_objext'
138f0859 4789 { (eval echo "$as_me:4789: \"$ac_try\"") >&5
503d2be0
AS
4790 (eval $ac_try) 2>&5
4791 ac_status=$?
138f0859 4792 echo "$as_me:4792: \$? = $ac_status" >&5
503d2be0
AS
4793 (exit $ac_status); }; }; then
4794 ac_cv_prog_cc_stdc=$ac_arg
4795break
4796else
4797 echo "$as_me: failed program was:" >&5
4798cat conftest.$ac_ext >&5
4799fi
4800rm -f conftest.$ac_objext
7397acc4 4801done
503d2be0
AS
4802rm -f conftest.$ac_ext conftest.$ac_objext
4803CC=$ac_save_CC
7397acc4
DL
4804
4805fi
4806
4807case "x$ac_cv_prog_cc_stdc" in
4808 x|xno)
138f0859 4809 echo "$as_me:4809: result: none needed" >&5
503d2be0 4810echo "${ECHO_T}none needed" >&6 ;;
7397acc4 4811 *)
138f0859 4812 echo "$as_me:4812: result: $ac_cv_prog_cc_stdc" >&5
503d2be0 4813echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
7397acc4
DL
4814 CC="$CC $ac_cv_prog_cc_stdc" ;;
4815esac
4816
138f0859 4817echo "$as_me:4817: checking for function prototypes" >&5
503d2be0 4818echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
7397acc4 4819if test "$ac_cv_prog_cc_stdc" != no; then
138f0859 4820 echo "$as_me:4820: result: yes" >&5
503d2be0
AS
4821echo "${ECHO_T}yes" >&6
4822
4823cat >>confdefs.h <<\EOF
7397acc4
DL
4824#define PROTOTYPES 1
4825EOF
4826
4827else
138f0859 4828 echo "$as_me:4828: result: no" >&5
503d2be0 4829echo "${ECHO_T}no" >&6
7397acc4
DL
4830fi
4831
138f0859 4832echo "$as_me:4832: checking for working volatile" >&5
503d2be0
AS
4833echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
4834if test "${ac_cv_c_volatile+set}" = set; then
4835 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 4836else
503d2be0 4837 cat >conftest.$ac_ext <<_ACEOF
138f0859 4838#line 4838 "configure"
7397acc4
DL
4839#include "confdefs.h"
4840
503d2be0
AS
4841int
4842main ()
4843{
7397acc4
DL
4844
4845volatile int x;
4846int * volatile y;
503d2be0
AS
4847 ;
4848 return 0;
4849}
4850_ACEOF
4851rm -f conftest.$ac_objext
138f0859 4852if { (eval echo "$as_me:4852: \"$ac_compile\"") >&5
503d2be0
AS
4853 (eval $ac_compile) 2>&5
4854 ac_status=$?
138f0859 4855 echo "$as_me:4855: \$? = $ac_status" >&5
503d2be0
AS
4856 (exit $ac_status); } &&
4857 { ac_try='test -s conftest.$ac_objext'
138f0859 4858 { (eval echo "$as_me:4858: \"$ac_try\"") >&5
503d2be0
AS
4859 (eval $ac_try) 2>&5
4860 ac_status=$?
138f0859 4861 echo "$as_me:4861: \$? = $ac_status" >&5
503d2be0 4862 (exit $ac_status); }; }; then
7397acc4
DL
4863 ac_cv_c_volatile=yes
4864else
503d2be0
AS
4865 echo "$as_me: failed program was:" >&5
4866cat conftest.$ac_ext >&5
4867ac_cv_c_volatile=no
7397acc4 4868fi
503d2be0 4869rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 4870fi
138f0859 4871echo "$as_me:4871: result: $ac_cv_c_volatile" >&5
503d2be0 4872echo "${ECHO_T}$ac_cv_c_volatile" >&6
7397acc4 4873if test $ac_cv_c_volatile = no; then
503d2be0
AS
4874
4875cat >>confdefs.h <<\EOF
4876#define volatile
7397acc4
DL
4877EOF
4878
4879fi
4880
138f0859 4881echo "$as_me:4881: checking for an ANSI C-conforming const" >&5
503d2be0
AS
4882echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
4883if test "${ac_cv_c_const+set}" = set; then
4884 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4885else
503d2be0 4886 cat >conftest.$ac_ext <<_ACEOF
138f0859 4887#line 4887 "configure"
ba4481b5
DL
4888#include "confdefs.h"
4889
503d2be0
AS
4890int
4891main ()
4892{
4893/* FIXME: Include the comments suggested by Paul. */
4894#ifndef __cplusplus
4895 /* Ultrix mips cc rejects this. */
4896 typedef int charset[2];
4897 const charset x;
4898 /* SunOS 4.1.1 cc rejects this. */
4899 char const *const *ccp;
4900 char **p;
4901 /* NEC SVR4.0.2 mips cc rejects this. */
4902 struct point {int x, y;};
4903 static struct point const zero = {0,0};
4904 /* AIX XL C 1.02.0.0 rejects this.
4905 It does not let you subtract one const X* pointer from another in
4906 an arm of an if-expression whose if-part is not a constant
4907 expression */
4908 const char *g = "string";
4909 ccp = &g + (g ? g-g : 0);
4910 /* HPUX 7.0 cc rejects these. */
4911 ++ccp;
4912 p = (char**) ccp;
4913 ccp = (char const *const *) p;
4914 { /* SCO 3.2v4 cc rejects this. */
4915 char *t;
4916 char const *s = 0 ? (char *) 0 : (char const *) 0;
4917
4918 *t++ = 0;
4919 }
4920 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
4921 int x[] = {25, 17};
4922 const int *foo = &x[0];
4923 ++foo;
4924 }
4925 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4926 typedef const int *iptr;
4927 iptr p = 0;
4928 ++p;
4929 }
4930 { /* AIX XL C 1.02.0.0 rejects this saying
4931 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4932 struct s { int j; const int *ap[3]; };
4933 struct s *b; b->j = 5;
4934 }
4935 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4936 const int foo = 10;
4937 }
4938#endif
ba4481b5 4939
503d2be0
AS
4940 ;
4941 return 0;
ba4481b5 4942}
503d2be0
AS
4943_ACEOF
4944rm -f conftest.$ac_objext
138f0859 4945if { (eval echo "$as_me:4945: \"$ac_compile\"") >&5
503d2be0
AS
4946 (eval $ac_compile) 2>&5
4947 ac_status=$?
138f0859 4948 echo "$as_me:4948: \$? = $ac_status" >&5
503d2be0
AS
4949 (exit $ac_status); } &&
4950 { ac_try='test -s conftest.$ac_objext'
138f0859 4951 { (eval echo "$as_me:4951: \"$ac_try\"") >&5
503d2be0
AS
4952 (eval $ac_try) 2>&5
4953 ac_status=$?
138f0859 4954 echo "$as_me:4954: \$? = $ac_status" >&5
503d2be0 4955 (exit $ac_status); }; }; then
ba4481b5
DL
4956 ac_cv_c_const=yes
4957else
503d2be0
AS
4958 echo "$as_me: failed program was:" >&5
4959cat conftest.$ac_ext >&5
4960ac_cv_c_const=no
ba4481b5 4961fi
503d2be0 4962rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 4963fi
138f0859 4964echo "$as_me:4964: result: $ac_cv_c_const" >&5
503d2be0 4965echo "${ECHO_T}$ac_cv_c_const" >&6
ba4481b5 4966if test $ac_cv_c_const = no; then
503d2be0
AS
4967
4968cat >>confdefs.h <<\EOF
4969#define const
ba4481b5
DL
4970EOF
4971
4972fi
4973
138f0859 4974echo "$as_me:4974: checking for void * support" >&5
503d2be0
AS
4975echo $ECHO_N "checking for void * support... $ECHO_C" >&6
4976if test "${emacs_cv_void_star+set}" = set; then
4977 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 4978else
503d2be0 4979 cat >conftest.$ac_ext <<_ACEOF
138f0859 4980#line 4980 "configure"
7397acc4
DL
4981#include "confdefs.h"
4982
503d2be0
AS
4983int
4984main ()
4985{
7397acc4 4986void * foo;
503d2be0
AS
4987 ;
4988 return 0;
4989}
4990_ACEOF
4991rm -f conftest.$ac_objext
138f0859 4992if { (eval echo "$as_me:4992: \"$ac_compile\"") >&5
503d2be0
AS
4993 (eval $ac_compile) 2>&5
4994 ac_status=$?
138f0859 4995 echo "$as_me:4995: \$? = $ac_status" >&5
503d2be0
AS
4996 (exit $ac_status); } &&
4997 { ac_try='test -s conftest.$ac_objext'
138f0859 4998 { (eval echo "$as_me:4998: \"$ac_try\"") >&5
503d2be0
AS
4999 (eval $ac_try) 2>&5
5000 ac_status=$?
138f0859 5001 echo "$as_me:5001: \$? = $ac_status" >&5
503d2be0 5002 (exit $ac_status); }; }; then
7397acc4
DL
5003 emacs_cv_void_star=yes
5004else
503d2be0
AS
5005 echo "$as_me: failed program was:" >&5
5006cat conftest.$ac_ext >&5
5007emacs_cv_void_star=no
7397acc4 5008fi
503d2be0 5009rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 5010fi
138f0859 5011echo "$as_me:5011: result: $emacs_cv_void_star" >&5
503d2be0 5012echo "${ECHO_T}$emacs_cv_void_star" >&6
7397acc4 5013if test $emacs_cv_void_star = yes; then
503d2be0 5014 cat >>confdefs.h <<\EOF
7397acc4
DL
5015#define POINTER_TYPE void
5016EOF
5017
5018else
503d2be0 5019 cat >>confdefs.h <<\EOF
7397acc4
DL
5020#define POINTER_TYPE char
5021EOF
5022
5023fi
ba4481b5 5024
138f0859 5025echo "$as_me:5025: checking whether ${MAKE-make} sets \${MAKE}" >&5
503d2be0
AS
5026echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
5027set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
5028if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
5029 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5030else
503d2be0 5031 cat >conftest.make <<\EOF
ba4481b5
DL
5032all:
5033 @echo 'ac_maketemp="${MAKE}"'
5034EOF
5035# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
503d2be0 5036eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
ba4481b5
DL
5037if test -n "$ac_maketemp"; then
5038 eval ac_cv_prog_make_${ac_make}_set=yes
5039else
5040 eval ac_cv_prog_make_${ac_make}_set=no
5041fi
503d2be0 5042rm -f conftest.make
ba4481b5
DL
5043fi
5044if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
138f0859 5045 echo "$as_me:5045: result: yes" >&5
503d2be0 5046echo "${ECHO_T}yes" >&6
ba4481b5
DL
5047 SET_MAKE=
5048else
138f0859 5049 echo "$as_me:5049: result: no" >&5
503d2be0 5050echo "${ECHO_T}no" >&6
ba4481b5
DL
5051 SET_MAKE="MAKE=${MAKE-make}"
5052fi
5053
138f0859 5054echo "$as_me:5054: checking for long file names" >&5
503d2be0
AS
5055echo $ECHO_N "checking for long file names... $ECHO_C" >&6
5056if test "${ac_cv_sys_long_file_names+set}" = set; then
5057 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
5058else
5059 ac_cv_sys_long_file_names=yes
5060# Test for long file names in all the places we know might matter:
5061# . the current directory, where building will happen
5062# $prefix/lib where we will be installing things
5063# $exec_prefix/lib likewise
5064# eval it to expand exec_prefix.
5065# $TMPDIR if set, where it might want to write temporary files
5066# if $TMPDIR is not set:
5067# /tmp where it might want to write temporary files
5068# /var/tmp likewise
5069# /usr/tmp likewise
5070if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
503d2be0 5071 ac_tmpdirs=$TMPDIR
ba4481b5
DL
5072else
5073 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
5074fi
5075for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
5076 test -d $ac_dir || continue
5077 test -w $ac_dir || continue # It is less confusing to not echo anything here.
503d2be0
AS
5078 ac_xdir=$ac_dir/cf$$
5079 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
5080 ac_tf1=$ac_xdir/conftest9012345
5081 ac_tf2=$ac_xdir/conftest9012346
5082 (echo 1 >$ac_tf1) 2>/dev/null
5083 (echo 2 >$ac_tf2) 2>/dev/null
5084 ac_val=`cat $ac_tf1 2>/dev/null`
5085 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
ba4481b5 5086 ac_cv_sys_long_file_names=no
503d2be0 5087 rm -rf $ac_xdir 2>/dev/null
ba4481b5
DL
5088 break
5089 fi
503d2be0 5090 rm -rf $ac_xdir 2>/dev/null
ba4481b5
DL
5091done
5092fi
138f0859 5093echo "$as_me:5093: result: $ac_cv_sys_long_file_names" >&5
503d2be0 5094echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
ba4481b5 5095if test $ac_cv_sys_long_file_names = yes; then
503d2be0
AS
5096
5097cat >>confdefs.h <<\EOF
ba4481b5
DL
5098#define HAVE_LONG_FILE_NAMES 1
5099EOF
5100
5101fi
5102
ba4481b5
DL
5103#### Choose a window system.
5104
138f0859 5105echo "$as_me:5105: checking for X" >&5
503d2be0 5106echo $ECHO_N "checking for X... $ECHO_C" >&6
ba4481b5
DL
5107
5108# Check whether --with-x or --without-x was given.
5109if test "${with_x+set}" = set; then
5110 withval="$with_x"
ba4481b5 5111
503d2be0 5112fi;
ba4481b5
DL
5113# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5114if test "x$with_x" = xno; then
5115 # The user explicitly disabled X.
5116 have_x=disabled
5117else
5118 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5119 # Both variables are already set.
5120 have_x=yes
5121 else
503d2be0
AS
5122 if test "${ac_cv_have_x+set}" = set; then
5123 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
5124else
5125 # One or both of the vars are not set, and there is no cached value.
503d2be0
AS
5126ac_x_includes=no ac_x_libraries=no
5127rm -fr conftest.dir
5128if mkdir conftest.dir; then
5129 cd conftest.dir
ba4481b5 5130 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
503d2be0 5131 cat >Imakefile <<'EOF'
ba4481b5
DL
5132acfindx:
5133 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5134EOF
5135 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5136 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5137 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5138 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5139 for ac_extension in a so sl; do
5140 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
503d2be0 5141 test -f $ac_im_libdir/libX11.$ac_extension; then
ba4481b5
DL
5142 ac_im_usrlibdir=$ac_im_libdir; break
5143 fi
5144 done
5145 # Screen out bogus values from the imake configuration. They are
5146 # bogus both because they are the default anyway, and because
5147 # using them would break gcc on systems where it needs fixed includes.
503d2be0 5148 case $ac_im_incroot in
ba4481b5 5149 /usr/include) ;;
503d2be0 5150 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
ba4481b5 5151 esac
503d2be0 5152 case $ac_im_usrlibdir in
ba4481b5 5153 /usr/lib | /lib) ;;
503d2be0 5154 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
ba4481b5
DL
5155 esac
5156 fi
5157 cd ..
503d2be0 5158 rm -fr conftest.dir
ba4481b5
DL
5159fi
5160
503d2be0
AS
5161# Standard set of common directories for X headers.
5162# Check X11 before X11Rn because it is often a symlink to the current release.
5163ac_x_header_dirs='
5164/usr/X11/include
5165/usr/X11R6/include
5166/usr/X11R5/include
5167/usr/X11R4/include
5168
5169/usr/include/X11
5170/usr/include/X11R6
5171/usr/include/X11R5
5172/usr/include/X11R4
5173
5174/usr/local/X11/include
5175/usr/local/X11R6/include
5176/usr/local/X11R5/include
5177/usr/local/X11R4/include
5178
5179/usr/local/include/X11
5180/usr/local/include/X11R6
5181/usr/local/include/X11R5
5182/usr/local/include/X11R4
5183
5184/usr/X386/include
5185/usr/x386/include
5186/usr/XFree86/include/X11
5187
5188/usr/include
5189/usr/local/include
5190/usr/unsupported/include
5191/usr/athena/include
5192/usr/local/x11r5/include
5193/usr/lpp/Xamples/include
5194
5195/usr/openwin/include
5196/usr/openwin/share/include'
5197
5198if test "$ac_x_includes" = no; then
5199 # Guess where to find include files, by looking for Intrinsic.h.
ba4481b5 5200 # First, try using that file with no special directory specified.
503d2be0 5201 cat >conftest.$ac_ext <<_ACEOF
138f0859 5202#line 5202 "configure"
ba4481b5 5203#include "confdefs.h"
503d2be0
AS
5204#include <X11/Intrinsic.h>
5205_ACEOF
138f0859 5206if { (eval echo "$as_me:5206: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
5207 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5208 ac_status=$?
5209 egrep -v '^ *\+' conftest.er1 >conftest.err
5210 rm -f conftest.er1
5211 cat conftest.err >&5
138f0859 5212 echo "$as_me:5212: \$? = $ac_status" >&5
503d2be0
AS
5213 (exit $ac_status); } >/dev/null; then
5214 if test -s conftest.err; then
5215 ac_cpp_err=$ac_c_preproc_warn_flag
5216 else
5217 ac_cpp_err=
5218 fi
5219else
5220 ac_cpp_err=yes
5221fi
5222if test -z "$ac_cpp_err"; then
ba4481b5
DL
5223 # We can compile using X headers with no special include directory.
5224ac_x_includes=
5225else
503d2be0 5226 echo "$as_me: failed program was:" >&5
ba4481b5 5227 cat conftest.$ac_ext >&5
503d2be0
AS
5228 for ac_dir in $ac_x_header_dirs; do
5229 if test -r "$ac_dir/X11/Intrinsic.h"; then
5230 ac_x_includes=$ac_dir
5231 break
5232 fi
5233done
ba4481b5 5234fi
503d2be0
AS
5235rm -f conftest.err conftest.$ac_ext
5236fi # $ac_x_includes = no
ba4481b5 5237
503d2be0 5238if test "$ac_x_libraries" = no; then
ba4481b5 5239 # Check for the libraries.
ba4481b5
DL
5240 # See if we find them without any special options.
5241 # Don't add to $LIBS permanently.
503d2be0
AS
5242 ac_save_LIBS=$LIBS
5243 LIBS="-lXt $LIBS"
5244 cat >conftest.$ac_ext <<_ACEOF
138f0859 5245#line 5245 "configure"
ba4481b5 5246#include "confdefs.h"
503d2be0
AS
5247#include <X11/Intrinsic.h>
5248int
5249main ()
5250{
5251XtMalloc (0)
5252 ;
5253 return 0;
5254}
5255_ACEOF
5256rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 5257if { (eval echo "$as_me:5257: \"$ac_link\"") >&5
503d2be0
AS
5258 (eval $ac_link) 2>&5
5259 ac_status=$?
138f0859 5260 echo "$as_me:5260: \$? = $ac_status" >&5
503d2be0
AS
5261 (exit $ac_status); } &&
5262 { ac_try='test -s conftest$ac_exeext'
138f0859 5263 { (eval echo "$as_me:5263: \"$ac_try\"") >&5
503d2be0
AS
5264 (eval $ac_try) 2>&5
5265 ac_status=$?
138f0859 5266 echo "$as_me:5266: \$? = $ac_status" >&5
503d2be0
AS
5267 (exit $ac_status); }; }; then
5268 LIBS=$ac_save_LIBS
ba4481b5
DL
5269# We can link X programs with no special library path.
5270ac_x_libraries=
5271else
503d2be0
AS
5272 echo "$as_me: failed program was:" >&5
5273cat conftest.$ac_ext >&5
5274LIBS=$ac_save_LIBS
5275for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
ba4481b5 5276do
503d2be0 5277 # Don't even attempt the hair of trying to link an X program!
ba4481b5 5278 for ac_extension in a so sl; do
503d2be0 5279 if test -r $ac_dir/libXt.$ac_extension; then
ba4481b5
DL
5280 ac_x_libraries=$ac_dir
5281 break 2
5282 fi
5283 done
5284done
5285fi
503d2be0
AS
5286rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5287fi # $ac_x_libraries = no
ba4481b5 5288
503d2be0 5289if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
ba4481b5
DL
5290 # Didn't find X anywhere. Cache the known absence of X.
5291 ac_cv_have_x="have_x=no"
5292else
5293 # Record where we found X for the cache.
5294 ac_cv_have_x="have_x=yes \
5295 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5296fi
5297fi
503d2be0 5298
ba4481b5
DL
5299 fi
5300 eval "$ac_cv_have_x"
5301fi # $with_x != no
5302
5303if test "$have_x" != yes; then
138f0859 5304 echo "$as_me:5304: result: $have_x" >&5
503d2be0 5305echo "${ECHO_T}$have_x" >&6
ba4481b5
DL
5306 no_x=yes
5307else
5308 # If each of the values was on the command line, it overrides each guess.
5309 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5310 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5311 # Update the cache value to reflect the command line values.
5312 ac_cv_have_x="have_x=yes \
5313 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
138f0859 5314 echo "$as_me:5314: result: libraries $x_libraries, headers $x_includes" >&5
503d2be0 5315echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
ba4481b5
DL
5316fi
5317
5318if test "$no_x" = yes; then
5319 window_system=none
5320else
5321 window_system=x11
5322fi
5323
5324if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
5325 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
5326 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
5327 x_default_search_path=""
5328 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
f5215ba5
GM
5329 x_search_path="\
5330${x_library}/X11/%L/%T/%N%C%S:\
5331${x_library}/X11/%l/%T/%N%C%S:\
5332${x_library}/X11/%T/%N%C%S:\
5333${x_library}/X11/%L/%T/%N%S:\
5334${x_library}/X11/%l/%T/%N%S:\
5335${x_library}/X11/%T/%N%S"
ba4481b5
DL
5336 if test x"${x_default_search_path}" = x; then
5337 x_default_search_path=${x_search_path}
5338 else
5339 x_default_search_path="${x_search_path}:${x_default_search_path}"
5340 fi
5341 done
5342fi
5343if test "${x_includes}" != NONE && test -n "${x_includes}"; then
5344 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
5345fi
5346
5347if test x"${x_includes}" = x; then
5348 bitmapdir=/usr/include/X11/bitmaps
5349else
5350 # accumulate include directories that have X11 bitmap subdirectories
5351 bmd_acc="dummyval"
5352 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
5353 if test -d "${bmd}/X11/bitmaps"; then
5354 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
946173ad
DL
5355 fi
5356 if test -d "${bmd}/bitmaps"; then
ba4481b5
DL
5357 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
5358 fi
5359 done
5360 if test ${bmd_acc} != "dummyval"; then
5361 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
5362 fi
5363fi
5364
5365case "${window_system}" in
5366 x11 )
5367 HAVE_X_WINDOWS=yes
5368 HAVE_X11=yes
5369 case "${with_x_toolkit}" in
5370 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
5371 motif ) USE_X_TOOLKIT=MOTIF ;;
5372 no ) USE_X_TOOLKIT=none ;;
5373 * ) USE_X_TOOLKIT=maybe ;;
5374 esac
5375 ;;
5376 none )
5377 HAVE_X_WINDOWS=no
5378 HAVE_X11=no
5379 USE_X_TOOLKIT=none
5380 ;;
5381esac
5382
5383### If we're using X11, we should use the X menu package.
5384HAVE_MENUS=no
5385case ${HAVE_X11} in
5386 yes ) HAVE_MENUS=yes ;;
5387esac
503d2be0 5388
ba4481b5
DL
5389if test "${opsys}" = "hpux9"; then
5390 case "${x_libraries}" in
5391 *X11R4* )
5392 opsysfile="s/hpux9-x11r4.h"
5393 ;;
5394 esac
5395fi
5396
5397if test "${opsys}" = "hpux9shr"; then
5398 case "${x_libraries}" in
5399 *X11R4* )
5400 opsysfile="s/hpux9shxr4.h"
5401 ;;
5402 esac
5403fi
5404
ba4481b5
DL
5405### Compute the unexec source name from the object name.
5406UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
5407
5408# Do the opsystem or machine files prohibit the use of the GNU malloc?
5409# Assume not, until told otherwise.
5410GNU_MALLOC=yes
5411doug_lea_malloc=yes
138f0859 5412echo "$as_me:5412: checking for malloc_get_state" >&5
503d2be0
AS
5413echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6
5414if test "${ac_cv_func_malloc_get_state+set}" = set; then
5415 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5416else
503d2be0 5417 cat >conftest.$ac_ext <<_ACEOF
138f0859 5418#line 5418 "configure"
ba4481b5
DL
5419#include "confdefs.h"
5420/* System header to define __stub macros and hopefully few prototypes,
503d2be0 5421 which can conflict with char malloc_get_state (); below. */
ba4481b5
DL
5422#include <assert.h>
5423/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
5424#ifdef __cplusplus
5425extern "C"
5426#endif
ba4481b5 5427/* We use char because int might match the return type of a gcc2
503d2be0
AS
5428 builtin and then its argument prototype would still apply. */
5429char malloc_get_state ();
5430char (*f) ();
ba4481b5 5431
503d2be0
AS
5432int
5433main ()
5434{
ba4481b5
DL
5435/* The GNU C library defines this for functions which it implements
5436 to always fail with ENOSYS. Some functions are actually named
5437 something starting with __ and the normal name is an alias. */
5438#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
5439choke me
5440#else
503d2be0 5441f = malloc_get_state;
ba4481b5
DL
5442#endif
5443
503d2be0
AS
5444 ;
5445 return 0;
5446}
5447_ACEOF
5448rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 5449if { (eval echo "$as_me:5449: \"$ac_link\"") >&5
503d2be0
AS
5450 (eval $ac_link) 2>&5
5451 ac_status=$?
138f0859 5452 echo "$as_me:5452: \$? = $ac_status" >&5
503d2be0
AS
5453 (exit $ac_status); } &&
5454 { ac_try='test -s conftest$ac_exeext'
138f0859 5455 { (eval echo "$as_me:5455: \"$ac_try\"") >&5
503d2be0
AS
5456 (eval $ac_try) 2>&5
5457 ac_status=$?
138f0859 5458 echo "$as_me:5458: \$? = $ac_status" >&5
503d2be0
AS
5459 (exit $ac_status); }; }; then
5460 ac_cv_func_malloc_get_state=yes
5461else
5462 echo "$as_me: failed program was:" >&5
5463cat conftest.$ac_ext >&5
5464ac_cv_func_malloc_get_state=no
5465fi
5466rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5467fi
138f0859 5468echo "$as_me:5468: result: $ac_cv_func_malloc_get_state" >&5
503d2be0
AS
5469echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6
5470if test $ac_cv_func_malloc_get_state = yes; then
ba4481b5
DL
5471 :
5472else
503d2be0 5473 doug_lea_malloc=no
ba4481b5
DL
5474fi
5475
138f0859 5476echo "$as_me:5476: checking for malloc_set_state" >&5
503d2be0
AS
5477echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6
5478if test "${ac_cv_func_malloc_set_state+set}" = set; then
5479 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5480else
503d2be0 5481 cat >conftest.$ac_ext <<_ACEOF
138f0859 5482#line 5482 "configure"
ba4481b5
DL
5483#include "confdefs.h"
5484/* System header to define __stub macros and hopefully few prototypes,
503d2be0 5485 which can conflict with char malloc_set_state (); below. */
ba4481b5
DL
5486#include <assert.h>
5487/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
5488#ifdef __cplusplus
5489extern "C"
5490#endif
ba4481b5 5491/* We use char because int might match the return type of a gcc2
503d2be0
AS
5492 builtin and then its argument prototype would still apply. */
5493char malloc_set_state ();
5494char (*f) ();
ba4481b5 5495
503d2be0
AS
5496int
5497main ()
5498{
ba4481b5
DL
5499/* The GNU C library defines this for functions which it implements
5500 to always fail with ENOSYS. Some functions are actually named
5501 something starting with __ and the normal name is an alias. */
5502#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
5503choke me
5504#else
503d2be0 5505f = malloc_set_state;
ba4481b5
DL
5506#endif
5507
503d2be0
AS
5508 ;
5509 return 0;
5510}
5511_ACEOF
5512rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 5513if { (eval echo "$as_me:5513: \"$ac_link\"") >&5
503d2be0
AS
5514 (eval $ac_link) 2>&5
5515 ac_status=$?
138f0859 5516 echo "$as_me:5516: \$? = $ac_status" >&5
503d2be0
AS
5517 (exit $ac_status); } &&
5518 { ac_try='test -s conftest$ac_exeext'
138f0859 5519 { (eval echo "$as_me:5519: \"$ac_try\"") >&5
503d2be0
AS
5520 (eval $ac_try) 2>&5
5521 ac_status=$?
138f0859 5522 echo "$as_me:5522: \$? = $ac_status" >&5
503d2be0
AS
5523 (exit $ac_status); }; }; then
5524 ac_cv_func_malloc_set_state=yes
5525else
5526 echo "$as_me: failed program was:" >&5
5527cat conftest.$ac_ext >&5
5528ac_cv_func_malloc_set_state=no
5529fi
5530rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5531fi
138f0859 5532echo "$as_me:5532: result: $ac_cv_func_malloc_set_state" >&5
503d2be0
AS
5533echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6
5534if test $ac_cv_func_malloc_set_state = yes; then
ba4481b5
DL
5535 :
5536else
503d2be0 5537 doug_lea_malloc=no
ba4481b5
DL
5538fi
5539
138f0859 5540echo "$as_me:5540: checking whether __after_morecore_hook exists" >&5
503d2be0
AS
5541echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6
5542if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
5543 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5544else
503d2be0 5545 cat >conftest.$ac_ext <<_ACEOF
138f0859 5546#line 5546 "configure"
ba4481b5
DL
5547#include "confdefs.h"
5548extern void (* __after_morecore_hook)();
503d2be0
AS
5549int
5550main ()
5551{
ba4481b5 5552__after_morecore_hook = 0
503d2be0
AS
5553 ;
5554 return 0;
5555}
5556_ACEOF
5557rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 5558if { (eval echo "$as_me:5558: \"$ac_link\"") >&5
503d2be0
AS
5559 (eval $ac_link) 2>&5
5560 ac_status=$?
138f0859 5561 echo "$as_me:5561: \$? = $ac_status" >&5
503d2be0
AS
5562 (exit $ac_status); } &&
5563 { ac_try='test -s conftest$ac_exeext'
138f0859 5564 { (eval echo "$as_me:5564: \"$ac_try\"") >&5
503d2be0
AS
5565 (eval $ac_try) 2>&5
5566 ac_status=$?
138f0859 5567 echo "$as_me:5567: \$? = $ac_status" >&5
503d2be0 5568 (exit $ac_status); }; }; then
ba4481b5
DL
5569 emacs_cv_var___after_morecore_hook=yes
5570else
503d2be0
AS
5571 echo "$as_me: failed program was:" >&5
5572cat conftest.$ac_ext >&5
5573emacs_cv_var___after_morecore_hook=no
ba4481b5 5574fi
503d2be0 5575rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 5576fi
138f0859 5577echo "$as_me:5577: result: $emacs_cv_var___after_morecore_hook" >&5
503d2be0 5578echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6
ba4481b5
DL
5579if test $emacs_cv_var___after_morecore_hook = no; then
5580 doug_lea_malloc=no
5581fi
5582if test "${system_malloc}" = "yes"; then
5583 GNU_MALLOC=no
5584 GNU_MALLOC_reason="
5585 (The GNU allocators don't work with this system configuration.)"
5586fi
5587if test "$doug_lea_malloc" = "yes" ; then
5588 if test "$GNU_MALLOC" = yes ; then
5589 GNU_MALLOC_reason="
5590 (Using Doug Lea's new malloc from the GNU C Library.)"
5591 fi
503d2be0 5592 cat >>confdefs.h <<\EOF
ba4481b5
DL
5593#define DOUG_LEA_MALLOC 1
5594EOF
5595
5596fi
5597
5598if test x"${REL_ALLOC}" = x; then
5599 REL_ALLOC=${GNU_MALLOC}
5600fi
5601
503d2be0
AS
5602# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5603
5604for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5605 inttypes.h stdint.h unistd.h
5606do
5607as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
138f0859 5608echo "$as_me:5608: checking for $ac_header" >&5
503d2be0
AS
5609echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5610if eval "test \"\${$as_ac_Header+set}\" = set"; then
5611 echo $ECHO_N "(cached) $ECHO_C" >&6
5612else
5613 cat >conftest.$ac_ext <<_ACEOF
138f0859 5614#line 5614 "configure"
503d2be0
AS
5615#include "confdefs.h"
5616$ac_includes_default
5617#include <$ac_header>
5618_ACEOF
5619rm -f conftest.$ac_objext
138f0859 5620if { (eval echo "$as_me:5620: \"$ac_compile\"") >&5
503d2be0
AS
5621 (eval $ac_compile) 2>&5
5622 ac_status=$?
138f0859 5623 echo "$as_me:5623: \$? = $ac_status" >&5
503d2be0
AS
5624 (exit $ac_status); } &&
5625 { ac_try='test -s conftest.$ac_objext'
138f0859 5626 { (eval echo "$as_me:5626: \"$ac_try\"") >&5
503d2be0
AS
5627 (eval $ac_try) 2>&5
5628 ac_status=$?
138f0859 5629 echo "$as_me:5629: \$? = $ac_status" >&5
503d2be0
AS
5630 (exit $ac_status); }; }; then
5631 eval "$as_ac_Header=yes"
5632else
5633 echo "$as_me: failed program was:" >&5
5634cat conftest.$ac_ext >&5
5635eval "$as_ac_Header=no"
5636fi
5637rm -f conftest.$ac_objext conftest.$ac_ext
5638fi
138f0859 5639echo "$as_me:5639: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
5640echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5641if test `eval echo '${'$as_ac_Header'}'` = yes; then
5642 cat >>confdefs.h <<EOF
5643#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5644EOF
5645
5646fi
5647done
a55b799a 5648
503d2be0 5649for ac_header in stdlib.h unistd.h
73b77ee5 5650do
503d2be0 5651as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
138f0859 5652echo "$as_me:5652: checking for $ac_header" >&5
503d2be0
AS
5653echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5654if eval "test \"\${$as_ac_Header+set}\" = set"; then
5655 echo $ECHO_N "(cached) $ECHO_C" >&6
5656else
5657 cat >conftest.$ac_ext <<_ACEOF
138f0859 5658#line 5658 "configure"
503d2be0
AS
5659#include "confdefs.h"
5660#include <$ac_header>
5661_ACEOF
138f0859 5662if { (eval echo "$as_me:5662: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
5663 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5664 ac_status=$?
5665 egrep -v '^ *\+' conftest.er1 >conftest.err
5666 rm -f conftest.er1
5667 cat conftest.err >&5
138f0859 5668 echo "$as_me:5668: \$? = $ac_status" >&5
503d2be0
AS
5669 (exit $ac_status); } >/dev/null; then
5670 if test -s conftest.err; then
5671 ac_cpp_err=$ac_c_preproc_warn_flag
5672 else
5673 ac_cpp_err=
5674 fi
5675else
5676 ac_cpp_err=yes
5677fi
5678if test -z "$ac_cpp_err"; then
5679 eval "$as_ac_Header=yes"
5680else
5681 echo "$as_me: failed program was:" >&5
ba4481b5 5682 cat conftest.$ac_ext >&5
503d2be0 5683 eval "$as_ac_Header=no"
ba4481b5 5684fi
503d2be0 5685rm -f conftest.err conftest.$ac_ext
ba4481b5 5686fi
138f0859 5687echo "$as_me:5687: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
5688echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5689if test `eval echo '${'$as_ac_Header'}'` = yes; then
5690 cat >>confdefs.h <<EOF
5691#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba4481b5 5692EOF
503d2be0 5693
ba4481b5 5694fi
73b77ee5 5695done
ba4481b5 5696
73b77ee5 5697for ac_func in getpagesize
ba4481b5 5698do
503d2be0 5699as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
138f0859 5700echo "$as_me:5700: checking for $ac_func" >&5
503d2be0
AS
5701echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5702if eval "test \"\${$as_ac_var+set}\" = set"; then
5703 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5704else
503d2be0 5705 cat >conftest.$ac_ext <<_ACEOF
138f0859 5706#line 5706 "configure"
ba4481b5
DL
5707#include "confdefs.h"
5708/* System header to define __stub macros and hopefully few prototypes,
503d2be0 5709 which can conflict with char $ac_func (); below. */
ba4481b5
DL
5710#include <assert.h>
5711/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
5712#ifdef __cplusplus
5713extern "C"
5714#endif
ba4481b5 5715/* We use char because int might match the return type of a gcc2
503d2be0
AS
5716 builtin and then its argument prototype would still apply. */
5717char $ac_func ();
5718char (*f) ();
ba4481b5 5719
503d2be0
AS
5720int
5721main ()
5722{
ba4481b5
DL
5723/* The GNU C library defines this for functions which it implements
5724 to always fail with ENOSYS. Some functions are actually named
5725 something starting with __ and the normal name is an alias. */
5726#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5727choke me
5728#else
503d2be0 5729f = $ac_func;
ba4481b5
DL
5730#endif
5731
503d2be0
AS
5732 ;
5733 return 0;
5734}
5735_ACEOF
5736rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 5737if { (eval echo "$as_me:5737: \"$ac_link\"") >&5
503d2be0
AS
5738 (eval $ac_link) 2>&5
5739 ac_status=$?
138f0859 5740 echo "$as_me:5740: \$? = $ac_status" >&5
503d2be0
AS
5741 (exit $ac_status); } &&
5742 { ac_try='test -s conftest$ac_exeext'
138f0859 5743 { (eval echo "$as_me:5743: \"$ac_try\"") >&5
503d2be0
AS
5744 (eval $ac_try) 2>&5
5745 ac_status=$?
138f0859 5746 echo "$as_me:5746: \$? = $ac_status" >&5
503d2be0
AS
5747 (exit $ac_status); }; }; then
5748 eval "$as_ac_var=yes"
5749else
5750 echo "$as_me: failed program was:" >&5
5751cat conftest.$ac_ext >&5
5752eval "$as_ac_var=no"
5753fi
5754rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5755fi
138f0859 5756echo "$as_me:5756: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
5757echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5758if test `eval echo '${'$as_ac_var'}'` = yes; then
5759 cat >>confdefs.h <<EOF
5760#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
ba4481b5 5761EOF
ba4481b5 5762
ba4481b5
DL
5763fi
5764done
5765
138f0859 5766echo "$as_me:5766: checking for working mmap" >&5
503d2be0
AS
5767echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
5768if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
5769 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5
GM
5770else
5771 if test "$cross_compiling" = yes; then
5772 ac_cv_func_mmap_fixed_mapped=no
ba4481b5 5773else
503d2be0 5774 cat >conftest.$ac_ext <<_ACEOF
138f0859 5775#line 5775 "configure"
ba4481b5 5776#include "confdefs.h"
503d2be0 5777$ac_includes_default
73b77ee5
GM
5778/* Thanks to Mike Haertel and Jim Avera for this test.
5779 Here is a matrix of mmap possibilities:
5780 mmap private not fixed
5781 mmap private fixed at somewhere currently unmapped
5782 mmap private fixed at somewhere already mapped
5783 mmap shared not fixed
5784 mmap shared fixed at somewhere currently unmapped
5785 mmap shared fixed at somewhere already mapped
5786 For private mappings, we should verify that changes cannot be read()
5787 back from the file, nor mmap's back from the file at a different
5788 address. (There have been systems where private was not correctly
5789 implemented like the infamous i386 svr4.0, and systems where the
1932bc86 5790 VM page cache was not coherent with the file system buffer cache
73b77ee5
GM
5791 like early versions of FreeBSD and possibly contemporary NetBSD.)
5792 For shared mappings, we should conversely verify that changes get
5793 propogated back to all the places they're supposed to be.
5794
5795 Grep wants private fixed already mapped.
5796 The main things grep needs to know about mmap are:
5797 * does it exist and is it safe to write into the mmap'd area
5798 * how to use it (BSD variants) */
503d2be0 5799
73b77ee5
GM
5800#include <fcntl.h>
5801#include <sys/mman.h>
5802
503d2be0 5803#if !STDC_HEADERS && !HAVE_STDLIB_H
1932bc86
DL
5804char *malloc ();
5805#endif
73b77ee5 5806
1932bc86
DL
5807/* This mess was copied from the GNU getpagesize.h. */
5808#if !HAVE_GETPAGESIZE
73b77ee5 5809/* Assume that all systems that can run configure have sys/param.h. */
1932bc86 5810# if !HAVE_SYS_PARAM_H
73b77ee5
GM
5811# define HAVE_SYS_PARAM_H 1
5812# endif
5813
5814# ifdef _SC_PAGESIZE
5815# define getpagesize() sysconf(_SC_PAGESIZE)
5816# else /* no _SC_PAGESIZE */
1932bc86 5817# if HAVE_SYS_PARAM_H
73b77ee5
GM
5818# include <sys/param.h>
5819# ifdef EXEC_PAGESIZE
5820# define getpagesize() EXEC_PAGESIZE
5821# else /* no EXEC_PAGESIZE */
5822# ifdef NBPG
5823# define getpagesize() NBPG * CLSIZE
5824# ifndef CLSIZE
5825# define CLSIZE 1
5826# endif /* no CLSIZE */
5827# else /* no NBPG */
5828# ifdef NBPC
5829# define getpagesize() NBPC
5830# else /* no NBPC */
5831# ifdef PAGESIZE
5832# define getpagesize() PAGESIZE
5833# endif /* PAGESIZE */
5834# endif /* no NBPC */
5835# endif /* no NBPG */
5836# endif /* no EXEC_PAGESIZE */
5837# else /* no HAVE_SYS_PARAM_H */
5838# define getpagesize() 8192 /* punt totally */
5839# endif /* no HAVE_SYS_PARAM_H */
5840# endif /* no _SC_PAGESIZE */
5841
5842#endif /* no HAVE_GETPAGESIZE */
5843
73b77ee5 5844int
1932bc86 5845main ()
73b77ee5 5846{
1932bc86
DL
5847 char *data, *data2, *data3;
5848 int i, pagesize;
5849 int fd;
5850
5851 pagesize = getpagesize ();
5852
5853 /* First, make a file with some known garbage in it. */
5854 data = (char *) malloc (pagesize);
5855 if (!data)
5856 exit (1);
5857 for (i = 0; i < pagesize; ++i)
5858 *(data + i) = rand ();
5859 umask (0);
503d2be0 5860 fd = creat ("conftest.mmap", 0600);
1932bc86
DL
5861 if (fd < 0)
5862 exit (1);
5863 if (write (fd, data, pagesize) != pagesize)
5864 exit (1);
5865 close (fd);
73b77ee5 5866
1932bc86
DL
5867 /* Next, try to mmap the file at a fixed address which already has
5868 something else allocated at it. If we can, also make sure that
5869 we see the same garbage. */
503d2be0 5870 fd = open ("conftest.mmap", O_RDWR);
1932bc86
DL
5871 if (fd < 0)
5872 exit (1);
5873 data2 = (char *) malloc (2 * pagesize);
5874 if (!data2)
5875 exit (1);
5876 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5877 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
5878 MAP_PRIVATE | MAP_FIXED, fd, 0L))
5879 exit (1);
5880 for (i = 0; i < pagesize; ++i)
5881 if (*(data + i) != *(data2 + i))
5882 exit (1);
5883
5884 /* Finally, make sure that changes to the mapped area do not
5885 percolate back to the file as seen by read(). (This is a bug on
5886 some variants of i386 svr4.0.) */
5887 for (i = 0; i < pagesize; ++i)
5888 *(data2 + i) = *(data2 + i) + 1;
5889 data3 = (char *) malloc (pagesize);
5890 if (!data3)
5891 exit (1);
5892 if (read (fd, data3, pagesize) != pagesize)
5893 exit (1);
5894 for (i = 0; i < pagesize; ++i)
5895 if (*(data + i) != *(data3 + i))
5896 exit (1);
5897 close (fd);
1932bc86
DL
5898 exit (0);
5899}
503d2be0
AS
5900_ACEOF
5901rm -f conftest$ac_exeext
138f0859 5902if { (eval echo "$as_me:5902: \"$ac_link\"") >&5
503d2be0
AS
5903 (eval $ac_link) 2>&5
5904 ac_status=$?
138f0859 5905 echo "$as_me:5905: \$? = $ac_status" >&5
503d2be0 5906 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
138f0859 5907 { (eval echo "$as_me:5907: \"$ac_try\"") >&5
503d2be0
AS
5908 (eval $ac_try) 2>&5
5909 ac_status=$?
138f0859 5910 echo "$as_me:5910: \$? = $ac_status" >&5
503d2be0 5911 (exit $ac_status); }; }; then
73b77ee5
GM
5912 ac_cv_func_mmap_fixed_mapped=yes
5913else
503d2be0
AS
5914 echo "$as_me: program exited with status $ac_status" >&5
5915echo "$as_me: failed program was:" >&5
5916cat conftest.$ac_ext >&5
5917ac_cv_func_mmap_fixed_mapped=no
73b77ee5 5918fi
503d2be0 5919rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
73b77ee5 5920fi
73b77ee5 5921fi
138f0859 5922echo "$as_me:5922: result: $ac_cv_func_mmap_fixed_mapped" >&5
503d2be0 5923echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
73b77ee5 5924if test $ac_cv_func_mmap_fixed_mapped = yes; then
503d2be0
AS
5925
5926cat >>confdefs.h <<\EOF
73b77ee5
GM
5927#define HAVE_MMAP 1
5928EOF
5929
5930fi
503d2be0 5931rm -f conftest.mmap
73b77ee5 5932
ef9e4345
GM
5933if test $use_mmap_for_buffers = yes; then
5934 REL_ALLOC=no
73b77ee5
GM
5935fi
5936
5937LIBS="$libsrc_libs $LIBS"
5938
138f0859 5939echo "$as_me:5939: checking for dnet_ntoa in -ldnet" >&5
503d2be0
AS
5940echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
5941if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
5942 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 5943else
503d2be0 5944 ac_check_lib_save_LIBS=$LIBS
73b77ee5 5945LIBS="-ldnet $LIBS"
503d2be0 5946cat >conftest.$ac_ext <<_ACEOF
138f0859 5947#line 5947 "configure"
73b77ee5 5948#include "confdefs.h"
503d2be0 5949
73b77ee5 5950/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
5951#ifdef __cplusplus
5952extern "C"
5953#endif
73b77ee5 5954/* We use char because int might match the return type of a gcc2
503d2be0
AS
5955 builtin and then its argument prototype would still apply. */
5956char dnet_ntoa ();
5957int
5958main ()
5959{
5960dnet_ntoa ();
5961 ;
5962 return 0;
5963}
5964_ACEOF
5965rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 5966if { (eval echo "$as_me:5966: \"$ac_link\"") >&5
503d2be0
AS
5967 (eval $ac_link) 2>&5
5968 ac_status=$?
138f0859 5969 echo "$as_me:5969: \$? = $ac_status" >&5
503d2be0
AS
5970 (exit $ac_status); } &&
5971 { ac_try='test -s conftest$ac_exeext'
138f0859 5972 { (eval echo "$as_me:5972: \"$ac_try\"") >&5
503d2be0
AS
5973 (eval $ac_try) 2>&5
5974 ac_status=$?
138f0859 5975 echo "$as_me:5975: \$? = $ac_status" >&5
503d2be0
AS
5976 (exit $ac_status); }; }; then
5977 ac_cv_lib_dnet_dnet_ntoa=yes
5978else
5979 echo "$as_me: failed program was:" >&5
5980cat conftest.$ac_ext >&5
5981ac_cv_lib_dnet_dnet_ntoa=no
5982fi
5983rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5984LIBS=$ac_check_lib_save_LIBS
5985fi
138f0859 5986echo "$as_me:5986: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
503d2be0
AS
5987echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
5988if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
5989 cat >>confdefs.h <<EOF
5990#define HAVE_LIBDNET 1
73b77ee5
GM
5991EOF
5992
5993 LIBS="-ldnet $LIBS"
5994
73b77ee5
GM
5995fi
5996
138f0859 5997echo "$as_me:5997: checking for main in -lXbsd" >&5
503d2be0
AS
5998echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6
5999if test "${ac_cv_lib_Xbsd_main+set}" = set; then
6000 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 6001else
503d2be0 6002 ac_check_lib_save_LIBS=$LIBS
73b77ee5 6003LIBS="-lXbsd $LIBS"
503d2be0 6004cat >conftest.$ac_ext <<_ACEOF
138f0859 6005#line 6005 "configure"
73b77ee5
GM
6006#include "confdefs.h"
6007
503d2be0
AS
6008int
6009main ()
6010{
6011main ();
6012 ;
6013 return 0;
6014}
6015_ACEOF
6016rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 6017if { (eval echo "$as_me:6017: \"$ac_link\"") >&5
503d2be0
AS
6018 (eval $ac_link) 2>&5
6019 ac_status=$?
138f0859 6020 echo "$as_me:6020: \$? = $ac_status" >&5
503d2be0
AS
6021 (exit $ac_status); } &&
6022 { ac_try='test -s conftest$ac_exeext'
138f0859 6023 { (eval echo "$as_me:6023: \"$ac_try\"") >&5
503d2be0
AS
6024 (eval $ac_try) 2>&5
6025 ac_status=$?
138f0859 6026 echo "$as_me:6026: \$? = $ac_status" >&5
503d2be0
AS
6027 (exit $ac_status); }; }; then
6028 ac_cv_lib_Xbsd_main=yes
6029else
6030 echo "$as_me: failed program was:" >&5
6031cat conftest.$ac_ext >&5
6032ac_cv_lib_Xbsd_main=no
6033fi
6034rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6035LIBS=$ac_check_lib_save_LIBS
6036fi
138f0859 6037echo "$as_me:6037: result: $ac_cv_lib_Xbsd_main" >&5
503d2be0
AS
6038echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6
6039if test $ac_cv_lib_Xbsd_main = yes; then
73b77ee5 6040 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
73b77ee5
GM
6041fi
6042
138f0859 6043echo "$as_me:6043: checking for cma_open in -lpthreads" >&5
503d2be0
AS
6044echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6
6045if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
6046 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 6047else
503d2be0 6048 ac_check_lib_save_LIBS=$LIBS
73b77ee5 6049LIBS="-lpthreads $LIBS"
503d2be0 6050cat >conftest.$ac_ext <<_ACEOF
138f0859 6051#line 6051 "configure"
73b77ee5 6052#include "confdefs.h"
503d2be0 6053
73b77ee5 6054/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6055#ifdef __cplusplus
6056extern "C"
6057#endif
73b77ee5 6058/* We use char because int might match the return type of a gcc2
503d2be0
AS
6059 builtin and then its argument prototype would still apply. */
6060char cma_open ();
6061int
6062main ()
6063{
6064cma_open ();
6065 ;
6066 return 0;
6067}
6068_ACEOF
6069rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 6070if { (eval echo "$as_me:6070: \"$ac_link\"") >&5
503d2be0
AS
6071 (eval $ac_link) 2>&5
6072 ac_status=$?
138f0859 6073 echo "$as_me:6073: \$? = $ac_status" >&5
503d2be0
AS
6074 (exit $ac_status); } &&
6075 { ac_try='test -s conftest$ac_exeext'
138f0859 6076 { (eval echo "$as_me:6076: \"$ac_try\"") >&5
503d2be0
AS
6077 (eval $ac_try) 2>&5
6078 ac_status=$?
138f0859 6079 echo "$as_me:6079: \$? = $ac_status" >&5
503d2be0
AS
6080 (exit $ac_status); }; }; then
6081 ac_cv_lib_pthreads_cma_open=yes
6082else
6083 echo "$as_me: failed program was:" >&5
6084cat conftest.$ac_ext >&5
6085ac_cv_lib_pthreads_cma_open=no
6086fi
6087rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6088LIBS=$ac_check_lib_save_LIBS
6089fi
138f0859 6090echo "$as_me:6090: result: $ac_cv_lib_pthreads_cma_open" >&5
503d2be0
AS
6091echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6
6092if test $ac_cv_lib_pthreads_cma_open = yes; then
6093 cat >>confdefs.h <<EOF
6094#define HAVE_LIBPTHREADS 1
73b77ee5
GM
6095EOF
6096
6097 LIBS="-lpthreads $LIBS"
6098
73b77ee5
GM
6099fi
6100
138f0859 6101echo "$as_me:6101: checking for XFree86 in /usr/X386" >&5
503d2be0 6102echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6
73b77ee5
GM
6103if test -d /usr/X386/include; then
6104 HAVE_XFREE386=yes
6105 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
6106else
6107 HAVE_XFREE386=no
6108fi
138f0859 6109echo "$as_me:6109: result: $HAVE_XFREE386" >&5
503d2be0 6110echo "${ECHO_T}$HAVE_XFREE386" >&6
73b77ee5
GM
6111
6112# Change CFLAGS temporarily so that C_SWITCH_X_SITE gets used
6113# for the tests that follow. We set it back to REAL_CFLAGS later on.
6114
6115REAL_CPPFLAGS="$CPPFLAGS"
6116
6117if test "${HAVE_X11}" = "yes"; then
6118 DEFS="$C_SWITCH_X_SITE $DEFS"
6119 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
6120 LIBS="$LIBX $LIBS"
6121 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
6122 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
6123
6124 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
6125 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
6126 # but it's more convenient here to set LD_RUN_PATH
6127 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
6128 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
6129 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
6130 export LD_RUN_PATH
6131 fi
6132
6133 if test "${opsys}" = "gnu-linux"; then
138f0859 6134 echo "$as_me:6134: checking whether X on GNU/Linux needs -b to link" >&5
503d2be0
AS
6135echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6
6136 cat >conftest.$ac_ext <<_ACEOF
138f0859 6137#line 6137 "configure"
73b77ee5
GM
6138#include "confdefs.h"
6139
503d2be0
AS
6140int
6141main ()
6142{
73b77ee5 6143XOpenDisplay ("foo");
503d2be0
AS
6144 ;
6145 return 0;
6146}
6147_ACEOF
6148rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 6149if { (eval echo "$as_me:6149: \"$ac_link\"") >&5
503d2be0
AS
6150 (eval $ac_link) 2>&5
6151 ac_status=$?
138f0859 6152 echo "$as_me:6152: \$? = $ac_status" >&5
503d2be0
AS
6153 (exit $ac_status); } &&
6154 { ac_try='test -s conftest$ac_exeext'
138f0859 6155 { (eval echo "$as_me:6155: \"$ac_try\"") >&5
503d2be0
AS
6156 (eval $ac_try) 2>&5
6157 ac_status=$?
138f0859 6158 echo "$as_me:6158: \$? = $ac_status" >&5
503d2be0 6159 (exit $ac_status); }; }; then
73b77ee5
GM
6160 xlinux_first_failure=no
6161else
503d2be0
AS
6162 echo "$as_me: failed program was:" >&5
6163cat conftest.$ac_ext >&5
6164xlinux_first_failure=yes
73b77ee5 6165fi
503d2be0 6166rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
73b77ee5
GM
6167 if test "${xlinux_first_failure}" = "yes"; then
6168 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
6169 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
6170 OLD_CPPFLAGS="$CPPFLAGS"
6171 OLD_LIBS="$LIBS"
6172 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
6173 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
6174 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
6175 LIBS="$LIBS -b i486-linuxaout"
503d2be0 6176 cat >conftest.$ac_ext <<_ACEOF
138f0859 6177#line 6177 "configure"
73b77ee5
GM
6178#include "confdefs.h"
6179
503d2be0
AS
6180int
6181main ()
6182{
73b77ee5 6183XOpenDisplay ("foo");
503d2be0
AS
6184 ;
6185 return 0;
6186}
6187_ACEOF
6188rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 6189if { (eval echo "$as_me:6189: \"$ac_link\"") >&5
503d2be0
AS
6190 (eval $ac_link) 2>&5
6191 ac_status=$?
138f0859 6192 echo "$as_me:6192: \$? = $ac_status" >&5
503d2be0
AS
6193 (exit $ac_status); } &&
6194 { ac_try='test -s conftest$ac_exeext'
138f0859 6195 { (eval echo "$as_me:6195: \"$ac_try\"") >&5
503d2be0
AS
6196 (eval $ac_try) 2>&5
6197 ac_status=$?
138f0859 6198 echo "$as_me:6198: \$? = $ac_status" >&5
503d2be0 6199 (exit $ac_status); }; }; then
73b77ee5
GM
6200 xlinux_second_failure=no
6201else
503d2be0
AS
6202 echo "$as_me: failed program was:" >&5
6203cat conftest.$ac_ext >&5
6204xlinux_second_failure=yes
73b77ee5 6205fi
503d2be0 6206rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
73b77ee5
GM
6207 if test "${xlinux_second_failure}" = "yes"; then
6208 # If we get the same failure with -b, there is no use adding -b.
6209 # So take it out. This plays safe.
6210 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
6211 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
6212 CPPFLAGS="$OLD_CPPFLAGS"
6213 LIBS="$OLD_LIBS"
138f0859 6214 echo "$as_me:6214: result: no" >&5
503d2be0 6215echo "${ECHO_T}no" >&6
73b77ee5 6216 else
138f0859 6217 echo "$as_me:6217: result: yes" >&5
503d2be0 6218echo "${ECHO_T}yes" >&6
73b77ee5
GM
6219 fi
6220 else
138f0859 6221 echo "$as_me:6221: result: no" >&5
503d2be0 6222echo "${ECHO_T}no" >&6
73b77ee5
GM
6223 fi
6224 fi
6225
ac95a621
GM
6226 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
6227 # header files included from there.
138f0859 6228 echo "$as_me:6228: checking for Xkb" >&5
503d2be0
AS
6229echo $ECHO_N "checking for Xkb... $ECHO_C" >&6
6230 cat >conftest.$ac_ext <<_ACEOF
138f0859 6231#line 6231 "configure"
ac95a621
GM
6232#include "confdefs.h"
6233#include <X11/Xlib.h>
6234#include <X11/XKBlib.h>
503d2be0
AS
6235int
6236main ()
6237{
ac95a621 6238XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
503d2be0
AS
6239 ;
6240 return 0;
6241}
6242_ACEOF
6243rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 6244if { (eval echo "$as_me:6244: \"$ac_link\"") >&5
503d2be0
AS
6245 (eval $ac_link) 2>&5
6246 ac_status=$?
138f0859 6247 echo "$as_me:6247: \$? = $ac_status" >&5
503d2be0
AS
6248 (exit $ac_status); } &&
6249 { ac_try='test -s conftest$ac_exeext'
138f0859 6250 { (eval echo "$as_me:6250: \"$ac_try\"") >&5
503d2be0
AS
6251 (eval $ac_try) 2>&5
6252 ac_status=$?
138f0859 6253 echo "$as_me:6253: \$? = $ac_status" >&5
503d2be0 6254 (exit $ac_status); }; }; then
ac95a621
GM
6255 emacs_xkb=yes
6256else
503d2be0
AS
6257 echo "$as_me: failed program was:" >&5
6258cat conftest.$ac_ext >&5
6259emacs_xkb=no
ac95a621 6260fi
503d2be0 6261rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
138f0859 6262 echo "$as_me:6262: result: $emacs_xkb" >&5
503d2be0 6263echo "${ECHO_T}$emacs_xkb" >&6
ac95a621 6264 if test $emacs_xkb = yes; then
503d2be0 6265 cat >>confdefs.h <<\EOF
ac95a621
GM
6266#define HAVE_XKBGETKEYBOARD 1
6267EOF
6268
6269 fi
6270
503d2be0 6271for ac_func in XrmSetDatabase XScreenResourceString \
73b77ee5
GM
6272XScreenNumberOfScreen XSetWMProtocols
6273do
503d2be0 6274as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
138f0859 6275echo "$as_me:6275: checking for $ac_func" >&5
503d2be0
AS
6276echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6277if eval "test \"\${$as_ac_var+set}\" = set"; then
6278 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 6279else
503d2be0 6280 cat >conftest.$ac_ext <<_ACEOF
138f0859 6281#line 6281 "configure"
73b77ee5
GM
6282#include "confdefs.h"
6283/* System header to define __stub macros and hopefully few prototypes,
503d2be0 6284 which can conflict with char $ac_func (); below. */
73b77ee5
GM
6285#include <assert.h>
6286/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6287#ifdef __cplusplus
6288extern "C"
6289#endif
73b77ee5 6290/* We use char because int might match the return type of a gcc2
503d2be0
AS
6291 builtin and then its argument prototype would still apply. */
6292char $ac_func ();
6293char (*f) ();
73b77ee5 6294
503d2be0
AS
6295int
6296main ()
6297{
73b77ee5
GM
6298/* The GNU C library defines this for functions which it implements
6299 to always fail with ENOSYS. Some functions are actually named
6300 something starting with __ and the normal name is an alias. */
6301#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6302choke me
6303#else
503d2be0 6304f = $ac_func;
73b77ee5
GM
6305#endif
6306
503d2be0
AS
6307 ;
6308 return 0;
6309}
6310_ACEOF
6311rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 6312if { (eval echo "$as_me:6312: \"$ac_link\"") >&5
503d2be0
AS
6313 (eval $ac_link) 2>&5
6314 ac_status=$?
138f0859 6315 echo "$as_me:6315: \$? = $ac_status" >&5
503d2be0
AS
6316 (exit $ac_status); } &&
6317 { ac_try='test -s conftest$ac_exeext'
138f0859 6318 { (eval echo "$as_me:6318: \"$ac_try\"") >&5
503d2be0
AS
6319 (eval $ac_try) 2>&5
6320 ac_status=$?
138f0859 6321 echo "$as_me:6321: \$? = $ac_status" >&5
503d2be0
AS
6322 (exit $ac_status); }; }; then
6323 eval "$as_ac_var=yes"
6324else
6325 echo "$as_me: failed program was:" >&5
6326cat conftest.$ac_ext >&5
6327eval "$as_ac_var=no"
6328fi
6329rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6330fi
138f0859 6331echo "$as_me:6331: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
6332echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6333if test `eval echo '${'$as_ac_var'}'` = yes; then
6334 cat >>confdefs.h <<EOF
6335#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
73b77ee5 6336EOF
73b77ee5 6337
73b77ee5
GM
6338fi
6339done
6340
6341fi
6342
6343if test "${window_system}" = "x11"; then
138f0859 6344 echo "$as_me:6344: checking X11 version 6" >&5
503d2be0
AS
6345echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6
6346 if test "${emacs_cv_x11_version_6+set}" = set; then
6347 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 6348else
503d2be0 6349 cat >conftest.$ac_ext <<_ACEOF
138f0859 6350#line 6350 "configure"
73b77ee5
GM
6351#include "confdefs.h"
6352#include <X11/Xlib.h>
503d2be0
AS
6353int
6354main ()
6355{
73b77ee5
GM
6356#if XlibSpecificationRelease < 6
6357fail;
6358#endif
6359
503d2be0
AS
6360 ;
6361 return 0;
6362}
6363_ACEOF
6364rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 6365if { (eval echo "$as_me:6365: \"$ac_link\"") >&5
503d2be0
AS
6366 (eval $ac_link) 2>&5
6367 ac_status=$?
138f0859 6368 echo "$as_me:6368: \$? = $ac_status" >&5
503d2be0
AS
6369 (exit $ac_status); } &&
6370 { ac_try='test -s conftest$ac_exeext'
138f0859 6371 { (eval echo "$as_me:6371: \"$ac_try\"") >&5
503d2be0
AS
6372 (eval $ac_try) 2>&5
6373 ac_status=$?
138f0859 6374 echo "$as_me:6374: \$? = $ac_status" >&5
503d2be0 6375 (exit $ac_status); }; }; then
73b77ee5
GM
6376 emacs_cv_x11_version_6=yes
6377else
503d2be0
AS
6378 echo "$as_me: failed program was:" >&5
6379cat conftest.$ac_ext >&5
6380emacs_cv_x11_version_6=no
73b77ee5 6381fi
503d2be0 6382rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
73b77ee5
GM
6383fi
6384
6385 if test $emacs_cv_x11_version_6 = yes; then
138f0859 6386 echo "$as_me:6386: result: 6 or newer" >&5
503d2be0
AS
6387echo "${ECHO_T}6 or newer" >&6
6388 cat >>confdefs.h <<\EOF
73b77ee5
GM
6389#define HAVE_X11R6 1
6390EOF
6391
6392 else
138f0859 6393 echo "$as_me:6393: result: before 6" >&5
503d2be0 6394echo "${ECHO_T}before 6" >&6
ba4481b5
DL
6395 fi
6396fi
6397
6398if test "${window_system}" = "x11"; then
138f0859 6399 echo "$as_me:6399: checking X11 version 5" >&5
503d2be0
AS
6400echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6
6401 if test "${emacs_cv_x11_version_5+set}" = set; then
6402 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6403else
503d2be0 6404 cat >conftest.$ac_ext <<_ACEOF
138f0859 6405#line 6405 "configure"
ba4481b5
DL
6406#include "confdefs.h"
6407#include <X11/Xlib.h>
503d2be0
AS
6408int
6409main ()
6410{
ba4481b5
DL
6411#if XlibSpecificationRelease < 5
6412fail;
6413#endif
6414
503d2be0
AS
6415 ;
6416 return 0;
6417}
6418_ACEOF
6419rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 6420if { (eval echo "$as_me:6420: \"$ac_link\"") >&5
503d2be0
AS
6421 (eval $ac_link) 2>&5
6422 ac_status=$?
138f0859 6423 echo "$as_me:6423: \$? = $ac_status" >&5
503d2be0
AS
6424 (exit $ac_status); } &&
6425 { ac_try='test -s conftest$ac_exeext'
138f0859 6426 { (eval echo "$as_me:6426: \"$ac_try\"") >&5
503d2be0
AS
6427 (eval $ac_try) 2>&5
6428 ac_status=$?
138f0859 6429 echo "$as_me:6429: \$? = $ac_status" >&5
503d2be0 6430 (exit $ac_status); }; }; then
ba4481b5
DL
6431 emacs_cv_x11_version_5=yes
6432else
503d2be0
AS
6433 echo "$as_me: failed program was:" >&5
6434cat conftest.$ac_ext >&5
6435emacs_cv_x11_version_5=no
ba4481b5 6436fi
503d2be0 6437rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5
DL
6438fi
6439
6440 if test $emacs_cv_x11_version_5 = yes; then
138f0859 6441 echo "$as_me:6441: result: 5 or newer" >&5
503d2be0 6442echo "${ECHO_T}5 or newer" >&6
ba4481b5 6443 HAVE_X11R5=yes
503d2be0 6444 cat >>confdefs.h <<\EOF
ba4481b5
DL
6445#define HAVE_X11R5 1
6446EOF
6447
6448 else
6449 HAVE_X11R5=no
138f0859 6450 echo "$as_me:6450: result: before 5" >&5
503d2be0 6451echo "${ECHO_T}before 5" >&6
ba4481b5
DL
6452 fi
6453fi
6454
6455if test x"${USE_X_TOOLKIT}" = xmaybe; then
6456 if test x"${HAVE_X11R5}" = xyes; then
138f0859 6457 echo "$as_me:6457: checking X11 version 5 with Xaw" >&5
503d2be0
AS
6458echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6
6459 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
6460 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6461else
503d2be0 6462 cat >conftest.$ac_ext <<_ACEOF
138f0859 6463#line 6463 "configure"
ba4481b5
DL
6464#include "confdefs.h"
6465
6466#include <X11/Intrinsic.h>
6467#include <X11/Xaw/Simple.h>
503d2be0
AS
6468int
6469main ()
6470{
ba4481b5 6471
503d2be0
AS
6472 ;
6473 return 0;
6474}
6475_ACEOF
6476rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 6477if { (eval echo "$as_me:6477: \"$ac_link\"") >&5
503d2be0
AS
6478 (eval $ac_link) 2>&5
6479 ac_status=$?
138f0859 6480 echo "$as_me:6480: \$? = $ac_status" >&5
503d2be0
AS
6481 (exit $ac_status); } &&
6482 { ac_try='test -s conftest$ac_exeext'
138f0859 6483 { (eval echo "$as_me:6483: \"$ac_try\"") >&5
503d2be0
AS
6484 (eval $ac_try) 2>&5
6485 ac_status=$?
138f0859 6486 echo "$as_me:6486: \$? = $ac_status" >&5
503d2be0 6487 (exit $ac_status); }; }; then
ba4481b5
DL
6488 emacs_cv_x11_version_5_with_xaw=yes
6489else
503d2be0
AS
6490 echo "$as_me: failed program was:" >&5
6491cat conftest.$ac_ext >&5
6492emacs_cv_x11_version_5_with_xaw=no
ba4481b5 6493fi
503d2be0 6494rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5
DL
6495fi
6496
6497 if test $emacs_cv_x11_version_5_with_xaw = yes; then
138f0859 6498 echo "$as_me:6498: result: 5 or newer, with Xaw; use toolkit by default" >&5
503d2be0 6499echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6
ba4481b5
DL
6500 USE_X_TOOLKIT=LUCID
6501 else
138f0859 6502 echo "$as_me:6502: result: before 5 or no Xaw; do not use toolkit by default" >&5
503d2be0 6503echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6
ba4481b5
DL
6504 USE_X_TOOLKIT=none
6505 fi
6506 else
6507 USE_X_TOOLKIT=none
6508 fi
6509fi
6510
6511X_TOOLKIT_TYPE=$USE_X_TOOLKIT
6512
6513if test "${USE_X_TOOLKIT}" != "none"; then
138f0859 6514 echo "$as_me:6514: checking X11 toolkit version" >&5
503d2be0
AS
6515echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6
6516 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
6517 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6518else
503d2be0 6519 cat >conftest.$ac_ext <<_ACEOF
138f0859 6520#line 6520 "configure"
ba4481b5
DL
6521#include "confdefs.h"
6522#include <X11/Intrinsic.h>
503d2be0
AS
6523int
6524main ()
6525{
ba4481b5
DL
6526#if XtSpecificationRelease < 6
6527fail;
6528#endif
6529
503d2be0
AS
6530 ;
6531 return 0;
6532}
6533_ACEOF
6534rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 6535if { (eval echo "$as_me:6535: \"$ac_link\"") >&5
503d2be0
AS
6536 (eval $ac_link) 2>&5
6537 ac_status=$?
138f0859 6538 echo "$as_me:6538: \$? = $ac_status" >&5
503d2be0
AS
6539 (exit $ac_status); } &&
6540 { ac_try='test -s conftest$ac_exeext'
138f0859 6541 { (eval echo "$as_me:6541: \"$ac_try\"") >&5
503d2be0
AS
6542 (eval $ac_try) 2>&5
6543 ac_status=$?
138f0859 6544 echo "$as_me:6544: \$? = $ac_status" >&5
503d2be0 6545 (exit $ac_status); }; }; then
ba4481b5
DL
6546 emacs_cv_x11_toolkit_version_6=yes
6547else
503d2be0
AS
6548 echo "$as_me: failed program was:" >&5
6549cat conftest.$ac_ext >&5
6550emacs_cv_x11_toolkit_version_6=no
ba4481b5 6551fi
503d2be0 6552rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5
DL
6553fi
6554
6555 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
6556 if test $emacs_cv_x11_toolkit_version_6 = yes; then
138f0859 6557 echo "$as_me:6557: result: 6 or newer" >&5
503d2be0
AS
6558echo "${ECHO_T}6 or newer" >&6
6559 cat >>confdefs.h <<\EOF
ba4481b5
DL
6560#define HAVE_X11XTR6 1
6561EOF
6562
6563 else
138f0859 6564 echo "$as_me:6564: result: before 6" >&5
503d2be0 6565echo "${ECHO_T}before 6" >&6
ba4481b5
DL
6566 fi
6567
6568 OLDLIBS="$LIBS"
6569 if test x$HAVE_X11XTR6 = xyes; then
6570 LIBS="-lXt -lSM -lICE $LIBS"
6571 else
6572 LIBS="-lXt $LIBS"
6573 fi
503d2be0 6574
138f0859 6575echo "$as_me:6575: checking for XmuConvertStandardSelection in -lXmu" >&5
503d2be0
AS
6576echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6
6577if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
6578 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6579else
503d2be0 6580 ac_check_lib_save_LIBS=$LIBS
ba4481b5 6581LIBS="-lXmu $LIBS"
503d2be0 6582cat >conftest.$ac_ext <<_ACEOF
138f0859 6583#line 6583 "configure"
ba4481b5 6584#include "confdefs.h"
503d2be0 6585
ba4481b5 6586/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6587#ifdef __cplusplus
6588extern "C"
6589#endif
ba4481b5 6590/* We use char because int might match the return type of a gcc2
503d2be0
AS
6591 builtin and then its argument prototype would still apply. */
6592char XmuConvertStandardSelection ();
6593int
6594main ()
6595{
6596XmuConvertStandardSelection ();
6597 ;
6598 return 0;
6599}
6600_ACEOF
6601rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 6602if { (eval echo "$as_me:6602: \"$ac_link\"") >&5
503d2be0
AS
6603 (eval $ac_link) 2>&5
6604 ac_status=$?
138f0859 6605 echo "$as_me:6605: \$? = $ac_status" >&5
503d2be0
AS
6606 (exit $ac_status); } &&
6607 { ac_try='test -s conftest$ac_exeext'
138f0859 6608 { (eval echo "$as_me:6608: \"$ac_try\"") >&5
503d2be0
AS
6609 (eval $ac_try) 2>&5
6610 ac_status=$?
138f0859 6611 echo "$as_me:6611: \$? = $ac_status" >&5
503d2be0
AS
6612 (exit $ac_status); }; }; then
6613 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
6614else
6615 echo "$as_me: failed program was:" >&5
6616cat conftest.$ac_ext >&5
6617ac_cv_lib_Xmu_XmuConvertStandardSelection=no
6618fi
6619rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6620LIBS=$ac_check_lib_save_LIBS
6621fi
138f0859 6622echo "$as_me:6622: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
503d2be0
AS
6623echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6
6624if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
6625 cat >>confdefs.h <<EOF
6626#define HAVE_LIBXMU 1
ba4481b5
DL
6627EOF
6628
6629 LIBS="-lXmu $LIBS"
6630
ba4481b5
DL
6631fi
6632
457b792c
GM
6633 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
6634fi
6635
6636# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
6637if test "${HAVE_X11}" = "yes"; then
6638 if test "${USE_X_TOOLKIT}" != "none"; then
503d2be0 6639
138f0859 6640echo "$as_me:6640: checking for XShapeQueryExtension in -lXext" >&5
503d2be0
AS
6641echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6
6642if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
6643 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 6644else
503d2be0 6645 ac_check_lib_save_LIBS=$LIBS
457b792c 6646LIBS="-lXext $LIBS"
503d2be0 6647cat >conftest.$ac_ext <<_ACEOF
138f0859 6648#line 6648 "configure"
457b792c 6649#include "confdefs.h"
503d2be0 6650
457b792c 6651/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6652#ifdef __cplusplus
6653extern "C"
6654#endif
457b792c 6655/* We use char because int might match the return type of a gcc2
503d2be0
AS
6656 builtin and then its argument prototype would still apply. */
6657char XShapeQueryExtension ();
6658int
6659main ()
6660{
6661XShapeQueryExtension ();
6662 ;
6663 return 0;
6664}
6665_ACEOF
6666rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 6667if { (eval echo "$as_me:6667: \"$ac_link\"") >&5
503d2be0
AS
6668 (eval $ac_link) 2>&5
6669 ac_status=$?
138f0859 6670 echo "$as_me:6670: \$? = $ac_status" >&5
503d2be0
AS
6671 (exit $ac_status); } &&
6672 { ac_try='test -s conftest$ac_exeext'
138f0859 6673 { (eval echo "$as_me:6673: \"$ac_try\"") >&5
503d2be0
AS
6674 (eval $ac_try) 2>&5
6675 ac_status=$?
138f0859 6676 echo "$as_me:6676: \$? = $ac_status" >&5
503d2be0
AS
6677 (exit $ac_status); }; }; then
6678 ac_cv_lib_Xext_XShapeQueryExtension=yes
6679else
6680 echo "$as_me: failed program was:" >&5
6681cat conftest.$ac_ext >&5
6682ac_cv_lib_Xext_XShapeQueryExtension=no
6683fi
6684rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6685LIBS=$ac_check_lib_save_LIBS
6686fi
138f0859 6687echo "$as_me:6687: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
503d2be0
AS
6688echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6
6689if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
6690 cat >>confdefs.h <<EOF
6691#define HAVE_LIBXEXT 1
457b792c
GM
6692EOF
6693
6694 LIBS="-lXext $LIBS"
6695
457b792c
GM
6696fi
6697
6698 fi
ba4481b5
DL
6699fi
6700
6701if test "${USE_X_TOOLKIT}" = "MOTIF"; then
138f0859 6702 echo "$as_me:6702: checking for Motif version 2.1" >&5
503d2be0
AS
6703echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6
6704if test "${emacs_cv_motif_version_2_1+set}" = set; then
6705 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6706else
503d2be0 6707 cat >conftest.$ac_ext <<_ACEOF
138f0859 6708#line 6708 "configure"
ba4481b5
DL
6709#include "confdefs.h"
6710#include <Xm/Xm.h>
503d2be0
AS
6711int
6712main ()
6713{
ba4481b5
DL
6714#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
6715int x = 5;
6716#else
6717Motif version prior to 2.1.
6718#endif
503d2be0
AS
6719 ;
6720 return 0;
6721}
6722_ACEOF
6723rm -f conftest.$ac_objext
138f0859 6724if { (eval echo "$as_me:6724: \"$ac_compile\"") >&5
503d2be0
AS
6725 (eval $ac_compile) 2>&5
6726 ac_status=$?
138f0859 6727 echo "$as_me:6727: \$? = $ac_status" >&5
503d2be0
AS
6728 (exit $ac_status); } &&
6729 { ac_try='test -s conftest.$ac_objext'
138f0859 6730 { (eval echo "$as_me:6730: \"$ac_try\"") >&5
503d2be0
AS
6731 (eval $ac_try) 2>&5
6732 ac_status=$?
138f0859 6733 echo "$as_me:6733: \$? = $ac_status" >&5
503d2be0 6734 (exit $ac_status); }; }; then
ba4481b5
DL
6735 emacs_cv_motif_version_2_1=yes
6736else
503d2be0
AS
6737 echo "$as_me: failed program was:" >&5
6738cat conftest.$ac_ext >&5
6739emacs_cv_motif_version_2_1=no
ba4481b5 6740fi
503d2be0 6741rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 6742fi
138f0859 6743echo "$as_me:6743: result: $emacs_cv_motif_version_2_1" >&5
503d2be0 6744echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6
ba4481b5
DL
6745 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
6746 if test $emacs_cv_motif_version_2_1 = yes; then
169fe44e 6747 HAVE_LIBXP=no
503d2be0 6748 cat >>confdefs.h <<\EOF
ba4481b5
DL
6749#define HAVE_MOTIF_2_1 1
6750EOF
6751
138f0859 6752 echo "$as_me:6752: checking for XpCreateContext in -lXp" >&5
503d2be0
AS
6753echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6
6754if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
6755 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6756else
503d2be0 6757 ac_check_lib_save_LIBS=$LIBS
457b792c 6758LIBS="-lXp $LIBS"
503d2be0 6759cat >conftest.$ac_ext <<_ACEOF
138f0859 6760#line 6760 "configure"
ba4481b5 6761#include "confdefs.h"
503d2be0 6762
ba4481b5 6763/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6764#ifdef __cplusplus
6765extern "C"
6766#endif
ba4481b5 6767/* We use char because int might match the return type of a gcc2
503d2be0
AS
6768 builtin and then its argument prototype would still apply. */
6769char XpCreateContext ();
6770int
6771main ()
6772{
6773XpCreateContext ();
6774 ;
6775 return 0;
6776}
6777_ACEOF
6778rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 6779if { (eval echo "$as_me:6779: \"$ac_link\"") >&5
503d2be0
AS
6780 (eval $ac_link) 2>&5
6781 ac_status=$?
138f0859 6782 echo "$as_me:6782: \$? = $ac_status" >&5
503d2be0
AS
6783 (exit $ac_status); } &&
6784 { ac_try='test -s conftest$ac_exeext'
138f0859 6785 { (eval echo "$as_me:6785: \"$ac_try\"") >&5
503d2be0
AS
6786 (eval $ac_try) 2>&5
6787 ac_status=$?
138f0859 6788 echo "$as_me:6788: \$? = $ac_status" >&5
503d2be0
AS
6789 (exit $ac_status); }; }; then
6790 ac_cv_lib_Xp_XpCreateContext=yes
6791else
6792 echo "$as_me: failed program was:" >&5
6793cat conftest.$ac_ext >&5
6794ac_cv_lib_Xp_XpCreateContext=no
6795fi
6796rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6797LIBS=$ac_check_lib_save_LIBS
6798fi
138f0859 6799echo "$as_me:6799: result: $ac_cv_lib_Xp_XpCreateContext" >&5
503d2be0
AS
6800echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6
6801if test $ac_cv_lib_Xp_XpCreateContext = yes; then
48d4b120 6802 HAVE_LIBXP=yes
ba4481b5
DL
6803fi
6804
48d4b120 6805 if test ${HAVE_LIBXP} = yes; then
503d2be0 6806 cat >>confdefs.h <<\EOF
48d4b120
DL
6807#define HAVE_LIBXP 1
6808EOF
6809
503d2be0 6810 fi
ba4481b5
DL
6811 fi
6812fi
6813
6814### Is -lXaw3d available?
6815HAVE_XAW3D=no
6816if test "${HAVE_X11}" = "yes"; then
6817 if test "${USE_X_TOOLKIT}" != "none"; then
138f0859 6818 echo "$as_me:6818: checking for X11/Xaw3d/Scrollbar.h" >&5
503d2be0
AS
6819echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6
6820if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
6821 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6822else
503d2be0 6823 cat >conftest.$ac_ext <<_ACEOF
138f0859 6824#line 6824 "configure"
ba4481b5
DL
6825#include "confdefs.h"
6826#include <X11/Xaw3d/Scrollbar.h>
503d2be0 6827_ACEOF
138f0859 6828if { (eval echo "$as_me:6828: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
6829 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6830 ac_status=$?
6831 egrep -v '^ *\+' conftest.er1 >conftest.err
6832 rm -f conftest.er1
6833 cat conftest.err >&5
138f0859 6834 echo "$as_me:6834: \$? = $ac_status" >&5
503d2be0
AS
6835 (exit $ac_status); } >/dev/null; then
6836 if test -s conftest.err; then
6837 ac_cpp_err=$ac_c_preproc_warn_flag
6838 else
6839 ac_cpp_err=
6840 fi
6841else
6842 ac_cpp_err=yes
6843fi
6844if test -z "$ac_cpp_err"; then
6845 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 6846else
503d2be0 6847 echo "$as_me: failed program was:" >&5
ba4481b5 6848 cat conftest.$ac_ext >&5
503d2be0 6849 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 6850fi
503d2be0 6851rm -f conftest.err conftest.$ac_ext
ba4481b5 6852fi
138f0859 6853echo "$as_me:6853: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
503d2be0
AS
6854echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6
6855if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
138f0859 6856 echo "$as_me:6856: checking for XawScrollbarSetThumb in -lXaw3d" >&5
503d2be0
AS
6857echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6
6858if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
6859 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6860else
503d2be0 6861 ac_check_lib_save_LIBS=$LIBS
457b792c 6862LIBS="-lXaw3d $LIBS"
503d2be0 6863cat >conftest.$ac_ext <<_ACEOF
138f0859 6864#line 6864 "configure"
ba4481b5 6865#include "confdefs.h"
503d2be0 6866
ba4481b5 6867/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6868#ifdef __cplusplus
6869extern "C"
6870#endif
ba4481b5 6871/* We use char because int might match the return type of a gcc2
503d2be0
AS
6872 builtin and then its argument prototype would still apply. */
6873char XawScrollbarSetThumb ();
6874int
6875main ()
6876{
6877XawScrollbarSetThumb ();
6878 ;
6879 return 0;
6880}
6881_ACEOF
6882rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 6883if { (eval echo "$as_me:6883: \"$ac_link\"") >&5
503d2be0
AS
6884 (eval $ac_link) 2>&5
6885 ac_status=$?
138f0859 6886 echo "$as_me:6886: \$? = $ac_status" >&5
503d2be0
AS
6887 (exit $ac_status); } &&
6888 { ac_try='test -s conftest$ac_exeext'
138f0859 6889 { (eval echo "$as_me:6889: \"$ac_try\"") >&5
503d2be0
AS
6890 (eval $ac_try) 2>&5
6891 ac_status=$?
138f0859 6892 echo "$as_me:6892: \$? = $ac_status" >&5
503d2be0
AS
6893 (exit $ac_status); }; }; then
6894 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
6895else
6896 echo "$as_me: failed program was:" >&5
6897cat conftest.$ac_ext >&5
6898ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
6899fi
6900rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6901LIBS=$ac_check_lib_save_LIBS
6902fi
138f0859 6903echo "$as_me:6903: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
503d2be0
AS
6904echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6
6905if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
ba4481b5 6906 HAVE_XAW3D=yes
ba4481b5
DL
6907fi
6908
ba4481b5
DL
6909fi
6910
ba4481b5 6911 if test "${HAVE_XAW3D}" = "yes"; then
503d2be0 6912 cat >>confdefs.h <<\EOF
ba4481b5
DL
6913#define HAVE_XAW3D 1
6914EOF
6915
6916 fi
6917 fi
6918fi
ba4481b5
DL
6919
6920USE_TOOLKIT_SCROLL_BARS=no
6921if test "${with_toolkit_scroll_bars}" != "no"; then
6922 if test "${USE_X_TOOLKIT}" != "none"; then
6923 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
503d2be0 6924 cat >>confdefs.h <<\EOF
ba4481b5
DL
6925#define USE_TOOLKIT_SCROLL_BARS 1
6926EOF
6927
6928 HAVE_XAW3D=no
6929 USE_TOOLKIT_SCROLL_BARS=yes
6930 elif test "${HAVE_XAW3D}" = "yes"; then
503d2be0 6931 cat >>confdefs.h <<\EOF
ba4481b5
DL
6932#define USE_TOOLKIT_SCROLL_BARS 1
6933EOF
6934
6935 USE_TOOLKIT_SCROLL_BARS=yes
6936 fi
6937 fi
6938fi
6939
1d36487c 6940if test "${with_xim}" != "no"; then
503d2be0 6941 cat >>confdefs.h <<\EOF
1d36487c
GM
6942#define USE_XIM 1
6943EOF
6944
6945fi
6946
ba4481b5
DL
6947### Use -lXpm if available, unless `--with-xpm=no'.
6948HAVE_XPM=no
6949if test "${HAVE_X11}" = "yes"; then
6950 if test "${with_xpm}" != "no"; then
138f0859 6951 echo "$as_me:6951: checking for X11/xpm.h" >&5
503d2be0
AS
6952echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
6953if test "${ac_cv_header_X11_xpm_h+set}" = set; then
6954 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6955else
503d2be0 6956 cat >conftest.$ac_ext <<_ACEOF
138f0859 6957#line 6957 "configure"
ba4481b5
DL
6958#include "confdefs.h"
6959#include <X11/xpm.h>
503d2be0 6960_ACEOF
138f0859 6961if { (eval echo "$as_me:6961: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
6962 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6963 ac_status=$?
6964 egrep -v '^ *\+' conftest.er1 >conftest.err
6965 rm -f conftest.er1
6966 cat conftest.err >&5
138f0859 6967 echo "$as_me:6967: \$? = $ac_status" >&5
503d2be0
AS
6968 (exit $ac_status); } >/dev/null; then
6969 if test -s conftest.err; then
6970 ac_cpp_err=$ac_c_preproc_warn_flag
6971 else
6972 ac_cpp_err=
6973 fi
6974else
6975 ac_cpp_err=yes
6976fi
6977if test -z "$ac_cpp_err"; then
6978 ac_cv_header_X11_xpm_h=yes
ba4481b5 6979else
503d2be0 6980 echo "$as_me: failed program was:" >&5
ba4481b5 6981 cat conftest.$ac_ext >&5
503d2be0 6982 ac_cv_header_X11_xpm_h=no
ba4481b5 6983fi
503d2be0 6984rm -f conftest.err conftest.$ac_ext
ba4481b5 6985fi
138f0859 6986echo "$as_me:6986: result: $ac_cv_header_X11_xpm_h" >&5
503d2be0
AS
6987echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
6988if test $ac_cv_header_X11_xpm_h = yes; then
138f0859 6989 echo "$as_me:6989: checking for XpmReadFileToPixmap in -lXpm" >&5
503d2be0
AS
6990echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6
6991if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
6992 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6993else
503d2be0 6994 ac_check_lib_save_LIBS=$LIBS
ba4481b5 6995LIBS="-lXpm -lX11 $LIBS"
503d2be0 6996cat >conftest.$ac_ext <<_ACEOF
138f0859 6997#line 6997 "configure"
ba4481b5 6998#include "confdefs.h"
503d2be0 6999
ba4481b5 7000/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7001#ifdef __cplusplus
7002extern "C"
7003#endif
ba4481b5 7004/* We use char because int might match the return type of a gcc2
503d2be0
AS
7005 builtin and then its argument prototype would still apply. */
7006char XpmReadFileToPixmap ();
7007int
7008main ()
7009{
7010XpmReadFileToPixmap ();
7011 ;
7012 return 0;
7013}
7014_ACEOF
7015rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 7016if { (eval echo "$as_me:7016: \"$ac_link\"") >&5
503d2be0
AS
7017 (eval $ac_link) 2>&5
7018 ac_status=$?
138f0859 7019 echo "$as_me:7019: \$? = $ac_status" >&5
503d2be0
AS
7020 (exit $ac_status); } &&
7021 { ac_try='test -s conftest$ac_exeext'
138f0859 7022 { (eval echo "$as_me:7022: \"$ac_try\"") >&5
503d2be0
AS
7023 (eval $ac_try) 2>&5
7024 ac_status=$?
138f0859 7025 echo "$as_me:7025: \$? = $ac_status" >&5
503d2be0
AS
7026 (exit $ac_status); }; }; then
7027 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
7028else
7029 echo "$as_me: failed program was:" >&5
7030cat conftest.$ac_ext >&5
7031ac_cv_lib_Xpm_XpmReadFileToPixmap=no
7032fi
7033rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7034LIBS=$ac_check_lib_save_LIBS
7035fi
138f0859 7036echo "$as_me:7036: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
503d2be0
AS
7037echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6
7038if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
ba4481b5 7039 HAVE_XPM=yes
ba4481b5
DL
7040fi
7041
ba4481b5
DL
7042fi
7043
4b92c49a 7044 if test "${HAVE_XPM}" = "yes"; then
138f0859 7045 echo "$as_me:7045: checking for XpmReturnAllocPixels preprocessor define" >&5
503d2be0
AS
7046echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6
7047 cat >conftest.$ac_ext <<_ACEOF
138f0859 7048#line 7048 "configure"
4b92c49a
GM
7049#include "confdefs.h"
7050#include "X11/xpm.h"
7051#ifndef XpmReturnAllocPixels
7052no_return_alloc_pixels
7053#endif
503d2be0
AS
7054
7055_ACEOF
4b92c49a
GM
7056if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7057 egrep "no_return_alloc_pixels" >/dev/null 2>&1; then
4b92c49a
GM
7058 HAVE_XPM=no
7059else
4b92c49a
GM
7060 HAVE_XPM=yes
7061fi
7062rm -f conftest*
7063
5721ae13 7064 if test "${HAVE_XPM}" = "yes"; then
138f0859 7065 echo "$as_me:7065: result: yes" >&5
503d2be0 7066echo "${ECHO_T}yes" >&6
5721ae13 7067 else
138f0859 7068 echo "$as_me:7068: result: no" >&5
503d2be0 7069echo "${ECHO_T}no" >&6
5721ae13 7070 fi
ff8df3be 7071 fi
ba4481b5
DL
7072 fi
7073
7074 if test "${HAVE_XPM}" = "yes"; then
503d2be0 7075 cat >>confdefs.h <<\EOF
ba4481b5
DL
7076#define HAVE_XPM 1
7077EOF
7078
7079 fi
7080fi
503d2be0 7081
ba4481b5
DL
7082### Use -ljpeg if available, unless `--with-jpeg=no'.
7083HAVE_JPEG=no
7084if test "${HAVE_X11}" = "yes"; then
7085 if test "${with_jpeg}" != "no"; then
138f0859 7086 echo "$as_me:7086: checking for jerror.h" >&5
503d2be0
AS
7087echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
7088if test "${ac_cv_header_jerror_h+set}" = set; then
7089 echo $ECHO_N "(cached) $ECHO_C" >&6
ffe36136 7090else
503d2be0 7091 cat >conftest.$ac_ext <<_ACEOF
138f0859 7092#line 7092 "configure"
ffe36136
GM
7093#include "confdefs.h"
7094#include <jerror.h>
503d2be0 7095_ACEOF
138f0859 7096if { (eval echo "$as_me:7096: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
7097 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7098 ac_status=$?
7099 egrep -v '^ *\+' conftest.er1 >conftest.err
7100 rm -f conftest.er1
7101 cat conftest.err >&5
138f0859 7102 echo "$as_me:7102: \$? = $ac_status" >&5
503d2be0
AS
7103 (exit $ac_status); } >/dev/null; then
7104 if test -s conftest.err; then
7105 ac_cpp_err=$ac_c_preproc_warn_flag
7106 else
7107 ac_cpp_err=
7108 fi
7109else
7110 ac_cpp_err=yes
7111fi
7112if test -z "$ac_cpp_err"; then
7113 ac_cv_header_jerror_h=yes
ffe36136 7114else
503d2be0 7115 echo "$as_me: failed program was:" >&5
ffe36136 7116 cat conftest.$ac_ext >&5
503d2be0 7117 ac_cv_header_jerror_h=no
ffe36136 7118fi
503d2be0 7119rm -f conftest.err conftest.$ac_ext
ffe36136 7120fi
138f0859 7121echo "$as_me:7121: result: $ac_cv_header_jerror_h" >&5
503d2be0
AS
7122echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
7123if test $ac_cv_header_jerror_h = yes; then
138f0859 7124 echo "$as_me:7124: checking for jpeg_destroy_compress in -ljpeg" >&5
503d2be0
AS
7125echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6
7126if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
7127 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7128else
503d2be0 7129 ac_check_lib_save_LIBS=$LIBS
457b792c 7130LIBS="-ljpeg $LIBS"
503d2be0 7131cat >conftest.$ac_ext <<_ACEOF
138f0859 7132#line 7132 "configure"
ba4481b5 7133#include "confdefs.h"
503d2be0 7134
ba4481b5 7135/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7136#ifdef __cplusplus
7137extern "C"
7138#endif
ba4481b5 7139/* We use char because int might match the return type of a gcc2
503d2be0
AS
7140 builtin and then its argument prototype would still apply. */
7141char jpeg_destroy_compress ();
7142int
7143main ()
7144{
7145jpeg_destroy_compress ();
7146 ;
7147 return 0;
7148}
7149_ACEOF
7150rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 7151if { (eval echo "$as_me:7151: \"$ac_link\"") >&5
503d2be0
AS
7152 (eval $ac_link) 2>&5
7153 ac_status=$?
138f0859 7154 echo "$as_me:7154: \$? = $ac_status" >&5
503d2be0
AS
7155 (exit $ac_status); } &&
7156 { ac_try='test -s conftest$ac_exeext'
138f0859 7157 { (eval echo "$as_me:7157: \"$ac_try\"") >&5
503d2be0
AS
7158 (eval $ac_try) 2>&5
7159 ac_status=$?
138f0859 7160 echo "$as_me:7160: \$? = $ac_status" >&5
503d2be0
AS
7161 (exit $ac_status); }; }; then
7162 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
7163else
7164 echo "$as_me: failed program was:" >&5
7165cat conftest.$ac_ext >&5
7166ac_cv_lib_jpeg_jpeg_destroy_compress=no
7167fi
7168rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7169LIBS=$ac_check_lib_save_LIBS
7170fi
138f0859 7171echo "$as_me:7171: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
503d2be0
AS
7172echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6
7173if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
ba4481b5 7174 HAVE_JPEG=yes
ffe36136
GM
7175fi
7176
ba4481b5
DL
7177fi
7178
ba4481b5
DL
7179 fi
7180
7181 if test "${HAVE_JPEG}" = "yes"; then
503d2be0 7182 cat >>confdefs.h <<\EOF
ba4481b5
DL
7183#define HAVE_JPEG 1
7184EOF
7185
7186 fi
7187fi
503d2be0 7188
ba4481b5
DL
7189### Use -lpng if available, unless `--with-png=no'.
7190HAVE_PNG=no
7191if test "${HAVE_X11}" = "yes"; then
7192 if test "${with_png}" != "no"; then
138f0859 7193 echo "$as_me:7193: checking for png.h" >&5
503d2be0
AS
7194echo $ECHO_N "checking for png.h... $ECHO_C" >&6
7195if test "${ac_cv_header_png_h+set}" = set; then
7196 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7197else
503d2be0 7198 cat >conftest.$ac_ext <<_ACEOF
138f0859 7199#line 7199 "configure"
ba4481b5
DL
7200#include "confdefs.h"
7201#include <png.h>
503d2be0 7202_ACEOF
138f0859 7203if { (eval echo "$as_me:7203: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
7204 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7205 ac_status=$?
7206 egrep -v '^ *\+' conftest.er1 >conftest.err
7207 rm -f conftest.er1
7208 cat conftest.err >&5
138f0859 7209 echo "$as_me:7209: \$? = $ac_status" >&5
503d2be0
AS
7210 (exit $ac_status); } >/dev/null; then
7211 if test -s conftest.err; then
7212 ac_cpp_err=$ac_c_preproc_warn_flag
7213 else
7214 ac_cpp_err=
7215 fi
7216else
7217 ac_cpp_err=yes
7218fi
7219if test -z "$ac_cpp_err"; then
7220 ac_cv_header_png_h=yes
ba4481b5 7221else
503d2be0 7222 echo "$as_me: failed program was:" >&5
ba4481b5 7223 cat conftest.$ac_ext >&5
503d2be0 7224 ac_cv_header_png_h=no
ba4481b5 7225fi
503d2be0 7226rm -f conftest.err conftest.$ac_ext
ba4481b5 7227fi
138f0859 7228echo "$as_me:7228: result: $ac_cv_header_png_h" >&5
503d2be0
AS
7229echo "${ECHO_T}$ac_cv_header_png_h" >&6
7230if test $ac_cv_header_png_h = yes; then
138f0859 7231 echo "$as_me:7231: checking for png_get_channels in -lpng" >&5
503d2be0
AS
7232echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6
7233if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
7234 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7235else
503d2be0 7236 ac_check_lib_save_LIBS=$LIBS
457b792c 7237LIBS="-lpng -lz -lm $LIBS"
503d2be0 7238cat >conftest.$ac_ext <<_ACEOF
138f0859 7239#line 7239 "configure"
ba4481b5 7240#include "confdefs.h"
503d2be0 7241
ba4481b5 7242/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7243#ifdef __cplusplus
7244extern "C"
7245#endif
ba4481b5 7246/* We use char because int might match the return type of a gcc2
503d2be0
AS
7247 builtin and then its argument prototype would still apply. */
7248char png_get_channels ();
7249int
7250main ()
7251{
7252png_get_channels ();
7253 ;
7254 return 0;
7255}
7256_ACEOF
7257rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 7258if { (eval echo "$as_me:7258: \"$ac_link\"") >&5
503d2be0
AS
7259 (eval $ac_link) 2>&5
7260 ac_status=$?
138f0859 7261 echo "$as_me:7261: \$? = $ac_status" >&5
503d2be0
AS
7262 (exit $ac_status); } &&
7263 { ac_try='test -s conftest$ac_exeext'
138f0859 7264 { (eval echo "$as_me:7264: \"$ac_try\"") >&5
503d2be0
AS
7265 (eval $ac_try) 2>&5
7266 ac_status=$?
138f0859 7267 echo "$as_me:7267: \$? = $ac_status" >&5
503d2be0
AS
7268 (exit $ac_status); }; }; then
7269 ac_cv_lib_png_png_get_channels=yes
7270else
7271 echo "$as_me: failed program was:" >&5
7272cat conftest.$ac_ext >&5
7273ac_cv_lib_png_png_get_channels=no
7274fi
7275rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7276LIBS=$ac_check_lib_save_LIBS
7277fi
138f0859 7278echo "$as_me:7278: result: $ac_cv_lib_png_png_get_channels" >&5
503d2be0
AS
7279echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6
7280if test $ac_cv_lib_png_png_get_channels = yes; then
ba4481b5 7281 HAVE_PNG=yes
ba4481b5
DL
7282fi
7283
ba4481b5
DL
7284fi
7285
ba4481b5
DL
7286 fi
7287
7288 if test "${HAVE_PNG}" = "yes"; then
503d2be0 7289 cat >>confdefs.h <<\EOF
ba4481b5
DL
7290#define HAVE_PNG 1
7291EOF
7292
7293 fi
7294fi
503d2be0 7295
ba4481b5
DL
7296### Use -ltiff if available, unless `--with-tiff=no'.
7297HAVE_TIFF=no
7298if test "${HAVE_X11}" = "yes"; then
7299 if test "${with_tiff}" != "no"; then
138f0859 7300 echo "$as_me:7300: checking for tiffio.h" >&5
503d2be0
AS
7301echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
7302if test "${ac_cv_header_tiffio_h+set}" = set; then
7303 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7304else
503d2be0 7305 cat >conftest.$ac_ext <<_ACEOF
138f0859 7306#line 7306 "configure"
ba4481b5
DL
7307#include "confdefs.h"
7308#include <tiffio.h>
503d2be0 7309_ACEOF
138f0859 7310if { (eval echo "$as_me:7310: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
7311 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7312 ac_status=$?
7313 egrep -v '^ *\+' conftest.er1 >conftest.err
7314 rm -f conftest.er1
7315 cat conftest.err >&5
138f0859 7316 echo "$as_me:7316: \$? = $ac_status" >&5
503d2be0
AS
7317 (exit $ac_status); } >/dev/null; then
7318 if test -s conftest.err; then
7319 ac_cpp_err=$ac_c_preproc_warn_flag
7320 else
7321 ac_cpp_err=
7322 fi
7323else
7324 ac_cpp_err=yes
7325fi
7326if test -z "$ac_cpp_err"; then
7327 ac_cv_header_tiffio_h=yes
ba4481b5 7328else
503d2be0 7329 echo "$as_me: failed program was:" >&5
ba4481b5 7330 cat conftest.$ac_ext >&5
503d2be0 7331 ac_cv_header_tiffio_h=no
ba4481b5 7332fi
503d2be0 7333rm -f conftest.err conftest.$ac_ext
ba4481b5 7334fi
138f0859 7335echo "$as_me:7335: result: $ac_cv_header_tiffio_h" >&5
503d2be0
AS
7336echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
7337if test $ac_cv_header_tiffio_h = yes; then
457b792c 7338 tifflibs="-lz -lm"
3b3cc4a4
KR
7339 # At least one tiff package requires the jpeg library.
7340 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
138f0859 7341 echo "$as_me:7341: checking for TIFFGetVersion in -ltiff" >&5
503d2be0
AS
7342echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6
7343if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
7344 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7345else
503d2be0 7346 ac_check_lib_save_LIBS=$LIBS
3b3cc4a4 7347LIBS="-ltiff $tifflibs $LIBS"
503d2be0 7348cat >conftest.$ac_ext <<_ACEOF
138f0859 7349#line 7349 "configure"
ba4481b5 7350#include "confdefs.h"
503d2be0 7351
ba4481b5 7352/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7353#ifdef __cplusplus
7354extern "C"
7355#endif
ba4481b5 7356/* We use char because int might match the return type of a gcc2
503d2be0
AS
7357 builtin and then its argument prototype would still apply. */
7358char TIFFGetVersion ();
7359int
7360main ()
7361{
7362TIFFGetVersion ();
7363 ;
7364 return 0;
7365}
7366_ACEOF
7367rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 7368if { (eval echo "$as_me:7368: \"$ac_link\"") >&5
503d2be0
AS
7369 (eval $ac_link) 2>&5
7370 ac_status=$?
138f0859 7371 echo "$as_me:7371: \$? = $ac_status" >&5
503d2be0
AS
7372 (exit $ac_status); } &&
7373 { ac_try='test -s conftest$ac_exeext'
138f0859 7374 { (eval echo "$as_me:7374: \"$ac_try\"") >&5
503d2be0
AS
7375 (eval $ac_try) 2>&5
7376 ac_status=$?
138f0859 7377 echo "$as_me:7377: \$? = $ac_status" >&5
503d2be0
AS
7378 (exit $ac_status); }; }; then
7379 ac_cv_lib_tiff_TIFFGetVersion=yes
7380else
7381 echo "$as_me: failed program was:" >&5
7382cat conftest.$ac_ext >&5
7383ac_cv_lib_tiff_TIFFGetVersion=no
7384fi
7385rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7386LIBS=$ac_check_lib_save_LIBS
7387fi
138f0859 7388echo "$as_me:7388: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
503d2be0
AS
7389echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6
7390if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
ba4481b5 7391 HAVE_TIFF=yes
ba4481b5
DL
7392fi
7393
ba4481b5
DL
7394fi
7395
ba4481b5
DL
7396 fi
7397
7398 if test "${HAVE_TIFF}" = "yes"; then
503d2be0 7399 cat >>confdefs.h <<\EOF
ba4481b5
DL
7400#define HAVE_TIFF 1
7401EOF
7402
7403 fi
7404fi
503d2be0 7405
ba4481b5
DL
7406### Use -lgif if available, unless `--with-gif=no'.
7407HAVE_GIF=no
7408if test "${HAVE_X11}" = "yes"; then
7409 if test "${with_gif}" != "no"; then
138f0859 7410 echo "$as_me:7410: checking for gif_lib.h" >&5
503d2be0
AS
7411echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
7412if test "${ac_cv_header_gif_lib_h+set}" = set; then
7413 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7414else
503d2be0 7415 cat >conftest.$ac_ext <<_ACEOF
138f0859 7416#line 7416 "configure"
ba4481b5
DL
7417#include "confdefs.h"
7418#include <gif_lib.h>
503d2be0 7419_ACEOF
138f0859 7420if { (eval echo "$as_me:7420: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
7421 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7422 ac_status=$?
7423 egrep -v '^ *\+' conftest.er1 >conftest.err
7424 rm -f conftest.er1
7425 cat conftest.err >&5
138f0859 7426 echo "$as_me:7426: \$? = $ac_status" >&5
503d2be0
AS
7427 (exit $ac_status); } >/dev/null; then
7428 if test -s conftest.err; then
7429 ac_cpp_err=$ac_c_preproc_warn_flag
7430 else
7431 ac_cpp_err=
7432 fi
7433else
7434 ac_cpp_err=yes
7435fi
7436if test -z "$ac_cpp_err"; then
7437 ac_cv_header_gif_lib_h=yes
ba4481b5 7438else
503d2be0 7439 echo "$as_me: failed program was:" >&5
ba4481b5 7440 cat conftest.$ac_ext >&5
503d2be0 7441 ac_cv_header_gif_lib_h=no
ba4481b5 7442fi
503d2be0 7443rm -f conftest.err conftest.$ac_ext
ba4481b5 7444fi
138f0859 7445echo "$as_me:7445: result: $ac_cv_header_gif_lib_h" >&5
503d2be0
AS
7446echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
7447if test $ac_cv_header_gif_lib_h = yes; then
138f0859 7448 echo "$as_me:7448: checking for DGifOpen in -lungif" >&5
503d2be0
AS
7449echo $ECHO_N "checking for DGifOpen in -lungif... $ECHO_C" >&6
7450if test "${ac_cv_lib_ungif_DGifOpen+set}" = set; then
7451 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7452else
503d2be0 7453 ac_check_lib_save_LIBS=$LIBS
457b792c 7454LIBS="-lungif $LIBS"
503d2be0 7455cat >conftest.$ac_ext <<_ACEOF
138f0859 7456#line 7456 "configure"
ba4481b5 7457#include "confdefs.h"
503d2be0 7458
ba4481b5 7459/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7460#ifdef __cplusplus
7461extern "C"
7462#endif
ba4481b5 7463/* We use char because int might match the return type of a gcc2
503d2be0
AS
7464 builtin and then its argument prototype would still apply. */
7465char DGifOpen ();
7466int
7467main ()
7468{
7469DGifOpen ();
7470 ;
7471 return 0;
7472}
7473_ACEOF
7474rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 7475if { (eval echo "$as_me:7475: \"$ac_link\"") >&5
503d2be0
AS
7476 (eval $ac_link) 2>&5
7477 ac_status=$?
138f0859 7478 echo "$as_me:7478: \$? = $ac_status" >&5
503d2be0
AS
7479 (exit $ac_status); } &&
7480 { ac_try='test -s conftest$ac_exeext'
138f0859 7481 { (eval echo "$as_me:7481: \"$ac_try\"") >&5
503d2be0
AS
7482 (eval $ac_try) 2>&5
7483 ac_status=$?
138f0859 7484 echo "$as_me:7484: \$? = $ac_status" >&5
503d2be0
AS
7485 (exit $ac_status); }; }; then
7486 ac_cv_lib_ungif_DGifOpen=yes
7487else
7488 echo "$as_me: failed program was:" >&5
7489cat conftest.$ac_ext >&5
7490ac_cv_lib_ungif_DGifOpen=no
7491fi
7492rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7493LIBS=$ac_check_lib_save_LIBS
7494fi
138f0859 7495echo "$as_me:7495: result: $ac_cv_lib_ungif_DGifOpen" >&5
503d2be0
AS
7496echo "${ECHO_T}$ac_cv_lib_ungif_DGifOpen" >&6
7497if test $ac_cv_lib_ungif_DGifOpen = yes; then
ba4481b5 7498 HAVE_GIF=yes
ba4481b5
DL
7499fi
7500
ba4481b5
DL
7501fi
7502
ba4481b5
DL
7503 fi
7504
7505 if test "${HAVE_GIF}" = "yes"; then
503d2be0 7506 cat >>confdefs.h <<\EOF
ba4481b5
DL
7507#define HAVE_GIF 1
7508EOF
7509
7510 fi
7511fi
7512
7513# If netdb.h doesn't declare h_errno, we must declare it by hand.
138f0859 7514echo "$as_me:7514: checking whether netdb declares h_errno" >&5
503d2be0
AS
7515echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6
7516if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
7517 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7518else
503d2be0 7519 cat >conftest.$ac_ext <<_ACEOF
138f0859 7520#line 7520 "configure"
ba4481b5
DL
7521#include "confdefs.h"
7522#include <netdb.h>
503d2be0
AS
7523int
7524main ()
7525{
ba4481b5 7526return h_errno;
503d2be0
AS
7527 ;
7528 return 0;
7529}
7530_ACEOF
7531rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 7532if { (eval echo "$as_me:7532: \"$ac_link\"") >&5
503d2be0
AS
7533 (eval $ac_link) 2>&5
7534 ac_status=$?
138f0859 7535 echo "$as_me:7535: \$? = $ac_status" >&5
503d2be0
AS
7536 (exit $ac_status); } &&
7537 { ac_try='test -s conftest$ac_exeext'
138f0859 7538 { (eval echo "$as_me:7538: \"$ac_try\"") >&5
503d2be0
AS
7539 (eval $ac_try) 2>&5
7540 ac_status=$?
138f0859 7541 echo "$as_me:7541: \$? = $ac_status" >&5
503d2be0 7542 (exit $ac_status); }; }; then
ba4481b5
DL
7543 emacs_cv_netdb_declares_h_errno=yes
7544else
503d2be0
AS
7545 echo "$as_me: failed program was:" >&5
7546cat conftest.$ac_ext >&5
7547emacs_cv_netdb_declares_h_errno=no
ba4481b5 7548fi
503d2be0 7549rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 7550fi
138f0859 7551echo "$as_me:7551: result: $emacs_cv_netdb_declares_h_errno" >&5
503d2be0 7552echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6
ba4481b5 7553if test $emacs_cv_netdb_declares_h_errno = yes; then
503d2be0 7554 cat >>confdefs.h <<\EOF
ba4481b5
DL
7555#define HAVE_H_ERRNO 1
7556EOF
7557
7558fi
7559
7560# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7561# for constant arguments. Useless!
138f0859 7562echo "$as_me:7562: checking for working alloca.h" >&5
503d2be0
AS
7563echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
7564if test "${ac_cv_working_alloca_h+set}" = set; then
7565 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7566else
503d2be0 7567 cat >conftest.$ac_ext <<_ACEOF
138f0859 7568#line 7568 "configure"
ba4481b5
DL
7569#include "confdefs.h"
7570#include <alloca.h>
503d2be0
AS
7571int
7572main ()
7573{
7574char *p = (char *) alloca (2 * sizeof (int));
7575 ;
7576 return 0;
7577}
7578_ACEOF
7579rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 7580if { (eval echo "$as_me:7580: \"$ac_link\"") >&5
503d2be0
AS
7581 (eval $ac_link) 2>&5
7582 ac_status=$?
138f0859 7583 echo "$as_me:7583: \$? = $ac_status" >&5
503d2be0
AS
7584 (exit $ac_status); } &&
7585 { ac_try='test -s conftest$ac_exeext'
138f0859 7586 { (eval echo "$as_me:7586: \"$ac_try\"") >&5
503d2be0
AS
7587 (eval $ac_try) 2>&5
7588 ac_status=$?
138f0859 7589 echo "$as_me:7589: \$? = $ac_status" >&5
503d2be0
AS
7590 (exit $ac_status); }; }; then
7591 ac_cv_working_alloca_h=yes
7592else
7593 echo "$as_me: failed program was:" >&5
7594cat conftest.$ac_ext >&5
7595ac_cv_working_alloca_h=no
7596fi
7597rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7598fi
138f0859 7599echo "$as_me:7599: result: $ac_cv_working_alloca_h" >&5
503d2be0
AS
7600echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
7601if test $ac_cv_working_alloca_h = yes; then
7602
7603cat >>confdefs.h <<\EOF
ba4481b5
DL
7604#define HAVE_ALLOCA_H 1
7605EOF
7606
7607fi
7608
138f0859 7609echo "$as_me:7609: checking for alloca" >&5
503d2be0
AS
7610echo $ECHO_N "checking for alloca... $ECHO_C" >&6
7611if test "${ac_cv_func_alloca_works+set}" = set; then
7612 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7613else
503d2be0 7614 cat >conftest.$ac_ext <<_ACEOF
138f0859 7615#line 7615 "configure"
ba4481b5 7616#include "confdefs.h"
ba4481b5
DL
7617#ifdef __GNUC__
7618# define alloca __builtin_alloca
7619#else
c4bb2108
DL
7620# ifdef _MSC_VER
7621# include <malloc.h>
7622# define alloca _alloca
ba4481b5 7623# else
c4bb2108
DL
7624# if HAVE_ALLOCA_H
7625# include <alloca.h>
22afa6e8 7626# else
c4bb2108
DL
7627# ifdef _AIX
7628 #pragma alloca
7629# else
7630# ifndef alloca /* predefined by HP cc +Olibcalls */
ba4481b5 7631char *alloca ();
c4bb2108 7632# endif
ba4481b5
DL
7633# endif
7634# endif
7635# endif
7636#endif
7637
503d2be0
AS
7638int
7639main ()
7640{
7641char *p = (char *) alloca (1);
7642 ;
7643 return 0;
7644}
7645_ACEOF
7646rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 7647if { (eval echo "$as_me:7647: \"$ac_link\"") >&5
503d2be0
AS
7648 (eval $ac_link) 2>&5
7649 ac_status=$?
138f0859 7650 echo "$as_me:7650: \$? = $ac_status" >&5
503d2be0
AS
7651 (exit $ac_status); } &&
7652 { ac_try='test -s conftest$ac_exeext'
138f0859 7653 { (eval echo "$as_me:7653: \"$ac_try\"") >&5
503d2be0
AS
7654 (eval $ac_try) 2>&5
7655 ac_status=$?
138f0859 7656 echo "$as_me:7656: \$? = $ac_status" >&5
503d2be0 7657 (exit $ac_status); }; }; then
ba4481b5
DL
7658 ac_cv_func_alloca_works=yes
7659else
503d2be0
AS
7660 echo "$as_me: failed program was:" >&5
7661cat conftest.$ac_ext >&5
7662ac_cv_func_alloca_works=no
ba4481b5 7663fi
503d2be0 7664rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 7665fi
138f0859 7666echo "$as_me:7666: result: $ac_cv_func_alloca_works" >&5
503d2be0 7667echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
ba4481b5 7668
ba4481b5 7669if test $ac_cv_func_alloca_works = yes; then
503d2be0
AS
7670
7671cat >>confdefs.h <<\EOF
ba4481b5
DL
7672#define HAVE_ALLOCA 1
7673EOF
7674
503d2be0 7675else
ba4481b5 7676 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
503d2be0
AS
7677# that cause trouble. Some versions do not even contain alloca or
7678# contain a buggy version. If you still want to use their alloca,
7679# use ar to extract alloca.o from them instead of compiling alloca.c.
7680
7681ALLOCA=alloca.$ac_objext
7682
7683cat >>confdefs.h <<\EOF
ba4481b5
DL
7684#define C_ALLOCA 1
7685EOF
7686
138f0859 7687echo "$as_me:7687: checking whether \`alloca.c' needs Cray hooks" >&5
503d2be0
AS
7688echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
7689if test "${ac_cv_os_cray+set}" = set; then
7690 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7691else
503d2be0 7692 cat >conftest.$ac_ext <<_ACEOF
138f0859 7693#line 7693 "configure"
ba4481b5
DL
7694#include "confdefs.h"
7695#if defined(CRAY) && ! defined(CRAY2)
7696webecray
7697#else
7698wenotbecray
7699#endif
7700
503d2be0 7701_ACEOF
ba4481b5
DL
7702if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7703 egrep "webecray" >/dev/null 2>&1; then
ba4481b5
DL
7704 ac_cv_os_cray=yes
7705else
ba4481b5
DL
7706 ac_cv_os_cray=no
7707fi
7708rm -f conftest*
7709
7710fi
138f0859 7711echo "$as_me:7711: result: $ac_cv_os_cray" >&5
503d2be0 7712echo "${ECHO_T}$ac_cv_os_cray" >&6
ba4481b5 7713if test $ac_cv_os_cray = yes; then
503d2be0
AS
7714 for ac_func in _getb67 GETB67 getb67; do
7715 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
138f0859 7716echo "$as_me:7716: checking for $ac_func" >&5
503d2be0
AS
7717echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7718if eval "test \"\${$as_ac_var+set}\" = set"; then
7719 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7720else
503d2be0 7721 cat >conftest.$ac_ext <<_ACEOF
138f0859 7722#line 7722 "configure"
ba4481b5
DL
7723#include "confdefs.h"
7724/* System header to define __stub macros and hopefully few prototypes,
503d2be0 7725 which can conflict with char $ac_func (); below. */
ba4481b5
DL
7726#include <assert.h>
7727/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7728#ifdef __cplusplus
7729extern "C"
7730#endif
ba4481b5 7731/* We use char because int might match the return type of a gcc2
503d2be0
AS
7732 builtin and then its argument prototype would still apply. */
7733char $ac_func ();
7734char (*f) ();
ba4481b5 7735
503d2be0
AS
7736int
7737main ()
7738{
ba4481b5
DL
7739/* The GNU C library defines this for functions which it implements
7740 to always fail with ENOSYS. Some functions are actually named
7741 something starting with __ and the normal name is an alias. */
7742#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7743choke me
7744#else
503d2be0 7745f = $ac_func;
ba4481b5
DL
7746#endif
7747
503d2be0
AS
7748 ;
7749 return 0;
7750}
7751_ACEOF
7752rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 7753if { (eval echo "$as_me:7753: \"$ac_link\"") >&5
503d2be0
AS
7754 (eval $ac_link) 2>&5
7755 ac_status=$?
138f0859 7756 echo "$as_me:7756: \$? = $ac_status" >&5
503d2be0
AS
7757 (exit $ac_status); } &&
7758 { ac_try='test -s conftest$ac_exeext'
138f0859 7759 { (eval echo "$as_me:7759: \"$ac_try\"") >&5
503d2be0
AS
7760 (eval $ac_try) 2>&5
7761 ac_status=$?
138f0859 7762 echo "$as_me:7762: \$? = $ac_status" >&5
503d2be0
AS
7763 (exit $ac_status); }; }; then
7764 eval "$as_ac_var=yes"
7765else
7766 echo "$as_me: failed program was:" >&5
7767cat conftest.$ac_ext >&5
7768eval "$as_ac_var=no"
7769fi
7770rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7771fi
138f0859 7772echo "$as_me:7772: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
7773echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7774if test `eval echo '${'$as_ac_var'}'` = yes; then
7775
7776cat >>confdefs.h <<EOF
ba4481b5
DL
7777#define CRAY_STACKSEG_END $ac_func
7778EOF
7779
503d2be0 7780 break
ba4481b5
DL
7781fi
7782
503d2be0 7783 done
ba4481b5
DL
7784fi
7785
138f0859 7786echo "$as_me:7786: checking stack direction for C alloca" >&5
503d2be0
AS
7787echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
7788if test "${ac_cv_c_stack_direction+set}" = set; then
7789 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
7790else
7791 if test "$cross_compiling" = yes; then
7792 ac_cv_c_stack_direction=0
7793else
503d2be0 7794 cat >conftest.$ac_ext <<_ACEOF
138f0859 7795#line 7795 "configure"
ba4481b5 7796#include "confdefs.h"
503d2be0 7797int
ba4481b5
DL
7798find_stack_direction ()
7799{
7800 static char *addr = 0;
7801 auto char dummy;
7802 if (addr == 0)
7803 {
7804 addr = &dummy;
7805 return find_stack_direction ();
7806 }
7807 else
7808 return (&dummy > addr) ? 1 : -1;
7809}
503d2be0
AS
7810
7811int
ba4481b5
DL
7812main ()
7813{
503d2be0 7814 exit (find_stack_direction () < 0);
ba4481b5 7815}
503d2be0
AS
7816_ACEOF
7817rm -f conftest$ac_exeext
138f0859 7818if { (eval echo "$as_me:7818: \"$ac_link\"") >&5
503d2be0
AS
7819 (eval $ac_link) 2>&5
7820 ac_status=$?
138f0859 7821 echo "$as_me:7821: \$? = $ac_status" >&5
503d2be0 7822 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
138f0859 7823 { (eval echo "$as_me:7823: \"$ac_try\"") >&5
503d2be0
AS
7824 (eval $ac_try) 2>&5
7825 ac_status=$?
138f0859 7826 echo "$as_me:7826: \$? = $ac_status" >&5
503d2be0 7827 (exit $ac_status); }; }; then
ba4481b5
DL
7828 ac_cv_c_stack_direction=1
7829else
503d2be0
AS
7830 echo "$as_me: program exited with status $ac_status" >&5
7831echo "$as_me: failed program was:" >&5
7832cat conftest.$ac_ext >&5
7833ac_cv_c_stack_direction=-1
ba4481b5 7834fi
503d2be0 7835rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 7836fi
ba4481b5 7837fi
138f0859 7838echo "$as_me:7838: result: $ac_cv_c_stack_direction" >&5
503d2be0 7839echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
ba4481b5 7840
503d2be0 7841cat >>confdefs.h <<EOF
ba4481b5
DL
7842#define STACK_DIRECTION $ac_cv_c_stack_direction
7843EOF
7844
7845fi
7846
ba4481b5
DL
7847# fmod, logb, and frexp are found in -lm on most systems.
7848# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
503d2be0 7849
138f0859 7850echo "$as_me:7850: checking for sqrt in -lm" >&5
503d2be0
AS
7851echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
7852if test "${ac_cv_lib_m_sqrt+set}" = set; then
7853 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7854else
503d2be0 7855 ac_check_lib_save_LIBS=$LIBS
ba4481b5 7856LIBS="-lm $LIBS"
503d2be0 7857cat >conftest.$ac_ext <<_ACEOF
138f0859 7858#line 7858 "configure"
ba4481b5 7859#include "confdefs.h"
503d2be0 7860
ba4481b5 7861/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7862#ifdef __cplusplus
7863extern "C"
7864#endif
ba4481b5 7865/* We use char because int might match the return type of a gcc2
503d2be0
AS
7866 builtin and then its argument prototype would still apply. */
7867char sqrt ();
7868int
7869main ()
7870{
7871sqrt ();
7872 ;
7873 return 0;
7874}
7875_ACEOF
7876rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 7877if { (eval echo "$as_me:7877: \"$ac_link\"") >&5
503d2be0
AS
7878 (eval $ac_link) 2>&5
7879 ac_status=$?
138f0859 7880 echo "$as_me:7880: \$? = $ac_status" >&5
503d2be0
AS
7881 (exit $ac_status); } &&
7882 { ac_try='test -s conftest$ac_exeext'
138f0859 7883 { (eval echo "$as_me:7883: \"$ac_try\"") >&5
503d2be0
AS
7884 (eval $ac_try) 2>&5
7885 ac_status=$?
138f0859 7886 echo "$as_me:7886: \$? = $ac_status" >&5
503d2be0
AS
7887 (exit $ac_status); }; }; then
7888 ac_cv_lib_m_sqrt=yes
7889else
7890 echo "$as_me: failed program was:" >&5
7891cat conftest.$ac_ext >&5
7892ac_cv_lib_m_sqrt=no
7893fi
7894rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7895LIBS=$ac_check_lib_save_LIBS
7896fi
138f0859 7897echo "$as_me:7897: result: $ac_cv_lib_m_sqrt" >&5
503d2be0
AS
7898echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
7899if test $ac_cv_lib_m_sqrt = yes; then
7900 cat >>confdefs.h <<EOF
7901#define HAVE_LIBM 1
ba4481b5
DL
7902EOF
7903
7904 LIBS="-lm $LIBS"
7905
ba4481b5
DL
7906fi
7907
ba4481b5 7908# Check for mail-locking functions in a "mail" library
503d2be0 7909
138f0859 7910echo "$as_me:7910: checking for maillock in -lmail" >&5
503d2be0
AS
7911echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6
7912if test "${ac_cv_lib_mail_maillock+set}" = set; then
7913 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7914else
503d2be0 7915 ac_check_lib_save_LIBS=$LIBS
ba4481b5 7916LIBS="-lmail $LIBS"
503d2be0 7917cat >conftest.$ac_ext <<_ACEOF
138f0859 7918#line 7918 "configure"
ba4481b5 7919#include "confdefs.h"
503d2be0 7920
ba4481b5 7921/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7922#ifdef __cplusplus
7923extern "C"
7924#endif
ba4481b5 7925/* We use char because int might match the return type of a gcc2
503d2be0
AS
7926 builtin and then its argument prototype would still apply. */
7927char maillock ();
7928int
7929main ()
7930{
7931maillock ();
7932 ;
7933 return 0;
7934}
7935_ACEOF
7936rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 7937if { (eval echo "$as_me:7937: \"$ac_link\"") >&5
503d2be0
AS
7938 (eval $ac_link) 2>&5
7939 ac_status=$?
138f0859 7940 echo "$as_me:7940: \$? = $ac_status" >&5
503d2be0
AS
7941 (exit $ac_status); } &&
7942 { ac_try='test -s conftest$ac_exeext'
138f0859 7943 { (eval echo "$as_me:7943: \"$ac_try\"") >&5
503d2be0
AS
7944 (eval $ac_try) 2>&5
7945 ac_status=$?
138f0859 7946 echo "$as_me:7946: \$? = $ac_status" >&5
503d2be0
AS
7947 (exit $ac_status); }; }; then
7948 ac_cv_lib_mail_maillock=yes
7949else
7950 echo "$as_me: failed program was:" >&5
7951cat conftest.$ac_ext >&5
7952ac_cv_lib_mail_maillock=no
7953fi
7954rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7955LIBS=$ac_check_lib_save_LIBS
7956fi
138f0859 7957echo "$as_me:7957: result: $ac_cv_lib_mail_maillock" >&5
503d2be0
AS
7958echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6
7959if test $ac_cv_lib_mail_maillock = yes; then
7960 cat >>confdefs.h <<EOF
7961#define HAVE_LIBMAIL 1
ba4481b5
DL
7962EOF
7963
7964 LIBS="-lmail $LIBS"
7965
ba4481b5
DL
7966fi
7967
138f0859 7968echo "$as_me:7968: checking for maillock in -llockfile" >&5
503d2be0
AS
7969echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6
7970if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
7971 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7972else
503d2be0 7973 ac_check_lib_save_LIBS=$LIBS
ba4481b5 7974LIBS="-llockfile $LIBS"
503d2be0 7975cat >conftest.$ac_ext <<_ACEOF
138f0859 7976#line 7976 "configure"
ba4481b5 7977#include "confdefs.h"
503d2be0 7978
ba4481b5 7979/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7980#ifdef __cplusplus
7981extern "C"
7982#endif
ba4481b5 7983/* We use char because int might match the return type of a gcc2
503d2be0
AS
7984 builtin and then its argument prototype would still apply. */
7985char maillock ();
7986int
7987main ()
7988{
7989maillock ();
7990 ;
7991 return 0;
7992}
7993_ACEOF
7994rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 7995if { (eval echo "$as_me:7995: \"$ac_link\"") >&5
503d2be0
AS
7996 (eval $ac_link) 2>&5
7997 ac_status=$?
138f0859 7998 echo "$as_me:7998: \$? = $ac_status" >&5
503d2be0
AS
7999 (exit $ac_status); } &&
8000 { ac_try='test -s conftest$ac_exeext'
138f0859 8001 { (eval echo "$as_me:8001: \"$ac_try\"") >&5
503d2be0
AS
8002 (eval $ac_try) 2>&5
8003 ac_status=$?
138f0859 8004 echo "$as_me:8004: \$? = $ac_status" >&5
503d2be0
AS
8005 (exit $ac_status); }; }; then
8006 ac_cv_lib_lockfile_maillock=yes
8007else
8008 echo "$as_me: failed program was:" >&5
8009cat conftest.$ac_ext >&5
8010ac_cv_lib_lockfile_maillock=no
8011fi
8012rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8013LIBS=$ac_check_lib_save_LIBS
8014fi
138f0859 8015echo "$as_me:8015: result: $ac_cv_lib_lockfile_maillock" >&5
503d2be0
AS
8016echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6
8017if test $ac_cv_lib_lockfile_maillock = yes; then
8018 cat >>confdefs.h <<EOF
8019#define HAVE_LIBLOCKFILE 1
ba4481b5
DL
8020EOF
8021
8022 LIBS="-llockfile $LIBS"
8023
ba4481b5
DL
8024fi
8025
8026# If we have the shared liblockfile, assume we must use it for mail
8027# locking (e.g. Debian). If we couldn't link against liblockfile
8028# (no liblockfile.a installed), ensure that we don't need to.
8029if test "$ac_cv_lib_lockfile_maillock" = no; then
8030 # Extract the first word of "liblockfile.so", so it can be a program name with args.
8031set dummy liblockfile.so; ac_word=$2
138f0859 8032echo "$as_me:8032: checking for $ac_word" >&5
503d2be0
AS
8033echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8034if test "${ac_cv_prog_liblockfile+set}" = set; then
8035 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
8036else
8037 if test -n "$liblockfile"; then
8038 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
8039else
503d2be0
AS
8040 ac_save_IFS=$IFS; IFS=$ac_path_separator
8041ac_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
8042for ac_dir in $ac_dummy; do
8043 IFS=$ac_save_IFS
8044 test -z "$ac_dir" && ac_dir=.
8045 $as_executable_p "$ac_dir/$ac_word" || continue
8046ac_cv_prog_liblockfile="yes"
138f0859 8047echo "$as_me:8047: found $ac_dir/$ac_word" >&5
503d2be0
AS
8048break
8049done
8050
ba4481b5
DL
8051 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
8052fi
8053fi
503d2be0 8054liblockfile=$ac_cv_prog_liblockfile
ba4481b5 8055if test -n "$liblockfile"; then
138f0859 8056 echo "$as_me:8056: result: $liblockfile" >&5
503d2be0 8057echo "${ECHO_T}$liblockfile" >&6
ba4481b5 8058else
138f0859 8059 echo "$as_me:8059: result: no" >&5
503d2be0 8060echo "${ECHO_T}no" >&6
ba4481b5
DL
8061fi
8062
8063 if test $ac_cv_prog_liblockfile = yes; then
138f0859 8064 { { echo "$as_me:8064: error: Shared liblockfile found but can't link against it.
503d2be0
AS
8065This probably means that movemail could lose mail.
8066There may be a \`development' package to install containing liblockfile." >&5
8067echo "$as_me: error: Shared liblockfile found but can't link against it.
ba4481b5 8068This probably means that movemail could lose mail.
503d2be0
AS
8069There may be a \`development' package to install containing liblockfile." >&2;}
8070 { (exit 1); exit 1; }; }
8071 else cat >>confdefs.h <<\EOF
ba4481b5
DL
8072#define LIBMAIL -llockfile
8073EOF
8074
8075 fi
8076 else :
8077fi
503d2be0 8078
ba4481b5
DL
8079for ac_func in touchlock
8080do
503d2be0 8081as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
138f0859 8082echo "$as_me:8082: checking for $ac_func" >&5
503d2be0
AS
8083echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8084if eval "test \"\${$as_ac_var+set}\" = set"; then
8085 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8086else
503d2be0 8087 cat >conftest.$ac_ext <<_ACEOF
138f0859 8088#line 8088 "configure"
ba4481b5
DL
8089#include "confdefs.h"
8090/* System header to define __stub macros and hopefully few prototypes,
503d2be0 8091 which can conflict with char $ac_func (); below. */
ba4481b5
DL
8092#include <assert.h>
8093/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8094#ifdef __cplusplus
8095extern "C"
8096#endif
ba4481b5 8097/* We use char because int might match the return type of a gcc2
503d2be0
AS
8098 builtin and then its argument prototype would still apply. */
8099char $ac_func ();
8100char (*f) ();
ba4481b5 8101
503d2be0
AS
8102int
8103main ()
8104{
ba4481b5
DL
8105/* The GNU C library defines this for functions which it implements
8106 to always fail with ENOSYS. Some functions are actually named
8107 something starting with __ and the normal name is an alias. */
8108#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8109choke me
8110#else
503d2be0 8111f = $ac_func;
ba4481b5
DL
8112#endif
8113
503d2be0
AS
8114 ;
8115 return 0;
8116}
8117_ACEOF
8118rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 8119if { (eval echo "$as_me:8119: \"$ac_link\"") >&5
503d2be0
AS
8120 (eval $ac_link) 2>&5
8121 ac_status=$?
138f0859 8122 echo "$as_me:8122: \$? = $ac_status" >&5
503d2be0
AS
8123 (exit $ac_status); } &&
8124 { ac_try='test -s conftest$ac_exeext'
138f0859 8125 { (eval echo "$as_me:8125: \"$ac_try\"") >&5
503d2be0
AS
8126 (eval $ac_try) 2>&5
8127 ac_status=$?
138f0859 8128 echo "$as_me:8128: \$? = $ac_status" >&5
503d2be0
AS
8129 (exit $ac_status); }; }; then
8130 eval "$as_ac_var=yes"
8131else
8132 echo "$as_me: failed program was:" >&5
8133cat conftest.$ac_ext >&5
8134eval "$as_ac_var=no"
8135fi
8136rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8137fi
138f0859 8138echo "$as_me:8138: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
8139echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8140if test `eval echo '${'$as_ac_var'}'` = yes; then
8141 cat >>confdefs.h <<EOF
8142#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
ba4481b5 8143EOF
ba4481b5 8144
ba4481b5
DL
8145fi
8146done
8147
503d2be0 8148for ac_header in maillock.h
ba4481b5 8149do
503d2be0 8150as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
138f0859 8151echo "$as_me:8151: checking for $ac_header" >&5
503d2be0
AS
8152echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8153if eval "test \"\${$as_ac_Header+set}\" = set"; then
8154 echo $ECHO_N "(cached) $ECHO_C" >&6
8155else
8156 cat >conftest.$ac_ext <<_ACEOF
138f0859 8157#line 8157 "configure"
503d2be0
AS
8158#include "confdefs.h"
8159#include <$ac_header>
8160_ACEOF
138f0859 8161if { (eval echo "$as_me:8161: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
8162 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8163 ac_status=$?
8164 egrep -v '^ *\+' conftest.er1 >conftest.err
8165 rm -f conftest.er1
8166 cat conftest.err >&5
138f0859 8167 echo "$as_me:8167: \$? = $ac_status" >&5
503d2be0
AS
8168 (exit $ac_status); } >/dev/null; then
8169 if test -s conftest.err; then
8170 ac_cpp_err=$ac_c_preproc_warn_flag
8171 else
8172 ac_cpp_err=
8173 fi
8174else
8175 ac_cpp_err=yes
8176fi
8177if test -z "$ac_cpp_err"; then
8178 eval "$as_ac_Header=yes"
8179else
8180 echo "$as_me: failed program was:" >&5
ba4481b5 8181 cat conftest.$ac_ext >&5
503d2be0 8182 eval "$as_ac_Header=no"
ba4481b5 8183fi
503d2be0 8184rm -f conftest.err conftest.$ac_ext
ba4481b5 8185fi
138f0859 8186echo "$as_me:8186: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
8187echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8188if test `eval echo '${'$as_ac_Header'}'` = yes; then
8189 cat >>confdefs.h <<EOF
8190#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba4481b5 8191EOF
503d2be0 8192
ba4481b5
DL
8193fi
8194done
8195
48d4b120 8196for ac_func in gethostname getdomainname dup2 \
ba4481b5
DL
8197rename closedir mkdir rmdir sysinfo \
8198random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
8199strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
a3f08d9e 8200utimes setrlimit setpgid getcwd getwd shutdown strftime getaddrinfo \
03391420
DL
8201__fpending mblen mbrlen strsignal setitimer ualarm index rindex \
8202gai_strerror mkstemp
ba4481b5 8203do
503d2be0 8204as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
138f0859 8205echo "$as_me:8205: checking for $ac_func" >&5
503d2be0
AS
8206echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8207if eval "test \"\${$as_ac_var+set}\" = set"; then
8208 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8209else
503d2be0 8210 cat >conftest.$ac_ext <<_ACEOF
138f0859 8211#line 8211 "configure"
ba4481b5
DL
8212#include "confdefs.h"
8213/* System header to define __stub macros and hopefully few prototypes,
503d2be0 8214 which can conflict with char $ac_func (); below. */
ba4481b5
DL
8215#include <assert.h>
8216/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8217#ifdef __cplusplus
8218extern "C"
8219#endif
ba4481b5 8220/* We use char because int might match the return type of a gcc2
503d2be0
AS
8221 builtin and then its argument prototype would still apply. */
8222char $ac_func ();
8223char (*f) ();
ba4481b5 8224
503d2be0
AS
8225int
8226main ()
8227{
ba4481b5
DL
8228/* The GNU C library defines this for functions which it implements
8229 to always fail with ENOSYS. Some functions are actually named
8230 something starting with __ and the normal name is an alias. */
8231#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8232choke me
8233#else
503d2be0 8234f = $ac_func;
ba4481b5
DL
8235#endif
8236
503d2be0
AS
8237 ;
8238 return 0;
8239}
8240_ACEOF
8241rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 8242if { (eval echo "$as_me:8242: \"$ac_link\"") >&5
503d2be0
AS
8243 (eval $ac_link) 2>&5
8244 ac_status=$?
138f0859 8245 echo "$as_me:8245: \$? = $ac_status" >&5
503d2be0
AS
8246 (exit $ac_status); } &&
8247 { ac_try='test -s conftest$ac_exeext'
138f0859 8248 { (eval echo "$as_me:8248: \"$ac_try\"") >&5
503d2be0
AS
8249 (eval $ac_try) 2>&5
8250 ac_status=$?
138f0859 8251 echo "$as_me:8251: \$? = $ac_status" >&5
503d2be0
AS
8252 (exit $ac_status); }; }; then
8253 eval "$as_ac_var=yes"
8254else
8255 echo "$as_me: failed program was:" >&5
8256cat conftest.$ac_ext >&5
8257eval "$as_ac_var=no"
8258fi
8259rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8260fi
138f0859 8261echo "$as_me:8261: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
8262echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8263if test `eval echo '${'$as_ac_var'}'` = yes; then
8264 cat >>confdefs.h <<EOF
8265#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
ba4481b5 8266EOF
ba4481b5 8267
ba4481b5
DL
8268fi
8269done
8270
503d2be0 8271for ac_header in sys/time.h unistd.h
b5de8dc0 8272do
503d2be0 8273as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
138f0859 8274echo "$as_me:8274: checking for $ac_header" >&5
503d2be0
AS
8275echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8276if eval "test \"\${$as_ac_Header+set}\" = set"; then
8277 echo $ECHO_N "(cached) $ECHO_C" >&6
8278else
8279 cat >conftest.$ac_ext <<_ACEOF
138f0859 8280#line 8280 "configure"
503d2be0
AS
8281#include "confdefs.h"
8282#include <$ac_header>
8283_ACEOF
138f0859 8284if { (eval echo "$as_me:8284: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
8285 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8286 ac_status=$?
8287 egrep -v '^ *\+' conftest.er1 >conftest.err
8288 rm -f conftest.er1
8289 cat conftest.err >&5
138f0859 8290 echo "$as_me:8290: \$? = $ac_status" >&5
503d2be0
AS
8291 (exit $ac_status); } >/dev/null; then
8292 if test -s conftest.err; then
8293 ac_cpp_err=$ac_c_preproc_warn_flag
8294 else
8295 ac_cpp_err=
8296 fi
8297else
8298 ac_cpp_err=yes
8299fi
8300if test -z "$ac_cpp_err"; then
8301 eval "$as_ac_Header=yes"
8302else
8303 echo "$as_me: failed program was:" >&5
b5de8dc0 8304 cat conftest.$ac_ext >&5
503d2be0 8305 eval "$as_ac_Header=no"
b5de8dc0 8306fi
503d2be0 8307rm -f conftest.err conftest.$ac_ext
b5de8dc0 8308fi
138f0859 8309echo "$as_me:8309: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
8310echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8311if test `eval echo '${'$as_ac_Header'}'` = yes; then
8312 cat >>confdefs.h <<EOF
8313#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
b5de8dc0 8314EOF
503d2be0 8315
b5de8dc0
DL
8316fi
8317done
8318
8319for ac_func in alarm
8320do
503d2be0 8321as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
138f0859 8322echo "$as_me:8322: checking for $ac_func" >&5
503d2be0
AS
8323echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8324if eval "test \"\${$as_ac_var+set}\" = set"; then
8325 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 8326else
503d2be0 8327 cat >conftest.$ac_ext <<_ACEOF
138f0859 8328#line 8328 "configure"
b5de8dc0
DL
8329#include "confdefs.h"
8330/* System header to define __stub macros and hopefully few prototypes,
503d2be0 8331 which can conflict with char $ac_func (); below. */
b5de8dc0
DL
8332#include <assert.h>
8333/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8334#ifdef __cplusplus
8335extern "C"
8336#endif
b5de8dc0 8337/* We use char because int might match the return type of a gcc2
503d2be0
AS
8338 builtin and then its argument prototype would still apply. */
8339char $ac_func ();
8340char (*f) ();
b5de8dc0 8341
503d2be0
AS
8342int
8343main ()
8344{
b5de8dc0
DL
8345/* The GNU C library defines this for functions which it implements
8346 to always fail with ENOSYS. Some functions are actually named
8347 something starting with __ and the normal name is an alias. */
8348#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8349choke me
8350#else
503d2be0 8351f = $ac_func;
b5de8dc0
DL
8352#endif
8353
503d2be0
AS
8354 ;
8355 return 0;
8356}
8357_ACEOF
8358rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 8359if { (eval echo "$as_me:8359: \"$ac_link\"") >&5
503d2be0
AS
8360 (eval $ac_link) 2>&5
8361 ac_status=$?
138f0859 8362 echo "$as_me:8362: \$? = $ac_status" >&5
503d2be0
AS
8363 (exit $ac_status); } &&
8364 { ac_try='test -s conftest$ac_exeext'
138f0859 8365 { (eval echo "$as_me:8365: \"$ac_try\"") >&5
503d2be0
AS
8366 (eval $ac_try) 2>&5
8367 ac_status=$?
138f0859 8368 echo "$as_me:8368: \$? = $ac_status" >&5
503d2be0
AS
8369 (exit $ac_status); }; }; then
8370 eval "$as_ac_var=yes"
8371else
8372 echo "$as_me: failed program was:" >&5
8373cat conftest.$ac_ext >&5
8374eval "$as_ac_var=no"
8375fi
8376rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8377fi
138f0859 8378echo "$as_me:8378: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
8379echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8380if test `eval echo '${'$as_ac_var'}'` = yes; then
8381 cat >>confdefs.h <<EOF
8382#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
b5de8dc0 8383EOF
b5de8dc0 8384
b5de8dc0
DL
8385fi
8386done
8387
138f0859 8388echo "$as_me:8388: checking for working mktime" >&5
503d2be0
AS
8389echo $ECHO_N "checking for working mktime... $ECHO_C" >&6
8390if test "${ac_cv_func_working_mktime+set}" = set; then
8391 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0
DL
8392else
8393 if test "$cross_compiling" = yes; then
8394 ac_cv_func_working_mktime=no
8395else
503d2be0 8396 cat >conftest.$ac_ext <<_ACEOF
138f0859 8397#line 8397 "configure"
b5de8dc0 8398#include "confdefs.h"
503d2be0 8399/* Test program from Paul Eggert and Tony Leneis. */
b5de8dc0
DL
8400#if TIME_WITH_SYS_TIME
8401# include <sys/time.h>
8402# include <time.h>
8403#else
8404# if HAVE_SYS_TIME_H
8405# include <sys/time.h>
8406# else
8407# include <time.h>
8408# endif
8409#endif
8410
8411#if HAVE_UNISTD_H
8412# include <unistd.h>
8413#endif
8414
8415#if !HAVE_ALARM
8416# define alarm(X) /* empty */
8417#endif
8418
8419/* Work around redefinition to rpl_putenv by other config tests. */
8420#undef putenv
8421
8422static time_t time_t_max;
8423
8424/* Values we'll use to set the TZ environment variable. */
8425static const char *const tz_strings[] = {
8426 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
8427 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
8428};
8429#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
8430
8431/* Fail if mktime fails to convert a date in the spring-forward gap.
8432 Based on a problem report from Andreas Jaeger. */
8433static void
8434spring_forward_gap ()
8435{
503d2be0 8436 /* glibc (up to about 1998-10-07) failed this test. */
b5de8dc0
DL
8437 struct tm tm;
8438
8439 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
8440 instead of "TZ=America/Vancouver" in order to detect the bug even
8441 on systems that don't support the Olson extension, or don't have the
8442 full zoneinfo tables installed. */
8443 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
8444
8445 tm.tm_year = 98;
8446 tm.tm_mon = 3;
8447 tm.tm_mday = 5;
8448 tm.tm_hour = 2;
8449 tm.tm_min = 0;
8450 tm.tm_sec = 0;
8451 tm.tm_isdst = -1;
8452 if (mktime (&tm) == (time_t)-1)
8453 exit (1);
8454}
8455
8456static void
8457mktime_test (now)
8458 time_t now;
8459{
8460 struct tm *lt;
8461 if ((lt = localtime (&now)) && mktime (lt) != now)
8462 exit (1);
8463 now = time_t_max - now;
8464 if ((lt = localtime (&now)) && mktime (lt) != now)
8465 exit (1);
8466}
8467
8468static void
8469irix_6_4_bug ()
8470{
8471 /* Based on code from Ariel Faigon. */
8472 struct tm tm;
8473 tm.tm_year = 96;
8474 tm.tm_mon = 3;
8475 tm.tm_mday = 0;
8476 tm.tm_hour = 0;
8477 tm.tm_min = 0;
8478 tm.tm_sec = 0;
8479 tm.tm_isdst = -1;
8480 mktime (&tm);
8481 if (tm.tm_mon != 2 || tm.tm_mday != 31)
8482 exit (1);
8483}
8484
8485static void
8486bigtime_test (j)
8487 int j;
8488{
8489 struct tm tm;
8490 time_t now;
8491 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
8492 now = mktime (&tm);
8493 if (now != (time_t) -1)
8494 {
8495 struct tm *lt = localtime (&now);
8496 if (! (lt
8497 && lt->tm_year == tm.tm_year
8498 && lt->tm_mon == tm.tm_mon
8499 && lt->tm_mday == tm.tm_mday
8500 && lt->tm_hour == tm.tm_hour
8501 && lt->tm_min == tm.tm_min
8502 && lt->tm_sec == tm.tm_sec
8503 && lt->tm_yday == tm.tm_yday
8504 && lt->tm_wday == tm.tm_wday
8505 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
8506 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
8507 exit (1);
8508 }
8509}
8510
8511int
8512main ()
8513{
8514 time_t t, delta;
8515 int i, j;
8516
8517 /* This test makes some buggy mktime implementations loop.
8518 Give up after 60 seconds; a mktime slower than that
8519 isn't worth using anyway. */
8520 alarm (60);
8521
8522 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
8523 continue;
8524 time_t_max--;
8525 delta = time_t_max / 997; /* a suitable prime number */
8526 for (i = 0; i < N_STRINGS; i++)
8527 {
8528 if (tz_strings[i])
8529 putenv (tz_strings[i]);
8530
8531 for (t = 0; t <= time_t_max - delta; t += delta)
8532 mktime_test (t);
8533 mktime_test ((time_t) 60 * 60);
8534 mktime_test ((time_t) 60 * 60 * 24);
8535
8536 for (j = 1; 0 < j; j *= 2)
8537 bigtime_test (j);
8538 bigtime_test (j - 1);
8539 }
8540 irix_6_4_bug ();
8541 spring_forward_gap ();
8542 exit (0);
8543}
503d2be0
AS
8544_ACEOF
8545rm -f conftest$ac_exeext
138f0859 8546if { (eval echo "$as_me:8546: \"$ac_link\"") >&5
503d2be0
AS
8547 (eval $ac_link) 2>&5
8548 ac_status=$?
138f0859 8549 echo "$as_me:8549: \$? = $ac_status" >&5
503d2be0 8550 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
138f0859 8551 { (eval echo "$as_me:8551: \"$ac_try\"") >&5
503d2be0
AS
8552 (eval $ac_try) 2>&5
8553 ac_status=$?
138f0859 8554 echo "$as_me:8554: \$? = $ac_status" >&5
503d2be0 8555 (exit $ac_status); }; }; then
b5de8dc0
DL
8556 ac_cv_func_working_mktime=yes
8557else
503d2be0
AS
8558 echo "$as_me: program exited with status $ac_status" >&5
8559echo "$as_me: failed program was:" >&5
8560cat conftest.$ac_ext >&5
8561ac_cv_func_working_mktime=no
b5de8dc0 8562fi
503d2be0 8563rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
b5de8dc0 8564fi
b5de8dc0 8565fi
138f0859 8566echo "$as_me:8566: result: $ac_cv_func_working_mktime" >&5
503d2be0 8567echo "${ECHO_T}$ac_cv_func_working_mktime" >&6
b5de8dc0 8568if test $ac_cv_func_working_mktime = no; then
503d2be0 8569 LIBOBJS="$LIBOBJS mktime.$ac_objext"
b5de8dc0
DL
8570fi
8571
8572if test "$ac_cv_func_working_mktime" = no; then
503d2be0 8573 cat >>confdefs.h <<\EOF
b5de8dc0
DL
8574#define BROKEN_MKTIME 1
8575EOF
8576
8577fi
8578
4c343001
DL
8579ac_have_func=no # yes means we've found a way to get the load average.
8580
503d2be0
AS
8581ac_save_LIBS=$LIBS
8582
8583# Check for getloadavg, but be sure not to touch the cache variable.
138f0859 8584(echo "$as_me:8584: checking for getloadavg" >&5
503d2be0
AS
8585echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6
8586if test "${ac_cv_func_getloadavg+set}" = set; then
8587 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 8588else
503d2be0 8589 cat >conftest.$ac_ext <<_ACEOF
138f0859 8590#line 8590 "configure"
4c343001 8591#include "confdefs.h"
503d2be0
AS
8592/* System header to define __stub macros and hopefully few prototypes,
8593 which can conflict with char getloadavg (); below. */
8594#include <assert.h>
4c343001 8595/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8596#ifdef __cplusplus
8597extern "C"
8598#endif
4c343001 8599/* We use char because int might match the return type of a gcc2
503d2be0
AS
8600 builtin and then its argument prototype would still apply. */
8601char getloadavg ();
8602char (*f) ();
4c343001 8603
503d2be0
AS
8604int
8605main ()
8606{
8607/* The GNU C library defines this for functions which it implements
8608 to always fail with ENOSYS. Some functions are actually named
8609 something starting with __ and the normal name is an alias. */
8610#if defined (__stub_getloadavg) || defined (__stub___getloadavg)
8611choke me
8612#else
8613f = getloadavg;
8614#endif
4c343001 8615
503d2be0
AS
8616 ;
8617 return 0;
8618}
8619_ACEOF
8620rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 8621if { (eval echo "$as_me:8621: \"$ac_link\"") >&5
503d2be0
AS
8622 (eval $ac_link) 2>&5
8623 ac_status=$?
138f0859 8624 echo "$as_me:8624: \$? = $ac_status" >&5
503d2be0
AS
8625 (exit $ac_status); } &&
8626 { ac_try='test -s conftest$ac_exeext'
138f0859 8627 { (eval echo "$as_me:8627: \"$ac_try\"") >&5
503d2be0
AS
8628 (eval $ac_try) 2>&5
8629 ac_status=$?
138f0859 8630 echo "$as_me:8630: \$? = $ac_status" >&5
503d2be0
AS
8631 (exit $ac_status); }; }; then
8632 ac_cv_func_getloadavg=yes
8633else
8634 echo "$as_me: failed program was:" >&5
8635cat conftest.$ac_ext >&5
8636ac_cv_func_getloadavg=no
8637fi
8638rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8639fi
138f0859 8640echo "$as_me:8640: result: $ac_cv_func_getloadavg" >&5
503d2be0
AS
8641echo "${ECHO_T}$ac_cv_func_getloadavg" >&6
8642if test $ac_cv_func_getloadavg = yes; then
8643 exit 0
4c343001 8644else
503d2be0 8645 exit 1
4c343001 8646fi
503d2be0 8647) && ac_have_func=yes
4c343001 8648
503d2be0
AS
8649# On HPUX9, an unprivileged user can get load averages through this function.
8650
8651for ac_func in pstat_getdynamic
8652do
8653as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
138f0859 8654echo "$as_me:8654: checking for $ac_func" >&5
503d2be0
AS
8655echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8656if eval "test \"\${$as_ac_var+set}\" = set"; then
8657 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 8658else
503d2be0 8659 cat >conftest.$ac_ext <<_ACEOF
138f0859 8660#line 8660 "configure"
4c343001 8661#include "confdefs.h"
503d2be0
AS
8662/* System header to define __stub macros and hopefully few prototypes,
8663 which can conflict with char $ac_func (); below. */
8664#include <assert.h>
4c343001 8665/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8666#ifdef __cplusplus
8667extern "C"
8668#endif
4c343001 8669/* We use char because int might match the return type of a gcc2
503d2be0
AS
8670 builtin and then its argument prototype would still apply. */
8671char $ac_func ();
8672char (*f) ();
8673
8674int
8675main ()
8676{
8677/* The GNU C library defines this for functions which it implements
8678 to always fail with ENOSYS. Some functions are actually named
8679 something starting with __ and the normal name is an alias. */
8680#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8681choke me
8682#else
8683f = $ac_func;
8684#endif
4c343001 8685
503d2be0
AS
8686 ;
8687 return 0;
8688}
8689_ACEOF
8690rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 8691if { (eval echo "$as_me:8691: \"$ac_link\"") >&5
503d2be0
AS
8692 (eval $ac_link) 2>&5
8693 ac_status=$?
138f0859 8694 echo "$as_me:8694: \$? = $ac_status" >&5
503d2be0
AS
8695 (exit $ac_status); } &&
8696 { ac_try='test -s conftest$ac_exeext'
138f0859 8697 { (eval echo "$as_me:8697: \"$ac_try\"") >&5
503d2be0
AS
8698 (eval $ac_try) 2>&5
8699 ac_status=$?
138f0859 8700 echo "$as_me:8700: \$? = $ac_status" >&5
503d2be0
AS
8701 (exit $ac_status); }; }; then
8702 eval "$as_ac_var=yes"
8703else
8704 echo "$as_me: failed program was:" >&5
8705cat conftest.$ac_ext >&5
8706eval "$as_ac_var=no"
8707fi
8708rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8709fi
138f0859 8710echo "$as_me:8710: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
8711echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8712if test `eval echo '${'$as_ac_var'}'` = yes; then
8713 cat >>confdefs.h <<EOF
8714#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4c343001 8715EOF
4c343001
DL
8716
8717fi
503d2be0
AS
8718done
8719
8720# Solaris has libkstat which does not require root.
4c343001 8721
138f0859 8722echo "$as_me:8722: checking for kstat_open in -lkstat" >&5
503d2be0
AS
8723echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
8724if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
8725 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 8726else
503d2be0
AS
8727 ac_check_lib_save_LIBS=$LIBS
8728LIBS="-lkstat $LIBS"
8729cat >conftest.$ac_ext <<_ACEOF
138f0859 8730#line 8730 "configure"
4c343001 8731#include "confdefs.h"
503d2be0 8732
4c343001 8733/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8734#ifdef __cplusplus
8735extern "C"
8736#endif
4c343001 8737/* We use char because int might match the return type of a gcc2
503d2be0
AS
8738 builtin and then its argument prototype would still apply. */
8739char kstat_open ();
8740int
8741main ()
8742{
8743kstat_open ();
8744 ;
8745 return 0;
8746}
8747_ACEOF
8748rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 8749if { (eval echo "$as_me:8749: \"$ac_link\"") >&5
503d2be0
AS
8750 (eval $ac_link) 2>&5
8751 ac_status=$?
138f0859 8752 echo "$as_me:8752: \$? = $ac_status" >&5
503d2be0
AS
8753 (exit $ac_status); } &&
8754 { ac_try='test -s conftest$ac_exeext'
138f0859 8755 { (eval echo "$as_me:8755: \"$ac_try\"") >&5
503d2be0
AS
8756 (eval $ac_try) 2>&5
8757 ac_status=$?
138f0859 8758 echo "$as_me:8758: \$? = $ac_status" >&5
503d2be0
AS
8759 (exit $ac_status); }; }; then
8760 ac_cv_lib_kstat_kstat_open=yes
4c343001 8761else
503d2be0
AS
8762 echo "$as_me: failed program was:" >&5
8763cat conftest.$ac_ext >&5
8764ac_cv_lib_kstat_kstat_open=no
4c343001 8765fi
503d2be0
AS
8766rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8767LIBS=$ac_check_lib_save_LIBS
4c343001 8768fi
138f0859 8769echo "$as_me:8769: result: $ac_cv_lib_kstat_kstat_open" >&5
503d2be0
AS
8770echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6
8771if test $ac_cv_lib_kstat_kstat_open = yes; then
8772 cat >>confdefs.h <<EOF
8773#define HAVE_LIBKSTAT 1
8774EOF
8775
8776 LIBS="-lkstat $LIBS"
8777
4c343001
DL
8778fi
8779
503d2be0 8780test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
4c343001 8781
503d2be0
AS
8782# Some systems with -lutil have (and need) -lkvm as well, some do not.
8783# On Solaris, -lkvm requires nlist from -lelf, so check that first
8784# to get the right answer into the cache.
8785# For kstat on solaris, we need libelf to force the definition of SVR4 below.
4c343001 8786if test $ac_have_func = no; then
138f0859 8787 echo "$as_me:8787: checking for elf_begin in -lelf" >&5
503d2be0
AS
8788echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
8789if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
8790 echo $ECHO_N "(cached) $ECHO_C" >&6
8791else
8792 ac_check_lib_save_LIBS=$LIBS
8793LIBS="-lelf $LIBS"
8794cat >conftest.$ac_ext <<_ACEOF
138f0859 8795#line 8795 "configure"
4c343001 8796#include "confdefs.h"
503d2be0 8797
4c343001 8798/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8799#ifdef __cplusplus
8800extern "C"
8801#endif
4c343001 8802/* We use char because int might match the return type of a gcc2
503d2be0
AS
8803 builtin and then its argument prototype would still apply. */
8804char elf_begin ();
8805int
8806main ()
8807{
8808elf_begin ();
8809 ;
8810 return 0;
8811}
8812_ACEOF
8813rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 8814if { (eval echo "$as_me:8814: \"$ac_link\"") >&5
503d2be0
AS
8815 (eval $ac_link) 2>&5
8816 ac_status=$?
138f0859 8817 echo "$as_me:8817: \$? = $ac_status" >&5
503d2be0
AS
8818 (exit $ac_status); } &&
8819 { ac_try='test -s conftest$ac_exeext'
138f0859 8820 { (eval echo "$as_me:8820: \"$ac_try\"") >&5
503d2be0
AS
8821 (eval $ac_try) 2>&5
8822 ac_status=$?
138f0859 8823 echo "$as_me:8823: \$? = $ac_status" >&5
503d2be0
AS
8824 (exit $ac_status); }; }; then
8825 ac_cv_lib_elf_elf_begin=yes
8826else
8827 echo "$as_me: failed program was:" >&5
8828cat conftest.$ac_ext >&5
8829ac_cv_lib_elf_elf_begin=no
8830fi
8831rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8832LIBS=$ac_check_lib_save_LIBS
8833fi
138f0859 8834echo "$as_me:8834: result: $ac_cv_lib_elf_elf_begin" >&5
503d2be0
AS
8835echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
8836if test $ac_cv_lib_elf_elf_begin = yes; then
8837 LIBS="-lelf $LIBS"
4c343001 8838fi
4c343001
DL
8839
8840fi
503d2be0 8841if test $ac_have_func = no; then
138f0859 8842 echo "$as_me:8842: checking for kvm_open in -lkvm" >&5
503d2be0
AS
8843echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6
8844if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
8845 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 8846else
503d2be0
AS
8847 ac_check_lib_save_LIBS=$LIBS
8848LIBS="-lkvm $LIBS"
8849cat >conftest.$ac_ext <<_ACEOF
138f0859 8850#line 8850 "configure"
503d2be0 8851#include "confdefs.h"
4c343001 8852
503d2be0
AS
8853/* Override any gcc2 internal prototype to avoid an error. */
8854#ifdef __cplusplus
8855extern "C"
8856#endif
8857/* We use char because int might match the return type of a gcc2
8858 builtin and then its argument prototype would still apply. */
8859char kvm_open ();
8860int
8861main ()
8862{
8863kvm_open ();
8864 ;
8865 return 0;
8866}
8867_ACEOF
8868rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 8869if { (eval echo "$as_me:8869: \"$ac_link\"") >&5
503d2be0
AS
8870 (eval $ac_link) 2>&5
8871 ac_status=$?
138f0859 8872 echo "$as_me:8872: \$? = $ac_status" >&5
503d2be0
AS
8873 (exit $ac_status); } &&
8874 { ac_try='test -s conftest$ac_exeext'
138f0859 8875 { (eval echo "$as_me:8875: \"$ac_try\"") >&5
503d2be0
AS
8876 (eval $ac_try) 2>&5
8877 ac_status=$?
138f0859 8878 echo "$as_me:8878: \$? = $ac_status" >&5
503d2be0
AS
8879 (exit $ac_status); }; }; then
8880 ac_cv_lib_kvm_kvm_open=yes
8881else
8882 echo "$as_me: failed program was:" >&5
8883cat conftest.$ac_ext >&5
8884ac_cv_lib_kvm_kvm_open=no
8885fi
8886rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8887LIBS=$ac_check_lib_save_LIBS
8888fi
138f0859 8889echo "$as_me:8889: result: $ac_cv_lib_kvm_kvm_open" >&5
503d2be0
AS
8890echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6
8891if test $ac_cv_lib_kvm_kvm_open = yes; then
8892 LIBS="-lkvm $LIBS"
4c343001
DL
8893fi
8894
503d2be0 8895 # Check for the 4.4BSD definition of getloadavg.
138f0859 8896 echo "$as_me:8896: checking for getloadavg in -lutil" >&5
503d2be0
AS
8897echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6
8898if test "${ac_cv_lib_util_getloadavg+set}" = set; then
8899 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 8900else
503d2be0
AS
8901 ac_check_lib_save_LIBS=$LIBS
8902LIBS="-lutil $LIBS"
8903cat >conftest.$ac_ext <<_ACEOF
138f0859 8904#line 8904 "configure"
4c343001 8905#include "confdefs.h"
503d2be0 8906
4c343001 8907/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8908#ifdef __cplusplus
8909extern "C"
8910#endif
8911/* We use char because int might match the return type of a gcc2
8912 builtin and then its argument prototype would still apply. */
8913char getloadavg ();
8914int
8915main ()
8916{
8917getloadavg ();
8918 ;
8919 return 0;
8920}
8921_ACEOF
8922rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 8923if { (eval echo "$as_me:8923: \"$ac_link\"") >&5
503d2be0
AS
8924 (eval $ac_link) 2>&5
8925 ac_status=$?
138f0859 8926 echo "$as_me:8926: \$? = $ac_status" >&5
503d2be0
AS
8927 (exit $ac_status); } &&
8928 { ac_try='test -s conftest$ac_exeext'
138f0859 8929 { (eval echo "$as_me:8929: \"$ac_try\"") >&5
503d2be0
AS
8930 (eval $ac_try) 2>&5
8931 ac_status=$?
138f0859 8932 echo "$as_me:8932: \$? = $ac_status" >&5
503d2be0
AS
8933 (exit $ac_status); }; }; then
8934 ac_cv_lib_util_getloadavg=yes
8935else
8936 echo "$as_me: failed program was:" >&5
8937cat conftest.$ac_ext >&5
8938ac_cv_lib_util_getloadavg=no
8939fi
8940rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8941LIBS=$ac_check_lib_save_LIBS
8942fi
138f0859 8943echo "$as_me:8943: result: $ac_cv_lib_util_getloadavg" >&5
503d2be0
AS
8944echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6
8945if test $ac_cv_lib_util_getloadavg = yes; then
8946 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
8947fi
8948
8949fi
8950
8951if test $ac_have_func = no; then
8952 # There is a commonly available library for RS/6000 AIX.
8953 # Since it is not a standard part of AIX, it might be installed locally.
8954 ac_getloadavg_LIBS=$LIBS
8955 LIBS="-L/usr/local/lib $LIBS"
138f0859 8956 echo "$as_me:8956: checking for getloadavg in -lgetloadavg" >&5
503d2be0
AS
8957echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6
8958if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
8959 echo $ECHO_N "(cached) $ECHO_C" >&6
8960else
8961 ac_check_lib_save_LIBS=$LIBS
8962LIBS="-lgetloadavg $LIBS"
8963cat >conftest.$ac_ext <<_ACEOF
138f0859 8964#line 8964 "configure"
503d2be0
AS
8965#include "confdefs.h"
8966
8967/* Override any gcc2 internal prototype to avoid an error. */
8968#ifdef __cplusplus
8969extern "C"
8970#endif
4c343001 8971/* We use char because int might match the return type of a gcc2
503d2be0
AS
8972 builtin and then its argument prototype would still apply. */
8973char getloadavg ();
8974int
8975main ()
8976{
8977getloadavg ();
8978 ;
8979 return 0;
8980}
8981_ACEOF
8982rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 8983if { (eval echo "$as_me:8983: \"$ac_link\"") >&5
503d2be0
AS
8984 (eval $ac_link) 2>&5
8985 ac_status=$?
138f0859 8986 echo "$as_me:8986: \$? = $ac_status" >&5
503d2be0
AS
8987 (exit $ac_status); } &&
8988 { ac_try='test -s conftest$ac_exeext'
138f0859 8989 { (eval echo "$as_me:8989: \"$ac_try\"") >&5
503d2be0
AS
8990 (eval $ac_try) 2>&5
8991 ac_status=$?
138f0859 8992 echo "$as_me:8992: \$? = $ac_status" >&5
503d2be0
AS
8993 (exit $ac_status); }; }; then
8994 ac_cv_lib_getloadavg_getloadavg=yes
8995else
8996 echo "$as_me: failed program was:" >&5
8997cat conftest.$ac_ext >&5
8998ac_cv_lib_getloadavg_getloadavg=no
8999fi
9000rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9001LIBS=$ac_check_lib_save_LIBS
9002fi
138f0859 9003echo "$as_me:9003: result: $ac_cv_lib_getloadavg_getloadavg" >&5
503d2be0
AS
9004echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6
9005if test $ac_cv_lib_getloadavg_getloadavg = yes; then
9006 LIBS="-lgetloadavg $LIBS"
9007else
9008 LIBS=$ac_getloadavg_LIBS
9009fi
9010
9011fi
9012
9013# Make sure it is really in the library, if we think we found it,
9014# otherwise set up the replacement function.
4c343001 9015
503d2be0
AS
9016for ac_func in getloadavg
9017do
9018as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
138f0859 9019echo "$as_me:9019: checking for $ac_func" >&5
503d2be0
AS
9020echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9021if eval "test \"\${$as_ac_var+set}\" = set"; then
9022 echo $ECHO_N "(cached) $ECHO_C" >&6
9023else
9024 cat >conftest.$ac_ext <<_ACEOF
138f0859 9025#line 9025 "configure"
503d2be0
AS
9026#include "confdefs.h"
9027/* System header to define __stub macros and hopefully few prototypes,
9028 which can conflict with char $ac_func (); below. */
9029#include <assert.h>
9030/* Override any gcc2 internal prototype to avoid an error. */
9031#ifdef __cplusplus
9032extern "C"
9033#endif
9034/* We use char because int might match the return type of a gcc2
9035 builtin and then its argument prototype would still apply. */
9036char $ac_func ();
9037char (*f) ();
4c343001 9038
503d2be0
AS
9039int
9040main ()
9041{
4c343001
DL
9042/* The GNU C library defines this for functions which it implements
9043 to always fail with ENOSYS. Some functions are actually named
9044 something starting with __ and the normal name is an alias. */
9045#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9046choke me
9047#else
503d2be0 9048f = $ac_func;
4c343001
DL
9049#endif
9050
503d2be0
AS
9051 ;
9052 return 0;
9053}
9054_ACEOF
9055rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 9056if { (eval echo "$as_me:9056: \"$ac_link\"") >&5
503d2be0
AS
9057 (eval $ac_link) 2>&5
9058 ac_status=$?
138f0859 9059 echo "$as_me:9059: \$? = $ac_status" >&5
503d2be0
AS
9060 (exit $ac_status); } &&
9061 { ac_try='test -s conftest$ac_exeext'
138f0859 9062 { (eval echo "$as_me:9062: \"$ac_try\"") >&5
503d2be0
AS
9063 (eval $ac_try) 2>&5
9064 ac_status=$?
138f0859 9065 echo "$as_me:9065: \$? = $ac_status" >&5
503d2be0
AS
9066 (exit $ac_status); }; }; then
9067 eval "$as_ac_var=yes"
4c343001 9068else
503d2be0
AS
9069 echo "$as_me: failed program was:" >&5
9070cat conftest.$ac_ext >&5
9071eval "$as_ac_var=no"
4c343001 9072fi
503d2be0 9073rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4c343001 9074fi
138f0859 9075echo "$as_me:9075: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
9076echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9077if test `eval echo '${'$as_ac_var'}'` = yes; then
9078 cat >>confdefs.h <<EOF
9079#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4c343001 9080EOF
4c343001 9081
503d2be0
AS
9082else
9083 LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
4c343001 9084
503d2be0
AS
9085cat >>confdefs.h <<\EOF
9086#define C_GETLOADAVG 1
4c343001
DL
9087EOF
9088
503d2be0
AS
9089# Figure out what our getloadavg.c needs.
9090ac_have_func=no
138f0859 9091echo "$as_me:9091: checking for sys/dg_sys_info.h" >&5
503d2be0
AS
9092echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
9093if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
9094 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9095else
503d2be0 9096 cat >conftest.$ac_ext <<_ACEOF
138f0859 9097#line 9097 "configure"
4c343001
DL
9098#include "confdefs.h"
9099#include <sys/dg_sys_info.h>
503d2be0 9100_ACEOF
138f0859 9101if { (eval echo "$as_me:9101: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9102 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9103 ac_status=$?
9104 egrep -v '^ *\+' conftest.er1 >conftest.err
9105 rm -f conftest.er1
9106 cat conftest.err >&5
138f0859 9107 echo "$as_me:9107: \$? = $ac_status" >&5
503d2be0
AS
9108 (exit $ac_status); } >/dev/null; then
9109 if test -s conftest.err; then
9110 ac_cpp_err=$ac_c_preproc_warn_flag
9111 else
9112 ac_cpp_err=
9113 fi
9114else
9115 ac_cpp_err=yes
9116fi
9117if test -z "$ac_cpp_err"; then
9118 ac_cv_header_sys_dg_sys_info_h=yes
4c343001 9119else
503d2be0 9120 echo "$as_me: failed program was:" >&5
4c343001 9121 cat conftest.$ac_ext >&5
503d2be0 9122 ac_cv_header_sys_dg_sys_info_h=no
4c343001 9123fi
503d2be0 9124rm -f conftest.err conftest.$ac_ext
4c343001 9125fi
138f0859 9126echo "$as_me:9126: result: $ac_cv_header_sys_dg_sys_info_h" >&5
503d2be0
AS
9127echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
9128if test $ac_cv_header_sys_dg_sys_info_h = yes; then
9129 ac_have_func=yes
9130
9131cat >>confdefs.h <<\EOF
4c343001
DL
9132#define DGUX 1
9133EOF
9134
138f0859 9135echo "$as_me:9135: checking for dg_sys_info in -ldgc" >&5
503d2be0
AS
9136echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6
9137if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
9138 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9139else
503d2be0 9140 ac_check_lib_save_LIBS=$LIBS
4c343001 9141LIBS="-ldgc $LIBS"
503d2be0 9142cat >conftest.$ac_ext <<_ACEOF
138f0859 9143#line 9143 "configure"
4c343001 9144#include "confdefs.h"
503d2be0 9145
4c343001 9146/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9147#ifdef __cplusplus
9148extern "C"
9149#endif
4c343001 9150/* We use char because int might match the return type of a gcc2
503d2be0
AS
9151 builtin and then its argument prototype would still apply. */
9152char dg_sys_info ();
9153int
9154main ()
9155{
9156dg_sys_info ();
9157 ;
9158 return 0;
9159}
9160_ACEOF
9161rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 9162if { (eval echo "$as_me:9162: \"$ac_link\"") >&5
503d2be0
AS
9163 (eval $ac_link) 2>&5
9164 ac_status=$?
138f0859 9165 echo "$as_me:9165: \$? = $ac_status" >&5
503d2be0
AS
9166 (exit $ac_status); } &&
9167 { ac_try='test -s conftest$ac_exeext'
138f0859 9168 { (eval echo "$as_me:9168: \"$ac_try\"") >&5
503d2be0
AS
9169 (eval $ac_try) 2>&5
9170 ac_status=$?
138f0859 9171 echo "$as_me:9171: \$? = $ac_status" >&5
503d2be0
AS
9172 (exit $ac_status); }; }; then
9173 ac_cv_lib_dgc_dg_sys_info=yes
9174else
9175 echo "$as_me: failed program was:" >&5
9176cat conftest.$ac_ext >&5
9177ac_cv_lib_dgc_dg_sys_info=no
9178fi
9179rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9180LIBS=$ac_check_lib_save_LIBS
9181fi
138f0859 9182echo "$as_me:9182: result: $ac_cv_lib_dgc_dg_sys_info" >&5
503d2be0
AS
9183echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6
9184if test $ac_cv_lib_dgc_dg_sys_info = yes; then
9185 cat >>confdefs.h <<EOF
9186#define HAVE_LIBDGC 1
4c343001 9187EOF
503d2be0
AS
9188
9189 LIBS="-ldgc $LIBS"
4c343001
DL
9190
9191fi
4c343001 9192
503d2be0 9193fi
4c343001 9194
138f0859 9195echo "$as_me:9195: checking for locale.h" >&5
503d2be0
AS
9196echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
9197if test "${ac_cv_header_locale_h+set}" = set; then
9198 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9199else
503d2be0 9200 cat >conftest.$ac_ext <<_ACEOF
138f0859 9201#line 9201 "configure"
503d2be0
AS
9202#include "confdefs.h"
9203#include <locale.h>
9204_ACEOF
138f0859 9205if { (eval echo "$as_me:9205: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9206 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9207 ac_status=$?
9208 egrep -v '^ *\+' conftest.er1 >conftest.err
9209 rm -f conftest.er1
9210 cat conftest.err >&5
138f0859 9211 echo "$as_me:9211: \$? = $ac_status" >&5
503d2be0
AS
9212 (exit $ac_status); } >/dev/null; then
9213 if test -s conftest.err; then
9214 ac_cpp_err=$ac_c_preproc_warn_flag
9215 else
9216 ac_cpp_err=
9217 fi
9218else
9219 ac_cpp_err=yes
4c343001 9220fi
503d2be0
AS
9221if test -z "$ac_cpp_err"; then
9222 ac_cv_header_locale_h=yes
9223else
9224 echo "$as_me: failed program was:" >&5
9225 cat conftest.$ac_ext >&5
9226 ac_cv_header_locale_h=no
9227fi
9228rm -f conftest.err conftest.$ac_ext
9229fi
138f0859 9230echo "$as_me:9230: result: $ac_cv_header_locale_h" >&5
503d2be0 9231echo "${ECHO_T}$ac_cv_header_locale_h" >&6
4c343001 9232
503d2be0
AS
9233for ac_func in setlocale
9234do
9235as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
138f0859 9236echo "$as_me:9236: checking for $ac_func" >&5
503d2be0
AS
9237echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9238if eval "test \"\${$as_ac_var+set}\" = set"; then
9239 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9240else
503d2be0 9241 cat >conftest.$ac_ext <<_ACEOF
138f0859 9242#line 9242 "configure"
503d2be0
AS
9243#include "confdefs.h"
9244/* System header to define __stub macros and hopefully few prototypes,
9245 which can conflict with char $ac_func (); below. */
9246#include <assert.h>
9247/* Override any gcc2 internal prototype to avoid an error. */
9248#ifdef __cplusplus
9249extern "C"
9250#endif
9251/* We use char because int might match the return type of a gcc2
9252 builtin and then its argument prototype would still apply. */
9253char $ac_func ();
9254char (*f) ();
9255
9256int
9257main ()
9258{
9259/* The GNU C library defines this for functions which it implements
9260 to always fail with ENOSYS. Some functions are actually named
9261 something starting with __ and the normal name is an alias. */
9262#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9263choke me
9264#else
9265f = $ac_func;
9266#endif
9267
9268 ;
9269 return 0;
9270}
9271_ACEOF
9272rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 9273if { (eval echo "$as_me:9273: \"$ac_link\"") >&5
503d2be0
AS
9274 (eval $ac_link) 2>&5
9275 ac_status=$?
138f0859 9276 echo "$as_me:9276: \$? = $ac_status" >&5
503d2be0
AS
9277 (exit $ac_status); } &&
9278 { ac_try='test -s conftest$ac_exeext'
138f0859 9279 { (eval echo "$as_me:9279: \"$ac_try\"") >&5
503d2be0
AS
9280 (eval $ac_try) 2>&5
9281 ac_status=$?
138f0859 9282 echo "$as_me:9282: \$? = $ac_status" >&5
503d2be0
AS
9283 (exit $ac_status); }; }; then
9284 eval "$as_ac_var=yes"
9285else
9286 echo "$as_me: failed program was:" >&5
9287cat conftest.$ac_ext >&5
9288eval "$as_ac_var=no"
9289fi
9290rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9291fi
138f0859 9292echo "$as_me:9292: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
9293echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9294if test `eval echo '${'$as_ac_var'}'` = yes; then
9295 cat >>confdefs.h <<EOF
9296#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9297EOF
9298
4c343001 9299fi
503d2be0 9300done
4c343001 9301
503d2be0
AS
9302# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
9303# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
9304# Irix 4.0.5F has the header but not the library.
9305if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
9306 ac_have_func=yes
4c343001 9307
503d2be0 9308cat >>confdefs.h <<\EOF
4c343001
DL
9309#define SVR4 1
9310EOF
9311
503d2be0 9312fi
4c343001 9313
503d2be0 9314if test $ac_have_func = no; then
138f0859 9315 echo "$as_me:9315: checking for inq_stats/cpustats.h" >&5
503d2be0
AS
9316echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
9317if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
9318 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9319else
503d2be0 9320 cat >conftest.$ac_ext <<_ACEOF
138f0859 9321#line 9321 "configure"
4c343001
DL
9322#include "confdefs.h"
9323#include <inq_stats/cpustats.h>
503d2be0 9324_ACEOF
138f0859 9325if { (eval echo "$as_me:9325: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9326 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9327 ac_status=$?
9328 egrep -v '^ *\+' conftest.er1 >conftest.err
9329 rm -f conftest.er1
9330 cat conftest.err >&5
138f0859 9331 echo "$as_me:9331: \$? = $ac_status" >&5
503d2be0
AS
9332 (exit $ac_status); } >/dev/null; then
9333 if test -s conftest.err; then
9334 ac_cpp_err=$ac_c_preproc_warn_flag
9335 else
9336 ac_cpp_err=
9337 fi
9338else
9339 ac_cpp_err=yes
9340fi
9341if test -z "$ac_cpp_err"; then
9342 ac_cv_header_inq_stats_cpustats_h=yes
4c343001 9343else
503d2be0 9344 echo "$as_me: failed program was:" >&5
4c343001 9345 cat conftest.$ac_ext >&5
503d2be0 9346 ac_cv_header_inq_stats_cpustats_h=no
4c343001 9347fi
503d2be0 9348rm -f conftest.err conftest.$ac_ext
4c343001 9349fi
138f0859 9350echo "$as_me:9350: result: $ac_cv_header_inq_stats_cpustats_h" >&5
503d2be0
AS
9351echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
9352if test $ac_cv_header_inq_stats_cpustats_h = yes; then
9353 ac_have_func=yes
9354
9355cat >>confdefs.h <<\EOF
4c343001
DL
9356#define UMAX 1
9357EOF
9358
503d2be0 9359cat >>confdefs.h <<\EOF
4c343001
DL
9360#define UMAX4_3 1
9361EOF
9362
4c343001
DL
9363fi
9364
503d2be0 9365fi
4c343001 9366
503d2be0 9367if test $ac_have_func = no; then
138f0859 9368 echo "$as_me:9368: checking for sys/cpustats.h" >&5
503d2be0
AS
9369echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
9370if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
9371 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9372else
503d2be0 9373 cat >conftest.$ac_ext <<_ACEOF
138f0859 9374#line 9374 "configure"
4c343001
DL
9375#include "confdefs.h"
9376#include <sys/cpustats.h>
503d2be0 9377_ACEOF
138f0859 9378if { (eval echo "$as_me:9378: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9379 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9380 ac_status=$?
9381 egrep -v '^ *\+' conftest.er1 >conftest.err
9382 rm -f conftest.er1
9383 cat conftest.err >&5
138f0859 9384 echo "$as_me:9384: \$? = $ac_status" >&5
503d2be0
AS
9385 (exit $ac_status); } >/dev/null; then
9386 if test -s conftest.err; then
9387 ac_cpp_err=$ac_c_preproc_warn_flag
9388 else
9389 ac_cpp_err=
9390 fi
4c343001 9391else
503d2be0
AS
9392 ac_cpp_err=yes
9393fi
9394if test -z "$ac_cpp_err"; then
9395 ac_cv_header_sys_cpustats_h=yes
9396else
9397 echo "$as_me: failed program was:" >&5
4c343001 9398 cat conftest.$ac_ext >&5
503d2be0 9399 ac_cv_header_sys_cpustats_h=no
4c343001 9400fi
503d2be0 9401rm -f conftest.err conftest.$ac_ext
4c343001 9402fi
138f0859 9403echo "$as_me:9403: result: $ac_cv_header_sys_cpustats_h" >&5
503d2be0
AS
9404echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
9405if test $ac_cv_header_sys_cpustats_h = yes; then
9406 ac_have_func=yes; cat >>confdefs.h <<\EOF
4c343001
DL
9407#define UMAX 1
9408EOF
9409
4c343001
DL
9410fi
9411
503d2be0 9412fi
4c343001 9413
503d2be0
AS
9414if test $ac_have_func = no; then
9415
9416for ac_header in mach/mach.h
4c343001 9417do
503d2be0 9418as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
138f0859 9419echo "$as_me:9419: checking for $ac_header" >&5
503d2be0
AS
9420echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9421if eval "test \"\${$as_ac_Header+set}\" = set"; then
9422 echo $ECHO_N "(cached) $ECHO_C" >&6
9423else
9424 cat >conftest.$ac_ext <<_ACEOF
138f0859 9425#line 9425 "configure"
503d2be0
AS
9426#include "confdefs.h"
9427#include <$ac_header>
9428_ACEOF
138f0859 9429if { (eval echo "$as_me:9429: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9430 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9431 ac_status=$?
9432 egrep -v '^ *\+' conftest.er1 >conftest.err
9433 rm -f conftest.er1
9434 cat conftest.err >&5
138f0859 9435 echo "$as_me:9435: \$? = $ac_status" >&5
503d2be0
AS
9436 (exit $ac_status); } >/dev/null; then
9437 if test -s conftest.err; then
9438 ac_cpp_err=$ac_c_preproc_warn_flag
9439 else
9440 ac_cpp_err=
9441 fi
9442else
9443 ac_cpp_err=yes
9444fi
9445if test -z "$ac_cpp_err"; then
9446 eval "$as_ac_Header=yes"
9447else
9448 echo "$as_me: failed program was:" >&5
4c343001 9449 cat conftest.$ac_ext >&5
503d2be0 9450 eval "$as_ac_Header=no"
4c343001 9451fi
503d2be0 9452rm -f conftest.err conftest.$ac_ext
4c343001 9453fi
138f0859 9454echo "$as_me:9454: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
9455echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9456if test `eval echo '${'$as_ac_Header'}'` = yes; then
9457 cat >>confdefs.h <<EOF
9458#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4c343001 9459EOF
503d2be0 9460
4c343001
DL
9461fi
9462done
9463
503d2be0 9464fi
4c343001 9465
503d2be0
AS
9466for ac_header in nlist.h
9467do
9468as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
138f0859 9469echo "$as_me:9469: checking for $ac_header" >&5
503d2be0
AS
9470echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9471if eval "test \"\${$as_ac_Header+set}\" = set"; then
9472 echo $ECHO_N "(cached) $ECHO_C" >&6
9473else
9474 cat >conftest.$ac_ext <<_ACEOF
138f0859 9475#line 9475 "configure"
503d2be0
AS
9476#include "confdefs.h"
9477#include <$ac_header>
9478_ACEOF
138f0859 9479if { (eval echo "$as_me:9479: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9480 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9481 ac_status=$?
9482 egrep -v '^ *\+' conftest.er1 >conftest.err
9483 rm -f conftest.er1
9484 cat conftest.err >&5
138f0859 9485 echo "$as_me:9485: \$? = $ac_status" >&5
503d2be0
AS
9486 (exit $ac_status); } >/dev/null; then
9487 if test -s conftest.err; then
9488 ac_cpp_err=$ac_c_preproc_warn_flag
9489 else
9490 ac_cpp_err=
9491 fi
4c343001 9492else
503d2be0
AS
9493 ac_cpp_err=yes
9494fi
9495if test -z "$ac_cpp_err"; then
9496 eval "$as_ac_Header=yes"
4c343001 9497else
503d2be0 9498 echo "$as_me: failed program was:" >&5
4c343001 9499 cat conftest.$ac_ext >&5
503d2be0 9500 eval "$as_ac_Header=no"
4c343001 9501fi
503d2be0 9502rm -f conftest.err conftest.$ac_ext
4c343001 9503fi
138f0859 9504echo "$as_me:9504: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
9505echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9506if test `eval echo '${'$as_ac_Header'}'` = yes; then
9507 cat >>confdefs.h <<EOF
9508#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4c343001 9509EOF
138f0859 9510 echo "$as_me:9510: checking for struct nlist.n_un.n_name" >&5
503d2be0
AS
9511echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6
9512if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
9513 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9514else
503d2be0 9515 cat >conftest.$ac_ext <<_ACEOF
138f0859 9516#line 9516 "configure"
4c343001
DL
9517#include "confdefs.h"
9518#include <nlist.h>
4c343001 9519
503d2be0
AS
9520int
9521main ()
9522{
9523static struct nlist ac_aggr;
9524if (ac_aggr.n_un.n_name)
9525return 0;
9526 ;
9527 return 0;
9528}
9529_ACEOF
9530rm -f conftest.$ac_objext
138f0859 9531if { (eval echo "$as_me:9531: \"$ac_compile\"") >&5
503d2be0
AS
9532 (eval $ac_compile) 2>&5
9533 ac_status=$?
138f0859 9534 echo "$as_me:9534: \$? = $ac_status" >&5
503d2be0
AS
9535 (exit $ac_status); } &&
9536 { ac_try='test -s conftest.$ac_objext'
138f0859 9537 { (eval echo "$as_me:9537: \"$ac_try\"") >&5
503d2be0
AS
9538 (eval $ac_try) 2>&5
9539 ac_status=$?
138f0859 9540 echo "$as_me:9540: \$? = $ac_status" >&5
503d2be0
AS
9541 (exit $ac_status); }; }; then
9542 ac_cv_member_struct_nlist_n_un_n_name=yes
9543else
9544 echo "$as_me: failed program was:" >&5
9545cat conftest.$ac_ext >&5
9546ac_cv_member_struct_nlist_n_un_n_name=no
9547fi
9548rm -f conftest.$ac_objext conftest.$ac_ext
9549fi
138f0859 9550echo "$as_me:9550: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
503d2be0
AS
9551echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6
9552if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
9553
9554cat >>confdefs.h <<EOF
9555#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
9556EOF
9557
9558cat >>confdefs.h <<\EOF
4c343001
DL
9559#define NLIST_NAME_UNION 1
9560EOF
9561
4c343001 9562fi
503d2be0
AS
9563
9564fi
9565done
9566
9567fi
9568done
4c343001
DL
9569
9570# Some definitions of getloadavg require that the program be installed setgid.
138f0859 9571echo "$as_me:9571: checking whether getloadavg requires setgid" >&5
503d2be0
AS
9572echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6
9573if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
9574 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9575else
503d2be0 9576 cat >conftest.$ac_ext <<_ACEOF
138f0859 9577#line 9577 "configure"
4c343001
DL
9578#include "confdefs.h"
9579#include "$srcdir/getloadavg.c"
9580#ifdef LDAV_PRIVILEGED
9581Yowza Am I SETGID yet
9582#endif
503d2be0 9583_ACEOF
4c343001
DL
9584if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9585 egrep "Yowza Am I SETGID yet" >/dev/null 2>&1; then
4c343001
DL
9586 ac_cv_func_getloadavg_setgid=yes
9587else
4c343001
DL
9588 ac_cv_func_getloadavg_setgid=no
9589fi
9590rm -f conftest*
9591
9592fi
138f0859 9593echo "$as_me:9593: result: $ac_cv_func_getloadavg_setgid" >&5
503d2be0 9594echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6
4c343001 9595if test $ac_cv_func_getloadavg_setgid = yes; then
503d2be0
AS
9596 NEED_SETGID=true
9597
9598cat >>confdefs.h <<\EOF
4c343001
DL
9599#define GETLOADAVG_PRIVILEGED 1
9600EOF
9601
9602else
9603 NEED_SETGID=false
9604fi
9605
9606if test $ac_cv_func_getloadavg_setgid = yes; then
138f0859 9607 echo "$as_me:9607: checking group of /dev/kmem" >&5
503d2be0
AS
9608echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6
9609if test "${ac_cv_group_kmem+set}" = set; then
9610 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9611else
503d2be0 9612 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
4c343001
DL
9613 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
9614 # If we got an error (system does not support symlinks), try without -L.
9615 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
9616 ac_cv_group_kmem=`echo $ac_ls_output \
9617 | sed -ne 's/[ ][ ]*/ /g;
9618 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
9619 / /s/.* //;p;'`
9620
9621fi
138f0859 9622echo "$as_me:9622: result: $ac_cv_group_kmem" >&5
503d2be0 9623echo "${ECHO_T}$ac_cv_group_kmem" >&6
4c343001
DL
9624 KMEM_GROUP=$ac_cv_group_kmem
9625fi
503d2be0
AS
9626if test "x$ac_save_LIBS" = x; then
9627 GETLOADAVG_LIBS=$LIBS
9628else
9629 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
9630fi
9631LIBS=$ac_save_LIBS
4c343001 9632
138f0859 9633echo "$as_me:9633: checking for _LARGEFILE_SOURCE value needed for large files" >&5
503d2be0
AS
9634echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9635if test "${ac_cv_sys_largefile_source+set}" = set; then
9636 echo $ECHO_N "(cached) $ECHO_C" >&6
d42122a3 9637else
503d2be0 9638 while :; do
169fe44e 9639 ac_cv_sys_largefile_source=no
503d2be0 9640 cat >conftest.$ac_ext <<_ACEOF
138f0859 9641#line 9641 "configure"
169fe44e
GM
9642#include "confdefs.h"
9643#include <stdio.h>
503d2be0
AS
9644int
9645main ()
9646{
169fe44e 9647return !fseeko;
503d2be0
AS
9648 ;
9649 return 0;
9650}
9651_ACEOF
9652rm -f conftest.$ac_objext
138f0859 9653if { (eval echo "$as_me:9653: \"$ac_compile\"") >&5
503d2be0
AS
9654 (eval $ac_compile) 2>&5
9655 ac_status=$?
138f0859 9656 echo "$as_me:9656: \$? = $ac_status" >&5
503d2be0
AS
9657 (exit $ac_status); } &&
9658 { ac_try='test -s conftest.$ac_objext'
138f0859 9659 { (eval echo "$as_me:9659: \"$ac_try\"") >&5
503d2be0
AS
9660 (eval $ac_try) 2>&5
9661 ac_status=$?
138f0859 9662 echo "$as_me:9662: \$? = $ac_status" >&5
503d2be0
AS
9663 (exit $ac_status); }; }; then
9664 break
169fe44e 9665else
503d2be0
AS
9666 echo "$as_me: failed program was:" >&5
9667cat conftest.$ac_ext >&5
9668fi
9669rm -f conftest.$ac_objext conftest.$ac_ext
9670 cat >conftest.$ac_ext <<_ACEOF
138f0859 9671#line 9671 "configure"
d42122a3 9672#include "confdefs.h"
169fe44e
GM
9673#define _LARGEFILE_SOURCE 1
9674#include <stdio.h>
503d2be0
AS
9675int
9676main ()
9677{
169fe44e 9678return !fseeko;
503d2be0
AS
9679 ;
9680 return 0;
9681}
9682_ACEOF
9683rm -f conftest.$ac_objext
138f0859 9684if { (eval echo "$as_me:9684: \"$ac_compile\"") >&5
503d2be0
AS
9685 (eval $ac_compile) 2>&5
9686 ac_status=$?
138f0859 9687 echo "$as_me:9687: \$? = $ac_status" >&5
503d2be0
AS
9688 (exit $ac_status); } &&
9689 { ac_try='test -s conftest.$ac_objext'
138f0859 9690 { (eval echo "$as_me:9690: \"$ac_try\"") >&5
503d2be0
AS
9691 (eval $ac_try) 2>&5
9692 ac_status=$?
138f0859 9693 echo "$as_me:9693: \$? = $ac_status" >&5
503d2be0
AS
9694 (exit $ac_status); }; }; then
9695 ac_cv_sys_largefile_source=1; break
9696else
9697 echo "$as_me: failed program was:" >&5
9698cat conftest.$ac_ext >&5
9699fi
9700rm -f conftest.$ac_objext conftest.$ac_ext
9701 break
9702done
d42122a3 9703fi
138f0859 9704echo "$as_me:9704: result: $ac_cv_sys_largefile_source" >&5
503d2be0
AS
9705echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9706if test "$ac_cv_sys_largefile_source" != no; then
d42122a3 9707
503d2be0 9708cat >>confdefs.h <<EOF
169fe44e 9709#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
d42122a3 9710EOF
169fe44e 9711
503d2be0
AS
9712fi
9713rm -f conftest*
169fe44e 9714
503d2be0
AS
9715# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9716# in glibc 2.1.3, but that breaks too many other things.
9717# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
138f0859 9718echo "$as_me:9718: checking for fseeko" >&5
503d2be0
AS
9719echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9720if test "${ac_cv_func_fseeko+set}" = set; then
9721 echo $ECHO_N "(cached) $ECHO_C" >&6
d42122a3 9722else
503d2be0 9723 cat >conftest.$ac_ext <<_ACEOF
138f0859 9724#line 9724 "configure"
169fe44e
GM
9725#include "confdefs.h"
9726#include <stdio.h>
503d2be0
AS
9727int
9728main ()
9729{
169fe44e 9730return fseeko && fseeko (stdin, 0, 0);
503d2be0
AS
9731 ;
9732 return 0;
9733}
9734_ACEOF
9735rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 9736if { (eval echo "$as_me:9736: \"$ac_link\"") >&5
503d2be0
AS
9737 (eval $ac_link) 2>&5
9738 ac_status=$?
138f0859 9739 echo "$as_me:9739: \$? = $ac_status" >&5
503d2be0
AS
9740 (exit $ac_status); } &&
9741 { ac_try='test -s conftest$ac_exeext'
138f0859 9742 { (eval echo "$as_me:9742: \"$ac_try\"") >&5
503d2be0
AS
9743 (eval $ac_try) 2>&5
9744 ac_status=$?
138f0859 9745 echo "$as_me:9745: \$? = $ac_status" >&5
503d2be0 9746 (exit $ac_status); }; }; then
169fe44e
GM
9747 ac_cv_func_fseeko=yes
9748else
503d2be0
AS
9749 echo "$as_me: failed program was:" >&5
9750cat conftest.$ac_ext >&5
9751ac_cv_func_fseeko=no
169fe44e 9752fi
503d2be0 9753rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
d42122a3 9754fi
138f0859 9755echo "$as_me:9755: result: $ac_cv_func_fseeko" >&5
503d2be0
AS
9756echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9757if test $ac_cv_func_fseeko = yes; then
d42122a3 9758
503d2be0 9759cat >>confdefs.h <<\EOF
169fe44e
GM
9760#define HAVE_FSEEKO 1
9761EOF
9762
503d2be0 9763fi
d42122a3 9764
169fe44e 9765# UNIX98 PTYs.
503d2be0 9766
087121cc
GM
9767for ac_func in grantpt
9768do
503d2be0 9769as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
138f0859 9770echo "$as_me:9770: checking for $ac_func" >&5
503d2be0
AS
9771echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9772if eval "test \"\${$as_ac_var+set}\" = set"; then
9773 echo $ECHO_N "(cached) $ECHO_C" >&6
087121cc 9774else
503d2be0 9775 cat >conftest.$ac_ext <<_ACEOF
138f0859 9776#line 9776 "configure"
087121cc
GM
9777#include "confdefs.h"
9778/* System header to define __stub macros and hopefully few prototypes,
503d2be0 9779 which can conflict with char $ac_func (); below. */
087121cc
GM
9780#include <assert.h>
9781/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9782#ifdef __cplusplus
9783extern "C"
9784#endif
087121cc 9785/* We use char because int might match the return type of a gcc2
503d2be0
AS
9786 builtin and then its argument prototype would still apply. */
9787char $ac_func ();
9788char (*f) ();
087121cc 9789
503d2be0
AS
9790int
9791main ()
9792{
087121cc
GM
9793/* The GNU C library defines this for functions which it implements
9794 to always fail with ENOSYS. Some functions are actually named
9795 something starting with __ and the normal name is an alias. */
9796#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9797choke me
9798#else
503d2be0 9799f = $ac_func;
087121cc
GM
9800#endif
9801
503d2be0
AS
9802 ;
9803 return 0;
9804}
9805_ACEOF
9806rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 9807if { (eval echo "$as_me:9807: \"$ac_link\"") >&5
503d2be0
AS
9808 (eval $ac_link) 2>&5
9809 ac_status=$?
138f0859 9810 echo "$as_me:9810: \$? = $ac_status" >&5
503d2be0
AS
9811 (exit $ac_status); } &&
9812 { ac_try='test -s conftest$ac_exeext'
138f0859 9813 { (eval echo "$as_me:9813: \"$ac_try\"") >&5
503d2be0
AS
9814 (eval $ac_try) 2>&5
9815 ac_status=$?
138f0859 9816 echo "$as_me:9816: \$? = $ac_status" >&5
503d2be0
AS
9817 (exit $ac_status); }; }; then
9818 eval "$as_ac_var=yes"
9819else
9820 echo "$as_me: failed program was:" >&5
9821cat conftest.$ac_ext >&5
9822eval "$as_ac_var=no"
9823fi
9824rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9825fi
138f0859 9826echo "$as_me:9826: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
9827echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9828if test `eval echo '${'$as_ac_var'}'` = yes; then
9829 cat >>confdefs.h <<EOF
9830#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
087121cc 9831EOF
087121cc 9832
087121cc
GM
9833fi
9834done
9835
087121cc 9836# PTY-related GNU extensions.
503d2be0 9837
087121cc
GM
9838for ac_func in getpt
9839do
503d2be0 9840as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
138f0859 9841echo "$as_me:9841: checking for $ac_func" >&5
503d2be0
AS
9842echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9843if eval "test \"\${$as_ac_var+set}\" = set"; then
9844 echo $ECHO_N "(cached) $ECHO_C" >&6
087121cc 9845else
503d2be0 9846 cat >conftest.$ac_ext <<_ACEOF
138f0859 9847#line 9847 "configure"
087121cc
GM
9848#include "confdefs.h"
9849/* System header to define __stub macros and hopefully few prototypes,
503d2be0 9850 which can conflict with char $ac_func (); below. */
087121cc
GM
9851#include <assert.h>
9852/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9853#ifdef __cplusplus
9854extern "C"
9855#endif
087121cc 9856/* We use char because int might match the return type of a gcc2
503d2be0
AS
9857 builtin and then its argument prototype would still apply. */
9858char $ac_func ();
9859char (*f) ();
087121cc 9860
503d2be0
AS
9861int
9862main ()
9863{
087121cc
GM
9864/* The GNU C library defines this for functions which it implements
9865 to always fail with ENOSYS. Some functions are actually named
9866 something starting with __ and the normal name is an alias. */
9867#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9868choke me
9869#else
503d2be0 9870f = $ac_func;
087121cc
GM
9871#endif
9872
503d2be0
AS
9873 ;
9874 return 0;
9875}
9876_ACEOF
9877rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 9878if { (eval echo "$as_me:9878: \"$ac_link\"") >&5
503d2be0
AS
9879 (eval $ac_link) 2>&5
9880 ac_status=$?
138f0859 9881 echo "$as_me:9881: \$? = $ac_status" >&5
503d2be0
AS
9882 (exit $ac_status); } &&
9883 { ac_try='test -s conftest$ac_exeext'
138f0859 9884 { (eval echo "$as_me:9884: \"$ac_try\"") >&5
503d2be0
AS
9885 (eval $ac_try) 2>&5
9886 ac_status=$?
138f0859 9887 echo "$as_me:9887: \$? = $ac_status" >&5
503d2be0
AS
9888 (exit $ac_status); }; }; then
9889 eval "$as_ac_var=yes"
9890else
9891 echo "$as_me: failed program was:" >&5
9892cat conftest.$ac_ext >&5
9893eval "$as_ac_var=no"
9894fi
9895rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9896fi
138f0859 9897echo "$as_me:9897: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
9898echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9899if test `eval echo '${'$as_ac_var'}'` = yes; then
9900 cat >>confdefs.h <<EOF
9901#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
087121cc 9902EOF
087121cc 9903
087121cc
GM
9904fi
9905done
9906
ba4481b5
DL
9907# Check this now, so that we will NOT find the above functions in ncurses.
9908# That is because we have not set up to link ncurses in lib-src.
9909# It's better to believe a function is not available
9910# than to expect to find it in ncurses.
503d2be0 9911
138f0859 9912echo "$as_me:9912: checking for tparm in -lncurses" >&5
503d2be0
AS
9913echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6
9914if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
9915 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9916else
503d2be0 9917 ac_check_lib_save_LIBS=$LIBS
ba4481b5 9918LIBS="-lncurses $LIBS"
503d2be0 9919cat >conftest.$ac_ext <<_ACEOF
138f0859 9920#line 9920 "configure"
ba4481b5 9921#include "confdefs.h"
503d2be0 9922
ba4481b5 9923/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9924#ifdef __cplusplus
9925extern "C"
9926#endif
ba4481b5 9927/* We use char because int might match the return type of a gcc2
503d2be0
AS
9928 builtin and then its argument prototype would still apply. */
9929char tparm ();
9930int
9931main ()
9932{
9933tparm ();
9934 ;
9935 return 0;
9936}
9937_ACEOF
9938rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 9939if { (eval echo "$as_me:9939: \"$ac_link\"") >&5
503d2be0
AS
9940 (eval $ac_link) 2>&5
9941 ac_status=$?
138f0859 9942 echo "$as_me:9942: \$? = $ac_status" >&5
503d2be0
AS
9943 (exit $ac_status); } &&
9944 { ac_try='test -s conftest$ac_exeext'
138f0859 9945 { (eval echo "$as_me:9945: \"$ac_try\"") >&5
503d2be0
AS
9946 (eval $ac_try) 2>&5
9947 ac_status=$?
138f0859 9948 echo "$as_me:9948: \$? = $ac_status" >&5
503d2be0
AS
9949 (exit $ac_status); }; }; then
9950 ac_cv_lib_ncurses_tparm=yes
9951else
9952 echo "$as_me: failed program was:" >&5
9953cat conftest.$ac_ext >&5
9954ac_cv_lib_ncurses_tparm=no
9955fi
9956rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9957LIBS=$ac_check_lib_save_LIBS
9958fi
138f0859 9959echo "$as_me:9959: result: $ac_cv_lib_ncurses_tparm" >&5
503d2be0
AS
9960echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6
9961if test $ac_cv_lib_ncurses_tparm = yes; then
9962 cat >>confdefs.h <<EOF
9963#define HAVE_LIBNCURSES 1
ba4481b5
DL
9964EOF
9965
9966 LIBS="-lncurses $LIBS"
9967
ba4481b5
DL
9968fi
9969
84e70f78
KR
9970# Do we need the Hesiod library to provide the support routines?
9971if test "$with_hesiod" = yes ; then
9972 # Don't set $LIBS here -- see comments above.
9973 resolv=no
138f0859 9974 echo "$as_me:9974: checking for res_send" >&5
84e70f78
KR
9975echo $ECHO_N "checking for res_send... $ECHO_C" >&6
9976if test "${ac_cv_func_res_send+set}" = set; then
9977 echo $ECHO_N "(cached) $ECHO_C" >&6
9978else
9979 cat >conftest.$ac_ext <<_ACEOF
138f0859 9980#line 9980 "configure"
84e70f78
KR
9981#include "confdefs.h"
9982/* System header to define __stub macros and hopefully few prototypes,
9983 which can conflict with char res_send (); below. */
9984#include <assert.h>
9985/* Override any gcc2 internal prototype to avoid an error. */
9986#ifdef __cplusplus
9987extern "C"
9988#endif
9989/* We use char because int might match the return type of a gcc2
9990 builtin and then its argument prototype would still apply. */
9991char res_send ();
9992char (*f) ();
9993
9994int
9995main ()
9996{
9997/* The GNU C library defines this for functions which it implements
9998 to always fail with ENOSYS. Some functions are actually named
9999 something starting with __ and the normal name is an alias. */
10000#if defined (__stub_res_send) || defined (__stub___res_send)
10001choke me
10002#else
10003f = res_send;
10004#endif
10005
10006 ;
10007 return 0;
10008}
10009_ACEOF
10010rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 10011if { (eval echo "$as_me:10011: \"$ac_link\"") >&5
84e70f78
KR
10012 (eval $ac_link) 2>&5
10013 ac_status=$?
138f0859 10014 echo "$as_me:10014: \$? = $ac_status" >&5
84e70f78
KR
10015 (exit $ac_status); } &&
10016 { ac_try='test -s conftest$ac_exeext'
138f0859 10017 { (eval echo "$as_me:10017: \"$ac_try\"") >&5
84e70f78
KR
10018 (eval $ac_try) 2>&5
10019 ac_status=$?
138f0859 10020 echo "$as_me:10020: \$? = $ac_status" >&5
84e70f78
KR
10021 (exit $ac_status); }; }; then
10022 ac_cv_func_res_send=yes
10023else
10024 echo "$as_me: failed program was:" >&5
10025cat conftest.$ac_ext >&5
10026ac_cv_func_res_send=no
10027fi
10028rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10029fi
138f0859 10030echo "$as_me:10030: result: $ac_cv_func_res_send" >&5
84e70f78
KR
10031echo "${ECHO_T}$ac_cv_func_res_send" >&6
10032if test $ac_cv_func_res_send = yes; then
10033 :
10034else
138f0859 10035 echo "$as_me:10035: checking for __res_send" >&5
84e70f78
KR
10036echo $ECHO_N "checking for __res_send... $ECHO_C" >&6
10037if test "${ac_cv_func___res_send+set}" = set; then
10038 echo $ECHO_N "(cached) $ECHO_C" >&6
10039else
10040 cat >conftest.$ac_ext <<_ACEOF
138f0859 10041#line 10041 "configure"
84e70f78
KR
10042#include "confdefs.h"
10043/* System header to define __stub macros and hopefully few prototypes,
10044 which can conflict with char __res_send (); below. */
10045#include <assert.h>
10046/* Override any gcc2 internal prototype to avoid an error. */
10047#ifdef __cplusplus
10048extern "C"
10049#endif
10050/* We use char because int might match the return type of a gcc2
10051 builtin and then its argument prototype would still apply. */
10052char __res_send ();
10053char (*f) ();
10054
10055int
10056main ()
10057{
10058/* The GNU C library defines this for functions which it implements
10059 to always fail with ENOSYS. Some functions are actually named
10060 something starting with __ and the normal name is an alias. */
10061#if defined (__stub___res_send) || defined (__stub_____res_send)
10062choke me
10063#else
10064f = __res_send;
10065#endif
10066
10067 ;
10068 return 0;
10069}
10070_ACEOF
10071rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 10072if { (eval echo "$as_me:10072: \"$ac_link\"") >&5
84e70f78
KR
10073 (eval $ac_link) 2>&5
10074 ac_status=$?
138f0859 10075 echo "$as_me:10075: \$? = $ac_status" >&5
84e70f78
KR
10076 (exit $ac_status); } &&
10077 { ac_try='test -s conftest$ac_exeext'
138f0859 10078 { (eval echo "$as_me:10078: \"$ac_try\"") >&5
84e70f78
KR
10079 (eval $ac_try) 2>&5
10080 ac_status=$?
138f0859 10081 echo "$as_me:10081: \$? = $ac_status" >&5
84e70f78
KR
10082 (exit $ac_status); }; }; then
10083 ac_cv_func___res_send=yes
10084else
10085 echo "$as_me: failed program was:" >&5
10086cat conftest.$ac_ext >&5
10087ac_cv_func___res_send=no
10088fi
10089rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10090fi
138f0859 10091echo "$as_me:10091: result: $ac_cv_func___res_send" >&5
84e70f78
KR
10092echo "${ECHO_T}$ac_cv_func___res_send" >&6
10093if test $ac_cv_func___res_send = yes; then
10094 :
10095else
138f0859 10096 echo "$as_me:10096: checking for res_send in -lresolv" >&5
84e70f78
KR
10097echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6
10098if test "${ac_cv_lib_resolv_res_send+set}" = set; then
10099 echo $ECHO_N "(cached) $ECHO_C" >&6
10100else
10101 ac_check_lib_save_LIBS=$LIBS
10102LIBS="-lresolv $LIBS"
10103cat >conftest.$ac_ext <<_ACEOF
138f0859 10104#line 10104 "configure"
84e70f78
KR
10105#include "confdefs.h"
10106
10107/* Override any gcc2 internal prototype to avoid an error. */
10108#ifdef __cplusplus
10109extern "C"
10110#endif
10111/* We use char because int might match the return type of a gcc2
10112 builtin and then its argument prototype would still apply. */
10113char res_send ();
10114int
10115main ()
10116{
10117res_send ();
10118 ;
10119 return 0;
10120}
10121_ACEOF
10122rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 10123if { (eval echo "$as_me:10123: \"$ac_link\"") >&5
84e70f78
KR
10124 (eval $ac_link) 2>&5
10125 ac_status=$?
138f0859 10126 echo "$as_me:10126: \$? = $ac_status" >&5
84e70f78
KR
10127 (exit $ac_status); } &&
10128 { ac_try='test -s conftest$ac_exeext'
138f0859 10129 { (eval echo "$as_me:10129: \"$ac_try\"") >&5
84e70f78
KR
10130 (eval $ac_try) 2>&5
10131 ac_status=$?
138f0859 10132 echo "$as_me:10132: \$? = $ac_status" >&5
84e70f78
KR
10133 (exit $ac_status); }; }; then
10134 ac_cv_lib_resolv_res_send=yes
10135else
10136 echo "$as_me: failed program was:" >&5
10137cat conftest.$ac_ext >&5
10138ac_cv_lib_resolv_res_send=no
10139fi
10140rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10141LIBS=$ac_check_lib_save_LIBS
10142fi
138f0859 10143echo "$as_me:10143: result: $ac_cv_lib_resolv_res_send" >&5
84e70f78
KR
10144echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6
10145if test $ac_cv_lib_resolv_res_send = yes; then
10146 resolv=yes
10147else
138f0859 10148 echo "$as_me:10148: checking for __res_send in -lresolv" >&5
84e70f78
KR
10149echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6
10150if test "${ac_cv_lib_resolv___res_send+set}" = set; then
10151 echo $ECHO_N "(cached) $ECHO_C" >&6
10152else
10153 ac_check_lib_save_LIBS=$LIBS
10154LIBS="-lresolv $LIBS"
10155cat >conftest.$ac_ext <<_ACEOF
138f0859 10156#line 10156 "configure"
84e70f78
KR
10157#include "confdefs.h"
10158
10159/* Override any gcc2 internal prototype to avoid an error. */
10160#ifdef __cplusplus
10161extern "C"
10162#endif
10163/* We use char because int might match the return type of a gcc2
10164 builtin and then its argument prototype would still apply. */
10165char __res_send ();
10166int
10167main ()
10168{
10169__res_send ();
10170 ;
10171 return 0;
10172}
10173_ACEOF
10174rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 10175if { (eval echo "$as_me:10175: \"$ac_link\"") >&5
84e70f78
KR
10176 (eval $ac_link) 2>&5
10177 ac_status=$?
138f0859 10178 echo "$as_me:10178: \$? = $ac_status" >&5
84e70f78
KR
10179 (exit $ac_status); } &&
10180 { ac_try='test -s conftest$ac_exeext'
138f0859 10181 { (eval echo "$as_me:10181: \"$ac_try\"") >&5
84e70f78
KR
10182 (eval $ac_try) 2>&5
10183 ac_status=$?
138f0859 10184 echo "$as_me:10184: \$? = $ac_status" >&5
84e70f78
KR
10185 (exit $ac_status); }; }; then
10186 ac_cv_lib_resolv___res_send=yes
10187else
10188 echo "$as_me: failed program was:" >&5
10189cat conftest.$ac_ext >&5
10190ac_cv_lib_resolv___res_send=no
10191fi
10192rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10193LIBS=$ac_check_lib_save_LIBS
10194fi
138f0859 10195echo "$as_me:10195: result: $ac_cv_lib_resolv___res_send" >&5
84e70f78
KR
10196echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6
10197if test $ac_cv_lib_resolv___res_send = yes; then
10198 resolv=yes
10199fi
10200
10201fi
10202
10203fi
10204
10205fi
10206
10207 if test "$resolv" = yes ; then
10208 RESOLVLIB=-lresolv
10209 cat >>confdefs.h <<\EOF
10210#define HAVE_LIBRESOLV 1
10211EOF
10212
10213 else
10214 RESOLVLIB=
10215 fi
138f0859 10216 echo "$as_me:10216: checking for hes_getmailhost" >&5
84e70f78
KR
10217echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6
10218if test "${ac_cv_func_hes_getmailhost+set}" = set; then
10219 echo $ECHO_N "(cached) $ECHO_C" >&6
10220else
10221 cat >conftest.$ac_ext <<_ACEOF
138f0859 10222#line 10222 "configure"
84e70f78
KR
10223#include "confdefs.h"
10224/* System header to define __stub macros and hopefully few prototypes,
10225 which can conflict with char hes_getmailhost (); below. */
10226#include <assert.h>
10227/* Override any gcc2 internal prototype to avoid an error. */
10228#ifdef __cplusplus
10229extern "C"
10230#endif
10231/* We use char because int might match the return type of a gcc2
10232 builtin and then its argument prototype would still apply. */
10233char hes_getmailhost ();
10234char (*f) ();
10235
10236int
10237main ()
10238{
10239/* The GNU C library defines this for functions which it implements
10240 to always fail with ENOSYS. Some functions are actually named
10241 something starting with __ and the normal name is an alias. */
10242#if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
10243choke me
10244#else
10245f = hes_getmailhost;
10246#endif
10247
10248 ;
10249 return 0;
10250}
10251_ACEOF
10252rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 10253if { (eval echo "$as_me:10253: \"$ac_link\"") >&5
84e70f78
KR
10254 (eval $ac_link) 2>&5
10255 ac_status=$?
138f0859 10256 echo "$as_me:10256: \$? = $ac_status" >&5
84e70f78
KR
10257 (exit $ac_status); } &&
10258 { ac_try='test -s conftest$ac_exeext'
138f0859 10259 { (eval echo "$as_me:10259: \"$ac_try\"") >&5
84e70f78
KR
10260 (eval $ac_try) 2>&5
10261 ac_status=$?
138f0859 10262 echo "$as_me:10262: \$? = $ac_status" >&5
84e70f78
KR
10263 (exit $ac_status); }; }; then
10264 ac_cv_func_hes_getmailhost=yes
10265else
10266 echo "$as_me: failed program was:" >&5
10267cat conftest.$ac_ext >&5
10268ac_cv_func_hes_getmailhost=no
10269fi
10270rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10271fi
138f0859 10272echo "$as_me:10272: result: $ac_cv_func_hes_getmailhost" >&5
84e70f78
KR
10273echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6
10274if test $ac_cv_func_hes_getmailhost = yes; then
10275 :
10276else
138f0859 10277 echo "$as_me:10277: checking for hes_getmailhost in -lhesiod" >&5
84e70f78
KR
10278echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6
10279if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
10280 echo $ECHO_N "(cached) $ECHO_C" >&6
10281else
10282 ac_check_lib_save_LIBS=$LIBS
10283LIBS="-lhesiod $RESOLVLIB $LIBS"
10284cat >conftest.$ac_ext <<_ACEOF
138f0859 10285#line 10285 "configure"
84e70f78
KR
10286#include "confdefs.h"
10287
10288/* Override any gcc2 internal prototype to avoid an error. */
10289#ifdef __cplusplus
10290extern "C"
10291#endif
10292/* We use char because int might match the return type of a gcc2
10293 builtin and then its argument prototype would still apply. */
10294char hes_getmailhost ();
10295int
10296main ()
10297{
10298hes_getmailhost ();
10299 ;
10300 return 0;
10301}
10302_ACEOF
10303rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 10304if { (eval echo "$as_me:10304: \"$ac_link\"") >&5
84e70f78
KR
10305 (eval $ac_link) 2>&5
10306 ac_status=$?
138f0859 10307 echo "$as_me:10307: \$? = $ac_status" >&5
84e70f78
KR
10308 (exit $ac_status); } &&
10309 { ac_try='test -s conftest$ac_exeext'
138f0859 10310 { (eval echo "$as_me:10310: \"$ac_try\"") >&5
84e70f78
KR
10311 (eval $ac_try) 2>&5
10312 ac_status=$?
138f0859 10313 echo "$as_me:10313: \$? = $ac_status" >&5
84e70f78
KR
10314 (exit $ac_status); }; }; then
10315 ac_cv_lib_hesiod_hes_getmailhost=yes
10316else
10317 echo "$as_me: failed program was:" >&5
10318cat conftest.$ac_ext >&5
10319ac_cv_lib_hesiod_hes_getmailhost=no
10320fi
10321rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10322LIBS=$ac_check_lib_save_LIBS
10323fi
138f0859 10324echo "$as_me:10324: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
84e70f78
KR
10325echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6
10326if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
10327 cat >>confdefs.h <<\EOF
10328#define HAVE_LIBHESIOD 1
10329EOF
10330
10331else
10332 :
10333fi
10334
10335fi
10336
10337fi
10338
a21616bd
KR
10339# These tell us which Kerberos-related libraries to use.
10340if test "${with_kerberos+set}" = set; then
503d2be0 10341
138f0859 10342echo "$as_me:10342: checking for com_err in -lcom_err" >&5
503d2be0
AS
10343echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
10344if test "${ac_cv_lib_com_err_com_err+set}" = set; then
10345 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10346else
503d2be0 10347 ac_check_lib_save_LIBS=$LIBS
a21616bd 10348LIBS="-lcom_err $LIBS"
503d2be0 10349cat >conftest.$ac_ext <<_ACEOF
138f0859 10350#line 10350 "configure"
a21616bd 10351#include "confdefs.h"
503d2be0 10352
a21616bd 10353/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10354#ifdef __cplusplus
10355extern "C"
10356#endif
a21616bd 10357/* We use char because int might match the return type of a gcc2
503d2be0
AS
10358 builtin and then its argument prototype would still apply. */
10359char com_err ();
10360int
10361main ()
10362{
10363com_err ();
10364 ;
10365 return 0;
10366}
10367_ACEOF
10368rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 10369if { (eval echo "$as_me:10369: \"$ac_link\"") >&5
503d2be0
AS
10370 (eval $ac_link) 2>&5
10371 ac_status=$?
138f0859 10372 echo "$as_me:10372: \$? = $ac_status" >&5
503d2be0
AS
10373 (exit $ac_status); } &&
10374 { ac_try='test -s conftest$ac_exeext'
138f0859 10375 { (eval echo "$as_me:10375: \"$ac_try\"") >&5
503d2be0
AS
10376 (eval $ac_try) 2>&5
10377 ac_status=$?
138f0859 10378 echo "$as_me:10378: \$? = $ac_status" >&5
503d2be0
AS
10379 (exit $ac_status); }; }; then
10380 ac_cv_lib_com_err_com_err=yes
10381else
10382 echo "$as_me: failed program was:" >&5
10383cat conftest.$ac_ext >&5
10384ac_cv_lib_com_err_com_err=no
10385fi
10386rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10387LIBS=$ac_check_lib_save_LIBS
10388fi
138f0859 10389echo "$as_me:10389: result: $ac_cv_lib_com_err_com_err" >&5
503d2be0
AS
10390echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
10391if test $ac_cv_lib_com_err_com_err = yes; then
10392 cat >>confdefs.h <<EOF
10393#define HAVE_LIBCOM_ERR 1
a21616bd
KR
10394EOF
10395
10396 LIBS="-lcom_err $LIBS"
10397
a21616bd
KR
10398fi
10399
138f0859 10400echo "$as_me:10400: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
503d2be0
AS
10401echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6
10402if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
10403 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10404else
503d2be0 10405 ac_check_lib_save_LIBS=$LIBS
a21616bd 10406LIBS="-lk5crypto $LIBS"
503d2be0 10407cat >conftest.$ac_ext <<_ACEOF
138f0859 10408#line 10408 "configure"
a21616bd 10409#include "confdefs.h"
503d2be0 10410
a21616bd 10411/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10412#ifdef __cplusplus
10413extern "C"
10414#endif
a21616bd 10415/* We use char because int might match the return type of a gcc2
503d2be0
AS
10416 builtin and then its argument prototype would still apply. */
10417char mit_des_cbc_encrypt ();
10418int
10419main ()
10420{
10421mit_des_cbc_encrypt ();
10422 ;
10423 return 0;
10424}
10425_ACEOF
10426rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 10427if { (eval echo "$as_me:10427: \"$ac_link\"") >&5
503d2be0
AS
10428 (eval $ac_link) 2>&5
10429 ac_status=$?
138f0859 10430 echo "$as_me:10430: \$? = $ac_status" >&5
503d2be0
AS
10431 (exit $ac_status); } &&
10432 { ac_try='test -s conftest$ac_exeext'
138f0859 10433 { (eval echo "$as_me:10433: \"$ac_try\"") >&5
503d2be0
AS
10434 (eval $ac_try) 2>&5
10435 ac_status=$?
138f0859 10436 echo "$as_me:10436: \$? = $ac_status" >&5
503d2be0
AS
10437 (exit $ac_status); }; }; then
10438 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
10439else
10440 echo "$as_me: failed program was:" >&5
10441cat conftest.$ac_ext >&5
10442ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
10443fi
10444rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10445LIBS=$ac_check_lib_save_LIBS
10446fi
138f0859 10447echo "$as_me:10447: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
10448echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6
10449if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
10450 cat >>confdefs.h <<EOF
10451#define HAVE_LIBK5CRYPTO 1
a21616bd
KR
10452EOF
10453
10454 LIBS="-lk5crypto $LIBS"
10455
a21616bd
KR
10456fi
10457
138f0859 10458echo "$as_me:10458: checking for mit_des_cbc_encrypt in -lcrypto" >&5
503d2be0
AS
10459echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6
10460if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
10461 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10462else
503d2be0 10463 ac_check_lib_save_LIBS=$LIBS
a21616bd 10464LIBS="-lcrypto $LIBS"
503d2be0 10465cat >conftest.$ac_ext <<_ACEOF
138f0859 10466#line 10466 "configure"
a21616bd 10467#include "confdefs.h"
503d2be0 10468
a21616bd 10469/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10470#ifdef __cplusplus
10471extern "C"
10472#endif
a21616bd 10473/* We use char because int might match the return type of a gcc2
503d2be0
AS
10474 builtin and then its argument prototype would still apply. */
10475char mit_des_cbc_encrypt ();
10476int
10477main ()
10478{
10479mit_des_cbc_encrypt ();
10480 ;
10481 return 0;
10482}
10483_ACEOF
10484rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 10485if { (eval echo "$as_me:10485: \"$ac_link\"") >&5
503d2be0
AS
10486 (eval $ac_link) 2>&5
10487 ac_status=$?
138f0859 10488 echo "$as_me:10488: \$? = $ac_status" >&5
503d2be0
AS
10489 (exit $ac_status); } &&
10490 { ac_try='test -s conftest$ac_exeext'
138f0859 10491 { (eval echo "$as_me:10491: \"$ac_try\"") >&5
503d2be0
AS
10492 (eval $ac_try) 2>&5
10493 ac_status=$?
138f0859 10494 echo "$as_me:10494: \$? = $ac_status" >&5
503d2be0
AS
10495 (exit $ac_status); }; }; then
10496 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
10497else
10498 echo "$as_me: failed program was:" >&5
10499cat conftest.$ac_ext >&5
10500ac_cv_lib_crypto_mit_des_cbc_encrypt=no
10501fi
10502rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10503LIBS=$ac_check_lib_save_LIBS
10504fi
138f0859 10505echo "$as_me:10505: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
10506echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6
10507if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
10508 cat >>confdefs.h <<EOF
10509#define HAVE_LIBCRYPTO 1
a21616bd
KR
10510EOF
10511
10512 LIBS="-lcrypto $LIBS"
10513
a21616bd
KR
10514fi
10515
138f0859 10516echo "$as_me:10516: checking for krb5_init_context in -lkrb5" >&5
503d2be0
AS
10517echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6
10518if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
10519 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10520else
503d2be0 10521 ac_check_lib_save_LIBS=$LIBS
a21616bd 10522LIBS="-lkrb5 $LIBS"
503d2be0 10523cat >conftest.$ac_ext <<_ACEOF
138f0859 10524#line 10524 "configure"
a21616bd 10525#include "confdefs.h"
a21616bd 10526
503d2be0
AS
10527/* Override any gcc2 internal prototype to avoid an error. */
10528#ifdef __cplusplus
10529extern "C"
10530#endif
10531/* We use char because int might match the return type of a gcc2
10532 builtin and then its argument prototype would still apply. */
10533char krb5_init_context ();
10534int
10535main ()
10536{
10537krb5_init_context ();
10538 ;
10539 return 0;
10540}
10541_ACEOF
10542rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 10543if { (eval echo "$as_me:10543: \"$ac_link\"") >&5
503d2be0
AS
10544 (eval $ac_link) 2>&5
10545 ac_status=$?
138f0859 10546 echo "$as_me:10546: \$? = $ac_status" >&5
503d2be0
AS
10547 (exit $ac_status); } &&
10548 { ac_try='test -s conftest$ac_exeext'
138f0859 10549 { (eval echo "$as_me:10549: \"$ac_try\"") >&5
503d2be0
AS
10550 (eval $ac_try) 2>&5
10551 ac_status=$?
138f0859 10552 echo "$as_me:10552: \$? = $ac_status" >&5
503d2be0
AS
10553 (exit $ac_status); }; }; then
10554 ac_cv_lib_krb5_krb5_init_context=yes
10555else
10556 echo "$as_me: failed program was:" >&5
10557cat conftest.$ac_ext >&5
10558ac_cv_lib_krb5_krb5_init_context=no
10559fi
10560rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10561LIBS=$ac_check_lib_save_LIBS
10562fi
138f0859 10563echo "$as_me:10563: result: $ac_cv_lib_krb5_krb5_init_context" >&5
503d2be0
AS
10564echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6
10565if test $ac_cv_lib_krb5_krb5_init_context = yes; then
10566 cat >>confdefs.h <<EOF
10567#define HAVE_LIBKRB5 1
a21616bd
KR
10568EOF
10569
10570 LIBS="-lkrb5 $LIBS"
10571
a21616bd
KR
10572fi
10573
10574 if test "${with_kerberos5+set}" != set; then
503d2be0 10575
138f0859 10576echo "$as_me:10576: checking for des_cbc_encrypt in -ldes425" >&5
503d2be0
AS
10577echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
10578if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
10579 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10580else
503d2be0 10581 ac_check_lib_save_LIBS=$LIBS
a21616bd 10582LIBS="-ldes425 $LIBS"
503d2be0 10583cat >conftest.$ac_ext <<_ACEOF
138f0859 10584#line 10584 "configure"
a21616bd 10585#include "confdefs.h"
503d2be0 10586
a21616bd 10587/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10588#ifdef __cplusplus
10589extern "C"
10590#endif
a21616bd 10591/* We use char because int might match the return type of a gcc2
503d2be0
AS
10592 builtin and then its argument prototype would still apply. */
10593char des_cbc_encrypt ();
10594int
10595main ()
10596{
10597des_cbc_encrypt ();
10598 ;
10599 return 0;
10600}
10601_ACEOF
10602rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 10603if { (eval echo "$as_me:10603: \"$ac_link\"") >&5
503d2be0
AS
10604 (eval $ac_link) 2>&5
10605 ac_status=$?
138f0859 10606 echo "$as_me:10606: \$? = $ac_status" >&5
503d2be0
AS
10607 (exit $ac_status); } &&
10608 { ac_try='test -s conftest$ac_exeext'
138f0859 10609 { (eval echo "$as_me:10609: \"$ac_try\"") >&5
503d2be0
AS
10610 (eval $ac_try) 2>&5
10611 ac_status=$?
138f0859 10612 echo "$as_me:10612: \$? = $ac_status" >&5
503d2be0
AS
10613 (exit $ac_status); }; }; then
10614 ac_cv_lib_des425_des_cbc_encrypt=yes
10615else
10616 echo "$as_me: failed program was:" >&5
10617cat conftest.$ac_ext >&5
10618ac_cv_lib_des425_des_cbc_encrypt=no
10619fi
10620rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10621LIBS=$ac_check_lib_save_LIBS
10622fi
138f0859 10623echo "$as_me:10623: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
503d2be0
AS
10624echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
10625if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
10626 cat >>confdefs.h <<EOF
10627#define HAVE_LIBDES425 1
a21616bd
KR
10628EOF
10629
10630 LIBS="-ldes425 $LIBS"
10631
10632else
503d2be0 10633
138f0859 10634echo "$as_me:10634: checking for des_cbc_encrypt in -ldes" >&5
503d2be0
AS
10635echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
10636if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
10637 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10638else
503d2be0 10639 ac_check_lib_save_LIBS=$LIBS
a21616bd 10640LIBS="-ldes $LIBS"
503d2be0 10641cat >conftest.$ac_ext <<_ACEOF
138f0859 10642#line 10642 "configure"
a21616bd 10643#include "confdefs.h"
503d2be0 10644
a21616bd 10645/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10646#ifdef __cplusplus
10647extern "C"
10648#endif
a21616bd 10649/* We use char because int might match the return type of a gcc2
503d2be0
AS
10650 builtin and then its argument prototype would still apply. */
10651char des_cbc_encrypt ();
10652int
10653main ()
10654{
10655des_cbc_encrypt ();
10656 ;
10657 return 0;
10658}
10659_ACEOF
10660rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 10661if { (eval echo "$as_me:10661: \"$ac_link\"") >&5
503d2be0
AS
10662 (eval $ac_link) 2>&5
10663 ac_status=$?
138f0859 10664 echo "$as_me:10664: \$? = $ac_status" >&5
503d2be0
AS
10665 (exit $ac_status); } &&
10666 { ac_try='test -s conftest$ac_exeext'
138f0859 10667 { (eval echo "$as_me:10667: \"$ac_try\"") >&5
503d2be0
AS
10668 (eval $ac_try) 2>&5
10669 ac_status=$?
138f0859 10670 echo "$as_me:10670: \$? = $ac_status" >&5
503d2be0
AS
10671 (exit $ac_status); }; }; then
10672 ac_cv_lib_des_des_cbc_encrypt=yes
10673else
10674 echo "$as_me: failed program was:" >&5
10675cat conftest.$ac_ext >&5
10676ac_cv_lib_des_des_cbc_encrypt=no
10677fi
10678rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10679LIBS=$ac_check_lib_save_LIBS
10680fi
138f0859 10681echo "$as_me:10681: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
503d2be0
AS
10682echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
10683if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
10684 cat >>confdefs.h <<EOF
10685#define HAVE_LIBDES 1
a21616bd
KR
10686EOF
10687
10688 LIBS="-ldes $LIBS"
10689
a21616bd
KR
10690fi
10691
10692fi
10693
138f0859 10694echo "$as_me:10694: checking for krb_get_cred in -lkrb4" >&5
503d2be0
AS
10695echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6
10696if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
10697 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10698else
503d2be0 10699 ac_check_lib_save_LIBS=$LIBS
a21616bd 10700LIBS="-lkrb4 $LIBS"
503d2be0 10701cat >conftest.$ac_ext <<_ACEOF
138f0859 10702#line 10702 "configure"
a21616bd 10703#include "confdefs.h"
503d2be0 10704
a21616bd 10705/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10706#ifdef __cplusplus
10707extern "C"
10708#endif
a21616bd 10709/* We use char because int might match the return type of a gcc2
503d2be0
AS
10710 builtin and then its argument prototype would still apply. */
10711char krb_get_cred ();
10712int
10713main ()
10714{
10715krb_get_cred ();
10716 ;
10717 return 0;
10718}
10719_ACEOF
10720rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 10721if { (eval echo "$as_me:10721: \"$ac_link\"") >&5
503d2be0
AS
10722 (eval $ac_link) 2>&5
10723 ac_status=$?
138f0859 10724 echo "$as_me:10724: \$? = $ac_status" >&5
503d2be0
AS
10725 (exit $ac_status); } &&
10726 { ac_try='test -s conftest$ac_exeext'
138f0859 10727 { (eval echo "$as_me:10727: \"$ac_try\"") >&5
503d2be0
AS
10728 (eval $ac_try) 2>&5
10729 ac_status=$?
138f0859 10730 echo "$as_me:10730: \$? = $ac_status" >&5
503d2be0
AS
10731 (exit $ac_status); }; }; then
10732 ac_cv_lib_krb4_krb_get_cred=yes
10733else
10734 echo "$as_me: failed program was:" >&5
10735cat conftest.$ac_ext >&5
10736ac_cv_lib_krb4_krb_get_cred=no
10737fi
10738rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10739LIBS=$ac_check_lib_save_LIBS
10740fi
138f0859 10741echo "$as_me:10741: result: $ac_cv_lib_krb4_krb_get_cred" >&5
503d2be0
AS
10742echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6
10743if test $ac_cv_lib_krb4_krb_get_cred = yes; then
10744 cat >>confdefs.h <<EOF
10745#define HAVE_LIBKRB4 1
a21616bd
KR
10746EOF
10747
10748 LIBS="-lkrb4 $LIBS"
10749
10750else
503d2be0 10751
138f0859 10752echo "$as_me:10752: checking for krb_get_cred in -lkrb" >&5
503d2be0
AS
10753echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6
10754if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
10755 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10756else
503d2be0 10757 ac_check_lib_save_LIBS=$LIBS
a21616bd 10758LIBS="-lkrb $LIBS"
503d2be0 10759cat >conftest.$ac_ext <<_ACEOF
138f0859 10760#line 10760 "configure"
a21616bd 10761#include "confdefs.h"
503d2be0 10762
a21616bd 10763/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10764#ifdef __cplusplus
10765extern "C"
10766#endif
a21616bd 10767/* We use char because int might match the return type of a gcc2
503d2be0
AS
10768 builtin and then its argument prototype would still apply. */
10769char krb_get_cred ();
10770int
10771main ()
10772{
10773krb_get_cred ();
10774 ;
10775 return 0;
10776}
10777_ACEOF
10778rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 10779if { (eval echo "$as_me:10779: \"$ac_link\"") >&5
503d2be0
AS
10780 (eval $ac_link) 2>&5
10781 ac_status=$?
138f0859 10782 echo "$as_me:10782: \$? = $ac_status" >&5
503d2be0
AS
10783 (exit $ac_status); } &&
10784 { ac_try='test -s conftest$ac_exeext'
138f0859 10785 { (eval echo "$as_me:10785: \"$ac_try\"") >&5
503d2be0
AS
10786 (eval $ac_try) 2>&5
10787 ac_status=$?
138f0859 10788 echo "$as_me:10788: \$? = $ac_status" >&5
503d2be0
AS
10789 (exit $ac_status); }; }; then
10790 ac_cv_lib_krb_krb_get_cred=yes
10791else
10792 echo "$as_me: failed program was:" >&5
10793cat conftest.$ac_ext >&5
10794ac_cv_lib_krb_krb_get_cred=no
10795fi
10796rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10797LIBS=$ac_check_lib_save_LIBS
10798fi
138f0859 10799echo "$as_me:10799: result: $ac_cv_lib_krb_krb_get_cred" >&5
503d2be0
AS
10800echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6
10801if test $ac_cv_lib_krb_krb_get_cred = yes; then
10802 cat >>confdefs.h <<EOF
10803#define HAVE_LIBKRB 1
a21616bd
KR
10804EOF
10805
10806 LIBS="-lkrb $LIBS"
10807
a21616bd
KR
10808fi
10809
10810fi
10811
10812 fi
10813
10814 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
10815
10816for ac_header in krb5.h
a21616bd 10817do
503d2be0 10818as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
138f0859 10819echo "$as_me:10819: checking for $ac_header" >&5
503d2be0
AS
10820echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10821if eval "test \"\${$as_ac_Header+set}\" = set"; then
10822 echo $ECHO_N "(cached) $ECHO_C" >&6
10823else
10824 cat >conftest.$ac_ext <<_ACEOF
138f0859 10825#line 10825 "configure"
503d2be0
AS
10826#include "confdefs.h"
10827#include <$ac_header>
10828_ACEOF
138f0859 10829if { (eval echo "$as_me:10829: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
10830 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10831 ac_status=$?
10832 egrep -v '^ *\+' conftest.er1 >conftest.err
10833 rm -f conftest.er1
10834 cat conftest.err >&5
138f0859 10835 echo "$as_me:10835: \$? = $ac_status" >&5
503d2be0
AS
10836 (exit $ac_status); } >/dev/null; then
10837 if test -s conftest.err; then
10838 ac_cpp_err=$ac_c_preproc_warn_flag
10839 else
10840 ac_cpp_err=
10841 fi
10842else
10843 ac_cpp_err=yes
10844fi
10845if test -z "$ac_cpp_err"; then
10846 eval "$as_ac_Header=yes"
10847else
10848 echo "$as_me: failed program was:" >&5
a21616bd 10849 cat conftest.$ac_ext >&5
503d2be0 10850 eval "$as_ac_Header=no"
a21616bd 10851fi
503d2be0 10852rm -f conftest.err conftest.$ac_ext
a21616bd 10853fi
138f0859 10854echo "$as_me:10854: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
10855echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10856if test `eval echo '${'$as_ac_Header'}'` = yes; then
10857 cat >>confdefs.h <<EOF
10858#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 10859EOF
503d2be0 10860
a21616bd
KR
10861fi
10862done
10863
10864 else
503d2be0
AS
10865
10866for ac_header in des.h
a21616bd 10867do
503d2be0 10868as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
138f0859 10869echo "$as_me:10869: checking for $ac_header" >&5
503d2be0
AS
10870echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10871if eval "test \"\${$as_ac_Header+set}\" = set"; then
10872 echo $ECHO_N "(cached) $ECHO_C" >&6
10873else
10874 cat >conftest.$ac_ext <<_ACEOF
138f0859 10875#line 10875 "configure"
503d2be0
AS
10876#include "confdefs.h"
10877#include <$ac_header>
10878_ACEOF
138f0859 10879if { (eval echo "$as_me:10879: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
10880 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10881 ac_status=$?
10882 egrep -v '^ *\+' conftest.er1 >conftest.err
10883 rm -f conftest.er1
10884 cat conftest.err >&5
138f0859 10885 echo "$as_me:10885: \$? = $ac_status" >&5
503d2be0
AS
10886 (exit $ac_status); } >/dev/null; then
10887 if test -s conftest.err; then
10888 ac_cpp_err=$ac_c_preproc_warn_flag
10889 else
10890 ac_cpp_err=
10891 fi
10892else
10893 ac_cpp_err=yes
10894fi
10895if test -z "$ac_cpp_err"; then
10896 eval "$as_ac_Header=yes"
10897else
10898 echo "$as_me: failed program was:" >&5
a21616bd 10899 cat conftest.$ac_ext >&5
503d2be0 10900 eval "$as_ac_Header=no"
a21616bd 10901fi
503d2be0 10902rm -f conftest.err conftest.$ac_ext
a21616bd 10903fi
138f0859 10904echo "$as_me:10904: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
10905echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10906if test `eval echo '${'$as_ac_Header'}'` = yes; then
10907 cat >>confdefs.h <<EOF
10908#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 10909EOF
503d2be0 10910
a21616bd 10911else
503d2be0
AS
10912
10913for ac_header in kerberosIV/des.h
a21616bd 10914do
503d2be0 10915as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
138f0859 10916echo "$as_me:10916: checking for $ac_header" >&5
503d2be0
AS
10917echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10918if eval "test \"\${$as_ac_Header+set}\" = set"; then
10919 echo $ECHO_N "(cached) $ECHO_C" >&6
10920else
10921 cat >conftest.$ac_ext <<_ACEOF
138f0859 10922#line 10922 "configure"
503d2be0
AS
10923#include "confdefs.h"
10924#include <$ac_header>
10925_ACEOF
138f0859 10926if { (eval echo "$as_me:10926: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
10927 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10928 ac_status=$?
10929 egrep -v '^ *\+' conftest.er1 >conftest.err
10930 rm -f conftest.er1
10931 cat conftest.err >&5
138f0859 10932 echo "$as_me:10932: \$? = $ac_status" >&5
503d2be0
AS
10933 (exit $ac_status); } >/dev/null; then
10934 if test -s conftest.err; then
10935 ac_cpp_err=$ac_c_preproc_warn_flag
10936 else
10937 ac_cpp_err=
10938 fi
10939else
10940 ac_cpp_err=yes
10941fi
10942if test -z "$ac_cpp_err"; then
10943 eval "$as_ac_Header=yes"
10944else
10945 echo "$as_me: failed program was:" >&5
a21616bd 10946 cat conftest.$ac_ext >&5
503d2be0 10947 eval "$as_ac_Header=no"
a21616bd 10948fi
503d2be0 10949rm -f conftest.err conftest.$ac_ext
a21616bd 10950fi
138f0859 10951echo "$as_me:10951: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
10952echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10953if test `eval echo '${'$as_ac_Header'}'` = yes; then
10954 cat >>confdefs.h <<EOF
10955#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 10956EOF
503d2be0 10957
a21616bd 10958else
503d2be0
AS
10959
10960for ac_header in kerberos/des.h
a21616bd 10961do
503d2be0 10962as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
138f0859 10963echo "$as_me:10963: checking for $ac_header" >&5
503d2be0
AS
10964echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10965if eval "test \"\${$as_ac_Header+set}\" = set"; then
10966 echo $ECHO_N "(cached) $ECHO_C" >&6
10967else
10968 cat >conftest.$ac_ext <<_ACEOF
138f0859 10969#line 10969 "configure"
503d2be0
AS
10970#include "confdefs.h"
10971#include <$ac_header>
10972_ACEOF
138f0859 10973if { (eval echo "$as_me:10973: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
10974 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10975 ac_status=$?
10976 egrep -v '^ *\+' conftest.er1 >conftest.err
10977 rm -f conftest.er1
10978 cat conftest.err >&5
138f0859 10979 echo "$as_me:10979: \$? = $ac_status" >&5
503d2be0
AS
10980 (exit $ac_status); } >/dev/null; then
10981 if test -s conftest.err; then
10982 ac_cpp_err=$ac_c_preproc_warn_flag
10983 else
10984 ac_cpp_err=
10985 fi
10986else
10987 ac_cpp_err=yes
10988fi
10989if test -z "$ac_cpp_err"; then
10990 eval "$as_ac_Header=yes"
10991else
10992 echo "$as_me: failed program was:" >&5
a21616bd 10993 cat conftest.$ac_ext >&5
503d2be0 10994 eval "$as_ac_Header=no"
a21616bd 10995fi
503d2be0 10996rm -f conftest.err conftest.$ac_ext
a21616bd 10997fi
138f0859 10998echo "$as_me:10998: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
10999echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11000if test `eval echo '${'$as_ac_Header'}'` = yes; then
11001 cat >>confdefs.h <<EOF
11002#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 11003EOF
503d2be0 11004
a21616bd
KR
11005fi
11006done
11007
11008fi
11009done
11010
11011fi
11012done
11013
503d2be0 11014for ac_header in krb.h
a21616bd 11015do
503d2be0 11016as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
138f0859 11017echo "$as_me:11017: checking for $ac_header" >&5
503d2be0
AS
11018echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11019if eval "test \"\${$as_ac_Header+set}\" = set"; then
11020 echo $ECHO_N "(cached) $ECHO_C" >&6
11021else
11022 cat >conftest.$ac_ext <<_ACEOF
138f0859 11023#line 11023 "configure"
503d2be0
AS
11024#include "confdefs.h"
11025#include <$ac_header>
11026_ACEOF
138f0859 11027if { (eval echo "$as_me:11027: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11028 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11029 ac_status=$?
11030 egrep -v '^ *\+' conftest.er1 >conftest.err
11031 rm -f conftest.er1
11032 cat conftest.err >&5
138f0859 11033 echo "$as_me:11033: \$? = $ac_status" >&5
503d2be0
AS
11034 (exit $ac_status); } >/dev/null; then
11035 if test -s conftest.err; then
11036 ac_cpp_err=$ac_c_preproc_warn_flag
11037 else
11038 ac_cpp_err=
11039 fi
11040else
11041 ac_cpp_err=yes
11042fi
11043if test -z "$ac_cpp_err"; then
11044 eval "$as_ac_Header=yes"
11045else
11046 echo "$as_me: failed program was:" >&5
a21616bd 11047 cat conftest.$ac_ext >&5
503d2be0 11048 eval "$as_ac_Header=no"
a21616bd 11049fi
503d2be0 11050rm -f conftest.err conftest.$ac_ext
a21616bd 11051fi
138f0859 11052echo "$as_me:11052: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11053echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11054if test `eval echo '${'$as_ac_Header'}'` = yes; then
11055 cat >>confdefs.h <<EOF
11056#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 11057EOF
503d2be0 11058
a21616bd 11059else
503d2be0
AS
11060
11061for ac_header in kerberosIV/krb.h
a21616bd 11062do
503d2be0 11063as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
138f0859 11064echo "$as_me:11064: checking for $ac_header" >&5
503d2be0
AS
11065echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11066if eval "test \"\${$as_ac_Header+set}\" = set"; then
11067 echo $ECHO_N "(cached) $ECHO_C" >&6
11068else
11069 cat >conftest.$ac_ext <<_ACEOF
138f0859 11070#line 11070 "configure"
503d2be0
AS
11071#include "confdefs.h"
11072#include <$ac_header>
11073_ACEOF
138f0859 11074if { (eval echo "$as_me:11074: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11075 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11076 ac_status=$?
11077 egrep -v '^ *\+' conftest.er1 >conftest.err
11078 rm -f conftest.er1
11079 cat conftest.err >&5
138f0859 11080 echo "$as_me:11080: \$? = $ac_status" >&5
503d2be0
AS
11081 (exit $ac_status); } >/dev/null; then
11082 if test -s conftest.err; then
11083 ac_cpp_err=$ac_c_preproc_warn_flag
11084 else
11085 ac_cpp_err=
11086 fi
11087else
11088 ac_cpp_err=yes
11089fi
11090if test -z "$ac_cpp_err"; then
11091 eval "$as_ac_Header=yes"
11092else
11093 echo "$as_me: failed program was:" >&5
a21616bd 11094 cat conftest.$ac_ext >&5
503d2be0 11095 eval "$as_ac_Header=no"
a21616bd 11096fi
503d2be0 11097rm -f conftest.err conftest.$ac_ext
a21616bd 11098fi
138f0859 11099echo "$as_me:11099: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11100echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11101if test `eval echo '${'$as_ac_Header'}'` = yes; then
11102 cat >>confdefs.h <<EOF
11103#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 11104EOF
503d2be0 11105
a21616bd 11106else
503d2be0
AS
11107
11108for ac_header in kerberos/krb.h
a21616bd 11109do
503d2be0 11110as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
138f0859 11111echo "$as_me:11111: checking for $ac_header" >&5
503d2be0
AS
11112echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11113if eval "test \"\${$as_ac_Header+set}\" = set"; then
11114 echo $ECHO_N "(cached) $ECHO_C" >&6
11115else
11116 cat >conftest.$ac_ext <<_ACEOF
138f0859 11117#line 11117 "configure"
503d2be0
AS
11118#include "confdefs.h"
11119#include <$ac_header>
11120_ACEOF
138f0859 11121if { (eval echo "$as_me:11121: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11122 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11123 ac_status=$?
11124 egrep -v '^ *\+' conftest.er1 >conftest.err
11125 rm -f conftest.er1
11126 cat conftest.err >&5
138f0859 11127 echo "$as_me:11127: \$? = $ac_status" >&5
503d2be0
AS
11128 (exit $ac_status); } >/dev/null; then
11129 if test -s conftest.err; then
11130 ac_cpp_err=$ac_c_preproc_warn_flag
11131 else
11132 ac_cpp_err=
11133 fi
11134else
11135 ac_cpp_err=yes
11136fi
11137if test -z "$ac_cpp_err"; then
11138 eval "$as_ac_Header=yes"
11139else
11140 echo "$as_me: failed program was:" >&5
a21616bd 11141 cat conftest.$ac_ext >&5
503d2be0 11142 eval "$as_ac_Header=no"
a21616bd 11143fi
503d2be0 11144rm -f conftest.err conftest.$ac_ext
a21616bd 11145fi
138f0859 11146echo "$as_me:11146: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11147echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11148if test `eval echo '${'$as_ac_Header'}'` = yes; then
11149 cat >>confdefs.h <<EOF
11150#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 11151EOF
503d2be0 11152
a21616bd
KR
11153fi
11154done
11155
11156fi
11157done
11158
11159fi
11160done
11161
11162 fi
503d2be0
AS
11163
11164for ac_header in com_err.h
a21616bd 11165do
503d2be0 11166as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
138f0859 11167echo "$as_me:11167: checking for $ac_header" >&5
503d2be0
AS
11168echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11169if eval "test \"\${$as_ac_Header+set}\" = set"; then
11170 echo $ECHO_N "(cached) $ECHO_C" >&6
11171else
11172 cat >conftest.$ac_ext <<_ACEOF
138f0859 11173#line 11173 "configure"
503d2be0
AS
11174#include "confdefs.h"
11175#include <$ac_header>
11176_ACEOF
138f0859 11177if { (eval echo "$as_me:11177: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11178 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11179 ac_status=$?
11180 egrep -v '^ *\+' conftest.er1 >conftest.err
11181 rm -f conftest.er1
11182 cat conftest.err >&5
138f0859 11183 echo "$as_me:11183: \$? = $ac_status" >&5
503d2be0
AS
11184 (exit $ac_status); } >/dev/null; then
11185 if test -s conftest.err; then
11186 ac_cpp_err=$ac_c_preproc_warn_flag
11187 else
11188 ac_cpp_err=
11189 fi
11190else
11191 ac_cpp_err=yes
11192fi
11193if test -z "$ac_cpp_err"; then
11194 eval "$as_ac_Header=yes"
11195else
11196 echo "$as_me: failed program was:" >&5
a21616bd 11197 cat conftest.$ac_ext >&5
503d2be0 11198 eval "$as_ac_Header=no"
a21616bd 11199fi
503d2be0 11200rm -f conftest.err conftest.$ac_ext
a21616bd 11201fi
138f0859 11202echo "$as_me:11202: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11203echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11204if test `eval echo '${'$as_ac_Header'}'` = yes; then
11205 cat >>confdefs.h <<EOF
11206#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 11207EOF
503d2be0 11208
a21616bd
KR
11209fi
11210done
11211
11212fi
11213
ba4481b5
DL
11214# Solaris requires -lintl if you want strerror (which calls dgettext)
11215# to return localized messages.
503d2be0 11216
138f0859 11217echo "$as_me:11217: checking for dgettext in -lintl" >&5
503d2be0
AS
11218echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
11219if test "${ac_cv_lib_intl_dgettext+set}" = set; then
11220 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11221else
503d2be0 11222 ac_check_lib_save_LIBS=$LIBS
ba4481b5 11223LIBS="-lintl $LIBS"
503d2be0 11224cat >conftest.$ac_ext <<_ACEOF
138f0859 11225#line 11225 "configure"
ba4481b5 11226#include "confdefs.h"
503d2be0 11227
ba4481b5 11228/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11229#ifdef __cplusplus
11230extern "C"
11231#endif
ba4481b5 11232/* We use char because int might match the return type of a gcc2
503d2be0
AS
11233 builtin and then its argument prototype would still apply. */
11234char dgettext ();
11235int
11236main ()
11237{
11238dgettext ();
11239 ;
11240 return 0;
11241}
11242_ACEOF
11243rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 11244if { (eval echo "$as_me:11244: \"$ac_link\"") >&5
503d2be0
AS
11245 (eval $ac_link) 2>&5
11246 ac_status=$?
138f0859 11247 echo "$as_me:11247: \$? = $ac_status" >&5
503d2be0
AS
11248 (exit $ac_status); } &&
11249 { ac_try='test -s conftest$ac_exeext'
138f0859 11250 { (eval echo "$as_me:11250: \"$ac_try\"") >&5
503d2be0
AS
11251 (eval $ac_try) 2>&5
11252 ac_status=$?
138f0859 11253 echo "$as_me:11253: \$? = $ac_status" >&5
503d2be0
AS
11254 (exit $ac_status); }; }; then
11255 ac_cv_lib_intl_dgettext=yes
11256else
11257 echo "$as_me: failed program was:" >&5
11258cat conftest.$ac_ext >&5
11259ac_cv_lib_intl_dgettext=no
11260fi
11261rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11262LIBS=$ac_check_lib_save_LIBS
11263fi
138f0859 11264echo "$as_me:11264: result: $ac_cv_lib_intl_dgettext" >&5
503d2be0
AS
11265echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
11266if test $ac_cv_lib_intl_dgettext = yes; then
11267 cat >>confdefs.h <<EOF
11268#define HAVE_LIBINTL 1
ba4481b5
DL
11269EOF
11270
11271 LIBS="-lintl $LIBS"
11272
ba4481b5
DL
11273fi
11274
138f0859 11275echo "$as_me:11275: checking whether localtime caches TZ" >&5
503d2be0
AS
11276echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6
11277if test "${emacs_cv_localtime_cache+set}" = set; then
11278 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
11279else
11280 if test x$ac_cv_func_tzset = xyes; then
11281if test "$cross_compiling" = yes; then
11282 # If we have tzset, assume the worst when cross-compiling.
11283emacs_cv_localtime_cache=yes
11284else
503d2be0 11285 cat >conftest.$ac_ext <<_ACEOF
138f0859 11286#line 11286 "configure"
ba4481b5
DL
11287#include "confdefs.h"
11288#include <time.h>
ba4481b5
DL
11289extern char **environ;
11290unset_TZ ()
11291{
11292 char **from, **to;
11293 for (to = from = environ; (*to = *from); from++)
11294 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11295 to++;
11296}
11297char TZ_GMT0[] = "TZ=GMT0";
11298char TZ_PST8[] = "TZ=PST8";
11299main()
11300{
11301 time_t now = time ((time_t *) 0);
11302 int hour_GMT0, hour_unset;
11303 if (putenv (TZ_GMT0) != 0)
11304 exit (1);
11305 hour_GMT0 = localtime (&now)->tm_hour;
11306 unset_TZ ();
11307 hour_unset = localtime (&now)->tm_hour;
11308 if (putenv (TZ_PST8) != 0)
11309 exit (1);
11310 if (localtime (&now)->tm_hour == hour_GMT0)
11311 exit (1);
11312 unset_TZ ();
11313 if (localtime (&now)->tm_hour != hour_unset)
11314 exit (1);
11315 exit (0);
11316}
503d2be0
AS
11317_ACEOF
11318rm -f conftest$ac_exeext
138f0859 11319if { (eval echo "$as_me:11319: \"$ac_link\"") >&5
503d2be0
AS
11320 (eval $ac_link) 2>&5
11321 ac_status=$?
138f0859 11322 echo "$as_me:11322: \$? = $ac_status" >&5
503d2be0 11323 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
138f0859 11324 { (eval echo "$as_me:11324: \"$ac_try\"") >&5
503d2be0
AS
11325 (eval $ac_try) 2>&5
11326 ac_status=$?
138f0859 11327 echo "$as_me:11327: \$? = $ac_status" >&5
503d2be0 11328 (exit $ac_status); }; }; then
ba4481b5
DL
11329 emacs_cv_localtime_cache=no
11330else
503d2be0
AS
11331 echo "$as_me: program exited with status $ac_status" >&5
11332echo "$as_me: failed program was:" >&5
11333cat conftest.$ac_ext >&5
11334emacs_cv_localtime_cache=yes
ba4481b5 11335fi
503d2be0 11336rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 11337fi
ba4481b5
DL
11338else
11339 # If we lack tzset, report that localtime does not cache TZ,
11340 # since we can't invalidate the cache if we don't have tzset.
11341 emacs_cv_localtime_cache=no
11342fi
11343fi
138f0859 11344echo "$as_me:11344: result: $emacs_cv_localtime_cache" >&5
503d2be0 11345echo "${ECHO_T}$emacs_cv_localtime_cache" >&6
ba4481b5 11346if test $emacs_cv_localtime_cache = yes; then
503d2be0 11347 cat >>confdefs.h <<\EOF
ba4481b5
DL
11348#define LOCALTIME_CACHE 1
11349EOF
11350
11351fi
11352
11353if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
11354
11355for ac_func in gettimeofday
48d4b120 11356do
503d2be0 11357as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
138f0859 11358echo "$as_me:11358: checking for $ac_func" >&5
503d2be0
AS
11359echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11360if eval "test \"\${$as_ac_var+set}\" = set"; then
11361 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 11362else
503d2be0 11363 cat >conftest.$ac_ext <<_ACEOF
138f0859 11364#line 11364 "configure"
48d4b120
DL
11365#include "confdefs.h"
11366/* System header to define __stub macros and hopefully few prototypes,
503d2be0 11367 which can conflict with char $ac_func (); below. */
48d4b120
DL
11368#include <assert.h>
11369/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11370#ifdef __cplusplus
11371extern "C"
11372#endif
48d4b120 11373/* We use char because int might match the return type of a gcc2
503d2be0
AS
11374 builtin and then its argument prototype would still apply. */
11375char $ac_func ();
11376char (*f) ();
48d4b120 11377
503d2be0
AS
11378int
11379main ()
11380{
48d4b120
DL
11381/* The GNU C library defines this for functions which it implements
11382 to always fail with ENOSYS. Some functions are actually named
11383 something starting with __ and the normal name is an alias. */
11384#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11385choke me
11386#else
503d2be0 11387f = $ac_func;
48d4b120
DL
11388#endif
11389
503d2be0
AS
11390 ;
11391 return 0;
11392}
11393_ACEOF
11394rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 11395if { (eval echo "$as_me:11395: \"$ac_link\"") >&5
503d2be0
AS
11396 (eval $ac_link) 2>&5
11397 ac_status=$?
138f0859 11398 echo "$as_me:11398: \$? = $ac_status" >&5
503d2be0
AS
11399 (exit $ac_status); } &&
11400 { ac_try='test -s conftest$ac_exeext'
138f0859 11401 { (eval echo "$as_me:11401: \"$ac_try\"") >&5
503d2be0
AS
11402 (eval $ac_try) 2>&5
11403 ac_status=$?
138f0859 11404 echo "$as_me:11404: \$? = $ac_status" >&5
503d2be0
AS
11405 (exit $ac_status); }; }; then
11406 eval "$as_ac_var=yes"
11407else
11408 echo "$as_me: failed program was:" >&5
11409cat conftest.$ac_ext >&5
11410eval "$as_ac_var=no"
11411fi
11412rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11413fi
138f0859 11414echo "$as_me:11414: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
11415echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11416if test `eval echo '${'$as_ac_var'}'` = yes; then
11417 cat >>confdefs.h <<EOF
11418#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
48d4b120 11419EOF
48d4b120 11420
48d4b120
DL
11421fi
11422done
11423
138f0859 11424 echo "$as_me:11424: checking whether gettimeofday can accept two arguments" >&5
503d2be0
AS
11425echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6
11426if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
11427 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11428else
503d2be0 11429 cat >conftest.$ac_ext <<_ACEOF
138f0859 11430#line 11430 "configure"
a3f08d9e 11431#include "confdefs.h"
ba4481b5 11432
a3f08d9e
DL
11433#ifdef TIME_WITH_SYS_TIME
11434#include <sys/time.h>
11435#include <time.h>
11436#else
11437#ifdef HAVE_SYS_TIME_H
11438#include <sys/time.h>
11439#else
11440#include <time.h>
11441#endif
11442#endif
503d2be0
AS
11443int
11444main ()
11445{
a3f08d9e 11446struct timeval time;
48d4b120 11447 gettimeofday (&time, 0);
503d2be0
AS
11448 ;
11449 return 0;
11450}
11451_ACEOF
11452rm -f conftest.$ac_objext
138f0859 11453if { (eval echo "$as_me:11453: \"$ac_compile\"") >&5
503d2be0
AS
11454 (eval $ac_compile) 2>&5
11455 ac_status=$?
138f0859 11456 echo "$as_me:11456: \$? = $ac_status" >&5
503d2be0
AS
11457 (exit $ac_status); } &&
11458 { ac_try='test -s conftest.$ac_objext'
138f0859 11459 { (eval echo "$as_me:11459: \"$ac_try\"") >&5
503d2be0
AS
11460 (eval $ac_try) 2>&5
11461 ac_status=$?
138f0859 11462 echo "$as_me:11462: \$? = $ac_status" >&5
503d2be0 11463 (exit $ac_status); }; }; then
ba4481b5
DL
11464 emacs_cv_gettimeofday_two_arguments=yes
11465else
503d2be0
AS
11466 echo "$as_me: failed program was:" >&5
11467cat conftest.$ac_ext >&5
11468emacs_cv_gettimeofday_two_arguments=no
ba4481b5 11469fi
503d2be0 11470rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 11471fi
138f0859 11472echo "$as_me:11472: result: $emacs_cv_gettimeofday_two_arguments" >&5
503d2be0 11473echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6
ba4481b5 11474 if test $emacs_cv_gettimeofday_two_arguments = no; then
503d2be0 11475 cat >>confdefs.h <<\EOF
ba4481b5
DL
11476#define GETTIMEOFDAY_ONE_ARGUMENT 1
11477EOF
11478
11479 fi
11480fi
11481
48d4b120 11482if test "$ac_cv_func_gettimeofday" = yes; then
138f0859 11483 echo "$as_me:11483: checking for struct timezone" >&5
503d2be0
AS
11484echo $ECHO_N "checking for struct timezone... $ECHO_C" >&6
11485if test "${emacs_cv_struct_timezone+set}" = set; then
11486 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 11487else
503d2be0 11488 cat >conftest.$ac_ext <<_ACEOF
138f0859 11489#line 11489 "configure"
48d4b120
DL
11490#include "confdefs.h"
11491#include <sys/time.h>
503d2be0
AS
11492int
11493main ()
11494{
48d4b120 11495struct timezone tz;
503d2be0
AS
11496 ;
11497 return 0;
11498}
11499_ACEOF
11500rm -f conftest.$ac_objext
138f0859 11501if { (eval echo "$as_me:11501: \"$ac_compile\"") >&5
503d2be0
AS
11502 (eval $ac_compile) 2>&5
11503 ac_status=$?
138f0859 11504 echo "$as_me:11504: \$? = $ac_status" >&5
503d2be0
AS
11505 (exit $ac_status); } &&
11506 { ac_try='test -s conftest.$ac_objext'
138f0859 11507 { (eval echo "$as_me:11507: \"$ac_try\"") >&5
503d2be0
AS
11508 (eval $ac_try) 2>&5
11509 ac_status=$?
138f0859 11510 echo "$as_me:11510: \$? = $ac_status" >&5
503d2be0 11511 (exit $ac_status); }; }; then
48d4b120
DL
11512 if test "$cross_compiling" = yes; then
11513 emacs_cv_struct_timezone=yes
11514else
503d2be0 11515 cat >conftest.$ac_ext <<_ACEOF
138f0859 11516#line 11516 "configure"
48d4b120
DL
11517#include "confdefs.h"
11518
11519#ifdef TIME_WITH_SYS_TIME
11520#include <sys/time.h>
11521#include <time.h>
11522#else
11523#ifdef HAVE_SYS_TIME_H
11524#include <sys/time.h>
11525#else
11526#include <time.h>
11527#endif
11528#endif
11529main () {
11530 struct timeval time;
11531 struct timezone dummy;
11532 exit (gettimeofday (&time, &dummy));
11533}
503d2be0
AS
11534_ACEOF
11535rm -f conftest$ac_exeext
138f0859 11536if { (eval echo "$as_me:11536: \"$ac_link\"") >&5
503d2be0
AS
11537 (eval $ac_link) 2>&5
11538 ac_status=$?
138f0859 11539 echo "$as_me:11539: \$? = $ac_status" >&5
503d2be0 11540 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
138f0859 11541 { (eval echo "$as_me:11541: \"$ac_try\"") >&5
503d2be0
AS
11542 (eval $ac_try) 2>&5
11543 ac_status=$?
138f0859 11544 echo "$as_me:11544: \$? = $ac_status" >&5
503d2be0 11545 (exit $ac_status); }; }; then
48d4b120
DL
11546 emacs_cv_struct_timezone=yes
11547else
503d2be0
AS
11548 echo "$as_me: program exited with status $ac_status" >&5
11549echo "$as_me: failed program was:" >&5
11550cat conftest.$ac_ext >&5
11551emacs_cv_struct_timezone=no
48d4b120 11552fi
503d2be0 11553rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
48d4b120 11554fi
48d4b120 11555else
503d2be0
AS
11556 echo "$as_me: failed program was:" >&5
11557cat conftest.$ac_ext >&5
11558emacs_cv_struct_timezone=no
48d4b120 11559fi
503d2be0 11560rm -f conftest.$ac_objext conftest.$ac_ext
48d4b120 11561fi
138f0859 11562echo "$as_me:11562: result: $emacs_cv_struct_timezone" >&5
503d2be0 11563echo "${ECHO_T}$emacs_cv_struct_timezone" >&6
48d4b120
DL
11564fi
11565
ba4481b5 11566ok_so_far=yes
138f0859 11567echo "$as_me:11567: checking for socket" >&5
503d2be0
AS
11568echo $ECHO_N "checking for socket... $ECHO_C" >&6
11569if test "${ac_cv_func_socket+set}" = set; then
11570 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11571else
503d2be0 11572 cat >conftest.$ac_ext <<_ACEOF
138f0859 11573#line 11573 "configure"
ba4481b5
DL
11574#include "confdefs.h"
11575/* System header to define __stub macros and hopefully few prototypes,
503d2be0 11576 which can conflict with char socket (); below. */
ba4481b5
DL
11577#include <assert.h>
11578/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11579#ifdef __cplusplus
11580extern "C"
11581#endif
ba4481b5 11582/* We use char because int might match the return type of a gcc2
503d2be0
AS
11583 builtin and then its argument prototype would still apply. */
11584char socket ();
11585char (*f) ();
ba4481b5 11586
503d2be0
AS
11587int
11588main ()
11589{
ba4481b5
DL
11590/* The GNU C library defines this for functions which it implements
11591 to always fail with ENOSYS. Some functions are actually named
11592 something starting with __ and the normal name is an alias. */
11593#if defined (__stub_socket) || defined (__stub___socket)
11594choke me
11595#else
503d2be0 11596f = socket;
ba4481b5
DL
11597#endif
11598
503d2be0
AS
11599 ;
11600 return 0;
11601}
11602_ACEOF
11603rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 11604if { (eval echo "$as_me:11604: \"$ac_link\"") >&5
503d2be0
AS
11605 (eval $ac_link) 2>&5
11606 ac_status=$?
138f0859 11607 echo "$as_me:11607: \$? = $ac_status" >&5
503d2be0
AS
11608 (exit $ac_status); } &&
11609 { ac_try='test -s conftest$ac_exeext'
138f0859 11610 { (eval echo "$as_me:11610: \"$ac_try\"") >&5
503d2be0
AS
11611 (eval $ac_try) 2>&5
11612 ac_status=$?
138f0859 11613 echo "$as_me:11613: \$? = $ac_status" >&5
503d2be0
AS
11614 (exit $ac_status); }; }; then
11615 ac_cv_func_socket=yes
11616else
11617 echo "$as_me: failed program was:" >&5
11618cat conftest.$ac_ext >&5
11619ac_cv_func_socket=no
11620fi
11621rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11622fi
138f0859 11623echo "$as_me:11623: result: $ac_cv_func_socket" >&5
503d2be0
AS
11624echo "${ECHO_T}$ac_cv_func_socket" >&6
11625if test $ac_cv_func_socket = yes; then
ba4481b5
DL
11626 :
11627else
503d2be0 11628 ok_so_far=no
ba4481b5
DL
11629fi
11630
11631if test $ok_so_far = yes; then
138f0859 11632 echo "$as_me:11632: checking for netinet/in.h" >&5
503d2be0
AS
11633echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
11634if test "${ac_cv_header_netinet_in_h+set}" = set; then
11635 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11636else
503d2be0 11637 cat >conftest.$ac_ext <<_ACEOF
138f0859 11638#line 11638 "configure"
ba4481b5
DL
11639#include "confdefs.h"
11640#include <netinet/in.h>
503d2be0 11641_ACEOF
138f0859 11642if { (eval echo "$as_me:11642: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11643 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11644 ac_status=$?
11645 egrep -v '^ *\+' conftest.er1 >conftest.err
11646 rm -f conftest.er1
11647 cat conftest.err >&5
138f0859 11648 echo "$as_me:11648: \$? = $ac_status" >&5
503d2be0
AS
11649 (exit $ac_status); } >/dev/null; then
11650 if test -s conftest.err; then
11651 ac_cpp_err=$ac_c_preproc_warn_flag
11652 else
11653 ac_cpp_err=
11654 fi
11655else
11656 ac_cpp_err=yes
11657fi
11658if test -z "$ac_cpp_err"; then
11659 ac_cv_header_netinet_in_h=yes
ba4481b5 11660else
503d2be0 11661 echo "$as_me: failed program was:" >&5
ba4481b5 11662 cat conftest.$ac_ext >&5
503d2be0 11663 ac_cv_header_netinet_in_h=no
ba4481b5 11664fi
503d2be0 11665rm -f conftest.err conftest.$ac_ext
ba4481b5 11666fi
138f0859 11667echo "$as_me:11667: result: $ac_cv_header_netinet_in_h" >&5
503d2be0
AS
11668echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
11669if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
11670 :
11671else
503d2be0 11672 ok_so_far=no
ba4481b5
DL
11673fi
11674
11675fi
11676if test $ok_so_far = yes; then
138f0859 11677 echo "$as_me:11677: checking for arpa/inet.h" >&5
503d2be0
AS
11678echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
11679if test "${ac_cv_header_arpa_inet_h+set}" = set; then
11680 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11681else
503d2be0 11682 cat >conftest.$ac_ext <<_ACEOF
138f0859 11683#line 11683 "configure"
ba4481b5
DL
11684#include "confdefs.h"
11685#include <arpa/inet.h>
503d2be0 11686_ACEOF
138f0859 11687if { (eval echo "$as_me:11687: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11688 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11689 ac_status=$?
11690 egrep -v '^ *\+' conftest.er1 >conftest.err
11691 rm -f conftest.er1
11692 cat conftest.err >&5
138f0859 11693 echo "$as_me:11693: \$? = $ac_status" >&5
503d2be0
AS
11694 (exit $ac_status); } >/dev/null; then
11695 if test -s conftest.err; then
11696 ac_cpp_err=$ac_c_preproc_warn_flag
11697 else
11698 ac_cpp_err=
11699 fi
11700else
11701 ac_cpp_err=yes
11702fi
11703if test -z "$ac_cpp_err"; then
11704 ac_cv_header_arpa_inet_h=yes
ba4481b5 11705else
503d2be0 11706 echo "$as_me: failed program was:" >&5
ba4481b5 11707 cat conftest.$ac_ext >&5
503d2be0 11708 ac_cv_header_arpa_inet_h=no
ba4481b5 11709fi
503d2be0 11710rm -f conftest.err conftest.$ac_ext
ba4481b5 11711fi
138f0859 11712echo "$as_me:11712: result: $ac_cv_header_arpa_inet_h" >&5
503d2be0
AS
11713echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
11714if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
11715 :
11716else
503d2be0 11717 ok_so_far=no
ba4481b5
DL
11718fi
11719
11720fi
11721if test $ok_so_far = yes; then
503d2be0 11722 cat >>confdefs.h <<\EOF
ba4481b5
DL
11723#define HAVE_INET_SOCKETS 1
11724EOF
11725
11726fi
11727
11728if test -f /usr/lpp/X11/bin/smt.exp; then
503d2be0 11729 cat >>confdefs.h <<\EOF
ba4481b5
DL
11730#define HAVE_AIX_SMT_EXP 1
11731EOF
11732
11733fi
11734
138f0859 11735echo "$as_me:11735: checking whether system supports dynamic ptys" >&5
503d2be0 11736echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6
3d9fec71 11737if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
138f0859 11738 echo "$as_me:11738: result: yes" >&5
503d2be0
AS
11739echo "${ECHO_T}yes" >&6
11740 cat >>confdefs.h <<\EOF
3d9fec71
DL
11741#define HAVE_DEV_PTMX 1
11742EOF
11743
11744else
138f0859 11745 echo "$as_me:11745: result: no" >&5
503d2be0 11746echo "${ECHO_T}no" >&6
3d9fec71
DL
11747fi
11748
138f0859 11749echo "$as_me:11749: checking for pid_t" >&5
503d2be0
AS
11750echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
11751if test "${ac_cv_type_pid_t+set}" = set; then
11752 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 11753else
503d2be0 11754 cat >conftest.$ac_ext <<_ACEOF
138f0859 11755#line 11755 "configure"
647847ea 11756#include "confdefs.h"
503d2be0
AS
11757$ac_includes_default
11758int
11759main ()
11760{
11761if ((pid_t *) 0)
11762 return 0;
11763if (sizeof (pid_t))
11764 return 0;
11765 ;
11766 return 0;
11767}
11768_ACEOF
11769rm -f conftest.$ac_objext
138f0859 11770if { (eval echo "$as_me:11770: \"$ac_compile\"") >&5
503d2be0
AS
11771 (eval $ac_compile) 2>&5
11772 ac_status=$?
138f0859 11773 echo "$as_me:11773: \$? = $ac_status" >&5
503d2be0
AS
11774 (exit $ac_status); } &&
11775 { ac_try='test -s conftest.$ac_objext'
138f0859 11776 { (eval echo "$as_me:11776: \"$ac_try\"") >&5
503d2be0
AS
11777 (eval $ac_try) 2>&5
11778 ac_status=$?
138f0859 11779 echo "$as_me:11779: \$? = $ac_status" >&5
503d2be0 11780 (exit $ac_status); }; }; then
647847ea
DL
11781 ac_cv_type_pid_t=yes
11782else
503d2be0
AS
11783 echo "$as_me: failed program was:" >&5
11784cat conftest.$ac_ext >&5
11785ac_cv_type_pid_t=no
647847ea 11786fi
503d2be0 11787rm -f conftest.$ac_objext conftest.$ac_ext
647847ea 11788fi
138f0859 11789echo "$as_me:11789: result: $ac_cv_type_pid_t" >&5
503d2be0
AS
11790echo "${ECHO_T}$ac_cv_type_pid_t" >&6
11791if test $ac_cv_type_pid_t = yes; then
11792 :
11793else
11794
11795cat >>confdefs.h <<EOF
647847ea
DL
11796#define pid_t int
11797EOF
11798
11799fi
11800
503d2be0
AS
11801for ac_header in unistd.h vfork.h
11802do
11803as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
138f0859 11804echo "$as_me:11804: checking for $ac_header" >&5
503d2be0
AS
11805echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11806if eval "test \"\${$as_ac_Header+set}\" = set"; then
11807 echo $ECHO_N "(cached) $ECHO_C" >&6
11808else
11809 cat >conftest.$ac_ext <<_ACEOF
138f0859 11810#line 11810 "configure"
503d2be0
AS
11811#include "confdefs.h"
11812#include <$ac_header>
11813_ACEOF
138f0859 11814if { (eval echo "$as_me:11814: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11815 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11816 ac_status=$?
11817 egrep -v '^ *\+' conftest.er1 >conftest.err
11818 rm -f conftest.er1
11819 cat conftest.err >&5
138f0859 11820 echo "$as_me:11820: \$? = $ac_status" >&5
503d2be0
AS
11821 (exit $ac_status); } >/dev/null; then
11822 if test -s conftest.err; then
11823 ac_cpp_err=$ac_c_preproc_warn_flag
11824 else
11825 ac_cpp_err=
11826 fi
647847ea 11827else
503d2be0
AS
11828 ac_cpp_err=yes
11829fi
11830if test -z "$ac_cpp_err"; then
11831 eval "$as_ac_Header=yes"
647847ea 11832else
503d2be0 11833 echo "$as_me: failed program was:" >&5
647847ea 11834 cat conftest.$ac_ext >&5
503d2be0 11835 eval "$as_ac_Header=no"
647847ea 11836fi
503d2be0 11837rm -f conftest.err conftest.$ac_ext
647847ea 11838fi
138f0859 11839echo "$as_me:11839: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11840echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11841if test `eval echo '${'$as_ac_Header'}'` = yes; then
11842 cat >>confdefs.h <<EOF
11843#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
647847ea
DL
11844EOF
11845
73b77ee5 11846fi
503d2be0 11847done
73b77ee5 11848
503d2be0
AS
11849for ac_func in fork vfork
11850do
11851as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
138f0859 11852echo "$as_me:11852: checking for $ac_func" >&5
503d2be0
AS
11853echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11854if eval "test \"\${$as_ac_var+set}\" = set"; then
11855 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 11856else
503d2be0 11857 cat >conftest.$ac_ext <<_ACEOF
138f0859 11858#line 11858 "configure"
fa0b693c
GM
11859#include "confdefs.h"
11860/* System header to define __stub macros and hopefully few prototypes,
503d2be0 11861 which can conflict with char $ac_func (); below. */
fa0b693c
GM
11862#include <assert.h>
11863/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11864#ifdef __cplusplus
11865extern "C"
11866#endif
fa0b693c 11867/* We use char because int might match the return type of a gcc2
503d2be0
AS
11868 builtin and then its argument prototype would still apply. */
11869char $ac_func ();
11870char (*f) ();
fa0b693c 11871
503d2be0
AS
11872int
11873main ()
11874{
fa0b693c
GM
11875/* The GNU C library defines this for functions which it implements
11876 to always fail with ENOSYS. Some functions are actually named
11877 something starting with __ and the normal name is an alias. */
503d2be0 11878#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
fa0b693c
GM
11879choke me
11880#else
503d2be0 11881f = $ac_func;
fa0b693c
GM
11882#endif
11883
503d2be0
AS
11884 ;
11885 return 0;
11886}
11887_ACEOF
11888rm -f conftest.$ac_objext conftest$ac_exeext
138f0859 11889if { (eval echo "$as_me:11889: \"$ac_link\"") >&5
503d2be0
AS
11890 (eval $ac_link) 2>&5
11891 ac_status=$?
138f0859 11892 echo "$as_me:11892: \$? = $ac_status" >&5
503d2be0
AS
11893 (exit $ac_status); } &&
11894 { ac_try='test -s conftest$ac_exeext'
138f0859 11895 { (eval echo "$as_me:11895: \"$ac_try\"") >&5
503d2be0
AS
11896 (eval $ac_try) 2>&5
11897 ac_status=$?
138f0859 11898 echo "$as_me:11898: \$? = $ac_status" >&5
503d2be0
AS
11899 (exit $ac_status); }; }; then
11900 eval "$as_ac_var=yes"
11901else
11902 echo "$as_me: failed program was:" >&5
11903cat conftest.$ac_ext >&5
11904eval "$as_ac_var=no"
11905fi
11906rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11907fi
138f0859 11908echo "$as_me:11908: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
11909echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11910if test `eval echo '${'$as_ac_var'}'` = yes; then
11911 cat >>confdefs.h <<EOF
11912#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
fa0b693c 11913EOF
503d2be0 11914
fa0b693c 11915fi
503d2be0 11916done
fa0b693c 11917
503d2be0
AS
11918ac_cv_func_fork_works=$ac_cv_func_fork
11919if test "x$ac_cv_func_fork" = xyes; then
138f0859 11920 echo "$as_me:11920: checking for working fork" >&5
503d2be0
AS
11921echo $ECHO_N "checking for working fork... $ECHO_C" >&6
11922if test "${ac_cv_func_fork_works+set}" = set; then
11923 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 11924else
503d2be0
AS
11925 if test "$cross_compiling" = yes; then
11926 ac_cv_func_fork_works=cross
11927else
11928 cat >conftest.$ac_ext <<_ACEOF
11929