(w32_create_pixmap_from_bitmap_data): New function.
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
925c2f3f 3# Generated by Autoconf 2.52.
ba4481b5 4#
925c2f3f 5# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
503d2be0 6# Free Software Foundation, Inc.
ba4481b5
DL
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
8799b3e4 9
925c2f3f
EZ
10# Avoid depending upon Character Ranges.
11as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14as_cr_digits='0123456789'
15as_cr_alnum=$as_cr_Letters$as_cr_digits
8799b3e4 16
925c2f3f
EZ
17# Sed expression to map a string onto a valid variable name.
18as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
8799b3e4 19
925c2f3f
EZ
20# Sed expression to map a string onto a valid CPP name.
21as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
503d2be0
AS
22
23# Be Bourne compatible
24if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25 emulate sh
26 NULLCMD=:
27elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28 set -o posix
29fi
30
31# Name of the executable.
925c2f3f 32as_me=`echo "$0" |sed 's,.*[\\/],,'`
503d2be0
AS
33
34if expr a : '\(a\)' >/dev/null 2>&1; then
35 as_expr=expr
36else
37 as_expr=false
38fi
39
40rm -f conf$$ conf$$.exe conf$$.file
41echo >conf$$.file
42if ln -s conf$$.file conf$$ 2>/dev/null; then
43 # We could just check for DJGPP; but this test a) works b) is more generic
44 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45 if test -f conf$$.exe; then
46 # Don't use ln at all; we don't have any links
47 as_ln_s='cp -p'
48 else
49 as_ln_s='ln -s'
50 fi
51elif ln conf$$.file conf$$ 2>/dev/null; then
52 as_ln_s=ln
53else
54 as_ln_s='cp -p'
55fi
56rm -f conf$$ conf$$.exe conf$$.file
57
58as_executable_p="test -f"
59
925c2f3f
EZ
60# Support unset when possible.
61if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
62 as_unset=unset
63else
64 as_unset=false
65fi
503d2be0 66
925c2f3f
EZ
67# NLS nuisances.
68$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
69$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
70$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
71$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
72$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
73$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
74$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
75$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
503d2be0
AS
76
77# IFS
78# We need space, tab and new line, in precisely that order.
79as_nl='
80'
81IFS=" $as_nl"
82
83# CDPATH.
925c2f3f 84$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
503d2be0
AS
85
86# Name of the host.
87# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
88# so uname gets run too.
89ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
90
91exec 6>&1
92
93#
94# Initializations.
95#
ba4481b5 96ac_default_prefix=/usr/local
503d2be0
AS
97cross_compiling=no
98subdirs=
925c2f3f 99MFLAGS= MAKEFLAGS=
503d2be0
AS
100SHELL=${CONFIG_SHELL-/bin/sh}
101
102# Maximum number of lines to put in a shell here document.
103# This variable seems obsolete. It should probably be removed, and
104# only ac_max_sed_lines should be used.
105: ${ac_max_here_lines=38}
106
107ac_unique_file="src/lisp.h"
108# Factoring default headers for most tests.
109ac_includes_default="\
110#include <stdio.h>
111#if HAVE_SYS_TYPES_H
112# include <sys/types.h>
113#endif
114#if HAVE_SYS_STAT_H
115# include <sys/stat.h>
116#endif
117#if STDC_HEADERS
118# include <stdlib.h>
119# include <stddef.h>
120#else
121# if HAVE_STDLIB_H
122# include <stdlib.h>
123# endif
124#endif
125#if HAVE_STRING_H
126# if !STDC_HEADERS && HAVE_MEMORY_H
127# include <memory.h>
128# endif
129# include <string.h>
130#endif
131#if HAVE_STRINGS_H
132# include <strings.h>
133#endif
134#if HAVE_INTTYPES_H
135# include <inttypes.h>
136#else
137# if HAVE_STDINT_H
138# include <stdint.h>
139# endif
140#endif
141#if HAVE_UNISTD_H
142# include <unistd.h>
143#endif"
ba4481b5
DL
144
145# Initialize some variables set by options.
503d2be0
AS
146ac_init_help=
147ac_init_version=false
ba4481b5
DL
148# The variables have the same names as the options, with
149# dashes changed to underlines.
503d2be0 150cache_file=/dev/null
ba4481b5 151exec_prefix=NONE
ba4481b5 152no_create=
ba4481b5
DL
153no_recursion=
154prefix=NONE
155program_prefix=NONE
156program_suffix=NONE
157program_transform_name=s,x,x,
158silent=
159site=
160srcdir=
ba4481b5
DL
161verbose=
162x_includes=NONE
163x_libraries=NONE
503d2be0
AS
164
165# Installation directory options.
166# These are left unexpanded so users can "make install exec_prefix=/foo"
167# and all the variables that are supposed to be based on exec_prefix
168# by default will actually change.
169# Use braces instead of parens because sh, perl, etc. also accept them.
ba4481b5
DL
170bindir='${exec_prefix}/bin'
171sbindir='${exec_prefix}/sbin'
172libexecdir='${exec_prefix}/libexec'
173datadir='${prefix}/share'
174sysconfdir='${prefix}/etc'
175sharedstatedir='${prefix}/com'
176localstatedir='${prefix}/var'
177libdir='${exec_prefix}/lib'
178includedir='${prefix}/include'
179oldincludedir='/usr/include'
180infodir='${prefix}/info'
181mandir='${prefix}/man'
182
925c2f3f
EZ
183# Identity of this package.
184PACKAGE_NAME=
185PACKAGE_TARNAME=
186PACKAGE_VERSION=
187PACKAGE_STRING=
188PACKAGE_BUGREPORT=
189
ba4481b5
DL
190ac_prev=
191for ac_option
192do
ba4481b5
DL
193 # If the previous option needs an argument, assign it.
194 if test -n "$ac_prev"; then
195 eval "$ac_prev=\$ac_option"
196 ac_prev=
197 continue
198 fi
199
503d2be0 200 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
ba4481b5
DL
201
202 # Accept the important Cygnus configure options, so we can diagnose typos.
203
503d2be0 204 case $ac_option in
ba4481b5
DL
205
206 -bindir | --bindir | --bindi | --bind | --bin | --bi)
207 ac_prev=bindir ;;
208 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 209 bindir=$ac_optarg ;;
ba4481b5
DL
210
211 -build | --build | --buil | --bui | --bu)
503d2be0 212 ac_prev=build_alias ;;
ba4481b5 213 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 214 build_alias=$ac_optarg ;;
ba4481b5
DL
215
216 -cache-file | --cache-file | --cache-fil | --cache-fi \
217 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
218 ac_prev=cache_file ;;
219 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
220 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
221 cache_file=$ac_optarg ;;
222
223 --config-cache | -C)
224 cache_file=config.cache ;;
ba4481b5
DL
225
226 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
227 ac_prev=datadir ;;
228 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
229 | --da=*)
503d2be0 230 datadir=$ac_optarg ;;
ba4481b5
DL
231
232 -disable-* | --disable-*)
503d2be0 233 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 234 # Reject names that are not valid shell variable names.
503d2be0
AS
235 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
236 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
237 { (exit 1); exit 1; }; }
238 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
239 eval "enable_$ac_feature=no" ;;
ba4481b5
DL
240
241 -enable-* | --enable-*)
503d2be0 242 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 243 # Reject names that are not valid shell variable names.
503d2be0
AS
244 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246 { (exit 1); exit 1; }; }
247 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248 case $ac_option in
249 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
ba4481b5
DL
250 *) ac_optarg=yes ;;
251 esac
503d2be0 252 eval "enable_$ac_feature='$ac_optarg'" ;;
ba4481b5
DL
253
254 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
255 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
256 | --exec | --exe | --ex)
257 ac_prev=exec_prefix ;;
258 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
259 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
260 | --exec=* | --exe=* | --ex=*)
503d2be0 261 exec_prefix=$ac_optarg ;;
ba4481b5
DL
262
263 -gas | --gas | --ga | --g)
264 # Obsolete; use --with-gas.
265 with_gas=yes ;;
266
503d2be0
AS
267 -help | --help | --hel | --he | -h)
268 ac_init_help=long ;;
269 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
270 ac_init_help=recursive ;;
271 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
272 ac_init_help=short ;;
ba4481b5
DL
273
274 -host | --host | --hos | --ho)
503d2be0 275 ac_prev=host_alias ;;
ba4481b5 276 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 277 host_alias=$ac_optarg ;;
ba4481b5
DL
278
279 -includedir | --includedir | --includedi | --included | --include \
280 | --includ | --inclu | --incl | --inc)
281 ac_prev=includedir ;;
282 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
283 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 284 includedir=$ac_optarg ;;
ba4481b5
DL
285
286 -infodir | --infodir | --infodi | --infod | --info | --inf)
287 ac_prev=infodir ;;
288 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 289 infodir=$ac_optarg ;;
ba4481b5
DL
290
291 -libdir | --libdir | --libdi | --libd)
292 ac_prev=libdir ;;
293 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 294 libdir=$ac_optarg ;;
ba4481b5
DL
295
296 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
297 | --libexe | --libex | --libe)
298 ac_prev=libexecdir ;;
299 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
300 | --libexe=* | --libex=* | --libe=*)
503d2be0 301 libexecdir=$ac_optarg ;;
ba4481b5
DL
302
303 -localstatedir | --localstatedir | --localstatedi | --localstated \
304 | --localstate | --localstat | --localsta | --localst \
305 | --locals | --local | --loca | --loc | --lo)
306 ac_prev=localstatedir ;;
307 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
308 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
309 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
503d2be0 310 localstatedir=$ac_optarg ;;
ba4481b5
DL
311
312 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
313 ac_prev=mandir ;;
314 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 315 mandir=$ac_optarg ;;
ba4481b5
DL
316
317 -nfp | --nfp | --nf)
318 # Obsolete; use --without-fp.
319 with_fp=no ;;
320
321 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
925c2f3f 322 | --no-cr | --no-c)
ba4481b5
DL
323 no_create=yes ;;
324
325 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
326 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
327 no_recursion=yes ;;
328
329 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
330 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
331 | --oldin | --oldi | --old | --ol | --o)
332 ac_prev=oldincludedir ;;
333 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
334 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
335 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 336 oldincludedir=$ac_optarg ;;
ba4481b5
DL
337
338 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
339 ac_prev=prefix ;;
340 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 341 prefix=$ac_optarg ;;
ba4481b5
DL
342
343 -program-prefix | --program-prefix | --program-prefi | --program-pref \
344 | --program-pre | --program-pr | --program-p)
345 ac_prev=program_prefix ;;
346 -program-prefix=* | --program-prefix=* | --program-prefi=* \
347 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 348 program_prefix=$ac_optarg ;;
ba4481b5
DL
349
350 -program-suffix | --program-suffix | --program-suffi | --program-suff \
351 | --program-suf | --program-su | --program-s)
352 ac_prev=program_suffix ;;
353 -program-suffix=* | --program-suffix=* | --program-suffi=* \
354 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 355 program_suffix=$ac_optarg ;;
ba4481b5
DL
356
357 -program-transform-name | --program-transform-name \
358 | --program-transform-nam | --program-transform-na \
359 | --program-transform-n | --program-transform- \
360 | --program-transform | --program-transfor \
361 | --program-transfo | --program-transf \
362 | --program-trans | --program-tran \
363 | --progr-tra | --program-tr | --program-t)
364 ac_prev=program_transform_name ;;
365 -program-transform-name=* | --program-transform-name=* \
366 | --program-transform-nam=* | --program-transform-na=* \
367 | --program-transform-n=* | --program-transform-=* \
368 | --program-transform=* | --program-transfor=* \
369 | --program-transfo=* | --program-transf=* \
370 | --program-trans=* | --program-tran=* \
371 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 372 program_transform_name=$ac_optarg ;;
ba4481b5
DL
373
374 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
375 | -silent | --silent | --silen | --sile | --sil)
376 silent=yes ;;
377
378 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
379 ac_prev=sbindir ;;
380 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
381 | --sbi=* | --sb=*)
503d2be0 382 sbindir=$ac_optarg ;;
ba4481b5
DL
383
384 -sharedstatedir | --sharedstatedir | --sharedstatedi \
385 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
386 | --sharedst | --shareds | --shared | --share | --shar \
387 | --sha | --sh)
388 ac_prev=sharedstatedir ;;
389 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
390 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
391 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
392 | --sha=* | --sh=*)
503d2be0 393 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
394
395 -site | --site | --sit)
396 ac_prev=site ;;
397 -site=* | --site=* | --sit=*)
503d2be0 398 site=$ac_optarg ;;
ba4481b5
DL
399
400 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
401 ac_prev=srcdir ;;
402 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 403 srcdir=$ac_optarg ;;
ba4481b5
DL
404
405 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
406 | --syscon | --sysco | --sysc | --sys | --sy)
407 ac_prev=sysconfdir ;;
408 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
409 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 410 sysconfdir=$ac_optarg ;;
ba4481b5
DL
411
412 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 413 ac_prev=target_alias ;;
ba4481b5 414 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 415 target_alias=$ac_optarg ;;
ba4481b5
DL
416
417 -v | -verbose | --verbose | --verbos | --verbo | --verb)
418 verbose=yes ;;
419
503d2be0
AS
420 -version | --version | --versio | --versi | --vers | -V)
421 ac_init_version=: ;;
ba4481b5
DL
422
423 -with-* | --with-*)
503d2be0 424 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 425 # Reject names that are not valid shell variable names.
503d2be0
AS
426 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
427 { echo "$as_me: error: invalid package name: $ac_package" >&2
428 { (exit 1); exit 1; }; }
ba4481b5 429 ac_package=`echo $ac_package| sed 's/-/_/g'`
503d2be0
AS
430 case $ac_option in
431 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
ba4481b5
DL
432 *) ac_optarg=yes ;;
433 esac
503d2be0 434 eval "with_$ac_package='$ac_optarg'" ;;
ba4481b5
DL
435
436 -without-* | --without-*)
503d2be0 437 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 438 # Reject names that are not valid shell variable names.
503d2be0
AS
439 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
440 { echo "$as_me: error: invalid package name: $ac_package" >&2
441 { (exit 1); exit 1; }; }
442 ac_package=`echo $ac_package | sed 's/-/_/g'`
443 eval "with_$ac_package=no" ;;
ba4481b5
DL
444
445 --x)
446 # Obsolete; use --with-x.
447 with_x=yes ;;
448
449 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
450 | --x-incl | --x-inc | --x-in | --x-i)
451 ac_prev=x_includes ;;
452 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
453 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 454 x_includes=$ac_optarg ;;
ba4481b5
DL
455
456 -x-libraries | --x-libraries | --x-librarie | --x-librari \
457 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
458 ac_prev=x_libraries ;;
459 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
460 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 461 x_libraries=$ac_optarg ;;
ba4481b5 462
503d2be0
AS
463 -*) { echo "$as_me: error: unrecognized option: $ac_option
464Try \`$0 --help' for more information." >&2
465 { (exit 1); exit 1; }; }
ba4481b5
DL
466 ;;
467
503d2be0
AS
468 *=*)
469 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
470 # Reject names that are not valid shell variable names.
471 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
472 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
473 { (exit 1); exit 1; }; }
474 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
475 eval "$ac_envvar='$ac_optarg'"
476 export $ac_envvar ;;
477
ba4481b5 478 *)
503d2be0
AS
479 # FIXME: should be removed in autoconf 3.0.
480 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
481 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
482 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
483 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
484 ;;
485
486 esac
487done
488
489if test -n "$ac_prev"; then
503d2be0
AS
490 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
491 { echo "$as_me: error: missing argument to $ac_option" >&2
492 { (exit 1); exit 1; }; }
ba4481b5 493fi
ba4481b5 494
503d2be0
AS
495# Be sure to have absolute paths.
496for ac_var in exec_prefix prefix
497do
498 eval ac_val=$`echo $ac_var`
499 case $ac_val in
500 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
925c2f3f 501 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503d2be0
AS
502 { (exit 1); exit 1; }; };;
503 esac
504done
ba4481b5 505
503d2be0
AS
506# Be sure to have absolute paths.
507for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
508 localstatedir libdir includedir oldincludedir infodir mandir
ba4481b5 509do
503d2be0
AS
510 eval ac_val=$`echo $ac_var`
511 case $ac_val in
512 [\\/$]* | ?:[\\/]* ) ;;
925c2f3f 513 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503d2be0 514 { (exit 1); exit 1; }; };;
ba4481b5
DL
515 esac
516done
517
503d2be0
AS
518# There might be people who depend on the old broken behavior: `$host'
519# used to hold the argument of --host etc.
520build=$build_alias
521host=$host_alias
522target=$target_alias
523
925c2f3f 524# FIXME: should be removed in autoconf 3.0.
503d2be0
AS
525if test "x$host_alias" != x; then
526 if test "x$build_alias" = x; then
527 cross_compiling=maybe
528 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
529 If a cross compiler is detected then cross compile mode will be used." >&2
530 elif test "x$build_alias" != "x$host_alias"; then
531 cross_compiling=yes
532 fi
533fi
ba4481b5 534
503d2be0
AS
535ac_tool_prefix=
536test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 537
503d2be0 538test "$silent" = yes && exec 6>/dev/null
ba4481b5
DL
539
540# Find the source files, if location was not specified.
541if test -z "$srcdir"; then
542 ac_srcdir_defaulted=yes
543 # Try the directory containing this script, then its parent.
925c2f3f
EZ
544 ac_prog=$0
545 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
546 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
ba4481b5
DL
547 srcdir=$ac_confdir
548 if test ! -r $srcdir/$ac_unique_file; then
549 srcdir=..
550 fi
551else
552 ac_srcdir_defaulted=no
553fi
554if test ! -r $srcdir/$ac_unique_file; then
555 if test "$ac_srcdir_defaulted" = yes; then
925c2f3f 556 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
503d2be0 557 { (exit 1); exit 1; }; }
ba4481b5 558 else
925c2f3f 559 { echo "$as_me: error: cannot find sources in $srcdir" >&2
503d2be0 560 { (exit 1); exit 1; }; }
ba4481b5
DL
561 fi
562fi
503d2be0
AS
563srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
564ac_env_build_alias_set=${build_alias+set}
565ac_env_build_alias_value=$build_alias
566ac_cv_env_build_alias_set=${build_alias+set}
567ac_cv_env_build_alias_value=$build_alias
568ac_env_host_alias_set=${host_alias+set}
569ac_env_host_alias_value=$host_alias
570ac_cv_env_host_alias_set=${host_alias+set}
571ac_cv_env_host_alias_value=$host_alias
572ac_env_target_alias_set=${target_alias+set}
573ac_env_target_alias_value=$target_alias
574ac_cv_env_target_alias_set=${target_alias+set}
575ac_cv_env_target_alias_value=$target_alias
576ac_env_CC_set=${CC+set}
577ac_env_CC_value=$CC
578ac_cv_env_CC_set=${CC+set}
579ac_cv_env_CC_value=$CC
580ac_env_CFLAGS_set=${CFLAGS+set}
581ac_env_CFLAGS_value=$CFLAGS
582ac_cv_env_CFLAGS_set=${CFLAGS+set}
583ac_cv_env_CFLAGS_value=$CFLAGS
584ac_env_LDFLAGS_set=${LDFLAGS+set}
585ac_env_LDFLAGS_value=$LDFLAGS
586ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
587ac_cv_env_LDFLAGS_value=$LDFLAGS
588ac_env_CPPFLAGS_set=${CPPFLAGS+set}
589ac_env_CPPFLAGS_value=$CPPFLAGS
590ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
591ac_cv_env_CPPFLAGS_value=$CPPFLAGS
592ac_env_CPP_set=${CPP+set}
593ac_env_CPP_value=$CPP
594ac_cv_env_CPP_set=${CPP+set}
595ac_cv_env_CPP_value=$CPP
596
597#
598# Report the --help message.
599#
600if test "$ac_init_help" = "long"; then
601 # Omit some internal or obsolete options to make the list less imposing.
602 # This message is too long to be a string in the A/UX 3.1 sh.
925c2f3f 603 cat <<EOF
503d2be0
AS
604\`configure' configures this package to adapt to many kinds of systems.
605
606Usage: $0 [OPTION]... [VAR=VALUE]...
607
608To assign environment variables (e.g., CC, CFLAGS...), specify them as
609VAR=VALUE. See below for descriptions of some of the useful variables.
610
611Defaults for the options are specified in brackets.
612
613Configuration:
614 -h, --help display this help and exit
615 --help=short display options specific to this package
616 --help=recursive display the short help of all the included packages
617 -V, --version display version information and exit
618 -q, --quiet, --silent do not print \`checking...' messages
619 --cache-file=FILE cache test results in FILE [disabled]
620 -C, --config-cache alias for \`--cache-file=config.cache'
621 -n, --no-create do not create output files
622 --srcdir=DIR find the sources in DIR [configure dir or \`..']
623
925c2f3f 624EOF
503d2be0 625
925c2f3f 626 cat <<EOF
503d2be0
AS
627Installation directories:
628 --prefix=PREFIX install architecture-independent files in PREFIX
629 [$ac_default_prefix]
630 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
631 [PREFIX]
632
633By default, \`make install' will install all the files in
634\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
635an installation prefix other than \`$ac_default_prefix' using \`--prefix',
636for instance \`--prefix=\$HOME'.
637
638For better control, use the options below.
639
640Fine tuning of the installation directories:
641 --bindir=DIR user executables [EPREFIX/bin]
642 --sbindir=DIR system admin executables [EPREFIX/sbin]
643 --libexecdir=DIR program executables [EPREFIX/libexec]
644 --datadir=DIR read-only architecture-independent data [PREFIX/share]
645 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
646 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
647 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
648 --libdir=DIR object code libraries [EPREFIX/lib]
649 --includedir=DIR C header files [PREFIX/include]
650 --oldincludedir=DIR C header files for non-gcc [/usr/include]
651 --infodir=DIR info documentation [PREFIX/info]
652 --mandir=DIR man documentation [PREFIX/man]
925c2f3f 653EOF
503d2be0 654
925c2f3f 655 cat <<\EOF
503d2be0 656
ba5da88a
PJ
657Program names:
658 --program-prefix=PREFIX prepend PREFIX to installed program names
659 --program-suffix=SUFFIX append SUFFIX to installed program names
660 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
661
503d2be0
AS
662X features:
663 --x-includes=DIR X include files are in DIR
664 --x-libraries=DIR X library files are in DIR
665
666System types:
667 --build=BUILD configure for building on BUILD [guessed]
925c2f3f
EZ
668 --host=HOST build programs to run on HOST [BUILD]
669EOF
503d2be0
AS
670fi
671
672if test -n "$ac_init_help"; then
673
925c2f3f 674 cat <<\EOF
503d2be0
AS
675
676Optional Features:
677 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
678 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
679 --disable-largefile omit support for large files
680
681Optional Packages:
682 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
683 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
98418dba 684 --with-game-dir use a shared game directory if possible
6ef02752 685 --with-game-user use specified user for game directory
503d2be0
AS
686 --without-gcc don't use GCC to compile Emacs if GCC is found
687 --without-pop don't support POP mail retrieval with movemail
688 --with-kerberos support Kerberos-authenticated POP
689 --with-kerberos5 support Kerberos version 5 authenticated POP
690 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 691 --without-sound don't compile with sound support
503d2be0
AS
692 --with-x-toolkit=KIT use an X toolkit (KIT = yes/lucid/athena/motif/no)
693 --with-xpm use -lXpm for displaying XPM images
694 --with-jpeg use -ljpeg for displaying JPEG images
695 --with-tiff use -ltiff for displaying TIFF images
696 --with-gif use -lungif for displaying GIF images
697 --with-png use -lpng for displaying PNG images
698 --without-toolkit-scroll-bars
cc227489
MB
699 don't use Motif or Xaw3d scroll bars
700 --without-xim don't use X11 XIM
e0f712ba 701 --without-carbon don't use Carbon GUI on Mac OS X
503d2be0
AS
702 --with-x use the X Window System
703
704Some influential environment variables:
705 CC C compiler command
706 CFLAGS C compiler flags
707 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
708 nonstandard directory <lib dir>
709 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
710 headers in a nonstandard directory <include dir>
711 CPP C preprocessor
712
713Use these variables to override the choices made by `configure' or to help
714it to find libraries and programs with nonstandard names/locations.
715
925c2f3f 716EOF
503d2be0
AS
717fi
718
719if test "$ac_init_help" = "recursive"; then
720 # If there are subdirs, report their specific --help.
721 ac_popdir=`pwd`
925c2f3f
EZ
722 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
723 cd $ac_subdir
724 # A "../" for each directory in /$ac_subdir.
725 ac_dots=`echo $ac_subdir |
726 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
727
728 case $srcdir in
729 .) # No --srcdir option. We are building in place.
730 ac_sub_srcdir=$srcdir ;;
731 [\\/]* | ?:[\\/]* ) # Absolute path.
732 ac_sub_srcdir=$srcdir/$ac_subdir ;;
733 *) # Relative path.
734 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
735 esac
503d2be0
AS
736
737 # Check for guested configure; otherwise get Cygnus style configure.
925c2f3f 738 if test -f $ac_sub_srcdir/configure.gnu; then
503d2be0 739 echo
925c2f3f
EZ
740 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
741 elif test -f $ac_sub_srcdir/configure; then
503d2be0 742 echo
925c2f3f
EZ
743 $SHELL $ac_sub_srcdir/configure --help=recursive
744 elif test -f $ac_sub_srcdir/configure.ac ||
745 test -f $ac_sub_srcdir/configure.in; then
503d2be0
AS
746 echo
747 $ac_configure --help
748 else
925c2f3f 749 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
503d2be0
AS
750 fi
751 cd $ac_popdir
752 done
753fi
754
755test -n "$ac_init_help" && exit 0
756if $ac_init_version; then
925c2f3f 757 cat <<\EOF
503d2be0 758
925c2f3f 759Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
503d2be0
AS
760Free Software Foundation, Inc.
761This configure script is free software; the Free Software Foundation
762gives unlimited permission to copy, distribute and modify it.
925c2f3f 763EOF
503d2be0
AS
764 exit 0
765fi
766exec 5>config.log
925c2f3f 767cat >&5 <<EOF
503d2be0
AS
768This file contains any messages produced by compilers while
769running configure, to aid debugging if configure makes a mistake.
770
771It was created by $as_me, which was
925c2f3f 772generated by GNU Autoconf 2.52. Invocation command line was
503d2be0
AS
773
774 $ $0 $@
775
925c2f3f 776EOF
503d2be0
AS
777{
778cat <<_ASUNAME
925c2f3f
EZ
779## ---------- ##
780## Platform. ##
781## ---------- ##
503d2be0
AS
782
783hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
784uname -m = `(uname -m) 2>/dev/null || echo unknown`
785uname -r = `(uname -r) 2>/dev/null || echo unknown`
786uname -s = `(uname -s) 2>/dev/null || echo unknown`
787uname -v = `(uname -v) 2>/dev/null || echo unknown`
788
789/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
790/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
791
792/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
793/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
794/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
795hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
796/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
797/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
798/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
799
925c2f3f 800PATH = $PATH
98418dba 801
925c2f3f 802_ASUNAME
503d2be0
AS
803} >&5
804
925c2f3f
EZ
805cat >&5 <<EOF
806## ------------ ##
807## Core tests. ##
808## ------------ ##
503d2be0 809
925c2f3f 810EOF
503d2be0
AS
811
812# Keep a trace of the command line.
813# Strip out --no-create and --no-recursion so they do not pile up.
814# Also quote any args containing shell meta-characters.
815ac_configure_args=
816ac_sep=
817for ac_arg
818do
819 case $ac_arg in
820 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
925c2f3f 821 | --no-cr | --no-c) ;;
503d2be0 822 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
925c2f3f 823 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
503d2be0 824 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
925c2f3f
EZ
825 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
826 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
827 ac_sep=" " ;;
828 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
829 ac_sep=" " ;;
503d2be0
AS
830 esac
831 # Get rid of the leading space.
832done
833
834# When interrupted or exit'd, cleanup temporary files, and complete
835# config.log. We remove comments because anyway the quotes in there
836# would cause problems or look ugly.
837trap 'exit_status=$?
838 # Save into config.log some information that might help in debugging.
925c2f3f
EZ
839 echo >&5
840 echo "## ----------------- ##" >&5
841 echo "## Cache variables. ##" >&5
842 echo "## ----------------- ##" >&5
843 echo >&5
844 # The following way of writing the cache mishandles newlines in values,
503d2be0
AS
845{
846 (set) 2>&1 |
847 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
848 *ac_space=\ *)
849 sed -n \
850 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
851 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
852 ;;
853 *)
854 sed -n \
855 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
856 ;;
857 esac;
925c2f3f
EZ
858} >&5
859 sed "/^$/d" confdefs.h >conftest.log
860 if test -s conftest.log; then
861 echo >&5
862 echo "## ------------ ##" >&5
863 echo "## confdefs.h. ##" >&5
864 echo "## ------------ ##" >&5
865 echo >&5
866 cat conftest.log >&5
867 fi
868 (echo; echo) >&5
869 test "$ac_signal" != 0 &&
870 echo "$as_me: caught signal $ac_signal" >&5
871 echo "$as_me: exit $exit_status" >&5
872 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
503d2be0
AS
873 exit $exit_status
874 ' 0
875for ac_signal in 1 2 13 15; do
876 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
877done
878ac_signal=0
879
880# confdefs.h avoids OS command line length limits that DEFS can exceed.
881rm -rf conftest* confdefs.h
882# AIX cpp loses on an empty file, so make sure it contains at least a newline.
883echo >confdefs.h
ba4481b5 884
503d2be0 885# Let the site file select an alternate cache file if it wants to.
ba4481b5
DL
886# Prefer explicitly selected file to automatically selected ones.
887if test -z "$CONFIG_SITE"; then
888 if test "x$prefix" != xNONE; then
889 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
890 else
891 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
892 fi
893fi
894for ac_site_file in $CONFIG_SITE; do
895 if test -r "$ac_site_file"; then
925c2f3f 896 { echo "$as_me:896: loading site script $ac_site_file" >&5
503d2be0 897echo "$as_me: loading site script $ac_site_file" >&6;}
925c2f3f 898 cat "$ac_site_file" >&5
ba4481b5
DL
899 . "$ac_site_file"
900 fi
901done
902
903if test -r "$cache_file"; then
503d2be0
AS
904 # Some versions of bash will fail to source /dev/null (special
905 # files actually), so we avoid doing that.
906 if test -f "$cache_file"; then
925c2f3f 907 { echo "$as_me:907: loading cache $cache_file" >&5
503d2be0
AS
908echo "$as_me: loading cache $cache_file" >&6;}
909 case $cache_file in
910 [\\/]* | ?:[\\/]* ) . $cache_file;;
911 *) . ./$cache_file;;
912 esac
913 fi
ba4481b5 914else
925c2f3f 915 { echo "$as_me:915: creating cache $cache_file" >&5
503d2be0
AS
916echo "$as_me: creating cache $cache_file" >&6;}
917 >$cache_file
918fi
919
920# Check that the precious variables saved in the cache have kept the same
921# value.
922ac_cache_corrupted=false
923for ac_var in `(set) 2>&1 |
924 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
925 eval ac_old_set=\$ac_cv_env_${ac_var}_set
926 eval ac_new_set=\$ac_env_${ac_var}_set
927 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
928 eval ac_new_val="\$ac_env_${ac_var}_value"
929 case $ac_old_set,$ac_new_set in
930 set,)
925c2f3f 931 { echo "$as_me:931: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
932echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
933 ac_cache_corrupted=: ;;
934 ,set)
925c2f3f 935 { echo "$as_me:935: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
936echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
937 ac_cache_corrupted=: ;;
938 ,);;
939 *)
940 if test "x$ac_old_val" != "x$ac_new_val"; then
925c2f3f 941 { echo "$as_me:941: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 942echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
925c2f3f 943 { echo "$as_me:943: former value: $ac_old_val" >&5
503d2be0 944echo "$as_me: former value: $ac_old_val" >&2;}
925c2f3f 945 { echo "$as_me:945: current value: $ac_new_val" >&5
503d2be0
AS
946echo "$as_me: current value: $ac_new_val" >&2;}
947 ac_cache_corrupted=:
948 fi;;
949 esac
925c2f3f
EZ
950 # Pass precious variables to config.status. It doesn't matter if
951 # we pass some twice (in addition to the command line arguments).
503d2be0
AS
952 if test "$ac_new_set" = set; then
953 case $ac_new_val in
954 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
925c2f3f
EZ
955 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
956 ac_configure_args="$ac_configure_args '$ac_arg'"
957 ;;
958 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
959 ;;
503d2be0
AS
960 esac
961 fi
962done
963if $ac_cache_corrupted; then
925c2f3f 964 { echo "$as_me:964: error: changes in the environment can compromise the build" >&5
503d2be0 965echo "$as_me: error: changes in the environment can compromise the build" >&2;}
925c2f3f 966 { { echo "$as_me:966: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
967echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
968 { (exit 1); exit 1; }; }
ba4481b5
DL
969fi
970
971ac_ext=c
ba4481b5 972ac_cpp='$CPP $CPPFLAGS'
503d2be0
AS
973ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
974ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
975ac_compiler_gnu=$ac_cv_c_compiler_gnu
976
925c2f3f
EZ
977case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
978 *c*,-n*) ECHO_N= ECHO_C='
979' ECHO_T=' ' ;;
980 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
981 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
982esac
983echo "#! $SHELL" >conftest.sh
984echo "exit 0" >>conftest.sh
985chmod +x conftest.sh
986if { (echo "$as_me:986: PATH=\".;.\"; conftest.sh") >&5
987 (PATH=".;."; conftest.sh) 2>&5
988 ac_status=$?
989 echo "$as_me:989: \$? = $ac_status" >&5
990 (exit $ac_status); }; then
991 ac_path_separator=';'
992else
993 ac_path_separator=:
994fi
995PATH_SEPARATOR="$ac_path_separator"
996rm -f conftest.sh
ba4481b5 997
8799b3e4 998ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 999
ba5da88a
PJ
1000test "$program_prefix" != NONE &&
1001 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1002# Use a double $ so make ignores it.
1003test "$program_suffix" != NONE &&
1004 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1005# Double any \ or $. echo might interpret backslashes.
1006# By default was `s,x,x', remove it if useless.
1007cat <<\_ACEOF >conftest.sed
1008s/[\\$]/&&/g;s/;s,x,x,$//
1009_ACEOF
1010program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1011rm conftest.sed
1012
ba4481b5
DL
1013lispdir='${datadir}/emacs/${version}/lisp'
1014locallisppath='${datadir}/emacs/${version}/site-lisp:'\
1015'${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
1016lisppath='${locallisppath}:${lispdir}'
1017etcdir='${datadir}/emacs/${version}/etc'
1018archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1019docdir='${datadir}/emacs/${version}/etc'
98418dba
CW
1020gamedir=yes
1021
98418dba
CW
1022# Check whether --with-game-dir or --without-game-dir was given.
1023if test "${with_game_dir+set}" = set; then
1024 withval="$with_game_dir"
8799b3e4
CW
1025
1026 gamedir="$withval"
98418dba
CW
1027
1028fi;
8799b3e4
CW
1029if test "$gamedir" = yes; then
1030 gamedir="${localstatedir}/games/emacs"
1031fi
1032eval tgamedir=\"$gamedir\"
1033if test "$gamedir" != no; then
1034
925c2f3f 1035cat >>confdefs.h <<EOF
8799b3e4 1036#define HAVE_SHARED_GAME_DIR "$tgamedir"
925c2f3f 1037EOF
8799b3e4
CW
1038
1039fi
98418dba
CW
1040
1041gameuser=games
1042
1043# Check whether --with-game-user or --without-game-user was given.
1044if test "${with_game_user+set}" = set; then
1045 withval="$with_game_user"
1046 gameuser="$withval"
1047fi;
1048
ba4481b5
DL
1049# Check whether --with-gcc or --without-gcc was given.
1050if test "${with_gcc+set}" = set; then
1051 withval="$with_gcc"
503d2be0
AS
1052
1053fi;
ba4481b5
DL
1054
1055# Check whether --with-pop or --without-pop was given.
1056if test "${with_pop+set}" = set; then
1057 withval="$with_pop"
243cf185 1058 if test "$withval" = yes; then
925c2f3f 1059 cat >>confdefs.h <<\EOF
ba4481b5 1060#define MAIL_USE_POP 1
925c2f3f 1061EOF
ba4481b5 1062
243cf185
DL
1063else :
1064fi
3d9fec71 1065else
925c2f3f 1066 cat >>confdefs.h <<\EOF
3d9fec71 1067#define MAIL_USE_POP 1
925c2f3f 1068EOF
3d9fec71 1069
503d2be0 1070fi;
ba4481b5 1071
a21616bd
KR
1072# Check whether --with-kerberos or --without-kerberos was given.
1073if test "${with_kerberos+set}" = set; then
1074 withval="$with_kerberos"
925c2f3f 1075 cat >>confdefs.h <<\EOF
a21616bd 1076#define KERBEROS 1
925c2f3f 1077EOF
a21616bd 1078
503d2be0 1079fi;
a21616bd
KR
1080
1081# Check whether --with-kerberos5 or --without-kerberos5 was given.
1082if test "${with_kerberos5+set}" = set; then
1083 withval="$with_kerberos5"
1084 if test "${with_kerberos5+set}" = set; then
1085 if test "${with_kerberos+set}" != set; then
1086 with_kerberos=yes
925c2f3f 1087 cat >>confdefs.h <<\EOF
a21616bd 1088#define KERBEROS 1
925c2f3f 1089EOF
a21616bd
KR
1090
1091 fi
1092fi
b936fae4 1093
925c2f3f 1094cat >>confdefs.h <<\EOF
a21616bd 1095#define KERBEROS5 1
925c2f3f 1096EOF
a21616bd 1097
503d2be0 1098fi;
a21616bd 1099
ba4481b5
DL
1100# Check whether --with-hesiod or --without-hesiod was given.
1101if test "${with_hesiod+set}" = set; then
1102 withval="$with_hesiod"
b936fae4 1103
925c2f3f 1104cat >>confdefs.h <<\EOF
ba4481b5 1105#define HESIOD 1
925c2f3f 1106EOF
ba4481b5 1107
503d2be0 1108fi;
ba4481b5 1109
2c9dccc9
PJ
1110# Check whether --with-sound or --without-sound was given.
1111if test "${with_sound+set}" = set; then
1112 withval="$with_sound"
1113
1114fi;
1115
ba4481b5
DL
1116# Check whether --with-x-toolkit or --without-x-toolkit was given.
1117if test "${with_x_toolkit+set}" = set; then
1118 withval="$with_x_toolkit"
1119 case "${withval}" in
1120 y | ye | yes ) val=athena ;;
1121 n | no ) val=no ;;
1122 l | lu | luc | luci | lucid ) val=lucid ;;
1123 a | at | ath | athe | athen | athena ) val=athena ;;
1124 m | mo | mot | moti | motif ) val=motif ;;
1125 * )
925c2f3f 1126{ { echo "$as_me:1126: error: \`--with-x-toolkit=$withval' is invalid\;
ba4481b5 1127this option's value should be \`yes', \`no', \`lucid', \`athena', or \`motif'.
503d2be0
AS
1128Currently, \`yes', \`athena' and \`lucid' are synonyms." >&5
1129echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid\;
1130this option's value should be \`yes', \`no', \`lucid', \`athena', or \`motif'.
1131Currently, \`yes', \`athena' and \`lucid' are synonyms." >&2;}
1132 { (exit 1); exit 1; }; }
ba4481b5
DL
1133 ;;
1134 esac
1135 with_x_toolkit=$val
1136
503d2be0 1137fi;
ba4481b5
DL
1138
1139# Check whether --with-xpm or --without-xpm was given.
1140if test "${with_xpm+set}" = set; then
1141 withval="$with_xpm"
503d2be0
AS
1142
1143fi;
ba4481b5
DL
1144
1145# Check whether --with-jpeg or --without-jpeg was given.
1146if test "${with_jpeg+set}" = set; then
1147 withval="$with_jpeg"
503d2be0
AS
1148
1149fi;
ba4481b5
DL
1150
1151# Check whether --with-tiff or --without-tiff was given.
1152if test "${with_tiff+set}" = set; then
1153 withval="$with_tiff"
503d2be0
AS
1154
1155fi;
ba4481b5
DL
1156
1157# Check whether --with-gif or --without-gif was given.
1158if test "${with_gif+set}" = set; then
1159 withval="$with_gif"
503d2be0
AS
1160
1161fi;
ba4481b5
DL
1162
1163# Check whether --with-png or --without-png was given.
1164if test "${with_png+set}" = set; then
1165 withval="$with_png"
503d2be0
AS
1166
1167fi;
ba4481b5
DL
1168
1169# Check whether --with-toolkit-scroll-bars or --without-toolkit-scroll-bars was given.
1170if test "${with_toolkit_scroll_bars+set}" = set; then
1171 withval="$with_toolkit_scroll_bars"
503d2be0
AS
1172
1173fi;
ba4481b5 1174
1d36487c
GM
1175# Check whether --with-xim or --without-xim was given.
1176if test "${with_xim+set}" = set; then
1177 withval="$with_xim"
1d36487c 1178
503d2be0 1179fi;
ba4481b5 1180
e0f712ba
AC
1181# Check whether --with-carbon or --without-carbon was given.
1182if test "${with_carbon+set}" = set; then
1183 withval="$with_carbon"
1184
1185fi;
1186
ba4481b5 1187#### Make srcdir absolute, if it isn't already. It's important to
17494071 1188#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
1189#### give you automounter prefixes, which can go away. We do all this
1190#### so Emacs can find its files when run uninstalled.
17494071
GM
1191## Make sure CDPATH doesn't affect cd (in case PWD is relative).
1192unset CDPATH
ba4481b5
DL
1193case "${srcdir}" in
1194 /* ) ;;
1195 . )
1196 ## We may be able to use the $PWD environment variable to make this
1197 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
1198 ## Note: we used to use ${PWD} at the end instead of `pwd`,
1199 ## but that tested only for a well-formed and valid PWD,
1200 ## it did not object when PWD was well-formed and valid but just wrong.
1201 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
1202 then
1203 srcdir="$PWD"
1204 else
1205 srcdir="`(cd ${srcdir}; pwd)`"
1206 fi
1207 ;;
1208 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
1209esac
1210
1211#### Check if the source directory already has a configured system in it.
1212if test `pwd` != `(cd ${srcdir} && pwd)` \
1213 && test -f "${srcdir}/src/config.h" ; then
925c2f3f 1214 { echo "$as_me:1214: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
1215 as a build directory right now; it has been configured in its own
1216 right. To configure in another directory as well, you MUST
1217 use GNU make. If you do not have GNU make, then you must
1218 now do \`make distclean' in ${srcdir},
1219 and then run $0 again." >&5
1220echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
1221 as a build directory right now; it has been configured in its own
1222 right. To configure in another directory as well, you MUST
1223 use GNU make. If you do not have GNU make, then you must
1224 now do \`make distclean' in ${srcdir},
503d2be0 1225 and then run $0 again." >&2;}
ba4481b5
DL
1226
1227 extrasub='/^VPATH[ ]*=/c\
1228vpath %.c $(srcdir)\
1229vpath %.h $(srcdir)\
1230vpath %.y $(srcdir)\
1231vpath %.l $(srcdir)\
1232vpath %.s $(srcdir)\
1233vpath %.in $(srcdir)\
1234vpath %.texi $(srcdir)'
1235fi
1236
1237#### Given the configuration name, set machfile and opsysfile to the
1238#### names of the m/*.h and s/*.h files we should use.
1239
1240### Canonicalize the configuration name.
1241
1242ac_aux_dir=
1243for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1244 if test -f $ac_dir/install-sh; then
1245 ac_aux_dir=$ac_dir
1246 ac_install_sh="$ac_aux_dir/install-sh -c"
1247 break
1248 elif test -f $ac_dir/install.sh; then
1249 ac_aux_dir=$ac_dir
1250 ac_install_sh="$ac_aux_dir/install.sh -c"
1251 break
503d2be0
AS
1252 elif test -f $ac_dir/shtool; then
1253 ac_aux_dir=$ac_dir
1254 ac_install_sh="$ac_aux_dir/shtool install -c"
1255 break
ba4481b5
DL
1256 fi
1257done
1258if test -z "$ac_aux_dir"; then
925c2f3f 1259 { { echo "$as_me:1259: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
503d2be0
AS
1260echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1261 { (exit 1); exit 1; }; }
ba4481b5 1262fi
503d2be0
AS
1263ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1264ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1265ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ba4481b5
DL
1266
1267# Make sure we can run config.sub.
503d2be0 1268$ac_config_sub sun4 >/dev/null 2>&1 ||
925c2f3f 1269 { { echo "$as_me:1269: error: cannot run $ac_config_sub" >&5
503d2be0
AS
1270echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1271 { (exit 1); exit 1; }; }
1272
925c2f3f 1273echo "$as_me:1273: checking build system type" >&5
503d2be0
AS
1274echo $ECHO_N "checking build system type... $ECHO_C" >&6
1275if test "${ac_cv_build+set}" = set; then
1276 echo $ECHO_N "(cached) $ECHO_C" >&6
1277else
1278 ac_cv_build_alias=$build_alias
1279test -z "$ac_cv_build_alias" &&
1280 ac_cv_build_alias=`$ac_config_guess`
1281test -z "$ac_cv_build_alias" &&
925c2f3f 1282 { { echo "$as_me:1282: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
1283echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1284 { (exit 1); exit 1; }; }
1285ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
925c2f3f
EZ
1286 { { echo "$as_me:1286: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1287echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
503d2be0
AS
1288 { (exit 1); exit 1; }; }
1289
1290fi
925c2f3f 1291echo "$as_me:1291: result: $ac_cv_build" >&5
503d2be0
AS
1292echo "${ECHO_T}$ac_cv_build" >&6
1293build=$ac_cv_build
1294build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1295build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1296build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1297
925c2f3f 1298echo "$as_me:1298: checking host system type" >&5
503d2be0
AS
1299echo $ECHO_N "checking host system type... $ECHO_C" >&6
1300if test "${ac_cv_host+set}" = set; then
1301 echo $ECHO_N "(cached) $ECHO_C" >&6
1302else
1303 ac_cv_host_alias=$host_alias
1304test -z "$ac_cv_host_alias" &&
1305 ac_cv_host_alias=$ac_cv_build_alias
1306ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
925c2f3f 1307 { { echo "$as_me:1307: error: $ac_config_sub $ac_cv_host_alias failed" >&5
503d2be0
AS
1308echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1309 { (exit 1); exit 1; }; }
1310
1311fi
925c2f3f 1312echo "$as_me:1312: result: $ac_cv_host" >&5
503d2be0
AS
1313echo "${ECHO_T}$ac_cv_host" >&6
1314host=$ac_cv_host
1315host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1316host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1317host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ba4481b5
DL
1318
1319canonical=$host
531a3336 1320configuration=${host_alias-$host}
ba4481b5 1321
ba4481b5
DL
1322### If you add support for a new configuration, add code to this
1323### switch statement to recognize your configuration name and select
1324### the appropriate operating system and machine description files.
1325
1326### You would hope that you could choose an m/*.h file pretty much
1327### based on the machine portion of the configuration name, and an s-
1328### file based on the operating system portion. However, it turns out
1329### that each m/*.h file is pretty manufacturer-specific - for
1330### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
1331### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
1332### machines. So we basically have to have a special case for each
1333### configuration name.
1334###
1335### As far as handling version numbers on operating systems is
1336### concerned, make sure things will fail in a fixable way. If
1337### /etc/MACHINES doesn't say anything about version numbers, be
1338### prepared to handle anything reasonably. If version numbers
1339### matter, be sure /etc/MACHINES says something about it.
1340###
1341### Eric Raymond says we should accept strings like "sysvr4" to mean
1342### "System V Release 4"; he writes, "The old convention encouraged
1343### confusion between `system' and `release' levels'."
1344
1345machine='' opsys='' unported=no
1346case "${canonical}" in
1347
1096bcc0
GM
1348 ## FreeBSD ports
1349 *-*-freebsd* )
1350 opsys=freebsd
1351 case "${canonical}" in
1352 alpha*-*-freebsd*) machine=alpha ;;
1353 i[3456]86-*-freebsd*) machine=intel386 ;;
1354 esac
1355 ;;
1356
ba4481b5
DL
1357 ## NetBSD ports
1358 *-*-netbsd* )
1359 opsys=netbsd
1360 case "${canonical}" in
1361 alpha*-*-netbsd*) machine=alpha ;;
1362 i[3456]86-*-netbsd*) machine=intel386 ;;
1363 m68k-*-netbsd*)
1364 # This is somewhat bogus.
1365 machine=hp9000s300 ;;
1366 powerpc-apple-netbsd*) machine=macppc ;;
1367 mips-*-netbsd*) machine=pmax ;;
2df636f4 1368 mipsel-*-netbsd*) machine=pmax ;;
ba4481b5 1369 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 1370 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 1371 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 1372 vax-*-netbsd*) machine=vax ;;
2df636f4 1373 arm-*-netbsd*) machine=arm ;;
ba4481b5
DL
1374 esac
1375 ;;
1376
1377 ## OpenBSD ports
1378 *-*-openbsd* )
1379 opsys=openbsd
1380 case "${canonical}" in
1381 alpha*-*-openbsd*) machine=alpha ;;
1382 i386-*-openbsd*) machine=intel386 ;;
1383 m68k-*-openbsd*) machine=hp9000s300 ;;
1384 mipsel-*-openbsd*) machine=pmax ;;
1385 ns32k-*-openbsd*) machine=ns32000 ;;
1386 sparc-*-openbsd*) machine=sparc ;;
1387 vax-*-openbsd*) machine=vax ;;
1388 esac
1389 ;;
1390
1391 ## Acorn RISCiX:
1392 arm-acorn-riscix1.1* )
1393 machine=acorn opsys=riscix1-1
1394 ;;
1395 arm-acorn-riscix1.2* | arm-acorn-riscix )
1396 ## This name is riscix12 instead of riscix1.2
1397 ## to avoid a file name conflict on MSDOS.
1398 machine=acorn opsys=riscix12
1399 ;;
1400
1401 ## BSDI ports
1402 *-*-bsdi* )
1403 opsys=bsdi
1404 case "${canonical}" in
1405 i[345]86-*-bsdi*) machine=intel386 ;;
1406 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 1407 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
1408 esac
1409 case "${canonical}" in
1410 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
1411 *-*-bsdi2.0* ) opsys=bsdos2 ;;
1412 *-*-bsdi2* ) opsys=bsdos2-1 ;;
1413 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 1414 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
1415 esac
1416 ;;
1417
1418 ## Alliant machines
1419 ## Strictly speaking, we need the version of the alliant operating
1420 ## system to choose the right machine file, but currently the
1421 ## configuration name doesn't tell us enough to choose the right
1422 ## one; we need to give alliants their own operating system name to
1423 ## do this right. When someone cares, they can help us.
1424 fx80-alliant-* )
1425 machine=alliant4 opsys=bsd4-2
1426 ;;
1427 i860-alliant-* )
1428 machine=alliant-2800 opsys=bsd4-3
1429 ;;
1430
1431 ## Alpha (DEC) machines.
1432 alpha*-dec-osf* )
1433 machine=alpha opsys=osf1
1434 # This is needed to find X11R6.1 libraries for certain tests.
1435 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
1436 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
1437 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
1438 # due to non-traditional preprocessing with the current compiler
1439 # defaults. OSF 4 can also have that compiler version, and there
1440 # seems always to have been a usable /usr/bin/cpp.
1441 NON_GNU_CPP=/usr/bin/cpp
ca512671 1442 case "${canonical}" in
a55b799a 1443 alpha*-dec-osf[5-9]*)
bb17930d 1444 opsys=osf5-0 ;;
ca512671 1445 esac
ba4481b5
DL
1446 ;;
1447
1448 alpha*-*-linux-gnu* )
1449 machine=alpha opsys=gnu-linux
1450 ;;
1451
c4bb2108
DL
1452 arm*-*-linux-gnu* )
1453 machine=arm opsys=gnu-linux
1454 ;;
1455
1456 ppc-*-linux | \
1457 powerpc-*-linux* )
3aeecf97 1458 machine=macppc opsys=gnu-linux
c4bb2108
DL
1459 ;;
1460
ba4481b5
DL
1461 ## Altos 3068
1462 m68*-altos-sysv* )
1463 machine=altos opsys=usg5-2
1464 ;;
1465
1466 ## Amdahl UTS
1467 580-amdahl-sysv* )
1468 machine=amdahl opsys=usg5-2-2
1469 ;;
1470
1471 ## Apollo, Domain/OS
1472 m68*-apollo-* )
1473 machine=apollo opsys=bsd4-3
1474 ;;
1475
1476 ## AT&T 3b2, 3b5, 3b15, 3b20
1477 we32k-att-sysv* )
1478 machine=att3b opsys=usg5-2-2
1479 ;;
1480
1481 ## AT&T 3b1 - The Mighty Unix PC!
1482 m68*-att-sysv* )
1483 machine=7300 opsys=usg5-2-2
1484 ;;
1485
1486 ## Bull dpx20
1487 rs6000-bull-bosx* )
1488 machine=ibmrs6000 opsys=aix3-2
1489 ;;
1490
1491 ## Bull dpx2
1492 m68*-bull-sysv3* )
1493 machine=dpx2 opsys=usg5-3
1494 ;;
1495
1496 ## Bull sps7
1497 m68*-bull-sysv2* )
1498 machine=sps7 opsys=usg5-2
1499 ;;
1500
1501 ## CCI 5/32, 6/32 -- see "Tahoe".
1502
1503 ## Celerity
1504 ## I don't know what configuration name to use for this; config.sub
1505 ## doesn't seem to know anything about it. Hey, Celerity users, get
1506 ## in touch with us!
1507 celerity-celerity-bsd* )
1508 machine=celerity opsys=bsd4-2
1509 ;;
1510
1511 ## Clipper
1512 ## What operating systems does this chip run that Emacs has been
1513 ## tested on?
1514 clipper-* )
1515 machine=clipper
1516 ## We'll use the catch-all code at the bottom to guess the
1517 ## operating system.
1518 ;;
1519
df645f7c
AS
1520 ## Compaq Nonstop
1521 mips-compaq-nonstopux* )
1522 machine=nonstopux opsys=nonstopux
1523 ;;
1524
ba4481b5
DL
1525 ## Convex
1526 *-convex-bsd* | *-convex-convexos* )
1527 machine=convex opsys=bsd4-3
1528 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
1529 NON_GNU_CPP="cc -E -P"
1530 ;;
1531
1532 ## Cubix QBx/386
1533 i[3456]86-cubix-sysv* )
1534 machine=intel386 opsys=usg5-3
1535 ;;
1536
1537 ## Cydra 5
1538 cydra*-cydrome-sysv* )
1539 machine=cydra5 opsys=usg5-3
1540 ;;
1541
1542 ## Data General AViiON Machines
1543 ## DG changed naming conventions with the release of 5.4.4.10, they
1544 ## dropped the initial 5.4 but left the intervening R. Because of the
1545 ## R this shouldn't conflict with older versions of the OS (which I
1546 ## think were named like dgux4.*). In addition, DG new AViiONs series
1547 ## uses either Motorola M88k or Intel Pentium CPUs.
1548 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
1549 machine=aviion opsys=dgux4
1550 ;;
1551 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
1552 ## This name is dgux5-4-3 instead of dgux5-4r3
1553 ## to avoid a file name conflict on MSDOS.
1554 machine=aviion opsys=dgux5-4-3
1555 ;;
1556 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
1557 machine=aviion opsys=dgux5-4r2
1558 ;;
1559 m88k-dg-dgux* )
1560 machine=aviion opsys=dgux
1561 ;;
1562
1563 ## Data General AViiON Intel (x86) Machines
1564 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
1565 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
1566 i[345]86-dg-dguxR4* )
1567 machine=aviion-intel opsys=dgux4
1568 ;;
1569
1570 ## DECstations
1571 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1572 machine=pmax opsys=bsd4-2
1573 ;;
1574 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1575 machine=pmax opsys=bsd4-3
1576 ;;
1577 mips-dec-ultrix* )
1578 machine=pmax opsys=ultrix4-3
1579 ;;
1580 mips-dec-osf* )
1581 machine=pmax opsys=osf1
1582 ;;
1583 mips-dec-mach_bsd4.3* )
1584 machine=pmax opsys=mach-bsd4-3
1585 ;;
1586
1587 ## Motorola Delta machines
1588 m68k-motorola-sysv* | m68000-motorola-sysv* )
1589 machine=delta opsys=usg5-3
1590 if test -z "`type gnucc | grep 'not found'`"
1591 then
1592 if test -s /etc/167config
1593 then CC="gnucc -m68040"
1594 else CC="gnucc -m68881"
1595 fi
1596 else
1597 if test -z "`type gcc | grep 'not found'`"
1598 then CC=gcc
1599 else CC=cc
1600 fi
1601 fi
1602 ;;
1603 m88k-motorola-sysv4* )
1604 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1605 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1606 # I hope there are not other 4.0 versions for this machine
1607 # which really need usg5-4 instead.
1608 machine=delta88k opsys=usg5-4-2
1609 ;;
1610 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1611 machine=delta88k opsys=usg5-3
1612 ;;
1613
1614 ## Dual machines
1615 m68*-dual-sysv* )
1616 machine=dual opsys=usg5-2
1617 ;;
1618 m68*-dual-uniplus* )
1619 machine=dual opsys=unipl5-2
1620 ;;
1621
1622 ## Elxsi 6400
1623 elxsi-elxsi-sysv* )
1624 machine=elxsi opsys=usg5-2
1625 ;;
1626
1627 ## Encore machines
1628 ns16k-encore-bsd* )
1629 machine=ns16000 opsys=umax
1630 ;;
1631
65171e3a
DL
1632 ## The GEC 63 - apparently, this port isn't really finished yet.
1633 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
1634
1635 ## Gould Power Node and NP1
1636 pn-gould-bsd4.2* )
1637 machine=gould opsys=bsd4-2
1638 ;;
1639 pn-gould-bsd4.3* )
1640 machine=gould opsys=bsd4-3
1641 ;;
1642 np1-gould-bsd* )
1643 machine=gould-np1 opsys=bsd4-3
1644 ;;
1645
1646 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
1647 ## as far as Emacs is concerned).
1648 m88k-harris-cxux* )
1649 # Build needs to be different on 7.0 and later releases
1650 case "`uname -r`" in
1651 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
1652 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
1653 esac
1654 NON_GNU_CPP="/lib/cpp"
1655 ;;
1656 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
1657 m68k-harris-cxux* )
1658 machine=nh3000 opsys=cxux
1659 ;;
1660 ## Harris power pc NightHawk running Power UNIX (Series 6000)
1661 powerpc-harris-powerunix )
1662 machine=nh6000 opsys=powerunix
1663 NON_GNU_CPP="cc -Xo -E -P"
1664 ;;
1665 ## SR2001/SR2201 running HI-UX/MPP
1666 hppa1.1-hitachi-hiuxmpp* )
1667 machine=sr2k opsys=hiuxmpp
1668 ;;
89a336fa
GM
1669 hppa1.1-hitachi-hiuxwe2* )
1670 machine=sr2k opsys=hiuxwe2
1671 ;;
ba4481b5
DL
1672 ## Honeywell XPS100
1673 xps*-honeywell-sysv* )
1674 machine=xps100 opsys=usg5-2
1675 ;;
1676
1677 ## HP 9000 series 200 or 300
1678 m68*-hp-bsd* )
1679 machine=hp9000s300 opsys=bsd4-3
1680 ;;
1681 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
1682 m68*-hp-hpux* )
1683 case "`uname -r`" in
1684 ## Someone's system reports A.B8.05 for this.
1685 ## I wonder what other possibilities there are.
1686 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
1687 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
1688 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
1689 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
1690 *) machine=hp9000s300 opsys=hpux ;;
1691 esac
1692 ;;
1693
1694 ## HP 9000 series 700 and 800, running HP/UX
1695 hppa*-hp-hpux7* )
1696 machine=hp800 opsys=hpux
1697 ;;
1698 hppa*-hp-hpux8* )
1699 machine=hp800 opsys=hpux8
1700 ;;
1701 hppa*-hp-hpux9shr* )
1702 machine=hp800 opsys=hpux9shr
1703 ;;
1704 hppa*-hp-hpux9* )
1705 machine=hp800 opsys=hpux9
1706 ;;
cc227489 1707 hppa*-hp-hpux10* )
ba4481b5
DL
1708 machine=hp800 opsys=hpux10
1709 ;;
cc227489
MB
1710 hppa*-hp-hpux1[1-9]* )
1711 machine=hp800 opsys=hpux11
1712 ;;
ba4481b5 1713
409d9577
GM
1714 hppa*-*-linux-gnu* )
1715 machine=hp800 opsys=gnu-linux
1716 ;;
1717
ba4481b5
DL
1718 ## HP 9000 series 700 and 800, running HP/UX
1719 hppa*-hp-hpux* )
1720 ## Cross-compilation? Nah!
1721 case "`uname -r`" in
1722 ## Someone's system reports A.B8.05 for this.
1723 ## I wonder what other possibilities there are.
1724 *.B8.* ) machine=hp800 opsys=hpux8 ;;
1725 *.08.* ) machine=hp800 opsys=hpux8 ;;
1726 *.09.* ) machine=hp800 opsys=hpux9 ;;
1727 *) machine=hp800 opsys=hpux10 ;;
1728 esac
1729 ;;
1730 hppa*-*-nextstep* )
1731 machine=hp800 opsys=nextstep
1732 ;;
1733
1734 ## Orion machines
1735 orion-orion-bsd* )
1736 machine=orion opsys=bsd4-2
1737 ;;
1738 clipper-orion-bsd* )
1739 machine=orion105 opsys=bsd4-2
1740 ;;
1741
1742 ## IBM machines
1743 i[3456]86-ibm-aix1.1* )
1744 machine=ibmps2-aix opsys=usg5-2-2
1745 ;;
1746 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
1747 machine=ibmps2-aix opsys=usg5-3
1748 ;;
1749 i370-ibm-aix*)
1750 machine=ibm370aix opsys=usg5-3
1751 ;;
138f0859
GM
1752 s390-*-linux-gnu)
1753 machine=ibms390 opsys=gnu-linux
1754 ;;
ba4481b5
DL
1755 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
1756 machine=ibmrs6000 opsys=aix3-1
1757 ;;
1758 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
1759 machine=ibmrs6000 opsys=aix3-2-5
1760 ;;
1761 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
1762 machine=ibmrs6000 opsys=aix4-1
1763 ;;
1764 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
1765 machine=ibmrs6000 opsys=aix4-2
1766 ;;
d6b82250
EZ
1767 rs6000-ibm-aix5.1* | powerpc-ibm-aix5.1* )
1768 machine=ibmrs6000 opsys=aix4-2
1769 ;;
ba4481b5
DL
1770 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
1771 machine=ibmrs6000 opsys=aix4
1772 ;;
1773 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
1774 machine=ibmrs6000 opsys=aix4-1
1775 ;;
1776 rs6000-ibm-aix* | powerpc-ibm-aix* )
1777 machine=ibmrs6000 opsys=aix3-2
1778 ;;
1779 romp-ibm-bsd4.3* )
1780 machine=ibmrt opsys=bsd4-3
1781 ;;
1782 romp-ibm-bsd4.2* )
1783 machine=ibmrt opsys=bsd4-2
1784 ;;
1785 romp-ibm-aos4.3* )
1786 machine=ibmrt opsys=bsd4-3
1787 ;;
1788 romp-ibm-aos4.2* )
1789 machine=ibmrt opsys=bsd4-2
1790 ;;
1791 romp-ibm-aos* )
1792 machine=ibmrt opsys=bsd4-3
1793 ;;
1794 romp-ibm-bsd* )
1795 machine=ibmrt opsys=bsd4-3
1796 ;;
1797 romp-ibm-aix* )
1798 machine=ibmrt-aix opsys=usg5-2-2
1799 ;;
1800
1801 ## Integrated Solutions `Optimum V'
1802 m68*-isi-bsd4.2* )
1803 machine=isi-ov opsys=bsd4-2
1804 ;;
1805 m68*-isi-bsd4.3* )
1806 machine=isi-ov opsys=bsd4-3
1807 ;;
1808
1809 ## Intel 386 machines where we do care about the manufacturer
1810 i[3456]86-intsys-sysv* )
1811 machine=is386 opsys=usg5-2-2
1812 ;;
1813
1814 ## Prime EXL
1815 i[3456]86-prime-sysv* )
1816 machine=i386 opsys=usg5-3
1817 ;;
1818
1819 ## Sequent Symmetry running Dynix
1820 i[3456]86-sequent-bsd* )
1821 machine=symmetry opsys=bsd4-3
1822 ;;
1823
1824 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
1825 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
1826 machine=sequent-ptx opsys=ptx4
1827 NON_GNU_CPP=/lib/cpp
1828 ;;
1829
1830 ## Sequent Symmetry running DYNIX/ptx
1831 ## Use the old cpp rather than the newer ANSI one.
1832 i[3456]86-sequent-ptx* )
1833 machine=sequent-ptx opsys=ptx
1834 NON_GNU_CPP="/lib/cpp"
1835 ;;
1836
1837 ## ncr machine running svr4.3.
1838 i[3456]86-ncr-sysv4.3 )
1839 machine=ncr386 opsys=usg5-4-3
1840 ;;
1841
1842 ## Unspecified sysv on an ncr machine defaults to svr4.2.
1843 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
1844 i[3456]86-ncr-sysv* )
1845 machine=ncr386 opsys=usg5-4-2
1846 ;;
1847
1848 ## Intel Paragon OSF/1
1849 i860-intel-osf1* )
1850 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
1851 ;;
1852
1853 ## Intel 860
1854 i860-*-sysv4* )
1855 machine=i860 opsys=usg5-4
1856 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
1857 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
1858 ;;
1859
c76e04a8
GM
1860 ## Macintosh PowerPC
1861 powerpc*-*-linux-gnu* )
1862 machine=macppc opsys=gnu-linux
1863 ;;
1864
ba4481b5
DL
1865 ## Masscomp machines
1866 m68*-masscomp-rtu* )
1867 machine=masscomp opsys=rtu
1868 ;;
1869
1870 ## Megatest machines
1871 m68*-megatest-bsd* )
1872 machine=mega68 opsys=bsd4-2
1873 ;;
1874
1875 ## Workstations sold by MIPS
1876 ## This is not necessarily all workstations using the MIPS processor -
1877 ## Irises are produced by SGI, and DECstations by DEC.
1878
1879 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
1880 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
1881 ## it gives for choosing between the alternatives seems to be "Use
1882 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
1883 ## the BSD world." I'll assume that these are instructions for
1884 ## handling two odd situations, and that every other situation
1885 ## should use mips.h and usg5-2-2, they being listed first.
1886 mips-mips-usg* )
1887 machine=mips4
1888 ## Fall through to the general code at the bottom to decide on the OS.
1889 ;;
1890 mips-mips-riscos4* )
1891 machine=mips4 opsys=bsd4-3
1892 NON_GNU_CC="cc -systype bsd43"
1893 NON_GNU_CPP="cc -systype bsd43 -E"
1894 ;;
1895 mips-mips-riscos5* )
1896 machine=mips4 opsys=riscos5
1897 NON_GNU_CC="cc -systype bsd43"
1898 NON_GNU_CPP="cc -systype bsd43 -E"
1899 ;;
1900 mips-mips-bsd* )
1901 machine=mips opsys=bsd4-3
1902 ;;
1903 mips-mips-* )
1904 machine=mips opsys=usg5-2-2
1905 ;;
1906
1907 ## NeXT
1908 m68*-next-* | m68k-*-nextstep* )
1909 machine=m68k opsys=nextstep
1910 ;;
1911
1912 ## The complete machine from National Semiconductor
1913 ns32k-ns-genix* )
1914 machine=ns32000 opsys=usg5-2
1915 ;;
1916
1917 ## NCR machines
1918 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
1919 machine=tower32 opsys=usg5-2-2
1920 ;;
1921 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
1922 machine=tower32v3 opsys=usg5-3
1923 ;;
1924
1925 ## NEC EWS4800
1926 mips-nec-sysv4*)
1927 machine=ews4800 opsys=ux4800
1928 ;;
1929
1930 ## Nixdorf Targon 31
1931 m68*-nixdorf-sysv* )
1932 machine=targon31 opsys=usg5-2-2
1933 ;;
1934
1935 ## Nu (TI or LMI)
1936 m68*-nu-sysv* )
1937 machine=nu opsys=usg5-2
1938 ;;
1939
1940 ## Plexus
1941 m68*-plexus-sysv* )
1942 machine=plexus opsys=usg5-2
1943 ;;
1944
1945 ## PowerPC reference platform
1946 powerpcle-*-solaris2* )
1947 machine=prep
1948 opsys=sol2-5
1949 ;;
1950
1951 ## Pyramid machines
1952 ## I don't really have any idea what sort of processor the Pyramid has,
1953 ## so I'm assuming it is its own architecture.
1954 pyramid-pyramid-bsd* )
1955 machine=pyramid opsys=bsd4-2
1956 ;;
1957
1958 ## Sequent Balance
1959 ns32k-sequent-bsd4.2* )
1960 machine=sequent opsys=bsd4-2
1961 ;;
1962 ns32k-sequent-bsd4.3* )
1963 machine=sequent opsys=bsd4-3
1964 ;;
1965
1966 ## Siemens Nixdorf
1967 mips-siemens-sysv* | mips-sni-sysv*)
1968 machine=mips-siemens opsys=usg5-4
1969 NON_GNU_CC=/usr/ccs/bin/cc
1970 NON_GNU_CPP=/usr/ccs/lib/cpp
1971 ;;
1972
1973 ## Silicon Graphics machines
1974 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
1975 m68*-sgi-iris3.5* )
1976 machine=irist opsys=iris3-5
1977 ;;
1978 m68*-sgi-iris3.6* | m68*-sgi-iris*)
1979 machine=irist opsys=iris3-6
1980 ;;
1981 ## Iris 4D
1982 mips-sgi-irix3* )
1983 machine=iris4d opsys=irix3-3
1984 ;;
1985 mips-sgi-irix4* )
1986 machine=iris4d opsys=irix4-0
1987 ;;
1988 mips-sgi-irix6.5 )
1989 machine=iris4d opsys=irix6-5
946173ad
DL
1990 # Without defining _LANGUAGE_C, things get masked out in the headers
1991 # so that, for instance, grepping for `free' in stdlib.h fails and
1992 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
1993 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 1994 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
1995 ;;
1996 mips-sgi-irix6* )
1997 machine=iris4d opsys=irix6-0
c4bb2108 1998 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
1999 # but presumably it does no harm.
2000 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2001 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2002 NON_GCC_TEST_OPTIONS=-32
2003 ;;
2004 mips-sgi-irix5.[01]* )
2005 machine=iris4d opsys=irix5-0
2006 ;;
2007 mips-sgi-irix5* | mips-sgi-irix* )
2008 machine=iris4d opsys=irix5-2
2009 ;;
2010
2011 ## SONY machines
2012 m68*-sony-bsd4.2* )
2013 machine=news opsys=bsd4-2
2014 ;;
2015 m68*-sony-bsd4.3* )
2016 machine=news opsys=bsd4-3
2017 ;;
2018 m68*-sony-newsos3* | m68*-sony-news3*)
2019 machine=news opsys=bsd4-3
2020 ;;
2021 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2022 machine=news-risc opsys=bsd4-3
2023 ;;
2024 mips-sony-newsos6* )
2025 machine=news-r6 opsys=newsos6
2026 ;;
2027 mips-sony-news* )
2028 machine=news-risc opsys=newsos5
2029 ;;
2030
2031 ## Stride
2032 m68*-stride-sysv* )
2033 machine=stride opsys=usg5-2
2034 ;;
2035
2036 ## Suns
2037 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2038 machine=sparc opsys=gnu-linux
2039 ;;
2040
d054101f 2041 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2042 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2043 | rs6000-*-solaris2*)
2044 case "${canonical}" in
2045 m68*-sunos1* ) machine=sun1 ;;
2046 m68*-sunos2* ) machine=sun2 ;;
2047 m68* ) machine=sun3 ;;
2048 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
2049 i[3456]86-*-* ) machine=intel386 ;;
2050 powerpcle* ) machine=powerpcle ;;
2051 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2052 sparc* ) machine=sparc ;;
2053 * ) unported=yes ;;
2054 esac
2055 case "${canonical}" in
2056 ## The Sun386 didn't get past 4.0.
2057 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2058 *-sunos4.0* ) opsys=sunos4-0 ;;
2059 *-sunos4.1.[3-9]*noshare )
2060 ## This name is sunos413 instead of sunos4-1-3
2061 ## to avoid a file name conflict on MSDOS.
2062 opsys=sunos413
2063 NON_GNU_CPP=/usr/lib/cpp
2064 NON_GCC_TEST_OPTIONS=-Bstatic
2065 GCC_TEST_OPTIONS=-static
2066 ;;
2067 *-sunos4.1.[3-9]* | *-sunos4shr*)
2068 opsys=sunos4shr
2069 NON_GNU_CPP=/usr/lib/cpp
2070 ;;
2071 *-sunos4* | *-sunos )
2072 opsys=sunos4-1
2073 NON_GCC_TEST_OPTIONS=-Bstatic
2074 GCC_TEST_OPTIONS=-static
2075 ;;
2076 *-sunos5.3* | *-solaris2.3* )
2077 opsys=sol2-3
2078 NON_GNU_CPP=/usr/ccs/lib/cpp
2079 ;;
2080 *-sunos5.4* | *-solaris2.4* )
2081 opsys=sol2-4
2082 NON_GNU_CPP=/usr/ccs/lib/cpp
2083 RANLIB="ar -ts"
2084 ;;
2085 *-sunos5.5* | *-solaris2.5* )
2086 opsys=sol2-5
2087 NON_GNU_CPP=/usr/ccs/lib/cpp
2088 RANLIB="ar -ts"
2089 ;;
2090 *-sunos5* | *-solaris* )
2091 opsys=sol2-5
2092 NON_GNU_CPP=/usr/ccs/lib/cpp
2093 ;;
2094 * ) opsys=bsd4-2 ;;
2095 esac
2096 ## Watch out for a compiler that we know will not work.
2097 case "${canonical}" in
2098 *-solaris* | *-sunos5* )
2099 if [ "x$CC" = x/usr/ucb/cc ]; then
2100 ## /usr/ucb/cc doesn't work;
2101 ## we should find some other compiler that does work.
2102 unset CC
2103 fi
2104 ;;
2105 *) ;;
2106 esac
2107 ;;
2108 sparc-*-nextstep* )
2109 machine=sparc opsys=nextstep
2110 ;;
2111
2112 ## Tadpole 68k
2113 m68*-tadpole-sysv* )
2114 machine=tad68k opsys=usg5-3
2115 ;;
2116
2117 ## Tahoe machines
2118 tahoe-tahoe-bsd4.2* )
2119 machine=tahoe opsys=bsd4-2
2120 ;;
2121 tahoe-tahoe-bsd4.3* )
2122 machine=tahoe opsys=bsd4-3
2123 ;;
2124
2125 ## Tandem Integrity S2
2126 mips-tandem-sysv* )
2127 machine=tandem-s2 opsys=usg5-3
2128 ;;
2129
2130 ## Tektronix XD88
2131 m88k-tektronix-sysv3* )
2132 machine=tekxd88 opsys=usg5-3
2133 ;;
2134
2135 ## Tektronix 16000 box (6130?)
2136 ns16k-tektronix-bsd* )
2137 machine=ns16000 opsys=bsd4-2
2138 ;;
2139 ## Tektronix 4300
2140 ## src/m/tek4300.h hints that this is a m68k machine.
2141 m68*-tektronix-bsd* )
2142 machine=tek4300 opsys=bsd4-3
2143 ;;
2144
2145 ## Titan P2 or P3
2146 ## We seem to have lost the machine-description file titan.h!
2147 titan-titan-sysv* )
2148 machine=titan opsys=usg5-3
2149 ;;
2150
2151 ## Ustation E30 (SS5E)
2152 m68*-unisys-uniplus* )
2153 machine=ustation opsystem=unipl5-2
2154 ;;
2155
2156 ## Vaxen.
2157 vax-dec-* )
2158 machine=vax
2159 case "${canonical}" in
2160 *-bsd4.1* ) opsys=bsd4-1 ;;
2161 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
2162 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
2163 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
2164 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
2165 *-vms* ) opsys=vms ;;
2166 * ) unported=yes
2167 esac
2168 ;;
2169
2170 ## Whitechapel MG1
2171 ns16k-whitechapel-* )
2172 machine=mg1
2173 ## We don't know what sort of OS runs on these; we'll let the
2174 ## operating system guessing code below try.
2175 ;;
2176
2177 ## Wicat
2178 m68*-wicat-sysv* )
2179 machine=wicat opsys=usg5-2
2180 ;;
2181
f4988be7
GM
2182 ## IA-64
2183 ia64*-*-linux* )
2184 machine=ia64 opsys=gnu-linux
2185 ;;
2186
ba4481b5
DL
2187 ## Intel 386 machines where we don't care about the manufacturer
2188 i[3456]86-*-* )
2189 machine=intel386
2190 case "${canonical}" in
9f817ea4 2191 *-lynxos* ) opsys=lynxos ;;
ba4481b5
DL
2192 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
2193 *-isc2.2* ) opsys=isc2-2 ;;
2194 *-isc4.0* ) opsys=isc4-0 ;;
2195 *-isc4.* ) opsys=isc4-1
2196 GCC_TEST_OPTIONS=-posix
2197 NON_GCC_TEST_OPTIONS=-Xp
2198 ;;
2199 *-isc* ) opsys=isc3-0 ;;
2200 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
2201 *-esix* ) opsys=esix ;;
2202 *-xenix* ) opsys=xenix ;;
2203 *-linux-gnu* ) opsys=gnu-linux ;;
2204 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 2205 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
2206 NON_GNU_CPP=/lib/cpp
2207 # Prevent -belf from being passed to $CPP.
2208 # /lib/cpp does not accept it.
2209 OVERRIDE_CPPFLAGS=" "
2210 ;;
2211 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2212 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
2213 *-nextstep* ) opsys=nextstep ;;
2214 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2215 esac
2216 ;;
2217
2218 ## m68k Linux-based GNU system
2219 m68k-*-linux-gnu* )
2220 machine=m68k opsys=gnu-linux
2221 ;;
2222
2223 ## Mips Linux-based GNU system
2224 mips-*-linux-gnu* )
2225 machine=mips opsys=gnu-linux
2226 ;;
2227
2228 ## UXP/DS
2229 sparc-fujitsu-sysv4* )
2230 machine=sparc opsys=uxpds
2231 NON_GNU_CPP=/usr/ccs/lib/cpp
2232 RANLIB="ar -ts"
2233 ;;
2234
2235 ## UXP/V
2236 f301-fujitsu-uxpv4.1)
2237 machine=f301 opsys=uxpv
2238 ;;
2239
e0f712ba
AC
2240 ## Darwin / Mac OS X
2241 powerpc-apple-darwin* )
2242 machine=powermac opsys=darwin
2243 # Define CPP as follows to make autoconf work correctly.
2244 CPP="cc -E -traditional-cpp"
2245 ;;
2246
ba4481b5
DL
2247 * )
2248 unported=yes
2249 ;;
2250esac
2251
2252### If the code above didn't choose an operating system, just choose
2253### an operating system based on the configuration name. You really
2254### only want to use this when you have no idea what the right
2255### operating system is; if you know what operating systems a machine
2256### runs, it's cleaner to make it explicit in the case statement
2257### above.
2258if test x"${opsys}" = x; then
2259 case "${canonical}" in
2260 *-gnu* ) opsys=gnu ;;
2261 *-bsd4.[01] ) opsys=bsd4-1 ;;
2262 *-bsd4.2 ) opsys=bsd4-2 ;;
2263 *-bsd4.3 ) opsys=bsd4-3 ;;
2264 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
2265 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
2266 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
2267 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
2268 *-sysv4.2uw* ) opsys=unixware ;;
2269 *-sysv4.1* | *-sysvr4.1* )
2270 NON_GNU_CPP=/usr/lib/cpp
2271 opsys=usg5-4 ;;
2272 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2273 if [ x$NON_GNU_CPP = x ]; then
2274 if [ -f /usr/ccs/lib/cpp ]; then
2275 NON_GNU_CPP=/usr/ccs/lib/cpp
2276 else
2277 NON_GNU_CPP=/lib/cpp
2278 fi
2279 fi
2280 opsys=usg5-4-2 ;;
2281 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2282 * )
2283 unported=yes
2284 ;;
2285 esac
2286fi
2287
ba4481b5 2288if test $unported = yes; then
925c2f3f 2289 { { echo "$as_me:2289: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2290Check \`etc/MACHINES' for recognized configuration names." >&5
2291echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2292Check \`etc/MACHINES' for recognized configuration names." >&2;}
2293 { (exit 1); exit 1; }; }
ba4481b5
DL
2294fi
2295
2296machfile="m/${machine}.h"
2297opsysfile="s/${opsys}.h"
2298
ba4481b5
DL
2299#### Choose a compiler.
2300test -n "$CC" && cc_specified=yes
2301
2302# Save the value of CFLAGS that the user specified.
2303SPECIFIED_CFLAGS="$CFLAGS"
2304
2305case ${with_gcc} in
2306 "yes" ) CC="gcc" GCC=yes ;;
2307 "no" ) : ${CC=cc} ;;
503d2be0
AS
2308 * )
2309esac
2310ac_ext=c
2311ac_cpp='$CPP $CPPFLAGS'
2312ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2313ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2314ac_compiler_gnu=$ac_cv_c_compiler_gnu
2315if test -n "$ac_tool_prefix"; then
2316 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2317set dummy ${ac_tool_prefix}gcc; ac_word=$2
925c2f3f 2318echo "$as_me:2318: checking for $ac_word" >&5
503d2be0
AS
2319echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2320if test "${ac_cv_prog_CC+set}" = set; then
2321 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2322else
2323 if test -n "$CC"; then
2324 ac_cv_prog_CC="$CC" # Let the user override the test.
2325else
925c2f3f
EZ
2326 ac_save_IFS=$IFS; IFS=$ac_path_separator
2327ac_dummy="$PATH"
2328for ac_dir in $ac_dummy; do
2329 IFS=$ac_save_IFS
2330 test -z "$ac_dir" && ac_dir=.
2331 $as_executable_p "$ac_dir/$ac_word" || continue
2332ac_cv_prog_CC="${ac_tool_prefix}gcc"
2333echo "$as_me:2333: found $ac_dir/$ac_word" >&5
2334break
503d2be0
AS
2335done
2336
ba4481b5
DL
2337fi
2338fi
503d2be0 2339CC=$ac_cv_prog_CC
ba4481b5 2340if test -n "$CC"; then
925c2f3f 2341 echo "$as_me:2341: result: $CC" >&5
503d2be0
AS
2342echo "${ECHO_T}$CC" >&6
2343else
925c2f3f 2344 echo "$as_me:2344: result: no" >&5
503d2be0
AS
2345echo "${ECHO_T}no" >&6
2346fi
2347
2348fi
2349if test -z "$ac_cv_prog_CC"; then
2350 ac_ct_CC=$CC
2351 # Extract the first word of "gcc", so it can be a program name with args.
2352set dummy gcc; ac_word=$2
925c2f3f 2353echo "$as_me:2353: checking for $ac_word" >&5
503d2be0
AS
2354echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2355if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2356 echo $ECHO_N "(cached) $ECHO_C" >&6
2357else
2358 if test -n "$ac_ct_CC"; then
2359 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2360else
925c2f3f
EZ
2361 ac_save_IFS=$IFS; IFS=$ac_path_separator
2362ac_dummy="$PATH"
2363for ac_dir in $ac_dummy; do
2364 IFS=$ac_save_IFS
2365 test -z "$ac_dir" && ac_dir=.
2366 $as_executable_p "$ac_dir/$ac_word" || continue
2367ac_cv_prog_ac_ct_CC="gcc"
2368echo "$as_me:2368: found $ac_dir/$ac_word" >&5
2369break
503d2be0
AS
2370done
2371
2372fi
2373fi
2374ac_ct_CC=$ac_cv_prog_ac_ct_CC
2375if test -n "$ac_ct_CC"; then
925c2f3f 2376 echo "$as_me:2376: result: $ac_ct_CC" >&5
503d2be0 2377echo "${ECHO_T}$ac_ct_CC" >&6
ba4481b5 2378else
925c2f3f 2379 echo "$as_me:2379: result: no" >&5
503d2be0
AS
2380echo "${ECHO_T}no" >&6
2381fi
2382
2383 CC=$ac_ct_CC
2384else
2385 CC="$ac_cv_prog_CC"
ba4481b5
DL
2386fi
2387
2388if test -z "$CC"; then
503d2be0
AS
2389 if test -n "$ac_tool_prefix"; then
2390 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2391set dummy ${ac_tool_prefix}cc; ac_word=$2
925c2f3f 2392echo "$as_me:2392: checking for $ac_word" >&5
503d2be0
AS
2393echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2394if test "${ac_cv_prog_CC+set}" = set; then
2395 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2396else
2397 if test -n "$CC"; then
2398 ac_cv_prog_CC="$CC" # Let the user override the test.
2399else
925c2f3f
EZ
2400 ac_save_IFS=$IFS; IFS=$ac_path_separator
2401ac_dummy="$PATH"
2402for ac_dir in $ac_dummy; do
2403 IFS=$ac_save_IFS
2404 test -z "$ac_dir" && ac_dir=.
2405 $as_executable_p "$ac_dir/$ac_word" || continue
2406ac_cv_prog_CC="${ac_tool_prefix}cc"
2407echo "$as_me:2407: found $ac_dir/$ac_word" >&5
2408break
503d2be0
AS
2409done
2410
2411fi
2412fi
2413CC=$ac_cv_prog_CC
2414if test -n "$CC"; then
925c2f3f 2415 echo "$as_me:2415: result: $CC" >&5
503d2be0
AS
2416echo "${ECHO_T}$CC" >&6
2417else
925c2f3f 2418 echo "$as_me:2418: result: no" >&5
503d2be0
AS
2419echo "${ECHO_T}no" >&6
2420fi
2421
2422fi
2423if test -z "$ac_cv_prog_CC"; then
2424 ac_ct_CC=$CC
2425 # Extract the first word of "cc", so it can be a program name with args.
2426set dummy cc; ac_word=$2
925c2f3f 2427echo "$as_me:2427: checking for $ac_word" >&5
503d2be0
AS
2428echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2429if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2430 echo $ECHO_N "(cached) $ECHO_C" >&6
2431else
2432 if test -n "$ac_ct_CC"; then
2433 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2434else
925c2f3f
EZ
2435 ac_save_IFS=$IFS; IFS=$ac_path_separator
2436ac_dummy="$PATH"
2437for ac_dir in $ac_dummy; do
2438 IFS=$ac_save_IFS
2439 test -z "$ac_dir" && ac_dir=.
2440 $as_executable_p "$ac_dir/$ac_word" || continue
2441ac_cv_prog_ac_ct_CC="cc"
2442echo "$as_me:2442: found $ac_dir/$ac_word" >&5
2443break
503d2be0
AS
2444done
2445
2446fi
2447fi
2448ac_ct_CC=$ac_cv_prog_ac_ct_CC
2449if test -n "$ac_ct_CC"; then
925c2f3f 2450 echo "$as_me:2450: result: $ac_ct_CC" >&5
503d2be0
AS
2451echo "${ECHO_T}$ac_ct_CC" >&6
2452else
925c2f3f 2453 echo "$as_me:2453: result: no" >&5
503d2be0
AS
2454echo "${ECHO_T}no" >&6
2455fi
2456
2457 CC=$ac_ct_CC
2458else
2459 CC="$ac_cv_prog_CC"
2460fi
2461
2462fi
2463if test -z "$CC"; then
2464 # Extract the first word of "cc", so it can be a program name with args.
2465set dummy cc; ac_word=$2
925c2f3f 2466echo "$as_me:2466: checking for $ac_word" >&5
503d2be0
AS
2467echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2468if test "${ac_cv_prog_CC+set}" = set; then
2469 echo $ECHO_N "(cached) $ECHO_C" >&6
2470else
2471 if test -n "$CC"; then
2472 ac_cv_prog_CC="$CC" # Let the user override the test.
2473else
2474 ac_prog_rejected=no
925c2f3f
EZ
2475 ac_save_IFS=$IFS; IFS=$ac_path_separator
2476ac_dummy="$PATH"
2477for ac_dir in $ac_dummy; do
2478 IFS=$ac_save_IFS
2479 test -z "$ac_dir" && ac_dir=.
2480 $as_executable_p "$ac_dir/$ac_word" || continue
2481if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2482 ac_prog_rejected=yes
2483 continue
2484fi
2485ac_cv_prog_CC="cc"
2486echo "$as_me:2486: found $ac_dir/$ac_word" >&5
2487break
503d2be0
AS
2488done
2489
ba4481b5
DL
2490if test $ac_prog_rejected = yes; then
2491 # We found a bogon in the path, so make sure we never use it.
2492 set dummy $ac_cv_prog_CC
2493 shift
503d2be0 2494 if test $# != 0; then
ba4481b5
DL
2495 # We chose a different compiler from the bogus one.
2496 # However, it has the same basename, so the bogon will be chosen
2497 # first if we set CC to just the basename; use the full file name.
2498 shift
925c2f3f 2499 set dummy "$ac_dir/$ac_word" ${1+"$@"}
ba4481b5
DL
2500 shift
2501 ac_cv_prog_CC="$@"
2502 fi
2503fi
2504fi
2505fi
503d2be0 2506CC=$ac_cv_prog_CC
ba4481b5 2507if test -n "$CC"; then
925c2f3f 2508 echo "$as_me:2508: result: $CC" >&5
503d2be0 2509echo "${ECHO_T}$CC" >&6
ba4481b5 2510else
925c2f3f 2511 echo "$as_me:2511: result: no" >&5
503d2be0 2512echo "${ECHO_T}no" >&6
ba4481b5
DL
2513fi
2514
503d2be0
AS
2515fi
2516if test -z "$CC"; then
2517 if test -n "$ac_tool_prefix"; then
2518 for ac_prog in cl
2519 do
2520 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2521set dummy $ac_tool_prefix$ac_prog; ac_word=$2
925c2f3f 2522echo "$as_me:2522: checking for $ac_word" >&5
503d2be0
AS
2523echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2524if test "${ac_cv_prog_CC+set}" = set; then
2525 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2526else
2527 if test -n "$CC"; then
2528 ac_cv_prog_CC="$CC" # Let the user override the test.
2529else
925c2f3f
EZ
2530 ac_save_IFS=$IFS; IFS=$ac_path_separator
2531ac_dummy="$PATH"
2532for ac_dir in $ac_dummy; do
2533 IFS=$ac_save_IFS
2534 test -z "$ac_dir" && ac_dir=.
2535 $as_executable_p "$ac_dir/$ac_word" || continue
2536ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2537echo "$as_me:2537: found $ac_dir/$ac_word" >&5
2538break
503d2be0
AS
2539done
2540
c4bb2108
DL
2541fi
2542fi
503d2be0 2543CC=$ac_cv_prog_CC
c4bb2108 2544if test -n "$CC"; then
925c2f3f 2545 echo "$as_me:2545: result: $CC" >&5
503d2be0 2546echo "${ECHO_T}$CC" >&6
c4bb2108 2547else
925c2f3f 2548 echo "$as_me:2548: result: no" >&5
503d2be0
AS
2549echo "${ECHO_T}no" >&6
2550fi
2551
2552 test -n "$CC" && break
2553 done
2554fi
2555if test -z "$CC"; then
2556 ac_ct_CC=$CC
2557 for ac_prog in cl
2558do
2559 # Extract the first word of "$ac_prog", so it can be a program name with args.
2560set dummy $ac_prog; ac_word=$2
925c2f3f 2561echo "$as_me:2561: checking for $ac_word" >&5
503d2be0
AS
2562echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2563if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2564 echo $ECHO_N "(cached) $ECHO_C" >&6
2565else
2566 if test -n "$ac_ct_CC"; then
2567 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2568else
925c2f3f
EZ
2569 ac_save_IFS=$IFS; IFS=$ac_path_separator
2570ac_dummy="$PATH"
2571for ac_dir in $ac_dummy; do
2572 IFS=$ac_save_IFS
2573 test -z "$ac_dir" && ac_dir=.
2574 $as_executable_p "$ac_dir/$ac_word" || continue
2575ac_cv_prog_ac_ct_CC="$ac_prog"
2576echo "$as_me:2576: found $ac_dir/$ac_word" >&5
2577break
503d2be0
AS
2578done
2579
c4bb2108 2580fi
503d2be0
AS
2581fi
2582ac_ct_CC=$ac_cv_prog_ac_ct_CC
2583if test -n "$ac_ct_CC"; then
925c2f3f 2584 echo "$as_me:2584: result: $ac_ct_CC" >&5
503d2be0
AS
2585echo "${ECHO_T}$ac_ct_CC" >&6
2586else
925c2f3f 2587 echo "$as_me:2587: result: no" >&5
503d2be0 2588echo "${ECHO_T}no" >&6
ba4481b5
DL
2589fi
2590
503d2be0
AS
2591 test -n "$ac_ct_CC" && break
2592done
ba4481b5 2593
503d2be0
AS
2594 CC=$ac_ct_CC
2595fi
2596
2597fi
ba4481b5 2598
925c2f3f
EZ
2599test -z "$CC" && { { echo "$as_me:2599: error: no acceptable cc found in \$PATH" >&5
2600echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
503d2be0 2601 { (exit 1); exit 1; }; }
c4bb2108 2602
503d2be0 2603# Provide some information about the compiler.
925c2f3f 2604echo "$as_me:2604:" \
503d2be0
AS
2605 "checking for C compiler version" >&5
2606ac_compiler=`set X $ac_compile; echo $2`
925c2f3f 2607{ (eval echo "$as_me:2607: \"$ac_compiler --version </dev/null >&5\"") >&5
503d2be0
AS
2608 (eval $ac_compiler --version </dev/null >&5) 2>&5
2609 ac_status=$?
925c2f3f 2610 echo "$as_me:2610: \$? = $ac_status" >&5
503d2be0 2611 (exit $ac_status); }
925c2f3f 2612{ (eval echo "$as_me:2612: \"$ac_compiler -v </dev/null >&5\"") >&5
503d2be0
AS
2613 (eval $ac_compiler -v </dev/null >&5) 2>&5
2614 ac_status=$?
925c2f3f 2615 echo "$as_me:2615: \$? = $ac_status" >&5
503d2be0 2616 (exit $ac_status); }
925c2f3f 2617{ (eval echo "$as_me:2617: \"$ac_compiler -V </dev/null >&5\"") >&5
503d2be0
AS
2618 (eval $ac_compiler -V </dev/null >&5) 2>&5
2619 ac_status=$?
925c2f3f 2620 echo "$as_me:2620: \$? = $ac_status" >&5
503d2be0
AS
2621 (exit $ac_status); }
2622
2623cat >conftest.$ac_ext <<_ACEOF
925c2f3f 2624#line 2624 "configure"
ba4481b5 2625#include "confdefs.h"
c4bb2108 2626
503d2be0
AS
2627int
2628main ()
2629{
2630
2631 ;
2632 return 0;
2633}
2634_ACEOF
2635ac_clean_files_save=$ac_clean_files
2636ac_clean_files="$ac_clean_files a.out a.exe"
2637# Try to create an executable without -o first, disregard a.out.
2638# It will help us diagnose broken compilers, and finding out an intuition
2639# of exeext.
925c2f3f 2640echo "$as_me:2640: checking for C compiler default output" >&5
503d2be0
AS
2641echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2642ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
925c2f3f 2643if { (eval echo "$as_me:2643: \"$ac_link_default\"") >&5
503d2be0
AS
2644 (eval $ac_link_default) 2>&5
2645 ac_status=$?
925c2f3f 2646 echo "$as_me:2646: \$? = $ac_status" >&5
503d2be0
AS
2647 (exit $ac_status); }; then
2648 # Find the output, starting from the most likely. This scheme is
2649# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2650# resort.
925c2f3f 2651for ac_file in `ls a.exe conftest.exe 2>/dev/null;
503d2be0
AS
2652 ls a.out conftest 2>/dev/null;
2653 ls a.* conftest.* 2>/dev/null`; do
2654 case $ac_file in
925c2f3f 2655 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
503d2be0
AS
2656 a.out ) # We found the default executable, but exeext='' is most
2657 # certainly right.
2658 break;;
2659 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2660 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2661 export ac_cv_exeext
2662 break;;
2663 * ) break;;
2664 esac
2665done
2666else
2667 echo "$as_me: failed program was:" >&5
2668cat conftest.$ac_ext >&5
925c2f3f 2669{ { echo "$as_me:2669: error: C compiler cannot create executables" >&5
503d2be0
AS
2670echo "$as_me: error: C compiler cannot create executables" >&2;}
2671 { (exit 77); exit 77; }; }
2672fi
2673
2674ac_exeext=$ac_cv_exeext
925c2f3f 2675echo "$as_me:2675: result: $ac_file" >&5
503d2be0
AS
2676echo "${ECHO_T}$ac_file" >&6
2677
2678# Check the compiler produces executables we can run. If not, either
2679# the compiler is broken, or we cross compile.
925c2f3f 2680echo "$as_me:2680: checking whether the C compiler works" >&5
503d2be0
AS
2681echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2682# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2683# If not cross compiling, check that we can run a simple program.
2684if test "$cross_compiling" != yes; then
2685 if { ac_try='./$ac_file'
925c2f3f 2686 { (eval echo "$as_me:2686: \"$ac_try\"") >&5
503d2be0
AS
2687 (eval $ac_try) 2>&5
2688 ac_status=$?
925c2f3f 2689 echo "$as_me:2689: \$? = $ac_status" >&5
503d2be0
AS
2690 (exit $ac_status); }; }; then
2691 cross_compiling=no
ba4481b5 2692 else
503d2be0
AS
2693 if test "$cross_compiling" = maybe; then
2694 cross_compiling=yes
2695 else
925c2f3f 2696 { { echo "$as_me:2696: error: cannot run C compiled programs.
503d2be0
AS
2697If you meant to cross compile, use \`--host'." >&5
2698echo "$as_me: error: cannot run C compiled programs.
2699If you meant to cross compile, use \`--host'." >&2;}
2700 { (exit 1); exit 1; }; }
2701 fi
ba4481b5 2702 fi
503d2be0 2703fi
925c2f3f 2704echo "$as_me:2704: result: yes" >&5
503d2be0
AS
2705echo "${ECHO_T}yes" >&6
2706
2707rm -f a.out a.exe conftest$ac_cv_exeext
2708ac_clean_files=$ac_clean_files_save
2709# Check the compiler produces executables we can run. If not, either
2710# the compiler is broken, or we cross compile.
925c2f3f 2711echo "$as_me:2711: checking whether we are cross compiling" >&5
503d2be0 2712echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
925c2f3f 2713echo "$as_me:2713: result: $cross_compiling" >&5
503d2be0
AS
2714echo "${ECHO_T}$cross_compiling" >&6
2715
925c2f3f
EZ
2716echo "$as_me:2716: checking for executable suffix" >&5
2717echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
2718if { (eval echo "$as_me:2718: \"$ac_link\"") >&5
503d2be0
AS
2719 (eval $ac_link) 2>&5
2720 ac_status=$?
925c2f3f 2721 echo "$as_me:2721: \$? = $ac_status" >&5
503d2be0
AS
2722 (exit $ac_status); }; then
2723 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2724# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2725# work properly (i.e., refer to `conftest.exe'), while it won't with
2726# `rm'.
2727for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2728 case $ac_file in
8799b3e4 2729 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
503d2be0
AS
2730 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2731 export ac_cv_exeext
2732 break;;
2733 * ) break;;
2734 esac
2735done
ba4481b5 2736else
925c2f3f
EZ
2737 { { echo "$as_me:2737: error: cannot compute EXEEXT: cannot compile and link" >&5
2738echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
503d2be0 2739 { (exit 1); exit 1; }; }
ba4481b5 2740fi
ba4481b5 2741
503d2be0 2742rm -f conftest$ac_cv_exeext
925c2f3f 2743echo "$as_me:2743: result: $ac_cv_exeext" >&5
503d2be0 2744echo "${ECHO_T}$ac_cv_exeext" >&6
ba4481b5 2745
503d2be0
AS
2746rm -f conftest.$ac_ext
2747EXEEXT=$ac_cv_exeext
2748ac_exeext=$EXEEXT
925c2f3f
EZ
2749echo "$as_me:2749: checking for object suffix" >&5
2750echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
503d2be0
AS
2751if test "${ac_cv_objext+set}" = set; then
2752 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 2753else
503d2be0 2754 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 2755#line 2755 "configure"
503d2be0 2756#include "confdefs.h"
ba4481b5 2757
503d2be0
AS
2758int
2759main ()
2760{
ba4481b5 2761
503d2be0
AS
2762 ;
2763 return 0;
2764}
2765_ACEOF
2766rm -f conftest.o conftest.obj
925c2f3f 2767if { (eval echo "$as_me:2767: \"$ac_compile\"") >&5
503d2be0
AS
2768 (eval $ac_compile) 2>&5
2769 ac_status=$?
925c2f3f 2770 echo "$as_me:2770: \$? = $ac_status" >&5
503d2be0
AS
2771 (exit $ac_status); }; then
2772 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2773 case $ac_file in
8799b3e4 2774 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
503d2be0
AS
2775 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2776 break;;
2777 esac
2778done
c4bb2108 2779else
503d2be0
AS
2780 echo "$as_me: failed program was:" >&5
2781cat conftest.$ac_ext >&5
925c2f3f
EZ
2782{ { echo "$as_me:2782: error: cannot compute OBJEXT: cannot compile" >&5
2783echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
503d2be0 2784 { (exit 1); exit 1; }; }
c4bb2108
DL
2785fi
2786
503d2be0
AS
2787rm -f conftest.$ac_cv_objext conftest.$ac_ext
2788fi
925c2f3f 2789echo "$as_me:2789: result: $ac_cv_objext" >&5
503d2be0
AS
2790echo "${ECHO_T}$ac_cv_objext" >&6
2791OBJEXT=$ac_cv_objext
2792ac_objext=$OBJEXT
925c2f3f 2793echo "$as_me:2793: checking whether we are using the GNU C compiler" >&5
503d2be0
AS
2794echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2795if test "${ac_cv_c_compiler_gnu+set}" = set; then
2796 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 2797else
503d2be0 2798 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 2799#line 2799 "configure"
503d2be0
AS
2800#include "confdefs.h"
2801
2802int
2803main ()
2804{
2805#ifndef __GNUC__
2806 choke me
2807#endif
2808
2809 ;
2810 return 0;
2811}
2812_ACEOF
2813rm -f conftest.$ac_objext
925c2f3f 2814if { (eval echo "$as_me:2814: \"$ac_compile\"") >&5
503d2be0
AS
2815 (eval $ac_compile) 2>&5
2816 ac_status=$?
925c2f3f 2817 echo "$as_me:2817: \$? = $ac_status" >&5
503d2be0
AS
2818 (exit $ac_status); } &&
2819 { ac_try='test -s conftest.$ac_objext'
925c2f3f 2820 { (eval echo "$as_me:2820: \"$ac_try\"") >&5
503d2be0
AS
2821 (eval $ac_try) 2>&5
2822 ac_status=$?
925c2f3f 2823 echo "$as_me:2823: \$? = $ac_status" >&5
503d2be0
AS
2824 (exit $ac_status); }; }; then
2825 ac_compiler_gnu=yes
2826else
2827 echo "$as_me: failed program was:" >&5
2828cat conftest.$ac_ext >&5
2829ac_compiler_gnu=no
2830fi
2831rm -f conftest.$ac_objext conftest.$ac_ext
2832ac_cv_c_compiler_gnu=$ac_compiler_gnu
2833
2834fi
925c2f3f 2835echo "$as_me:2835: result: $ac_cv_c_compiler_gnu" >&5
503d2be0
AS
2836echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2837GCC=`test $ac_compiler_gnu = yes && echo yes`
2838ac_test_CFLAGS=${CFLAGS+set}
2839ac_save_CFLAGS=$CFLAGS
2840CFLAGS="-g"
925c2f3f 2841echo "$as_me:2841: checking whether $CC accepts -g" >&5
503d2be0
AS
2842echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2843if test "${ac_cv_prog_cc_g+set}" = set; then
2844 echo $ECHO_N "(cached) $ECHO_C" >&6
2845else
2846 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 2847#line 2847 "configure"
503d2be0
AS
2848#include "confdefs.h"
2849
2850int
2851main ()
2852{
2853
2854 ;
2855 return 0;
2856}
2857_ACEOF
2858rm -f conftest.$ac_objext
925c2f3f 2859if { (eval echo "$as_me:2859: \"$ac_compile\"") >&5
503d2be0
AS
2860 (eval $ac_compile) 2>&5
2861 ac_status=$?
925c2f3f 2862 echo "$as_me:2862: \$? = $ac_status" >&5
503d2be0
AS
2863 (exit $ac_status); } &&
2864 { ac_try='test -s conftest.$ac_objext'
925c2f3f 2865 { (eval echo "$as_me:2865: \"$ac_try\"") >&5
503d2be0
AS
2866 (eval $ac_try) 2>&5
2867 ac_status=$?
925c2f3f 2868 echo "$as_me:2868: \$? = $ac_status" >&5
503d2be0 2869 (exit $ac_status); }; }; then
ba4481b5
DL
2870 ac_cv_prog_cc_g=yes
2871else
503d2be0
AS
2872 echo "$as_me: failed program was:" >&5
2873cat conftest.$ac_ext >&5
2874ac_cv_prog_cc_g=no
ba4481b5 2875fi
503d2be0 2876rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 2877fi
925c2f3f 2878echo "$as_me:2878: result: $ac_cv_prog_cc_g" >&5
503d2be0 2879echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c4bb2108 2880if test "$ac_test_CFLAGS" = set; then
503d2be0 2881 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
2882elif test $ac_cv_prog_cc_g = yes; then
2883 if test "$GCC" = yes; then
ba4481b5
DL
2884 CFLAGS="-g -O2"
2885 else
c4bb2108 2886 CFLAGS="-g"
ba4481b5 2887 fi
22afa6e8 2888else
c4bb2108
DL
2889 if test "$GCC" = yes; then
2890 CFLAGS="-O2"
2891 else
2892 CFLAGS=
2893 fi
ba4481b5 2894fi
503d2be0
AS
2895# Some people use a C++ compiler to compile C. Since we use `exit',
2896# in C++ we need to declare it. In case someone uses the same compiler
2897# for both compiling C and C++ we need to have the C++ compiler decide
2898# the declaration of exit, since it's the most demanding environment.
2899cat >conftest.$ac_ext <<_ACEOF
2900#ifndef __cplusplus
2901 choke me
2902#endif
2903_ACEOF
2904rm -f conftest.$ac_objext
925c2f3f 2905if { (eval echo "$as_me:2905: \"$ac_compile\"") >&5
503d2be0
AS
2906 (eval $ac_compile) 2>&5
2907 ac_status=$?
925c2f3f 2908 echo "$as_me:2908: \$? = $ac_status" >&5
503d2be0
AS
2909 (exit $ac_status); } &&
2910 { ac_try='test -s conftest.$ac_objext'
925c2f3f 2911 { (eval echo "$as_me:2911: \"$ac_try\"") >&5
503d2be0
AS
2912 (eval $ac_try) 2>&5
2913 ac_status=$?
925c2f3f 2914 echo "$as_me:2914: \$? = $ac_status" >&5
503d2be0
AS
2915 (exit $ac_status); }; }; then
2916 for ac_declaration in \
2917 ''\
2918 '#include <stdlib.h>' \
2919 'extern "C" void std::exit (int) throw (); using std::exit;' \
2920 'extern "C" void std::exit (int); using std::exit;' \
2921 'extern "C" void exit (int) throw ();' \
2922 'extern "C" void exit (int);' \
2923 'void exit (int);'
2924do
2925 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 2926#line 2926 "configure"
503d2be0
AS
2927#include "confdefs.h"
2928#include <stdlib.h>
2929$ac_declaration
2930int
2931main ()
2932{
2933exit (42);
2934 ;
2935 return 0;
2936}
2937_ACEOF
2938rm -f conftest.$ac_objext
925c2f3f 2939if { (eval echo "$as_me:2939: \"$ac_compile\"") >&5
503d2be0
AS
2940 (eval $ac_compile) 2>&5
2941 ac_status=$?
925c2f3f 2942 echo "$as_me:2942: \$? = $ac_status" >&5
503d2be0
AS
2943 (exit $ac_status); } &&
2944 { ac_try='test -s conftest.$ac_objext'
925c2f3f 2945 { (eval echo "$as_me:2945: \"$ac_try\"") >&5
503d2be0
AS
2946 (eval $ac_try) 2>&5
2947 ac_status=$?
925c2f3f 2948 echo "$as_me:2948: \$? = $ac_status" >&5
503d2be0
AS
2949 (exit $ac_status); }; }; then
2950 :
2951else
2952 echo "$as_me: failed program was:" >&5
2953cat conftest.$ac_ext >&5
2954continue
2955fi
2956rm -f conftest.$ac_objext conftest.$ac_ext
2957 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 2958#line 2958 "configure"
503d2be0
AS
2959#include "confdefs.h"
2960$ac_declaration
2961int
2962main ()
2963{
2964exit (42);
2965 ;
2966 return 0;
2967}
2968_ACEOF
2969rm -f conftest.$ac_objext
925c2f3f 2970if { (eval echo "$as_me:2970: \"$ac_compile\"") >&5
503d2be0
AS
2971 (eval $ac_compile) 2>&5
2972 ac_status=$?
925c2f3f 2973 echo "$as_me:2973: \$? = $ac_status" >&5
503d2be0
AS
2974 (exit $ac_status); } &&
2975 { ac_try='test -s conftest.$ac_objext'
925c2f3f 2976 { (eval echo "$as_me:2976: \"$ac_try\"") >&5
503d2be0
AS
2977 (eval $ac_try) 2>&5
2978 ac_status=$?
925c2f3f 2979 echo "$as_me:2979: \$? = $ac_status" >&5
503d2be0
AS
2980 (exit $ac_status); }; }; then
2981 break
2982else
2983 echo "$as_me: failed program was:" >&5
2984cat conftest.$ac_ext >&5
2985fi
2986rm -f conftest.$ac_objext conftest.$ac_ext
2987done
2988rm -f conftest*
2989if test -n "$ac_declaration"; then
2990 echo '#ifdef __cplusplus' >>confdefs.h
2991 echo $ac_declaration >>confdefs.h
2992 echo '#endif' >>confdefs.h
2993fi
ba4481b5 2994
503d2be0
AS
2995else
2996 echo "$as_me: failed program was:" >&5
2997cat conftest.$ac_ext >&5
2998fi
2999rm -f conftest.$ac_objext conftest.$ac_ext
3000ac_ext=c
3001ac_cpp='$CPP $CPPFLAGS'
3002ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3003ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3004ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
3005
3006# On Suns, sometimes $CPP names a directory.
3007if test -n "$CPP" && test -d "$CPP"; then
3008 CPP=
3009fi
3010
3011#### Some systems specify a CPP to use unless we are using GCC.
3012#### Now that we know whether we are using GCC, we can decide whether
3013#### to use that one.
3014if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3015then
3016 CPP="$NON_GNU_CPP"
3017fi
3018
3019#### Some systems specify a CC to use unless we are using GCC.
3020#### Now that we know whether we are using GCC, we can decide whether
3021#### to use that one.
3022if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3023 test x$cc_specified != xyes
3024then
3025 CC="$NON_GNU_CC"
3026fi
3027
3028if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3029then
3030 CC="$CC $GCC_TEST_OPTIONS"
3031fi
3032
3033if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3034then
3035 CC="$CC $NON_GCC_TEST_OPTIONS"
3036fi
3037
3038if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
3039then
3040 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
3041fi
3042
3043if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
3044then
3045 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
3046fi
3047
3048#### Some other nice autoconf tests. If you add a test here which
3049#### should make an entry in src/config.h, don't forget to add an
3050#### #undef clause to src/config.h.in for autoconf to modify.
3051
925c2f3f 3052echo "$as_me:3052: checking whether ln -s works" >&5
503d2be0
AS
3053echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3054LN_S=$as_ln_s
3055if test "$LN_S" = "ln -s"; then
925c2f3f 3056 echo "$as_me:3056: result: yes" >&5
503d2be0 3057echo "${ECHO_T}yes" >&6
ba4481b5 3058else
925c2f3f 3059 echo "$as_me:3059: result: no, using $LN_S" >&5
503d2be0 3060echo "${ECHO_T}no, using $LN_S" >&6
ba4481b5
DL
3061fi
3062
503d2be0
AS
3063ac_ext=c
3064ac_cpp='$CPP $CPPFLAGS'
3065ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3066ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3067ac_compiler_gnu=$ac_cv_c_compiler_gnu
925c2f3f 3068echo "$as_me:3068: checking how to run the C preprocessor" >&5
503d2be0 3069echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
ba4481b5
DL
3070# On Suns, sometimes $CPP names a directory.
3071if test -n "$CPP" && test -d "$CPP"; then
3072 CPP=
3073fi
3074if test -z "$CPP"; then
503d2be0
AS
3075 if test "${ac_cv_prog_CPP+set}" = set; then
3076 echo $ECHO_N "(cached) $ECHO_C" >&6
3077else
3078 # Double quotes because CPP needs to be expanded
3079 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3080 do
3081 ac_preproc_ok=false
3082for ac_c_preproc_warn_flag in '' yes
3083do
3084 # Use a header file that comes with gcc, so configuring glibc
3085 # with a fresh cross-compiler works.
ba4481b5 3086 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
3087 # not just through cpp. "Syntax error" is here to catch this case.
3088 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 3089#line 3089 "configure"
ba4481b5
DL
3090#include "confdefs.h"
3091#include <assert.h>
503d2be0
AS
3092 Syntax error
3093_ACEOF
925c2f3f 3094if { (eval echo "$as_me:3094: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3095 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3096 ac_status=$?
3097 egrep -v '^ *\+' conftest.er1 >conftest.err
3098 rm -f conftest.er1
3099 cat conftest.err >&5
925c2f3f 3100 echo "$as_me:3100: \$? = $ac_status" >&5
503d2be0
AS
3101 (exit $ac_status); } >/dev/null; then
3102 if test -s conftest.err; then
3103 ac_cpp_err=$ac_c_preproc_warn_flag
3104 else
3105 ac_cpp_err=
3106 fi
3107else
3108 ac_cpp_err=yes
3109fi
3110if test -z "$ac_cpp_err"; then
ba4481b5
DL
3111 :
3112else
503d2be0 3113 echo "$as_me: failed program was:" >&5
ba4481b5 3114 cat conftest.$ac_ext >&5
503d2be0
AS
3115 # Broken: fails on valid input.
3116continue
3117fi
3118rm -f conftest.err conftest.$ac_ext
3119
3120 # OK, works on sane cases. Now check whether non-existent headers
3121 # can be detected and how.
3122 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 3123#line 3123 "configure"
503d2be0
AS
3124#include "confdefs.h"
3125#include <ac_nonexistent.h>
3126_ACEOF
925c2f3f 3127if { (eval echo "$as_me:3127: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3128 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3129 ac_status=$?
3130 egrep -v '^ *\+' conftest.er1 >conftest.err
3131 rm -f conftest.er1
3132 cat conftest.err >&5
925c2f3f 3133 echo "$as_me:3133: \$? = $ac_status" >&5
503d2be0
AS
3134 (exit $ac_status); } >/dev/null; then
3135 if test -s conftest.err; then
3136 ac_cpp_err=$ac_c_preproc_warn_flag
3137 else
3138 ac_cpp_err=
3139 fi
3140else
3141 ac_cpp_err=yes
3142fi
3143if test -z "$ac_cpp_err"; then
3144 # Broken: success on invalid input.
3145continue
c4bb2108 3146else
503d2be0 3147 echo "$as_me: failed program was:" >&5
c4bb2108 3148 cat conftest.$ac_ext >&5
503d2be0
AS
3149 # Passes both tests.
3150ac_preproc_ok=:
3151break
3152fi
3153rm -f conftest.err conftest.$ac_ext
3154
3155done
3156# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3157rm -f conftest.err conftest.$ac_ext
3158if $ac_preproc_ok; then
3159 break
3160fi
3161
3162 done
3163 ac_cv_prog_CPP=$CPP
3164
3165fi
3166 CPP=$ac_cv_prog_CPP
3167else
3168 ac_cv_prog_CPP=$CPP
3169fi
925c2f3f 3170echo "$as_me:3170: result: $CPP" >&5
503d2be0
AS
3171echo "${ECHO_T}$CPP" >&6
3172ac_preproc_ok=false
3173for ac_c_preproc_warn_flag in '' yes
3174do
3175 # Use a header file that comes with gcc, so configuring glibc
3176 # with a fresh cross-compiler works.
3177 # On the NeXT, cc -E runs the code through the compiler's parser,
3178 # not just through cpp. "Syntax error" is here to catch this case.
3179 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 3180#line 3180 "configure"
c4bb2108
DL
3181#include "confdefs.h"
3182#include <assert.h>
503d2be0
AS
3183 Syntax error
3184_ACEOF
925c2f3f 3185if { (eval echo "$as_me:3185: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3186 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3187 ac_status=$?
3188 egrep -v '^ *\+' conftest.er1 >conftest.err
3189 rm -f conftest.er1
3190 cat conftest.err >&5
925c2f3f 3191 echo "$as_me:3191: \$? = $ac_status" >&5
503d2be0
AS
3192 (exit $ac_status); } >/dev/null; then
3193 if test -s conftest.err; then
3194 ac_cpp_err=$ac_c_preproc_warn_flag
3195 else
3196 ac_cpp_err=
3197 fi
3198else
3199 ac_cpp_err=yes
3200fi
3201if test -z "$ac_cpp_err"; then
ba4481b5
DL
3202 :
3203else
503d2be0 3204 echo "$as_me: failed program was:" >&5
ba4481b5 3205 cat conftest.$ac_ext >&5
503d2be0
AS
3206 # Broken: fails on valid input.
3207continue
3208fi
3209rm -f conftest.err conftest.$ac_ext
3210
3211 # OK, works on sane cases. Now check whether non-existent headers
3212 # can be detected and how.
3213 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 3214#line 3214 "configure"
503d2be0
AS
3215#include "confdefs.h"
3216#include <ac_nonexistent.h>
3217_ACEOF
925c2f3f 3218if { (eval echo "$as_me:3218: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3219 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3220 ac_status=$?
3221 egrep -v '^ *\+' conftest.er1 >conftest.err
3222 rm -f conftest.er1
3223 cat conftest.err >&5
925c2f3f 3224 echo "$as_me:3224: \$? = $ac_status" >&5
503d2be0
AS
3225 (exit $ac_status); } >/dev/null; then
3226 if test -s conftest.err; then
3227 ac_cpp_err=$ac_c_preproc_warn_flag
3228 else
3229 ac_cpp_err=
3230 fi
3231else
3232 ac_cpp_err=yes
c4bb2108 3233fi
503d2be0
AS
3234if test -z "$ac_cpp_err"; then
3235 # Broken: success on invalid input.
3236continue
3237else
3238 echo "$as_me: failed program was:" >&5
3239 cat conftest.$ac_ext >&5
3240 # Passes both tests.
3241ac_preproc_ok=:
3242break
ba4481b5 3243fi
503d2be0
AS
3244rm -f conftest.err conftest.$ac_ext
3245
3246done
3247# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3248rm -f conftest.err conftest.$ac_ext
3249if $ac_preproc_ok; then
3250 :
ba4481b5 3251else
925c2f3f 3252 { { echo "$as_me:3252: error: C preprocessor \"$CPP\" fails sanity check" >&5
503d2be0
AS
3253echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3254 { (exit 1); exit 1; }; }
ba4481b5 3255fi
503d2be0
AS
3256
3257ac_ext=c
3258ac_cpp='$CPP $CPPFLAGS'
3259ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3260ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3261ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
3262
3263# Find a good install program. We prefer a C program (faster),
3264# so one script is as good as another. But avoid the broken or
3265# incompatible versions:
3266# SysV /etc/install, /usr/sbin/install
3267# SunOS /usr/etc/install
3268# IRIX /sbin/install
3269# AIX /bin/install
503d2be0 3270# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 3271# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
3272# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3273# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3274# ./install, which can be erroneously created by make from ./install.sh.
925c2f3f
EZ
3275echo "$as_me:3275: checking for a BSD compatible install" >&5
3276echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
ba4481b5 3277if test -z "$INSTALL"; then
503d2be0
AS
3278if test "${ac_cv_path_install+set}" = set; then
3279 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3280else
925c2f3f
EZ
3281 ac_save_IFS=$IFS; IFS=$ac_path_separator
3282 for ac_dir in $PATH; do
3283 IFS=$ac_save_IFS
3284 # Account for people who put trailing slashes in PATH elements.
3285 case $ac_dir/ in
3286 / | ./ | .// | /cC/* \
3287 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3288 | /usr/ucb/* ) ;;
3289 *)
3290 # OSF1 and SCO ODT 3.0 have their own names for install.
3291 # Don't use installbsd from OSF since it installs stuff as root
3292 # by default.
3293 for ac_prog in ginstall scoinst install; do
3294 if $as_executable_p "$ac_dir/$ac_prog"; then
3295 if test $ac_prog = install &&
3296 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3297 # AIX install. It has an incompatible calling convention.
3298 :
3299 elif test $ac_prog = install &&
3300 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3301 # program-specific install script used by HP pwplus--don't use.
3302 :
3303 else
3304 ac_cv_path_install="$ac_dir/$ac_prog -c"
3305 break 2
3306 fi
3307 fi
ba4481b5 3308 done
925c2f3f
EZ
3309 ;;
3310 esac
3311 done
ba4481b5
DL
3312
3313fi
3314 if test "${ac_cv_path_install+set}" = set; then
503d2be0 3315 INSTALL=$ac_cv_path_install
ba4481b5
DL
3316 else
3317 # As a last resort, use the slow shell script. We don't cache a
3318 # path for INSTALL within a source directory, because that will
3319 # break other packages using the cache if that directory is
3320 # removed, or if the path is relative.
503d2be0 3321 INSTALL=$ac_install_sh
ba4481b5
DL
3322 fi
3323fi
925c2f3f 3324echo "$as_me:3324: result: $INSTALL" >&5
503d2be0 3325echo "${ECHO_T}$INSTALL" >&6
ba4481b5
DL
3326
3327# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3328# It thinks the first close brace ends the variable substitution.
3329test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3330
503d2be0 3331test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 3332
ba4481b5
DL
3333test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3334
3335for ac_prog in 'bison -y' byacc
3336do
503d2be0 3337 # Extract the first word of "$ac_prog", so it can be a program name with args.
ba4481b5 3338set dummy $ac_prog; ac_word=$2
925c2f3f 3339echo "$as_me:3339: checking for $ac_word" >&5
503d2be0
AS
3340echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3341if test "${ac_cv_prog_YACC+set}" = set; then
3342 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3343else
3344 if test -n "$YACC"; then
3345 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3346else
925c2f3f
EZ
3347 ac_save_IFS=$IFS; IFS=$ac_path_separator
3348ac_dummy="$PATH"
3349for ac_dir in $ac_dummy; do
3350 IFS=$ac_save_IFS
3351 test -z "$ac_dir" && ac_dir=.
3352 $as_executable_p "$ac_dir/$ac_word" || continue
3353ac_cv_prog_YACC="$ac_prog"
3354echo "$as_me:3354: found $ac_dir/$ac_word" >&5
3355break
503d2be0
AS
3356done
3357
ba4481b5
DL
3358fi
3359fi
503d2be0 3360YACC=$ac_cv_prog_YACC
ba4481b5 3361if test -n "$YACC"; then
925c2f3f 3362 echo "$as_me:3362: result: $YACC" >&5
503d2be0 3363echo "${ECHO_T}$YACC" >&6
ba4481b5 3364else
925c2f3f 3365 echo "$as_me:3365: result: no" >&5
503d2be0 3366echo "${ECHO_T}no" >&6
ba4481b5
DL
3367fi
3368
503d2be0 3369 test -n "$YACC" && break
ba4481b5
DL
3370done
3371test -n "$YACC" || YACC="yacc"
3372
7397acc4 3373if test "x$RANLIB" = x; then
503d2be0
AS
3374 if test -n "$ac_tool_prefix"; then
3375 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3376set dummy ${ac_tool_prefix}ranlib; ac_word=$2
925c2f3f 3377echo "$as_me:3377: checking for $ac_word" >&5
503d2be0
AS
3378echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3379if test "${ac_cv_prog_RANLIB+set}" = set; then
3380 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
3381else
3382 if test -n "$RANLIB"; then
3383 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3384else
925c2f3f
EZ
3385 ac_save_IFS=$IFS; IFS=$ac_path_separator
3386ac_dummy="$PATH"
3387for ac_dir in $ac_dummy; do
3388 IFS=$ac_save_IFS
3389 test -z "$ac_dir" && ac_dir=.
3390 $as_executable_p "$ac_dir/$ac_word" || continue
3391ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3392echo "$as_me:3392: found $ac_dir/$ac_word" >&5
3393break
503d2be0
AS
3394done
3395
7397acc4
DL
3396fi
3397fi
503d2be0 3398RANLIB=$ac_cv_prog_RANLIB
7397acc4 3399if test -n "$RANLIB"; then
925c2f3f 3400 echo "$as_me:3400: result: $RANLIB" >&5
503d2be0
AS
3401echo "${ECHO_T}$RANLIB" >&6
3402else
925c2f3f 3403 echo "$as_me:3403: result: no" >&5
503d2be0
AS
3404echo "${ECHO_T}no" >&6
3405fi
3406
3407fi
3408if test -z "$ac_cv_prog_RANLIB"; then
3409 ac_ct_RANLIB=$RANLIB
3410 # Extract the first word of "ranlib", so it can be a program name with args.
3411set dummy ranlib; ac_word=$2
925c2f3f 3412echo "$as_me:3412: checking for $ac_word" >&5
503d2be0
AS
3413echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3414if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3415 echo $ECHO_N "(cached) $ECHO_C" >&6
3416else
3417 if test -n "$ac_ct_RANLIB"; then
3418 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3419else
925c2f3f
EZ
3420 ac_save_IFS=$IFS; IFS=$ac_path_separator
3421ac_dummy="$PATH"
3422for ac_dir in $ac_dummy; do
3423 IFS=$ac_save_IFS
3424 test -z "$ac_dir" && ac_dir=.
3425 $as_executable_p "$ac_dir/$ac_word" || continue
3426ac_cv_prog_ac_ct_RANLIB="ranlib"
3427echo "$as_me:3427: found $ac_dir/$ac_word" >&5
3428break
503d2be0
AS
3429done
3430
3431 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3432fi
3433fi
3434ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3435if test -n "$ac_ct_RANLIB"; then
925c2f3f 3436 echo "$as_me:3436: result: $ac_ct_RANLIB" >&5
503d2be0
AS
3437echo "${ECHO_T}$ac_ct_RANLIB" >&6
3438else
925c2f3f 3439 echo "$as_me:3439: result: no" >&5
503d2be0
AS
3440echo "${ECHO_T}no" >&6
3441fi
3442
3443 RANLIB=$ac_ct_RANLIB
7397acc4 3444else
503d2be0 3445 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
3446fi
3447
3448fi
ba4481b5 3449
925c2f3f 3450echo "$as_me:3450: checking for AIX" >&5
503d2be0
AS
3451echo $ECHO_N "checking for AIX... $ECHO_C" >&6
3452cat >conftest.$ac_ext <<_ACEOF
925c2f3f 3453#line 3453 "configure"
ba4481b5
DL
3454#include "confdefs.h"
3455#ifdef _AIX
3456 yes
3457#endif
3458
503d2be0 3459_ACEOF
ba4481b5
DL
3460if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3461 egrep "yes" >/dev/null 2>&1; then
925c2f3f 3462 echo "$as_me:3462: result: yes" >&5
503d2be0 3463echo "${ECHO_T}yes" >&6
925c2f3f 3464cat >>confdefs.h <<\EOF
ba4481b5 3465#define _ALL_SOURCE 1
925c2f3f 3466EOF
ba4481b5
DL
3467
3468else
925c2f3f 3469 echo "$as_me:3469: result: no" >&5
503d2be0 3470echo "${ECHO_T}no" >&6
ba4481b5
DL
3471fi
3472rm -f conftest*
3473
3b33a005
DL
3474#### Extract some information from the operating system and machine files.
3475
925c2f3f 3476{ echo "$as_me:3476: checking the machine- and system-dependent files to find out
3b33a005 3477 - which libraries the lib-src programs will want, and
503d2be0
AS
3478 - whether the GNU malloc routines are usable..." >&5
3479echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 3480 - which libraries the lib-src programs will want, and
503d2be0 3481 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
3482
3483### First figure out CFLAGS (which we use for running the compiler here)
3484### and REAL_CFLAGS (which we use for real compilation).
3485### The two are the same except on a few systems, where they are made
3486### different to work around various lossages. For example,
3487### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
3488### as implying static linking.
3489
3490### If the CFLAGS env var is specified, we use that value
3491### instead of the default.
3492
3493### It's not important that this name contain the PID; you can't run
3494### two configures in the same directory and have anything work
3495### anyway.
3496tempcname="conftest.c"
3497
3498echo '
3499#include "'${srcdir}'/src/'${opsysfile}'"
3500#include "'${srcdir}'/src/'${machfile}'"
3501#ifndef LIBS_MACHINE
3502#define LIBS_MACHINE
3503#endif
3504#ifndef LIBS_SYSTEM
3505#define LIBS_SYSTEM
3506#endif
3507#ifndef C_SWITCH_SYSTEM
3508#define C_SWITCH_SYSTEM
3509#endif
3510#ifndef C_SWITCH_MACHINE
3511#define C_SWITCH_MACHINE
3512#endif
3513configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
3514configure___ c_switch_system=C_SWITCH_SYSTEM
3515configure___ c_switch_machine=C_SWITCH_MACHINE
3516
3517#ifndef LIB_X11_LIB
3518#define LIB_X11_LIB -lX11
3519#endif
3520
3521#ifndef LIBX11_MACHINE
3522#define LIBX11_MACHINE
3523#endif
3524
3525#ifndef LIBX11_SYSTEM
3526#define LIBX11_SYSTEM
3527#endif
3528configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
3529
3530#ifdef UNEXEC
3531configure___ unexec=UNEXEC
3532#else
3533configure___ unexec=unexec.o
3534#endif
3535
3536#ifdef SYSTEM_MALLOC
3537configure___ system_malloc=yes
3538#else
3539configure___ system_malloc=no
3540#endif
3541
ef9e4345
GM
3542#ifdef USE_MMAP_FOR_BUFFERS
3543configure___ use_mmap_for_buffers=yes
73b77ee5 3544#else
ef9e4345 3545configure___ use_mmap_for_buffers=no
73b77ee5
GM
3546#endif
3547
3b33a005
DL
3548#ifndef C_DEBUG_SWITCH
3549#define C_DEBUG_SWITCH -g
3550#endif
3551
3552#ifndef C_OPTIMIZE_SWITCH
3553#ifdef __GNUC__
3554#define C_OPTIMIZE_SWITCH -O2
3555#else
3556#define C_OPTIMIZE_SWITCH -O
3557#endif
3558#endif
3559
3560#ifndef LD_SWITCH_MACHINE
3561#define LD_SWITCH_MACHINE
3562#endif
3563
3564#ifndef LD_SWITCH_SYSTEM
3565#define LD_SWITCH_SYSTEM
3566#endif
3567
3568#ifndef LD_SWITCH_X_SITE_AUX
3569#define LD_SWITCH_X_SITE_AUX
503d2be0 3570#endif
3b33a005
DL
3571
3572configure___ ld_switch_system=LD_SWITCH_SYSTEM
3573configure___ ld_switch_machine=LD_SWITCH_MACHINE
3574
3575#ifdef THIS_IS_CONFIGURE
3576
3577/* Get the CFLAGS for tests in configure. */
3578#ifdef __GNUC__
3579configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3580#else
3581configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3582#endif
3583
3584#else /* not THIS_IS_CONFIGURE */
3585
3586/* Get the CFLAGS for real compilation. */
3587#ifdef __GNUC__
3588configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3589#else
3590configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3591#endif
3592
3593#endif /* not THIS_IS_CONFIGURE */
3594' > ${tempcname}
3595
3596# The value of CPP is a quoted variable reference, so we need to do this
3597# to get its actual value...
3598CPP=`eval "echo $CPP"`
3599eval `${CPP} -Isrc ${tempcname} \
3600 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3601if test "x$SPECIFIED_CFLAGS" = x; then
3602 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
3603 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3604else
3605 REAL_CFLAGS="$CFLAGS"
3606fi
3607rm ${tempcname}
3608
3609ac_link="$ac_link $ld_switch_machine $ld_switch_system"
3610
3611### Make sure subsequent tests use flags consistent with the build flags.
3612
3613if test x"${OVERRIDE_CPPFLAGS}" != x; then
3614 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
3615else
3616 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
3617fi
3618
503d2be0 3619# Check whether --enable-largefile or --disable-largefile was given.
f4988be7
GM
3620if test "${enable_largefile+set}" = set; then
3621 enableval="$enable_largefile"
f4988be7 3622
503d2be0
AS
3623fi;
3624if test "$enable_largefile" != no; then
f4988be7 3625
925c2f3f 3626 echo "$as_me:3626: checking for special C compiler options needed for large files" >&5
503d2be0
AS
3627echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
3628if test "${ac_cv_sys_largefile_CC+set}" = set; then
3629 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3630else
f4988be7 3631 ac_cv_sys_largefile_CC=no
503d2be0
AS
3632 if test "$GCC" != yes; then
3633 ac_save_CC=$CC
3634 while :; do
3635 # IRIX 6.2 and later do not support large files by default,
3636 # so use the C compiler's -n32 option if that helps.
3637 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 3638#line 3638 "configure"
b192d653 3639#include "confdefs.h"
f4988be7 3640#include <sys/types.h>
503d2be0
AS
3641 /* Check that off_t can represent 2**63 - 1 correctly.
3642 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3643 since some C++ compilers masquerading as C compilers
3644 incorrectly reject 9223372036854775807. */
3645#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3646 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3647 && LARGE_OFF_T % 2147483647 == 1)
3648 ? 1 : -1];
3649int
3650main ()
3651{
f4988be7 3652
503d2be0
AS
3653 ;
3654 return 0;
3655}
3656_ACEOF
3657 rm -f conftest.$ac_objext
925c2f3f 3658if { (eval echo "$as_me:3658: \"$ac_compile\"") >&5
503d2be0
AS
3659 (eval $ac_compile) 2>&5
3660 ac_status=$?
925c2f3f 3661 echo "$as_me:3661: \$? = $ac_status" >&5
503d2be0
AS
3662 (exit $ac_status); } &&
3663 { ac_try='test -s conftest.$ac_objext'
925c2f3f 3664 { (eval echo "$as_me:3664: \"$ac_try\"") >&5
503d2be0
AS
3665 (eval $ac_try) 2>&5
3666 ac_status=$?
925c2f3f 3667 echo "$as_me:3667: \$? = $ac_status" >&5
503d2be0
AS
3668 (exit $ac_status); }; }; then
3669 break
b192d653 3670else
503d2be0
AS
3671 echo "$as_me: failed program was:" >&5
3672cat conftest.$ac_ext >&5
3673fi
3674rm -f conftest.$ac_objext
3675 CC="$CC -n32"
3676 rm -f conftest.$ac_objext
925c2f3f 3677if { (eval echo "$as_me:3677: \"$ac_compile\"") >&5
503d2be0
AS
3678 (eval $ac_compile) 2>&5
3679 ac_status=$?
925c2f3f 3680 echo "$as_me:3680: \$? = $ac_status" >&5
503d2be0
AS
3681 (exit $ac_status); } &&
3682 { ac_try='test -s conftest.$ac_objext'
925c2f3f 3683 { (eval echo "$as_me:3683: \"$ac_try\"") >&5
503d2be0
AS
3684 (eval $ac_try) 2>&5
3685 ac_status=$?
925c2f3f 3686 echo "$as_me:3686: \$? = $ac_status" >&5
503d2be0
AS
3687 (exit $ac_status); }; }; then
3688 ac_cv_sys_largefile_CC=' -n32'; break
3689else
3690 echo "$as_me: failed program was:" >&5
3691cat conftest.$ac_ext >&5
3692fi
3693rm -f conftest.$ac_objext
3694 break
3695 done
3696 CC=$ac_save_CC
3697 rm -f conftest.$ac_ext
3698 fi
b192d653 3699fi
925c2f3f 3700echo "$as_me:3700: result: $ac_cv_sys_largefile_CC" >&5
503d2be0
AS
3701echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
3702 if test "$ac_cv_sys_largefile_CC" != no; then
3703 CC=$CC$ac_cv_sys_largefile_CC
3704 fi
b192d653 3705
925c2f3f 3706 echo "$as_me:3706: checking for _FILE_OFFSET_BITS value needed for large files" >&5
503d2be0
AS
3707echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
3708if test "${ac_cv_sys_file_offset_bits+set}" = set; then
3709 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3710else
503d2be0 3711 while :; do
f4988be7 3712 ac_cv_sys_file_offset_bits=no
503d2be0 3713 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 3714#line 3714 "configure"
f4988be7
GM
3715#include "confdefs.h"
3716#include <sys/types.h>
503d2be0
AS
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{
f4988be7 3728
503d2be0
AS
3729 ;
3730 return 0;
3731}
3732_ACEOF
3733rm -f conftest.$ac_objext
925c2f3f 3734if { (eval echo "$as_me:3734: \"$ac_compile\"") >&5
503d2be0
AS
3735 (eval $ac_compile) 2>&5
3736 ac_status=$?
925c2f3f 3737 echo "$as_me:3737: \$? = $ac_status" >&5
503d2be0
AS
3738 (exit $ac_status); } &&
3739 { ac_try='test -s conftest.$ac_objext'
925c2f3f 3740 { (eval echo "$as_me:3740: \"$ac_try\"") >&5
503d2be0
AS
3741 (eval $ac_try) 2>&5
3742 ac_status=$?
925c2f3f 3743 echo "$as_me:3743: \$? = $ac_status" >&5
503d2be0
AS
3744 (exit $ac_status); }; }; then
3745 break
f4988be7 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
925c2f3f 3752#line 3752 "configure"
ba4481b5 3753#include "confdefs.h"
f4988be7
GM
3754#define _FILE_OFFSET_BITS 64
3755#include <sys/types.h>
503d2be0
AS
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{
3767
3768 ;
3769 return 0;
3770}
3771_ACEOF
3772rm -f conftest.$ac_objext
925c2f3f 3773if { (eval echo "$as_me:3773: \"$ac_compile\"") >&5
503d2be0
AS
3774 (eval $ac_compile) 2>&5
3775 ac_status=$?
925c2f3f 3776 echo "$as_me:3776: \$? = $ac_status" >&5
503d2be0
AS
3777 (exit $ac_status); } &&
3778 { ac_try='test -s conftest.$ac_objext'
925c2f3f 3779 { (eval echo "$as_me:3779: \"$ac_try\"") >&5
503d2be0
AS
3780 (eval $ac_try) 2>&5
3781 ac_status=$?
925c2f3f 3782 echo "$as_me:3782: \$? = $ac_status" >&5
503d2be0
AS
3783 (exit $ac_status); }; }; then
3784 ac_cv_sys_file_offset_bits=64; 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
925c2f3f 3793echo "$as_me:3793: result: $ac_cv_sys_file_offset_bits" >&5
503d2be0
AS
3794echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
3795if test "$ac_cv_sys_file_offset_bits" != no; then
ba4481b5 3796
925c2f3f 3797cat >>confdefs.h <<EOF
f4988be7 3798#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
925c2f3f 3799EOF
f4988be7 3800
503d2be0
AS
3801fi
3802rm -f conftest*
925c2f3f 3803 echo "$as_me:3803: checking for _LARGE_FILES value needed for large files" >&5
503d2be0
AS
3804echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
3805if test "${ac_cv_sys_large_files+set}" = set; then
3806 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3807else
503d2be0 3808 while :; do
f4988be7 3809 ac_cv_sys_large_files=no
503d2be0 3810 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 3811#line 3811 "configure"
f4988be7 3812#include "confdefs.h"
503d2be0
AS
3813#include <sys/types.h>
3814 /* Check that off_t can represent 2**63 - 1 correctly.
3815 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3816 since some C++ compilers masquerading as C compilers
3817 incorrectly reject 9223372036854775807. */
3818#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3819 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3820 && LARGE_OFF_T % 2147483647 == 1)
3821 ? 1 : -1];
3822int
3823main ()
3824{
ba4481b5 3825
503d2be0
AS
3826 ;
3827 return 0;
3828}
3829_ACEOF
3830rm -f conftest.$ac_objext
925c2f3f 3831if { (eval echo "$as_me:3831: \"$ac_compile\"") >&5
503d2be0
AS
3832 (eval $ac_compile) 2>&5
3833 ac_status=$?
925c2f3f 3834 echo "$as_me:3834: \$? = $ac_status" >&5
503d2be0
AS
3835 (exit $ac_status); } &&
3836 { ac_try='test -s conftest.$ac_objext'
925c2f3f 3837 { (eval echo "$as_me:3837: \"$ac_try\"") >&5
503d2be0
AS
3838 (eval $ac_try) 2>&5
3839 ac_status=$?
925c2f3f 3840 echo "$as_me:3840: \$? = $ac_status" >&5
503d2be0
AS
3841 (exit $ac_status); }; }; then
3842 break
ba4481b5 3843else
503d2be0
AS
3844 echo "$as_me: failed program was:" >&5
3845cat conftest.$ac_ext >&5
3846fi
3847rm -f conftest.$ac_objext conftest.$ac_ext
3848 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 3849#line 3849 "configure"
ba4481b5 3850#include "confdefs.h"
f4988be7 3851#define _LARGE_FILES 1
503d2be0
AS
3852#include <sys/types.h>
3853 /* Check that off_t can represent 2**63 - 1 correctly.
3854 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3855 since some C++ compilers masquerading as C compilers
3856 incorrectly reject 9223372036854775807. */
3857#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3858 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3859 && LARGE_OFF_T % 2147483647 == 1)
3860 ? 1 : -1];
3861int
3862main ()
3863{
f4988be7 3864
503d2be0
AS
3865 ;
3866 return 0;
3867}
3868_ACEOF
3869rm -f conftest.$ac_objext
925c2f3f 3870if { (eval echo "$as_me:3870: \"$ac_compile\"") >&5
503d2be0
AS
3871 (eval $ac_compile) 2>&5
3872 ac_status=$?
925c2f3f 3873 echo "$as_me:3873: \$? = $ac_status" >&5
503d2be0
AS
3874 (exit $ac_status); } &&
3875 { ac_try='test -s conftest.$ac_objext'
925c2f3f 3876 { (eval echo "$as_me:3876: \"$ac_try\"") >&5
503d2be0
AS
3877 (eval $ac_try) 2>&5
3878 ac_status=$?
925c2f3f 3879 echo "$as_me:3879: \$? = $ac_status" >&5
503d2be0
AS
3880 (exit $ac_status); }; }; then
3881 ac_cv_sys_large_files=1; break
3882else
3883 echo "$as_me: failed program was:" >&5
3884cat conftest.$ac_ext >&5
3885fi
3886rm -f conftest.$ac_objext conftest.$ac_ext
3887 break
3888done
ba4481b5 3889fi
925c2f3f 3890echo "$as_me:3890: result: $ac_cv_sys_large_files" >&5
503d2be0
AS
3891echo "${ECHO_T}$ac_cv_sys_large_files" >&6
3892if test "$ac_cv_sys_large_files" != no; then
ba4481b5 3893
925c2f3f 3894cat >>confdefs.h <<EOF
f4988be7 3895#define _LARGE_FILES $ac_cv_sys_large_files
925c2f3f 3896EOF
ba4481b5 3897
503d2be0
AS
3898fi
3899rm -f conftest*
3900fi
ba4481b5 3901
2c9dccc9
PJ
3902if test "${with_sound}" != "no"; then
3903 # Sound support for GNU/Linux and the free BSDs.
98418dba
CW
3904
3905for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
3906do
3907as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
925c2f3f 3908echo "$as_me:3908: checking for $ac_header" >&5
98418dba
CW
3909echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3910if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 3911 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 3912else
925c2f3f
EZ
3913 cat >conftest.$ac_ext <<_ACEOF
3914#line 3914 "configure"
f4988be7 3915#include "confdefs.h"
98418dba 3916#include <$ac_header>
503d2be0 3917_ACEOF
925c2f3f 3918if { (eval echo "$as_me:3918: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 3919 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 3920 ac_status=$?
98418dba
CW
3921 egrep -v '^ *\+' conftest.er1 >conftest.err
3922 rm -f conftest.er1
3923 cat conftest.err >&5
925c2f3f 3924 echo "$as_me:3924: \$? = $ac_status" >&5
98418dba
CW
3925 (exit $ac_status); } >/dev/null; then
3926 if test -s conftest.err; then
3927 ac_cpp_err=$ac_c_preproc_warn_flag
3928 else
3929 ac_cpp_err=
3930 fi
3931else
3932 ac_cpp_err=yes
3933fi
3934if test -z "$ac_cpp_err"; then
925c2f3f 3935 eval "$as_ac_Header=yes"
f4988be7 3936else
503d2be0 3937 echo "$as_me: failed program was:" >&5
98418dba 3938 cat conftest.$ac_ext >&5
925c2f3f 3939 eval "$as_ac_Header=no"
f4988be7 3940fi
98418dba 3941rm -f conftest.err conftest.$ac_ext
f4988be7 3942fi
925c2f3f 3943echo "$as_me:3943: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 3944echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 3945if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 3946 cat >>confdefs.h <<EOF
98418dba 3947#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 3948EOF
f4988be7
GM
3949
3950fi
98418dba
CW
3951done
3952
3953 # Emulation library used on NetBSD.
925c2f3f 3954 echo "$as_me:3954: checking for _oss_ioctl in -lossaudio" >&5
98418dba
CW
3955echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6
3956if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 3957 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 3958else
98418dba
CW
3959 ac_check_lib_save_LIBS=$LIBS
3960LIBS="-lossaudio $LIBS"
3961cat >conftest.$ac_ext <<_ACEOF
925c2f3f 3962#line 3962 "configure"
f4988be7 3963#include "confdefs.h"
98418dba
CW
3964
3965/* Override any gcc2 internal prototype to avoid an error. */
3966#ifdef __cplusplus
3967extern "C"
f4988be7 3968#endif
98418dba
CW
3969/* We use char because int might match the return type of a gcc2
3970 builtin and then its argument prototype would still apply. */
3971char _oss_ioctl ();
503d2be0
AS
3972int
3973main ()
3974{
98418dba 3975_oss_ioctl ();
503d2be0
AS
3976 ;
3977 return 0;
3978}
3979_ACEOF
98418dba 3980rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 3981if { (eval echo "$as_me:3981: \"$ac_link\"") >&5
98418dba 3982 (eval $ac_link) 2>&5
503d2be0 3983 ac_status=$?
925c2f3f 3984 echo "$as_me:3984: \$? = $ac_status" >&5
503d2be0 3985 (exit $ac_status); } &&
98418dba 3986 { ac_try='test -s conftest$ac_exeext'
925c2f3f 3987 { (eval echo "$as_me:3987: \"$ac_try\"") >&5
503d2be0
AS
3988 (eval $ac_try) 2>&5
3989 ac_status=$?
925c2f3f 3990 echo "$as_me:3990: \$? = $ac_status" >&5
503d2be0 3991 (exit $ac_status); }; }; then
98418dba 3992 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 3993else
503d2be0
AS
3994 echo "$as_me: failed program was:" >&5
3995cat conftest.$ac_ext >&5
98418dba 3996ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 3997fi
98418dba
CW
3998rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3999LIBS=$ac_check_lib_save_LIBS
f4988be7 4000fi
925c2f3f 4001echo "$as_me:4001: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
98418dba
CW
4002echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6
4003if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
4004 LIBSOUND=-lossaudio
4005else
4006 LIBSOUND=
4007fi
4008
f4988be7
GM
4009fi
4010
98418dba
CW
4011for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
4012 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
4013 termcap.h stdio_ext.h fcntl.h term.h strings.h coff.h
4014do
4015as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
925c2f3f 4016echo "$as_me:4016: checking for $ac_header" >&5
98418dba
CW
4017echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4018if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 4019 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4020else
925c2f3f
EZ
4021 cat >conftest.$ac_ext <<_ACEOF
4022#line 4022 "configure"
34ec9ebe 4023#include "confdefs.h"
98418dba 4024#include <$ac_header>
503d2be0 4025_ACEOF
925c2f3f 4026if { (eval echo "$as_me:4026: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 4027 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 4028 ac_status=$?
98418dba
CW
4029 egrep -v '^ *\+' conftest.er1 >conftest.err
4030 rm -f conftest.er1
4031 cat conftest.err >&5
925c2f3f 4032 echo "$as_me:4032: \$? = $ac_status" >&5
98418dba
CW
4033 (exit $ac_status); } >/dev/null; then
4034 if test -s conftest.err; then
4035 ac_cpp_err=$ac_c_preproc_warn_flag
4036 else
4037 ac_cpp_err=
4038 fi
4039else
4040 ac_cpp_err=yes
4041fi
4042if test -z "$ac_cpp_err"; then
925c2f3f 4043 eval "$as_ac_Header=yes"
34ec9ebe 4044else
503d2be0 4045 echo "$as_me: failed program was:" >&5
98418dba 4046 cat conftest.$ac_ext >&5
925c2f3f 4047 eval "$as_ac_Header=no"
34ec9ebe 4048fi
98418dba 4049rm -f conftest.err conftest.$ac_ext
34ec9ebe 4050fi
925c2f3f 4051echo "$as_me:4051: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 4052echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 4053if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 4054 cat >>confdefs.h <<EOF
98418dba 4055#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 4056EOF
34ec9ebe 4057
98418dba 4058fi
98418dba
CW
4059done
4060
925c2f3f 4061echo "$as_me:4061: checking for ANSI C header files" >&5
98418dba
CW
4062echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4063if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 4064 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4065else
503d2be0 4066 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4067#line 4067 "configure"
ba4481b5 4068#include "confdefs.h"
98418dba
CW
4069#include <stdlib.h>
4070#include <stdarg.h>
4071#include <string.h>
4072#include <float.h>
4073
4074_ACEOF
925c2f3f 4075if { (eval echo "$as_me:4075: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 4076 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 4077 ac_status=$?
98418dba
CW
4078 egrep -v '^ *\+' conftest.er1 >conftest.err
4079 rm -f conftest.er1
4080 cat conftest.err >&5
925c2f3f 4081 echo "$as_me:4081: \$? = $ac_status" >&5
98418dba
CW
4082 (exit $ac_status); } >/dev/null; then
4083 if test -s conftest.err; then
4084 ac_cpp_err=$ac_c_preproc_warn_flag
4085 else
4086 ac_cpp_err=
4087 fi
4088else
4089 ac_cpp_err=yes
4090fi
4091if test -z "$ac_cpp_err"; then
4092 ac_cv_header_stdc=yes
ba4481b5 4093else
503d2be0 4094 echo "$as_me: failed program was:" >&5
98418dba
CW
4095 cat conftest.$ac_ext >&5
4096 ac_cv_header_stdc=no
ba4481b5 4097fi
98418dba
CW
4098rm -f conftest.err conftest.$ac_ext
4099
4100if test $ac_cv_header_stdc = yes; then
4101 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4102 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4103#line 4103 "configure"
98418dba
CW
4104#include "confdefs.h"
4105#include <string.h>
4106
4107_ACEOF
4108if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4109 egrep "memchr" >/dev/null 2>&1; then
4110 :
4111else
4112 ac_cv_header_stdc=no
ba4481b5 4113fi
98418dba 4114rm -f conftest*
ba4481b5
DL
4115
4116fi
4117
98418dba
CW
4118if test $ac_cv_header_stdc = yes; then
4119 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4120 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4121#line 4121 "configure"
98418dba
CW
4122#include "confdefs.h"
4123#include <stdlib.h>
4124
4125_ACEOF
4126if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4127 egrep "free" >/dev/null 2>&1; then
4128 :
4129else
4130 ac_cv_header_stdc=no
4131fi
4132rm -f conftest*
4133
4134fi
4135
4136if test $ac_cv_header_stdc = yes; then
4137 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4138 if test "$cross_compiling" = yes; then
4139 :
d42122a3 4140else
503d2be0 4141 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4142#line 4142 "configure"
d42122a3 4143#include "confdefs.h"
98418dba
CW
4144#include <ctype.h>
4145#if ((' ' & 0x0FF) == 0x020)
4146# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4147# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4148#else
4149# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4150 || ('j' <= (c) && (c) <= 'r') \
4151 || ('s' <= (c) && (c) <= 'z'))
4152# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4153#endif
4154
4155#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
4156int
4157main ()
4158{
98418dba
CW
4159 int i;
4160 for (i = 0; i < 256; i++)
4161 if (XOR (islower (i), ISLOWER (i))
4162 || toupper (i) != TOUPPER (i))
4163 exit(2);
4164 exit (0);
503d2be0
AS
4165}
4166_ACEOF
98418dba 4167rm -f conftest$ac_exeext
925c2f3f 4168if { (eval echo "$as_me:4168: \"$ac_link\"") >&5
98418dba 4169 (eval $ac_link) 2>&5
503d2be0 4170 ac_status=$?
925c2f3f 4171 echo "$as_me:4171: \$? = $ac_status" >&5
98418dba 4172 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
925c2f3f 4173 { (eval echo "$as_me:4173: \"$ac_try\"") >&5
503d2be0
AS
4174 (eval $ac_try) 2>&5
4175 ac_status=$?
925c2f3f 4176 echo "$as_me:4176: \$? = $ac_status" >&5
503d2be0 4177 (exit $ac_status); }; }; then
98418dba 4178 :
d42122a3 4179else
98418dba
CW
4180 echo "$as_me: program exited with status $ac_status" >&5
4181echo "$as_me: failed program was:" >&5
503d2be0 4182cat conftest.$ac_ext >&5
98418dba 4183ac_cv_header_stdc=no
d42122a3 4184fi
98418dba 4185rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 4186fi
98418dba
CW
4187fi
4188fi
925c2f3f 4189echo "$as_me:4189: result: $ac_cv_header_stdc" >&5
98418dba
CW
4190echo "${ECHO_T}$ac_cv_header_stdc" >&6
4191if test $ac_cv_header_stdc = yes; then
4192
925c2f3f 4193cat >>confdefs.h <<\EOF
98418dba 4194#define STDC_HEADERS 1
925c2f3f 4195EOF
d42122a3
DL
4196
4197fi
4198
925c2f3f 4199echo "$as_me:4199: checking whether time.h and sys/time.h may both be included" >&5
98418dba
CW
4200echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
4201if test "${ac_cv_header_time+set}" = set; then
503d2be0 4202 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4203else
503d2be0 4204 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4205#line 4205 "configure"
ba4481b5
DL
4206#include "confdefs.h"
4207#include <sys/types.h>
98418dba 4208#include <sys/time.h>
ba4481b5 4209#include <time.h>
503d2be0
AS
4210
4211int
4212main ()
4213{
98418dba
CW
4214if ((struct tm *) 0)
4215return 0;
503d2be0
AS
4216 ;
4217 return 0;
4218}
4219_ACEOF
4220rm -f conftest.$ac_objext
925c2f3f 4221if { (eval echo "$as_me:4221: \"$ac_compile\"") >&5
503d2be0
AS
4222 (eval $ac_compile) 2>&5
4223 ac_status=$?
925c2f3f 4224 echo "$as_me:4224: \$? = $ac_status" >&5
503d2be0
AS
4225 (exit $ac_status); } &&
4226 { ac_try='test -s conftest.$ac_objext'
925c2f3f 4227 { (eval echo "$as_me:4227: \"$ac_try\"") >&5
503d2be0
AS
4228 (eval $ac_try) 2>&5
4229 ac_status=$?
925c2f3f 4230 echo "$as_me:4230: \$? = $ac_status" >&5
503d2be0 4231 (exit $ac_status); }; }; then
98418dba 4232 ac_cv_header_time=yes
ba4481b5 4233else
503d2be0
AS
4234 echo "$as_me: failed program was:" >&5
4235cat conftest.$ac_ext >&5
98418dba 4236ac_cv_header_time=no
ba4481b5 4237fi
503d2be0 4238rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 4239fi
925c2f3f 4240echo "$as_me:4240: result: $ac_cv_header_time" >&5
98418dba
CW
4241echo "${ECHO_T}$ac_cv_header_time" >&6
4242if test $ac_cv_header_time = yes; then
503d2be0 4243
925c2f3f 4244cat >>confdefs.h <<\EOF
98418dba 4245#define TIME_WITH_SYS_TIME 1
925c2f3f 4246EOF
ba4481b5
DL
4247
4248fi
4249
925c2f3f 4250echo "$as_me:4250: checking for sys_siglist declaration in signal.h or unistd.h" >&5
98418dba
CW
4251echo $ECHO_N "checking for sys_siglist declaration in signal.h or unistd.h... $ECHO_C" >&6
4252if test "${ac_cv_decl_sys_siglist+set}" = set; then
503d2be0 4253 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4254else
503d2be0 4255 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4256#line 4256 "configure"
ba4481b5
DL
4257#include "confdefs.h"
4258#include <sys/types.h>
98418dba
CW
4259#include <signal.h>
4260/* NetBSD declares sys_siglist in unistd.h. */
4261#if HAVE_UNISTD_H
4262# include <unistd.h>
4263#endif
503d2be0
AS
4264
4265int
4266main ()
4267{
98418dba 4268char *msg = *(sys_siglist + 1);
503d2be0
AS
4269 ;
4270 return 0;
4271}
4272_ACEOF
4273rm -f conftest.$ac_objext
925c2f3f 4274if { (eval echo "$as_me:4274: \"$ac_compile\"") >&5
503d2be0
AS
4275 (eval $ac_compile) 2>&5
4276 ac_status=$?
925c2f3f 4277 echo "$as_me:4277: \$? = $ac_status" >&5
503d2be0
AS
4278 (exit $ac_status); } &&
4279 { ac_try='test -s conftest.$ac_objext'
925c2f3f 4280 { (eval echo "$as_me:4280: \"$ac_try\"") >&5
503d2be0
AS
4281 (eval $ac_try) 2>&5
4282 ac_status=$?
925c2f3f 4283 echo "$as_me:4283: \$? = $ac_status" >&5
503d2be0 4284 (exit $ac_status); }; }; then
98418dba 4285 ac_cv_decl_sys_siglist=yes
ba4481b5 4286else
503d2be0
AS
4287 echo "$as_me: failed program was:" >&5
4288cat conftest.$ac_ext >&5
98418dba 4289ac_cv_decl_sys_siglist=no
ba4481b5 4290fi
503d2be0
AS
4291rm -f conftest.$ac_objext conftest.$ac_ext
4292fi
925c2f3f 4293echo "$as_me:4293: result: $ac_cv_decl_sys_siglist" >&5
98418dba
CW
4294echo "${ECHO_T}$ac_cv_decl_sys_siglist" >&6
4295if test $ac_cv_decl_sys_siglist = yes; then
503d2be0 4296
925c2f3f 4297cat >>confdefs.h <<\EOF
98418dba 4298#define SYS_SIGLIST_DECLARED 1
925c2f3f 4299EOF
503d2be0 4300
ba4481b5
DL
4301fi
4302
925c2f3f 4303echo "$as_me:4303: checking for sys/wait.h that is POSIX.1 compatible" >&5
98418dba
CW
4304echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
4305if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 4306 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4307else
503d2be0 4308 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4309#line 4309 "configure"
ba4481b5 4310#include "confdefs.h"
98418dba
CW
4311#include <sys/types.h>
4312#include <sys/wait.h>
4313#ifndef WEXITSTATUS
4314# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4315#endif
4316#ifndef WIFEXITED
4317# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 4318#endif
503d2be0
AS
4319
4320int
4321main ()
4322{
98418dba
CW
4323 int s;
4324 wait (&s);
4325 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
4326 ;
4327 return 0;
4328}
4329_ACEOF
98418dba 4330rm -f conftest.$ac_objext
925c2f3f 4331if { (eval echo "$as_me:4331: \"$ac_compile\"") >&5
98418dba 4332 (eval $ac_compile) 2>&5
503d2be0 4333 ac_status=$?
925c2f3f 4334 echo "$as_me:4334: \$? = $ac_status" >&5
503d2be0 4335 (exit $ac_status); } &&
98418dba 4336 { ac_try='test -s conftest.$ac_objext'
925c2f3f 4337 { (eval echo "$as_me:4337: \"$ac_try\"") >&5
503d2be0
AS
4338 (eval $ac_try) 2>&5
4339 ac_status=$?
925c2f3f 4340 echo "$as_me:4340: \$? = $ac_status" >&5
503d2be0 4341 (exit $ac_status); }; }; then
98418dba 4342 ac_cv_header_sys_wait_h=yes
ba4481b5 4343else
503d2be0
AS
4344 echo "$as_me: failed program was:" >&5
4345cat conftest.$ac_ext >&5
98418dba 4346ac_cv_header_sys_wait_h=no
ba4481b5 4347fi
98418dba 4348rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 4349fi
925c2f3f 4350echo "$as_me:4350: result: $ac_cv_header_sys_wait_h" >&5
98418dba
CW
4351echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
4352if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 4353
925c2f3f 4354cat >>confdefs.h <<\EOF
98418dba 4355#define HAVE_SYS_WAIT_H 1
925c2f3f 4356EOF
ba4481b5 4357
ba4481b5
DL
4358fi
4359
925c2f3f 4360echo "$as_me:4360: checking for struct utimbuf" >&5
98418dba
CW
4361echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
4362if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 4363 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 4364else
503d2be0 4365 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4366#line 4366 "configure"
1113b624 4367#include "confdefs.h"
98418dba
CW
4368#ifdef TIME_WITH_SYS_TIME
4369#include <sys/time.h>
4370#include <time.h>
4371#else
4372#ifdef HAVE_SYS_TIME_H
4373#include <sys/time.h>
4374#else
1113b624 4375#include <time.h>
98418dba
CW
4376#endif
4377#endif
4378#ifdef HAVE_UTIME_H
4379#include <utime.h>
4380#endif
503d2be0
AS
4381int
4382main ()
4383{
98418dba 4384static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
4385 ;
4386 return 0;
4387}
4388_ACEOF
98418dba 4389rm -f conftest.$ac_objext
925c2f3f 4390if { (eval echo "$as_me:4390: \"$ac_compile\"") >&5
98418dba 4391 (eval $ac_compile) 2>&5
503d2be0 4392 ac_status=$?
925c2f3f 4393 echo "$as_me:4393: \$? = $ac_status" >&5
503d2be0 4394 (exit $ac_status); } &&
98418dba 4395 { ac_try='test -s conftest.$ac_objext'
925c2f3f 4396 { (eval echo "$as_me:4396: \"$ac_try\"") >&5
503d2be0
AS
4397 (eval $ac_try) 2>&5
4398 ac_status=$?
925c2f3f 4399 echo "$as_me:4399: \$? = $ac_status" >&5
503d2be0 4400 (exit $ac_status); }; }; then
98418dba 4401 emacs_cv_struct_utimbuf=yes
1113b624 4402else
503d2be0
AS
4403 echo "$as_me: failed program was:" >&5
4404cat conftest.$ac_ext >&5
98418dba 4405emacs_cv_struct_utimbuf=no
1113b624 4406fi
98418dba 4407rm -f conftest.$ac_objext conftest.$ac_ext
1113b624 4408fi
925c2f3f 4409echo "$as_me:4409: result: $emacs_cv_struct_utimbuf" >&5
98418dba
CW
4410echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6
4411if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 4412
925c2f3f 4413cat >>confdefs.h <<\EOF
98418dba 4414#define HAVE_STRUCT_UTIMBUF 1
925c2f3f 4415EOF
1113b624
PE
4416
4417fi
ba4481b5 4418
925c2f3f 4419echo "$as_me:4419: checking return type of signal handlers" >&5
98418dba
CW
4420echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4421if test "${ac_cv_type_signal+set}" = set; then
503d2be0 4422 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 4423else
98418dba 4424 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4425#line 4425 "configure"
7397acc4 4426#include "confdefs.h"
7397acc4 4427#include <sys/types.h>
98418dba
CW
4428#include <signal.h>
4429#ifdef signal
4430# undef signal
4431#endif
4432#ifdef __cplusplus
4433extern "C" void (*signal (int, void (*)(int)))(int);
4434#else
4435void (*signal ()) ();
4436#endif
4437
503d2be0
AS
4438int
4439main ()
4440{
98418dba 4441int i;
503d2be0
AS
4442 ;
4443 return 0;
4444}
4445_ACEOF
98418dba 4446rm -f conftest.$ac_objext
925c2f3f 4447if { (eval echo "$as_me:4447: \"$ac_compile\"") >&5
503d2be0
AS
4448 (eval $ac_compile) 2>&5
4449 ac_status=$?
925c2f3f 4450 echo "$as_me:4450: \$? = $ac_status" >&5
503d2be0
AS
4451 (exit $ac_status); } &&
4452 { ac_try='test -s conftest.$ac_objext'
925c2f3f 4453 { (eval echo "$as_me:4453: \"$ac_try\"") >&5
503d2be0
AS
4454 (eval $ac_try) 2>&5
4455 ac_status=$?
925c2f3f 4456 echo "$as_me:4456: \$? = $ac_status" >&5
503d2be0 4457 (exit $ac_status); }; }; then
98418dba 4458 ac_cv_type_signal=void
503d2be0
AS
4459else
4460 echo "$as_me: failed program was:" >&5
4461cat conftest.$ac_ext >&5
98418dba 4462ac_cv_type_signal=int
503d2be0 4463fi
98418dba 4464rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 4465fi
925c2f3f 4466echo "$as_me:4466: result: $ac_cv_type_signal" >&5
98418dba 4467echo "${ECHO_T}$ac_cv_type_signal" >&6
7397acc4 4468
925c2f3f 4469cat >>confdefs.h <<EOF
98418dba 4470#define RETSIGTYPE $ac_cv_type_signal
925c2f3f 4471EOF
503d2be0 4472
925c2f3f 4473echo "$as_me:4473: checking for speed_t" >&5
98418dba
CW
4474echo $ECHO_N "checking for speed_t... $ECHO_C" >&6
4475if test "${emacs_cv_speed_t+set}" = set; then
4476 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 4477else
98418dba 4478 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4479#line 4479 "configure"
98418dba
CW
4480#include "confdefs.h"
4481#include <termios.h>
98418dba
CW
4482int
4483main ()
4484{
4485speed_t x = 1;
4486 ;
4487 return 0;
4488}
4489_ACEOF
4490rm -f conftest.$ac_objext
925c2f3f 4491if { (eval echo "$as_me:4491: \"$ac_compile\"") >&5
98418dba
CW
4492 (eval $ac_compile) 2>&5
4493 ac_status=$?
925c2f3f 4494 echo "$as_me:4494: \$? = $ac_status" >&5
98418dba
CW
4495 (exit $ac_status); } &&
4496 { ac_try='test -s conftest.$ac_objext'
925c2f3f 4497 { (eval echo "$as_me:4497: \"$ac_try\"") >&5
98418dba
CW
4498 (eval $ac_try) 2>&5
4499 ac_status=$?
925c2f3f 4500 echo "$as_me:4500: \$? = $ac_status" >&5
98418dba
CW
4501 (exit $ac_status); }; }; then
4502 emacs_cv_speed_t=yes
4503else
4504 echo "$as_me: failed program was:" >&5
4505cat conftest.$ac_ext >&5
4506emacs_cv_speed_t=no
4507fi
4508rm -f conftest.$ac_objext conftest.$ac_ext
4509fi
925c2f3f 4510echo "$as_me:4510: result: $emacs_cv_speed_t" >&5
98418dba
CW
4511echo "${ECHO_T}$emacs_cv_speed_t" >&6
4512if test $emacs_cv_speed_t = yes; then
b936fae4 4513
925c2f3f 4514cat >>confdefs.h <<\EOF
98418dba 4515#define HAVE_SPEED_T 1
925c2f3f 4516EOF
98418dba 4517
7397acc4
DL
4518fi
4519
925c2f3f 4520echo "$as_me:4520: checking for struct timeval" >&5
98418dba
CW
4521echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
4522if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 4523 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 4524else
503d2be0 4525 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4526#line 4526 "configure"
7397acc4 4527#include "confdefs.h"
98418dba
CW
4528#ifdef TIME_WITH_SYS_TIME
4529#include <sys/time.h>
4530#include <time.h>
4531#else
4532#ifdef HAVE_SYS_TIME_H
4533#include <sys/time.h>
4534#else
4535#include <time.h>
4536#endif
4537#endif
503d2be0
AS
4538int
4539main ()
4540{
98418dba 4541static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
4542 ;
4543 return 0;
4544}
4545_ACEOF
4546rm -f conftest.$ac_objext
925c2f3f 4547if { (eval echo "$as_me:4547: \"$ac_compile\"") >&5
503d2be0
AS
4548 (eval $ac_compile) 2>&5
4549 ac_status=$?
925c2f3f 4550 echo "$as_me:4550: \$? = $ac_status" >&5
503d2be0
AS
4551 (exit $ac_status); } &&
4552 { ac_try='test -s conftest.$ac_objext'
925c2f3f 4553 { (eval echo "$as_me:4553: \"$ac_try\"") >&5
503d2be0
AS
4554 (eval $ac_try) 2>&5
4555 ac_status=$?
925c2f3f 4556 echo "$as_me:4556: \$? = $ac_status" >&5
503d2be0 4557 (exit $ac_status); }; }; then
98418dba 4558 emacs_cv_struct_timeval=yes
7397acc4 4559else
503d2be0
AS
4560 echo "$as_me: failed program was:" >&5
4561cat conftest.$ac_ext >&5
98418dba 4562emacs_cv_struct_timeval=no
7397acc4 4563fi
503d2be0 4564rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 4565fi
925c2f3f 4566echo "$as_me:4566: result: $emacs_cv_struct_timeval" >&5
98418dba
CW
4567echo "${ECHO_T}$emacs_cv_struct_timeval" >&6
4568HAVE_TIMEVAL=$emacs_cv_struct_timeval
4569if test $emacs_cv_struct_timeval = yes; then
b936fae4 4570
925c2f3f 4571cat >>confdefs.h <<\EOF
98418dba 4572#define HAVE_TIMEVAL 1
925c2f3f 4573EOF
7397acc4
DL
4574
4575fi
4576
925c2f3f 4577echo "$as_me:4577: checking for struct exception" >&5
98418dba
CW
4578echo $ECHO_N "checking for struct exception... $ECHO_C" >&6
4579if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 4580 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4581else
503d2be0 4582 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4583#line 4583 "configure"
ba4481b5 4584#include "confdefs.h"
98418dba 4585#include <math.h>
503d2be0
AS
4586int
4587main ()
4588{
98418dba 4589static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
4590 ;
4591 return 0;
ba4481b5 4592}
503d2be0
AS
4593_ACEOF
4594rm -f conftest.$ac_objext
925c2f3f 4595if { (eval echo "$as_me:4595: \"$ac_compile\"") >&5
503d2be0
AS
4596 (eval $ac_compile) 2>&5
4597 ac_status=$?
925c2f3f 4598 echo "$as_me:4598: \$? = $ac_status" >&5
503d2be0
AS
4599 (exit $ac_status); } &&
4600 { ac_try='test -s conftest.$ac_objext'
925c2f3f 4601 { (eval echo "$as_me:4601: \"$ac_try\"") >&5
503d2be0
AS
4602 (eval $ac_try) 2>&5
4603 ac_status=$?
925c2f3f 4604 echo "$as_me:4604: \$? = $ac_status" >&5
503d2be0 4605 (exit $ac_status); }; }; then
98418dba 4606 emacs_cv_struct_exception=yes
ba4481b5 4607else
503d2be0
AS
4608 echo "$as_me: failed program was:" >&5
4609cat conftest.$ac_ext >&5
98418dba 4610emacs_cv_struct_exception=no
ba4481b5 4611fi
503d2be0 4612rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 4613fi
925c2f3f 4614echo "$as_me:4614: result: $emacs_cv_struct_exception" >&5
98418dba
CW
4615echo "${ECHO_T}$emacs_cv_struct_exception" >&6
4616HAVE_EXCEPTION=$emacs_cv_struct_exception
4617if test $emacs_cv_struct_exception != yes; then
b936fae4 4618
925c2f3f 4619cat >>confdefs.h <<\EOF
98418dba 4620#define NO_MATHERR 1
925c2f3f 4621EOF
ba4481b5
DL
4622
4623fi
4624
925c2f3f 4625echo "$as_me:4625: checking whether struct tm is in sys/time.h or time.h" >&5
98418dba
CW
4626echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
4627if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 4628 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 4629else
503d2be0 4630 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4631#line 4631 "configure"
7397acc4 4632#include "confdefs.h"
98418dba
CW
4633#include <sys/types.h>
4634#include <time.h>
7397acc4 4635
503d2be0
AS
4636int
4637main ()
4638{
98418dba 4639struct tm *tp; tp->tm_sec;
503d2be0
AS
4640 ;
4641 return 0;
4642}
4643_ACEOF
4644rm -f conftest.$ac_objext
925c2f3f 4645if { (eval echo "$as_me:4645: \"$ac_compile\"") >&5
503d2be0
AS
4646 (eval $ac_compile) 2>&5
4647 ac_status=$?
925c2f3f 4648 echo "$as_me:4648: \$? = $ac_status" >&5
503d2be0
AS
4649 (exit $ac_status); } &&
4650 { ac_try='test -s conftest.$ac_objext'
925c2f3f 4651 { (eval echo "$as_me:4651: \"$ac_try\"") >&5
503d2be0
AS
4652 (eval $ac_try) 2>&5
4653 ac_status=$?
925c2f3f 4654 echo "$as_me:4654: \$? = $ac_status" >&5
503d2be0 4655 (exit $ac_status); }; }; then
98418dba 4656 ac_cv_struct_tm=time.h
7397acc4 4657else
503d2be0
AS
4658 echo "$as_me: failed program was:" >&5
4659cat conftest.$ac_ext >&5
98418dba 4660ac_cv_struct_tm=sys/time.h
7397acc4 4661fi
503d2be0 4662rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 4663fi
925c2f3f 4664echo "$as_me:4664: result: $ac_cv_struct_tm" >&5
98418dba
CW
4665echo "${ECHO_T}$ac_cv_struct_tm" >&6
4666if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 4667
925c2f3f 4668cat >>confdefs.h <<\EOF
98418dba 4669#define TM_IN_SYS_TIME 1
925c2f3f 4670EOF
7397acc4
DL
4671
4672fi
ba4481b5 4673
925c2f3f 4674echo "$as_me:4674: checking for struct tm.tm_zone" >&5
98418dba
CW
4675echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
4676if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 4677 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4678else
98418dba 4679 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4680#line 4680 "configure"
98418dba
CW
4681#include "confdefs.h"
4682#include <sys/types.h>
4683#include <$ac_cv_struct_tm>
ba4481b5 4684
98418dba
CW
4685int
4686main ()
4687{
4688static struct tm ac_aggr;
4689if (ac_aggr.tm_zone)
4690return 0;
4691 ;
4692 return 0;
4693}
4694_ACEOF
4695rm -f conftest.$ac_objext
925c2f3f 4696if { (eval echo "$as_me:4696: \"$ac_compile\"") >&5
98418dba
CW
4697 (eval $ac_compile) 2>&5
4698 ac_status=$?
925c2f3f 4699 echo "$as_me:4699: \$? = $ac_status" >&5
98418dba
CW
4700 (exit $ac_status); } &&
4701 { ac_try='test -s conftest.$ac_objext'
925c2f3f 4702 { (eval echo "$as_me:4702: \"$ac_try\"") >&5
98418dba
CW
4703 (eval $ac_try) 2>&5
4704 ac_status=$?
925c2f3f 4705 echo "$as_me:4705: \$? = $ac_status" >&5
98418dba
CW
4706 (exit $ac_status); }; }; then
4707 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 4708else
98418dba
CW
4709 echo "$as_me: failed program was:" >&5
4710cat conftest.$ac_ext >&5
4711ac_cv_member_struct_tm_tm_zone=no
ba4481b5 4712fi
98418dba 4713rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 4714fi
925c2f3f 4715echo "$as_me:4715: result: $ac_cv_member_struct_tm_tm_zone" >&5
98418dba
CW
4716echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
4717if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 4718
925c2f3f 4719cat >>confdefs.h <<EOF
98418dba 4720#define HAVE_STRUCT_TM_TM_ZONE 1
925c2f3f 4721EOF
ba4481b5 4722
98418dba 4723fi
ba4481b5 4724
98418dba 4725if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 4726
925c2f3f 4727cat >>confdefs.h <<\EOF
98418dba 4728#define HAVE_TM_ZONE 1
925c2f3f 4729EOF
ba4481b5 4730
ba4481b5 4731else
925c2f3f 4732 echo "$as_me:4732: checking for tzname" >&5
98418dba
CW
4733echo $ECHO_N "checking for tzname... $ECHO_C" >&6
4734if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 4735 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4736else
98418dba 4737 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4738#line 4738 "configure"
98418dba
CW
4739#include "confdefs.h"
4740#include <time.h>
4741#ifndef tzname /* For SGI. */
4742extern char *tzname[]; /* RS6000 and others reject char **tzname. */
4743#endif
4744
98418dba
CW
4745int
4746main ()
4747{
4748atoi(*tzname);
4749 ;
4750 return 0;
4751}
4752_ACEOF
4753rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 4754if { (eval echo "$as_me:4754: \"$ac_link\"") >&5
98418dba
CW
4755 (eval $ac_link) 2>&5
4756 ac_status=$?
925c2f3f 4757 echo "$as_me:4757: \$? = $ac_status" >&5
98418dba
CW
4758 (exit $ac_status); } &&
4759 { ac_try='test -s conftest$ac_exeext'
925c2f3f 4760 { (eval echo "$as_me:4760: \"$ac_try\"") >&5
98418dba
CW
4761 (eval $ac_try) 2>&5
4762 ac_status=$?
925c2f3f 4763 echo "$as_me:4763: \$? = $ac_status" >&5
98418dba
CW
4764 (exit $ac_status); }; }; then
4765 ac_cv_var_tzname=yes
4766else
4767 echo "$as_me: failed program was:" >&5
4768cat conftest.$ac_ext >&5
4769ac_cv_var_tzname=no
ba4481b5 4770fi
98418dba
CW
4771rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4772fi
925c2f3f 4773echo "$as_me:4773: result: $ac_cv_var_tzname" >&5
98418dba
CW
4774echo "${ECHO_T}$ac_cv_var_tzname" >&6
4775 if test $ac_cv_var_tzname = yes; then
ba4481b5 4776
925c2f3f 4777cat >>confdefs.h <<\EOF
98418dba 4778#define HAVE_TZNAME 1
925c2f3f 4779EOF
503d2be0 4780
98418dba
CW
4781 fi
4782fi
503d2be0 4783
925c2f3f 4784echo "$as_me:4784: checking for struct tm.tm_gmtoff" >&5
b936fae4
AS
4785echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6
4786if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
4787 echo $ECHO_N "(cached) $ECHO_C" >&6
4788else
4789 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4790#line 4790 "configure"
98418dba
CW
4791#include "confdefs.h"
4792#include <time.h>
b936fae4 4793
98418dba
CW
4794int
4795main ()
4796{
b936fae4
AS
4797static struct tm ac_aggr;
4798if (ac_aggr.tm_gmtoff)
4799return 0;
98418dba
CW
4800 ;
4801 return 0;
4802}
4803_ACEOF
b936fae4 4804rm -f conftest.$ac_objext
925c2f3f 4805if { (eval echo "$as_me:4805: \"$ac_compile\"") >&5
b936fae4 4806 (eval $ac_compile) 2>&5
98418dba 4807 ac_status=$?
925c2f3f 4808 echo "$as_me:4808: \$? = $ac_status" >&5
98418dba 4809 (exit $ac_status); } &&
b936fae4 4810 { ac_try='test -s conftest.$ac_objext'
925c2f3f 4811 { (eval echo "$as_me:4811: \"$ac_try\"") >&5
98418dba
CW
4812 (eval $ac_try) 2>&5
4813 ac_status=$?
925c2f3f 4814 echo "$as_me:4814: \$? = $ac_status" >&5
98418dba 4815 (exit $ac_status); }; }; then
b936fae4 4816 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
4817else
4818 echo "$as_me: failed program was:" >&5
4819cat conftest.$ac_ext >&5
b936fae4 4820ac_cv_member_struct_tm_tm_gmtoff=no
98418dba 4821fi
b936fae4 4822rm -f conftest.$ac_objext conftest.$ac_ext
98418dba 4823fi
925c2f3f 4824echo "$as_me:4824: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
b936fae4
AS
4825echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6
4826if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
4827
925c2f3f 4828cat >>confdefs.h <<\EOF
98418dba 4829#define HAVE_TM_GMTOFF 1
925c2f3f 4830EOF
503d2be0 4831
98418dba 4832fi
503d2be0 4833
925c2f3f 4834echo "$as_me:4834: checking for $CC option to accept ANSI C" >&5
8799b3e4
CW
4835echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
4836if test "${ac_cv_prog_cc_stdc+set}" = set; then
4837 echo $ECHO_N "(cached) $ECHO_C" >&6
4838else
4839 ac_cv_prog_cc_stdc=no
4840ac_save_CC=$CC
4841cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4842#line 4842 "configure"
8799b3e4
CW
4843#include "confdefs.h"
4844#include <stdarg.h>
4845#include <stdio.h>
4846#include <sys/types.h>
4847#include <sys/stat.h>
4848/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4849struct buf { int x; };
4850FILE * (*rcsopen) (struct buf *, struct stat *, int);
4851static char *e (p, i)
4852 char **p;
4853 int i;
4854{
4855 return p[i];
4856}
4857static char *f (char * (*g) (char **, int), char **p, ...)
4858{
4859 char *s;
4860 va_list v;
4861 va_start (v,p);
4862 s = g (p, va_arg (v,int));
4863 va_end (v);
4864 return s;
4865}
4866int test (int i, double x);
4867struct s1 {int (*f) (int a);};
4868struct s2 {int (*f) (double a);};
4869int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4870int argc;
4871char **argv;
8799b3e4
CW
4872int
4873main ()
4874{
4875return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4876 ;
4877 return 0;
4878}
4879_ACEOF
4880# Don't try gcc -ansi; that turns off useful extensions and
4881# breaks some systems' header files.
4882# AIX -qlanglvl=ansi
4883# Ultrix and OSF/1 -std1
4884# HP-UX 10.20 and later -Ae
4885# HP-UX older versions -Aa -D_HPUX_SOURCE
4886# SVR4 -Xc -D__EXTENSIONS__
4887for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4888do
4889 CC="$ac_save_CC $ac_arg"
4890 rm -f conftest.$ac_objext
925c2f3f 4891if { (eval echo "$as_me:4891: \"$ac_compile\"") >&5
8799b3e4
CW
4892 (eval $ac_compile) 2>&5
4893 ac_status=$?
925c2f3f 4894 echo "$as_me:4894: \$? = $ac_status" >&5
8799b3e4
CW
4895 (exit $ac_status); } &&
4896 { ac_try='test -s conftest.$ac_objext'
925c2f3f 4897 { (eval echo "$as_me:4897: \"$ac_try\"") >&5
8799b3e4
CW
4898 (eval $ac_try) 2>&5
4899 ac_status=$?
925c2f3f 4900 echo "$as_me:4900: \$? = $ac_status" >&5
8799b3e4
CW
4901 (exit $ac_status); }; }; then
4902 ac_cv_prog_cc_stdc=$ac_arg
4903break
4904else
4905 echo "$as_me: failed program was:" >&5
4906cat conftest.$ac_ext >&5
4907fi
4908rm -f conftest.$ac_objext
4909done
4910rm -f conftest.$ac_ext conftest.$ac_objext
4911CC=$ac_save_CC
4912
4913fi
4914
4915case "x$ac_cv_prog_cc_stdc" in
4916 x|xno)
925c2f3f 4917 echo "$as_me:4917: result: none needed" >&5
8799b3e4
CW
4918echo "${ECHO_T}none needed" >&6 ;;
4919 *)
925c2f3f 4920 echo "$as_me:4920: result: $ac_cv_prog_cc_stdc" >&5
8799b3e4
CW
4921echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
4922 CC="$CC $ac_cv_prog_cc_stdc" ;;
4923esac
4924
925c2f3f 4925echo "$as_me:4925: checking for function prototypes" >&5
98418dba
CW
4926echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
4927if test "$ac_cv_prog_cc_stdc" != no; then
925c2f3f 4928 echo "$as_me:4928: result: yes" >&5
98418dba
CW
4929echo "${ECHO_T}yes" >&6
4930
925c2f3f 4931cat >>confdefs.h <<\EOF
98418dba 4932#define PROTOTYPES 1
925c2f3f 4933EOF
98418dba
CW
4934
4935else
925c2f3f 4936 echo "$as_me:4936: result: no" >&5
98418dba
CW
4937echo "${ECHO_T}no" >&6
4938fi
4939
925c2f3f 4940echo "$as_me:4940: checking for working volatile" >&5
98418dba
CW
4941echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
4942if test "${ac_cv_c_volatile+set}" = set; then
4943 echo $ECHO_N "(cached) $ECHO_C" >&6
4944else
4945 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4946#line 4946 "configure"
98418dba
CW
4947#include "confdefs.h"
4948
98418dba
CW
4949int
4950main ()
4951{
4952
4953volatile int x;
4954int * volatile y;
4955 ;
4956 return 0;
4957}
4958_ACEOF
4959rm -f conftest.$ac_objext
925c2f3f 4960if { (eval echo "$as_me:4960: \"$ac_compile\"") >&5
98418dba
CW
4961 (eval $ac_compile) 2>&5
4962 ac_status=$?
925c2f3f 4963 echo "$as_me:4963: \$? = $ac_status" >&5
98418dba
CW
4964 (exit $ac_status); } &&
4965 { ac_try='test -s conftest.$ac_objext'
925c2f3f 4966 { (eval echo "$as_me:4966: \"$ac_try\"") >&5
98418dba
CW
4967 (eval $ac_try) 2>&5
4968 ac_status=$?
925c2f3f 4969 echo "$as_me:4969: \$? = $ac_status" >&5
98418dba
CW
4970 (exit $ac_status); }; }; then
4971 ac_cv_c_volatile=yes
4972else
4973 echo "$as_me: failed program was:" >&5
4974cat conftest.$ac_ext >&5
4975ac_cv_c_volatile=no
4976fi
4977rm -f conftest.$ac_objext conftest.$ac_ext
4978fi
925c2f3f 4979echo "$as_me:4979: result: $ac_cv_c_volatile" >&5
98418dba
CW
4980echo "${ECHO_T}$ac_cv_c_volatile" >&6
4981if test $ac_cv_c_volatile = no; then
4982
925c2f3f 4983cat >>confdefs.h <<\EOF
98418dba 4984#define volatile
925c2f3f 4985EOF
98418dba
CW
4986
4987fi
4988
925c2f3f 4989echo "$as_me:4989: checking for an ANSI C-conforming const" >&5
98418dba
CW
4990echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
4991if test "${ac_cv_c_const+set}" = set; then
4992 echo $ECHO_N "(cached) $ECHO_C" >&6
4993else
4994 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 4995#line 4995 "configure"
98418dba
CW
4996#include "confdefs.h"
4997
98418dba
CW
4998int
4999main ()
5000{
5001/* FIXME: Include the comments suggested by Paul. */
5002#ifndef __cplusplus
5003 /* Ultrix mips cc rejects this. */
5004 typedef int charset[2];
5005 const charset x;
5006 /* SunOS 4.1.1 cc rejects this. */
5007 char const *const *ccp;
5008 char **p;
5009 /* NEC SVR4.0.2 mips cc rejects this. */
5010 struct point {int x, y;};
5011 static struct point const zero = {0,0};
5012 /* AIX XL C 1.02.0.0 rejects this.
5013 It does not let you subtract one const X* pointer from another in
5014 an arm of an if-expression whose if-part is not a constant
5015 expression */
5016 const char *g = "string";
5017 ccp = &g + (g ? g-g : 0);
5018 /* HPUX 7.0 cc rejects these. */
5019 ++ccp;
5020 p = (char**) ccp;
5021 ccp = (char const *const *) p;
5022 { /* SCO 3.2v4 cc rejects this. */
5023 char *t;
5024 char const *s = 0 ? (char *) 0 : (char const *) 0;
5025
5026 *t++ = 0;
5027 }
5028 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5029 int x[] = {25, 17};
5030 const int *foo = &x[0];
5031 ++foo;
5032 }
5033 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5034 typedef const int *iptr;
5035 iptr p = 0;
5036 ++p;
5037 }
5038 { /* AIX XL C 1.02.0.0 rejects this saying
5039 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5040 struct s { int j; const int *ap[3]; };
5041 struct s *b; b->j = 5;
5042 }
5043 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5044 const int foo = 10;
5045 }
5046#endif
5047
5048 ;
5049 return 0;
5050}
5051_ACEOF
5052rm -f conftest.$ac_objext
925c2f3f 5053if { (eval echo "$as_me:5053: \"$ac_compile\"") >&5
98418dba
CW
5054 (eval $ac_compile) 2>&5
5055 ac_status=$?
925c2f3f 5056 echo "$as_me:5056: \$? = $ac_status" >&5
98418dba
CW
5057 (exit $ac_status); } &&
5058 { ac_try='test -s conftest.$ac_objext'
925c2f3f 5059 { (eval echo "$as_me:5059: \"$ac_try\"") >&5
98418dba
CW
5060 (eval $ac_try) 2>&5
5061 ac_status=$?
925c2f3f 5062 echo "$as_me:5062: \$? = $ac_status" >&5
98418dba
CW
5063 (exit $ac_status); }; }; then
5064 ac_cv_c_const=yes
5065else
5066 echo "$as_me: failed program was:" >&5
5067cat conftest.$ac_ext >&5
5068ac_cv_c_const=no
5069fi
5070rm -f conftest.$ac_objext conftest.$ac_ext
5071fi
925c2f3f 5072echo "$as_me:5072: result: $ac_cv_c_const" >&5
98418dba
CW
5073echo "${ECHO_T}$ac_cv_c_const" >&6
5074if test $ac_cv_c_const = no; then
5075
925c2f3f 5076cat >>confdefs.h <<\EOF
98418dba 5077#define const
925c2f3f 5078EOF
98418dba
CW
5079
5080fi
5081
925c2f3f 5082echo "$as_me:5082: checking for void * support" >&5
98418dba
CW
5083echo $ECHO_N "checking for void * support... $ECHO_C" >&6
5084if test "${emacs_cv_void_star+set}" = set; then
5085 echo $ECHO_N "(cached) $ECHO_C" >&6
5086else
5087 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 5088#line 5088 "configure"
98418dba
CW
5089#include "confdefs.h"
5090
98418dba
CW
5091int
5092main ()
5093{
5094void * foo;
5095 ;
5096 return 0;
5097}
5098_ACEOF
5099rm -f conftest.$ac_objext
925c2f3f 5100if { (eval echo "$as_me:5100: \"$ac_compile\"") >&5
98418dba
CW
5101 (eval $ac_compile) 2>&5
5102 ac_status=$?
925c2f3f 5103 echo "$as_me:5103: \$? = $ac_status" >&5
98418dba
CW
5104 (exit $ac_status); } &&
5105 { ac_try='test -s conftest.$ac_objext'
925c2f3f 5106 { (eval echo "$as_me:5106: \"$ac_try\"") >&5
98418dba
CW
5107 (eval $ac_try) 2>&5
5108 ac_status=$?
925c2f3f 5109 echo "$as_me:5109: \$? = $ac_status" >&5
98418dba
CW
5110 (exit $ac_status); }; }; then
5111 emacs_cv_void_star=yes
5112else
5113 echo "$as_me: failed program was:" >&5
5114cat conftest.$ac_ext >&5
5115emacs_cv_void_star=no
5116fi
5117rm -f conftest.$ac_objext conftest.$ac_ext
5118fi
925c2f3f 5119echo "$as_me:5119: result: $emacs_cv_void_star" >&5
98418dba
CW
5120echo "${ECHO_T}$emacs_cv_void_star" >&6
5121if test $emacs_cv_void_star = yes; then
925c2f3f 5122 cat >>confdefs.h <<\EOF
98418dba 5123#define POINTER_TYPE void
925c2f3f 5124EOF
98418dba
CW
5125
5126else
925c2f3f 5127 cat >>confdefs.h <<\EOF
98418dba 5128#define POINTER_TYPE char
925c2f3f 5129EOF
98418dba
CW
5130
5131fi
5132
925c2f3f 5133echo "$as_me:5133: checking whether ${MAKE-make} sets \${MAKE}" >&5
98418dba
CW
5134echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
5135set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
5136if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
5137 echo $ECHO_N "(cached) $ECHO_C" >&6
5138else
925c2f3f 5139 cat >conftest.make <<\EOF
98418dba
CW
5140all:
5141 @echo 'ac_maketemp="${MAKE}"'
925c2f3f 5142EOF
98418dba
CW
5143# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5144eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
5145if test -n "$ac_maketemp"; then
5146 eval ac_cv_prog_make_${ac_make}_set=yes
5147else
5148 eval ac_cv_prog_make_${ac_make}_set=no
5149fi
5150rm -f conftest.make
5151fi
5152if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
925c2f3f 5153 echo "$as_me:5153: result: yes" >&5
98418dba
CW
5154echo "${ECHO_T}yes" >&6
5155 SET_MAKE=
5156else
925c2f3f 5157 echo "$as_me:5157: result: no" >&5
98418dba
CW
5158echo "${ECHO_T}no" >&6
5159 SET_MAKE="MAKE=${MAKE-make}"
5160fi
5161
925c2f3f 5162echo "$as_me:5162: checking for long file names" >&5
98418dba
CW
5163echo $ECHO_N "checking for long file names... $ECHO_C" >&6
5164if test "${ac_cv_sys_long_file_names+set}" = set; then
5165 echo $ECHO_N "(cached) $ECHO_C" >&6
5166else
5167 ac_cv_sys_long_file_names=yes
5168# Test for long file names in all the places we know might matter:
5169# . the current directory, where building will happen
5170# $prefix/lib where we will be installing things
5171# $exec_prefix/lib likewise
5172# eval it to expand exec_prefix.
5173# $TMPDIR if set, where it might want to write temporary files
5174# if $TMPDIR is not set:
5175# /tmp where it might want to write temporary files
5176# /var/tmp likewise
5177# /usr/tmp likewise
5178if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
5179 ac_tmpdirs=$TMPDIR
5180else
5181 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
5182fi
5183for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
5184 test -d $ac_dir || continue
5185 test -w $ac_dir || continue # It is less confusing to not echo anything here.
5186 ac_xdir=$ac_dir/cf$$
5187 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
5188 ac_tf1=$ac_xdir/conftest9012345
5189 ac_tf2=$ac_xdir/conftest9012346
5190 (echo 1 >$ac_tf1) 2>/dev/null
5191 (echo 2 >$ac_tf2) 2>/dev/null
5192 ac_val=`cat $ac_tf1 2>/dev/null`
5193 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
5194 ac_cv_sys_long_file_names=no
5195 rm -rf $ac_xdir 2>/dev/null
5196 break
5197 fi
5198 rm -rf $ac_xdir 2>/dev/null
5199done
5200fi
925c2f3f 5201echo "$as_me:5201: result: $ac_cv_sys_long_file_names" >&5
98418dba
CW
5202echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
5203if test $ac_cv_sys_long_file_names = yes; then
5204
925c2f3f 5205cat >>confdefs.h <<\EOF
98418dba 5206#define HAVE_LONG_FILE_NAMES 1
925c2f3f 5207EOF
98418dba
CW
5208
5209fi
5210
98418dba
CW
5211#### Choose a window system.
5212
925c2f3f 5213echo "$as_me:5213: checking for X" >&5
98418dba
CW
5214echo $ECHO_N "checking for X... $ECHO_C" >&6
5215
98418dba
CW
5216# Check whether --with-x or --without-x was given.
5217if test "${with_x+set}" = set; then
5218 withval="$with_x"
5219
5220fi;
5221# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5222if test "x$with_x" = xno; then
5223 # The user explicitly disabled X.
5224 have_x=disabled
5225else
5226 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5227 # Both variables are already set.
5228 have_x=yes
5229 else
5230 if test "${ac_cv_have_x+set}" = set; then
5231 echo $ECHO_N "(cached) $ECHO_C" >&6
5232else
5233 # One or both of the vars are not set, and there is no cached value.
5234ac_x_includes=no ac_x_libraries=no
5235rm -fr conftest.dir
5236if mkdir conftest.dir; then
5237 cd conftest.dir
5238 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
925c2f3f 5239 cat >Imakefile <<'EOF'
98418dba
CW
5240acfindx:
5241 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
925c2f3f 5242EOF
98418dba
CW
5243 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5244 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5245 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5246 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5247 for ac_extension in a so sl; do
5248 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5249 test -f $ac_im_libdir/libX11.$ac_extension; then
5250 ac_im_usrlibdir=$ac_im_libdir; break
5251 fi
5252 done
5253 # Screen out bogus values from the imake configuration. They are
5254 # bogus both because they are the default anyway, and because
5255 # using them would break gcc on systems where it needs fixed includes.
5256 case $ac_im_incroot in
5257 /usr/include) ;;
5258 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
5259 esac
5260 case $ac_im_usrlibdir in
5261 /usr/lib | /lib) ;;
5262 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
5263 esac
5264 fi
5265 cd ..
5266 rm -fr conftest.dir
5267fi
5268
5269# Standard set of common directories for X headers.
5270# Check X11 before X11Rn because it is often a symlink to the current release.
5271ac_x_header_dirs='
5272/usr/X11/include
5273/usr/X11R6/include
5274/usr/X11R5/include
5275/usr/X11R4/include
5276
5277/usr/include/X11
5278/usr/include/X11R6
5279/usr/include/X11R5
5280/usr/include/X11R4
5281
5282/usr/local/X11/include
5283/usr/local/X11R6/include
5284/usr/local/X11R5/include
5285/usr/local/X11R4/include
5286
5287/usr/local/include/X11
5288/usr/local/include/X11R6
5289/usr/local/include/X11R5
5290/usr/local/include/X11R4
5291
5292/usr/X386/include
5293/usr/x386/include
5294/usr/XFree86/include/X11
5295
5296/usr/include
5297/usr/local/include
5298/usr/unsupported/include
5299/usr/athena/include
5300/usr/local/x11r5/include
5301/usr/lpp/Xamples/include
5302
5303/usr/openwin/include
5304/usr/openwin/share/include'
5305
5306if test "$ac_x_includes" = no; then
5307 # Guess where to find include files, by looking for Intrinsic.h.
5308 # First, try using that file with no special directory specified.
5309 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 5310#line 5310 "configure"
98418dba
CW
5311#include "confdefs.h"
5312#include <X11/Intrinsic.h>
5313_ACEOF
925c2f3f 5314if { (eval echo "$as_me:5314: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
5315 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5316 ac_status=$?
5317 egrep -v '^ *\+' conftest.er1 >conftest.err
5318 rm -f conftest.er1
5319 cat conftest.err >&5
925c2f3f 5320 echo "$as_me:5320: \$? = $ac_status" >&5
98418dba
CW
5321 (exit $ac_status); } >/dev/null; then
5322 if test -s conftest.err; then
5323 ac_cpp_err=$ac_c_preproc_warn_flag
5324 else
5325 ac_cpp_err=
5326 fi
5327else
5328 ac_cpp_err=yes
5329fi
5330if test -z "$ac_cpp_err"; then
5331 # We can compile using X headers with no special include directory.
5332ac_x_includes=
5333else
5334 echo "$as_me: failed program was:" >&5
5335 cat conftest.$ac_ext >&5
5336 for ac_dir in $ac_x_header_dirs; do
5337 if test -r "$ac_dir/X11/Intrinsic.h"; then
5338 ac_x_includes=$ac_dir
5339 break
5340 fi
5341done
5342fi
5343rm -f conftest.err conftest.$ac_ext
5344fi # $ac_x_includes = no
5345
5346if test "$ac_x_libraries" = no; then
5347 # Check for the libraries.
5348 # See if we find them without any special options.
5349 # Don't add to $LIBS permanently.
5350 ac_save_LIBS=$LIBS
5351 LIBS="-lXt $LIBS"
5352 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 5353#line 5353 "configure"
98418dba
CW
5354#include "confdefs.h"
5355#include <X11/Intrinsic.h>
98418dba
CW
5356int
5357main ()
5358{
5359XtMalloc (0)
5360 ;
5361 return 0;
5362}
5363_ACEOF
5364rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 5365if { (eval echo "$as_me:5365: \"$ac_link\"") >&5
98418dba
CW
5366 (eval $ac_link) 2>&5
5367 ac_status=$?
925c2f3f 5368 echo "$as_me:5368: \$? = $ac_status" >&5
98418dba
CW
5369 (exit $ac_status); } &&
5370 { ac_try='test -s conftest$ac_exeext'
925c2f3f 5371 { (eval echo "$as_me:5371: \"$ac_try\"") >&5
98418dba
CW
5372 (eval $ac_try) 2>&5
5373 ac_status=$?
925c2f3f 5374 echo "$as_me:5374: \$? = $ac_status" >&5
98418dba
CW
5375 (exit $ac_status); }; }; then
5376 LIBS=$ac_save_LIBS
5377# We can link X programs with no special library path.
5378ac_x_libraries=
5379else
5380 echo "$as_me: failed program was:" >&5
5381cat conftest.$ac_ext >&5
5382LIBS=$ac_save_LIBS
5383for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
5384do
5385 # Don't even attempt the hair of trying to link an X program!
5386 for ac_extension in a so sl; do
5387 if test -r $ac_dir/libXt.$ac_extension; then
5388 ac_x_libraries=$ac_dir
5389 break 2
5390 fi
5391 done
5392done
5393fi
5394rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5395fi # $ac_x_libraries = no
5396
5397if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
5398 # Didn't find X anywhere. Cache the known absence of X.
5399 ac_cv_have_x="have_x=no"
5400else
5401 # Record where we found X for the cache.
5402 ac_cv_have_x="have_x=yes \
5403 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5404fi
5405fi
5406
5407 fi
5408 eval "$ac_cv_have_x"
5409fi # $with_x != no
5410
5411if test "$have_x" != yes; then
925c2f3f 5412 echo "$as_me:5412: result: $have_x" >&5
98418dba
CW
5413echo "${ECHO_T}$have_x" >&6
5414 no_x=yes
5415else
5416 # If each of the values was on the command line, it overrides each guess.
5417 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5418 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5419 # Update the cache value to reflect the command line values.
5420 ac_cv_have_x="have_x=yes \
5421 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
925c2f3f 5422 echo "$as_me:5422: result: libraries $x_libraries, headers $x_includes" >&5
98418dba
CW
5423echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
5424fi
5425
5426if test "$no_x" = yes; then
5427 window_system=none
5428else
5429 window_system=x11
5430fi
5431
5432if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
5433 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
5434 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
5435 x_default_search_path=""
5436 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
5437 x_search_path="\
5438${x_library}/X11/%L/%T/%N%C%S:\
5439${x_library}/X11/%l/%T/%N%C%S:\
5440${x_library}/X11/%T/%N%C%S:\
5441${x_library}/X11/%L/%T/%N%S:\
5442${x_library}/X11/%l/%T/%N%S:\
5443${x_library}/X11/%T/%N%S"
5444 if test x"${x_default_search_path}" = x; then
5445 x_default_search_path=${x_search_path}
5446 else
5447 x_default_search_path="${x_search_path}:${x_default_search_path}"
5448 fi
5449 done
5450fi
5451if test "${x_includes}" != NONE && test -n "${x_includes}"; then
5452 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
5453fi
5454
5455if test x"${x_includes}" = x; then
5456 bitmapdir=/usr/include/X11/bitmaps
5457else
5458 # accumulate include directories that have X11 bitmap subdirectories
5459 bmd_acc="dummyval"
5460 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
5461 if test -d "${bmd}/X11/bitmaps"; then
5462 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
5463 fi
5464 if test -d "${bmd}/bitmaps"; then
5465 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
5466 fi
5467 done
5468 if test ${bmd_acc} != "dummyval"; then
5469 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
5470 fi
5471fi
5472
5473case "${window_system}" in
5474 x11 )
5475 HAVE_X_WINDOWS=yes
5476 HAVE_X11=yes
5477 case "${with_x_toolkit}" in
5478 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
5479 motif ) USE_X_TOOLKIT=MOTIF ;;
5480 no ) USE_X_TOOLKIT=none ;;
5481 * ) USE_X_TOOLKIT=maybe ;;
5482 esac
5483 ;;
5484 none )
5485 HAVE_X_WINDOWS=no
5486 HAVE_X11=no
5487 USE_X_TOOLKIT=none
5488 ;;
5489esac
5490
5491### If we're using X11, we should use the X menu package.
5492HAVE_MENUS=no
5493case ${HAVE_X11} in
5494 yes ) HAVE_MENUS=yes ;;
5495esac
5496
5497if test "${opsys}" = "hpux9"; then
5498 case "${x_libraries}" in
5499 *X11R4* )
5500 opsysfile="s/hpux9-x11r4.h"
5501 ;;
5502 esac
5503fi
5504
5505if test "${opsys}" = "hpux9shr"; then
5506 case "${x_libraries}" in
5507 *X11R4* )
5508 opsysfile="s/hpux9shxr4.h"
5509 ;;
5510 esac
5511fi
5512
5513### Compute the unexec source name from the object name.
5514UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
5515
5516# Do the opsystem or machine files prohibit the use of the GNU malloc?
5517# Assume not, until told otherwise.
5518GNU_MALLOC=yes
5519doug_lea_malloc=yes
925c2f3f 5520echo "$as_me:5520: checking for malloc_get_state" >&5
98418dba
CW
5521echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6
5522if test "${ac_cv_func_malloc_get_state+set}" = set; then
5523 echo $ECHO_N "(cached) $ECHO_C" >&6
5524else
5525 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 5526#line 5526 "configure"
98418dba
CW
5527#include "confdefs.h"
5528/* System header to define __stub macros and hopefully few prototypes,
5529 which can conflict with char malloc_get_state (); below. */
5530#include <assert.h>
5531/* Override any gcc2 internal prototype to avoid an error. */
5532#ifdef __cplusplus
5533extern "C"
5534#endif
5535/* We use char because int might match the return type of a gcc2
5536 builtin and then its argument prototype would still apply. */
5537char malloc_get_state ();
5538char (*f) ();
5539
98418dba
CW
5540int
5541main ()
5542{
5543/* The GNU C library defines this for functions which it implements
5544 to always fail with ENOSYS. Some functions are actually named
5545 something starting with __ and the normal name is an alias. */
5546#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
5547choke me
5548#else
5549f = malloc_get_state;
5550#endif
5551
5552 ;
5553 return 0;
5554}
5555_ACEOF
5556rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 5557if { (eval echo "$as_me:5557: \"$ac_link\"") >&5
98418dba
CW
5558 (eval $ac_link) 2>&5
5559 ac_status=$?
925c2f3f 5560 echo "$as_me:5560: \$? = $ac_status" >&5
98418dba
CW
5561 (exit $ac_status); } &&
5562 { ac_try='test -s conftest$ac_exeext'
925c2f3f 5563 { (eval echo "$as_me:5563: \"$ac_try\"") >&5
98418dba
CW
5564 (eval $ac_try) 2>&5
5565 ac_status=$?
925c2f3f 5566 echo "$as_me:5566: \$? = $ac_status" >&5
98418dba
CW
5567 (exit $ac_status); }; }; then
5568 ac_cv_func_malloc_get_state=yes
5569else
5570 echo "$as_me: failed program was:" >&5
5571cat conftest.$ac_ext >&5
5572ac_cv_func_malloc_get_state=no
5573fi
5574rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5575fi
925c2f3f 5576echo "$as_me:5576: result: $ac_cv_func_malloc_get_state" >&5
98418dba
CW
5577echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6
5578if test $ac_cv_func_malloc_get_state = yes; then
5579 :
5580else
5581 doug_lea_malloc=no
5582fi
5583
925c2f3f 5584echo "$as_me:5584: checking for malloc_set_state" >&5
98418dba
CW
5585echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6
5586if test "${ac_cv_func_malloc_set_state+set}" = set; then
5587 echo $ECHO_N "(cached) $ECHO_C" >&6
5588else
5589 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 5590#line 5590 "configure"
98418dba
CW
5591#include "confdefs.h"
5592/* System header to define __stub macros and hopefully few prototypes,
5593 which can conflict with char malloc_set_state (); below. */
5594#include <assert.h>
5595/* Override any gcc2 internal prototype to avoid an error. */
5596#ifdef __cplusplus
5597extern "C"
5598#endif
5599/* We use char because int might match the return type of a gcc2
5600 builtin and then its argument prototype would still apply. */
5601char malloc_set_state ();
5602char (*f) ();
5603
98418dba
CW
5604int
5605main ()
5606{
5607/* The GNU C library defines this for functions which it implements
5608 to always fail with ENOSYS. Some functions are actually named
5609 something starting with __ and the normal name is an alias. */
5610#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
5611choke me
5612#else
5613f = malloc_set_state;
5614#endif
5615
5616 ;
5617 return 0;
5618}
5619_ACEOF
5620rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 5621if { (eval echo "$as_me:5621: \"$ac_link\"") >&5
98418dba
CW
5622 (eval $ac_link) 2>&5
5623 ac_status=$?
925c2f3f 5624 echo "$as_me:5624: \$? = $ac_status" >&5
98418dba
CW
5625 (exit $ac_status); } &&
5626 { ac_try='test -s conftest$ac_exeext'
925c2f3f 5627 { (eval echo "$as_me:5627: \"$ac_try\"") >&5
98418dba
CW
5628 (eval $ac_try) 2>&5
5629 ac_status=$?
925c2f3f 5630 echo "$as_me:5630: \$? = $ac_status" >&5
98418dba
CW
5631 (exit $ac_status); }; }; then
5632 ac_cv_func_malloc_set_state=yes
5633else
5634 echo "$as_me: failed program was:" >&5
5635cat conftest.$ac_ext >&5
5636ac_cv_func_malloc_set_state=no
5637fi
5638rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5639fi
925c2f3f 5640echo "$as_me:5640: result: $ac_cv_func_malloc_set_state" >&5
98418dba
CW
5641echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6
5642if test $ac_cv_func_malloc_set_state = yes; then
5643 :
5644else
5645 doug_lea_malloc=no
5646fi
5647
925c2f3f 5648echo "$as_me:5648: checking whether __after_morecore_hook exists" >&5
98418dba
CW
5649echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6
5650if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
5651 echo $ECHO_N "(cached) $ECHO_C" >&6
5652else
5653 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 5654#line 5654 "configure"
98418dba
CW
5655#include "confdefs.h"
5656extern void (* __after_morecore_hook)();
98418dba
CW
5657int
5658main ()
5659{
5660__after_morecore_hook = 0
5661 ;
5662 return 0;
5663}
5664_ACEOF
5665rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 5666if { (eval echo "$as_me:5666: \"$ac_link\"") >&5
98418dba
CW
5667 (eval $ac_link) 2>&5
5668 ac_status=$?
925c2f3f 5669 echo "$as_me:5669: \$? = $ac_status" >&5
98418dba
CW
5670 (exit $ac_status); } &&
5671 { ac_try='test -s conftest$ac_exeext'
925c2f3f 5672 { (eval echo "$as_me:5672: \"$ac_try\"") >&5
98418dba
CW
5673 (eval $ac_try) 2>&5
5674 ac_status=$?
925c2f3f 5675 echo "$as_me:5675: \$? = $ac_status" >&5
98418dba
CW
5676 (exit $ac_status); }; }; then
5677 emacs_cv_var___after_morecore_hook=yes
5678else
5679 echo "$as_me: failed program was:" >&5
5680cat conftest.$ac_ext >&5
5681emacs_cv_var___after_morecore_hook=no
5682fi
5683rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5684fi
925c2f3f 5685echo "$as_me:5685: result: $emacs_cv_var___after_morecore_hook" >&5
98418dba
CW
5686echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6
5687if test $emacs_cv_var___after_morecore_hook = no; then
5688 doug_lea_malloc=no
5689fi
5690if test "${system_malloc}" = "yes"; then
5691 GNU_MALLOC=no
5692 GNU_MALLOC_reason="
5693 (The GNU allocators don't work with this system configuration.)"
5694fi
5695if test "$doug_lea_malloc" = "yes" ; then
5696 if test "$GNU_MALLOC" = yes ; then
5697 GNU_MALLOC_reason="
5698 (Using Doug Lea's new malloc from the GNU C Library.)"
5699 fi
b936fae4 5700
925c2f3f 5701cat >>confdefs.h <<\EOF
98418dba 5702#define DOUG_LEA_MALLOC 1
925c2f3f 5703EOF
98418dba
CW
5704
5705fi
5706
5707if test x"${REL_ALLOC}" = x; then
5708 REL_ALLOC=${GNU_MALLOC}
5709fi
5710
925c2f3f 5711# On IRIX 5.3, sys/types and inttypes.h are conflicting.
98418dba 5712
925c2f3f
EZ
5713for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5714 inttypes.h stdint.h unistd.h
98418dba
CW
5715do
5716as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
925c2f3f 5717echo "$as_me:5717: checking for $ac_header" >&5
98418dba
CW
5718echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5719if eval "test \"\${$as_ac_Header+set}\" = set"; then
5720 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 5721else
925c2f3f
EZ
5722 cat >conftest.$ac_ext <<_ACEOF
5723#line 5723 "configure"
98418dba
CW
5724#include "confdefs.h"
5725$ac_includes_default
5726#include <$ac_header>
5727_ACEOF
5728rm -f conftest.$ac_objext
925c2f3f 5729if { (eval echo "$as_me:5729: \"$ac_compile\"") >&5
98418dba
CW
5730 (eval $ac_compile) 2>&5
5731 ac_status=$?
925c2f3f 5732 echo "$as_me:5732: \$? = $ac_status" >&5
98418dba
CW
5733 (exit $ac_status); } &&
5734 { ac_try='test -s conftest.$ac_objext'
925c2f3f 5735 { (eval echo "$as_me:5735: \"$ac_try\"") >&5
98418dba
CW
5736 (eval $ac_try) 2>&5
5737 ac_status=$?
925c2f3f 5738 echo "$as_me:5738: \$? = $ac_status" >&5
98418dba 5739 (exit $ac_status); }; }; then
925c2f3f 5740 eval "$as_ac_Header=yes"
98418dba
CW
5741else
5742 echo "$as_me: failed program was:" >&5
5743cat conftest.$ac_ext >&5
925c2f3f 5744eval "$as_ac_Header=no"
98418dba
CW
5745fi
5746rm -f conftest.$ac_objext conftest.$ac_ext
925c2f3f
EZ
5747fi
5748echo "$as_me:5748: result: `eval echo '${'$as_ac_Header'}'`" >&5
5749echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5750if test `eval echo '${'$as_ac_Header'}'` = yes; then
5751 cat >>confdefs.h <<EOF
5752#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5753EOF
98418dba 5754
925c2f3f
EZ
5755fi
5756done
5757
5758for ac_header in stdlib.h unistd.h
5759do
5760as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5761echo "$as_me:5761: checking for $ac_header" >&5
5762echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5763if eval "test \"\${$as_ac_Header+set}\" = set"; then
5764 echo $ECHO_N "(cached) $ECHO_C" >&6
5765else
5766 cat >conftest.$ac_ext <<_ACEOF
5767#line 5767 "configure"
98418dba
CW
5768#include "confdefs.h"
5769#include <$ac_header>
5770_ACEOF
925c2f3f 5771if { (eval echo "$as_me:5771: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
5772 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5773 ac_status=$?
5774 egrep -v '^ *\+' conftest.er1 >conftest.err
5775 rm -f conftest.er1
5776 cat conftest.err >&5
925c2f3f 5777 echo "$as_me:5777: \$? = $ac_status" >&5
98418dba
CW
5778 (exit $ac_status); } >/dev/null; then
5779 if test -s conftest.err; then
5780 ac_cpp_err=$ac_c_preproc_warn_flag
5781 else
5782 ac_cpp_err=
5783 fi
5784else
5785 ac_cpp_err=yes
5786fi
5787if test -z "$ac_cpp_err"; then
925c2f3f 5788 eval "$as_ac_Header=yes"
98418dba
CW
5789else
5790 echo "$as_me: failed program was:" >&5
5791 cat conftest.$ac_ext >&5
925c2f3f 5792 eval "$as_ac_Header=no"
98418dba
CW
5793fi
5794rm -f conftest.err conftest.$ac_ext
98418dba 5795fi
925c2f3f 5796echo "$as_me:5796: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5797echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 5798if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 5799 cat >>confdefs.h <<EOF
98418dba 5800#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 5801EOF
98418dba
CW
5802
5803fi
98418dba
CW
5804done
5805
98418dba
CW
5806for ac_func in getpagesize
5807do
5808as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
925c2f3f 5809echo "$as_me:5809: checking for $ac_func" >&5
98418dba
CW
5810echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5811if eval "test \"\${$as_ac_var+set}\" = set"; then
5812 echo $ECHO_N "(cached) $ECHO_C" >&6
5813else
5814 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 5815#line 5815 "configure"
98418dba
CW
5816#include "confdefs.h"
5817/* System header to define __stub macros and hopefully few prototypes,
5818 which can conflict with char $ac_func (); below. */
5819#include <assert.h>
5820/* Override any gcc2 internal prototype to avoid an error. */
5821#ifdef __cplusplus
5822extern "C"
5823#endif
5824/* We use char because int might match the return type of a gcc2
5825 builtin and then its argument prototype would still apply. */
5826char $ac_func ();
5827char (*f) ();
5828
98418dba
CW
5829int
5830main ()
5831{
5832/* The GNU C library defines this for functions which it implements
5833 to always fail with ENOSYS. Some functions are actually named
5834 something starting with __ and the normal name is an alias. */
5835#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5836choke me
5837#else
5838f = $ac_func;
5839#endif
5840
5841 ;
5842 return 0;
5843}
5844_ACEOF
5845rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 5846if { (eval echo "$as_me:5846: \"$ac_link\"") >&5
98418dba
CW
5847 (eval $ac_link) 2>&5
5848 ac_status=$?
925c2f3f 5849 echo "$as_me:5849: \$? = $ac_status" >&5
98418dba
CW
5850 (exit $ac_status); } &&
5851 { ac_try='test -s conftest$ac_exeext'
925c2f3f 5852 { (eval echo "$as_me:5852: \"$ac_try\"") >&5
98418dba
CW
5853 (eval $ac_try) 2>&5
5854 ac_status=$?
925c2f3f 5855 echo "$as_me:5855: \$? = $ac_status" >&5
98418dba
CW
5856 (exit $ac_status); }; }; then
5857 eval "$as_ac_var=yes"
5858else
5859 echo "$as_me: failed program was:" >&5
5860cat conftest.$ac_ext >&5
5861eval "$as_ac_var=no"
5862fi
5863rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5864fi
925c2f3f 5865echo "$as_me:5865: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
5866echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5867if test `eval echo '${'$as_ac_var'}'` = yes; then
925c2f3f 5868 cat >>confdefs.h <<EOF
98418dba 5869#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
925c2f3f 5870EOF
98418dba
CW
5871
5872fi
5873done
5874
925c2f3f 5875echo "$as_me:5875: checking for working mmap" >&5
98418dba
CW
5876echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
5877if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
5878 echo $ECHO_N "(cached) $ECHO_C" >&6
5879else
5880 if test "$cross_compiling" = yes; then
5881 ac_cv_func_mmap_fixed_mapped=no
5882else
5883 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 5884#line 5884 "configure"
98418dba
CW
5885#include "confdefs.h"
5886$ac_includes_default
98418dba
CW
5887/* Thanks to Mike Haertel and Jim Avera for this test.
5888 Here is a matrix of mmap possibilities:
5889 mmap private not fixed
5890 mmap private fixed at somewhere currently unmapped
5891 mmap private fixed at somewhere already mapped
5892 mmap shared not fixed
5893 mmap shared fixed at somewhere currently unmapped
5894 mmap shared fixed at somewhere already mapped
5895 For private mappings, we should verify that changes cannot be read()
5896 back from the file, nor mmap's back from the file at a different
5897 address. (There have been systems where private was not correctly
5898 implemented like the infamous i386 svr4.0, and systems where the
5899 VM page cache was not coherent with the file system buffer cache
5900 like early versions of FreeBSD and possibly contemporary NetBSD.)
5901 For shared mappings, we should conversely verify that changes get
925c2f3f 5902 propogated back to all the places they're supposed to be.
98418dba
CW
5903
5904 Grep wants private fixed already mapped.
5905 The main things grep needs to know about mmap are:
5906 * does it exist and is it safe to write into the mmap'd area
5907 * how to use it (BSD variants) */
5908
5909#include <fcntl.h>
5910#include <sys/mman.h>
5911
5912#if !STDC_HEADERS && !HAVE_STDLIB_H
5913char *malloc ();
5914#endif
5915
5916/* This mess was copied from the GNU getpagesize.h. */
5917#if !HAVE_GETPAGESIZE
5918/* Assume that all systems that can run configure have sys/param.h. */
5919# if !HAVE_SYS_PARAM_H
5920# define HAVE_SYS_PARAM_H 1
5921# endif
5922
5923# ifdef _SC_PAGESIZE
5924# define getpagesize() sysconf(_SC_PAGESIZE)
5925# else /* no _SC_PAGESIZE */
5926# if HAVE_SYS_PARAM_H
5927# include <sys/param.h>
5928# ifdef EXEC_PAGESIZE
5929# define getpagesize() EXEC_PAGESIZE
5930# else /* no EXEC_PAGESIZE */
5931# ifdef NBPG
5932# define getpagesize() NBPG * CLSIZE
5933# ifndef CLSIZE
5934# define CLSIZE 1
5935# endif /* no CLSIZE */
5936# else /* no NBPG */
5937# ifdef NBPC
5938# define getpagesize() NBPC
5939# else /* no NBPC */
5940# ifdef PAGESIZE
5941# define getpagesize() PAGESIZE
5942# endif /* PAGESIZE */
5943# endif /* no NBPC */
5944# endif /* no NBPG */
5945# endif /* no EXEC_PAGESIZE */
5946# else /* no HAVE_SYS_PARAM_H */
5947# define getpagesize() 8192 /* punt totally */
5948# endif /* no HAVE_SYS_PARAM_H */
5949# endif /* no _SC_PAGESIZE */
5950
5951#endif /* no HAVE_GETPAGESIZE */
5952
5953int
5954main ()
5955{
5956 char *data, *data2, *data3;
5957 int i, pagesize;
5958 int fd;
5959
5960 pagesize = getpagesize ();
5961
5962 /* First, make a file with some known garbage in it. */
5963 data = (char *) malloc (pagesize);
5964 if (!data)
5965 exit (1);
5966 for (i = 0; i < pagesize; ++i)
5967 *(data + i) = rand ();
5968 umask (0);
5969 fd = creat ("conftest.mmap", 0600);
5970 if (fd < 0)
5971 exit (1);
5972 if (write (fd, data, pagesize) != pagesize)
5973 exit (1);
5974 close (fd);
5975
5976 /* Next, try to mmap the file at a fixed address which already has
5977 something else allocated at it. If we can, also make sure that
5978 we see the same garbage. */
5979 fd = open ("conftest.mmap", O_RDWR);
5980 if (fd < 0)
5981 exit (1);
5982 data2 = (char *) malloc (2 * pagesize);
5983 if (!data2)
5984 exit (1);
5985 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5986 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
5987 MAP_PRIVATE | MAP_FIXED, fd, 0L))
5988 exit (1);
5989 for (i = 0; i < pagesize; ++i)
5990 if (*(data + i) != *(data2 + i))
5991 exit (1);
5992
5993 /* Finally, make sure that changes to the mapped area do not
5994 percolate back to the file as seen by read(). (This is a bug on
5995 some variants of i386 svr4.0.) */
5996 for (i = 0; i < pagesize; ++i)
5997 *(data2 + i) = *(data2 + i) + 1;
5998 data3 = (char *) malloc (pagesize);
5999 if (!data3)
6000 exit (1);
6001 if (read (fd, data3, pagesize) != pagesize)
6002 exit (1);
6003 for (i = 0; i < pagesize; ++i)
6004 if (*(data + i) != *(data3 + i))
6005 exit (1);
6006 close (fd);
6007 exit (0);
6008}
6009_ACEOF
6010rm -f conftest$ac_exeext
925c2f3f 6011if { (eval echo "$as_me:6011: \"$ac_link\"") >&5
98418dba
CW
6012 (eval $ac_link) 2>&5
6013 ac_status=$?
925c2f3f 6014 echo "$as_me:6014: \$? = $ac_status" >&5
98418dba 6015 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
925c2f3f 6016 { (eval echo "$as_me:6016: \"$ac_try\"") >&5
98418dba
CW
6017 (eval $ac_try) 2>&5
6018 ac_status=$?
925c2f3f 6019 echo "$as_me:6019: \$? = $ac_status" >&5
98418dba
CW
6020 (exit $ac_status); }; }; then
6021 ac_cv_func_mmap_fixed_mapped=yes
6022else
6023 echo "$as_me: program exited with status $ac_status" >&5
6024echo "$as_me: failed program was:" >&5
6025cat conftest.$ac_ext >&5
98418dba
CW
6026ac_cv_func_mmap_fixed_mapped=no
6027fi
6028rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6029fi
6030fi
925c2f3f 6031echo "$as_me:6031: result: $ac_cv_func_mmap_fixed_mapped" >&5
98418dba
CW
6032echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
6033if test $ac_cv_func_mmap_fixed_mapped = yes; then
6034
925c2f3f 6035cat >>confdefs.h <<\EOF
98418dba 6036#define HAVE_MMAP 1
925c2f3f 6037EOF
98418dba
CW
6038
6039fi
6040rm -f conftest.mmap
6041
6042if test $use_mmap_for_buffers = yes; then
6043 REL_ALLOC=no
6044fi
6045
6046LIBS="$libsrc_libs $LIBS"
6047
925c2f3f 6048echo "$as_me:6048: checking for dnet_ntoa in -ldnet" >&5
98418dba
CW
6049echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
6050if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
6051 echo $ECHO_N "(cached) $ECHO_C" >&6
6052else
6053 ac_check_lib_save_LIBS=$LIBS
6054LIBS="-ldnet $LIBS"
6055cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6056#line 6056 "configure"
98418dba
CW
6057#include "confdefs.h"
6058
6059/* Override any gcc2 internal prototype to avoid an error. */
6060#ifdef __cplusplus
6061extern "C"
6062#endif
6063/* We use char because int might match the return type of a gcc2
6064 builtin and then its argument prototype would still apply. */
6065char dnet_ntoa ();
98418dba
CW
6066int
6067main ()
6068{
6069dnet_ntoa ();
6070 ;
6071 return 0;
6072}
6073_ACEOF
6074rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 6075if { (eval echo "$as_me:6075: \"$ac_link\"") >&5
98418dba
CW
6076 (eval $ac_link) 2>&5
6077 ac_status=$?
925c2f3f 6078 echo "$as_me:6078: \$? = $ac_status" >&5
98418dba
CW
6079 (exit $ac_status); } &&
6080 { ac_try='test -s conftest$ac_exeext'
925c2f3f 6081 { (eval echo "$as_me:6081: \"$ac_try\"") >&5
98418dba
CW
6082 (eval $ac_try) 2>&5
6083 ac_status=$?
925c2f3f 6084 echo "$as_me:6084: \$? = $ac_status" >&5
98418dba
CW
6085 (exit $ac_status); }; }; then
6086 ac_cv_lib_dnet_dnet_ntoa=yes
6087else
6088 echo "$as_me: failed program was:" >&5
6089cat conftest.$ac_ext >&5
6090ac_cv_lib_dnet_dnet_ntoa=no
6091fi
6092rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6093LIBS=$ac_check_lib_save_LIBS
6094fi
925c2f3f 6095echo "$as_me:6095: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
98418dba
CW
6096echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
6097if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
925c2f3f 6098 cat >>confdefs.h <<EOF
98418dba 6099#define HAVE_LIBDNET 1
925c2f3f 6100EOF
98418dba
CW
6101
6102 LIBS="-ldnet $LIBS"
6103
6104fi
6105
925c2f3f 6106echo "$as_me:6106: checking for main in -lXbsd" >&5
98418dba
CW
6107echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6
6108if test "${ac_cv_lib_Xbsd_main+set}" = set; then
6109 echo $ECHO_N "(cached) $ECHO_C" >&6
6110else
6111 ac_check_lib_save_LIBS=$LIBS
6112LIBS="-lXbsd $LIBS"
6113cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6114#line 6114 "configure"
98418dba
CW
6115#include "confdefs.h"
6116
98418dba
CW
6117int
6118main ()
6119{
6120main ();
6121 ;
6122 return 0;
6123}
6124_ACEOF
6125rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 6126if { (eval echo "$as_me:6126: \"$ac_link\"") >&5
98418dba
CW
6127 (eval $ac_link) 2>&5
6128 ac_status=$?
925c2f3f 6129 echo "$as_me:6129: \$? = $ac_status" >&5
98418dba
CW
6130 (exit $ac_status); } &&
6131 { ac_try='test -s conftest$ac_exeext'
925c2f3f 6132 { (eval echo "$as_me:6132: \"$ac_try\"") >&5
98418dba
CW
6133 (eval $ac_try) 2>&5
6134 ac_status=$?
925c2f3f 6135 echo "$as_me:6135: \$? = $ac_status" >&5
98418dba
CW
6136 (exit $ac_status); }; }; then
6137 ac_cv_lib_Xbsd_main=yes
6138else
6139 echo "$as_me: failed program was:" >&5
6140cat conftest.$ac_ext >&5
6141ac_cv_lib_Xbsd_main=no
6142fi
6143rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6144LIBS=$ac_check_lib_save_LIBS
6145fi
925c2f3f 6146echo "$as_me:6146: result: $ac_cv_lib_Xbsd_main" >&5
98418dba
CW
6147echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6
6148if test $ac_cv_lib_Xbsd_main = yes; then
6149 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
6150fi
6151
925c2f3f 6152echo "$as_me:6152: checking for cma_open in -lpthreads" >&5
98418dba
CW
6153echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6
6154if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
6155 echo $ECHO_N "(cached) $ECHO_C" >&6
6156else
6157 ac_check_lib_save_LIBS=$LIBS
6158LIBS="-lpthreads $LIBS"
6159cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6160#line 6160 "configure"
98418dba
CW
6161#include "confdefs.h"
6162
6163/* Override any gcc2 internal prototype to avoid an error. */
6164#ifdef __cplusplus
6165extern "C"
6166#endif
6167/* We use char because int might match the return type of a gcc2
6168 builtin and then its argument prototype would still apply. */
6169char cma_open ();
98418dba
CW
6170int
6171main ()
6172{
6173cma_open ();
6174 ;
6175 return 0;
6176}
6177_ACEOF
6178rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 6179if { (eval echo "$as_me:6179: \"$ac_link\"") >&5
98418dba
CW
6180 (eval $ac_link) 2>&5
6181 ac_status=$?
925c2f3f 6182 echo "$as_me:6182: \$? = $ac_status" >&5
98418dba
CW
6183 (exit $ac_status); } &&
6184 { ac_try='test -s conftest$ac_exeext'
925c2f3f 6185 { (eval echo "$as_me:6185: \"$ac_try\"") >&5
98418dba
CW
6186 (eval $ac_try) 2>&5
6187 ac_status=$?
925c2f3f 6188 echo "$as_me:6188: \$? = $ac_status" >&5
98418dba
CW
6189 (exit $ac_status); }; }; then
6190 ac_cv_lib_pthreads_cma_open=yes
6191else
6192 echo "$as_me: failed program was:" >&5
6193cat conftest.$ac_ext >&5
6194ac_cv_lib_pthreads_cma_open=no
6195fi
6196rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6197LIBS=$ac_check_lib_save_LIBS
6198fi
925c2f3f 6199echo "$as_me:6199: result: $ac_cv_lib_pthreads_cma_open" >&5
98418dba
CW
6200echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6
6201if test $ac_cv_lib_pthreads_cma_open = yes; then
925c2f3f 6202 cat >>confdefs.h <<EOF
98418dba 6203#define HAVE_LIBPTHREADS 1
925c2f3f 6204EOF
98418dba
CW
6205
6206 LIBS="-lpthreads $LIBS"
6207
6208fi
6209
925c2f3f 6210echo "$as_me:6210: checking for XFree86 in /usr/X386" >&5
98418dba
CW
6211echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6
6212if test -d /usr/X386/include; then
6213 HAVE_XFREE386=yes
6214 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
6215else
6216 HAVE_XFREE386=no
6217fi
925c2f3f 6218echo "$as_me:6218: result: $HAVE_XFREE386" >&5
98418dba
CW
6219echo "${ECHO_T}$HAVE_XFREE386" >&6
6220
6221# Change CFLAGS temporarily so that C_SWITCH_X_SITE gets used
6222# for the tests that follow. We set it back to REAL_CFLAGS later on.
6223
6224REAL_CPPFLAGS="$CPPFLAGS"
6225
6226if test "${HAVE_X11}" = "yes"; then
6227 DEFS="$C_SWITCH_X_SITE $DEFS"
6228 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
6229 LIBS="$LIBX $LIBS"
6230 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
6231 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
6232
6233 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
6234 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
6235 # but it's more convenient here to set LD_RUN_PATH
6236 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
6237 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
6238 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
6239 export LD_RUN_PATH
6240 fi
6241
6242 if test "${opsys}" = "gnu-linux"; then
925c2f3f 6243 echo "$as_me:6243: checking whether X on GNU/Linux needs -b to link" >&5
98418dba
CW
6244echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6
6245 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6246#line 6246 "configure"
98418dba
CW
6247#include "confdefs.h"
6248
98418dba
CW
6249int
6250main ()
6251{
6252XOpenDisplay ("foo");
6253 ;
6254 return 0;
6255}
6256_ACEOF
6257rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 6258if { (eval echo "$as_me:6258: \"$ac_link\"") >&5
98418dba
CW
6259 (eval $ac_link) 2>&5
6260 ac_status=$?
925c2f3f 6261 echo "$as_me:6261: \$? = $ac_status" >&5
98418dba
CW
6262 (exit $ac_status); } &&
6263 { ac_try='test -s conftest$ac_exeext'
925c2f3f 6264 { (eval echo "$as_me:6264: \"$ac_try\"") >&5
98418dba
CW
6265 (eval $ac_try) 2>&5
6266 ac_status=$?
925c2f3f 6267 echo "$as_me:6267: \$? = $ac_status" >&5
98418dba
CW
6268 (exit $ac_status); }; }; then
6269 xlinux_first_failure=no
6270else
6271 echo "$as_me: failed program was:" >&5
6272cat conftest.$ac_ext >&5
6273xlinux_first_failure=yes
6274fi
6275rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6276 if test "${xlinux_first_failure}" = "yes"; then
6277 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
6278 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
6279 OLD_CPPFLAGS="$CPPFLAGS"
6280 OLD_LIBS="$LIBS"
6281 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
6282 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
6283 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
6284 LIBS="$LIBS -b i486-linuxaout"
6285 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6286#line 6286 "configure"
98418dba
CW
6287#include "confdefs.h"
6288
98418dba
CW
6289int
6290main ()
6291{
6292XOpenDisplay ("foo");
6293 ;
6294 return 0;
6295}
6296_ACEOF
6297rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 6298if { (eval echo "$as_me:6298: \"$ac_link\"") >&5
98418dba
CW
6299 (eval $ac_link) 2>&5
6300 ac_status=$?
925c2f3f 6301 echo "$as_me:6301: \$? = $ac_status" >&5
98418dba
CW
6302 (exit $ac_status); } &&
6303 { ac_try='test -s conftest$ac_exeext'
925c2f3f 6304 { (eval echo "$as_me:6304: \"$ac_try\"") >&5
98418dba
CW
6305 (eval $ac_try) 2>&5
6306 ac_status=$?
925c2f3f 6307 echo "$as_me:6307: \$? = $ac_status" >&5
98418dba
CW
6308 (exit $ac_status); }; }; then
6309 xlinux_second_failure=no
6310else
6311 echo "$as_me: failed program was:" >&5
6312cat conftest.$ac_ext >&5
6313xlinux_second_failure=yes
6314fi
6315rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6316 if test "${xlinux_second_failure}" = "yes"; then
6317 # If we get the same failure with -b, there is no use adding -b.
6318 # So take it out. This plays safe.
6319 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
6320 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
6321 CPPFLAGS="$OLD_CPPFLAGS"
6322 LIBS="$OLD_LIBS"
925c2f3f 6323 echo "$as_me:6323: result: no" >&5
98418dba
CW
6324echo "${ECHO_T}no" >&6
6325 else
925c2f3f 6326 echo "$as_me:6326: result: yes" >&5
98418dba
CW
6327echo "${ECHO_T}yes" >&6
6328 fi
6329 else
925c2f3f 6330 echo "$as_me:6330: result: no" >&5
98418dba
CW
6331echo "${ECHO_T}no" >&6
6332 fi
6333 fi
6334
6335 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
6336 # header files included from there.
925c2f3f 6337 echo "$as_me:6337: checking for Xkb" >&5
98418dba
CW
6338echo $ECHO_N "checking for Xkb... $ECHO_C" >&6
6339 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6340#line 6340 "configure"
98418dba
CW
6341#include "confdefs.h"
6342#include <X11/Xlib.h>
6343#include <X11/XKBlib.h>
98418dba
CW
6344int
6345main ()
6346{
6347XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
6348 ;
6349 return 0;
6350}
6351_ACEOF
6352rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 6353if { (eval echo "$as_me:6353: \"$ac_link\"") >&5
98418dba
CW
6354 (eval $ac_link) 2>&5
6355 ac_status=$?
925c2f3f 6356 echo "$as_me:6356: \$? = $ac_status" >&5
98418dba
CW
6357 (exit $ac_status); } &&
6358 { ac_try='test -s conftest$ac_exeext'
925c2f3f 6359 { (eval echo "$as_me:6359: \"$ac_try\"") >&5
98418dba
CW
6360 (eval $ac_try) 2>&5
6361 ac_status=$?
925c2f3f 6362 echo "$as_me:6362: \$? = $ac_status" >&5
98418dba
CW
6363 (exit $ac_status); }; }; then
6364 emacs_xkb=yes
6365else
6366 echo "$as_me: failed program was:" >&5
6367cat conftest.$ac_ext >&5
6368emacs_xkb=no
6369fi
6370rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
925c2f3f 6371 echo "$as_me:6371: result: $emacs_xkb" >&5
98418dba
CW
6372echo "${ECHO_T}$emacs_xkb" >&6
6373 if test $emacs_xkb = yes; then
b936fae4 6374
925c2f3f 6375cat >>confdefs.h <<\EOF
98418dba 6376#define HAVE_XKBGETKEYBOARD 1
925c2f3f 6377EOF
98418dba
CW
6378
6379 fi
6380
98418dba
CW
6381for ac_func in XrmSetDatabase XScreenResourceString \
6382XScreenNumberOfScreen XSetWMProtocols
6383do
6384as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
925c2f3f 6385echo "$as_me:6385: checking for $ac_func" >&5
98418dba
CW
6386echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6387if eval "test \"\${$as_ac_var+set}\" = set"; then
6388 echo $ECHO_N "(cached) $ECHO_C" >&6
6389else
6390 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6391#line 6391 "configure"
98418dba
CW
6392#include "confdefs.h"
6393/* System header to define __stub macros and hopefully few prototypes,
6394 which can conflict with char $ac_func (); below. */
6395#include <assert.h>
6396/* Override any gcc2 internal prototype to avoid an error. */
6397#ifdef __cplusplus
6398extern "C"
6399#endif
6400/* We use char because int might match the return type of a gcc2
6401 builtin and then its argument prototype would still apply. */
6402char $ac_func ();
6403char (*f) ();
6404
98418dba
CW
6405int
6406main ()
6407{
6408/* The GNU C library defines this for functions which it implements
6409 to always fail with ENOSYS. Some functions are actually named
6410 something starting with __ and the normal name is an alias. */
6411#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6412choke me
6413#else
6414f = $ac_func;
6415#endif
6416
6417 ;
6418 return 0;
6419}
6420_ACEOF
6421rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 6422if { (eval echo "$as_me:6422: \"$ac_link\"") >&5
98418dba
CW
6423 (eval $ac_link) 2>&5
6424 ac_status=$?
925c2f3f 6425 echo "$as_me:6425: \$? = $ac_status" >&5
98418dba
CW
6426 (exit $ac_status); } &&
6427 { ac_try='test -s conftest$ac_exeext'
925c2f3f 6428 { (eval echo "$as_me:6428: \"$ac_try\"") >&5
98418dba
CW
6429 (eval $ac_try) 2>&5
6430 ac_status=$?
925c2f3f 6431 echo "$as_me:6431: \$? = $ac_status" >&5
98418dba
CW
6432 (exit $ac_status); }; }; then
6433 eval "$as_ac_var=yes"
6434else
6435 echo "$as_me: failed program was:" >&5
6436cat conftest.$ac_ext >&5
6437eval "$as_ac_var=no"
6438fi
6439rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6440fi
925c2f3f 6441echo "$as_me:6441: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
6442echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6443if test `eval echo '${'$as_ac_var'}'` = yes; then
925c2f3f 6444 cat >>confdefs.h <<EOF
98418dba 6445#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
925c2f3f 6446EOF
98418dba
CW
6447
6448fi
6449done
6450
6451fi
6452
6453if test "${window_system}" = "x11"; then
925c2f3f 6454 echo "$as_me:6454: checking X11 version 6" >&5
98418dba
CW
6455echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6
6456 if test "${emacs_cv_x11_version_6+set}" = set; then
6457 echo $ECHO_N "(cached) $ECHO_C" >&6
6458else
6459 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6460#line 6460 "configure"
98418dba
CW
6461#include "confdefs.h"
6462#include <X11/Xlib.h>
98418dba
CW
6463int
6464main ()
6465{
6466#if XlibSpecificationRelease < 6
6467fail;
6468#endif
6469
6470 ;
6471 return 0;
6472}
6473_ACEOF
6474rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 6475if { (eval echo "$as_me:6475: \"$ac_link\"") >&5
98418dba
CW
6476 (eval $ac_link) 2>&5
6477 ac_status=$?
925c2f3f 6478 echo "$as_me:6478: \$? = $ac_status" >&5
98418dba
CW
6479 (exit $ac_status); } &&
6480 { ac_try='test -s conftest$ac_exeext'
925c2f3f 6481 { (eval echo "$as_me:6481: \"$ac_try\"") >&5
98418dba
CW
6482 (eval $ac_try) 2>&5
6483 ac_status=$?
925c2f3f 6484 echo "$as_me:6484: \$? = $ac_status" >&5
98418dba
CW
6485 (exit $ac_status); }; }; then
6486 emacs_cv_x11_version_6=yes
6487else
6488 echo "$as_me: failed program was:" >&5
6489cat conftest.$ac_ext >&5
6490emacs_cv_x11_version_6=no
6491fi
6492rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6493fi
6494
6495 if test $emacs_cv_x11_version_6 = yes; then
925c2f3f 6496 echo "$as_me:6496: result: 6 or newer" >&5
98418dba 6497echo "${ECHO_T}6 or newer" >&6
b936fae4 6498
925c2f3f 6499cat >>confdefs.h <<\EOF
98418dba 6500#define HAVE_X11R6 1
925c2f3f 6501EOF
98418dba
CW
6502
6503 else
925c2f3f 6504 echo "$as_me:6504: result: before 6" >&5
98418dba
CW
6505echo "${ECHO_T}before 6" >&6
6506 fi
6507fi
6508
6509if test "${window_system}" = "x11"; then
925c2f3f 6510 echo "$as_me:6510: checking X11 version 5" >&5
98418dba
CW
6511echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6
6512 if test "${emacs_cv_x11_version_5+set}" = set; then
6513 echo $ECHO_N "(cached) $ECHO_C" >&6
6514else
6515 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6516#line 6516 "configure"
98418dba
CW
6517#include "confdefs.h"
6518#include <X11/Xlib.h>
98418dba
CW
6519int
6520main ()
6521{
6522#if XlibSpecificationRelease < 5
6523fail;
6524#endif
6525
6526 ;
6527 return 0;
6528}
6529_ACEOF
6530rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 6531if { (eval echo "$as_me:6531: \"$ac_link\"") >&5
98418dba
CW
6532 (eval $ac_link) 2>&5
6533 ac_status=$?
925c2f3f 6534 echo "$as_me:6534: \$? = $ac_status" >&5
98418dba
CW
6535 (exit $ac_status); } &&
6536 { ac_try='test -s conftest$ac_exeext'
925c2f3f 6537 { (eval echo "$as_me:6537: \"$ac_try\"") >&5
98418dba
CW
6538 (eval $ac_try) 2>&5
6539 ac_status=$?
925c2f3f 6540 echo "$as_me:6540: \$? = $ac_status" >&5
98418dba
CW
6541 (exit $ac_status); }; }; then
6542 emacs_cv_x11_version_5=yes
6543else
6544 echo "$as_me: failed program was:" >&5
6545cat conftest.$ac_ext >&5
6546emacs_cv_x11_version_5=no
6547fi
6548rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6549fi
6550
6551 if test $emacs_cv_x11_version_5 = yes; then
925c2f3f 6552 echo "$as_me:6552: result: 5 or newer" >&5
98418dba
CW
6553echo "${ECHO_T}5 or newer" >&6
6554 HAVE_X11R5=yes
b936fae4 6555
925c2f3f 6556cat >>confdefs.h <<\EOF
98418dba 6557#define HAVE_X11R5 1
925c2f3f 6558EOF
98418dba
CW
6559
6560 else
6561 HAVE_X11R5=no
925c2f3f 6562 echo "$as_me:6562: result: before 5" >&5
98418dba
CW
6563echo "${ECHO_T}before 5" >&6
6564 fi
6565fi
6566
6567if test x"${USE_X_TOOLKIT}" = xmaybe; then
6568 if test x"${HAVE_X11R5}" = xyes; then
925c2f3f 6569 echo "$as_me:6569: checking X11 version 5 with Xaw" >&5
98418dba
CW
6570echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6
6571 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
6572 echo $ECHO_N "(cached) $ECHO_C" >&6
6573else
6574 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6575#line 6575 "configure"
98418dba
CW
6576#include "confdefs.h"
6577
6578#include <X11/Intrinsic.h>
6579#include <X11/Xaw/Simple.h>
98418dba
CW
6580int
6581main ()
6582{
6583
6584 ;
6585 return 0;
6586}
6587_ACEOF
6588rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 6589if { (eval echo "$as_me:6589: \"$ac_link\"") >&5
98418dba
CW
6590 (eval $ac_link) 2>&5
6591 ac_status=$?
925c2f3f 6592 echo "$as_me:6592: \$? = $ac_status" >&5
98418dba
CW
6593 (exit $ac_status); } &&
6594 { ac_try='test -s conftest$ac_exeext'
925c2f3f 6595 { (eval echo "$as_me:6595: \"$ac_try\"") >&5
98418dba
CW
6596 (eval $ac_try) 2>&5
6597 ac_status=$?
925c2f3f 6598 echo "$as_me:6598: \$? = $ac_status" >&5
98418dba
CW
6599 (exit $ac_status); }; }; then
6600 emacs_cv_x11_version_5_with_xaw=yes
6601else
6602 echo "$as_me: failed program was:" >&5
6603cat conftest.$ac_ext >&5
6604emacs_cv_x11_version_5_with_xaw=no
6605fi
6606rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6607fi
6608
6609 if test $emacs_cv_x11_version_5_with_xaw = yes; then
925c2f3f 6610 echo "$as_me:6610: result: 5 or newer, with Xaw; use toolkit by default" >&5
98418dba
CW
6611echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6
6612 USE_X_TOOLKIT=LUCID
6613 else
925c2f3f 6614 echo "$as_me:6614: result: before 5 or no Xaw; do not use toolkit by default" >&5
98418dba
CW
6615echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6
6616 USE_X_TOOLKIT=none
6617 fi
6618 else
6619 USE_X_TOOLKIT=none
6620 fi
6621fi
6622
6623X_TOOLKIT_TYPE=$USE_X_TOOLKIT
6624
6625if test "${USE_X_TOOLKIT}" != "none"; then
925c2f3f 6626 echo "$as_me:6626: checking X11 toolkit version" >&5
98418dba
CW
6627echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6
6628 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
6629 echo $ECHO_N "(cached) $ECHO_C" >&6
6630else
6631 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6632#line 6632 "configure"
98418dba
CW
6633#include "confdefs.h"
6634#include <X11/Intrinsic.h>
98418dba
CW
6635int
6636main ()
6637{
6638#if XtSpecificationRelease < 6
6639fail;
6640#endif
6641
6642 ;
6643 return 0;
6644}
6645_ACEOF
6646rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 6647if { (eval echo "$as_me:6647: \"$ac_link\"") >&5
98418dba
CW
6648 (eval $ac_link) 2>&5
6649 ac_status=$?
925c2f3f 6650 echo "$as_me:6650: \$? = $ac_status" >&5
98418dba
CW
6651 (exit $ac_status); } &&
6652 { ac_try='test -s conftest$ac_exeext'
925c2f3f 6653 { (eval echo "$as_me:6653: \"$ac_try\"") >&5
98418dba
CW
6654 (eval $ac_try) 2>&5
6655 ac_status=$?
925c2f3f 6656 echo "$as_me:6656: \$? = $ac_status" >&5
98418dba
CW
6657 (exit $ac_status); }; }; then
6658 emacs_cv_x11_toolkit_version_6=yes
6659else
6660 echo "$as_me: failed program was:" >&5
6661cat conftest.$ac_ext >&5
6662emacs_cv_x11_toolkit_version_6=no
6663fi
6664rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6665fi
6666
6667 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
6668 if test $emacs_cv_x11_toolkit_version_6 = yes; then
925c2f3f 6669 echo "$as_me:6669: result: 6 or newer" >&5
98418dba 6670echo "${ECHO_T}6 or newer" >&6
b936fae4 6671
925c2f3f 6672cat >>confdefs.h <<\EOF
98418dba 6673#define HAVE_X11XTR6 1
925c2f3f 6674EOF
98418dba
CW
6675
6676 else
925c2f3f 6677 echo "$as_me:6677: result: before 6" >&5
98418dba
CW
6678echo "${ECHO_T}before 6" >&6
6679 fi
6680
6681 OLDLIBS="$LIBS"
6682 if test x$HAVE_X11XTR6 = xyes; then
6683 LIBS="-lXt -lSM -lICE $LIBS"
6684 else
6685 LIBS="-lXt $LIBS"
6686 fi
6687
925c2f3f 6688echo "$as_me:6688: checking for XmuConvertStandardSelection in -lXmu" >&5
98418dba
CW
6689echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6
6690if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
6691 echo $ECHO_N "(cached) $ECHO_C" >&6
6692else
6693 ac_check_lib_save_LIBS=$LIBS
6694LIBS="-lXmu $LIBS"
6695cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6696#line 6696 "configure"
98418dba
CW
6697#include "confdefs.h"
6698
6699/* Override any gcc2 internal prototype to avoid an error. */
6700#ifdef __cplusplus
6701extern "C"
6702#endif
6703/* We use char because int might match the return type of a gcc2
6704 builtin and then its argument prototype would still apply. */
6705char XmuConvertStandardSelection ();
98418dba
CW
6706int
6707main ()
6708{
6709XmuConvertStandardSelection ();
6710 ;
6711 return 0;
6712}
6713_ACEOF
6714rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 6715if { (eval echo "$as_me:6715: \"$ac_link\"") >&5
98418dba
CW
6716 (eval $ac_link) 2>&5
6717 ac_status=$?
925c2f3f 6718 echo "$as_me:6718: \$? = $ac_status" >&5
98418dba
CW
6719 (exit $ac_status); } &&
6720 { ac_try='test -s conftest$ac_exeext'
925c2f3f 6721 { (eval echo "$as_me:6721: \"$ac_try\"") >&5
98418dba
CW
6722 (eval $ac_try) 2>&5
6723 ac_status=$?
925c2f3f 6724 echo "$as_me:6724: \$? = $ac_status" >&5
98418dba
CW
6725 (exit $ac_status); }; }; then
6726 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
6727else
6728 echo "$as_me: failed program was:" >&5
6729cat conftest.$ac_ext >&5
6730ac_cv_lib_Xmu_XmuConvertStandardSelection=no
6731fi
6732rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6733LIBS=$ac_check_lib_save_LIBS
6734fi
925c2f3f 6735echo "$as_me:6735: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
98418dba
CW
6736echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6
6737if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
925c2f3f 6738 cat >>confdefs.h <<EOF
98418dba 6739#define HAVE_LIBXMU 1
925c2f3f 6740EOF
98418dba
CW
6741
6742 LIBS="-lXmu $LIBS"
6743
6744fi
6745
6746 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
6747fi
6748
6749# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
6750if test "${HAVE_X11}" = "yes"; then
6751 if test "${USE_X_TOOLKIT}" != "none"; then
6752
925c2f3f 6753echo "$as_me:6753: checking for XShapeQueryExtension in -lXext" >&5
98418dba
CW
6754echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6
6755if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
6756 echo $ECHO_N "(cached) $ECHO_C" >&6
6757else
6758 ac_check_lib_save_LIBS=$LIBS
6759LIBS="-lXext $LIBS"
6760cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6761#line 6761 "configure"
98418dba
CW
6762#include "confdefs.h"
6763
6764/* Override any gcc2 internal prototype to avoid an error. */
6765#ifdef __cplusplus
6766extern "C"
6767#endif
6768/* We use char because int might match the return type of a gcc2
6769 builtin and then its argument prototype would still apply. */
6770char XShapeQueryExtension ();
98418dba
CW
6771int
6772main ()
6773{
6774XShapeQueryExtension ();
6775 ;
6776 return 0;
6777}
6778_ACEOF
6779rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 6780if { (eval echo "$as_me:6780: \"$ac_link\"") >&5
98418dba
CW
6781 (eval $ac_link) 2>&5
6782 ac_status=$?
925c2f3f 6783 echo "$as_me:6783: \$? = $ac_status" >&5
98418dba
CW
6784 (exit $ac_status); } &&
6785 { ac_try='test -s conftest$ac_exeext'
925c2f3f 6786 { (eval echo "$as_me:6786: \"$ac_try\"") >&5
98418dba
CW
6787 (eval $ac_try) 2>&5
6788 ac_status=$?
925c2f3f 6789 echo "$as_me:6789: \$? = $ac_status" >&5
98418dba
CW
6790 (exit $ac_status); }; }; then
6791 ac_cv_lib_Xext_XShapeQueryExtension=yes
6792else
6793 echo "$as_me: failed program was:" >&5
6794cat conftest.$ac_ext >&5
6795ac_cv_lib_Xext_XShapeQueryExtension=no
6796fi
6797rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6798LIBS=$ac_check_lib_save_LIBS
6799fi
925c2f3f 6800echo "$as_me:6800: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
98418dba
CW
6801echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6
6802if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
925c2f3f 6803 cat >>confdefs.h <<EOF
98418dba 6804#define HAVE_LIBXEXT 1
925c2f3f 6805EOF
98418dba
CW
6806
6807 LIBS="-lXext $LIBS"
6808
6809fi
6810
6811 fi
6812fi
6813
6814if test "${USE_X_TOOLKIT}" = "MOTIF"; then
925c2f3f 6815 echo "$as_me:6815: checking for Motif version 2.1" >&5
98418dba
CW
6816echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6
6817if test "${emacs_cv_motif_version_2_1+set}" = set; then
6818 echo $ECHO_N "(cached) $ECHO_C" >&6
6819else
6820 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6821#line 6821 "configure"
98418dba
CW
6822#include "confdefs.h"
6823#include <Xm/Xm.h>
98418dba
CW
6824int
6825main ()
6826{
6827#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
6828int x = 5;
6829#else
6830Motif version prior to 2.1.
6831#endif
6832 ;
6833 return 0;
6834}
6835_ACEOF
6836rm -f conftest.$ac_objext
925c2f3f 6837if { (eval echo "$as_me:6837: \"$ac_compile\"") >&5
98418dba
CW
6838 (eval $ac_compile) 2>&5
6839 ac_status=$?
925c2f3f 6840 echo "$as_me:6840: \$? = $ac_status" >&5
98418dba
CW
6841 (exit $ac_status); } &&
6842 { ac_try='test -s conftest.$ac_objext'
925c2f3f 6843 { (eval echo "$as_me:6843: \"$ac_try\"") >&5
98418dba
CW
6844 (eval $ac_try) 2>&5
6845 ac_status=$?
925c2f3f 6846 echo "$as_me:6846: \$? = $ac_status" >&5
98418dba
CW
6847 (exit $ac_status); }; }; then
6848 emacs_cv_motif_version_2_1=yes
6849else
6850 echo "$as_me: failed program was:" >&5
6851cat conftest.$ac_ext >&5
6852emacs_cv_motif_version_2_1=no
6853fi
6854rm -f conftest.$ac_objext conftest.$ac_ext
6855fi
925c2f3f 6856echo "$as_me:6856: result: $emacs_cv_motif_version_2_1" >&5
98418dba
CW
6857echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6
6858 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
6859 if test $emacs_cv_motif_version_2_1 = yes; then
6860 HAVE_LIBXP=no
b936fae4 6861
925c2f3f 6862cat >>confdefs.h <<\EOF
98418dba 6863#define HAVE_MOTIF_2_1 1
925c2f3f 6864EOF
98418dba 6865
925c2f3f 6866 echo "$as_me:6866: checking for XpCreateContext in -lXp" >&5
98418dba
CW
6867echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6
6868if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
6869 echo $ECHO_N "(cached) $ECHO_C" >&6
6870else
6871 ac_check_lib_save_LIBS=$LIBS
6872LIBS="-lXp $LIBS"
6873cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6874#line 6874 "configure"
98418dba
CW
6875#include "confdefs.h"
6876
6877/* Override any gcc2 internal prototype to avoid an error. */
6878#ifdef __cplusplus
6879extern "C"
6880#endif
6881/* We use char because int might match the return type of a gcc2
6882 builtin and then its argument prototype would still apply. */
6883char XpCreateContext ();
98418dba
CW
6884int
6885main ()
6886{
6887XpCreateContext ();
6888 ;
6889 return 0;
6890}
6891_ACEOF
6892rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 6893if { (eval echo "$as_me:6893: \"$ac_link\"") >&5
98418dba
CW
6894 (eval $ac_link) 2>&5
6895 ac_status=$?
925c2f3f 6896 echo "$as_me:6896: \$? = $ac_status" >&5
98418dba
CW
6897 (exit $ac_status); } &&
6898 { ac_try='test -s conftest$ac_exeext'
925c2f3f 6899 { (eval echo "$as_me:6899: \"$ac_try\"") >&5
98418dba
CW
6900 (eval $ac_try) 2>&5
6901 ac_status=$?
925c2f3f 6902 echo "$as_me:6902: \$? = $ac_status" >&5
98418dba
CW
6903 (exit $ac_status); }; }; then
6904 ac_cv_lib_Xp_XpCreateContext=yes
6905else
6906 echo "$as_me: failed program was:" >&5
6907cat conftest.$ac_ext >&5
6908ac_cv_lib_Xp_XpCreateContext=no
6909fi
6910rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6911LIBS=$ac_check_lib_save_LIBS
6912fi
925c2f3f 6913echo "$as_me:6913: result: $ac_cv_lib_Xp_XpCreateContext" >&5
98418dba
CW
6914echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6
6915if test $ac_cv_lib_Xp_XpCreateContext = yes; then
6916 HAVE_LIBXP=yes
6917fi
503d2be0 6918
98418dba 6919 if test ${HAVE_LIBXP} = yes; then
b936fae4 6920
925c2f3f 6921cat >>confdefs.h <<\EOF
98418dba 6922#define HAVE_LIBXP 1
925c2f3f 6923EOF
503d2be0 6924
98418dba
CW
6925 fi
6926 fi
6927fi
6928
6929### Is -lXaw3d available?
6930HAVE_XAW3D=no
6931if test "${HAVE_X11}" = "yes"; then
6932 if test "${USE_X_TOOLKIT}" != "none"; then
925c2f3f 6933 echo "$as_me:6933: checking for X11/Xaw3d/Scrollbar.h" >&5
98418dba
CW
6934echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6
6935if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
6936 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 6937else
925c2f3f
EZ
6938 cat >conftest.$ac_ext <<_ACEOF
6939#line 6939 "configure"
98418dba
CW
6940#include "confdefs.h"
6941#include <X11/Xaw3d/Scrollbar.h>
503d2be0 6942_ACEOF
925c2f3f 6943if { (eval echo "$as_me:6943: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
6944 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6945 ac_status=$?
6946 egrep -v '^ *\+' conftest.er1 >conftest.err
6947 rm -f conftest.er1
6948 cat conftest.err >&5
925c2f3f 6949 echo "$as_me:6949: \$? = $ac_status" >&5
503d2be0
AS
6950 (exit $ac_status); } >/dev/null; then
6951 if test -s conftest.err; then
6952 ac_cpp_err=$ac_c_preproc_warn_flag
6953 else
6954 ac_cpp_err=
6955 fi
6956else
6957 ac_cpp_err=yes
6958fi
6959if test -z "$ac_cpp_err"; then
925c2f3f 6960 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 6961else
503d2be0 6962 echo "$as_me: failed program was:" >&5
ba4481b5 6963 cat conftest.$ac_ext >&5
925c2f3f 6964 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 6965fi
503d2be0 6966rm -f conftest.err conftest.$ac_ext
98418dba 6967fi
925c2f3f 6968echo "$as_me:6968: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
98418dba 6969echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6
98418dba 6970if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
925c2f3f 6971 echo "$as_me:6971: checking for XawScrollbarSetThumb in -lXaw3d" >&5
98418dba
CW
6972echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6
6973if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
6974 echo $ECHO_N "(cached) $ECHO_C" >&6
6975else
6976 ac_check_lib_save_LIBS=$LIBS
6977LIBS="-lXaw3d $LIBS"
6978cat >conftest.$ac_ext <<_ACEOF
925c2f3f 6979#line 6979 "configure"
ba4481b5 6980#include "confdefs.h"
98418dba
CW
6981
6982/* Override any gcc2 internal prototype to avoid an error. */
6983#ifdef __cplusplus
6984extern "C"
6985#endif
6986/* We use char because int might match the return type of a gcc2
6987 builtin and then its argument prototype would still apply. */
6988char XawScrollbarSetThumb ();
503d2be0
AS
6989int
6990main ()
6991{
98418dba 6992XawScrollbarSetThumb ();
503d2be0
AS
6993 ;
6994 return 0;
6995}
6996_ACEOF
6997rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 6998if { (eval echo "$as_me:6998: \"$ac_link\"") >&5
503d2be0
AS
6999 (eval $ac_link) 2>&5
7000 ac_status=$?
925c2f3f 7001 echo "$as_me:7001: \$? = $ac_status" >&5
503d2be0
AS
7002 (exit $ac_status); } &&
7003 { ac_try='test -s conftest$ac_exeext'
925c2f3f 7004 { (eval echo "$as_me:7004: \"$ac_try\"") >&5
503d2be0
AS
7005 (eval $ac_try) 2>&5
7006 ac_status=$?
925c2f3f 7007 echo "$as_me:7007: \$? = $ac_status" >&5
503d2be0 7008 (exit $ac_status); }; }; then
98418dba 7009 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
ba4481b5 7010else
503d2be0
AS
7011 echo "$as_me: failed program was:" >&5
7012cat conftest.$ac_ext >&5
98418dba 7013ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
ba4481b5 7014fi
503d2be0 7015rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 7016LIBS=$ac_check_lib_save_LIBS
ba4481b5 7017fi
925c2f3f 7018echo "$as_me:7018: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
98418dba
CW
7019echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6
7020if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
7021 HAVE_XAW3D=yes
ba4481b5 7022fi
503d2be0 7023
ba4481b5
DL
7024fi
7025
98418dba 7026 if test "${HAVE_XAW3D}" = "yes"; then
b936fae4 7027
925c2f3f 7028cat >>confdefs.h <<\EOF
98418dba 7029#define HAVE_XAW3D 1
925c2f3f 7030EOF
98418dba 7031
ba4481b5 7032 fi
98418dba 7033 fi
ba4481b5
DL
7034fi
7035
98418dba
CW
7036USE_TOOLKIT_SCROLL_BARS=no
7037if test "${with_toolkit_scroll_bars}" != "no"; then
7038 if test "${USE_X_TOOLKIT}" != "none"; then
7039 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
925c2f3f 7040 cat >>confdefs.h <<\EOF
98418dba 7041#define USE_TOOLKIT_SCROLL_BARS 1
925c2f3f 7042EOF
98418dba
CW
7043
7044 HAVE_XAW3D=no
7045 USE_TOOLKIT_SCROLL_BARS=yes
7046 elif test "${HAVE_XAW3D}" = "yes"; then
925c2f3f 7047 cat >>confdefs.h <<\EOF
98418dba 7048#define USE_TOOLKIT_SCROLL_BARS 1
925c2f3f 7049EOF
98418dba
CW
7050
7051 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 7052 fi
ba4481b5
DL
7053 fi
7054fi
7055
98418dba 7056if test "${with_xim}" != "no"; then
b936fae4 7057
925c2f3f 7058cat >>confdefs.h <<\EOF
98418dba 7059#define USE_XIM 1
925c2f3f 7060EOF
98418dba
CW
7061
7062fi
7063
7064### Use -lXpm if available, unless `--with-xpm=no'.
7065HAVE_XPM=no
7066if test "${HAVE_X11}" = "yes"; then
7067 if test "${with_xpm}" != "no"; then
925c2f3f 7068 echo "$as_me:7068: checking for X11/xpm.h" >&5
98418dba
CW
7069echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
7070if test "${ac_cv_header_X11_xpm_h+set}" = set; then
7071 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 7072else
925c2f3f
EZ
7073 cat >conftest.$ac_ext <<_ACEOF
7074#line 7074 "configure"
98418dba
CW
7075#include "confdefs.h"
7076#include <X11/xpm.h>
7077_ACEOF
925c2f3f 7078if { (eval echo "$as_me:7078: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
7079 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7080 ac_status=$?
7081 egrep -v '^ *\+' conftest.er1 >conftest.err
7082 rm -f conftest.er1
7083 cat conftest.err >&5
925c2f3f 7084 echo "$as_me:7084: \$? = $ac_status" >&5
98418dba
CW
7085 (exit $ac_status); } >/dev/null; then
7086 if test -s conftest.err; then
7087 ac_cpp_err=$ac_c_preproc_warn_flag
7088 else
7089 ac_cpp_err=
7090 fi
7091else
7092 ac_cpp_err=yes
7093fi
7094if test -z "$ac_cpp_err"; then
925c2f3f 7095 ac_cv_header_X11_xpm_h=yes
98418dba
CW
7096else
7097 echo "$as_me: failed program was:" >&5
7098 cat conftest.$ac_ext >&5
925c2f3f 7099 ac_cv_header_X11_xpm_h=no
98418dba
CW
7100fi
7101rm -f conftest.err conftest.$ac_ext
ba4481b5 7102fi
925c2f3f 7103echo "$as_me:7103: result: $ac_cv_header_X11_xpm_h" >&5
98418dba 7104echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
98418dba 7105if test $ac_cv_header_X11_xpm_h = yes; then
925c2f3f 7106 echo "$as_me:7106: checking for XpmReadFileToPixmap in -lXpm" >&5
98418dba
CW
7107echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6
7108if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 7109 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7110else
98418dba
CW
7111 ac_check_lib_save_LIBS=$LIBS
7112LIBS="-lXpm -lX11 $LIBS"
7113cat >conftest.$ac_ext <<_ACEOF
925c2f3f 7114#line 7114 "configure"
ba4481b5 7115#include "confdefs.h"
98418dba 7116
ba4481b5 7117/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7118#ifdef __cplusplus
7119extern "C"
7120#endif
ba4481b5 7121/* We use char because int might match the return type of a gcc2
503d2be0 7122 builtin and then its argument prototype would still apply. */
98418dba 7123char XpmReadFileToPixmap ();
503d2be0
AS
7124int
7125main ()
7126{
98418dba 7127XpmReadFileToPixmap ();
503d2be0
AS
7128 ;
7129 return 0;
7130}
7131_ACEOF
7132rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 7133if { (eval echo "$as_me:7133: \"$ac_link\"") >&5
503d2be0
AS
7134 (eval $ac_link) 2>&5
7135 ac_status=$?
925c2f3f 7136 echo "$as_me:7136: \$? = $ac_status" >&5
503d2be0
AS
7137 (exit $ac_status); } &&
7138 { ac_try='test -s conftest$ac_exeext'
925c2f3f 7139 { (eval echo "$as_me:7139: \"$ac_try\"") >&5
503d2be0
AS
7140 (eval $ac_try) 2>&5
7141 ac_status=$?
925c2f3f 7142 echo "$as_me:7142: \$? = $ac_status" >&5
503d2be0 7143 (exit $ac_status); }; }; then
98418dba 7144 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
7145else
7146 echo "$as_me: failed program was:" >&5
7147cat conftest.$ac_ext >&5
98418dba 7148ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0
AS
7149fi
7150rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 7151LIBS=$ac_check_lib_save_LIBS
503d2be0 7152fi
925c2f3f 7153echo "$as_me:7153: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
98418dba
CW
7154echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6
7155if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
7156 HAVE_XPM=yes
ba4481b5
DL
7157fi
7158
98418dba
CW
7159fi
7160
98418dba 7161 if test "${HAVE_XPM}" = "yes"; then
925c2f3f 7162 echo "$as_me:7162: checking for XpmReturnAllocPixels preprocessor define" >&5
98418dba
CW
7163echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6
7164 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 7165#line 7165 "configure"
ba4481b5 7166#include "confdefs.h"
98418dba
CW
7167#include "X11/xpm.h"
7168#ifndef XpmReturnAllocPixels
7169no_return_alloc_pixels
503d2be0 7170#endif
ba4481b5 7171
98418dba
CW
7172_ACEOF
7173if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7174 egrep "no_return_alloc_pixels" >/dev/null 2>&1; then
7175 HAVE_XPM=no
7176else
7177 HAVE_XPM=yes
7178fi
7179rm -f conftest*
ba4481b5 7180
98418dba 7181 if test "${HAVE_XPM}" = "yes"; then
925c2f3f 7182 echo "$as_me:7182: result: yes" >&5
98418dba
CW
7183echo "${ECHO_T}yes" >&6
7184 else
925c2f3f 7185 echo "$as_me:7185: result: no" >&5
98418dba
CW
7186echo "${ECHO_T}no" >&6
7187 fi
7188 fi
7189 fi
7190
7191 if test "${HAVE_XPM}" = "yes"; then
b936fae4 7192
925c2f3f 7193cat >>confdefs.h <<\EOF
98418dba 7194#define HAVE_XPM 1
925c2f3f 7195EOF
98418dba
CW
7196
7197 fi
7198fi
7199
7200### Use -ljpeg if available, unless `--with-jpeg=no'.
7201HAVE_JPEG=no
7202if test "${HAVE_X11}" = "yes"; then
7203 if test "${with_jpeg}" != "no"; then
925c2f3f 7204 echo "$as_me:7204: checking for jerror.h" >&5
98418dba
CW
7205echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
7206if test "${ac_cv_header_jerror_h+set}" = set; then
7207 echo $ECHO_N "(cached) $ECHO_C" >&6
503d2be0 7208else
925c2f3f
EZ
7209 cat >conftest.$ac_ext <<_ACEOF
7210#line 7210 "configure"
98418dba
CW
7211#include "confdefs.h"
7212#include <jerror.h>
7213_ACEOF
925c2f3f 7214if { (eval echo "$as_me:7214: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
7215 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7216 ac_status=$?
7217 egrep -v '^ *\+' conftest.er1 >conftest.err
7218 rm -f conftest.er1
7219 cat conftest.err >&5
925c2f3f 7220 echo "$as_me:7220: \$? = $ac_status" >&5
98418dba
CW
7221 (exit $ac_status); } >/dev/null; then
7222 if test -s conftest.err; then
7223 ac_cpp_err=$ac_c_preproc_warn_flag
7224 else
7225 ac_cpp_err=
7226 fi
7227else
7228 ac_cpp_err=yes
503d2be0 7229fi
98418dba 7230if test -z "$ac_cpp_err"; then
925c2f3f 7231 ac_cv_header_jerror_h=yes
ba4481b5 7232else
98418dba
CW
7233 echo "$as_me: failed program was:" >&5
7234 cat conftest.$ac_ext >&5
925c2f3f 7235 ac_cv_header_jerror_h=no
98418dba
CW
7236fi
7237rm -f conftest.err conftest.$ac_ext
ba4481b5 7238fi
925c2f3f 7239echo "$as_me:7239: result: $ac_cv_header_jerror_h" >&5
98418dba 7240echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
98418dba 7241if test $ac_cv_header_jerror_h = yes; then
925c2f3f 7242 echo "$as_me:7242: checking for jpeg_destroy_compress in -ljpeg" >&5
98418dba
CW
7243echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6
7244if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 7245 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7246else
98418dba
CW
7247 ac_check_lib_save_LIBS=$LIBS
7248LIBS="-ljpeg $LIBS"
7249cat >conftest.$ac_ext <<_ACEOF
925c2f3f 7250#line 7250 "configure"
ba4481b5 7251#include "confdefs.h"
98418dba
CW
7252
7253/* Override any gcc2 internal prototype to avoid an error. */
7254#ifdef __cplusplus
7255extern "C"
7256#endif
7257/* We use char because int might match the return type of a gcc2
7258 builtin and then its argument prototype would still apply. */
7259char jpeg_destroy_compress ();
503d2be0
AS
7260int
7261main ()
7262{
98418dba 7263jpeg_destroy_compress ();
503d2be0
AS
7264 ;
7265 return 0;
7266}
7267_ACEOF
7268rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 7269if { (eval echo "$as_me:7269: \"$ac_link\"") >&5
503d2be0
AS
7270 (eval $ac_link) 2>&5
7271 ac_status=$?
925c2f3f 7272 echo "$as_me:7272: \$? = $ac_status" >&5
503d2be0
AS
7273 (exit $ac_status); } &&
7274 { ac_try='test -s conftest$ac_exeext'
925c2f3f 7275 { (eval echo "$as_me:7275: \"$ac_try\"") >&5
503d2be0
AS
7276 (eval $ac_try) 2>&5
7277 ac_status=$?
925c2f3f 7278 echo "$as_me:7278: \$? = $ac_status" >&5
503d2be0 7279 (exit $ac_status); }; }; then
98418dba 7280 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 7281else
503d2be0
AS
7282 echo "$as_me: failed program was:" >&5
7283cat conftest.$ac_ext >&5
98418dba 7284ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 7285fi
503d2be0 7286rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 7287LIBS=$ac_check_lib_save_LIBS
ba4481b5 7288fi
925c2f3f 7289echo "$as_me:7289: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
98418dba
CW
7290echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6
7291if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
7292 HAVE_JPEG=yes
ba4481b5 7293fi
98418dba 7294
ba4481b5 7295fi
98418dba 7296
ba4481b5 7297 fi
ba4481b5 7298
98418dba 7299 if test "${HAVE_JPEG}" = "yes"; then
925c2f3f 7300 cat >>confdefs.h <<\EOF
98418dba 7301#define HAVE_JPEG 1
925c2f3f 7302EOF
98418dba
CW
7303
7304 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 7305#line 7305 "configure"
98418dba
CW
7306#include "confdefs.h"
7307 #include <jpeglib.h>
7308 version=JPEG_LIB_VERSION
7309
7310_ACEOF
7311if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7312 egrep "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
925c2f3f 7313 cat >>confdefs.h <<\EOF
98418dba 7314#define HAVE_JPEG 1
925c2f3f 7315EOF
ba4481b5 7316
98418dba 7317else
925c2f3f 7318 { echo "$as_me:7318: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
7319echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
7320 HAVE_JPEG=no
ba4481b5 7321fi
98418dba 7322rm -f conftest*
ba4481b5 7323
98418dba
CW
7324 fi
7325fi
503d2be0 7326
98418dba
CW
7327### Use -lpng if available, unless `--with-png=no'.
7328HAVE_PNG=no
7329if test "${HAVE_X11}" = "yes"; then
7330 if test "${with_png}" != "no"; then
925c2f3f 7331 echo "$as_me:7331: checking for png.h" >&5
98418dba
CW
7332echo $ECHO_N "checking for png.h... $ECHO_C" >&6
7333if test "${ac_cv_header_png_h+set}" = set; then
503d2be0
AS
7334 echo $ECHO_N "(cached) $ECHO_C" >&6
7335else
925c2f3f
EZ
7336 cat >conftest.$ac_ext <<_ACEOF
7337#line 7337 "configure"
503d2be0 7338#include "confdefs.h"
98418dba 7339#include <png.h>
503d2be0 7340_ACEOF
925c2f3f 7341if { (eval echo "$as_me:7341: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
7342 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7343 ac_status=$?
7344 egrep -v '^ *\+' conftest.er1 >conftest.err
7345 rm -f conftest.er1
7346 cat conftest.err >&5
925c2f3f 7347 echo "$as_me:7347: \$? = $ac_status" >&5
503d2be0
AS
7348 (exit $ac_status); } >/dev/null; then
7349 if test -s conftest.err; then
7350 ac_cpp_err=$ac_c_preproc_warn_flag
7351 else
7352 ac_cpp_err=
7353 fi
7354else
7355 ac_cpp_err=yes
7356fi
7357if test -z "$ac_cpp_err"; then
925c2f3f 7358 ac_cv_header_png_h=yes
503d2be0
AS
7359else
7360 echo "$as_me: failed program was:" >&5
ba4481b5 7361 cat conftest.$ac_ext >&5
925c2f3f 7362 ac_cv_header_png_h=no
ba4481b5 7363fi
503d2be0 7364rm -f conftest.err conftest.$ac_ext
ba4481b5 7365fi
925c2f3f 7366echo "$as_me:7366: result: $ac_cv_header_png_h" >&5
98418dba 7367echo "${ECHO_T}$ac_cv_header_png_h" >&6
98418dba 7368if test $ac_cv_header_png_h = yes; then
925c2f3f 7369 echo "$as_me:7369: checking for png_get_channels in -lpng" >&5
98418dba
CW
7370echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6
7371if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 7372 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7373else
98418dba
CW
7374 ac_check_lib_save_LIBS=$LIBS
7375LIBS="-lpng -lz -lm $LIBS"
7376cat >conftest.$ac_ext <<_ACEOF
925c2f3f 7377#line 7377 "configure"
ba4481b5 7378#include "confdefs.h"
98418dba 7379
ba4481b5 7380/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7381#ifdef __cplusplus
7382extern "C"
7383#endif
ba4481b5 7384/* We use char because int might match the return type of a gcc2
503d2be0 7385 builtin and then its argument prototype would still apply. */
98418dba 7386char png_get_channels ();
503d2be0
AS
7387int
7388main ()
7389{
98418dba 7390png_get_channels ();
503d2be0
AS
7391 ;
7392 return 0;
7393}
7394_ACEOF
7395rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 7396if { (eval echo "$as_me:7396: \"$ac_link\"") >&5
503d2be0
AS
7397 (eval $ac_link) 2>&5
7398 ac_status=$?
925c2f3f 7399 echo "$as_me:7399: \$? = $ac_status" >&5
98418dba
CW
7400 (exit $ac_status); } &&
7401 { ac_try='test -s conftest$ac_exeext'
925c2f3f 7402 { (eval echo "$as_me:7402: \"$ac_try\"") >&5
503d2be0
AS
7403 (eval $ac_try) 2>&5
7404 ac_status=$?
925c2f3f 7405 echo "$as_me:7405: \$? = $ac_status" >&5
503d2be0 7406 (exit $ac_status); }; }; then
98418dba 7407 ac_cv_lib_png_png_get_channels=yes
73b77ee5 7408else
98418dba 7409 echo "$as_me: failed program was:" >&5
503d2be0 7410cat conftest.$ac_ext >&5
98418dba 7411ac_cv_lib_png_png_get_channels=no
73b77ee5 7412fi
98418dba
CW
7413rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7414LIBS=$ac_check_lib_save_LIBS
73b77ee5 7415fi
925c2f3f 7416echo "$as_me:7416: result: $ac_cv_lib_png_png_get_channels" >&5
98418dba
CW
7417echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6
7418if test $ac_cv_lib_png_png_get_channels = yes; then
7419 HAVE_PNG=yes
73b77ee5 7420fi
503d2be0 7421
98418dba
CW
7422fi
7423
98418dba
CW
7424 fi
7425
7426 if test "${HAVE_PNG}" = "yes"; then
b936fae4 7427
925c2f3f 7428cat >>confdefs.h <<\EOF
98418dba 7429#define HAVE_PNG 1
925c2f3f 7430EOF
73b77ee5 7431
98418dba 7432 fi
73b77ee5
GM
7433fi
7434
98418dba
CW
7435### Use -ltiff if available, unless `--with-tiff=no'.
7436HAVE_TIFF=no
7437if test "${HAVE_X11}" = "yes"; then
7438 if test "${with_tiff}" != "no"; then
925c2f3f 7439 echo "$as_me:7439: checking for tiffio.h" >&5
98418dba
CW
7440echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
7441if test "${ac_cv_header_tiffio_h+set}" = set; then
7442 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 7443else
925c2f3f
EZ
7444 cat >conftest.$ac_ext <<_ACEOF
7445#line 7445 "configure"
98418dba
CW
7446#include "confdefs.h"
7447#include <tiffio.h>
7448_ACEOF
925c2f3f 7449if { (eval echo "$as_me:7449: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
7450 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7451 ac_status=$?
7452 egrep -v '^ *\+' conftest.er1 >conftest.err
7453 rm -f conftest.er1
7454 cat conftest.err >&5
925c2f3f 7455 echo "$as_me:7455: \$? = $ac_status" >&5
98418dba
CW
7456 (exit $ac_status); } >/dev/null; then
7457 if test -s conftest.err; then
7458 ac_cpp_err=$ac_c_preproc_warn_flag
7459 else
7460 ac_cpp_err=
7461 fi
7462else
7463 ac_cpp_err=yes
7464fi
7465if test -z "$ac_cpp_err"; then
925c2f3f 7466 ac_cv_header_tiffio_h=yes
98418dba
CW
7467else
7468 echo "$as_me: failed program was:" >&5
7469 cat conftest.$ac_ext >&5
925c2f3f 7470 ac_cv_header_tiffio_h=no
98418dba
CW
7471fi
7472rm -f conftest.err conftest.$ac_ext
98418dba 7473fi
925c2f3f 7474echo "$as_me:7474: result: $ac_cv_header_tiffio_h" >&5
98418dba 7475echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
98418dba
CW
7476if test $ac_cv_header_tiffio_h = yes; then
7477 tifflibs="-lz -lm"
7478 # At least one tiff package requires the jpeg library.
7479 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
925c2f3f 7480 echo "$as_me:7480: checking for TIFFGetVersion in -ltiff" >&5
98418dba
CW
7481echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6
7482if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 7483 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 7484else
503d2be0 7485 ac_check_lib_save_LIBS=$LIBS
98418dba 7486LIBS="-ltiff $tifflibs $LIBS"
503d2be0 7487cat >conftest.$ac_ext <<_ACEOF
925c2f3f 7488#line 7488 "configure"
73b77ee5 7489#include "confdefs.h"
503d2be0 7490
73b77ee5 7491/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7492#ifdef __cplusplus
7493extern "C"
7494#endif
73b77ee5 7495/* We use char because int might match the return type of a gcc2
503d2be0 7496 builtin and then its argument prototype would still apply. */
98418dba 7497char TIFFGetVersion ();
503d2be0
AS
7498int
7499main ()
7500{
98418dba 7501TIFFGetVersion ();
503d2be0
AS
7502 ;
7503 return 0;
7504}
7505_ACEOF
7506rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 7507if { (eval echo "$as_me:7507: \"$ac_link\"") >&5
503d2be0
AS
7508 (eval $ac_link) 2>&5
7509 ac_status=$?
925c2f3f 7510 echo "$as_me:7510: \$? = $ac_status" >&5
503d2be0
AS
7511 (exit $ac_status); } &&
7512 { ac_try='test -s conftest$ac_exeext'
925c2f3f 7513 { (eval echo "$as_me:7513: \"$ac_try\"") >&5
503d2be0
AS
7514 (eval $ac_try) 2>&5
7515 ac_status=$?
925c2f3f 7516 echo "$as_me:7516: \$? = $ac_status" >&5
503d2be0 7517 (exit $ac_status); }; }; then
98418dba 7518 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
7519else
7520 echo "$as_me: failed program was:" >&5
7521cat conftest.$ac_ext >&5
98418dba 7522ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0
AS
7523fi
7524rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7525LIBS=$ac_check_lib_save_LIBS
7526fi
925c2f3f 7527echo "$as_me:7527: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
98418dba
CW
7528echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6
7529if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
7530 HAVE_TIFF=yes
7531fi
7532
7533fi
73b77ee5 7534
98418dba
CW
7535 fi
7536
7537 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 7538
925c2f3f 7539cat >>confdefs.h <<\EOF
98418dba 7540#define HAVE_TIFF 1
925c2f3f 7541EOF
98418dba
CW
7542
7543 fi
73b77ee5
GM
7544fi
7545
98418dba
CW
7546### Use -lgif if available, unless `--with-gif=no'.
7547HAVE_GIF=no
7548if test "${HAVE_X11}" = "yes"; then
7549 if test "${with_gif}" != "no"; then
925c2f3f 7550 echo "$as_me:7550: checking for gif_lib.h" >&5
98418dba
CW
7551echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
7552if test "${ac_cv_header_gif_lib_h+set}" = set; then
7553 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 7554else
925c2f3f
EZ
7555 cat >conftest.$ac_ext <<_ACEOF
7556#line 7556 "configure"
98418dba
CW
7557#include "confdefs.h"
7558#include <gif_lib.h>
7559_ACEOF
925c2f3f 7560if { (eval echo "$as_me:7560: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
7561 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7562 ac_status=$?
7563 egrep -v '^ *\+' conftest.er1 >conftest.err
7564 rm -f conftest.er1
7565 cat conftest.err >&5
925c2f3f 7566 echo "$as_me:7566: \$? = $ac_status" >&5
98418dba
CW
7567 (exit $ac_status); } >/dev/null; then
7568 if test -s conftest.err; then
7569 ac_cpp_err=$ac_c_preproc_warn_flag
7570 else
7571 ac_cpp_err=
7572 fi
7573else
7574 ac_cpp_err=yes
7575fi
7576if test -z "$ac_cpp_err"; then
925c2f3f 7577 ac_cv_header_gif_lib_h=yes
98418dba
CW
7578else
7579 echo "$as_me: failed program was:" >&5
7580 cat conftest.$ac_ext >&5
925c2f3f 7581 ac_cv_header_gif_lib_h=no
98418dba
CW
7582fi
7583rm -f conftest.err conftest.$ac_ext
98418dba 7584fi
925c2f3f 7585echo "$as_me:7585: result: $ac_cv_header_gif_lib_h" >&5
98418dba 7586echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
98418dba
CW
7587if test $ac_cv_header_gif_lib_h = yes; then
7588 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
7589# Earlier versions can crash Emacs.
925c2f3f 7590 echo "$as_me:7590: checking for EGifPutExtensionLast in -lungif" >&5
98418dba
CW
7591echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6
7592if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
503d2be0 7593 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 7594else
503d2be0 7595 ac_check_lib_save_LIBS=$LIBS
98418dba 7596LIBS="-lungif $LIBS"
503d2be0 7597cat >conftest.$ac_ext <<_ACEOF
925c2f3f 7598#line 7598 "configure"
73b77ee5
GM
7599#include "confdefs.h"
7600
98418dba
CW
7601/* Override any gcc2 internal prototype to avoid an error. */
7602#ifdef __cplusplus
7603extern "C"
7604#endif
7605/* We use char because int might match the return type of a gcc2
7606 builtin and then its argument prototype would still apply. */
7607char EGifPutExtensionLast ();
503d2be0
AS
7608int
7609main ()
7610{
98418dba 7611EGifPutExtensionLast ();
503d2be0
AS
7612 ;
7613 return 0;
7614}
7615_ACEOF
7616rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 7617if { (eval echo "$as_me:7617: \"$ac_link\"") >&5
503d2be0
AS
7618 (eval $ac_link) 2>&5
7619 ac_status=$?
925c2f3f 7620 echo "$as_me:7620: \$? = $ac_status" >&5
98418dba
CW
7621 (exit $ac_status); } &&
7622 { ac_try='test -s conftest$ac_exeext'
925c2f3f 7623 { (eval echo "$as_me:7623: \"$ac_try\"") >&5
98418dba
CW
7624 (eval $ac_try) 2>&5
7625 ac_status=$?
925c2f3f 7626 echo "$as_me:7626: \$? = $ac_status" >&5
98418dba
CW
7627 (exit $ac_status); }; }; then
7628 ac_cv_lib_ungif_EGifPutExtensionLast=yes
7629else
7630 echo "$as_me: failed program was:" >&5
7631cat conftest.$ac_ext >&5
7632ac_cv_lib_ungif_EGifPutExtensionLast=no
7633fi
7634rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7635LIBS=$ac_check_lib_save_LIBS
7636fi
925c2f3f 7637echo "$as_me:7637: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
98418dba
CW
7638echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6
7639if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
7640 HAVE_GIF=yes
7641fi
7642
7643fi
7644
98418dba
CW
7645 fi
7646
7647 if test "${HAVE_GIF}" = "yes"; then
b936fae4 7648
925c2f3f 7649cat >>confdefs.h <<\EOF
98418dba 7650#define HAVE_GIF 1
925c2f3f 7651EOF
98418dba
CW
7652
7653 fi
7654fi
7655
925c2f3f
EZ
7656### Use Mac OS X Carbon API to implement GUI.
7657HAVE_CARBON=no
7658if test "${with_carbon}" != "no"; then
7659 echo "$as_me:7659: checking for Carbon/Carbon.h" >&5
7660echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
7661if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
7662 echo $ECHO_N "(cached) $ECHO_C" >&6
7663else
7664 cat >conftest.$ac_ext <<_ACEOF
7665#line 7665 "configure"
e0f712ba
AC
7666#include "confdefs.h"
7667#include <Carbon/Carbon.h>
7668_ACEOF
925c2f3f 7669if { (eval echo "$as_me:7669: \"$ac_cpp conftest.$ac_ext\"") >&5
e0f712ba
AC
7670 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7671 ac_status=$?
7672 egrep -v '^ *\+' conftest.er1 >conftest.err
7673 rm -f conftest.er1
7674 cat conftest.err >&5
925c2f3f 7675 echo "$as_me:7675: \$? = $ac_status" >&5
e0f712ba
AC
7676 (exit $ac_status); } >/dev/null; then
7677 if test -s conftest.err; then
7678 ac_cpp_err=$ac_c_preproc_warn_flag
7679 else
7680 ac_cpp_err=
7681 fi
7682else
7683 ac_cpp_err=yes
7684fi
7685if test -z "$ac_cpp_err"; then
925c2f3f 7686 ac_cv_header_Carbon_Carbon_h=yes
e0f712ba
AC
7687else
7688 echo "$as_me: failed program was:" >&5
7689 cat conftest.$ac_ext >&5
925c2f3f 7690 ac_cv_header_Carbon_Carbon_h=no
e0f712ba
AC
7691fi
7692rm -f conftest.err conftest.$ac_ext
e0f712ba 7693fi
925c2f3f 7694echo "$as_me:7694: result: $ac_cv_header_Carbon_Carbon_h" >&5
e0f712ba 7695echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
e0f712ba
AC
7696if test $ac_cv_header_Carbon_Carbon_h = yes; then
7697 HAVE_CARBON=yes
7698fi
7699
e0f712ba
AC
7700fi
7701
7702if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 7703
925c2f3f 7704cat >>confdefs.h <<\EOF
e0f712ba 7705#define HAVE_CARBON 1
925c2f3f 7706EOF
e0f712ba
AC
7707
7708fi
7709
98418dba
CW
7710### Use session management (-lSM -lICE) if available
7711HAVE_X_SM=no
7712if test "${HAVE_X11}" = "yes"; then
925c2f3f 7713 echo "$as_me:7713: checking for X11/SM/SMlib.h" >&5
98418dba
CW
7714echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
7715if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
7716 echo $ECHO_N "(cached) $ECHO_C" >&6
503d2be0 7717else
925c2f3f
EZ
7718 cat >conftest.$ac_ext <<_ACEOF
7719#line 7719 "configure"
98418dba
CW
7720#include "confdefs.h"
7721#include <X11/SM/SMlib.h>
7722_ACEOF
925c2f3f 7723if { (eval echo "$as_me:7723: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
7724 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7725 ac_status=$?
7726 egrep -v '^ *\+' conftest.er1 >conftest.err
7727 rm -f conftest.er1
7728 cat conftest.err >&5
925c2f3f 7729 echo "$as_me:7729: \$? = $ac_status" >&5
98418dba
CW
7730 (exit $ac_status); } >/dev/null; then
7731 if test -s conftest.err; then
7732 ac_cpp_err=$ac_c_preproc_warn_flag
7733 else
7734 ac_cpp_err=
7735 fi
7736else
7737 ac_cpp_err=yes
503d2be0 7738fi
98418dba 7739if test -z "$ac_cpp_err"; then
925c2f3f 7740 ac_cv_header_X11_SM_SMlib_h=yes
98418dba
CW
7741else
7742 echo "$as_me: failed program was:" >&5
7743 cat conftest.$ac_ext >&5
925c2f3f 7744 ac_cv_header_X11_SM_SMlib_h=no
98418dba
CW
7745fi
7746rm -f conftest.err conftest.$ac_ext
73b77ee5 7747fi
925c2f3f 7748echo "$as_me:7748: result: $ac_cv_header_X11_SM_SMlib_h" >&5
98418dba 7749echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
98418dba 7750if test $ac_cv_header_X11_SM_SMlib_h = yes; then
925c2f3f 7751 echo "$as_me:7751: checking for SmcOpenConnection in -lSM" >&5
98418dba
CW
7752echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6
7753if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 7754 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 7755else
503d2be0 7756 ac_check_lib_save_LIBS=$LIBS
98418dba 7757LIBS="-lSM $LIBS"
503d2be0 7758cat >conftest.$ac_ext <<_ACEOF
925c2f3f 7759#line 7759 "configure"
73b77ee5 7760#include "confdefs.h"
503d2be0 7761
73b77ee5 7762/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7763#ifdef __cplusplus
7764extern "C"
7765#endif
73b77ee5 7766/* We use char because int might match the return type of a gcc2
503d2be0 7767 builtin and then its argument prototype would still apply. */
98418dba 7768char SmcOpenConnection ();
503d2be0
AS
7769int
7770main ()
7771{
98418dba 7772SmcOpenConnection ();
503d2be0
AS
7773 ;
7774 return 0;
7775}
7776_ACEOF
7777rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 7778if { (eval echo "$as_me:7778: \"$ac_link\"") >&5
503d2be0
AS
7779 (eval $ac_link) 2>&5
7780 ac_status=$?
925c2f3f 7781 echo "$as_me:7781: \$? = $ac_status" >&5
503d2be0
AS
7782 (exit $ac_status); } &&
7783 { ac_try='test -s conftest$ac_exeext'
925c2f3f 7784 { (eval echo "$as_me:7784: \"$ac_try\"") >&5
503d2be0
AS
7785 (eval $ac_try) 2>&5
7786 ac_status=$?
925c2f3f 7787 echo "$as_me:7787: \$? = $ac_status" >&5
503d2be0 7788 (exit $ac_status); }; }; then
98418dba 7789 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
7790else
7791 echo "$as_me: failed program was:" >&5
7792cat conftest.$ac_ext >&5
98418dba 7793ac_cv_lib_SM_SmcOpenConnection=no
503d2be0
AS
7794fi
7795rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7796LIBS=$ac_check_lib_save_LIBS
7797fi
925c2f3f 7798echo "$as_me:7798: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
98418dba
CW
7799echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6
7800if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
7801 HAVE_X_SM=yes
7802else
7803 -lICE
73b77ee5
GM
7804fi
7805
73b77ee5 7806fi
73b77ee5 7807
98418dba 7808 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 7809
925c2f3f 7810cat >>confdefs.h <<\EOF
98418dba 7811#define HAVE_X_SM 1
925c2f3f 7812EOF
73b77ee5 7813
98418dba
CW
7814 case "$LIBS" in
7815 *-lSM*) ;;
7816 *) LIBS="-lSM -lICE $LIBS" ;;
7817 esac
73b77ee5 7818 fi
98418dba 7819fi
73b77ee5 7820
98418dba 7821# If netdb.h doesn't declare h_errno, we must declare it by hand.
925c2f3f 7822echo "$as_me:7822: checking whether netdb declares h_errno" >&5
98418dba
CW
7823echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6
7824if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
7825 echo $ECHO_N "(cached) $ECHO_C" >&6
7826else
7827 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 7828#line 7828 "configure"
73b77ee5 7829#include "confdefs.h"
98418dba 7830#include <netdb.h>
503d2be0
AS
7831int
7832main ()
7833{
98418dba 7834return h_errno;
503d2be0
AS
7835 ;
7836 return 0;
7837}
7838_ACEOF
7839rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 7840if { (eval echo "$as_me:7840: \"$ac_link\"") >&5
503d2be0
AS
7841 (eval $ac_link) 2>&5
7842 ac_status=$?
925c2f3f 7843 echo "$as_me:7843: \$? = $ac_status" >&5
503d2be0
AS
7844 (exit $ac_status); } &&
7845 { ac_try='test -s conftest$ac_exeext'
925c2f3f 7846 { (eval echo "$as_me:7846: \"$ac_try\"") >&5
503d2be0
AS
7847 (eval $ac_try) 2>&5
7848 ac_status=$?
925c2f3f 7849 echo "$as_me:7849: \$? = $ac_status" >&5
503d2be0 7850 (exit $ac_status); }; }; then
98418dba 7851 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 7852else
503d2be0
AS
7853 echo "$as_me: failed program was:" >&5
7854cat conftest.$ac_ext >&5
98418dba 7855emacs_cv_netdb_declares_h_errno=no
73b77ee5 7856fi
503d2be0 7857rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 7858fi
925c2f3f 7859echo "$as_me:7859: result: $emacs_cv_netdb_declares_h_errno" >&5
98418dba
CW
7860echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6
7861if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 7862
925c2f3f 7863cat >>confdefs.h <<\EOF
98418dba 7864#define HAVE_H_ERRNO 1
925c2f3f 7865EOF
73b77ee5 7866
98418dba
CW
7867fi
7868
7869# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7870# for constant arguments. Useless!
925c2f3f 7871echo "$as_me:7871: checking for working alloca.h" >&5
98418dba
CW
7872echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
7873if test "${ac_cv_working_alloca_h+set}" = set; then
7874 echo $ECHO_N "(cached) $ECHO_C" >&6
7875else
7876 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 7877#line 7877 "configure"
98418dba
CW
7878#include "confdefs.h"
7879#include <alloca.h>
503d2be0
AS
7880int
7881main ()
7882{
98418dba 7883char *p = (char *) alloca (2 * sizeof (int));
503d2be0
AS
7884 ;
7885 return 0;
7886}
7887_ACEOF
7888rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 7889if { (eval echo "$as_me:7889: \"$ac_link\"") >&5
503d2be0
AS
7890 (eval $ac_link) 2>&5
7891 ac_status=$?
925c2f3f 7892 echo "$as_me:7892: \$? = $ac_status" >&5
503d2be0
AS
7893 (exit $ac_status); } &&
7894 { ac_try='test -s conftest$ac_exeext'
925c2f3f 7895 { (eval echo "$as_me:7895: \"$ac_try\"") >&5
503d2be0
AS
7896 (eval $ac_try) 2>&5
7897 ac_status=$?
925c2f3f 7898 echo "$as_me:7898: \$? = $ac_status" >&5
503d2be0 7899 (exit $ac_status); }; }; then
98418dba 7900 ac_cv_working_alloca_h=yes
73b77ee5 7901else
503d2be0
AS
7902 echo "$as_me: failed program was:" >&5
7903cat conftest.$ac_ext >&5
98418dba 7904ac_cv_working_alloca_h=no
73b77ee5 7905fi
503d2be0 7906rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 7907fi
925c2f3f 7908echo "$as_me:7908: result: $ac_cv_working_alloca_h" >&5
98418dba
CW
7909echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
7910if test $ac_cv_working_alloca_h = yes; then
73b77ee5 7911
925c2f3f 7912cat >>confdefs.h <<\EOF
98418dba 7913#define HAVE_ALLOCA_H 1
925c2f3f 7914EOF
98418dba
CW
7915
7916fi
7917
925c2f3f 7918echo "$as_me:7918: checking for alloca" >&5
98418dba
CW
7919echo $ECHO_N "checking for alloca... $ECHO_C" >&6
7920if test "${ac_cv_func_alloca_works+set}" = set; then
7921 echo $ECHO_N "(cached) $ECHO_C" >&6
7922else
503d2be0 7923 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 7924#line 7924 "configure"
ac95a621 7925#include "confdefs.h"
98418dba
CW
7926#ifdef __GNUC__
7927# define alloca __builtin_alloca
7928#else
7929# ifdef _MSC_VER
7930# include <malloc.h>
7931# define alloca _alloca
7932# else
7933# if HAVE_ALLOCA_H
7934# include <alloca.h>
7935# else
7936# ifdef _AIX
7937 #pragma alloca
7938# else
7939# ifndef alloca /* predefined by HP cc +Olibcalls */
7940char *alloca ();
7941# endif
7942# endif
7943# endif
7944# endif
7945#endif
7946
503d2be0
AS
7947int
7948main ()
7949{
98418dba 7950char *p = (char *) alloca (1);
503d2be0
AS
7951 ;
7952 return 0;
7953}
7954_ACEOF
7955rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 7956if { (eval echo "$as_me:7956: \"$ac_link\"") >&5
503d2be0
AS
7957 (eval $ac_link) 2>&5
7958 ac_status=$?
925c2f3f 7959 echo "$as_me:7959: \$? = $ac_status" >&5
503d2be0
AS
7960 (exit $ac_status); } &&
7961 { ac_try='test -s conftest$ac_exeext'
925c2f3f 7962 { (eval echo "$as_me:7962: \"$ac_try\"") >&5
503d2be0
AS
7963 (eval $ac_try) 2>&5
7964 ac_status=$?
925c2f3f 7965 echo "$as_me:7965: \$? = $ac_status" >&5
503d2be0 7966 (exit $ac_status); }; }; then
98418dba 7967 ac_cv_func_alloca_works=yes
ac95a621 7968else
503d2be0
AS
7969 echo "$as_me: failed program was:" >&5
7970cat conftest.$ac_ext >&5
98418dba 7971ac_cv_func_alloca_works=no
ac95a621 7972fi
503d2be0 7973rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 7974fi
925c2f3f 7975echo "$as_me:7975: result: $ac_cv_func_alloca_works" >&5
98418dba 7976echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
ac95a621 7977
98418dba
CW
7978if test $ac_cv_func_alloca_works = yes; then
7979
925c2f3f 7980cat >>confdefs.h <<\EOF
98418dba 7981#define HAVE_ALLOCA 1
925c2f3f 7982EOF
98418dba
CW
7983
7984else
7985 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7986# that cause trouble. Some versions do not even contain alloca or
7987# contain a buggy version. If you still want to use their alloca,
7988# use ar to extract alloca.o from them instead of compiling alloca.c.
7989
7990ALLOCA=alloca.$ac_objext
7991
925c2f3f 7992cat >>confdefs.h <<\EOF
98418dba 7993#define C_ALLOCA 1
925c2f3f 7994EOF
98418dba 7995
925c2f3f 7996echo "$as_me:7996: checking whether \`alloca.c' needs Cray hooks" >&5
98418dba
CW
7997echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
7998if test "${ac_cv_os_cray+set}" = set; then
7999 echo $ECHO_N "(cached) $ECHO_C" >&6
8000else
8001 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 8002#line 8002 "configure"
98418dba
CW
8003#include "confdefs.h"
8004#if defined(CRAY) && ! defined(CRAY2)
8005webecray
8006#else
8007wenotbecray
8008#endif
8009
8010_ACEOF
8011if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8012 egrep "webecray" >/dev/null 2>&1; then
8013 ac_cv_os_cray=yes
8014else
8015 ac_cv_os_cray=no
8016fi
8017rm -f conftest*
ac95a621 8018
98418dba 8019fi
925c2f3f 8020echo "$as_me:8020: result: $ac_cv_os_cray" >&5
98418dba
CW
8021echo "${ECHO_T}$ac_cv_os_cray" >&6
8022if test $ac_cv_os_cray = yes; then
8023 for ac_func in _getb67 GETB67 getb67; do
8024 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
925c2f3f 8025echo "$as_me:8025: checking for $ac_func" >&5
503d2be0
AS
8026echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8027if eval "test \"\${$as_ac_var+set}\" = set"; then
8028 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 8029else
503d2be0 8030 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 8031#line 8031 "configure"
73b77ee5
GM
8032#include "confdefs.h"
8033/* System header to define __stub macros and hopefully few prototypes,
503d2be0 8034 which can conflict with char $ac_func (); below. */
73b77ee5
GM
8035#include <assert.h>
8036/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8037#ifdef __cplusplus
8038extern "C"
8039#endif
73b77ee5 8040/* We use char because int might match the return type of a gcc2
503d2be0
AS
8041 builtin and then its argument prototype would still apply. */
8042char $ac_func ();
8043char (*f) ();
73b77ee5 8044
503d2be0
AS
8045int
8046main ()
8047{
73b77ee5
GM
8048/* The GNU C library defines this for functions which it implements
8049 to always fail with ENOSYS. Some functions are actually named
8050 something starting with __ and the normal name is an alias. */
8051#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8052choke me
8053#else
503d2be0 8054f = $ac_func;
73b77ee5
GM
8055#endif
8056
503d2be0
AS
8057 ;
8058 return 0;
8059}
8060_ACEOF
8061rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 8062if { (eval echo "$as_me:8062: \"$ac_link\"") >&5
503d2be0
AS
8063 (eval $ac_link) 2>&5
8064 ac_status=$?
925c2f3f 8065 echo "$as_me:8065: \$? = $ac_status" >&5
503d2be0
AS
8066 (exit $ac_status); } &&
8067 { ac_try='test -s conftest$ac_exeext'
925c2f3f 8068 { (eval echo "$as_me:8068: \"$ac_try\"") >&5
503d2be0
AS
8069 (eval $ac_try) 2>&5
8070 ac_status=$?
925c2f3f 8071 echo "$as_me:8071: \$? = $ac_status" >&5
503d2be0
AS
8072 (exit $ac_status); }; }; then
8073 eval "$as_ac_var=yes"
8074else
8075 echo "$as_me: failed program was:" >&5
8076cat conftest.$ac_ext >&5
8077eval "$as_ac_var=no"
8078fi
8079rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8080fi
925c2f3f 8081echo "$as_me:8081: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
8082echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8083if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 8084
925c2f3f 8085cat >>confdefs.h <<EOF
98418dba 8086#define CRAY_STACKSEG_END $ac_func
925c2f3f 8087EOF
98418dba
CW
8088
8089 break
73b77ee5 8090fi
73b77ee5 8091
98418dba 8092 done
73b77ee5
GM
8093fi
8094
925c2f3f 8095echo "$as_me:8095: checking stack direction for C alloca" >&5
98418dba
CW
8096echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
8097if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 8098 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
8099else
8100 if test "$cross_compiling" = yes; then
8101 ac_cv_c_stack_direction=0
73b77ee5 8102else
503d2be0 8103 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 8104#line 8104 "configure"
73b77ee5 8105#include "confdefs.h"
503d2be0 8106int
98418dba 8107find_stack_direction ()
503d2be0 8108{
98418dba
CW
8109 static char *addr = 0;
8110 auto char dummy;
8111 if (addr == 0)
8112 {
8113 addr = &dummy;
8114 return find_stack_direction ();
8115 }
73b77ee5 8116 else
98418dba
CW
8117 return (&dummy > addr) ? 1 : -1;
8118}
ba4481b5 8119
503d2be0
AS
8120int
8121main ()
8122{
98418dba 8123 exit (find_stack_direction () < 0);
503d2be0
AS
8124}
8125_ACEOF
98418dba 8126rm -f conftest$ac_exeext
925c2f3f 8127if { (eval echo "$as_me:8127: \"$ac_link\"") >&5
503d2be0
AS
8128 (eval $ac_link) 2>&5
8129 ac_status=$?
925c2f3f 8130 echo "$as_me:8130: \$? = $ac_status" >&5
98418dba 8131 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
925c2f3f 8132 { (eval echo "$as_me:8132: \"$ac_try\"") >&5
503d2be0
AS
8133 (eval $ac_try) 2>&5
8134 ac_status=$?
925c2f3f 8135 echo "$as_me:8135: \$? = $ac_status" >&5
503d2be0 8136 (exit $ac_status); }; }; then
98418dba 8137 ac_cv_c_stack_direction=1
ba4481b5 8138else
98418dba
CW
8139 echo "$as_me: program exited with status $ac_status" >&5
8140echo "$as_me: failed program was:" >&5
503d2be0 8141cat conftest.$ac_ext >&5
98418dba 8142ac_cv_c_stack_direction=-1
ba4481b5 8143fi
98418dba 8144rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 8145fi
98418dba 8146fi
925c2f3f 8147echo "$as_me:8147: result: $ac_cv_c_stack_direction" >&5
98418dba
CW
8148echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
8149
925c2f3f 8150cat >>confdefs.h <<EOF
98418dba 8151#define STACK_DIRECTION $ac_cv_c_stack_direction
925c2f3f 8152EOF
ba4481b5 8153
ba4481b5
DL
8154fi
8155
98418dba
CW
8156# fmod, logb, and frexp are found in -lm on most systems.
8157# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
8158
925c2f3f 8159echo "$as_me:8159: checking for sqrt in -lm" >&5
98418dba
CW
8160echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
8161if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 8162 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8163else
98418dba
CW
8164 ac_check_lib_save_LIBS=$LIBS
8165LIBS="-lm $LIBS"
8166cat >conftest.$ac_ext <<_ACEOF
925c2f3f 8167#line 8167 "configure"
ba4481b5
DL
8168#include "confdefs.h"
8169
98418dba
CW
8170/* Override any gcc2 internal prototype to avoid an error. */
8171#ifdef __cplusplus
8172extern "C"
8173#endif
8174/* We use char because int might match the return type of a gcc2
8175 builtin and then its argument prototype would still apply. */
8176char sqrt ();
503d2be0
AS
8177int
8178main ()
8179{
98418dba 8180sqrt ();
503d2be0
AS
8181 ;
8182 return 0;
8183}
8184_ACEOF
8185rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 8186if { (eval echo "$as_me:8186: \"$ac_link\"") >&5
503d2be0
AS
8187 (eval $ac_link) 2>&5
8188 ac_status=$?
925c2f3f 8189 echo "$as_me:8189: \$? = $ac_status" >&5
503d2be0
AS
8190 (exit $ac_status); } &&
8191 { ac_try='test -s conftest$ac_exeext'
925c2f3f 8192 { (eval echo "$as_me:8192: \"$ac_try\"") >&5
503d2be0
AS
8193 (eval $ac_try) 2>&5
8194 ac_status=$?
925c2f3f 8195 echo "$as_me:8195: \$? = $ac_status" >&5
503d2be0 8196 (exit $ac_status); }; }; then
98418dba 8197 ac_cv_lib_m_sqrt=yes
ba4481b5 8198else
503d2be0
AS
8199 echo "$as_me: failed program was:" >&5
8200cat conftest.$ac_ext >&5
98418dba 8201ac_cv_lib_m_sqrt=no
ba4481b5 8202fi
503d2be0 8203rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 8204LIBS=$ac_check_lib_save_LIBS
ba4481b5 8205fi
925c2f3f 8206echo "$as_me:8206: result: $ac_cv_lib_m_sqrt" >&5
98418dba
CW
8207echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
8208if test $ac_cv_lib_m_sqrt = yes; then
925c2f3f 8209 cat >>confdefs.h <<EOF
98418dba 8210#define HAVE_LIBM 1
925c2f3f 8211EOF
98418dba
CW
8212
8213 LIBS="-lm $LIBS"
ba4481b5 8214
ba4481b5
DL
8215fi
8216
98418dba
CW
8217# Check for mail-locking functions in a "mail" library
8218
925c2f3f 8219echo "$as_me:8219: checking for maillock in -lmail" >&5
98418dba
CW
8220echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6
8221if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 8222 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8223else
98418dba
CW
8224 ac_check_lib_save_LIBS=$LIBS
8225LIBS="-lmail $LIBS"
8226cat >conftest.$ac_ext <<_ACEOF
925c2f3f 8227#line 8227 "configure"
ba4481b5 8228#include "confdefs.h"
98418dba
CW
8229
8230/* Override any gcc2 internal prototype to avoid an error. */
8231#ifdef __cplusplus
8232extern "C"
8233#endif
8234/* We use char because int might match the return type of a gcc2
8235 builtin and then its argument prototype would still apply. */
8236char maillock ();
503d2be0
AS
8237int
8238main ()
8239{
98418dba 8240maillock ();
503d2be0
AS
8241 ;
8242 return 0;
8243}
8244_ACEOF
8245rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 8246if { (eval echo "$as_me:8246: \"$ac_link\"") >&5
503d2be0
AS
8247 (eval $ac_link) 2>&5
8248 ac_status=$?
925c2f3f 8249 echo "$as_me:8249: \$? = $ac_status" >&5
503d2be0
AS
8250 (exit $ac_status); } &&
8251 { ac_try='test -s conftest$ac_exeext'
925c2f3f 8252 { (eval echo "$as_me:8252: \"$ac_try\"") >&5
503d2be0
AS
8253 (eval $ac_try) 2>&5
8254 ac_status=$?
925c2f3f 8255 echo "$as_me:8255: \$? = $ac_status" >&5
503d2be0 8256 (exit $ac_status); }; }; then
98418dba 8257 ac_cv_lib_mail_maillock=yes
ba4481b5 8258else
503d2be0
AS
8259 echo "$as_me: failed program was:" >&5
8260cat conftest.$ac_ext >&5
98418dba 8261ac_cv_lib_mail_maillock=no
ba4481b5 8262fi
503d2be0 8263rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 8264LIBS=$ac_check_lib_save_LIBS
ba4481b5 8265fi
925c2f3f 8266echo "$as_me:8266: result: $ac_cv_lib_mail_maillock" >&5
98418dba
CW
8267echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6
8268if test $ac_cv_lib_mail_maillock = yes; then
925c2f3f 8269 cat >>confdefs.h <<EOF
98418dba 8270#define HAVE_LIBMAIL 1
925c2f3f 8271EOF
ba4481b5 8272
98418dba 8273 LIBS="-lmail $LIBS"
ba4481b5 8274
98418dba 8275fi
ba4481b5 8276
925c2f3f 8277echo "$as_me:8277: checking for maillock in -llockfile" >&5
98418dba
CW
8278echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6
8279if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 8280 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8281else
503d2be0 8282 ac_check_lib_save_LIBS=$LIBS
98418dba 8283LIBS="-llockfile $LIBS"
503d2be0 8284cat >conftest.$ac_ext <<_ACEOF
925c2f3f 8285#line 8285 "configure"
ba4481b5 8286#include "confdefs.h"
503d2be0 8287
ba4481b5 8288/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8289#ifdef __cplusplus
8290extern "C"
8291#endif
ba4481b5 8292/* We use char because int might match the return type of a gcc2
503d2be0 8293 builtin and then its argument prototype would still apply. */
98418dba 8294char maillock ();
503d2be0
AS
8295int
8296main ()
8297{
98418dba 8298maillock ();
503d2be0
AS
8299 ;
8300 return 0;
8301}
8302_ACEOF
8303rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 8304if { (eval echo "$as_me:8304: \"$ac_link\"") >&5
503d2be0
AS
8305 (eval $ac_link) 2>&5
8306 ac_status=$?
925c2f3f 8307 echo "$as_me:8307: \$? = $ac_status" >&5
503d2be0
AS
8308 (exit $ac_status); } &&
8309 { ac_try='test -s conftest$ac_exeext'
925c2f3f 8310 { (eval echo "$as_me:8310: \"$ac_try\"") >&5
503d2be0
AS
8311 (eval $ac_try) 2>&5
8312 ac_status=$?
925c2f3f 8313 echo "$as_me:8313: \$? = $ac_status" >&5
503d2be0 8314 (exit $ac_status); }; }; then
98418dba 8315 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
8316else
8317 echo "$as_me: failed program was:" >&5
8318cat conftest.$ac_ext >&5
98418dba
CW
8319ac_cv_lib_lockfile_maillock=no
8320fi
8321rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8322LIBS=$ac_check_lib_save_LIBS
8323fi
925c2f3f 8324echo "$as_me:8324: result: $ac_cv_lib_lockfile_maillock" >&5
98418dba
CW
8325echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6
8326if test $ac_cv_lib_lockfile_maillock = yes; then
925c2f3f 8327 cat >>confdefs.h <<EOF
98418dba 8328#define HAVE_LIBLOCKFILE 1
925c2f3f 8329EOF
98418dba
CW
8330
8331 LIBS="-llockfile $LIBS"
8332
8333fi
8334
8335# If we have the shared liblockfile, assume we must use it for mail
8336# locking (e.g. Debian). If we couldn't link against liblockfile
8337# (no liblockfile.a installed), ensure that we don't need to.
8338if test "$ac_cv_lib_lockfile_maillock" = no; then
8339 # Extract the first word of "liblockfile.so", so it can be a program name with args.
8340set dummy liblockfile.so; ac_word=$2
925c2f3f 8341echo "$as_me:8341: checking for $ac_word" >&5
98418dba
CW
8342echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8343if test "${ac_cv_prog_liblockfile+set}" = set; then
8344 echo $ECHO_N "(cached) $ECHO_C" >&6
8345else
8346 if test -n "$liblockfile"; then
8347 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
8348else
925c2f3f
EZ
8349 ac_save_IFS=$IFS; IFS=$ac_path_separator
8350ac_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
8351for ac_dir in $ac_dummy; do
8352 IFS=$ac_save_IFS
8353 test -z "$ac_dir" && ac_dir=.
8354 $as_executable_p "$ac_dir/$ac_word" || continue
8355ac_cv_prog_liblockfile="yes"
8356echo "$as_me:8356: found $ac_dir/$ac_word" >&5
8357break
98418dba
CW
8358done
8359
8360 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 8361fi
503d2be0 8362fi
98418dba
CW
8363liblockfile=$ac_cv_prog_liblockfile
8364if test -n "$liblockfile"; then
925c2f3f 8365 echo "$as_me:8365: result: $liblockfile" >&5
98418dba
CW
8366echo "${ECHO_T}$liblockfile" >&6
8367else
925c2f3f 8368 echo "$as_me:8368: result: no" >&5
98418dba 8369echo "${ECHO_T}no" >&6
ba4481b5
DL
8370fi
8371
98418dba 8372 if test $ac_cv_prog_liblockfile = yes; then
925c2f3f 8373 { { echo "$as_me:8373: error: Shared liblockfile found but can't link against it.
98418dba
CW
8374This probably means that movemail could lose mail.
8375There may be a \`development' package to install containing liblockfile." >&5
8376echo "$as_me: error: Shared liblockfile found but can't link against it.
8377This probably means that movemail could lose mail.
8378There may be a \`development' package to install containing liblockfile." >&2;}
8379 { (exit 1); exit 1; }; }
b936fae4 8380 else
925c2f3f 8381cat >>confdefs.h <<\EOF
98418dba 8382#define LIBMAIL -llockfile
925c2f3f 8383EOF
457b792c 8384
98418dba
CW
8385 fi
8386 else :
8387fi
503d2be0 8388
98418dba
CW
8389for ac_func in touchlock
8390do
8391as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
925c2f3f 8392echo "$as_me:8392: checking for $ac_func" >&5
98418dba
CW
8393echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8394if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 8395 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 8396else
98418dba 8397 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 8398#line 8398 "configure"
457b792c 8399#include "confdefs.h"
98418dba
CW
8400/* System header to define __stub macros and hopefully few prototypes,
8401 which can conflict with char $ac_func (); below. */
8402#include <assert.h>
457b792c 8403/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8404#ifdef __cplusplus
8405extern "C"
8406#endif
457b792c 8407/* We use char because int might match the return type of a gcc2
503d2be0 8408 builtin and then its argument prototype would still apply. */
98418dba
CW
8409char $ac_func ();
8410char (*f) ();
8411
503d2be0
AS
8412int
8413main ()
8414{
98418dba
CW
8415/* The GNU C library defines this for functions which it implements
8416 to always fail with ENOSYS. Some functions are actually named
8417 something starting with __ and the normal name is an alias. */
8418#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8419choke me
8420#else
8421f = $ac_func;
8422#endif
8423
503d2be0
AS
8424 ;
8425 return 0;
8426}
8427_ACEOF
8428rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 8429if { (eval echo "$as_me:8429: \"$ac_link\"") >&5
503d2be0
AS
8430 (eval $ac_link) 2>&5
8431 ac_status=$?
925c2f3f 8432 echo "$as_me:8432: \$? = $ac_status" >&5
503d2be0
AS
8433 (exit $ac_status); } &&
8434 { ac_try='test -s conftest$ac_exeext'
925c2f3f 8435 { (eval echo "$as_me:8435: \"$ac_try\"") >&5
503d2be0
AS
8436 (eval $ac_try) 2>&5
8437 ac_status=$?
925c2f3f 8438 echo "$as_me:8438: \$? = $ac_status" >&5
503d2be0 8439 (exit $ac_status); }; }; then
98418dba 8440 eval "$as_ac_var=yes"
503d2be0
AS
8441else
8442 echo "$as_me: failed program was:" >&5
8443cat conftest.$ac_ext >&5
98418dba 8444eval "$as_ac_var=no"
503d2be0
AS
8445fi
8446rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
503d2be0 8447fi
925c2f3f 8448echo "$as_me:8448: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
8449echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8450if test `eval echo '${'$as_ac_var'}'` = yes; then
925c2f3f 8451 cat >>confdefs.h <<EOF
98418dba 8452#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
925c2f3f 8453EOF
457b792c 8454
457b792c 8455fi
98418dba 8456done
457b792c 8457
98418dba
CW
8458for ac_header in maillock.h
8459do
8460as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
925c2f3f 8461echo "$as_me:8461: checking for $ac_header" >&5
98418dba
CW
8462echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8463if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 8464 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8465else
925c2f3f
EZ
8466 cat >conftest.$ac_ext <<_ACEOF
8467#line 8467 "configure"
ba4481b5 8468#include "confdefs.h"
98418dba 8469#include <$ac_header>
503d2be0 8470_ACEOF
925c2f3f 8471if { (eval echo "$as_me:8471: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 8472 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 8473 ac_status=$?
98418dba
CW
8474 egrep -v '^ *\+' conftest.er1 >conftest.err
8475 rm -f conftest.er1
8476 cat conftest.err >&5
925c2f3f 8477 echo "$as_me:8477: \$? = $ac_status" >&5
98418dba
CW
8478 (exit $ac_status); } >/dev/null; then
8479 if test -s conftest.err; then
8480 ac_cpp_err=$ac_c_preproc_warn_flag
8481 else
8482 ac_cpp_err=
8483 fi
503d2be0 8484else
98418dba 8485 ac_cpp_err=yes
503d2be0 8486fi
98418dba 8487if test -z "$ac_cpp_err"; then
925c2f3f 8488 eval "$as_ac_Header=yes"
98418dba
CW
8489else
8490 echo "$as_me: failed program was:" >&5
8491 cat conftest.$ac_ext >&5
925c2f3f 8492 eval "$as_ac_Header=no"
503d2be0 8493fi
98418dba 8494rm -f conftest.err conftest.$ac_ext
ba4481b5 8495fi
925c2f3f 8496echo "$as_me:8496: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 8497echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 8498if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 8499 cat >>confdefs.h <<EOF
98418dba 8500#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 8501EOF
48d4b120 8502
ba4481b5 8503fi
98418dba
CW
8504done
8505
98418dba
CW
8506for ac_func in gethostname getdomainname dup2 \
8507rename closedir mkdir rmdir sysinfo \
8508random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
8509strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
8510utimes setrlimit setpgid getcwd getwd shutdown strftime getaddrinfo \
8511__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
8512sendto recvfrom getsockopt setsockopt getsockname getpeername \
8513gai_strerror mkstemp getline getdelim
8514do
8515as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
925c2f3f 8516echo "$as_me:8516: checking for $ac_func" >&5
98418dba
CW
8517echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8518if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 8519 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8520else
503d2be0 8521 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 8522#line 8522 "configure"
ba4481b5 8523#include "confdefs.h"
98418dba
CW
8524/* System header to define __stub macros and hopefully few prototypes,
8525 which can conflict with char $ac_func (); below. */
8526#include <assert.h>
ba4481b5 8527/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8528#ifdef __cplusplus
8529extern "C"
8530#endif
ba4481b5 8531/* We use char because int might match the return type of a gcc2
503d2be0 8532 builtin and then its argument prototype would still apply. */
98418dba
CW
8533char $ac_func ();
8534char (*f) ();
8535
503d2be0
AS
8536int
8537main ()
8538{
98418dba
CW
8539/* The GNU C library defines this for functions which it implements
8540 to always fail with ENOSYS. Some functions are actually named
8541 something starting with __ and the normal name is an alias. */
8542#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8543choke me
8544#else
8545f = $ac_func;
8546#endif
8547
503d2be0
AS
8548 ;
8549 return 0;
8550}
8551_ACEOF
8552rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 8553if { (eval echo "$as_me:8553: \"$ac_link\"") >&5
503d2be0
AS
8554 (eval $ac_link) 2>&5
8555 ac_status=$?
925c2f3f 8556 echo "$as_me:8556: \$? = $ac_status" >&5
503d2be0
AS
8557 (exit $ac_status); } &&
8558 { ac_try='test -s conftest$ac_exeext'
925c2f3f 8559 { (eval echo "$as_me:8559: \"$ac_try\"") >&5
503d2be0
AS
8560 (eval $ac_try) 2>&5
8561 ac_status=$?
925c2f3f 8562 echo "$as_me:8562: \$? = $ac_status" >&5
503d2be0 8563 (exit $ac_status); }; }; then
98418dba 8564 eval "$as_ac_var=yes"
503d2be0
AS
8565else
8566 echo "$as_me: failed program was:" >&5
8567cat conftest.$ac_ext >&5
98418dba 8568eval "$as_ac_var=no"
503d2be0
AS
8569fi
8570rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 8571fi
925c2f3f 8572echo "$as_me:8572: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
8573echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8574if test `eval echo '${'$as_ac_var'}'` = yes; then
925c2f3f 8575 cat >>confdefs.h <<EOF
98418dba 8576#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
925c2f3f 8577EOF
ba4481b5 8578
ba4481b5 8579fi
98418dba 8580done
ba4481b5 8581
98418dba
CW
8582for ac_header in sys/un.h
8583do
8584as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
925c2f3f 8585echo "$as_me:8585: checking for $ac_header" >&5
98418dba
CW
8586echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8587if eval "test \"\${$as_ac_Header+set}\" = set"; then
8588 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 8589else
925c2f3f
EZ
8590 cat >conftest.$ac_ext <<_ACEOF
8591#line 8591 "configure"
ba4481b5 8592#include "confdefs.h"
98418dba 8593#include <$ac_header>
503d2be0 8594_ACEOF
925c2f3f 8595if { (eval echo "$as_me:8595: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
8596 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8597 ac_status=$?
8598 egrep -v '^ *\+' conftest.er1 >conftest.err
8599 rm -f conftest.er1
8600 cat conftest.err >&5
925c2f3f 8601 echo "$as_me:8601: \$? = $ac_status" >&5
503d2be0
AS
8602 (exit $ac_status); } >/dev/null; then
8603 if test -s conftest.err; then
8604 ac_cpp_err=$ac_c_preproc_warn_flag
8605 else
8606 ac_cpp_err=
8607 fi
8608else
8609 ac_cpp_err=yes
8610fi
8611if test -z "$ac_cpp_err"; then
925c2f3f 8612 eval "$as_ac_Header=yes"
ba4481b5 8613else
503d2be0 8614 echo "$as_me: failed program was:" >&5
ba4481b5 8615 cat conftest.$ac_ext >&5
925c2f3f 8616 eval "$as_ac_Header=no"
ba4481b5 8617fi
503d2be0 8618rm -f conftest.err conftest.$ac_ext
ba4481b5 8619fi
925c2f3f
EZ
8620echo "$as_me:8620: result: `eval echo '${'$as_ac_Header'}'`" >&5
8621echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8622if test `eval echo '${'$as_ac_Header'}'` = yes; then
8623 cat >>confdefs.h <<EOF
8624#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8625EOF
503d2be0 8626
925c2f3f
EZ
8627fi
8628done
8629
8630for ac_header in sys/time.h unistd.h
8631do
8632as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8633echo "$as_me:8633: checking for $ac_header" >&5
8634echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8635if eval "test \"\${$as_ac_Header+set}\" = set"; then
8636 echo $ECHO_N "(cached) $ECHO_C" >&6
8637else
8638 cat >conftest.$ac_ext <<_ACEOF
8639#line 8639 "configure"
ffe36136 8640#include "confdefs.h"
98418dba 8641#include <$ac_header>
503d2be0 8642_ACEOF
925c2f3f 8643if { (eval echo "$as_me:8643: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
8644 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8645 ac_status=$?
8646 egrep -v '^ *\+' conftest.er1 >conftest.err
8647 rm -f conftest.er1
8648 cat conftest.err >&5
925c2f3f 8649 echo "$as_me:8649: \$? = $ac_status" >&5
503d2be0
AS
8650 (exit $ac_status); } >/dev/null; then
8651 if test -s conftest.err; then
8652 ac_cpp_err=$ac_c_preproc_warn_flag
8653 else
8654 ac_cpp_err=
8655 fi
8656else
8657 ac_cpp_err=yes
8658fi
8659if test -z "$ac_cpp_err"; then
925c2f3f 8660 eval "$as_ac_Header=yes"
98418dba
CW
8661else
8662 echo "$as_me: failed program was:" >&5
8663 cat conftest.$ac_ext >&5
925c2f3f 8664 eval "$as_ac_Header=no"
98418dba
CW
8665fi
8666rm -f conftest.err conftest.$ac_ext
ffe36136 8667fi
925c2f3f 8668echo "$as_me:8668: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 8669echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 8670if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 8671 cat >>confdefs.h <<EOF
98418dba 8672#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 8673EOF
98418dba
CW
8674
8675fi
98418dba
CW
8676done
8677
98418dba
CW
8678for ac_func in alarm
8679do
8680as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
925c2f3f 8681echo "$as_me:8681: checking for $ac_func" >&5
98418dba
CW
8682echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8683if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 8684 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8685else
98418dba 8686 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 8687#line 8687 "configure"
ba4481b5 8688#include "confdefs.h"
98418dba
CW
8689/* System header to define __stub macros and hopefully few prototypes,
8690 which can conflict with char $ac_func (); below. */
8691#include <assert.h>
ba4481b5 8692/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8693#ifdef __cplusplus
8694extern "C"
8695#endif
ba4481b5 8696/* We use char because int might match the return type of a gcc2
503d2be0 8697 builtin and then its argument prototype would still apply. */
98418dba
CW
8698char $ac_func ();
8699char (*f) ();
8700
503d2be0
AS
8701int
8702main ()
8703{
98418dba
CW
8704/* The GNU C library defines this for functions which it implements
8705 to always fail with ENOSYS. Some functions are actually named
8706 something starting with __ and the normal name is an alias. */
8707#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8708choke me
8709#else
8710f = $ac_func;
8711#endif
8712
503d2be0
AS
8713 ;
8714 return 0;
8715}
8716_ACEOF
8717rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 8718if { (eval echo "$as_me:8718: \"$ac_link\"") >&5
503d2be0
AS
8719 (eval $ac_link) 2>&5
8720 ac_status=$?
925c2f3f 8721 echo "$as_me:8721: \$? = $ac_status" >&5
503d2be0
AS
8722 (exit $ac_status); } &&
8723 { ac_try='test -s conftest$ac_exeext'
925c2f3f 8724 { (eval echo "$as_me:8724: \"$ac_try\"") >&5
503d2be0
AS
8725 (eval $ac_try) 2>&5
8726 ac_status=$?
925c2f3f 8727 echo "$as_me:8727: \$? = $ac_status" >&5
503d2be0 8728 (exit $ac_status); }; }; then
98418dba 8729 eval "$as_ac_var=yes"
503d2be0
AS
8730else
8731 echo "$as_me: failed program was:" >&5
8732cat conftest.$ac_ext >&5
98418dba 8733eval "$as_ac_var=no"
503d2be0
AS
8734fi
8735rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ffe36136 8736fi
925c2f3f 8737echo "$as_me:8737: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
8738echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8739if test `eval echo '${'$as_ac_var'}'` = yes; then
925c2f3f 8740 cat >>confdefs.h <<EOF
98418dba 8741#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
925c2f3f 8742EOF
ffe36136 8743
ba4481b5 8744fi
98418dba 8745done
ba4481b5 8746
925c2f3f 8747echo "$as_me:8747: checking for working mktime" >&5
98418dba
CW
8748echo $ECHO_N "checking for working mktime... $ECHO_C" >&6
8749if test "${ac_cv_func_working_mktime+set}" = set; then
8750 echo $ECHO_N "(cached) $ECHO_C" >&6
8751else
8752 if test "$cross_compiling" = yes; then
8753 ac_cv_func_working_mktime=no
8754else
8755 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 8756#line 8756 "configure"
98418dba
CW
8757#include "confdefs.h"
8758/* Test program from Paul Eggert and Tony Leneis. */
8759#if TIME_WITH_SYS_TIME
8760# include <sys/time.h>
8761# include <time.h>
8762#else
8763# if HAVE_SYS_TIME_H
8764# include <sys/time.h>
8765# else
8766# include <time.h>
8767# endif
8768#endif
ba4481b5 8769
98418dba
CW
8770#if HAVE_UNISTD_H
8771# include <unistd.h>
8772#endif
ba4481b5 8773
98418dba
CW
8774#if !HAVE_ALARM
8775# define alarm(X) /* empty */
8776#endif
df645f7c 8777
98418dba
CW
8778/* Work around redefinition to rpl_putenv by other config tests. */
8779#undef putenv
df645f7c 8780
98418dba 8781static time_t time_t_max;
df645f7c 8782
98418dba
CW
8783/* Values we'll use to set the TZ environment variable. */
8784static const char *const tz_strings[] = {
8785 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
8786 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
8787};
8788#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 8789
98418dba
CW
8790/* Fail if mktime fails to convert a date in the spring-forward gap.
8791 Based on a problem report from Andreas Jaeger. */
8792static void
8793spring_forward_gap ()
8794{
8795 /* glibc (up to about 1998-10-07) failed this test. */
8796 struct tm tm;
8797
8798 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
8799 instead of "TZ=America/Vancouver" in order to detect the bug even
8800 on systems that don't support the Olson extension, or don't have the
8801 full zoneinfo tables installed. */
8802 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
8803
8804 tm.tm_year = 98;
8805 tm.tm_mon = 3;
8806 tm.tm_mday = 5;
8807 tm.tm_hour = 2;
8808 tm.tm_min = 0;
8809 tm.tm_sec = 0;
8810 tm.tm_isdst = -1;
8811 if (mktime (&tm) == (time_t)-1)
8812 exit (1);
8813}
8814
8815static void
8816mktime_test (now)
8817 time_t now;
8818{
8819 struct tm *lt;
8820 if ((lt = localtime (&now)) && mktime (lt) != now)
8821 exit (1);
8822 now = time_t_max - now;
8823 if ((lt = localtime (&now)) && mktime (lt) != now)
8824 exit (1);
8825}
8826
8827static void
8828irix_6_4_bug ()
8829{
8830 /* Based on code from Ariel Faigon. */
8831 struct tm tm;
8832 tm.tm_year = 96;
8833 tm.tm_mon = 3;
8834 tm.tm_mday = 0;
8835 tm.tm_hour = 0;
8836 tm.tm_min = 0;
8837 tm.tm_sec = 0;
8838 tm.tm_isdst = -1;
8839 mktime (&tm);
8840 if (tm.tm_mon != 2 || tm.tm_mday != 31)
8841 exit (1);
8842}
8843
8844static void
8845bigtime_test (j)
8846 int j;
8847{
8848 struct tm tm;
8849 time_t now;
8850 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
8851 now = mktime (&tm);
8852 if (now != (time_t) -1)
8853 {
8854 struct tm *lt = localtime (&now);
8855 if (! (lt
8856 && lt->tm_year == tm.tm_year
8857 && lt->tm_mon == tm.tm_mon
8858 && lt->tm_mday == tm.tm_mday
8859 && lt->tm_hour == tm.tm_hour
8860 && lt->tm_min == tm.tm_min
8861 && lt->tm_sec == tm.tm_sec
8862 && lt->tm_yday == tm.tm_yday
8863 && lt->tm_wday == tm.tm_wday
8864 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
8865 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
8866 exit (1);
8867 }
8868}
8869
8870int
8871main ()
8872{
8873 time_t t, delta;
8874 int i, j;
8875
8876 /* This test makes some buggy mktime implementations loop.
8877 Give up after 60 seconds; a mktime slower than that
8878 isn't worth using anyway. */
8879 alarm (60);
8880
8881 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
8882 continue;
8883 time_t_max--;
8884 delta = time_t_max / 997; /* a suitable prime number */
8885 for (i = 0; i < N_STRINGS; i++)
8886 {
8887 if (tz_strings[i])
8888 putenv (tz_strings[i]);
503d2be0 8889
98418dba
CW
8890 for (t = 0; t <= time_t_max - delta; t += delta)
8891 mktime_test (t);
8892 mktime_test ((time_t) 60 * 60);
8893 mktime_test ((time_t) 60 * 60 * 24);
8894
8895 for (j = 1; 0 < j; j *= 2)
8896 bigtime_test (j);
8897 bigtime_test (j - 1);
8898 }
8899 irix_6_4_bug ();
8900 spring_forward_gap ();
8901 exit (0);
503d2be0
AS
8902}
8903_ACEOF
98418dba 8904rm -f conftest$ac_exeext
925c2f3f 8905if { (eval echo "$as_me:8905: \"$ac_link\"") >&5
503d2be0
AS
8906 (eval $ac_link) 2>&5
8907 ac_status=$?
925c2f3f 8908 echo "$as_me:8908: \$? = $ac_status" >&5
98418dba 8909 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
925c2f3f 8910 { (eval echo "$as_me:8910: \"$ac_try\"") >&5
503d2be0
AS
8911 (eval $ac_try) 2>&5
8912 ac_status=$?
925c2f3f 8913 echo "$as_me:8913: \$? = $ac_status" >&5
503d2be0 8914 (exit $ac_status); }; }; then
98418dba 8915 ac_cv_func_working_mktime=yes
503d2be0 8916else
98418dba
CW
8917 echo "$as_me: program exited with status $ac_status" >&5
8918echo "$as_me: failed program was:" >&5
503d2be0 8919cat conftest.$ac_ext >&5
98418dba 8920ac_cv_func_working_mktime=no
503d2be0 8921fi
98418dba 8922rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 8923fi
ba4481b5 8924fi
925c2f3f 8925echo "$as_me:8925: result: $ac_cv_func_working_mktime" >&5
98418dba
CW
8926echo "${ECHO_T}$ac_cv_func_working_mktime" >&6
8927if test $ac_cv_func_working_mktime = no; then
8928 LIBOBJS="$LIBOBJS mktime.$ac_objext"
ba4481b5
DL
8929fi
8930
98418dba 8931if test "$ac_cv_func_working_mktime" = no; then
b936fae4 8932
925c2f3f 8933cat >>confdefs.h <<\EOF
98418dba 8934#define BROKEN_MKTIME 1
925c2f3f 8935EOF
ba4481b5 8936
ba4481b5 8937fi
503d2be0 8938
98418dba
CW
8939ac_have_func=no # yes means we've found a way to get the load average.
8940
8941ac_save_LIBS=$LIBS
8942
8943# Check for getloadavg, but be sure not to touch the cache variable.
925c2f3f 8944(echo "$as_me:8944: checking for getloadavg" >&5
98418dba
CW
8945echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6
8946if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 8947 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8948else
503d2be0 8949 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 8950#line 8950 "configure"
ba4481b5 8951#include "confdefs.h"
98418dba
CW
8952/* System header to define __stub macros and hopefully few prototypes,
8953 which can conflict with char getloadavg (); below. */
8954#include <assert.h>
ba4481b5 8955/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8956#ifdef __cplusplus
8957extern "C"
8958#endif
ba4481b5 8959/* We use char because int might match the return type of a gcc2
503d2be0 8960 builtin and then its argument prototype would still apply. */
98418dba
CW
8961char getloadavg ();
8962char (*f) ();
8963
503d2be0
AS
8964int
8965main ()
8966{
98418dba
CW
8967/* The GNU C library defines this for functions which it implements
8968 to always fail with ENOSYS. Some functions are actually named
8969 something starting with __ and the normal name is an alias. */
8970#if defined (__stub_getloadavg) || defined (__stub___getloadavg)
8971choke me
8972#else
8973f = getloadavg;
8974#endif
8975
503d2be0
AS
8976 ;
8977 return 0;
8978}
8979_ACEOF
8980rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 8981if { (eval echo "$as_me:8981: \"$ac_link\"") >&5
503d2be0
AS
8982 (eval $ac_link) 2>&5
8983 ac_status=$?
925c2f3f 8984 echo "$as_me:8984: \$? = $ac_status" >&5
503d2be0
AS
8985 (exit $ac_status); } &&
8986 { ac_try='test -s conftest$ac_exeext'
925c2f3f 8987 { (eval echo "$as_me:8987: \"$ac_try\"") >&5
503d2be0
AS
8988 (eval $ac_try) 2>&5
8989 ac_status=$?
925c2f3f 8990 echo "$as_me:8990: \$? = $ac_status" >&5
503d2be0 8991 (exit $ac_status); }; }; then
98418dba 8992 ac_cv_func_getloadavg=yes
503d2be0
AS
8993else
8994 echo "$as_me: failed program was:" >&5
8995cat conftest.$ac_ext >&5
98418dba 8996ac_cv_func_getloadavg=no
503d2be0
AS
8997fi
8998rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 8999fi
925c2f3f 9000echo "$as_me:9000: result: $ac_cv_func_getloadavg" >&5
98418dba
CW
9001echo "${ECHO_T}$ac_cv_func_getloadavg" >&6
9002if test $ac_cv_func_getloadavg = yes; then
9003 exit 0
9004else
9005 exit 1
ba4481b5 9006fi
98418dba 9007) && ac_have_func=yes
ba4481b5 9008
98418dba 9009# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 9010
98418dba
CW
9011for ac_func in pstat_getdynamic
9012do
9013as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
925c2f3f 9014echo "$as_me:9014: checking for $ac_func" >&5
98418dba
CW
9015echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9016if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 9017 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9018else
503d2be0 9019 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 9020#line 9020 "configure"
ba4481b5 9021#include "confdefs.h"
98418dba
CW
9022/* System header to define __stub macros and hopefully few prototypes,
9023 which can conflict with char $ac_func (); below. */
9024#include <assert.h>
ba4481b5 9025/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9026#ifdef __cplusplus
9027extern "C"
9028#endif
ba4481b5 9029/* We use char because int might match the return type of a gcc2
503d2be0 9030 builtin and then its argument prototype would still apply. */
98418dba
CW
9031char $ac_func ();
9032char (*f) ();
9033
503d2be0
AS
9034int
9035main ()
9036{
98418dba
CW
9037/* The GNU C library defines this for functions which it implements
9038 to always fail with ENOSYS. Some functions are actually named
9039 something starting with __ and the normal name is an alias. */
9040#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9041choke me
9042#else
9043f = $ac_func;
9044#endif
9045
9046 ;
9047 return 0;
9048}
f21fadcc 9049_ACEOF
98418dba 9050rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 9051if { (eval echo "$as_me:9051: \"$ac_link\"") >&5
98418dba 9052 (eval $ac_link) 2>&5
f21fadcc 9053 ac_status=$?
925c2f3f 9054 echo "$as_me:9054: \$? = $ac_status" >&5
98418dba
CW
9055 (exit $ac_status); } &&
9056 { ac_try='test -s conftest$ac_exeext'
925c2f3f 9057 { (eval echo "$as_me:9057: \"$ac_try\"") >&5
98418dba
CW
9058 (eval $ac_try) 2>&5
9059 ac_status=$?
925c2f3f 9060 echo "$as_me:9060: \$? = $ac_status" >&5
98418dba
CW
9061 (exit $ac_status); }; }; then
9062 eval "$as_ac_var=yes"
f21fadcc
JD
9063else
9064 echo "$as_me: failed program was:" >&5
98418dba
CW
9065cat conftest.$ac_ext >&5
9066eval "$as_ac_var=no"
f21fadcc 9067fi
98418dba 9068rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
f21fadcc 9069fi
925c2f3f 9070echo "$as_me:9070: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
9071echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9072if test `eval echo '${'$as_ac_var'}'` = yes; then
925c2f3f 9073 cat >>confdefs.h <<EOF
98418dba 9074#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
925c2f3f 9075EOF
98418dba
CW
9076
9077fi
9078done
9079
98418dba
CW
9080# Solaris has libkstat which does not require root.
9081
925c2f3f 9082echo "$as_me:9082: checking for kstat_open in -lkstat" >&5
98418dba
CW
9083echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
9084if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
9085 echo $ECHO_N "(cached) $ECHO_C" >&6
9086else
9087 ac_check_lib_save_LIBS=$LIBS
98418dba 9088LIBS="-lkstat $LIBS"
f21fadcc 9089cat >conftest.$ac_ext <<_ACEOF
925c2f3f 9090#line 9090 "configure"
f21fadcc
JD
9091#include "confdefs.h"
9092
9093/* Override any gcc2 internal prototype to avoid an error. */
9094#ifdef __cplusplus
9095extern "C"
9096#endif
9097/* We use char because int might match the return type of a gcc2
9098 builtin and then its argument prototype would still apply. */
98418dba 9099char kstat_open ();
f21fadcc
JD
9100int
9101main ()
9102{
98418dba 9103kstat_open ();
f21fadcc
JD
9104 ;
9105 return 0;
9106}
9107_ACEOF
9108rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 9109if { (eval echo "$as_me:9109: \"$ac_link\"") >&5
f21fadcc
JD
9110 (eval $ac_link) 2>&5
9111 ac_status=$?
925c2f3f 9112 echo "$as_me:9112: \$? = $ac_status" >&5
f21fadcc
JD
9113 (exit $ac_status); } &&
9114 { ac_try='test -s conftest$ac_exeext'
925c2f3f 9115 { (eval echo "$as_me:9115: \"$ac_try\"") >&5
f21fadcc
JD
9116 (eval $ac_try) 2>&5
9117 ac_status=$?
925c2f3f 9118 echo "$as_me:9118: \$? = $ac_status" >&5
f21fadcc 9119 (exit $ac_status); }; }; then
98418dba 9120 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
9121else
9122 echo "$as_me: failed program was:" >&5
9123cat conftest.$ac_ext >&5
98418dba 9124ac_cv_lib_kstat_kstat_open=no
f21fadcc
JD
9125fi
9126rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9127LIBS=$ac_check_lib_save_LIBS
9128fi
925c2f3f 9129echo "$as_me:9129: result: $ac_cv_lib_kstat_kstat_open" >&5
98418dba
CW
9130echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6
9131if test $ac_cv_lib_kstat_kstat_open = yes; then
925c2f3f 9132 cat >>confdefs.h <<EOF
98418dba 9133#define HAVE_LIBKSTAT 1
925c2f3f 9134EOF
f21fadcc 9135
98418dba 9136 LIBS="-lkstat $LIBS"
f21fadcc 9137
f21fadcc
JD
9138fi
9139
98418dba
CW
9140test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
9141
9142# Some systems with -lutil have (and need) -lkvm as well, some do not.
9143# On Solaris, -lkvm requires nlist from -lelf, so check that first
9144# to get the right answer into the cache.
9145# For kstat on solaris, we need libelf to force the definition of SVR4 below.
9146if test $ac_have_func = no; then
925c2f3f 9147 echo "$as_me:9147: checking for elf_begin in -lelf" >&5
98418dba
CW
9148echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
9149if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 9150 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9151else
98418dba
CW
9152 ac_check_lib_save_LIBS=$LIBS
9153LIBS="-lelf $LIBS"
9154cat >conftest.$ac_ext <<_ACEOF
925c2f3f 9155#line 9155 "configure"
ba4481b5 9156#include "confdefs.h"
98418dba
CW
9157
9158/* Override any gcc2 internal prototype to avoid an error. */
9159#ifdef __cplusplus
9160extern "C"
9161#endif
9162/* We use char because int might match the return type of a gcc2
9163 builtin and then its argument prototype would still apply. */
9164char elf_begin ();
503d2be0
AS
9165int
9166main ()
9167{
98418dba 9168elf_begin ();
503d2be0
AS
9169 ;
9170 return 0;
9171}
9172_ACEOF
9173rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 9174if { (eval echo "$as_me:9174: \"$ac_link\"") >&5
503d2be0
AS
9175 (eval $ac_link) 2>&5
9176 ac_status=$?
925c2f3f 9177 echo "$as_me:9177: \$? = $ac_status" >&5
503d2be0
AS
9178 (exit $ac_status); } &&
9179 { ac_try='test -s conftest$ac_exeext'
925c2f3f 9180 { (eval echo "$as_me:9180: \"$ac_try\"") >&5
503d2be0
AS
9181 (eval $ac_try) 2>&5
9182 ac_status=$?
925c2f3f 9183 echo "$as_me:9183: \$? = $ac_status" >&5
503d2be0 9184 (exit $ac_status); }; }; then
98418dba 9185 ac_cv_lib_elf_elf_begin=yes
ba4481b5 9186else
503d2be0
AS
9187 echo "$as_me: failed program was:" >&5
9188cat conftest.$ac_ext >&5
98418dba 9189ac_cv_lib_elf_elf_begin=no
ba4481b5 9190fi
503d2be0 9191rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 9192LIBS=$ac_check_lib_save_LIBS
ba4481b5 9193fi
925c2f3f 9194echo "$as_me:9194: result: $ac_cv_lib_elf_elf_begin" >&5
98418dba
CW
9195echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
9196if test $ac_cv_lib_elf_elf_begin = yes; then
9197 LIBS="-lelf $LIBS"
ba4481b5
DL
9198fi
9199
98418dba
CW
9200fi
9201if test $ac_have_func = no; then
925c2f3f 9202 echo "$as_me:9202: checking for kvm_open in -lkvm" >&5
98418dba
CW
9203echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6
9204if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 9205 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9206else
98418dba
CW
9207 ac_check_lib_save_LIBS=$LIBS
9208LIBS="-lkvm $LIBS"
9209cat >conftest.$ac_ext <<_ACEOF
925c2f3f 9210#line 9210 "configure"
ba4481b5 9211#include "confdefs.h"
98418dba
CW
9212
9213/* Override any gcc2 internal prototype to avoid an error. */
9214#ifdef __cplusplus
9215extern "C"
9216#endif
9217/* We use char because int might match the return type of a gcc2
9218 builtin and then its argument prototype would still apply. */
9219char kvm_open ();
503d2be0
AS
9220int
9221main ()
9222{
98418dba 9223kvm_open ();
503d2be0
AS
9224 ;
9225 return 0;
9226}
9227_ACEOF
9228rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 9229if { (eval echo "$as_me:9229: \"$ac_link\"") >&5
503d2be0
AS
9230 (eval $ac_link) 2>&5
9231 ac_status=$?
925c2f3f 9232 echo "$as_me:9232: \$? = $ac_status" >&5
503d2be0
AS
9233 (exit $ac_status); } &&
9234 { ac_try='test -s conftest$ac_exeext'
925c2f3f 9235 { (eval echo "$as_me:9235: \"$ac_try\"") >&5
503d2be0
AS
9236 (eval $ac_try) 2>&5
9237 ac_status=$?
925c2f3f 9238 echo "$as_me:9238: \$? = $ac_status" >&5
503d2be0 9239 (exit $ac_status); }; }; then
98418dba 9240 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
9241else
9242 echo "$as_me: failed program was:" >&5
9243cat conftest.$ac_ext >&5
98418dba 9244ac_cv_lib_kvm_kvm_open=no
503d2be0
AS
9245fi
9246rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 9247LIBS=$ac_check_lib_save_LIBS
503d2be0 9248fi
925c2f3f 9249echo "$as_me:9249: result: $ac_cv_lib_kvm_kvm_open" >&5
98418dba
CW
9250echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6
9251if test $ac_cv_lib_kvm_kvm_open = yes; then
9252 LIBS="-lkvm $LIBS"
ba4481b5
DL
9253fi
9254
98418dba 9255 # Check for the 4.4BSD definition of getloadavg.
925c2f3f 9256 echo "$as_me:9256: checking for getloadavg in -lutil" >&5
98418dba
CW
9257echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6
9258if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 9259 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9260else
98418dba
CW
9261 ac_check_lib_save_LIBS=$LIBS
9262LIBS="-lutil $LIBS"
9263cat >conftest.$ac_ext <<_ACEOF
925c2f3f 9264#line 9264 "configure"
ba4481b5 9265#include "confdefs.h"
98418dba
CW
9266
9267/* Override any gcc2 internal prototype to avoid an error. */
9268#ifdef __cplusplus
9269extern "C"
9270#endif
9271/* We use char because int might match the return type of a gcc2
9272 builtin and then its argument prototype would still apply. */
9273char getloadavg ();
503d2be0
AS
9274int
9275main ()
9276{
98418dba 9277getloadavg ();
503d2be0
AS
9278 ;
9279 return 0;
9280}
9281_ACEOF
9282rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 9283if { (eval echo "$as_me:9283: \"$ac_link\"") >&5
503d2be0
AS
9284 (eval $ac_link) 2>&5
9285 ac_status=$?
925c2f3f 9286 echo "$as_me:9286: \$? = $ac_status" >&5
503d2be0
AS
9287 (exit $ac_status); } &&
9288 { ac_try='test -s conftest$ac_exeext'
925c2f3f 9289 { (eval echo "$as_me:9289: \"$ac_try\"") >&5
503d2be0
AS
9290 (eval $ac_try) 2>&5
9291 ac_status=$?
925c2f3f 9292 echo "$as_me:9292: \$? = $ac_status" >&5
503d2be0 9293 (exit $ac_status); }; }; then
98418dba 9294 ac_cv_lib_util_getloadavg=yes
ba4481b5 9295else
503d2be0
AS
9296 echo "$as_me: failed program was:" >&5
9297cat conftest.$ac_ext >&5
98418dba 9298ac_cv_lib_util_getloadavg=no
ba4481b5 9299fi
503d2be0 9300rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9301LIBS=$ac_check_lib_save_LIBS
9302fi
925c2f3f 9303echo "$as_me:9303: result: $ac_cv_lib_util_getloadavg" >&5
98418dba
CW
9304echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6
9305if test $ac_cv_lib_util_getloadavg = yes; then
9306 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 9307fi
503d2be0 9308
98418dba 9309fi
ba4481b5 9310
98418dba
CW
9311if test $ac_have_func = no; then
9312 # There is a commonly available library for RS/6000 AIX.
9313 # Since it is not a standard part of AIX, it might be installed locally.
9314 ac_getloadavg_LIBS=$LIBS
9315 LIBS="-L/usr/local/lib $LIBS"
925c2f3f 9316 echo "$as_me:9316: checking for getloadavg in -lgetloadavg" >&5
98418dba
CW
9317echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6
9318if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 9319 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9320else
98418dba
CW
9321 ac_check_lib_save_LIBS=$LIBS
9322LIBS="-lgetloadavg $LIBS"
9323cat >conftest.$ac_ext <<_ACEOF
925c2f3f 9324#line 9324 "configure"
ba4481b5 9325#include "confdefs.h"
ba4481b5 9326
98418dba
CW
9327/* Override any gcc2 internal prototype to avoid an error. */
9328#ifdef __cplusplus
9329extern "C"
9330#endif
9331/* We use char because int might match the return type of a gcc2
9332 builtin and then its argument prototype would still apply. */
9333char getloadavg ();
98418dba
CW
9334int
9335main ()
9336{
9337getloadavg ();
9338 ;
9339 return 0;
9340}
503d2be0 9341_ACEOF
98418dba 9342rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 9343if { (eval echo "$as_me:9343: \"$ac_link\"") >&5
98418dba
CW
9344 (eval $ac_link) 2>&5
9345 ac_status=$?
925c2f3f 9346 echo "$as_me:9346: \$? = $ac_status" >&5
98418dba
CW
9347 (exit $ac_status); } &&
9348 { ac_try='test -s conftest$ac_exeext'
925c2f3f 9349 { (eval echo "$as_me:9349: \"$ac_try\"") >&5
98418dba
CW
9350 (eval $ac_try) 2>&5
9351 ac_status=$?
925c2f3f 9352 echo "$as_me:9352: \$? = $ac_status" >&5
98418dba
CW
9353 (exit $ac_status); }; }; then
9354 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 9355else
98418dba
CW
9356 echo "$as_me: failed program was:" >&5
9357cat conftest.$ac_ext >&5
9358ac_cv_lib_getloadavg_getloadavg=no
9359fi
9360rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9361LIBS=$ac_check_lib_save_LIBS
9362fi
925c2f3f 9363echo "$as_me:9363: result: $ac_cv_lib_getloadavg_getloadavg" >&5
98418dba
CW
9364echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6
9365if test $ac_cv_lib_getloadavg_getloadavg = yes; then
9366 LIBS="-lgetloadavg $LIBS"
9367else
9368 LIBS=$ac_getloadavg_LIBS
ba4481b5 9369fi
ba4481b5
DL
9370
9371fi
98418dba
CW
9372
9373# Make sure it is really in the library, if we think we found it,
9374# otherwise set up the replacement function.
9375
9376for ac_func in getloadavg
9377do
9378as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
925c2f3f 9379echo "$as_me:9379: checking for $ac_func" >&5
503d2be0
AS
9380echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9381if eval "test \"\${$as_ac_var+set}\" = set"; then
9382 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9383else
503d2be0 9384 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 9385#line 9385 "configure"
ba4481b5
DL
9386#include "confdefs.h"
9387/* System header to define __stub macros and hopefully few prototypes,
503d2be0 9388 which can conflict with char $ac_func (); below. */
ba4481b5
DL
9389#include <assert.h>
9390/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9391#ifdef __cplusplus
9392extern "C"
9393#endif
ba4481b5 9394/* We use char because int might match the return type of a gcc2
503d2be0
AS
9395 builtin and then its argument prototype would still apply. */
9396char $ac_func ();
9397char (*f) ();
ba4481b5 9398
503d2be0
AS
9399int
9400main ()
9401{
ba4481b5
DL
9402/* The GNU C library defines this for functions which it implements
9403 to always fail with ENOSYS. Some functions are actually named
9404 something starting with __ and the normal name is an alias. */
9405#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9406choke me
9407#else
503d2be0 9408f = $ac_func;
ba4481b5
DL
9409#endif
9410
503d2be0
AS
9411 ;
9412 return 0;
9413}
9414_ACEOF
9415rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 9416if { (eval echo "$as_me:9416: \"$ac_link\"") >&5
503d2be0
AS
9417 (eval $ac_link) 2>&5
9418 ac_status=$?
925c2f3f 9419 echo "$as_me:9419: \$? = $ac_status" >&5
503d2be0
AS
9420 (exit $ac_status); } &&
9421 { ac_try='test -s conftest$ac_exeext'
925c2f3f 9422 { (eval echo "$as_me:9422: \"$ac_try\"") >&5
503d2be0
AS
9423 (eval $ac_try) 2>&5
9424 ac_status=$?
925c2f3f 9425 echo "$as_me:9425: \$? = $ac_status" >&5
503d2be0
AS
9426 (exit $ac_status); }; }; then
9427 eval "$as_ac_var=yes"
9428else
9429 echo "$as_me: failed program was:" >&5
9430cat conftest.$ac_ext >&5
9431eval "$as_ac_var=no"
9432fi
9433rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9434fi
925c2f3f 9435echo "$as_me:9435: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
9436echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9437if test `eval echo '${'$as_ac_var'}'` = yes; then
925c2f3f 9438 cat >>confdefs.h <<EOF
98418dba 9439#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
925c2f3f 9440EOF
503d2be0 9441
98418dba
CW
9442else
9443 LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
ba4481b5 9444
925c2f3f 9445cat >>confdefs.h <<\EOF
98418dba 9446#define C_GETLOADAVG 1
925c2f3f 9447EOF
ba4481b5 9448
98418dba
CW
9449# Figure out what our getloadavg.c needs.
9450ac_have_func=no
925c2f3f 9451echo "$as_me:9451: checking for sys/dg_sys_info.h" >&5
98418dba
CW
9452echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
9453if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 9454 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9455else
925c2f3f
EZ
9456 cat >conftest.$ac_ext <<_ACEOF
9457#line 9457 "configure"
98418dba
CW
9458#include "confdefs.h"
9459#include <sys/dg_sys_info.h>
9460_ACEOF
925c2f3f 9461if { (eval echo "$as_me:9461: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
9462 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9463 ac_status=$?
9464 egrep -v '^ *\+' conftest.er1 >conftest.err
9465 rm -f conftest.er1
9466 cat conftest.err >&5
925c2f3f 9467 echo "$as_me:9467: \$? = $ac_status" >&5
98418dba
CW
9468 (exit $ac_status); } >/dev/null; then
9469 if test -s conftest.err; then
9470 ac_cpp_err=$ac_c_preproc_warn_flag
9471 else
9472 ac_cpp_err=
9473 fi
9474else
9475 ac_cpp_err=yes
ba4481b5 9476fi
98418dba 9477if test -z "$ac_cpp_err"; then
925c2f3f 9478 ac_cv_header_sys_dg_sys_info_h=yes
98418dba
CW
9479else
9480 echo "$as_me: failed program was:" >&5
9481 cat conftest.$ac_ext >&5
925c2f3f 9482 ac_cv_header_sys_dg_sys_info_h=no
ba4481b5 9483fi
98418dba 9484rm -f conftest.err conftest.$ac_ext
98418dba 9485fi
925c2f3f 9486echo "$as_me:9486: result: $ac_cv_header_sys_dg_sys_info_h" >&5
98418dba 9487echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
98418dba
CW
9488if test $ac_cv_header_sys_dg_sys_info_h = yes; then
9489 ac_have_func=yes
ba4481b5 9490
925c2f3f 9491cat >>confdefs.h <<\EOF
98418dba 9492#define DGUX 1
925c2f3f 9493EOF
503d2be0 9494
925c2f3f 9495echo "$as_me:9495: checking for dg_sys_info in -ldgc" >&5
98418dba
CW
9496echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6
9497if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 9498 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9499else
503d2be0 9500 ac_check_lib_save_LIBS=$LIBS
98418dba 9501LIBS="-ldgc $LIBS"
503d2be0 9502cat >conftest.$ac_ext <<_ACEOF
925c2f3f 9503#line 9503 "configure"
ba4481b5 9504#include "confdefs.h"
503d2be0 9505
ba4481b5 9506/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9507#ifdef __cplusplus
9508extern "C"
9509#endif
ba4481b5 9510/* We use char because int might match the return type of a gcc2
503d2be0 9511 builtin and then its argument prototype would still apply. */
98418dba 9512char dg_sys_info ();
503d2be0
AS
9513int
9514main ()
9515{
98418dba 9516dg_sys_info ();
503d2be0
AS
9517 ;
9518 return 0;
9519}
9520_ACEOF
9521rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 9522if { (eval echo "$as_me:9522: \"$ac_link\"") >&5
503d2be0
AS
9523 (eval $ac_link) 2>&5
9524 ac_status=$?
925c2f3f 9525 echo "$as_me:9525: \$? = $ac_status" >&5
503d2be0
AS
9526 (exit $ac_status); } &&
9527 { ac_try='test -s conftest$ac_exeext'
925c2f3f 9528 { (eval echo "$as_me:9528: \"$ac_try\"") >&5
503d2be0
AS
9529 (eval $ac_try) 2>&5
9530 ac_status=$?
925c2f3f 9531 echo "$as_me:9531: \$? = $ac_status" >&5
503d2be0 9532 (exit $ac_status); }; }; then
98418dba 9533 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
9534else
9535 echo "$as_me: failed program was:" >&5
9536cat conftest.$ac_ext >&5
98418dba 9537ac_cv_lib_dgc_dg_sys_info=no
503d2be0
AS
9538fi
9539rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9540LIBS=$ac_check_lib_save_LIBS
9541fi
925c2f3f 9542echo "$as_me:9542: result: $ac_cv_lib_dgc_dg_sys_info" >&5
98418dba
CW
9543echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6
9544if test $ac_cv_lib_dgc_dg_sys_info = yes; then
925c2f3f 9545 cat >>confdefs.h <<EOF
98418dba 9546#define HAVE_LIBDGC 1
925c2f3f 9547EOF
ba4481b5 9548
98418dba 9549 LIBS="-ldgc $LIBS"
ba4481b5 9550
ba4481b5
DL
9551fi
9552
98418dba 9553fi
503d2be0 9554
925c2f3f 9555echo "$as_me:9555: checking for locale.h" >&5
98418dba
CW
9556echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
9557if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 9558 echo $ECHO_N "(cached) $ECHO_C" >&6
503d2be0 9559else
925c2f3f
EZ
9560 cat >conftest.$ac_ext <<_ACEOF
9561#line 9561 "configure"
ba4481b5 9562#include "confdefs.h"
98418dba 9563#include <locale.h>
503d2be0 9564_ACEOF
925c2f3f 9565if { (eval echo "$as_me:9565: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 9566 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 9567 ac_status=$?
98418dba
CW
9568 egrep -v '^ *\+' conftest.er1 >conftest.err
9569 rm -f conftest.er1
9570 cat conftest.err >&5
925c2f3f 9571 echo "$as_me:9571: \$? = $ac_status" >&5
98418dba
CW
9572 (exit $ac_status); } >/dev/null; then
9573 if test -s conftest.err; then
9574 ac_cpp_err=$ac_c_preproc_warn_flag
9575 else
9576 ac_cpp_err=
9577 fi
503d2be0 9578else
98418dba 9579 ac_cpp_err=yes
503d2be0 9580fi
98418dba 9581if test -z "$ac_cpp_err"; then
925c2f3f 9582 ac_cv_header_locale_h=yes
98418dba
CW
9583else
9584 echo "$as_me: failed program was:" >&5
9585 cat conftest.$ac_ext >&5
925c2f3f 9586 ac_cv_header_locale_h=no
ba4481b5 9587fi
98418dba 9588rm -f conftest.err conftest.$ac_ext
ba4481b5 9589fi
925c2f3f 9590echo "$as_me:9590: result: $ac_cv_header_locale_h" >&5
98418dba
CW
9591echo "${ECHO_T}$ac_cv_header_locale_h" >&6
9592
98418dba 9593for ac_func in setlocale
ba4481b5 9594do
503d2be0 9595as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
925c2f3f 9596echo "$as_me:9596: checking for $ac_func" >&5
503d2be0
AS
9597echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9598if eval "test \"\${$as_ac_var+set}\" = set"; then
9599 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9600else
503d2be0 9601 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 9602#line 9602 "configure"
ba4481b5
DL
9603#include "confdefs.h"
9604/* System header to define __stub macros and hopefully few prototypes,
503d2be0 9605 which can conflict with char $ac_func (); below. */
ba4481b5
DL
9606#include <assert.h>
9607/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9608#ifdef __cplusplus
9609extern "C"
9610#endif
ba4481b5 9611/* We use char because int might match the return type of a gcc2
503d2be0
AS
9612 builtin and then its argument prototype would still apply. */
9613char $ac_func ();
9614char (*f) ();
ba4481b5 9615
503d2be0
AS
9616int
9617main ()
9618{
ba4481b5
DL
9619/* The GNU C library defines this for functions which it implements
9620 to always fail with ENOSYS. Some functions are actually named
9621 something starting with __ and the normal name is an alias. */
9622#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9623choke me
9624#else
503d2be0 9625f = $ac_func;
ba4481b5
DL
9626#endif
9627
503d2be0
AS
9628 ;
9629 return 0;
9630}
9631_ACEOF
9632rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 9633if { (eval echo "$as_me:9633: \"$ac_link\"") >&5
503d2be0
AS
9634 (eval $ac_link) 2>&5
9635 ac_status=$?
925c2f3f 9636 echo "$as_me:9636: \$? = $ac_status" >&5
503d2be0
AS
9637 (exit $ac_status); } &&
9638 { ac_try='test -s conftest$ac_exeext'
925c2f3f 9639 { (eval echo "$as_me:9639: \"$ac_try\"") >&5
503d2be0
AS
9640 (eval $ac_try) 2>&5
9641 ac_status=$?
925c2f3f 9642 echo "$as_me:9642: \$? = $ac_status" >&5
503d2be0
AS
9643 (exit $ac_status); }; }; then
9644 eval "$as_ac_var=yes"
9645else
9646 echo "$as_me: failed program was:" >&5
9647cat conftest.$ac_ext >&5
9648eval "$as_ac_var=no"
9649fi
9650rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9651fi
925c2f3f 9652echo "$as_me:9652: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
9653echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9654if test `eval echo '${'$as_ac_var'}'` = yes; then
925c2f3f 9655 cat >>confdefs.h <<EOF
503d2be0 9656#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
925c2f3f 9657EOF
ba4481b5 9658
ba4481b5
DL
9659fi
9660done
9661
98418dba
CW
9662# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
9663# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
9664# Irix 4.0.5F has the header but not the library.
9665if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
9666 ac_have_func=yes
9667
925c2f3f 9668cat >>confdefs.h <<\EOF
98418dba 9669#define SVR4 1
925c2f3f 9670EOF
98418dba
CW
9671
9672fi
9673
9674if test $ac_have_func = no; then
925c2f3f 9675 echo "$as_me:9675: checking for inq_stats/cpustats.h" >&5
98418dba
CW
9676echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
9677if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 9678 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 9679else
925c2f3f
EZ
9680 cat >conftest.$ac_ext <<_ACEOF
9681#line 9681 "configure"
98418dba
CW
9682#include "confdefs.h"
9683#include <inq_stats/cpustats.h>
503d2be0 9684_ACEOF
925c2f3f 9685if { (eval echo "$as_me:9685: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9686 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9687 ac_status=$?
9688 egrep -v '^ *\+' conftest.er1 >conftest.err
9689 rm -f conftest.er1
9690 cat conftest.err >&5
925c2f3f 9691 echo "$as_me:9691: \$? = $ac_status" >&5
503d2be0
AS
9692 (exit $ac_status); } >/dev/null; then
9693 if test -s conftest.err; then
9694 ac_cpp_err=$ac_c_preproc_warn_flag
9695 else
9696 ac_cpp_err=
9697 fi
9698else
9699 ac_cpp_err=yes
9700fi
9701if test -z "$ac_cpp_err"; then
925c2f3f 9702 ac_cv_header_inq_stats_cpustats_h=yes
503d2be0
AS
9703else
9704 echo "$as_me: failed program was:" >&5
ba4481b5 9705 cat conftest.$ac_ext >&5
925c2f3f 9706 ac_cv_header_inq_stats_cpustats_h=no
ba4481b5 9707fi
503d2be0 9708rm -f conftest.err conftest.$ac_ext
ba4481b5 9709fi
925c2f3f 9710echo "$as_me:9710: result: $ac_cv_header_inq_stats_cpustats_h" >&5
98418dba 9711echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
98418dba
CW
9712if test $ac_cv_header_inq_stats_cpustats_h = yes; then
9713 ac_have_func=yes
ba4481b5 9714
925c2f3f 9715cat >>confdefs.h <<\EOF
98418dba 9716#define UMAX 1
925c2f3f 9717EOF
98418dba 9718
925c2f3f 9719cat >>confdefs.h <<\EOF
98418dba 9720#define UMAX4_3 1
925c2f3f 9721EOF
98418dba
CW
9722
9723fi
9724
98418dba
CW
9725fi
9726
9727if test $ac_have_func = no; then
925c2f3f 9728 echo "$as_me:9728: checking for sys/cpustats.h" >&5
98418dba
CW
9729echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
9730if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 9731 echo $ECHO_N "(cached) $ECHO_C" >&6
503d2be0 9732else
925c2f3f
EZ
9733 cat >conftest.$ac_ext <<_ACEOF
9734#line 9734 "configure"
98418dba
CW
9735#include "confdefs.h"
9736#include <sys/cpustats.h>
9737_ACEOF
925c2f3f 9738if { (eval echo "$as_me:9738: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
9739 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9740 ac_status=$?
9741 egrep -v '^ *\+' conftest.er1 >conftest.err
9742 rm -f conftest.er1
9743 cat conftest.err >&5
925c2f3f 9744 echo "$as_me:9744: \$? = $ac_status" >&5
98418dba
CW
9745 (exit $ac_status); } >/dev/null; then
9746 if test -s conftest.err; then
9747 ac_cpp_err=$ac_c_preproc_warn_flag
9748 else
9749 ac_cpp_err=
9750 fi
9751else
9752 ac_cpp_err=yes
503d2be0 9753fi
98418dba 9754if test -z "$ac_cpp_err"; then
925c2f3f 9755 ac_cv_header_sys_cpustats_h=yes
98418dba
CW
9756else
9757 echo "$as_me: failed program was:" >&5
9758 cat conftest.$ac_ext >&5
925c2f3f 9759 ac_cv_header_sys_cpustats_h=no
98418dba
CW
9760fi
9761rm -f conftest.err conftest.$ac_ext
98418dba 9762fi
925c2f3f 9763echo "$as_me:9763: result: $ac_cv_header_sys_cpustats_h" >&5
98418dba 9764echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
98418dba 9765if test $ac_cv_header_sys_cpustats_h = yes; then
925c2f3f 9766 ac_have_func=yes; cat >>confdefs.h <<\EOF
98418dba 9767#define UMAX 1
925c2f3f 9768EOF
ba4481b5 9769
98418dba
CW
9770fi
9771
98418dba
CW
9772fi
9773
9774if test $ac_have_func = no; then
9775
9776for ac_header in mach/mach.h
2c9dccc9
PJ
9777do
9778as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
925c2f3f 9779echo "$as_me:9779: checking for $ac_header" >&5
2c9dccc9
PJ
9780echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9781if eval "test \"\${$as_ac_Header+set}\" = set"; then
9782 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 9783else
925c2f3f
EZ
9784 cat >conftest.$ac_ext <<_ACEOF
9785#line 9785 "configure"
2c9dccc9
PJ
9786#include "confdefs.h"
9787#include <$ac_header>
9788_ACEOF
925c2f3f 9789if { (eval echo "$as_me:9789: \"$ac_cpp conftest.$ac_ext\"") >&5
2c9dccc9
PJ
9790 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9791 ac_status=$?
9792 egrep -v '^ *\+' conftest.er1 >conftest.err
9793 rm -f conftest.er1
9794 cat conftest.err >&5
925c2f3f 9795 echo "$as_me:9795: \$? = $ac_status" >&5
2c9dccc9
PJ
9796 (exit $ac_status); } >/dev/null; then
9797 if test -s conftest.err; then
9798 ac_cpp_err=$ac_c_preproc_warn_flag
9799 else
9800 ac_cpp_err=
9801 fi
9802else
9803 ac_cpp_err=yes
9804fi
9805if test -z "$ac_cpp_err"; then
925c2f3f 9806 eval "$as_ac_Header=yes"
2c9dccc9
PJ
9807else
9808 echo "$as_me: failed program was:" >&5
9809 cat conftest.$ac_ext >&5
925c2f3f 9810 eval "$as_ac_Header=no"
2c9dccc9
PJ
9811fi
9812rm -f conftest.err conftest.$ac_ext
9813fi
925c2f3f 9814echo "$as_me:9814: result: `eval echo '${'$as_ac_Header'}'`" >&5
2c9dccc9
PJ
9815echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9816if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 9817 cat >>confdefs.h <<EOF
2c9dccc9 9818#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 9819EOF
2c9dccc9
PJ
9820
9821fi
9822done
9823
98418dba
CW
9824fi
9825
98418dba 9826for ac_header in nlist.h
b5de8dc0 9827do
503d2be0 9828as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
925c2f3f
EZ
9829echo "$as_me:9829: checking for $ac_header" >&5
9830echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9831if eval "test \"\${$as_ac_Header+set}\" = set"; then
9832 echo $ECHO_N "(cached) $ECHO_C" >&6
9833else
9834 cat >conftest.$ac_ext <<_ACEOF
9835#line 9835 "configure"
503d2be0
AS
9836#include "confdefs.h"
9837#include <$ac_header>
9838_ACEOF
925c2f3f 9839if { (eval echo "$as_me:9839: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9840 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9841 ac_status=$?
9842 egrep -v '^ *\+' conftest.er1 >conftest.err
9843 rm -f conftest.er1
9844 cat conftest.err >&5
925c2f3f 9845 echo "$as_me:9845: \$? = $ac_status" >&5
503d2be0
AS
9846 (exit $ac_status); } >/dev/null; then
9847 if test -s conftest.err; then
9848 ac_cpp_err=$ac_c_preproc_warn_flag
9849 else
9850 ac_cpp_err=
9851 fi
9852else
9853 ac_cpp_err=yes
9854fi
9855if test -z "$ac_cpp_err"; then
925c2f3f 9856 eval "$as_ac_Header=yes"
503d2be0
AS
9857else
9858 echo "$as_me: failed program was:" >&5
b5de8dc0 9859 cat conftest.$ac_ext >&5
925c2f3f 9860 eval "$as_ac_Header=no"
b5de8dc0 9861fi
503d2be0 9862rm -f conftest.err conftest.$ac_ext
b5de8dc0 9863fi
925c2f3f 9864echo "$as_me:9864: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 9865echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 9866if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 9867 cat >>confdefs.h <<EOF
98418dba 9868#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f
EZ
9869EOF
9870 echo "$as_me:9870: checking for struct nlist.n_un.n_name" >&5
98418dba
CW
9871echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6
9872if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 9873 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 9874else
503d2be0 9875 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 9876#line 9876 "configure"
b5de8dc0 9877#include "confdefs.h"
98418dba 9878#include <nlist.h>
b5de8dc0 9879
503d2be0
AS
9880int
9881main ()
9882{
98418dba
CW
9883static struct nlist ac_aggr;
9884if (ac_aggr.n_un.n_name)
9885return 0;
503d2be0
AS
9886 ;
9887 return 0;
9888}
9889_ACEOF
98418dba 9890rm -f conftest.$ac_objext
925c2f3f 9891if { (eval echo "$as_me:9891: \"$ac_compile\"") >&5
98418dba 9892 (eval $ac_compile) 2>&5
503d2be0 9893 ac_status=$?
925c2f3f 9894 echo "$as_me:9894: \$? = $ac_status" >&5
503d2be0 9895 (exit $ac_status); } &&
98418dba 9896 { ac_try='test -s conftest.$ac_objext'
925c2f3f 9897 { (eval echo "$as_me:9897: \"$ac_try\"") >&5
503d2be0
AS
9898 (eval $ac_try) 2>&5
9899 ac_status=$?
925c2f3f 9900 echo "$as_me:9900: \$? = $ac_status" >&5
503d2be0 9901 (exit $ac_status); }; }; then
98418dba 9902 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
9903else
9904 echo "$as_me: failed program was:" >&5
9905cat conftest.$ac_ext >&5
98418dba 9906ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 9907fi
98418dba 9908rm -f conftest.$ac_objext conftest.$ac_ext
b5de8dc0 9909fi
925c2f3f 9910echo "$as_me:9910: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
98418dba
CW
9911echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6
9912if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 9913
925c2f3f 9914cat >>confdefs.h <<EOF
98418dba 9915#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
925c2f3f 9916EOF
b5de8dc0 9917
925c2f3f 9918cat >>confdefs.h <<\EOF
98418dba 9919#define NLIST_NAME_UNION 1
925c2f3f 9920EOF
b5de8dc0 9921
98418dba 9922fi
b5de8dc0 9923
98418dba 9924fi
98418dba 9925done
b5de8dc0 9926
98418dba
CW
9927fi
9928done
b5de8dc0 9929
98418dba 9930# Some definitions of getloadavg require that the program be installed setgid.
925c2f3f 9931echo "$as_me:9931: checking whether getloadavg requires setgid" >&5
98418dba
CW
9932echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6
9933if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
9934 echo $ECHO_N "(cached) $ECHO_C" >&6
9935else
9936 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 9937#line 9937 "configure"
98418dba
CW
9938#include "confdefs.h"
9939#include "$srcdir/getloadavg.c"
9940#ifdef LDAV_PRIVILEGED
9941Yowza Am I SETGID yet
9942#endif
9943_ACEOF
9944if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9945 egrep "Yowza Am I SETGID yet" >/dev/null 2>&1; then
9946 ac_cv_func_getloadavg_setgid=yes
9947else
9948 ac_cv_func_getloadavg_setgid=no
9949fi
9950rm -f conftest*
b5de8dc0 9951
98418dba 9952fi
925c2f3f 9953echo "$as_me:9953: result: $ac_cv_func_getloadavg_setgid" >&5
98418dba
CW
9954echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6
9955if test $ac_cv_func_getloadavg_setgid = yes; then
9956 NEED_SETGID=true
b5de8dc0 9957
925c2f3f 9958cat >>confdefs.h <<\EOF
98418dba 9959#define GETLOADAVG_PRIVILEGED 1
925c2f3f 9960EOF
98418dba 9961
b5de8dc0 9962else
98418dba 9963 NEED_SETGID=false
b5de8dc0 9964fi
98418dba
CW
9965
9966if test $ac_cv_func_getloadavg_setgid = yes; then
925c2f3f 9967 echo "$as_me:9967: checking group of /dev/kmem" >&5
98418dba
CW
9968echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6
9969if test "${ac_cv_group_kmem+set}" = set; then
9970 echo $ECHO_N "(cached) $ECHO_C" >&6
9971else
9972 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
9973 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
9974 # If we got an error (system does not support symlinks), try without -L.
9975 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
9976 ac_cv_group_kmem=`echo $ac_ls_output \
9977 | sed -ne 's/[ ][ ]*/ /g;
9978 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
9979 / /s/.* //;p;'`
9980
b5de8dc0 9981fi
925c2f3f 9982echo "$as_me:9982: result: $ac_cv_group_kmem" >&5
98418dba
CW
9983echo "${ECHO_T}$ac_cv_group_kmem" >&6
9984 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 9985fi
98418dba
CW
9986if test "x$ac_save_LIBS" = x; then
9987 GETLOADAVG_LIBS=$LIBS
9988else
9989 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 9990fi
98418dba 9991LIBS=$ac_save_LIBS
b5de8dc0 9992
925c2f3f 9993echo "$as_me:9993: checking for _LARGEFILE_SOURCE value needed for large files" >&5
b936fae4
AS
9994echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9995if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 9996 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9997else
b936fae4
AS
9998 while :; do
9999 ac_cv_sys_largefile_source=no
503d2be0 10000 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10001#line 10001 "configure"
4c343001 10002#include "confdefs.h"
b936fae4 10003#include <stdio.h>
503d2be0
AS
10004int
10005main ()
10006{
b936fae4
AS
10007return !fseeko;
10008 ;
10009 return 0;
10010}
10011_ACEOF
10012rm -f conftest.$ac_objext
925c2f3f 10013if { (eval echo "$as_me:10013: \"$ac_compile\"") >&5
b936fae4
AS
10014 (eval $ac_compile) 2>&5
10015 ac_status=$?
925c2f3f 10016 echo "$as_me:10016: \$? = $ac_status" >&5
b936fae4
AS
10017 (exit $ac_status); } &&
10018 { ac_try='test -s conftest.$ac_objext'
925c2f3f 10019 { (eval echo "$as_me:10019: \"$ac_try\"") >&5
b936fae4
AS
10020 (eval $ac_try) 2>&5
10021 ac_status=$?
925c2f3f 10022 echo "$as_me:10022: \$? = $ac_status" >&5
b936fae4
AS
10023 (exit $ac_status); }; }; then
10024 break
10025else
10026 echo "$as_me: failed program was:" >&5
10027cat conftest.$ac_ext >&5
10028fi
10029rm -f conftest.$ac_objext conftest.$ac_ext
10030 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10031#line 10031 "configure"
b936fae4
AS
10032#include "confdefs.h"
10033#define _LARGEFILE_SOURCE 1
10034#include <stdio.h>
b936fae4
AS
10035int
10036main ()
10037{
10038return !fseeko;
10039 ;
10040 return 0;
10041}
10042_ACEOF
10043rm -f conftest.$ac_objext
925c2f3f 10044if { (eval echo "$as_me:10044: \"$ac_compile\"") >&5
b936fae4
AS
10045 (eval $ac_compile) 2>&5
10046 ac_status=$?
925c2f3f 10047 echo "$as_me:10047: \$? = $ac_status" >&5
b936fae4
AS
10048 (exit $ac_status); } &&
10049 { ac_try='test -s conftest.$ac_objext'
925c2f3f 10050 { (eval echo "$as_me:10050: \"$ac_try\"") >&5
b936fae4
AS
10051 (eval $ac_try) 2>&5
10052 ac_status=$?
925c2f3f 10053 echo "$as_me:10053: \$? = $ac_status" >&5
b936fae4
AS
10054 (exit $ac_status); }; }; then
10055 ac_cv_sys_largefile_source=1; break
10056else
10057 echo "$as_me: failed program was:" >&5
10058cat conftest.$ac_ext >&5
10059fi
10060rm -f conftest.$ac_objext conftest.$ac_ext
10061 break
10062done
10063fi
925c2f3f 10064echo "$as_me:10064: result: $ac_cv_sys_largefile_source" >&5
b936fae4
AS
10065echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10066if test "$ac_cv_sys_largefile_source" != no; then
10067
925c2f3f 10068cat >>confdefs.h <<EOF
b936fae4 10069#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
925c2f3f 10070EOF
b936fae4
AS
10071
10072fi
10073rm -f conftest*
4c343001 10074
b936fae4
AS
10075# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10076# in glibc 2.1.3, but that breaks too many other things.
10077# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
925c2f3f 10078echo "$as_me:10078: checking for fseeko" >&5
b936fae4
AS
10079echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10080if test "${ac_cv_func_fseeko+set}" = set; then
10081 echo $ECHO_N "(cached) $ECHO_C" >&6
10082else
10083 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10084#line 10084 "configure"
b936fae4
AS
10085#include "confdefs.h"
10086#include <stdio.h>
b936fae4
AS
10087int
10088main ()
10089{
10090return fseeko && fseeko (stdin, 0, 0);
503d2be0
AS
10091 ;
10092 return 0;
10093}
10094_ACEOF
10095rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 10096if { (eval echo "$as_me:10096: \"$ac_link\"") >&5
503d2be0
AS
10097 (eval $ac_link) 2>&5
10098 ac_status=$?
925c2f3f 10099 echo "$as_me:10099: \$? = $ac_status" >&5
503d2be0
AS
10100 (exit $ac_status); } &&
10101 { ac_try='test -s conftest$ac_exeext'
925c2f3f 10102 { (eval echo "$as_me:10102: \"$ac_try\"") >&5
503d2be0
AS
10103 (eval $ac_try) 2>&5
10104 ac_status=$?
925c2f3f 10105 echo "$as_me:10105: \$? = $ac_status" >&5
503d2be0 10106 (exit $ac_status); }; }; then
b936fae4 10107 ac_cv_func_fseeko=yes
503d2be0
AS
10108else
10109 echo "$as_me: failed program was:" >&5
10110cat conftest.$ac_ext >&5
b936fae4 10111ac_cv_func_fseeko=no
503d2be0
AS
10112fi
10113rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10114fi
925c2f3f 10115echo "$as_me:10115: result: $ac_cv_func_fseeko" >&5
b936fae4
AS
10116echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10117if test $ac_cv_func_fseeko = yes; then
10118
925c2f3f 10119cat >>confdefs.h <<\EOF
b936fae4 10120#define HAVE_FSEEKO 1
925c2f3f 10121EOF
b936fae4 10122
4c343001
DL
10123fi
10124
b936fae4
AS
10125# UNIX98 PTYs.
10126
10127for ac_func in grantpt
503d2be0
AS
10128do
10129as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
925c2f3f 10130echo "$as_me:10130: checking for $ac_func" >&5
503d2be0
AS
10131echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10132if eval "test \"\${$as_ac_var+set}\" = set"; then
10133 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 10134else
503d2be0 10135 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10136#line 10136 "configure"
4c343001 10137#include "confdefs.h"
503d2be0
AS
10138/* System header to define __stub macros and hopefully few prototypes,
10139 which can conflict with char $ac_func (); below. */
10140#include <assert.h>
4c343001 10141/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10142#ifdef __cplusplus
10143extern "C"
10144#endif
4c343001 10145/* We use char because int might match the return type of a gcc2
503d2be0
AS
10146 builtin and then its argument prototype would still apply. */
10147char $ac_func ();
10148char (*f) ();
10149
10150int
10151main ()
10152{
10153/* The GNU C library defines this for functions which it implements
10154 to always fail with ENOSYS. Some functions are actually named
10155 something starting with __ and the normal name is an alias. */
10156#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10157choke me
10158#else
10159f = $ac_func;
10160#endif
4c343001 10161
503d2be0
AS
10162 ;
10163 return 0;
10164}
10165_ACEOF
10166rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 10167if { (eval echo "$as_me:10167: \"$ac_link\"") >&5
503d2be0
AS
10168 (eval $ac_link) 2>&5
10169 ac_status=$?
925c2f3f 10170 echo "$as_me:10170: \$? = $ac_status" >&5
503d2be0
AS
10171 (exit $ac_status); } &&
10172 { ac_try='test -s conftest$ac_exeext'
925c2f3f 10173 { (eval echo "$as_me:10173: \"$ac_try\"") >&5
503d2be0
AS
10174 (eval $ac_try) 2>&5
10175 ac_status=$?
925c2f3f 10176 echo "$as_me:10176: \$? = $ac_status" >&5
503d2be0
AS
10177 (exit $ac_status); }; }; then
10178 eval "$as_ac_var=yes"
10179else
10180 echo "$as_me: failed program was:" >&5
10181cat conftest.$ac_ext >&5
10182eval "$as_ac_var=no"
10183fi
10184rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10185fi
925c2f3f 10186echo "$as_me:10186: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
10187echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10188if test `eval echo '${'$as_ac_var'}'` = yes; then
925c2f3f 10189 cat >>confdefs.h <<EOF
503d2be0 10190#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
925c2f3f 10191EOF
4c343001
DL
10192
10193fi
503d2be0
AS
10194done
10195
b936fae4 10196# PTY-related GNU extensions.
4c343001 10197
b936fae4
AS
10198for ac_func in getpt
10199do
10200as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
925c2f3f 10201echo "$as_me:10201: checking for $ac_func" >&5
b936fae4
AS
10202echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10203if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 10204 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 10205else
b936fae4 10206 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10207#line 10207 "configure"
087121cc
GM
10208#include "confdefs.h"
10209/* System header to define __stub macros and hopefully few prototypes,
503d2be0 10210 which can conflict with char $ac_func (); below. */
087121cc
GM
10211#include <assert.h>
10212/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10213#ifdef __cplusplus
10214extern "C"
10215#endif
087121cc 10216/* We use char because int might match the return type of a gcc2
503d2be0
AS
10217 builtin and then its argument prototype would still apply. */
10218char $ac_func ();
10219char (*f) ();
087121cc 10220
503d2be0
AS
10221int
10222main ()
10223{
087121cc
GM
10224/* The GNU C library defines this for functions which it implements
10225 to always fail with ENOSYS. Some functions are actually named
10226 something starting with __ and the normal name is an alias. */
10227#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10228choke me
10229#else
503d2be0 10230f = $ac_func;
087121cc
GM
10231#endif
10232
503d2be0
AS
10233 ;
10234 return 0;
10235}
10236_ACEOF
10237rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 10238if { (eval echo "$as_me:10238: \"$ac_link\"") >&5
503d2be0
AS
10239 (eval $ac_link) 2>&5
10240 ac_status=$?
925c2f3f 10241 echo "$as_me:10241: \$? = $ac_status" >&5
503d2be0
AS
10242 (exit $ac_status); } &&
10243 { ac_try='test -s conftest$ac_exeext'
925c2f3f 10244 { (eval echo "$as_me:10244: \"$ac_try\"") >&5
503d2be0
AS
10245 (eval $ac_try) 2>&5
10246 ac_status=$?
925c2f3f 10247 echo "$as_me:10247: \$? = $ac_status" >&5
503d2be0
AS
10248 (exit $ac_status); }; }; then
10249 eval "$as_ac_var=yes"
10250else
10251 echo "$as_me: failed program was:" >&5
10252cat conftest.$ac_ext >&5
10253eval "$as_ac_var=no"
10254fi
10255rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10256fi
925c2f3f 10257echo "$as_me:10257: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
10258echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10259if test `eval echo '${'$as_ac_var'}'` = yes; then
925c2f3f 10260 cat >>confdefs.h <<EOF
503d2be0 10261#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
925c2f3f 10262EOF
087121cc 10263
087121cc
GM
10264fi
10265done
10266
ba4481b5
DL
10267# Check this now, so that we will NOT find the above functions in ncurses.
10268# That is because we have not set up to link ncurses in lib-src.
10269# It's better to believe a function is not available
10270# than to expect to find it in ncurses.
503d2be0 10271
925c2f3f 10272echo "$as_me:10272: checking for tparm in -lncurses" >&5
503d2be0
AS
10273echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6
10274if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
10275 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 10276else
503d2be0 10277 ac_check_lib_save_LIBS=$LIBS
ba4481b5 10278LIBS="-lncurses $LIBS"
503d2be0 10279cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10280#line 10280 "configure"
ba4481b5 10281#include "confdefs.h"
503d2be0 10282
ba4481b5 10283/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10284#ifdef __cplusplus
10285extern "C"
10286#endif
ba4481b5 10287/* We use char because int might match the return type of a gcc2
503d2be0
AS
10288 builtin and then its argument prototype would still apply. */
10289char tparm ();
10290int
10291main ()
10292{
10293tparm ();
10294 ;
10295 return 0;
10296}
10297_ACEOF
10298rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 10299if { (eval echo "$as_me:10299: \"$ac_link\"") >&5
503d2be0
AS
10300 (eval $ac_link) 2>&5
10301 ac_status=$?
925c2f3f 10302 echo "$as_me:10302: \$? = $ac_status" >&5
503d2be0
AS
10303 (exit $ac_status); } &&
10304 { ac_try='test -s conftest$ac_exeext'
925c2f3f 10305 { (eval echo "$as_me:10305: \"$ac_try\"") >&5
503d2be0
AS
10306 (eval $ac_try) 2>&5
10307 ac_status=$?
925c2f3f 10308 echo "$as_me:10308: \$? = $ac_status" >&5
503d2be0
AS
10309 (exit $ac_status); }; }; then
10310 ac_cv_lib_ncurses_tparm=yes
10311else
10312 echo "$as_me: failed program was:" >&5
10313cat conftest.$ac_ext >&5
10314ac_cv_lib_ncurses_tparm=no
10315fi
10316rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10317LIBS=$ac_check_lib_save_LIBS
10318fi
925c2f3f 10319echo "$as_me:10319: result: $ac_cv_lib_ncurses_tparm" >&5
503d2be0
AS
10320echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6
10321if test $ac_cv_lib_ncurses_tparm = yes; then
925c2f3f 10322 cat >>confdefs.h <<EOF
503d2be0 10323#define HAVE_LIBNCURSES 1
925c2f3f 10324EOF
ba4481b5
DL
10325
10326 LIBS="-lncurses $LIBS"
10327
ba4481b5
DL
10328fi
10329
84e70f78
KR
10330# Do we need the Hesiod library to provide the support routines?
10331if test "$with_hesiod" = yes ; then
10332 # Don't set $LIBS here -- see comments above.
10333 resolv=no
925c2f3f 10334 echo "$as_me:10334: checking for res_send" >&5
84e70f78
KR
10335echo $ECHO_N "checking for res_send... $ECHO_C" >&6
10336if test "${ac_cv_func_res_send+set}" = set; then
10337 echo $ECHO_N "(cached) $ECHO_C" >&6
10338else
10339 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10340#line 10340 "configure"
84e70f78
KR
10341#include "confdefs.h"
10342/* System header to define __stub macros and hopefully few prototypes,
10343 which can conflict with char res_send (); below. */
10344#include <assert.h>
10345/* Override any gcc2 internal prototype to avoid an error. */
10346#ifdef __cplusplus
10347extern "C"
10348#endif
10349/* We use char because int might match the return type of a gcc2
10350 builtin and then its argument prototype would still apply. */
10351char res_send ();
10352char (*f) ();
10353
10354int
10355main ()
10356{
10357/* The GNU C library defines this for functions which it implements
10358 to always fail with ENOSYS. Some functions are actually named
10359 something starting with __ and the normal name is an alias. */
10360#if defined (__stub_res_send) || defined (__stub___res_send)
10361choke me
10362#else
10363f = res_send;
10364#endif
10365
10366 ;
10367 return 0;
10368}
10369_ACEOF
10370rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 10371if { (eval echo "$as_me:10371: \"$ac_link\"") >&5
84e70f78
KR
10372 (eval $ac_link) 2>&5
10373 ac_status=$?
925c2f3f 10374 echo "$as_me:10374: \$? = $ac_status" >&5
84e70f78
KR
10375 (exit $ac_status); } &&
10376 { ac_try='test -s conftest$ac_exeext'
925c2f3f 10377 { (eval echo "$as_me:10377: \"$ac_try\"") >&5
84e70f78
KR
10378 (eval $ac_try) 2>&5
10379 ac_status=$?
925c2f3f 10380 echo "$as_me:10380: \$? = $ac_status" >&5
84e70f78
KR
10381 (exit $ac_status); }; }; then
10382 ac_cv_func_res_send=yes
10383else
10384 echo "$as_me: failed program was:" >&5
10385cat conftest.$ac_ext >&5
10386ac_cv_func_res_send=no
10387fi
10388rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10389fi
925c2f3f 10390echo "$as_me:10390: result: $ac_cv_func_res_send" >&5
84e70f78
KR
10391echo "${ECHO_T}$ac_cv_func_res_send" >&6
10392if test $ac_cv_func_res_send = yes; then
10393 :
10394else
925c2f3f 10395 echo "$as_me:10395: checking for __res_send" >&5
84e70f78
KR
10396echo $ECHO_N "checking for __res_send... $ECHO_C" >&6
10397if test "${ac_cv_func___res_send+set}" = set; then
10398 echo $ECHO_N "(cached) $ECHO_C" >&6
10399else
10400 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10401#line 10401 "configure"
84e70f78
KR
10402#include "confdefs.h"
10403/* System header to define __stub macros and hopefully few prototypes,
10404 which can conflict with char __res_send (); below. */
10405#include <assert.h>
10406/* Override any gcc2 internal prototype to avoid an error. */
10407#ifdef __cplusplus
10408extern "C"
10409#endif
10410/* We use char because int might match the return type of a gcc2
10411 builtin and then its argument prototype would still apply. */
10412char __res_send ();
10413char (*f) ();
10414
10415int
10416main ()
10417{
10418/* The GNU C library defines this for functions which it implements
10419 to always fail with ENOSYS. Some functions are actually named
10420 something starting with __ and the normal name is an alias. */
10421#if defined (__stub___res_send) || defined (__stub_____res_send)
10422choke me
10423#else
10424f = __res_send;
10425#endif
10426
10427 ;
10428 return 0;
10429}
10430_ACEOF
10431rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 10432if { (eval echo "$as_me:10432: \"$ac_link\"") >&5
84e70f78
KR
10433 (eval $ac_link) 2>&5
10434 ac_status=$?
925c2f3f 10435 echo "$as_me:10435: \$? = $ac_status" >&5
84e70f78
KR
10436 (exit $ac_status); } &&
10437 { ac_try='test -s conftest$ac_exeext'
925c2f3f 10438 { (eval echo "$as_me:10438: \"$ac_try\"") >&5
84e70f78
KR
10439 (eval $ac_try) 2>&5
10440 ac_status=$?
925c2f3f 10441 echo "$as_me:10441: \$? = $ac_status" >&5
84e70f78
KR
10442 (exit $ac_status); }; }; then
10443 ac_cv_func___res_send=yes
10444else
10445 echo "$as_me: failed program was:" >&5
10446cat conftest.$ac_ext >&5
10447ac_cv_func___res_send=no
10448fi
10449rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10450fi
925c2f3f 10451echo "$as_me:10451: result: $ac_cv_func___res_send" >&5
84e70f78
KR
10452echo "${ECHO_T}$ac_cv_func___res_send" >&6
10453if test $ac_cv_func___res_send = yes; then
10454 :
10455else
925c2f3f 10456 echo "$as_me:10456: checking for res_send in -lresolv" >&5
84e70f78
KR
10457echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6
10458if test "${ac_cv_lib_resolv_res_send+set}" = set; then
10459 echo $ECHO_N "(cached) $ECHO_C" >&6
10460else
10461 ac_check_lib_save_LIBS=$LIBS
10462LIBS="-lresolv $LIBS"
10463cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10464#line 10464 "configure"
84e70f78
KR
10465#include "confdefs.h"
10466
10467/* Override any gcc2 internal prototype to avoid an error. */
10468#ifdef __cplusplus
10469extern "C"
10470#endif
10471/* We use char because int might match the return type of a gcc2
10472 builtin and then its argument prototype would still apply. */
10473char res_send ();
10474int
10475main ()
10476{
10477res_send ();
10478 ;
10479 return 0;
10480}
10481_ACEOF
10482rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 10483if { (eval echo "$as_me:10483: \"$ac_link\"") >&5
84e70f78
KR
10484 (eval $ac_link) 2>&5
10485 ac_status=$?
925c2f3f 10486 echo "$as_me:10486: \$? = $ac_status" >&5
84e70f78
KR
10487 (exit $ac_status); } &&
10488 { ac_try='test -s conftest$ac_exeext'
925c2f3f 10489 { (eval echo "$as_me:10489: \"$ac_try\"") >&5
84e70f78
KR
10490 (eval $ac_try) 2>&5
10491 ac_status=$?
925c2f3f 10492 echo "$as_me:10492: \$? = $ac_status" >&5
84e70f78
KR
10493 (exit $ac_status); }; }; then
10494 ac_cv_lib_resolv_res_send=yes
10495else
10496 echo "$as_me: failed program was:" >&5
10497cat conftest.$ac_ext >&5
10498ac_cv_lib_resolv_res_send=no
10499fi
10500rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10501LIBS=$ac_check_lib_save_LIBS
10502fi
925c2f3f 10503echo "$as_me:10503: result: $ac_cv_lib_resolv_res_send" >&5
84e70f78
KR
10504echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6
10505if test $ac_cv_lib_resolv_res_send = yes; then
10506 resolv=yes
10507else
925c2f3f 10508 echo "$as_me:10508: checking for __res_send in -lresolv" >&5
84e70f78
KR
10509echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6
10510if test "${ac_cv_lib_resolv___res_send+set}" = set; then
10511 echo $ECHO_N "(cached) $ECHO_C" >&6
10512else
10513 ac_check_lib_save_LIBS=$LIBS
10514LIBS="-lresolv $LIBS"
10515cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10516#line 10516 "configure"
84e70f78
KR
10517#include "confdefs.h"
10518
10519/* Override any gcc2 internal prototype to avoid an error. */
10520#ifdef __cplusplus
10521extern "C"
10522#endif
10523/* We use char because int might match the return type of a gcc2
10524 builtin and then its argument prototype would still apply. */
10525char __res_send ();
10526int
10527main ()
10528{
10529__res_send ();
10530 ;
10531 return 0;
10532}
10533_ACEOF
10534rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 10535if { (eval echo "$as_me:10535: \"$ac_link\"") >&5
84e70f78
KR
10536 (eval $ac_link) 2>&5
10537 ac_status=$?
925c2f3f 10538 echo "$as_me:10538: \$? = $ac_status" >&5
84e70f78
KR
10539 (exit $ac_status); } &&
10540 { ac_try='test -s conftest$ac_exeext'
925c2f3f 10541 { (eval echo "$as_me:10541: \"$ac_try\"") >&5
84e70f78
KR
10542 (eval $ac_try) 2>&5
10543 ac_status=$?
925c2f3f 10544 echo "$as_me:10544: \$? = $ac_status" >&5
84e70f78
KR
10545 (exit $ac_status); }; }; then
10546 ac_cv_lib_resolv___res_send=yes
10547else
10548 echo "$as_me: failed program was:" >&5
10549cat conftest.$ac_ext >&5
10550ac_cv_lib_resolv___res_send=no
10551fi
10552rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10553LIBS=$ac_check_lib_save_LIBS
10554fi
925c2f3f 10555echo "$as_me:10555: result: $ac_cv_lib_resolv___res_send" >&5
84e70f78
KR
10556echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6
10557if test $ac_cv_lib_resolv___res_send = yes; then
10558 resolv=yes
10559fi
10560
10561fi
10562
10563fi
10564
10565fi
10566
10567 if test "$resolv" = yes ; then
10568 RESOLVLIB=-lresolv
b936fae4 10569
925c2f3f 10570cat >>confdefs.h <<\EOF
84e70f78 10571#define HAVE_LIBRESOLV 1
925c2f3f 10572EOF
84e70f78
KR
10573
10574 else
10575 RESOLVLIB=
10576 fi
925c2f3f 10577 echo "$as_me:10577: checking for hes_getmailhost" >&5
84e70f78
KR
10578echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6
10579if test "${ac_cv_func_hes_getmailhost+set}" = set; then
10580 echo $ECHO_N "(cached) $ECHO_C" >&6
10581else
10582 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10583#line 10583 "configure"
84e70f78
KR
10584#include "confdefs.h"
10585/* System header to define __stub macros and hopefully few prototypes,
10586 which can conflict with char hes_getmailhost (); below. */
10587#include <assert.h>
10588/* Override any gcc2 internal prototype to avoid an error. */
10589#ifdef __cplusplus
10590extern "C"
10591#endif
10592/* We use char because int might match the return type of a gcc2
10593 builtin and then its argument prototype would still apply. */
10594char hes_getmailhost ();
10595char (*f) ();
10596
10597int
10598main ()
10599{
10600/* The GNU C library defines this for functions which it implements
10601 to always fail with ENOSYS. Some functions are actually named
10602 something starting with __ and the normal name is an alias. */
10603#if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
10604choke me
10605#else
10606f = hes_getmailhost;
10607#endif
10608
10609 ;
10610 return 0;
10611}
10612_ACEOF
10613rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 10614if { (eval echo "$as_me:10614: \"$ac_link\"") >&5
84e70f78
KR
10615 (eval $ac_link) 2>&5
10616 ac_status=$?
925c2f3f 10617 echo "$as_me:10617: \$? = $ac_status" >&5
84e70f78
KR
10618 (exit $ac_status); } &&
10619 { ac_try='test -s conftest$ac_exeext'
925c2f3f 10620 { (eval echo "$as_me:10620: \"$ac_try\"") >&5
84e70f78
KR
10621 (eval $ac_try) 2>&5
10622 ac_status=$?
925c2f3f 10623 echo "$as_me:10623: \$? = $ac_status" >&5
84e70f78
KR
10624 (exit $ac_status); }; }; then
10625 ac_cv_func_hes_getmailhost=yes
10626else
10627 echo "$as_me: failed program was:" >&5
10628cat conftest.$ac_ext >&5
10629ac_cv_func_hes_getmailhost=no
10630fi
10631rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10632fi
925c2f3f 10633echo "$as_me:10633: result: $ac_cv_func_hes_getmailhost" >&5
84e70f78
KR
10634echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6
10635if test $ac_cv_func_hes_getmailhost = yes; then
10636 :
10637else
925c2f3f 10638 echo "$as_me:10638: checking for hes_getmailhost in -lhesiod" >&5
84e70f78
KR
10639echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6
10640if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
10641 echo $ECHO_N "(cached) $ECHO_C" >&6
10642else
10643 ac_check_lib_save_LIBS=$LIBS
10644LIBS="-lhesiod $RESOLVLIB $LIBS"
10645cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10646#line 10646 "configure"
84e70f78
KR
10647#include "confdefs.h"
10648
10649/* Override any gcc2 internal prototype to avoid an error. */
10650#ifdef __cplusplus
10651extern "C"
10652#endif
10653/* We use char because int might match the return type of a gcc2
10654 builtin and then its argument prototype would still apply. */
10655char hes_getmailhost ();
10656int
10657main ()
10658{
10659hes_getmailhost ();
10660 ;
10661 return 0;
10662}
10663_ACEOF
10664rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 10665if { (eval echo "$as_me:10665: \"$ac_link\"") >&5
84e70f78
KR
10666 (eval $ac_link) 2>&5
10667 ac_status=$?
925c2f3f 10668 echo "$as_me:10668: \$? = $ac_status" >&5
84e70f78
KR
10669 (exit $ac_status); } &&
10670 { ac_try='test -s conftest$ac_exeext'
925c2f3f 10671 { (eval echo "$as_me:10671: \"$ac_try\"") >&5
84e70f78
KR
10672 (eval $ac_try) 2>&5
10673 ac_status=$?
925c2f3f 10674 echo "$as_me:10674: \$? = $ac_status" >&5
84e70f78
KR
10675 (exit $ac_status); }; }; then
10676 ac_cv_lib_hesiod_hes_getmailhost=yes
10677else
10678 echo "$as_me: failed program was:" >&5
10679cat conftest.$ac_ext >&5
10680ac_cv_lib_hesiod_hes_getmailhost=no
10681fi
10682rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10683LIBS=$ac_check_lib_save_LIBS
10684fi
925c2f3f 10685echo "$as_me:10685: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
84e70f78
KR
10686echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6
10687if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 10688
925c2f3f 10689cat >>confdefs.h <<\EOF
84e70f78 10690#define HAVE_LIBHESIOD 1
925c2f3f 10691EOF
84e70f78
KR
10692
10693else
10694 :
10695fi
10696
10697fi
10698
10699fi
10700
a21616bd
KR
10701# These tell us which Kerberos-related libraries to use.
10702if test "${with_kerberos+set}" = set; then
503d2be0 10703
925c2f3f 10704echo "$as_me:10704: checking for com_err in -lcom_err" >&5
503d2be0
AS
10705echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
10706if test "${ac_cv_lib_com_err_com_err+set}" = set; then
10707 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10708else
503d2be0 10709 ac_check_lib_save_LIBS=$LIBS
a21616bd 10710LIBS="-lcom_err $LIBS"
503d2be0 10711cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10712#line 10712 "configure"
a21616bd 10713#include "confdefs.h"
503d2be0 10714
a21616bd 10715/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10716#ifdef __cplusplus
10717extern "C"
10718#endif
a21616bd 10719/* We use char because int might match the return type of a gcc2
503d2be0
AS
10720 builtin and then its argument prototype would still apply. */
10721char com_err ();
10722int
10723main ()
10724{
10725com_err ();
10726 ;
10727 return 0;
10728}
10729_ACEOF
10730rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 10731if { (eval echo "$as_me:10731: \"$ac_link\"") >&5
503d2be0
AS
10732 (eval $ac_link) 2>&5
10733 ac_status=$?
925c2f3f 10734 echo "$as_me:10734: \$? = $ac_status" >&5
503d2be0
AS
10735 (exit $ac_status); } &&
10736 { ac_try='test -s conftest$ac_exeext'
925c2f3f 10737 { (eval echo "$as_me:10737: \"$ac_try\"") >&5
503d2be0
AS
10738 (eval $ac_try) 2>&5
10739 ac_status=$?
925c2f3f 10740 echo "$as_me:10740: \$? = $ac_status" >&5
503d2be0
AS
10741 (exit $ac_status); }; }; then
10742 ac_cv_lib_com_err_com_err=yes
10743else
10744 echo "$as_me: failed program was:" >&5
10745cat conftest.$ac_ext >&5
10746ac_cv_lib_com_err_com_err=no
10747fi
10748rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10749LIBS=$ac_check_lib_save_LIBS
10750fi
925c2f3f 10751echo "$as_me:10751: result: $ac_cv_lib_com_err_com_err" >&5
503d2be0
AS
10752echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
10753if test $ac_cv_lib_com_err_com_err = yes; then
925c2f3f 10754 cat >>confdefs.h <<EOF
503d2be0 10755#define HAVE_LIBCOM_ERR 1
925c2f3f 10756EOF
a21616bd
KR
10757
10758 LIBS="-lcom_err $LIBS"
10759
a21616bd
KR
10760fi
10761
925c2f3f 10762echo "$as_me:10762: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
503d2be0
AS
10763echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6
10764if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
10765 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10766else
503d2be0 10767 ac_check_lib_save_LIBS=$LIBS
a21616bd 10768LIBS="-lk5crypto $LIBS"
503d2be0 10769cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10770#line 10770 "configure"
a21616bd 10771#include "confdefs.h"
503d2be0 10772
a21616bd 10773/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10774#ifdef __cplusplus
10775extern "C"
10776#endif
a21616bd 10777/* We use char because int might match the return type of a gcc2
503d2be0
AS
10778 builtin and then its argument prototype would still apply. */
10779char mit_des_cbc_encrypt ();
10780int
10781main ()
10782{
10783mit_des_cbc_encrypt ();
10784 ;
10785 return 0;
10786}
10787_ACEOF
10788rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 10789if { (eval echo "$as_me:10789: \"$ac_link\"") >&5
503d2be0
AS
10790 (eval $ac_link) 2>&5
10791 ac_status=$?
925c2f3f 10792 echo "$as_me:10792: \$? = $ac_status" >&5
503d2be0
AS
10793 (exit $ac_status); } &&
10794 { ac_try='test -s conftest$ac_exeext'
925c2f3f 10795 { (eval echo "$as_me:10795: \"$ac_try\"") >&5
503d2be0
AS
10796 (eval $ac_try) 2>&5
10797 ac_status=$?
925c2f3f 10798 echo "$as_me:10798: \$? = $ac_status" >&5
503d2be0
AS
10799 (exit $ac_status); }; }; then
10800 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
10801else
10802 echo "$as_me: failed program was:" >&5
10803cat conftest.$ac_ext >&5
10804ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
10805fi
10806rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10807LIBS=$ac_check_lib_save_LIBS
10808fi
925c2f3f 10809echo "$as_me:10809: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
10810echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6
10811if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
925c2f3f 10812 cat >>confdefs.h <<EOF
503d2be0 10813#define HAVE_LIBK5CRYPTO 1
925c2f3f 10814EOF
a21616bd
KR
10815
10816 LIBS="-lk5crypto $LIBS"
10817
a21616bd
KR
10818fi
10819
925c2f3f 10820echo "$as_me:10820: checking for mit_des_cbc_encrypt in -lcrypto" >&5
503d2be0
AS
10821echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6
10822if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
10823 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10824else
503d2be0 10825 ac_check_lib_save_LIBS=$LIBS
a21616bd 10826LIBS="-lcrypto $LIBS"
503d2be0 10827cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10828#line 10828 "configure"
a21616bd 10829#include "confdefs.h"
503d2be0 10830
a21616bd 10831/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10832#ifdef __cplusplus
10833extern "C"
10834#endif
a21616bd 10835/* We use char because int might match the return type of a gcc2
503d2be0
AS
10836 builtin and then its argument prototype would still apply. */
10837char mit_des_cbc_encrypt ();
10838int
10839main ()
10840{
10841mit_des_cbc_encrypt ();
10842 ;
10843 return 0;
10844}
10845_ACEOF
10846rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 10847if { (eval echo "$as_me:10847: \"$ac_link\"") >&5
503d2be0
AS
10848 (eval $ac_link) 2>&5
10849 ac_status=$?
925c2f3f 10850 echo "$as_me:10850: \$? = $ac_status" >&5
503d2be0
AS
10851 (exit $ac_status); } &&
10852 { ac_try='test -s conftest$ac_exeext'
925c2f3f 10853 { (eval echo "$as_me:10853: \"$ac_try\"") >&5
503d2be0
AS
10854 (eval $ac_try) 2>&5
10855 ac_status=$?
925c2f3f 10856 echo "$as_me:10856: \$? = $ac_status" >&5
503d2be0
AS
10857 (exit $ac_status); }; }; then
10858 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
10859else
10860 echo "$as_me: failed program was:" >&5
10861cat conftest.$ac_ext >&5
10862ac_cv_lib_crypto_mit_des_cbc_encrypt=no
10863fi
10864rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10865LIBS=$ac_check_lib_save_LIBS
10866fi
925c2f3f 10867echo "$as_me:10867: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
10868echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6
10869if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
925c2f3f 10870 cat >>confdefs.h <<EOF
503d2be0 10871#define HAVE_LIBCRYPTO 1
925c2f3f 10872EOF
a21616bd
KR
10873
10874 LIBS="-lcrypto $LIBS"
10875
a21616bd
KR
10876fi
10877
925c2f3f 10878echo "$as_me:10878: checking for krb5_init_context in -lkrb5" >&5
503d2be0
AS
10879echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6
10880if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
10881 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10882else
503d2be0 10883 ac_check_lib_save_LIBS=$LIBS
a21616bd 10884LIBS="-lkrb5 $LIBS"
503d2be0 10885cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10886#line 10886 "configure"
a21616bd 10887#include "confdefs.h"
a21616bd 10888
503d2be0
AS
10889/* Override any gcc2 internal prototype to avoid an error. */
10890#ifdef __cplusplus
10891extern "C"
10892#endif
10893/* We use char because int might match the return type of a gcc2
10894 builtin and then its argument prototype would still apply. */
10895char krb5_init_context ();
10896int
10897main ()
10898{
10899krb5_init_context ();
10900 ;
10901 return 0;
10902}
10903_ACEOF
10904rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 10905if { (eval echo "$as_me:10905: \"$ac_link\"") >&5
503d2be0
AS
10906 (eval $ac_link) 2>&5
10907 ac_status=$?
925c2f3f 10908 echo "$as_me:10908: \$? = $ac_status" >&5
503d2be0
AS
10909 (exit $ac_status); } &&
10910 { ac_try='test -s conftest$ac_exeext'
925c2f3f 10911 { (eval echo "$as_me:10911: \"$ac_try\"") >&5
503d2be0
AS
10912 (eval $ac_try) 2>&5
10913 ac_status=$?
925c2f3f 10914 echo "$as_me:10914: \$? = $ac_status" >&5
503d2be0
AS
10915 (exit $ac_status); }; }; then
10916 ac_cv_lib_krb5_krb5_init_context=yes
10917else
10918 echo "$as_me: failed program was:" >&5
10919cat conftest.$ac_ext >&5
10920ac_cv_lib_krb5_krb5_init_context=no
10921fi
10922rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10923LIBS=$ac_check_lib_save_LIBS
10924fi
925c2f3f 10925echo "$as_me:10925: result: $ac_cv_lib_krb5_krb5_init_context" >&5
503d2be0
AS
10926echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6
10927if test $ac_cv_lib_krb5_krb5_init_context = yes; then
925c2f3f 10928 cat >>confdefs.h <<EOF
503d2be0 10929#define HAVE_LIBKRB5 1
925c2f3f 10930EOF
a21616bd
KR
10931
10932 LIBS="-lkrb5 $LIBS"
10933
a21616bd
KR
10934fi
10935
10936 if test "${with_kerberos5+set}" != set; then
503d2be0 10937
925c2f3f 10938echo "$as_me:10938: checking for des_cbc_encrypt in -ldes425" >&5
503d2be0
AS
10939echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
10940if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
10941 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10942else
503d2be0 10943 ac_check_lib_save_LIBS=$LIBS
a21616bd 10944LIBS="-ldes425 $LIBS"
503d2be0 10945cat >conftest.$ac_ext <<_ACEOF
925c2f3f 10946#line 10946 "configure"
a21616bd 10947#include "confdefs.h"
503d2be0 10948
a21616bd 10949/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10950#ifdef __cplusplus
10951extern "C"
10952#endif
a21616bd 10953/* We use char because int might match the return type of a gcc2
503d2be0
AS
10954 builtin and then its argument prototype would still apply. */
10955char des_cbc_encrypt ();
10956int
10957main ()
10958{
10959des_cbc_encrypt ();
10960 ;
10961 return 0;
10962}
10963_ACEOF
10964rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 10965if { (eval echo "$as_me:10965: \"$ac_link\"") >&5
503d2be0
AS
10966 (eval $ac_link) 2>&5
10967 ac_status=$?
925c2f3f 10968 echo "$as_me:10968: \$? = $ac_status" >&5
503d2be0
AS
10969 (exit $ac_status); } &&
10970 { ac_try='test -s conftest$ac_exeext'
925c2f3f 10971 { (eval echo "$as_me:10971: \"$ac_try\"") >&5
503d2be0
AS
10972 (eval $ac_try) 2>&5
10973 ac_status=$?
925c2f3f 10974 echo "$as_me:10974: \$? = $ac_status" >&5
503d2be0
AS
10975 (exit $ac_status); }; }; then
10976 ac_cv_lib_des425_des_cbc_encrypt=yes
10977else
10978 echo "$as_me: failed program was:" >&5
10979cat conftest.$ac_ext >&5
10980ac_cv_lib_des425_des_cbc_encrypt=no
10981fi
10982rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10983LIBS=$ac_check_lib_save_LIBS
10984fi
925c2f3f 10985echo "$as_me:10985: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
503d2be0
AS
10986echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
10987if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
925c2f3f 10988 cat >>confdefs.h <<EOF
503d2be0 10989#define HAVE_LIBDES425 1
925c2f3f 10990EOF
a21616bd
KR
10991
10992 LIBS="-ldes425 $LIBS"
10993
10994else
503d2be0 10995
925c2f3f 10996echo "$as_me:10996: checking for des_cbc_encrypt in -ldes" >&5
503d2be0
AS
10997echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
10998if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
10999 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 11000else
503d2be0 11001 ac_check_lib_save_LIBS=$LIBS
a21616bd 11002LIBS="-ldes $LIBS"
503d2be0 11003cat >conftest.$ac_ext <<_ACEOF
925c2f3f 11004#line 11004 "configure"
a21616bd 11005#include "confdefs.h"
503d2be0 11006
a21616bd 11007/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11008#ifdef __cplusplus
11009extern "C"
11010#endif
a21616bd 11011/* We use char because int might match the return type of a gcc2
503d2be0
AS
11012 builtin and then its argument prototype would still apply. */
11013char des_cbc_encrypt ();
11014int
11015main ()
11016{
11017des_cbc_encrypt ();
11018 ;
11019 return 0;
11020}
11021_ACEOF
11022rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 11023if { (eval echo "$as_me:11023: \"$ac_link\"") >&5
503d2be0
AS
11024 (eval $ac_link) 2>&5
11025 ac_status=$?
925c2f3f 11026 echo "$as_me:11026: \$? = $ac_status" >&5
503d2be0
AS
11027 (exit $ac_status); } &&
11028 { ac_try='test -s conftest$ac_exeext'
925c2f3f 11029 { (eval echo "$as_me:11029: \"$ac_try\"") >&5
503d2be0
AS
11030 (eval $ac_try) 2>&5
11031 ac_status=$?
925c2f3f 11032 echo "$as_me:11032: \$? = $ac_status" >&5
503d2be0
AS
11033 (exit $ac_status); }; }; then
11034 ac_cv_lib_des_des_cbc_encrypt=yes
11035else
11036 echo "$as_me: failed program was:" >&5
11037cat conftest.$ac_ext >&5
11038ac_cv_lib_des_des_cbc_encrypt=no
11039fi
11040rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11041LIBS=$ac_check_lib_save_LIBS
11042fi
925c2f3f 11043echo "$as_me:11043: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
503d2be0
AS
11044echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
11045if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
925c2f3f 11046 cat >>confdefs.h <<EOF
503d2be0 11047#define HAVE_LIBDES 1
925c2f3f 11048EOF
a21616bd
KR
11049
11050 LIBS="-ldes $LIBS"
11051
a21616bd
KR
11052fi
11053
11054fi
11055
925c2f3f 11056echo "$as_me:11056: checking for krb_get_cred in -lkrb4" >&5
503d2be0
AS
11057echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6
11058if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
11059 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 11060else
503d2be0 11061 ac_check_lib_save_LIBS=$LIBS
a21616bd 11062LIBS="-lkrb4 $LIBS"
503d2be0 11063cat >conftest.$ac_ext <<_ACEOF
925c2f3f 11064#line 11064 "configure"
a21616bd 11065#include "confdefs.h"
503d2be0 11066
a21616bd 11067/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11068#ifdef __cplusplus
11069extern "C"
11070#endif
a21616bd 11071/* We use char because int might match the return type of a gcc2
503d2be0
AS
11072 builtin and then its argument prototype would still apply. */
11073char krb_get_cred ();
11074int
11075main ()
11076{
11077krb_get_cred ();
11078 ;
11079 return 0;
11080}
11081_ACEOF
11082rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 11083if { (eval echo "$as_me:11083: \"$ac_link\"") >&5
503d2be0
AS
11084 (eval $ac_link) 2>&5
11085 ac_status=$?
925c2f3f 11086 echo "$as_me:11086: \$? = $ac_status" >&5
503d2be0
AS
11087 (exit $ac_status); } &&
11088 { ac_try='test -s conftest$ac_exeext'
925c2f3f 11089 { (eval echo "$as_me:11089: \"$ac_try\"") >&5
503d2be0
AS
11090 (eval $ac_try) 2>&5
11091 ac_status=$?
925c2f3f 11092 echo "$as_me:11092: \$? = $ac_status" >&5
503d2be0
AS
11093 (exit $ac_status); }; }; then
11094 ac_cv_lib_krb4_krb_get_cred=yes
11095else
11096 echo "$as_me: failed program was:" >&5
11097cat conftest.$ac_ext >&5
11098ac_cv_lib_krb4_krb_get_cred=no
11099fi
11100rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11101LIBS=$ac_check_lib_save_LIBS
11102fi
925c2f3f 11103echo "$as_me:11103: result: $ac_cv_lib_krb4_krb_get_cred" >&5
503d2be0
AS
11104echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6
11105if test $ac_cv_lib_krb4_krb_get_cred = yes; then
925c2f3f 11106 cat >>confdefs.h <<EOF
503d2be0 11107#define HAVE_LIBKRB4 1
925c2f3f 11108EOF
a21616bd
KR
11109
11110 LIBS="-lkrb4 $LIBS"
11111
11112else
503d2be0 11113
925c2f3f 11114echo "$as_me:11114: checking for krb_get_cred in -lkrb" >&5
503d2be0
AS
11115echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6
11116if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
11117 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 11118else
503d2be0 11119 ac_check_lib_save_LIBS=$LIBS
a21616bd 11120LIBS="-lkrb $LIBS"
503d2be0 11121cat >conftest.$ac_ext <<_ACEOF
925c2f3f 11122#line 11122 "configure"
a21616bd 11123#include "confdefs.h"
503d2be0 11124
a21616bd 11125/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11126#ifdef __cplusplus
11127extern "C"
11128#endif
a21616bd 11129/* We use char because int might match the return type of a gcc2
503d2be0
AS
11130 builtin and then its argument prototype would still apply. */
11131char krb_get_cred ();
11132int
11133main ()
11134{
11135krb_get_cred ();
11136 ;
11137 return 0;
11138}
11139_ACEOF
11140rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 11141if { (eval echo "$as_me:11141: \"$ac_link\"") >&5
503d2be0
AS
11142 (eval $ac_link) 2>&5
11143 ac_status=$?
925c2f3f 11144 echo "$as_me:11144: \$? = $ac_status" >&5
503d2be0
AS
11145 (exit $ac_status); } &&
11146 { ac_try='test -s conftest$ac_exeext'
925c2f3f 11147 { (eval echo "$as_me:11147: \"$ac_try\"") >&5
503d2be0
AS
11148 (eval $ac_try) 2>&5
11149 ac_status=$?
925c2f3f 11150 echo "$as_me:11150: \$? = $ac_status" >&5
503d2be0
AS
11151 (exit $ac_status); }; }; then
11152 ac_cv_lib_krb_krb_get_cred=yes
11153else
11154 echo "$as_me: failed program was:" >&5
11155cat conftest.$ac_ext >&5
11156ac_cv_lib_krb_krb_get_cred=no
11157fi
11158rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11159LIBS=$ac_check_lib_save_LIBS
11160fi
925c2f3f 11161echo "$as_me:11161: result: $ac_cv_lib_krb_krb_get_cred" >&5
503d2be0
AS
11162echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6
11163if test $ac_cv_lib_krb_krb_get_cred = yes; then
925c2f3f 11164 cat >>confdefs.h <<EOF
503d2be0 11165#define HAVE_LIBKRB 1
925c2f3f 11166EOF
a21616bd
KR
11167
11168 LIBS="-lkrb $LIBS"
11169
a21616bd
KR
11170fi
11171
11172fi
11173
11174 fi
11175
11176 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
11177
11178for ac_header in krb5.h
a21616bd 11179do
503d2be0 11180as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
925c2f3f 11181echo "$as_me:11181: checking for $ac_header" >&5
503d2be0
AS
11182echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11183if eval "test \"\${$as_ac_Header+set}\" = set"; then
11184 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 11185else
925c2f3f
EZ
11186 cat >conftest.$ac_ext <<_ACEOF
11187#line 11187 "configure"
503d2be0
AS
11188#include "confdefs.h"
11189#include <$ac_header>
11190_ACEOF
925c2f3f 11191if { (eval echo "$as_me:11191: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11192 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11193 ac_status=$?
11194 egrep -v '^ *\+' conftest.er1 >conftest.err
11195 rm -f conftest.er1
11196 cat conftest.err >&5
925c2f3f 11197 echo "$as_me:11197: \$? = $ac_status" >&5
503d2be0
AS
11198 (exit $ac_status); } >/dev/null; then
11199 if test -s conftest.err; then
11200 ac_cpp_err=$ac_c_preproc_warn_flag
11201 else
11202 ac_cpp_err=
11203 fi
11204else
11205 ac_cpp_err=yes
11206fi
11207if test -z "$ac_cpp_err"; then
925c2f3f 11208 eval "$as_ac_Header=yes"
503d2be0
AS
11209else
11210 echo "$as_me: failed program was:" >&5
a21616bd 11211 cat conftest.$ac_ext >&5
925c2f3f 11212 eval "$as_ac_Header=no"
a21616bd 11213fi
503d2be0 11214rm -f conftest.err conftest.$ac_ext
a21616bd 11215fi
925c2f3f 11216echo "$as_me:11216: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11217echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11218if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 11219 cat >>confdefs.h <<EOF
503d2be0 11220#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 11221EOF
503d2be0 11222
a21616bd
KR
11223fi
11224done
11225
11226 else
503d2be0
AS
11227
11228for ac_header in des.h
a21616bd 11229do
503d2be0 11230as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
925c2f3f 11231echo "$as_me:11231: checking for $ac_header" >&5
503d2be0
AS
11232echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11233if eval "test \"\${$as_ac_Header+set}\" = set"; then
11234 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 11235else
925c2f3f
EZ
11236 cat >conftest.$ac_ext <<_ACEOF
11237#line 11237 "configure"
503d2be0
AS
11238#include "confdefs.h"
11239#include <$ac_header>
11240_ACEOF
925c2f3f 11241if { (eval echo "$as_me:11241: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11242 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11243 ac_status=$?
11244 egrep -v '^ *\+' conftest.er1 >conftest.err
11245 rm -f conftest.er1
11246 cat conftest.err >&5
925c2f3f 11247 echo "$as_me:11247: \$? = $ac_status" >&5
503d2be0
AS
11248 (exit $ac_status); } >/dev/null; then
11249 if test -s conftest.err; then
11250 ac_cpp_err=$ac_c_preproc_warn_flag
11251 else
11252 ac_cpp_err=
11253 fi
11254else
11255 ac_cpp_err=yes
11256fi
11257if test -z "$ac_cpp_err"; then
925c2f3f 11258 eval "$as_ac_Header=yes"
503d2be0
AS
11259else
11260 echo "$as_me: failed program was:" >&5
a21616bd 11261 cat conftest.$ac_ext >&5
925c2f3f 11262 eval "$as_ac_Header=no"
a21616bd 11263fi
503d2be0 11264rm -f conftest.err conftest.$ac_ext
a21616bd 11265fi
925c2f3f 11266echo "$as_me:11266: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11267echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11268if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 11269 cat >>confdefs.h <<EOF
503d2be0 11270#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 11271EOF
503d2be0 11272
a21616bd 11273else
503d2be0
AS
11274
11275for ac_header in kerberosIV/des.h
a21616bd 11276do
503d2be0 11277as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
925c2f3f 11278echo "$as_me:11278: checking for $ac_header" >&5
503d2be0
AS
11279echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11280if eval "test \"\${$as_ac_Header+set}\" = set"; then
11281 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 11282else
925c2f3f
EZ
11283 cat >conftest.$ac_ext <<_ACEOF
11284#line 11284 "configure"
503d2be0
AS
11285#include "confdefs.h"
11286#include <$ac_header>
11287_ACEOF
925c2f3f 11288if { (eval echo "$as_me:11288: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11289 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11290 ac_status=$?
11291 egrep -v '^ *\+' conftest.er1 >conftest.err
11292 rm -f conftest.er1
11293 cat conftest.err >&5
925c2f3f 11294 echo "$as_me:11294: \$? = $ac_status" >&5
503d2be0
AS
11295 (exit $ac_status); } >/dev/null; then
11296 if test -s conftest.err; then
11297 ac_cpp_err=$ac_c_preproc_warn_flag
11298 else
11299 ac_cpp_err=
11300 fi
11301else
11302 ac_cpp_err=yes
11303fi
11304if test -z "$ac_cpp_err"; then
925c2f3f 11305 eval "$as_ac_Header=yes"
503d2be0
AS
11306else
11307 echo "$as_me: failed program was:" >&5
a21616bd 11308 cat conftest.$ac_ext >&5
925c2f3f 11309 eval "$as_ac_Header=no"
a21616bd 11310fi
503d2be0 11311rm -f conftest.err conftest.$ac_ext
a21616bd 11312fi
925c2f3f 11313echo "$as_me:11313: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11314echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11315if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 11316 cat >>confdefs.h <<EOF
503d2be0 11317#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 11318EOF
503d2be0 11319
a21616bd 11320else
503d2be0
AS
11321
11322for ac_header in kerberos/des.h
a21616bd 11323do
503d2be0 11324as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
925c2f3f 11325echo "$as_me:11325: checking for $ac_header" >&5
503d2be0
AS
11326echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11327if eval "test \"\${$as_ac_Header+set}\" = set"; then
11328 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 11329else
925c2f3f
EZ
11330 cat >conftest.$ac_ext <<_ACEOF
11331#line 11331 "configure"
503d2be0
AS
11332#include "confdefs.h"
11333#include <$ac_header>
11334_ACEOF
925c2f3f 11335if { (eval echo "$as_me:11335: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11336 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11337 ac_status=$?
11338 egrep -v '^ *\+' conftest.er1 >conftest.err
11339 rm -f conftest.er1
11340 cat conftest.err >&5
925c2f3f 11341 echo "$as_me:11341: \$? = $ac_status" >&5
503d2be0
AS
11342 (exit $ac_status); } >/dev/null; then
11343 if test -s conftest.err; then
11344 ac_cpp_err=$ac_c_preproc_warn_flag
11345 else
11346 ac_cpp_err=
11347 fi
11348else
11349 ac_cpp_err=yes
11350fi
11351if test -z "$ac_cpp_err"; then
925c2f3f 11352 eval "$as_ac_Header=yes"
503d2be0
AS
11353else
11354 echo "$as_me: failed program was:" >&5
a21616bd 11355 cat conftest.$ac_ext >&5
925c2f3f 11356 eval "$as_ac_Header=no"
a21616bd 11357fi
503d2be0 11358rm -f conftest.err conftest.$ac_ext
a21616bd 11359fi
925c2f3f 11360echo "$as_me:11360: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11361echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11362if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 11363 cat >>confdefs.h <<EOF
503d2be0 11364#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 11365EOF
a21616bd
KR
11366
11367fi
11368done
11369
98418dba 11370fi
925c2f3f
EZ
11371done
11372
98418dba 11373fi
925c2f3f 11374done
98418dba 11375
925c2f3f
EZ
11376for ac_header in krb.h
11377do
11378as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11379echo "$as_me:11379: checking for $ac_header" >&5
11380echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11381if eval "test \"\${$as_ac_Header+set}\" = set"; then
11382 echo $ECHO_N "(cached) $ECHO_C" >&6
11383else
11384 cat >conftest.$ac_ext <<_ACEOF
11385#line 11385 "configure"
503d2be0
AS
11386#include "confdefs.h"
11387#include <$ac_header>
11388_ACEOF
925c2f3f 11389if { (eval echo "$as_me:11389: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11390 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11391 ac_status=$?
11392 egrep -v '^ *\+' conftest.er1 >conftest.err
11393 rm -f conftest.er1
11394 cat conftest.err >&5
925c2f3f 11395 echo "$as_me:11395: \$? = $ac_status" >&5
503d2be0
AS
11396 (exit $ac_status); } >/dev/null; then
11397 if test -s conftest.err; then
11398 ac_cpp_err=$ac_c_preproc_warn_flag
11399 else
11400 ac_cpp_err=
11401 fi
11402else
11403 ac_cpp_err=yes
11404fi
11405if test -z "$ac_cpp_err"; then
925c2f3f 11406 eval "$as_ac_Header=yes"
503d2be0
AS
11407else
11408 echo "$as_me: failed program was:" >&5
a21616bd 11409 cat conftest.$ac_ext >&5
925c2f3f 11410 eval "$as_ac_Header=no"
a21616bd 11411fi
503d2be0 11412rm -f conftest.err conftest.$ac_ext
a21616bd 11413fi
925c2f3f 11414echo "$as_me:11414: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11415echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11416if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 11417 cat >>confdefs.h <<EOF
503d2be0 11418#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 11419EOF
503d2be0 11420
a21616bd 11421else
503d2be0
AS
11422
11423for ac_header in kerberosIV/krb.h
a21616bd 11424do
503d2be0 11425as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
925c2f3f 11426echo "$as_me:11426: checking for $ac_header" >&5
503d2be0
AS
11427echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11428if eval "test \"\${$as_ac_Header+set}\" = set"; then
11429 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 11430else
925c2f3f
EZ
11431 cat >conftest.$ac_ext <<_ACEOF
11432#line 11432 "configure"
503d2be0
AS
11433#include "confdefs.h"
11434#include <$ac_header>
11435_ACEOF
925c2f3f 11436if { (eval echo "$as_me:11436: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11437 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11438 ac_status=$?
11439 egrep -v '^ *\+' conftest.er1 >conftest.err
11440 rm -f conftest.er1
11441 cat conftest.err >&5
925c2f3f 11442 echo "$as_me:11442: \$? = $ac_status" >&5
503d2be0
AS
11443 (exit $ac_status); } >/dev/null; then
11444 if test -s conftest.err; then
11445 ac_cpp_err=$ac_c_preproc_warn_flag
11446 else
11447 ac_cpp_err=
11448 fi
11449else
11450 ac_cpp_err=yes
11451fi
11452if test -z "$ac_cpp_err"; then
925c2f3f 11453 eval "$as_ac_Header=yes"
503d2be0
AS
11454else
11455 echo "$as_me: failed program was:" >&5
a21616bd 11456 cat conftest.$ac_ext >&5
925c2f3f 11457 eval "$as_ac_Header=no"
a21616bd 11458fi
503d2be0 11459rm -f conftest.err conftest.$ac_ext
a21616bd 11460fi
925c2f3f 11461echo "$as_me:11461: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11462echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11463if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 11464 cat >>confdefs.h <<EOF
503d2be0 11465#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 11466EOF
503d2be0 11467
a21616bd 11468else
503d2be0
AS
11469
11470for ac_header in kerberos/krb.h
a21616bd 11471do
503d2be0 11472as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
925c2f3f 11473echo "$as_me:11473: checking for $ac_header" >&5
503d2be0
AS
11474echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11475if eval "test \"\${$as_ac_Header+set}\" = set"; then
11476 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 11477else
925c2f3f
EZ
11478 cat >conftest.$ac_ext <<_ACEOF
11479#line 11479 "configure"
503d2be0
AS
11480#include "confdefs.h"
11481#include <$ac_header>
11482_ACEOF
925c2f3f 11483if { (eval echo "$as_me:11483: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11484 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11485 ac_status=$?
11486 egrep -v '^ *\+' conftest.er1 >conftest.err
11487 rm -f conftest.er1
11488 cat conftest.err >&5
925c2f3f 11489 echo "$as_me:11489: \$? = $ac_status" >&5
503d2be0
AS
11490 (exit $ac_status); } >/dev/null; then
11491 if test -s conftest.err; then
11492 ac_cpp_err=$ac_c_preproc_warn_flag
11493 else
11494 ac_cpp_err=
11495 fi
11496else
11497 ac_cpp_err=yes
11498fi
11499if test -z "$ac_cpp_err"; then
925c2f3f 11500 eval "$as_ac_Header=yes"
503d2be0
AS
11501else
11502 echo "$as_me: failed program was:" >&5
a21616bd 11503 cat conftest.$ac_ext >&5
925c2f3f 11504 eval "$as_ac_Header=no"
a21616bd 11505fi
503d2be0 11506rm -f conftest.err conftest.$ac_ext
a21616bd 11507fi
925c2f3f 11508echo "$as_me:11508: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11509echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11510if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 11511 cat >>confdefs.h <<EOF
503d2be0 11512#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 11513EOF
503d2be0 11514
a21616bd
KR
11515fi
11516done
11517
11518fi
11519done
11520
11521fi
11522done
11523
11524 fi
503d2be0
AS
11525
11526for ac_header in com_err.h
a21616bd 11527do
503d2be0 11528as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
925c2f3f 11529echo "$as_me:11529: checking for $ac_header" >&5
503d2be0
AS
11530echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11531if eval "test \"\${$as_ac_Header+set}\" = set"; then
11532 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 11533else
925c2f3f
EZ
11534 cat >conftest.$ac_ext <<_ACEOF
11535#line 11535 "configure"
503d2be0
AS
11536#include "confdefs.h"
11537#include <$ac_header>
11538_ACEOF
925c2f3f 11539if { (eval echo "$as_me:11539: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11540 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11541 ac_status=$?
11542 egrep -v '^ *\+' conftest.er1 >conftest.err
11543 rm -f conftest.er1
11544 cat conftest.err >&5
925c2f3f 11545 echo "$as_me:11545: \$? = $ac_status" >&5
503d2be0
AS
11546 (exit $ac_status); } >/dev/null; then
11547 if test -s conftest.err; then
11548 ac_cpp_err=$ac_c_preproc_warn_flag
11549 else
11550 ac_cpp_err=
11551 fi
11552else
11553 ac_cpp_err=yes
11554fi
11555if test -z "$ac_cpp_err"; then
925c2f3f 11556 eval "$as_ac_Header=yes"
503d2be0
AS
11557else
11558 echo "$as_me: failed program was:" >&5
a21616bd 11559 cat conftest.$ac_ext >&5
925c2f3f 11560 eval "$as_ac_Header=no"
a21616bd 11561fi
503d2be0 11562rm -f conftest.err conftest.$ac_ext
a21616bd 11563fi
925c2f3f 11564echo "$as_me:11564: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11565echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11566if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 11567 cat >>confdefs.h <<EOF
503d2be0 11568#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 11569EOF
503d2be0 11570
a21616bd
KR
11571fi
11572done
11573
11574fi
11575
ba4481b5
DL
11576# Solaris requires -lintl if you want strerror (which calls dgettext)
11577# to return localized messages.
503d2be0 11578
925c2f3f 11579echo "$as_me:11579: checking for dgettext in -lintl" >&5
503d2be0
AS
11580echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
11581if test "${ac_cv_lib_intl_dgettext+set}" = set; then
11582 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11583else
503d2be0 11584 ac_check_lib_save_LIBS=$LIBS
ba4481b5 11585LIBS="-lintl $LIBS"
503d2be0 11586cat >conftest.$ac_ext <<_ACEOF
925c2f3f 11587#line 11587 "configure"
ba4481b5 11588#include "confdefs.h"
503d2be0 11589
ba4481b5 11590/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11591#ifdef __cplusplus
11592extern "C"
11593#endif
ba4481b5 11594/* We use char because int might match the return type of a gcc2
503d2be0
AS
11595 builtin and then its argument prototype would still apply. */
11596char dgettext ();
11597int
11598main ()
11599{
11600dgettext ();
11601 ;
11602 return 0;
11603}
11604_ACEOF
11605rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 11606if { (eval echo "$as_me:11606: \"$ac_link\"") >&5
503d2be0
AS
11607 (eval $ac_link) 2>&5
11608 ac_status=$?
925c2f3f 11609 echo "$as_me:11609: \$? = $ac_status" >&5
503d2be0
AS
11610 (exit $ac_status); } &&
11611 { ac_try='test -s conftest$ac_exeext'
925c2f3f 11612 { (eval echo "$as_me:11612: \"$ac_try\"") >&5
503d2be0
AS
11613 (eval $ac_try) 2>&5
11614 ac_status=$?
925c2f3f 11615 echo "$as_me:11615: \$? = $ac_status" >&5
503d2be0
AS
11616 (exit $ac_status); }; }; then
11617 ac_cv_lib_intl_dgettext=yes
11618else
11619 echo "$as_me: failed program was:" >&5
11620cat conftest.$ac_ext >&5
11621ac_cv_lib_intl_dgettext=no
11622fi
11623rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11624LIBS=$ac_check_lib_save_LIBS
11625fi
925c2f3f 11626echo "$as_me:11626: result: $ac_cv_lib_intl_dgettext" >&5
503d2be0
AS
11627echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
11628if test $ac_cv_lib_intl_dgettext = yes; then
925c2f3f 11629 cat >>confdefs.h <<EOF
503d2be0 11630#define HAVE_LIBINTL 1
925c2f3f 11631EOF
ba4481b5
DL
11632
11633 LIBS="-lintl $LIBS"
11634
ba4481b5
DL
11635fi
11636
925c2f3f 11637echo "$as_me:11637: checking whether localtime caches TZ" >&5
503d2be0
AS
11638echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6
11639if test "${emacs_cv_localtime_cache+set}" = set; then
11640 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
11641else
11642 if test x$ac_cv_func_tzset = xyes; then
11643if test "$cross_compiling" = yes; then
11644 # If we have tzset, assume the worst when cross-compiling.
11645emacs_cv_localtime_cache=yes
11646else
503d2be0 11647 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 11648#line 11648 "configure"
ba4481b5
DL
11649#include "confdefs.h"
11650#include <time.h>
ba4481b5
DL
11651extern char **environ;
11652unset_TZ ()
11653{
11654 char **from, **to;
11655 for (to = from = environ; (*to = *from); from++)
11656 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11657 to++;
11658}
11659char TZ_GMT0[] = "TZ=GMT0";
11660char TZ_PST8[] = "TZ=PST8";
11661main()
11662{
11663 time_t now = time ((time_t *) 0);
11664 int hour_GMT0, hour_unset;
11665 if (putenv (TZ_GMT0) != 0)
11666 exit (1);
11667 hour_GMT0 = localtime (&now)->tm_hour;
11668 unset_TZ ();
11669 hour_unset = localtime (&now)->tm_hour;
11670 if (putenv (TZ_PST8) != 0)
11671 exit (1);
11672 if (localtime (&now)->tm_hour == hour_GMT0)
11673 exit (1);
11674 unset_TZ ();
11675 if (localtime (&now)->tm_hour != hour_unset)
11676 exit (1);
11677 exit (0);
11678}
503d2be0
AS
11679_ACEOF
11680rm -f conftest$ac_exeext
925c2f3f 11681if { (eval echo "$as_me:11681: \"$ac_link\"") >&5
503d2be0
AS
11682 (eval $ac_link) 2>&5
11683 ac_status=$?
925c2f3f 11684 echo "$as_me:11684: \$? = $ac_status" >&5
503d2be0 11685 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
925c2f3f 11686 { (eval echo "$as_me:11686: \"$ac_try\"") >&5
503d2be0
AS
11687 (eval $ac_try) 2>&5
11688 ac_status=$?
925c2f3f 11689 echo "$as_me:11689: \$? = $ac_status" >&5
503d2be0 11690 (exit $ac_status); }; }; then
ba4481b5
DL
11691 emacs_cv_localtime_cache=no
11692else
503d2be0
AS
11693 echo "$as_me: program exited with status $ac_status" >&5
11694echo "$as_me: failed program was:" >&5
11695cat conftest.$ac_ext >&5
11696emacs_cv_localtime_cache=yes
ba4481b5 11697fi
503d2be0 11698rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 11699fi
ba4481b5
DL
11700else
11701 # If we lack tzset, report that localtime does not cache TZ,
11702 # since we can't invalidate the cache if we don't have tzset.
11703 emacs_cv_localtime_cache=no
11704fi
11705fi
925c2f3f 11706echo "$as_me:11706: result: $emacs_cv_localtime_cache" >&5
503d2be0 11707echo "${ECHO_T}$emacs_cv_localtime_cache" >&6
ba4481b5 11708if test $emacs_cv_localtime_cache = yes; then
b936fae4 11709
925c2f3f 11710cat >>confdefs.h <<\EOF
ba4481b5 11711#define LOCALTIME_CACHE 1
925c2f3f 11712EOF
ba4481b5
DL
11713
11714fi
11715
11716if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
11717
11718for ac_func in gettimeofday
48d4b120 11719do
503d2be0 11720as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
925c2f3f 11721echo "$as_me:11721: checking for $ac_func" >&5
503d2be0
AS
11722echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11723if eval "test \"\${$as_ac_var+set}\" = set"; then
11724 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 11725else
503d2be0 11726 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 11727#line 11727 "configure"
48d4b120
DL
11728#include "confdefs.h"
11729/* System header to define __stub macros and hopefully few prototypes,
503d2be0 11730 which can conflict with char $ac_func (); below. */
48d4b120
DL
11731#include <assert.h>
11732/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11733#ifdef __cplusplus
11734extern "C"
11735#endif
48d4b120 11736/* We use char because int might match the return type of a gcc2
503d2be0
AS
11737 builtin and then its argument prototype would still apply. */
11738char $ac_func ();
11739char (*f) ();
48d4b120 11740
503d2be0
AS
11741int
11742main ()
11743{
48d4b120
DL
11744/* The GNU C library defines this for functions which it implements
11745 to always fail with ENOSYS. Some functions are actually named
11746 something starting with __ and the normal name is an alias. */
11747#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11748choke me
11749#else
503d2be0 11750f = $ac_func;
48d4b120
DL
11751#endif
11752
503d2be0
AS
11753 ;
11754 return 0;
11755}
11756_ACEOF
11757rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 11758if { (eval echo "$as_me:11758: \"$ac_link\"") >&5
503d2be0
AS
11759 (eval $ac_link) 2>&5
11760 ac_status=$?
925c2f3f 11761 echo "$as_me:11761: \$? = $ac_status" >&5
503d2be0
AS
11762 (exit $ac_status); } &&
11763 { ac_try='test -s conftest$ac_exeext'
925c2f3f 11764 { (eval echo "$as_me:11764: \"$ac_try\"") >&5
503d2be0
AS
11765 (eval $ac_try) 2>&5
11766 ac_status=$?
925c2f3f 11767 echo "$as_me:11767: \$? = $ac_status" >&5
503d2be0
AS
11768 (exit $ac_status); }; }; then
11769 eval "$as_ac_var=yes"
11770else
11771 echo "$as_me: failed program was:" >&5
11772cat conftest.$ac_ext >&5
11773eval "$as_ac_var=no"
11774fi
11775rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11776fi
925c2f3f 11777echo "$as_me:11777: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
11778echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11779if test `eval echo '${'$as_ac_var'}'` = yes; then
925c2f3f 11780 cat >>confdefs.h <<EOF
503d2be0 11781#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
925c2f3f 11782EOF
48d4b120 11783
48d4b120
DL
11784fi
11785done
11786
b936fae4 11787 if test $ac_cv_func_gettimeofday = yes; then
925c2f3f 11788 echo "$as_me:11788: checking whether gettimeofday can accept two arguments" >&5
503d2be0
AS
11789echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6
11790if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
11791 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11792else
503d2be0 11793 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 11794#line 11794 "configure"
a3f08d9e 11795#include "confdefs.h"
ba4481b5 11796
a3f08d9e
DL
11797#ifdef TIME_WITH_SYS_TIME
11798#include <sys/time.h>
11799#include <time.h>
11800#else
11801#ifdef HAVE_SYS_TIME_H
11802#include <sys/time.h>
11803#else
11804#include <time.h>
11805#endif
11806#endif
503d2be0
AS
11807int
11808main ()
11809{
a3f08d9e 11810struct timeval time;
b936fae4 11811 gettimeofday (&time, 0);
503d2be0
AS
11812 ;
11813 return 0;
11814}
11815_ACEOF
11816rm -f conftest.$ac_objext
925c2f3f 11817if { (eval echo "$as_me:11817: \"$ac_compile\"") >&5
503d2be0
AS
11818 (eval $ac_compile) 2>&5
11819 ac_status=$?
925c2f3f 11820 echo "$as_me:11820: \$? = $ac_status" >&5
503d2be0
AS
11821 (exit $ac_status); } &&
11822 { ac_try='test -s conftest.$ac_objext'
925c2f3f 11823 { (eval echo "$as_me:11823: \"$ac_try\"") >&5
503d2be0
AS
11824 (eval $ac_try) 2>&5
11825 ac_status=$?
925c2f3f 11826 echo "$as_me:11826: \$? = $ac_status" >&5
503d2be0 11827 (exit $ac_status); }; }; then
ba4481b5
DL
11828 emacs_cv_gettimeofday_two_arguments=yes
11829else
503d2be0
AS
11830 echo "$as_me: failed program was:" >&5
11831cat conftest.$ac_ext >&5
11832emacs_cv_gettimeofday_two_arguments=no
ba4481b5 11833fi
503d2be0 11834rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 11835fi
925c2f3f 11836echo "$as_me:11836: result: $emacs_cv_gettimeofday_two_arguments" >&5
503d2be0 11837echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6
b936fae4
AS
11838 if test $emacs_cv_gettimeofday_two_arguments = no; then
11839
925c2f3f 11840cat >>confdefs.h <<\EOF
ba4481b5 11841#define GETTIMEOFDAY_ONE_ARGUMENT 1
925c2f3f 11842EOF
ba4481b5 11843
b936fae4 11844 fi
ba4481b5
DL
11845 fi
11846fi
11847
48d4b120 11848if test "$ac_cv_func_gettimeofday" = yes; then
925c2f3f 11849 echo "$as_me:11849: checking for struct timezone" >&5
503d2be0
AS
11850echo $ECHO_N "checking for struct timezone... $ECHO_C" >&6
11851if test "${emacs_cv_struct_timezone+set}" = set; then
11852 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 11853else
503d2be0 11854 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 11855#line 11855 "configure"
48d4b120
DL
11856#include "confdefs.h"
11857#include <sys/time.h>
503d2be0
AS
11858int
11859main ()
11860{
48d4b120 11861struct timezone tz;
503d2be0
AS
11862 ;
11863 return 0;
11864}
11865_ACEOF
11866rm -f conftest.$ac_objext
925c2f3f 11867if { (eval echo "$as_me:11867: \"$ac_compile\"") >&5
503d2be0
AS
11868 (eval $ac_compile) 2>&5
11869 ac_status=$?
925c2f3f 11870 echo "$as_me:11870: \$? = $ac_status" >&5
503d2be0
AS
11871 (exit $ac_status); } &&
11872 { ac_try='test -s conftest.$ac_objext'
925c2f3f 11873 { (eval echo "$as_me:11873: \"$ac_try\"") >&5
503d2be0
AS
11874 (eval $ac_try) 2>&5
11875 ac_status=$?
925c2f3f 11876 echo "$as_me:11876: \$? = $ac_status" >&5
503d2be0 11877 (exit $ac_status); }; }; then
48d4b120
DL
11878 if test "$cross_compiling" = yes; then
11879 emacs_cv_struct_timezone=yes
11880else
503d2be0 11881 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 11882#line 11882 "configure"
48d4b120
DL
11883#include "confdefs.h"
11884
11885#ifdef TIME_WITH_SYS_TIME
11886#include <sys/time.h>
11887#include <time.h>
11888#else
11889#ifdef HAVE_SYS_TIME_H
11890#include <sys/time.h>
11891#else
11892#include <time.h>
11893#endif
11894#endif
11895main () {
11896 struct timeval time;
11897 struct timezone dummy;
11898 exit (gettimeofday (&time, &dummy));
11899}
503d2be0
AS
11900_ACEOF
11901rm -f conftest$ac_exeext
925c2f3f 11902if { (eval echo "$as_me:11902: \"$ac_link\"") >&5
503d2be0
AS
11903 (eval $ac_link) 2>&5
11904 ac_status=$?
925c2f3f 11905 echo "$as_me:11905: \$? = $ac_status" >&5
503d2be0 11906 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
925c2f3f 11907 { (eval echo "$as_me:11907: \"$ac_try\"") >&5
503d2be0
AS
11908 (eval $ac_try) 2>&5
11909 ac_status=$?
925c2f3f 11910 echo "$as_me:11910: \$? = $ac_status" >&5
503d2be0 11911 (exit $ac_status); }; }; then
48d4b120
DL
11912 emacs_cv_struct_timezone=yes
11913else
503d2be0
AS
11914 echo "$as_me: program exited with status $ac_status" >&5
11915echo "$as_me: failed program was:" >&5
11916cat conftest.$ac_ext >&5
11917emacs_cv_struct_timezone=no
48d4b120 11918fi
503d2be0 11919rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
48d4b120 11920fi
48d4b120 11921else
503d2be0
AS
11922 echo "$as_me: failed program was:" >&5
11923cat conftest.$ac_ext >&5
11924emacs_cv_struct_timezone=no
48d4b120 11925fi
503d2be0 11926rm -f conftest.$ac_objext conftest.$ac_ext
48d4b120 11927fi
925c2f3f 11928echo "$as_me:11928: result: $emacs_cv_struct_timezone" >&5
503d2be0 11929echo "${ECHO_T}$emacs_cv_struct_timezone" >&6
48d4b120
DL
11930fi
11931
ba4481b5 11932ok_so_far=yes
925c2f3f 11933echo "$as_me:11933: checking for socket" >&5
503d2be0
AS
11934echo $ECHO_N "checking for socket... $ECHO_C" >&6
11935if test "${ac_cv_func_socket+set}" = set; then
11936 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11937else
503d2be0 11938 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 11939#line 11939 "configure"
ba4481b5
DL
11940#include "confdefs.h"
11941/* System header to define __stub macros and hopefully few prototypes,
503d2be0 11942 which can conflict with char socket (); below. */
ba4481b5
DL
11943#include <assert.h>
11944/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11945#ifdef __cplusplus
11946extern "C"
11947#endif
ba4481b5 11948/* We use char because int might match the return type of a gcc2
503d2be0
AS
11949 builtin and then its argument prototype would still apply. */
11950char socket ();
11951char (*f) ();
ba4481b5 11952
503d2be0
AS
11953int
11954main ()
11955{
ba4481b5
DL
11956/* The GNU C library defines this for functions which it implements
11957 to always fail with ENOSYS. Some functions are actually named
11958 something starting with __ and the normal name is an alias. */
11959#if defined (__stub_socket) || defined (__stub___socket)
11960choke me
11961#else
503d2be0 11962f = socket;
ba4481b5
DL
11963#endif
11964
503d2be0
AS
11965 ;
11966 return 0;
11967}
11968_ACEOF
11969rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 11970if { (eval echo "$as_me:11970: \"$ac_link\"") >&5
503d2be0
AS
11971 (eval $ac_link) 2>&5
11972 ac_status=$?
925c2f3f 11973 echo "$as_me:11973: \$? = $ac_status" >&5
503d2be0
AS
11974 (exit $ac_status); } &&
11975 { ac_try='test -s conftest$ac_exeext'
925c2f3f 11976 { (eval echo "$as_me:11976: \"$ac_try\"") >&5
503d2be0
AS
11977 (eval $ac_try) 2>&5
11978 ac_status=$?
925c2f3f 11979 echo "$as_me:11979: \$? = $ac_status" >&5
503d2be0
AS
11980 (exit $ac_status); }; }; then
11981 ac_cv_func_socket=yes
11982else
11983 echo "$as_me: failed program was:" >&5
11984cat conftest.$ac_ext >&5
11985ac_cv_func_socket=no
11986fi
11987rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11988fi
925c2f3f 11989echo "$as_me:11989: result: $ac_cv_func_socket" >&5
503d2be0
AS
11990echo "${ECHO_T}$ac_cv_func_socket" >&6
11991if test $ac_cv_func_socket = yes; then
ba4481b5
DL
11992 :
11993else
503d2be0 11994 ok_so_far=no
ba4481b5
DL
11995fi
11996
11997if test $ok_so_far = yes; then
925c2f3f 11998 echo "$as_me:11998: checking for netinet/in.h" >&5
503d2be0
AS
11999echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
12000if test "${ac_cv_header_netinet_in_h+set}" = set; then
12001 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 12002else
925c2f3f
EZ
12003 cat >conftest.$ac_ext <<_ACEOF
12004#line 12004 "configure"
ba4481b5
DL
12005#include "confdefs.h"
12006#include <netinet/in.h>
503d2be0 12007_ACEOF
925c2f3f 12008if { (eval echo "$as_me:12008: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
12009 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12010 ac_status=$?
12011 egrep -v '^ *\+' conftest.er1 >conftest.err
12012 rm -f conftest.er1
12013 cat conftest.err >&5
925c2f3f 12014 echo "$as_me:12014: \$? = $ac_status" >&5
503d2be0
AS
12015 (exit $ac_status); } >/dev/null; then
12016 if test -s conftest.err; then
12017 ac_cpp_err=$ac_c_preproc_warn_flag
12018 else
12019 ac_cpp_err=
12020 fi
12021else
12022 ac_cpp_err=yes
12023fi
12024if test -z "$ac_cpp_err"; then
925c2f3f 12025 ac_cv_header_netinet_in_h=yes
ba4481b5 12026else
503d2be0 12027 echo "$as_me: failed program was:" >&5
ba4481b5 12028 cat conftest.$ac_ext >&5
925c2f3f 12029 ac_cv_header_netinet_in_h=no
ba4481b5 12030fi
503d2be0 12031rm -f conftest.err conftest.$ac_ext
ba4481b5 12032fi
925c2f3f 12033echo "$as_me:12033: result: $ac_cv_header_netinet_in_h" >&5
503d2be0
AS
12034echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
12035if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
12036 :
12037else
503d2be0 12038 ok_so_far=no
ba4481b5
DL
12039fi
12040
12041fi
12042if test $ok_so_far = yes; then
925c2f3f 12043 echo "$as_me:12043: checking for arpa/inet.h" >&5
503d2be0
AS
12044echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
12045if test "${ac_cv_header_arpa_inet_h+set}" = set; then
12046 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 12047else
925c2f3f
EZ
12048 cat >conftest.$ac_ext <<_ACEOF
12049#line 12049 "configure"
ba4481b5
DL
12050#include "confdefs.h"
12051#include <arpa/inet.h>
503d2be0 12052_ACEOF
925c2f3f 12053if { (eval echo "$as_me:12053: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
12054 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12055 ac_status=$?
12056 egrep -v '^ *\+' conftest.er1 >conftest.err
12057 rm -f conftest.er1
12058 cat conftest.err >&5
925c2f3f 12059 echo "$as_me:12059: \$? = $ac_status" >&5
503d2be0
AS
12060 (exit $ac_status); } >/dev/null; then
12061 if test -s conftest.err; then
12062 ac_cpp_err=$ac_c_preproc_warn_flag
12063 else
12064 ac_cpp_err=
12065 fi
12066else
12067 ac_cpp_err=yes
12068fi
12069if test -z "$ac_cpp_err"; then
925c2f3f 12070 ac_cv_header_arpa_inet_h=yes
ba4481b5 12071else
503d2be0 12072 echo "$as_me: failed program was:" >&5
ba4481b5 12073 cat conftest.$ac_ext >&5
925c2f3f 12074 ac_cv_header_arpa_inet_h=no
ba4481b5 12075fi
503d2be0 12076rm -f conftest.err conftest.$ac_ext
ba4481b5 12077fi
925c2f3f 12078echo "$as_me:12078: result: $ac_cv_header_arpa_inet_h" >&5
503d2be0
AS
12079echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
12080if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
12081 :
12082else
503d2be0 12083 ok_so_far=no
ba4481b5
DL
12084fi
12085
12086fi
12087if test $ok_so_far = yes; then
b936fae4 12088
925c2f3f 12089cat >>confdefs.h <<\EOF
ba4481b5 12090#define HAVE_INET_SOCKETS 1
925c2f3f 12091EOF
ba4481b5
DL
12092
12093fi
12094
12095if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 12096
925c2f3f 12097cat >>confdefs.h <<\EOF
ba4481b5 12098#define HAVE_AIX_SMT_EXP 1
925c2f3f 12099EOF
ba4481b5
DL
12100
12101fi
12102
925c2f3f 12103echo "$as_me:12103: checking whether system supports dynamic ptys" >&5
503d2be0 12104echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6
3d9fec71 12105if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
925c2f3f 12106 echo "$as_me:12106: result: yes" >&5
503d2be0 12107echo "${ECHO_T}yes" >&6
b936fae4 12108
925c2f3f 12109cat >>confdefs.h <<\EOF
3d9fec71 12110#define HAVE_DEV_PTMX 1
925c2f3f 12111EOF
3d9fec71
DL
12112
12113else
925c2f3f 12114 echo "$as_me:12114: result: no" >&5
503d2be0 12115echo "${ECHO_T}no" >&6
3d9fec71
DL
12116fi
12117
925c2f3f 12118echo "$as_me:12118: checking for pid_t" >&5
503d2be0
AS
12119echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
12120if test "${ac_cv_type_pid_t+set}" = set; then
12121 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 12122else
503d2be0 12123 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 12124#line 12124 "configure"
647847ea 12125#include "confdefs.h"
503d2be0
AS
12126$ac_includes_default
12127int
12128main ()
12129{
12130if ((pid_t *) 0)
12131 return 0;
12132if (sizeof (pid_t))
12133 return 0;
12134 ;
12135 return 0;
12136}
12137_ACEOF
12138rm -f conftest.$ac_objext
925c2f3f 12139if { (eval echo "$as_me:12139: \"$ac_compile\"") >&5
503d2be0
AS
12140 (eval $ac_compile) 2>&5
12141 ac_status=$?
925c2f3f 12142 echo "$as_me:12142: \$? = $ac_status" >&5
503d2be0
AS
12143 (exit $ac_status); } &&
12144 { ac_try='test -s conftest.$ac_objext'
925c2f3f 12145 { (eval echo "$as_me:12145: \"$ac_try\"") >&5
503d2be0
AS
12146 (eval $ac_try) 2>&5
12147 ac_status=$?
925c2f3f 12148 echo "$as_me:12148: \$? = $ac_status" >&5
503d2be0 12149 (exit $ac_status); }; }; then
647847ea
DL
12150 ac_cv_type_pid_t=yes
12151else
503d2be0
AS
12152 echo "$as_me: failed program was:" >&5
12153cat conftest.$ac_ext >&5
12154ac_cv_type_pid_t=no
647847ea 12155fi
503d2be0 12156rm -f conftest.$ac_objext conftest.$ac_ext
647847ea 12157fi
925c2f3f 12158echo "$as_me:12158: result: $ac_cv_type_pid_t" >&5
503d2be0
AS
12159echo "${ECHO_T}$ac_cv_type_pid_t" >&6
12160if test $ac_cv_type_pid_t = yes; then
12161 :
12162else
12163
925c2f3f 12164cat >>confdefs.h <<EOF
647847ea 12165#define pid_t int
925c2f3f 12166EOF
647847ea
DL
12167
12168fi
12169
503d2be0
AS
12170for ac_header in unistd.h vfork.h
12171do
12172as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
925c2f3f 12173echo "$as_me:12173: checking for $ac_header" >&5
503d2be0
AS
12174echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12175if eval "test \"\${$as_ac_Header+set}\" = set"; then
12176 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 12177else
925c2f3f
EZ
12178 cat >conftest.$ac_ext <<_ACEOF
12179#line 12179 "configure"
503d2be0
AS
12180#include "confdefs.h"
12181#include <$ac_header>
12182_ACEOF
925c2f3f 12183if { (eval echo "$as_me:12183: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
12184 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12185 ac_status=$?
12186 egrep -v '^ *\+' conftest.er1 >conftest.err
12187 rm -f conftest.er1
12188 cat conftest.err >&5
925c2f3f 12189 echo "$as_me:12189: \$? = $ac_status" >&5
503d2be0
AS
12190 (exit $ac_status); } >/dev/null; then
12191 if test -s conftest.err; then
12192 ac_cpp_err=$ac_c_preproc_warn_flag
12193 else
12194 ac_cpp_err=
12195 fi
647847ea 12196else
503d2be0
AS
12197 ac_cpp_err=yes
12198fi
12199if test -z "$ac_cpp_err"; then
925c2f3f 12200 eval "$as_ac_Header=yes"
647847ea 12201else
503d2be0 12202 echo "$as_me: failed program was:" >&5
647847ea 12203 cat conftest.$ac_ext >&5
925c2f3f 12204 eval "$as_ac_Header=no"
647847ea 12205fi
503d2be0 12206rm -f conftest.err conftest.$ac_ext
647847ea 12207fi
925c2f3f 12208echo "$as_me:12208: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
12209echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12210if test `eval echo '${'$as_ac_Header'}'` = yes; then
925c2f3f 12211 cat >>confdefs.h <<EOF
503d2be0 12212#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
925c2f3f 12213EOF
647847ea 12214
73b77ee5 12215fi
503d2be0 12216done
73b77ee5 12217
503d2be0
AS
12218for ac_func in fork vfork
12219do
12220as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
925c2f3f 12221echo "$as_me:12221: checking for $ac_func" >&5
503d2be0
AS
12222echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12223if eval "test \"\${$as_ac_var+set}\" = set"; then
12224 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 12225else
503d2be0 12226 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 12227#line 12227 "configure"
fa0b693c
GM
12228#include "confdefs.h"
12229/* System header to define __stub macros and hopefully few prototypes,
503d2be0 12230 which can conflict with char $ac_func (); below. */
fa0b693c
GM
12231#include <assert.h>
12232/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12233#ifdef __cplusplus
12234extern "C"
12235#endif
fa0b693c 12236/* We use char because int might match the return type of a gcc2
503d2be0
AS
12237 builtin and then its argument prototype would still apply. */
12238char $ac_func ();
12239char (*f) ();
fa0b693c 12240
503d2be0
AS
12241int
12242main ()
12243{
fa0b693c
GM
12244/* The GNU C library defines this for functions which it implements
12245 to always fail with ENOSYS. Some functions are actually named
12246 something starting with __ and the normal name is an alias. */
503d2be0 12247#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
fa0b693c
GM
12248choke me
12249#else
503d2be0 12250f = $ac_func;
fa0b693c
GM
12251#endif
12252
503d2be0
AS
12253 ;
12254 return 0;
12255}
12256_ACEOF
12257rm -f conftest.$ac_objext conftest$ac_exeext
925c2f3f 12258if { (eval echo "$as_me:12258: \"$ac_link\"") >&5
503d2be0
AS
12259 (eval $ac_link) 2>&5
12260 ac_status=$?
925c2f3f 12261 echo "$as_me:12261: \$? = $ac_status" >&5
503d2be0
AS
12262 (exit $ac_status); } &&
12263 { ac_try='test -s conftest$ac_exeext'
925c2f3f 12264 { (eval echo "$as_me:12264: \"$ac_try\"") >&5
503d2be0
AS
12265 (eval $ac_try) 2>&5
12266 ac_status=$?
925c2f3f 12267 echo "$as_me:12267: \$? = $ac_status" >&5
503d2be0
AS
12268 (exit $ac_status); }; }; then
12269 eval "$as_ac_var=yes"
12270else
12271 echo "$as_me: failed program was:" >&5
12272cat conftest.$ac_ext >&5
12273eval "$as_ac_var=no"
12274fi
12275rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12276fi
925c2f3f 12277echo "$as_me:12277: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
12278echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12279if test `eval echo '${'$as_ac_var'}'` = yes; then
925c2f3f 12280 cat >>confdefs.h <<EOF
503d2be0 12281#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
925c2f3f 12282EOF
503d2be0 12283
fa0b693c 12284fi
503d2be0 12285done
fa0b693c 12286
503d2be0
AS
12287ac_cv_func_fork_works=$ac_cv_func_fork
12288if test "x$ac_cv_func_fork" = xyes; then
925c2f3f 12289 echo "$as_me:12289: checking for working fork" >&5
503d2be0
AS
12290echo $ECHO_N "checking for working fork... $ECHO_C" >&6
12291if test "${ac_cv_func_fork_works+set}" = set; then
12292 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 12293else
503d2be0
AS
12294 if test "$cross_compiling" = yes; then
12295 ac_cv_func_fork_works=cross
12296else
12297 cat >conftest.$ac_ext <<_ACEOF
925c2f3f 12298