Add --trace-move.
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
503d2be0 3# Generated by Autoconf 2.52.
ba4481b5 4#
503d2be0
AS
5# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
6# Free Software Foundation, Inc.
ba4481b5
DL
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
503d2be0
AS
10# Avoid depending upon Character Ranges.
11as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14as_cr_digits='0123456789'
15as_cr_alnum=$as_cr_Letters$as_cr_digits
16
17# Sed expression to map a string onto a valid variable name.
18as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19
20# Sed expression to map a string onto a valid CPP name.
21as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
22
23# Be Bourne compatible
24if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25 emulate sh
26 NULLCMD=:
27elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28 set -o posix
29fi
30
31# Name of the executable.
32as_me=`echo "$0" |sed 's,.*[\\/],,'`
33
34if expr a : '\(a\)' >/dev/null 2>&1; then
35 as_expr=expr
36else
37 as_expr=false
38fi
39
40rm -f conf$$ conf$$.exe conf$$.file
41echo >conf$$.file
42if ln -s conf$$.file conf$$ 2>/dev/null; then
43 # We could just check for DJGPP; but this test a) works b) is more generic
44 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45 if test -f conf$$.exe; then
46 # Don't use ln at all; we don't have any links
47 as_ln_s='cp -p'
48 else
49 as_ln_s='ln -s'
50 fi
51elif ln conf$$.file conf$$ 2>/dev/null; then
52 as_ln_s=ln
53else
54 as_ln_s='cp -p'
55fi
56rm -f conf$$ conf$$.exe conf$$.file
57
58as_executable_p="test -f"
59
60# Support unset when possible.
61if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
62 as_unset=unset
63else
64 as_unset=false
65fi
66
67# NLS nuisances.
68$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
69$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
70$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
71$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
72$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
73$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
74$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
75$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
76
77# IFS
78# We need space, tab and new line, in precisely that order.
79as_nl='
80'
81IFS=" $as_nl"
82
83# CDPATH.
84$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
85
86# Name of the host.
87# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
88# so uname gets run too.
89ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
90
91exec 6>&1
92
93#
94# Initializations.
95#
ba4481b5 96ac_default_prefix=/usr/local
503d2be0
AS
97cross_compiling=no
98subdirs=
99MFLAGS= MAKEFLAGS=
100SHELL=${CONFIG_SHELL-/bin/sh}
101
102# Maximum number of lines to put in a shell here document.
103# This variable seems obsolete. It should probably be removed, and
104# only ac_max_sed_lines should be used.
105: ${ac_max_here_lines=38}
106
107ac_unique_file="src/lisp.h"
108# Factoring default headers for most tests.
109ac_includes_default="\
110#include <stdio.h>
111#if HAVE_SYS_TYPES_H
112# include <sys/types.h>
113#endif
114#if HAVE_SYS_STAT_H
115# include <sys/stat.h>
116#endif
117#if STDC_HEADERS
118# include <stdlib.h>
119# include <stddef.h>
120#else
121# if HAVE_STDLIB_H
122# include <stdlib.h>
123# endif
124#endif
125#if HAVE_STRING_H
126# if !STDC_HEADERS && HAVE_MEMORY_H
127# include <memory.h>
128# endif
129# include <string.h>
130#endif
131#if HAVE_STRINGS_H
132# include <strings.h>
133#endif
134#if HAVE_INTTYPES_H
135# include <inttypes.h>
136#else
137# if HAVE_STDINT_H
138# include <stdint.h>
139# endif
140#endif
141#if HAVE_UNISTD_H
142# include <unistd.h>
143#endif"
ba4481b5
DL
144
145# Initialize some variables set by options.
503d2be0
AS
146ac_init_help=
147ac_init_version=false
ba4481b5
DL
148# The variables have the same names as the options, with
149# dashes changed to underlines.
503d2be0 150cache_file=/dev/null
ba4481b5 151exec_prefix=NONE
ba4481b5 152no_create=
ba4481b5
DL
153no_recursion=
154prefix=NONE
155program_prefix=NONE
156program_suffix=NONE
157program_transform_name=s,x,x,
158silent=
159site=
160srcdir=
ba4481b5
DL
161verbose=
162x_includes=NONE
163x_libraries=NONE
503d2be0
AS
164
165# Installation directory options.
166# These are left unexpanded so users can "make install exec_prefix=/foo"
167# and all the variables that are supposed to be based on exec_prefix
168# by default will actually change.
169# Use braces instead of parens because sh, perl, etc. also accept them.
ba4481b5
DL
170bindir='${exec_prefix}/bin'
171sbindir='${exec_prefix}/sbin'
172libexecdir='${exec_prefix}/libexec'
173datadir='${prefix}/share'
174sysconfdir='${prefix}/etc'
175sharedstatedir='${prefix}/com'
176localstatedir='${prefix}/var'
177libdir='${exec_prefix}/lib'
178includedir='${prefix}/include'
179oldincludedir='/usr/include'
180infodir='${prefix}/info'
181mandir='${prefix}/man'
182
503d2be0
AS
183# Identity of this package.
184PACKAGE_NAME=
185PACKAGE_TARNAME=
186PACKAGE_VERSION=
187PACKAGE_STRING=
188PACKAGE_BUGREPORT=
ba4481b5
DL
189
190ac_prev=
191for ac_option
192do
ba4481b5
DL
193 # If the previous option needs an argument, assign it.
194 if test -n "$ac_prev"; then
195 eval "$ac_prev=\$ac_option"
196 ac_prev=
197 continue
198 fi
199
503d2be0 200 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
ba4481b5
DL
201
202 # Accept the important Cygnus configure options, so we can diagnose typos.
203
503d2be0 204 case $ac_option in
ba4481b5
DL
205
206 -bindir | --bindir | --bindi | --bind | --bin | --bi)
207 ac_prev=bindir ;;
208 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 209 bindir=$ac_optarg ;;
ba4481b5
DL
210
211 -build | --build | --buil | --bui | --bu)
503d2be0 212 ac_prev=build_alias ;;
ba4481b5 213 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 214 build_alias=$ac_optarg ;;
ba4481b5
DL
215
216 -cache-file | --cache-file | --cache-fil | --cache-fi \
217 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
218 ac_prev=cache_file ;;
219 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
220 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
221 cache_file=$ac_optarg ;;
222
223 --config-cache | -C)
224 cache_file=config.cache ;;
ba4481b5
DL
225
226 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
227 ac_prev=datadir ;;
228 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
229 | --da=*)
503d2be0 230 datadir=$ac_optarg ;;
ba4481b5
DL
231
232 -disable-* | --disable-*)
503d2be0 233 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 234 # Reject names that are not valid shell variable names.
503d2be0
AS
235 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
236 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
237 { (exit 1); exit 1; }; }
238 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
239 eval "enable_$ac_feature=no" ;;
ba4481b5
DL
240
241 -enable-* | --enable-*)
503d2be0 242 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 243 # Reject names that are not valid shell variable names.
503d2be0
AS
244 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246 { (exit 1); exit 1; }; }
247 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248 case $ac_option in
249 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
ba4481b5
DL
250 *) ac_optarg=yes ;;
251 esac
503d2be0 252 eval "enable_$ac_feature='$ac_optarg'" ;;
ba4481b5
DL
253
254 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
255 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
256 | --exec | --exe | --ex)
257 ac_prev=exec_prefix ;;
258 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
259 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
260 | --exec=* | --exe=* | --ex=*)
503d2be0 261 exec_prefix=$ac_optarg ;;
ba4481b5
DL
262
263 -gas | --gas | --ga | --g)
264 # Obsolete; use --with-gas.
265 with_gas=yes ;;
266
503d2be0
AS
267 -help | --help | --hel | --he | -h)
268 ac_init_help=long ;;
269 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
270 ac_init_help=recursive ;;
271 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
272 ac_init_help=short ;;
ba4481b5
DL
273
274 -host | --host | --hos | --ho)
503d2be0 275 ac_prev=host_alias ;;
ba4481b5 276 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 277 host_alias=$ac_optarg ;;
ba4481b5
DL
278
279 -includedir | --includedir | --includedi | --included | --include \
280 | --includ | --inclu | --incl | --inc)
281 ac_prev=includedir ;;
282 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
283 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 284 includedir=$ac_optarg ;;
ba4481b5
DL
285
286 -infodir | --infodir | --infodi | --infod | --info | --inf)
287 ac_prev=infodir ;;
288 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 289 infodir=$ac_optarg ;;
ba4481b5
DL
290
291 -libdir | --libdir | --libdi | --libd)
292 ac_prev=libdir ;;
293 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 294 libdir=$ac_optarg ;;
ba4481b5
DL
295
296 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
297 | --libexe | --libex | --libe)
298 ac_prev=libexecdir ;;
299 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
300 | --libexe=* | --libex=* | --libe=*)
503d2be0 301 libexecdir=$ac_optarg ;;
ba4481b5
DL
302
303 -localstatedir | --localstatedir | --localstatedi | --localstated \
304 | --localstate | --localstat | --localsta | --localst \
305 | --locals | --local | --loca | --loc | --lo)
306 ac_prev=localstatedir ;;
307 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
308 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
309 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
503d2be0 310 localstatedir=$ac_optarg ;;
ba4481b5
DL
311
312 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
313 ac_prev=mandir ;;
314 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 315 mandir=$ac_optarg ;;
ba4481b5
DL
316
317 -nfp | --nfp | --nf)
318 # Obsolete; use --without-fp.
319 with_fp=no ;;
320
321 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
322 | --no-cr | --no-c)
323 no_create=yes ;;
324
325 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
326 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
327 no_recursion=yes ;;
328
329 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
330 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
331 | --oldin | --oldi | --old | --ol | --o)
332 ac_prev=oldincludedir ;;
333 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
334 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
335 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 336 oldincludedir=$ac_optarg ;;
ba4481b5
DL
337
338 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
339 ac_prev=prefix ;;
340 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 341 prefix=$ac_optarg ;;
ba4481b5
DL
342
343 -program-prefix | --program-prefix | --program-prefi | --program-pref \
344 | --program-pre | --program-pr | --program-p)
345 ac_prev=program_prefix ;;
346 -program-prefix=* | --program-prefix=* | --program-prefi=* \
347 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 348 program_prefix=$ac_optarg ;;
ba4481b5
DL
349
350 -program-suffix | --program-suffix | --program-suffi | --program-suff \
351 | --program-suf | --program-su | --program-s)
352 ac_prev=program_suffix ;;
353 -program-suffix=* | --program-suffix=* | --program-suffi=* \
354 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 355 program_suffix=$ac_optarg ;;
ba4481b5
DL
356
357 -program-transform-name | --program-transform-name \
358 | --program-transform-nam | --program-transform-na \
359 | --program-transform-n | --program-transform- \
360 | --program-transform | --program-transfor \
361 | --program-transfo | --program-transf \
362 | --program-trans | --program-tran \
363 | --progr-tra | --program-tr | --program-t)
364 ac_prev=program_transform_name ;;
365 -program-transform-name=* | --program-transform-name=* \
366 | --program-transform-nam=* | --program-transform-na=* \
367 | --program-transform-n=* | --program-transform-=* \
368 | --program-transform=* | --program-transfor=* \
369 | --program-transfo=* | --program-transf=* \
370 | --program-trans=* | --program-tran=* \
371 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 372 program_transform_name=$ac_optarg ;;
ba4481b5
DL
373
374 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
375 | -silent | --silent | --silen | --sile | --sil)
376 silent=yes ;;
377
378 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
379 ac_prev=sbindir ;;
380 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
381 | --sbi=* | --sb=*)
503d2be0 382 sbindir=$ac_optarg ;;
ba4481b5
DL
383
384 -sharedstatedir | --sharedstatedir | --sharedstatedi \
385 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
386 | --sharedst | --shareds | --shared | --share | --shar \
387 | --sha | --sh)
388 ac_prev=sharedstatedir ;;
389 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
390 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
391 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
392 | --sha=* | --sh=*)
503d2be0 393 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
394
395 -site | --site | --sit)
396 ac_prev=site ;;
397 -site=* | --site=* | --sit=*)
503d2be0 398 site=$ac_optarg ;;
ba4481b5
DL
399
400 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
401 ac_prev=srcdir ;;
402 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 403 srcdir=$ac_optarg ;;
ba4481b5
DL
404
405 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
406 | --syscon | --sysco | --sysc | --sys | --sy)
407 ac_prev=sysconfdir ;;
408 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
409 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 410 sysconfdir=$ac_optarg ;;
ba4481b5
DL
411
412 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 413 ac_prev=target_alias ;;
ba4481b5 414 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 415 target_alias=$ac_optarg ;;
ba4481b5
DL
416
417 -v | -verbose | --verbose | --verbos | --verbo | --verb)
418 verbose=yes ;;
419
503d2be0
AS
420 -version | --version | --versio | --versi | --vers | -V)
421 ac_init_version=: ;;
ba4481b5
DL
422
423 -with-* | --with-*)
503d2be0 424 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 425 # Reject names that are not valid shell variable names.
503d2be0
AS
426 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
427 { echo "$as_me: error: invalid package name: $ac_package" >&2
428 { (exit 1); exit 1; }; }
ba4481b5 429 ac_package=`echo $ac_package| sed 's/-/_/g'`
503d2be0
AS
430 case $ac_option in
431 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
ba4481b5
DL
432 *) ac_optarg=yes ;;
433 esac
503d2be0 434 eval "with_$ac_package='$ac_optarg'" ;;
ba4481b5
DL
435
436 -without-* | --without-*)
503d2be0 437 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 438 # Reject names that are not valid shell variable names.
503d2be0
AS
439 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
440 { echo "$as_me: error: invalid package name: $ac_package" >&2
441 { (exit 1); exit 1; }; }
442 ac_package=`echo $ac_package | sed 's/-/_/g'`
443 eval "with_$ac_package=no" ;;
ba4481b5
DL
444
445 --x)
446 # Obsolete; use --with-x.
447 with_x=yes ;;
448
449 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
450 | --x-incl | --x-inc | --x-in | --x-i)
451 ac_prev=x_includes ;;
452 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
453 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 454 x_includes=$ac_optarg ;;
ba4481b5
DL
455
456 -x-libraries | --x-libraries | --x-librarie | --x-librari \
457 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
458 ac_prev=x_libraries ;;
459 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
460 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 461 x_libraries=$ac_optarg ;;
ba4481b5 462
503d2be0
AS
463 -*) { echo "$as_me: error: unrecognized option: $ac_option
464Try \`$0 --help' for more information." >&2
465 { (exit 1); exit 1; }; }
ba4481b5
DL
466 ;;
467
503d2be0
AS
468 *=*)
469 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
470 # Reject names that are not valid shell variable names.
471 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
472 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
473 { (exit 1); exit 1; }; }
474 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
475 eval "$ac_envvar='$ac_optarg'"
476 export $ac_envvar ;;
477
ba4481b5 478 *)
503d2be0
AS
479 # FIXME: should be removed in autoconf 3.0.
480 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
481 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
482 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
483 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
484 ;;
485
486 esac
487done
488
489if test -n "$ac_prev"; then
503d2be0
AS
490 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
491 { echo "$as_me: error: missing argument to $ac_option" >&2
492 { (exit 1); exit 1; }; }
ba4481b5 493fi
ba4481b5 494
503d2be0
AS
495# Be sure to have absolute paths.
496for ac_var in exec_prefix prefix
497do
498 eval ac_val=$`echo $ac_var`
499 case $ac_val in
500 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
501 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
502 { (exit 1); exit 1; }; };;
503 esac
504done
ba4481b5 505
503d2be0
AS
506# Be sure to have absolute paths.
507for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
508 localstatedir libdir includedir oldincludedir infodir mandir
ba4481b5 509do
503d2be0
AS
510 eval ac_val=$`echo $ac_var`
511 case $ac_val in
512 [\\/$]* | ?:[\\/]* ) ;;
513 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
514 { (exit 1); exit 1; }; };;
ba4481b5
DL
515 esac
516done
517
503d2be0
AS
518# There might be people who depend on the old broken behavior: `$host'
519# used to hold the argument of --host etc.
520build=$build_alias
521host=$host_alias
522target=$target_alias
523
524# FIXME: should be removed in autoconf 3.0.
525if test "x$host_alias" != x; then
526 if test "x$build_alias" = x; then
527 cross_compiling=maybe
528 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
529 If a cross compiler is detected then cross compile mode will be used." >&2
530 elif test "x$build_alias" != "x$host_alias"; then
531 cross_compiling=yes
532 fi
533fi
ba4481b5 534
503d2be0
AS
535ac_tool_prefix=
536test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 537
503d2be0 538test "$silent" = yes && exec 6>/dev/null
ba4481b5
DL
539
540# Find the source files, if location was not specified.
541if test -z "$srcdir"; then
542 ac_srcdir_defaulted=yes
543 # Try the directory containing this script, then its parent.
544 ac_prog=$0
503d2be0 545 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
ba4481b5
DL
546 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
547 srcdir=$ac_confdir
548 if test ! -r $srcdir/$ac_unique_file; then
549 srcdir=..
550 fi
551else
552 ac_srcdir_defaulted=no
553fi
554if test ! -r $srcdir/$ac_unique_file; then
555 if test "$ac_srcdir_defaulted" = yes; then
503d2be0
AS
556 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
557 { (exit 1); exit 1; }; }
ba4481b5 558 else
503d2be0
AS
559 { echo "$as_me: error: cannot find sources in $srcdir" >&2
560 { (exit 1); exit 1; }; }
ba4481b5
DL
561 fi
562fi
503d2be0
AS
563srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
564ac_env_build_alias_set=${build_alias+set}
565ac_env_build_alias_value=$build_alias
566ac_cv_env_build_alias_set=${build_alias+set}
567ac_cv_env_build_alias_value=$build_alias
568ac_env_host_alias_set=${host_alias+set}
569ac_env_host_alias_value=$host_alias
570ac_cv_env_host_alias_set=${host_alias+set}
571ac_cv_env_host_alias_value=$host_alias
572ac_env_target_alias_set=${target_alias+set}
573ac_env_target_alias_value=$target_alias
574ac_cv_env_target_alias_set=${target_alias+set}
575ac_cv_env_target_alias_value=$target_alias
576ac_env_CC_set=${CC+set}
577ac_env_CC_value=$CC
578ac_cv_env_CC_set=${CC+set}
579ac_cv_env_CC_value=$CC
580ac_env_CFLAGS_set=${CFLAGS+set}
581ac_env_CFLAGS_value=$CFLAGS
582ac_cv_env_CFLAGS_set=${CFLAGS+set}
583ac_cv_env_CFLAGS_value=$CFLAGS
584ac_env_LDFLAGS_set=${LDFLAGS+set}
585ac_env_LDFLAGS_value=$LDFLAGS
586ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
587ac_cv_env_LDFLAGS_value=$LDFLAGS
588ac_env_CPPFLAGS_set=${CPPFLAGS+set}
589ac_env_CPPFLAGS_value=$CPPFLAGS
590ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
591ac_cv_env_CPPFLAGS_value=$CPPFLAGS
592ac_env_CPP_set=${CPP+set}
593ac_env_CPP_value=$CPP
594ac_cv_env_CPP_set=${CPP+set}
595ac_cv_env_CPP_value=$CPP
596
597#
598# Report the --help message.
599#
600if test "$ac_init_help" = "long"; then
601 # Omit some internal or obsolete options to make the list less imposing.
602 # This message is too long to be a string in the A/UX 3.1 sh.
603 cat <<EOF
604\`configure' configures this package to adapt to many kinds of systems.
605
606Usage: $0 [OPTION]... [VAR=VALUE]...
607
608To assign environment variables (e.g., CC, CFLAGS...), specify them as
609VAR=VALUE. See below for descriptions of some of the useful variables.
610
611Defaults for the options are specified in brackets.
612
613Configuration:
614 -h, --help display this help and exit
615 --help=short display options specific to this package
616 --help=recursive display the short help of all the included packages
617 -V, --version display version information and exit
618 -q, --quiet, --silent do not print \`checking...' messages
619 --cache-file=FILE cache test results in FILE [disabled]
620 -C, --config-cache alias for \`--cache-file=config.cache'
621 -n, --no-create do not create output files
622 --srcdir=DIR find the sources in DIR [configure dir or \`..']
623
624EOF
625
626 cat <<EOF
627Installation directories:
628 --prefix=PREFIX install architecture-independent files in PREFIX
629 [$ac_default_prefix]
630 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
631 [PREFIX]
632
633By default, \`make install' will install all the files in
634\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
635an installation prefix other than \`$ac_default_prefix' using \`--prefix',
636for instance \`--prefix=\$HOME'.
637
638For better control, use the options below.
639
640Fine tuning of the installation directories:
641 --bindir=DIR user executables [EPREFIX/bin]
642 --sbindir=DIR system admin executables [EPREFIX/sbin]
643 --libexecdir=DIR program executables [EPREFIX/libexec]
644 --datadir=DIR read-only architecture-independent data [PREFIX/share]
645 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
646 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
647 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
648 --libdir=DIR object code libraries [EPREFIX/lib]
649 --includedir=DIR C header files [PREFIX/include]
650 --oldincludedir=DIR C header files for non-gcc [/usr/include]
651 --infodir=DIR info documentation [PREFIX/info]
652 --mandir=DIR man documentation [PREFIX/man]
653EOF
654
655 cat <<\EOF
656
ba5da88a
PJ
657Program names:
658 --program-prefix=PREFIX prepend PREFIX to installed program names
659 --program-suffix=SUFFIX append SUFFIX to installed program names
660 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
661
503d2be0
AS
662X features:
663 --x-includes=DIR X include files are in DIR
664 --x-libraries=DIR X library files are in DIR
665
666System types:
667 --build=BUILD configure for building on BUILD [guessed]
668 --host=HOST build programs to run on HOST [BUILD]
669EOF
670fi
671
672if test -n "$ac_init_help"; then
673
674 cat <<\EOF
675
676Optional Features:
677 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
678 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
679 --disable-largefile omit support for large files
680
681Optional Packages:
682 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
683 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
684 --without-gcc don't use GCC to compile Emacs if GCC is found
685 --without-pop don't support POP mail retrieval with movemail
686 --with-kerberos support Kerberos-authenticated POP
687 --with-kerberos5 support Kerberos version 5 authenticated POP
688 --with-hesiod support Hesiod to get the POP server host
689 --with-x-toolkit=KIT use an X toolkit (KIT = yes/lucid/athena/motif/no)
690 --with-xpm use -lXpm for displaying XPM images
691 --with-jpeg use -ljpeg for displaying JPEG images
692 --with-tiff use -ltiff for displaying TIFF images
693 --with-gif use -lungif for displaying GIF images
694 --with-png use -lpng for displaying PNG images
695 --without-toolkit-scroll-bars
cc227489
MB
696 don't use Motif or Xaw3d scroll bars
697 --without-xim don't use X11 XIM
503d2be0
AS
698 --with-x use the X Window System
699
700Some influential environment variables:
701 CC C compiler command
702 CFLAGS C compiler flags
703 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
704 nonstandard directory <lib dir>
705 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
706 headers in a nonstandard directory <include dir>
707 CPP C preprocessor
708
709Use these variables to override the choices made by `configure' or to help
710it to find libraries and programs with nonstandard names/locations.
711
712EOF
713fi
714
715if test "$ac_init_help" = "recursive"; then
716 # If there are subdirs, report their specific --help.
717 ac_popdir=`pwd`
718 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
719 cd $ac_subdir
720 # A "../" for each directory in /$ac_subdir.
721 ac_dots=`echo $ac_subdir |
722 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
723
724 case $srcdir in
725 .) # No --srcdir option. We are building in place.
726 ac_sub_srcdir=$srcdir ;;
727 [\\/]* | ?:[\\/]* ) # Absolute path.
728 ac_sub_srcdir=$srcdir/$ac_subdir ;;
729 *) # Relative path.
730 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
731 esac
732
733 # Check for guested configure; otherwise get Cygnus style configure.
734 if test -f $ac_sub_srcdir/configure.gnu; then
735 echo
736 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
737 elif test -f $ac_sub_srcdir/configure; then
738 echo
739 $SHELL $ac_sub_srcdir/configure --help=recursive
740 elif test -f $ac_sub_srcdir/configure.ac ||
741 test -f $ac_sub_srcdir/configure.in; then
742 echo
743 $ac_configure --help
744 else
745 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
746 fi
747 cd $ac_popdir
748 done
749fi
750
751test -n "$ac_init_help" && exit 0
752if $ac_init_version; then
753 cat <<\EOF
754
755Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
756Free Software Foundation, Inc.
757This configure script is free software; the Free Software Foundation
758gives unlimited permission to copy, distribute and modify it.
759EOF
760 exit 0
761fi
762exec 5>config.log
763cat >&5 <<EOF
764This file contains any messages produced by compilers while
765running configure, to aid debugging if configure makes a mistake.
766
767It was created by $as_me, which was
768generated by GNU Autoconf 2.52. Invocation command line was
769
770 $ $0 $@
771
772EOF
773{
774cat <<_ASUNAME
775## ---------- ##
776## Platform. ##
777## ---------- ##
778
779hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
780uname -m = `(uname -m) 2>/dev/null || echo unknown`
781uname -r = `(uname -r) 2>/dev/null || echo unknown`
782uname -s = `(uname -s) 2>/dev/null || echo unknown`
783uname -v = `(uname -v) 2>/dev/null || echo unknown`
784
785/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
786/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
787
788/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
789/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
790/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
791hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
792/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
793/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
794/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
795
796PATH = $PATH
797
798_ASUNAME
799} >&5
800
801cat >&5 <<EOF
802## ------------ ##
803## Core tests. ##
804## ------------ ##
805
806EOF
807
808# Keep a trace of the command line.
809# Strip out --no-create and --no-recursion so they do not pile up.
810# Also quote any args containing shell meta-characters.
811ac_configure_args=
812ac_sep=
813for ac_arg
814do
815 case $ac_arg in
816 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
817 | --no-cr | --no-c) ;;
818 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
819 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
820 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
821 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
822 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
823 ac_sep=" " ;;
824 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
825 ac_sep=" " ;;
826 esac
827 # Get rid of the leading space.
828done
829
830# When interrupted or exit'd, cleanup temporary files, and complete
831# config.log. We remove comments because anyway the quotes in there
832# would cause problems or look ugly.
833trap 'exit_status=$?
834 # Save into config.log some information that might help in debugging.
835 echo >&5
836 echo "## ----------------- ##" >&5
837 echo "## Cache variables. ##" >&5
838 echo "## ----------------- ##" >&5
839 echo >&5
840 # The following way of writing the cache mishandles newlines in values,
841{
842 (set) 2>&1 |
843 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
844 *ac_space=\ *)
845 sed -n \
846 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
847 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
848 ;;
849 *)
850 sed -n \
851 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
852 ;;
853 esac;
854} >&5
855 sed "/^$/d" confdefs.h >conftest.log
856 if test -s conftest.log; then
857 echo >&5
858 echo "## ------------ ##" >&5
859 echo "## confdefs.h. ##" >&5
860 echo "## ------------ ##" >&5
861 echo >&5
862 cat conftest.log >&5
863 fi
864 (echo; echo) >&5
865 test "$ac_signal" != 0 &&
866 echo "$as_me: caught signal $ac_signal" >&5
867 echo "$as_me: exit $exit_status" >&5
868 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
869 exit $exit_status
870 ' 0
871for ac_signal in 1 2 13 15; do
872 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
873done
874ac_signal=0
875
876# confdefs.h avoids OS command line length limits that DEFS can exceed.
877rm -rf conftest* confdefs.h
878# AIX cpp loses on an empty file, so make sure it contains at least a newline.
879echo >confdefs.h
ba4481b5 880
503d2be0 881# Let the site file select an alternate cache file if it wants to.
ba4481b5
DL
882# Prefer explicitly selected file to automatically selected ones.
883if test -z "$CONFIG_SITE"; then
884 if test "x$prefix" != xNONE; then
885 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
886 else
887 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
888 fi
889fi
890for ac_site_file in $CONFIG_SITE; do
891 if test -r "$ac_site_file"; then
ba5da88a 892 { echo "$as_me:892: loading site script $ac_site_file" >&5
503d2be0
AS
893echo "$as_me: loading site script $ac_site_file" >&6;}
894 cat "$ac_site_file" >&5
ba4481b5
DL
895 . "$ac_site_file"
896 fi
897done
898
899if test -r "$cache_file"; then
503d2be0
AS
900 # Some versions of bash will fail to source /dev/null (special
901 # files actually), so we avoid doing that.
902 if test -f "$cache_file"; then
ba5da88a 903 { echo "$as_me:903: loading cache $cache_file" >&5
503d2be0
AS
904echo "$as_me: loading cache $cache_file" >&6;}
905 case $cache_file in
906 [\\/]* | ?:[\\/]* ) . $cache_file;;
907 *) . ./$cache_file;;
908 esac
909 fi
ba4481b5 910else
ba5da88a 911 { echo "$as_me:911: creating cache $cache_file" >&5
503d2be0
AS
912echo "$as_me: creating cache $cache_file" >&6;}
913 >$cache_file
914fi
915
916# Check that the precious variables saved in the cache have kept the same
917# value.
918ac_cache_corrupted=false
919for ac_var in `(set) 2>&1 |
920 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
921 eval ac_old_set=\$ac_cv_env_${ac_var}_set
922 eval ac_new_set=\$ac_env_${ac_var}_set
923 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
924 eval ac_new_val="\$ac_env_${ac_var}_value"
925 case $ac_old_set,$ac_new_set in
926 set,)
ba5da88a 927 { echo "$as_me:927: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
928echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
929 ac_cache_corrupted=: ;;
930 ,set)
ba5da88a 931 { echo "$as_me:931: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
932echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
933 ac_cache_corrupted=: ;;
934 ,);;
935 *)
936 if test "x$ac_old_val" != "x$ac_new_val"; then
ba5da88a 937 { echo "$as_me:937: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 938echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
ba5da88a 939 { echo "$as_me:939: former value: $ac_old_val" >&5
503d2be0 940echo "$as_me: former value: $ac_old_val" >&2;}
ba5da88a 941 { echo "$as_me:941: current value: $ac_new_val" >&5
503d2be0
AS
942echo "$as_me: current value: $ac_new_val" >&2;}
943 ac_cache_corrupted=:
944 fi;;
945 esac
946 # Pass precious variables to config.status. It doesn't matter if
947 # we pass some twice (in addition to the command line arguments).
948 if test "$ac_new_set" = set; then
949 case $ac_new_val in
950 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
951 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
952 ac_configure_args="$ac_configure_args '$ac_arg'"
953 ;;
954 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
955 ;;
956 esac
957 fi
958done
959if $ac_cache_corrupted; then
ba5da88a 960 { echo "$as_me:960: error: changes in the environment can compromise the build" >&5
503d2be0 961echo "$as_me: error: changes in the environment can compromise the build" >&2;}
ba5da88a 962 { { echo "$as_me:962: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
963echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
964 { (exit 1); exit 1; }; }
ba4481b5
DL
965fi
966
967ac_ext=c
ba4481b5 968ac_cpp='$CPP $CPPFLAGS'
503d2be0
AS
969ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
970ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
971ac_compiler_gnu=$ac_cv_c_compiler_gnu
972
973case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
974 *c*,-n*) ECHO_N= ECHO_C='
975' ECHO_T=' ' ;;
976 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
977 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
978esac
979echo "#! $SHELL" >conftest.sh
980echo "exit 0" >>conftest.sh
981chmod +x conftest.sh
ba5da88a 982if { (echo "$as_me:982: PATH=\".;.\"; conftest.sh") >&5
503d2be0
AS
983 (PATH=".;."; conftest.sh) 2>&5
984 ac_status=$?
ba5da88a 985 echo "$as_me:985: \$? = $ac_status" >&5
503d2be0
AS
986 (exit $ac_status); }; then
987 ac_path_separator=';'
ba4481b5 988else
503d2be0 989 ac_path_separator=:
ba4481b5 990fi
503d2be0
AS
991PATH_SEPARATOR="$ac_path_separator"
992rm -f conftest.sh
ba4481b5 993
503d2be0 994ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 995
ba5da88a
PJ
996test "$program_prefix" != NONE &&
997 program_transform_name="s,^,$program_prefix,;$program_transform_name"
998# Use a double $ so make ignores it.
999test "$program_suffix" != NONE &&
1000 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1001# Double any \ or $. echo might interpret backslashes.
1002# By default was `s,x,x', remove it if useless.
1003cat <<\_ACEOF >conftest.sed
1004s/[\\$]/&&/g;s/;s,x,x,$//
1005_ACEOF
1006program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1007rm conftest.sed
1008
ba4481b5
DL
1009lispdir='${datadir}/emacs/${version}/lisp'
1010locallisppath='${datadir}/emacs/${version}/site-lisp:'\
1011'${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
1012lisppath='${locallisppath}:${lispdir}'
1013etcdir='${datadir}/emacs/${version}/etc'
1014archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1015docdir='${datadir}/emacs/${version}/etc'
1016
1017# Check whether --with-gcc or --without-gcc was given.
1018if test "${with_gcc+set}" = set; then
1019 withval="$with_gcc"
503d2be0
AS
1020
1021fi;
ba4481b5
DL
1022
1023# Check whether --with-pop or --without-pop was given.
1024if test "${with_pop+set}" = set; then
1025 withval="$with_pop"
243cf185 1026 if test "$withval" = yes; then
503d2be0 1027 cat >>confdefs.h <<\EOF
ba4481b5
DL
1028#define MAIL_USE_POP 1
1029EOF
1030
243cf185
DL
1031else :
1032fi
3d9fec71 1033else
503d2be0 1034 cat >>confdefs.h <<\EOF
3d9fec71
DL
1035#define MAIL_USE_POP 1
1036EOF
1037
503d2be0 1038fi;
ba4481b5 1039
a21616bd
KR
1040# Check whether --with-kerberos or --without-kerberos was given.
1041if test "${with_kerberos+set}" = set; then
1042 withval="$with_kerberos"
503d2be0 1043 cat >>confdefs.h <<\EOF
a21616bd
KR
1044#define KERBEROS 1
1045EOF
1046
503d2be0 1047fi;
a21616bd
KR
1048
1049# Check whether --with-kerberos5 or --without-kerberos5 was given.
1050if test "${with_kerberos5+set}" = set; then
1051 withval="$with_kerberos5"
1052 if test "${with_kerberos5+set}" = set; then
1053 if test "${with_kerberos+set}" != set; then
1054 with_kerberos=yes
503d2be0 1055 cat >>confdefs.h <<\EOF
a21616bd
KR
1056#define KERBEROS 1
1057EOF
1058
1059 fi
1060fi
503d2be0 1061cat >>confdefs.h <<\EOF
a21616bd
KR
1062#define KERBEROS5 1
1063EOF
1064
503d2be0 1065fi;
a21616bd 1066
ba4481b5
DL
1067# Check whether --with-hesiod or --without-hesiod was given.
1068if test "${with_hesiod+set}" = set; then
1069 withval="$with_hesiod"
503d2be0 1070 cat >>confdefs.h <<\EOF
ba4481b5
DL
1071#define HESIOD 1
1072EOF
1073
503d2be0 1074fi;
ba4481b5
DL
1075
1076# Check whether --with-x-toolkit or --without-x-toolkit was given.
1077if test "${with_x_toolkit+set}" = set; then
1078 withval="$with_x_toolkit"
1079 case "${withval}" in
1080 y | ye | yes ) val=athena ;;
1081 n | no ) val=no ;;
1082 l | lu | luc | luci | lucid ) val=lucid ;;
1083 a | at | ath | athe | athen | athena ) val=athena ;;
1084 m | mo | mot | moti | motif ) val=motif ;;
1085 * )
ba5da88a 1086{ { echo "$as_me:1086: error: \`--with-x-toolkit=$withval' is invalid\;
ba4481b5 1087this option's value should be \`yes', \`no', \`lucid', \`athena', or \`motif'.
503d2be0
AS
1088Currently, \`yes', \`athena' and \`lucid' are synonyms." >&5
1089echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid\;
1090this option's value should be \`yes', \`no', \`lucid', \`athena', or \`motif'.
1091Currently, \`yes', \`athena' and \`lucid' are synonyms." >&2;}
1092 { (exit 1); exit 1; }; }
ba4481b5
DL
1093 ;;
1094 esac
1095 with_x_toolkit=$val
1096
503d2be0 1097fi;
ba4481b5
DL
1098
1099# Check whether --with-xpm or --without-xpm was given.
1100if test "${with_xpm+set}" = set; then
1101 withval="$with_xpm"
503d2be0
AS
1102
1103fi;
ba4481b5
DL
1104
1105# Check whether --with-jpeg or --without-jpeg was given.
1106if test "${with_jpeg+set}" = set; then
1107 withval="$with_jpeg"
503d2be0
AS
1108
1109fi;
ba4481b5
DL
1110
1111# Check whether --with-tiff or --without-tiff was given.
1112if test "${with_tiff+set}" = set; then
1113 withval="$with_tiff"
503d2be0
AS
1114
1115fi;
ba4481b5
DL
1116
1117# Check whether --with-gif or --without-gif was given.
1118if test "${with_gif+set}" = set; then
1119 withval="$with_gif"
503d2be0
AS
1120
1121fi;
ba4481b5
DL
1122
1123# Check whether --with-png or --without-png was given.
1124if test "${with_png+set}" = set; then
1125 withval="$with_png"
503d2be0
AS
1126
1127fi;
ba4481b5
DL
1128
1129# Check whether --with-toolkit-scroll-bars or --without-toolkit-scroll-bars was given.
1130if test "${with_toolkit_scroll_bars+set}" = set; then
1131 withval="$with_toolkit_scroll_bars"
503d2be0
AS
1132
1133fi;
ba4481b5 1134
1d36487c
GM
1135# Check whether --with-xim or --without-xim was given.
1136if test "${with_xim+set}" = set; then
1137 withval="$with_xim"
1d36487c 1138
503d2be0 1139fi;
ba4481b5
DL
1140
1141#### Make srcdir absolute, if it isn't already. It's important to
17494071 1142#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
1143#### give you automounter prefixes, which can go away. We do all this
1144#### so Emacs can find its files when run uninstalled.
17494071
GM
1145## Make sure CDPATH doesn't affect cd (in case PWD is relative).
1146unset CDPATH
ba4481b5
DL
1147case "${srcdir}" in
1148 /* ) ;;
1149 . )
1150 ## We may be able to use the $PWD environment variable to make this
1151 ## absolute. But sometimes PWD is inaccurate.
17494071 1152 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".${PWD}" ;
ba4481b5
DL
1153 then
1154 srcdir="$PWD"
1155 else
1156 srcdir="`(cd ${srcdir}; pwd)`"
1157 fi
1158 ;;
1159 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
1160esac
1161
1162#### Check if the source directory already has a configured system in it.
1163if test `pwd` != `(cd ${srcdir} && pwd)` \
1164 && test -f "${srcdir}/src/config.h" ; then
ba5da88a 1165 { echo "$as_me:1165: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
1166 as a build directory right now; it has been configured in its own
1167 right. To configure in another directory as well, you MUST
1168 use GNU make. If you do not have GNU make, then you must
1169 now do \`make distclean' in ${srcdir},
1170 and then run $0 again." >&5
1171echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
1172 as a build directory right now; it has been configured in its own
1173 right. To configure in another directory as well, you MUST
1174 use GNU make. If you do not have GNU make, then you must
1175 now do \`make distclean' in ${srcdir},
503d2be0 1176 and then run $0 again." >&2;}
ba4481b5
DL
1177
1178 extrasub='/^VPATH[ ]*=/c\
1179vpath %.c $(srcdir)\
1180vpath %.h $(srcdir)\
1181vpath %.y $(srcdir)\
1182vpath %.l $(srcdir)\
1183vpath %.s $(srcdir)\
1184vpath %.in $(srcdir)\
1185vpath %.texi $(srcdir)'
1186fi
1187
1188#### Given the configuration name, set machfile and opsysfile to the
1189#### names of the m/*.h and s/*.h files we should use.
1190
1191### Canonicalize the configuration name.
1192
1193ac_aux_dir=
1194for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1195 if test -f $ac_dir/install-sh; then
1196 ac_aux_dir=$ac_dir
1197 ac_install_sh="$ac_aux_dir/install-sh -c"
1198 break
1199 elif test -f $ac_dir/install.sh; then
1200 ac_aux_dir=$ac_dir
1201 ac_install_sh="$ac_aux_dir/install.sh -c"
1202 break
503d2be0
AS
1203 elif test -f $ac_dir/shtool; then
1204 ac_aux_dir=$ac_dir
1205 ac_install_sh="$ac_aux_dir/shtool install -c"
1206 break
ba4481b5
DL
1207 fi
1208done
1209if test -z "$ac_aux_dir"; then
ba5da88a 1210 { { echo "$as_me:1210: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
503d2be0
AS
1211echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1212 { (exit 1); exit 1; }; }
ba4481b5 1213fi
503d2be0
AS
1214ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1215ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1216ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ba4481b5
DL
1217
1218# Make sure we can run config.sub.
503d2be0 1219$ac_config_sub sun4 >/dev/null 2>&1 ||
ba5da88a 1220 { { echo "$as_me:1220: error: cannot run $ac_config_sub" >&5
503d2be0
AS
1221echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1222 { (exit 1); exit 1; }; }
1223
ba5da88a 1224echo "$as_me:1224: checking build system type" >&5
503d2be0
AS
1225echo $ECHO_N "checking build system type... $ECHO_C" >&6
1226if test "${ac_cv_build+set}" = set; then
1227 echo $ECHO_N "(cached) $ECHO_C" >&6
1228else
1229 ac_cv_build_alias=$build_alias
1230test -z "$ac_cv_build_alias" &&
1231 ac_cv_build_alias=`$ac_config_guess`
1232test -z "$ac_cv_build_alias" &&
ba5da88a 1233 { { echo "$as_me:1233: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
1234echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1235 { (exit 1); exit 1; }; }
1236ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
ba5da88a 1237 { { echo "$as_me:1237: error: $ac_config_sub $ac_cv_build_alias failed." >&5
503d2be0
AS
1238echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1239 { (exit 1); exit 1; }; }
1240
1241fi
ba5da88a 1242echo "$as_me:1242: result: $ac_cv_build" >&5
503d2be0
AS
1243echo "${ECHO_T}$ac_cv_build" >&6
1244build=$ac_cv_build
1245build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1246build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1247build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1248
b1b84649 1249echo "$as_me:1249: checking host system type" >&5
503d2be0
AS
1250echo $ECHO_N "checking host system type... $ECHO_C" >&6
1251if test "${ac_cv_host+set}" = set; then
1252 echo $ECHO_N "(cached) $ECHO_C" >&6
1253else
1254 ac_cv_host_alias=$host_alias
1255test -z "$ac_cv_host_alias" &&
1256 ac_cv_host_alias=$ac_cv_build_alias
1257ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
b1b84649 1258 { { echo "$as_me:1258: error: $ac_config_sub $ac_cv_host_alias failed" >&5
503d2be0
AS
1259echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1260 { (exit 1); exit 1; }; }
1261
1262fi
b1b84649 1263echo "$as_me:1263: result: $ac_cv_host" >&5
503d2be0
AS
1264echo "${ECHO_T}$ac_cv_host" >&6
1265host=$ac_cv_host
1266host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1267host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1268host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ba4481b5
DL
1269
1270canonical=$host
531a3336 1271configuration=${host_alias-$host}
ba4481b5 1272
ba4481b5
DL
1273### If you add support for a new configuration, add code to this
1274### switch statement to recognize your configuration name and select
1275### the appropriate operating system and machine description files.
1276
1277### You would hope that you could choose an m/*.h file pretty much
1278### based on the machine portion of the configuration name, and an s-
1279### file based on the operating system portion. However, it turns out
1280### that each m/*.h file is pretty manufacturer-specific - for
1281### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
1282### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
1283### machines. So we basically have to have a special case for each
1284### configuration name.
1285###
1286### As far as handling version numbers on operating systems is
1287### concerned, make sure things will fail in a fixable way. If
1288### /etc/MACHINES doesn't say anything about version numbers, be
1289### prepared to handle anything reasonably. If version numbers
1290### matter, be sure /etc/MACHINES says something about it.
1291###
1292### Eric Raymond says we should accept strings like "sysvr4" to mean
1293### "System V Release 4"; he writes, "The old convention encouraged
1294### confusion between `system' and `release' levels'."
1295
1296machine='' opsys='' unported=no
1297case "${canonical}" in
1298
1096bcc0
GM
1299 ## FreeBSD ports
1300 *-*-freebsd* )
1301 opsys=freebsd
1302 case "${canonical}" in
1303 alpha*-*-freebsd*) machine=alpha ;;
1304 i[3456]86-*-freebsd*) machine=intel386 ;;
1305 esac
1306 ;;
1307
ba4481b5
DL
1308 ## NetBSD ports
1309 *-*-netbsd* )
1310 opsys=netbsd
1311 case "${canonical}" in
1312 alpha*-*-netbsd*) machine=alpha ;;
1313 i[3456]86-*-netbsd*) machine=intel386 ;;
1314 m68k-*-netbsd*)
1315 # This is somewhat bogus.
1316 machine=hp9000s300 ;;
1317 powerpc-apple-netbsd*) machine=macppc ;;
1318 mips-*-netbsd*) machine=pmax ;;
2df636f4 1319 mipsel-*-netbsd*) machine=pmax ;;
ba4481b5 1320 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 1321 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 1322 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 1323 vax-*-netbsd*) machine=vax ;;
2df636f4 1324 arm-*-netbsd*) machine=arm ;;
ba4481b5
DL
1325 esac
1326 ;;
1327
1328 ## OpenBSD ports
1329 *-*-openbsd* )
1330 opsys=openbsd
1331 case "${canonical}" in
1332 alpha*-*-openbsd*) machine=alpha ;;
1333 i386-*-openbsd*) machine=intel386 ;;
1334 m68k-*-openbsd*) machine=hp9000s300 ;;
1335 mipsel-*-openbsd*) machine=pmax ;;
1336 ns32k-*-openbsd*) machine=ns32000 ;;
1337 sparc-*-openbsd*) machine=sparc ;;
1338 vax-*-openbsd*) machine=vax ;;
1339 esac
1340 ;;
1341
1342 ## Acorn RISCiX:
1343 arm-acorn-riscix1.1* )
1344 machine=acorn opsys=riscix1-1
1345 ;;
1346 arm-acorn-riscix1.2* | arm-acorn-riscix )
1347 ## This name is riscix12 instead of riscix1.2
1348 ## to avoid a file name conflict on MSDOS.
1349 machine=acorn opsys=riscix12
1350 ;;
1351
1352 ## BSDI ports
1353 *-*-bsdi* )
1354 opsys=bsdi
1355 case "${canonical}" in
1356 i[345]86-*-bsdi*) machine=intel386 ;;
1357 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 1358 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
1359 esac
1360 case "${canonical}" in
1361 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
1362 *-*-bsdi2.0* ) opsys=bsdos2 ;;
1363 *-*-bsdi2* ) opsys=bsdos2-1 ;;
1364 *-*-bsdi3* ) opsys=bsdos3 ;;
1365 *-*-bsdi4* ) opsys=bsdos4 ;;
1366 esac
1367 ;;
1368
1369 ## Alliant machines
1370 ## Strictly speaking, we need the version of the alliant operating
1371 ## system to choose the right machine file, but currently the
1372 ## configuration name doesn't tell us enough to choose the right
1373 ## one; we need to give alliants their own operating system name to
1374 ## do this right. When someone cares, they can help us.
1375 fx80-alliant-* )
1376 machine=alliant4 opsys=bsd4-2
1377 ;;
1378 i860-alliant-* )
1379 machine=alliant-2800 opsys=bsd4-3
1380 ;;
1381
1382 ## Alpha (DEC) machines.
1383 alpha*-dec-osf* )
1384 machine=alpha opsys=osf1
1385 # This is needed to find X11R6.1 libraries for certain tests.
1386 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
1387 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
1388 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
1389 # due to non-traditional preprocessing with the current compiler
1390 # defaults. OSF 4 can also have that compiler version, and there
1391 # seems always to have been a usable /usr/bin/cpp.
1392 NON_GNU_CPP=/usr/bin/cpp
ca512671 1393 case "${canonical}" in
a55b799a 1394 alpha*-dec-osf[5-9]*)
bb17930d 1395 opsys=osf5-0 ;;
ca512671 1396 esac
ba4481b5
DL
1397 ;;
1398
1399 alpha*-*-linux-gnu* )
1400 machine=alpha opsys=gnu-linux
1401 ;;
1402
c4bb2108
DL
1403 arm*-*-linux-gnu* )
1404 machine=arm opsys=gnu-linux
1405 ;;
1406
1407 ppc-*-linux | \
1408 powerpc-*-linux* )
3aeecf97 1409 machine=macppc opsys=gnu-linux
c4bb2108
DL
1410 ;;
1411
ba4481b5
DL
1412 ## Altos 3068
1413 m68*-altos-sysv* )
1414 machine=altos opsys=usg5-2
1415 ;;
1416
1417 ## Amdahl UTS
1418 580-amdahl-sysv* )
1419 machine=amdahl opsys=usg5-2-2
1420 ;;
1421
1422 ## Apollo, Domain/OS
1423 m68*-apollo-* )
1424 machine=apollo opsys=bsd4-3
1425 ;;
1426
1427 ## AT&T 3b2, 3b5, 3b15, 3b20
1428 we32k-att-sysv* )
1429 machine=att3b opsys=usg5-2-2
1430 ;;
1431
1432 ## AT&T 3b1 - The Mighty Unix PC!
1433 m68*-att-sysv* )
1434 machine=7300 opsys=usg5-2-2
1435 ;;
1436
1437 ## Bull dpx20
1438 rs6000-bull-bosx* )
1439 machine=ibmrs6000 opsys=aix3-2
1440 ;;
1441
1442 ## Bull dpx2
1443 m68*-bull-sysv3* )
1444 machine=dpx2 opsys=usg5-3
1445 ;;
1446
1447 ## Bull sps7
1448 m68*-bull-sysv2* )
1449 machine=sps7 opsys=usg5-2
1450 ;;
1451
1452 ## CCI 5/32, 6/32 -- see "Tahoe".
1453
1454 ## Celerity
1455 ## I don't know what configuration name to use for this; config.sub
1456 ## doesn't seem to know anything about it. Hey, Celerity users, get
1457 ## in touch with us!
1458 celerity-celerity-bsd* )
1459 machine=celerity opsys=bsd4-2
1460 ;;
1461
1462 ## Clipper
1463 ## What operating systems does this chip run that Emacs has been
1464 ## tested on?
1465 clipper-* )
1466 machine=clipper
1467 ## We'll use the catch-all code at the bottom to guess the
1468 ## operating system.
1469 ;;
1470
1471 ## Convex
1472 *-convex-bsd* | *-convex-convexos* )
1473 machine=convex opsys=bsd4-3
1474 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
1475 NON_GNU_CPP="cc -E -P"
1476 ;;
1477
1478 ## Cubix QBx/386
1479 i[3456]86-cubix-sysv* )
1480 machine=intel386 opsys=usg5-3
1481 ;;
1482
1483 ## Cydra 5
1484 cydra*-cydrome-sysv* )
1485 machine=cydra5 opsys=usg5-3
1486 ;;
1487
1488 ## Data General AViiON Machines
1489 ## DG changed naming conventions with the release of 5.4.4.10, they
1490 ## dropped the initial 5.4 but left the intervening R. Because of the
1491 ## R this shouldn't conflict with older versions of the OS (which I
1492 ## think were named like dgux4.*). In addition, DG new AViiONs series
1493 ## uses either Motorola M88k or Intel Pentium CPUs.
1494 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
1495 machine=aviion opsys=dgux4
1496 ;;
1497 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
1498 ## This name is dgux5-4-3 instead of dgux5-4r3
1499 ## to avoid a file name conflict on MSDOS.
1500 machine=aviion opsys=dgux5-4-3
1501 ;;
1502 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
1503 machine=aviion opsys=dgux5-4r2
1504 ;;
1505 m88k-dg-dgux* )
1506 machine=aviion opsys=dgux
1507 ;;
1508
1509 ## Data General AViiON Intel (x86) Machines
1510 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
1511 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
1512 i[345]86-dg-dguxR4* )
1513 machine=aviion-intel opsys=dgux4
1514 ;;
1515
1516 ## DECstations
1517 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1518 machine=pmax opsys=bsd4-2
1519 ;;
1520 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1521 machine=pmax opsys=bsd4-3
1522 ;;
1523 mips-dec-ultrix* )
1524 machine=pmax opsys=ultrix4-3
1525 ;;
1526 mips-dec-osf* )
1527 machine=pmax opsys=osf1
1528 ;;
1529 mips-dec-mach_bsd4.3* )
1530 machine=pmax opsys=mach-bsd4-3
1531 ;;
1532
1533 ## Motorola Delta machines
1534 m68k-motorola-sysv* | m68000-motorola-sysv* )
1535 machine=delta opsys=usg5-3
1536 if test -z "`type gnucc | grep 'not found'`"
1537 then
1538 if test -s /etc/167config
1539 then CC="gnucc -m68040"
1540 else CC="gnucc -m68881"
1541 fi
1542 else
1543 if test -z "`type gcc | grep 'not found'`"
1544 then CC=gcc
1545 else CC=cc
1546 fi
1547 fi
1548 ;;
1549 m88k-motorola-sysv4* )
1550 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1551 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1552 # I hope there are not other 4.0 versions for this machine
1553 # which really need usg5-4 instead.
1554 machine=delta88k opsys=usg5-4-2
1555 ;;
1556 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1557 machine=delta88k opsys=usg5-3
1558 ;;
1559
1560 ## Dual machines
1561 m68*-dual-sysv* )
1562 machine=dual opsys=usg5-2
1563 ;;
1564 m68*-dual-uniplus* )
1565 machine=dual opsys=unipl5-2
1566 ;;
1567
1568 ## Elxsi 6400
1569 elxsi-elxsi-sysv* )
1570 machine=elxsi opsys=usg5-2
1571 ;;
1572
1573 ## Encore machines
1574 ns16k-encore-bsd* )
1575 machine=ns16000 opsys=umax
1576 ;;
1577
65171e3a
DL
1578 ## The GEC 63 - apparently, this port isn't really finished yet.
1579 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
1580
1581 ## Gould Power Node and NP1
1582 pn-gould-bsd4.2* )
1583 machine=gould opsys=bsd4-2
1584 ;;
1585 pn-gould-bsd4.3* )
1586 machine=gould opsys=bsd4-3
1587 ;;
1588 np1-gould-bsd* )
1589 machine=gould-np1 opsys=bsd4-3
1590 ;;
1591
1592 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
1593 ## as far as Emacs is concerned).
1594 m88k-harris-cxux* )
1595 # Build needs to be different on 7.0 and later releases
1596 case "`uname -r`" in
1597 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
1598 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
1599 esac
1600 NON_GNU_CPP="/lib/cpp"
1601 ;;
1602 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
1603 m68k-harris-cxux* )
1604 machine=nh3000 opsys=cxux
1605 ;;
1606 ## Harris power pc NightHawk running Power UNIX (Series 6000)
1607 powerpc-harris-powerunix )
1608 machine=nh6000 opsys=powerunix
1609 NON_GNU_CPP="cc -Xo -E -P"
1610 ;;
1611 ## SR2001/SR2201 running HI-UX/MPP
1612 hppa1.1-hitachi-hiuxmpp* )
1613 machine=sr2k opsys=hiuxmpp
1614 ;;
89a336fa
GM
1615 hppa1.1-hitachi-hiuxwe2* )
1616 machine=sr2k opsys=hiuxwe2
1617 ;;
ba4481b5
DL
1618 ## Honeywell XPS100
1619 xps*-honeywell-sysv* )
1620 machine=xps100 opsys=usg5-2
1621 ;;
1622
1623 ## HP 9000 series 200 or 300
1624 m68*-hp-bsd* )
1625 machine=hp9000s300 opsys=bsd4-3
1626 ;;
1627 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
1628 m68*-hp-hpux* )
1629 case "`uname -r`" in
1630 ## Someone's system reports A.B8.05 for this.
1631 ## I wonder what other possibilities there are.
1632 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
1633 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
1634 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
1635 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
1636 *) machine=hp9000s300 opsys=hpux ;;
1637 esac
1638 ;;
1639
1640 ## HP 9000 series 700 and 800, running HP/UX
1641 hppa*-hp-hpux7* )
1642 machine=hp800 opsys=hpux
1643 ;;
1644 hppa*-hp-hpux8* )
1645 machine=hp800 opsys=hpux8
1646 ;;
1647 hppa*-hp-hpux9shr* )
1648 machine=hp800 opsys=hpux9shr
1649 ;;
1650 hppa*-hp-hpux9* )
1651 machine=hp800 opsys=hpux9
1652 ;;
cc227489 1653 hppa*-hp-hpux10* )
ba4481b5
DL
1654 machine=hp800 opsys=hpux10
1655 ;;
cc227489
MB
1656 hppa*-hp-hpux1[1-9]* )
1657 machine=hp800 opsys=hpux11
1658 ;;
ba4481b5
DL
1659
1660 ## HP 9000 series 700 and 800, running HP/UX
1661 hppa*-hp-hpux* )
1662 ## Cross-compilation? Nah!
1663 case "`uname -r`" in
1664 ## Someone's system reports A.B8.05 for this.
1665 ## I wonder what other possibilities there are.
1666 *.B8.* ) machine=hp800 opsys=hpux8 ;;
1667 *.08.* ) machine=hp800 opsys=hpux8 ;;
1668 *.09.* ) machine=hp800 opsys=hpux9 ;;
1669 *) machine=hp800 opsys=hpux10 ;;
1670 esac
1671 ;;
1672 hppa*-*-nextstep* )
1673 machine=hp800 opsys=nextstep
1674 ;;
1675
1676 ## Orion machines
1677 orion-orion-bsd* )
1678 machine=orion opsys=bsd4-2
1679 ;;
1680 clipper-orion-bsd* )
1681 machine=orion105 opsys=bsd4-2
1682 ;;
1683
1684 ## IBM machines
1685 i[3456]86-ibm-aix1.1* )
1686 machine=ibmps2-aix opsys=usg5-2-2
1687 ;;
1688 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
1689 machine=ibmps2-aix opsys=usg5-3
1690 ;;
1691 i370-ibm-aix*)
1692 machine=ibm370aix opsys=usg5-3
1693 ;;
138f0859
GM
1694 s390-*-linux-gnu)
1695 machine=ibms390 opsys=gnu-linux
1696 ;;
ba4481b5
DL
1697 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
1698 machine=ibmrs6000 opsys=aix3-1
1699 ;;
1700 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
1701 machine=ibmrs6000 opsys=aix3-2-5
1702 ;;
1703 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
1704 machine=ibmrs6000 opsys=aix4-1
1705 ;;
1706 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
1707 machine=ibmrs6000 opsys=aix4-2
1708 ;;
1709 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
1710 machine=ibmrs6000 opsys=aix4
1711 ;;
1712 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
1713 machine=ibmrs6000 opsys=aix4-1
1714 ;;
1715 rs6000-ibm-aix* | powerpc-ibm-aix* )
1716 machine=ibmrs6000 opsys=aix3-2
1717 ;;
1718 romp-ibm-bsd4.3* )
1719 machine=ibmrt opsys=bsd4-3
1720 ;;
1721 romp-ibm-bsd4.2* )
1722 machine=ibmrt opsys=bsd4-2
1723 ;;
1724 romp-ibm-aos4.3* )
1725 machine=ibmrt opsys=bsd4-3
1726 ;;
1727 romp-ibm-aos4.2* )
1728 machine=ibmrt opsys=bsd4-2
1729 ;;
1730 romp-ibm-aos* )
1731 machine=ibmrt opsys=bsd4-3
1732 ;;
1733 romp-ibm-bsd* )
1734 machine=ibmrt opsys=bsd4-3
1735 ;;
1736 romp-ibm-aix* )
1737 machine=ibmrt-aix opsys=usg5-2-2
1738 ;;
1739
1740 ## Integrated Solutions `Optimum V'
1741 m68*-isi-bsd4.2* )
1742 machine=isi-ov opsys=bsd4-2
1743 ;;
1744 m68*-isi-bsd4.3* )
1745 machine=isi-ov opsys=bsd4-3
1746 ;;
1747
1748 ## Intel 386 machines where we do care about the manufacturer
1749 i[3456]86-intsys-sysv* )
1750 machine=is386 opsys=usg5-2-2
1751 ;;
1752
1753 ## Prime EXL
1754 i[3456]86-prime-sysv* )
1755 machine=i386 opsys=usg5-3
1756 ;;
1757
1758 ## Sequent Symmetry running Dynix
1759 i[3456]86-sequent-bsd* )
1760 machine=symmetry opsys=bsd4-3
1761 ;;
1762
1763 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
1764 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
1765 machine=sequent-ptx opsys=ptx4
1766 NON_GNU_CPP=/lib/cpp
1767 ;;
1768
1769 ## Sequent Symmetry running DYNIX/ptx
1770 ## Use the old cpp rather than the newer ANSI one.
1771 i[3456]86-sequent-ptx* )
1772 machine=sequent-ptx opsys=ptx
1773 NON_GNU_CPP="/lib/cpp"
1774 ;;
1775
1776 ## ncr machine running svr4.3.
1777 i[3456]86-ncr-sysv4.3 )
1778 machine=ncr386 opsys=usg5-4-3
1779 ;;
1780
1781 ## Unspecified sysv on an ncr machine defaults to svr4.2.
1782 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
1783 i[3456]86-ncr-sysv* )
1784 machine=ncr386 opsys=usg5-4-2
1785 ;;
1786
1787 ## Intel Paragon OSF/1
1788 i860-intel-osf1* )
1789 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
1790 ;;
1791
1792 ## Intel 860
1793 i860-*-sysv4* )
1794 machine=i860 opsys=usg5-4
1795 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
1796 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
1797 ;;
1798
c76e04a8
GM
1799 ## Macintosh PowerPC
1800 powerpc*-*-linux-gnu* )
1801 machine=macppc opsys=gnu-linux
1802 ;;
1803
ba4481b5
DL
1804 ## Masscomp machines
1805 m68*-masscomp-rtu* )
1806 machine=masscomp opsys=rtu
1807 ;;
1808
1809 ## Megatest machines
1810 m68*-megatest-bsd* )
1811 machine=mega68 opsys=bsd4-2
1812 ;;
1813
1814 ## Workstations sold by MIPS
1815 ## This is not necessarily all workstations using the MIPS processor -
1816 ## Irises are produced by SGI, and DECstations by DEC.
1817
1818 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
1819 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
1820 ## it gives for choosing between the alternatives seems to be "Use
1821 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
1822 ## the BSD world." I'll assume that these are instructions for
1823 ## handling two odd situations, and that every other situation
1824 ## should use mips.h and usg5-2-2, they being listed first.
1825 mips-mips-usg* )
1826 machine=mips4
1827 ## Fall through to the general code at the bottom to decide on the OS.
1828 ;;
1829 mips-mips-riscos4* )
1830 machine=mips4 opsys=bsd4-3
1831 NON_GNU_CC="cc -systype bsd43"
1832 NON_GNU_CPP="cc -systype bsd43 -E"
1833 ;;
1834 mips-mips-riscos5* )
1835 machine=mips4 opsys=riscos5
1836 NON_GNU_CC="cc -systype bsd43"
1837 NON_GNU_CPP="cc -systype bsd43 -E"
1838 ;;
1839 mips-mips-bsd* )
1840 machine=mips opsys=bsd4-3
1841 ;;
1842 mips-mips-* )
1843 machine=mips opsys=usg5-2-2
1844 ;;
1845
1846 ## NeXT
1847 m68*-next-* | m68k-*-nextstep* )
1848 machine=m68k opsys=nextstep
1849 ;;
1850
1851 ## The complete machine from National Semiconductor
1852 ns32k-ns-genix* )
1853 machine=ns32000 opsys=usg5-2
1854 ;;
1855
1856 ## NCR machines
1857 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
1858 machine=tower32 opsys=usg5-2-2
1859 ;;
1860 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
1861 machine=tower32v3 opsys=usg5-3
1862 ;;
1863
1864 ## NEC EWS4800
1865 mips-nec-sysv4*)
1866 machine=ews4800 opsys=ux4800
1867 ;;
1868
1869 ## Nixdorf Targon 31
1870 m68*-nixdorf-sysv* )
1871 machine=targon31 opsys=usg5-2-2
1872 ;;
1873
1874 ## Nu (TI or LMI)
1875 m68*-nu-sysv* )
1876 machine=nu opsys=usg5-2
1877 ;;
1878
1879 ## Plexus
1880 m68*-plexus-sysv* )
1881 machine=plexus opsys=usg5-2
1882 ;;
1883
1884 ## PowerPC reference platform
1885 powerpcle-*-solaris2* )
1886 machine=prep
1887 opsys=sol2-5
1888 ;;
1889
1890 ## Pyramid machines
1891 ## I don't really have any idea what sort of processor the Pyramid has,
1892 ## so I'm assuming it is its own architecture.
1893 pyramid-pyramid-bsd* )
1894 machine=pyramid opsys=bsd4-2
1895 ;;
1896
1897 ## Sequent Balance
1898 ns32k-sequent-bsd4.2* )
1899 machine=sequent opsys=bsd4-2
1900 ;;
1901 ns32k-sequent-bsd4.3* )
1902 machine=sequent opsys=bsd4-3
1903 ;;
1904
1905 ## Siemens Nixdorf
1906 mips-siemens-sysv* | mips-sni-sysv*)
1907 machine=mips-siemens opsys=usg5-4
1908 NON_GNU_CC=/usr/ccs/bin/cc
1909 NON_GNU_CPP=/usr/ccs/lib/cpp
1910 ;;
1911
1912 ## Silicon Graphics machines
1913 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
1914 m68*-sgi-iris3.5* )
1915 machine=irist opsys=iris3-5
1916 ;;
1917 m68*-sgi-iris3.6* | m68*-sgi-iris*)
1918 machine=irist opsys=iris3-6
1919 ;;
1920 ## Iris 4D
1921 mips-sgi-irix3* )
1922 machine=iris4d opsys=irix3-3
1923 ;;
1924 mips-sgi-irix4* )
1925 machine=iris4d opsys=irix4-0
1926 ;;
1927 mips-sgi-irix6.5 )
1928 machine=iris4d opsys=irix6-5
946173ad
DL
1929 # Without defining _LANGUAGE_C, things get masked out in the headers
1930 # so that, for instance, grepping for `free' in stdlib.h fails and
1931 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
1932 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 1933 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
1934 ;;
1935 mips-sgi-irix6* )
1936 machine=iris4d opsys=irix6-0
c4bb2108 1937 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
1938 # but presumably it does no harm.
1939 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 1940 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
1941 NON_GCC_TEST_OPTIONS=-32
1942 ;;
1943 mips-sgi-irix5.[01]* )
1944 machine=iris4d opsys=irix5-0
1945 ;;
1946 mips-sgi-irix5* | mips-sgi-irix* )
1947 machine=iris4d opsys=irix5-2
1948 ;;
1949
1950 ## SONY machines
1951 m68*-sony-bsd4.2* )
1952 machine=news opsys=bsd4-2
1953 ;;
1954 m68*-sony-bsd4.3* )
1955 machine=news opsys=bsd4-3
1956 ;;
1957 m68*-sony-newsos3* | m68*-sony-news3*)
1958 machine=news opsys=bsd4-3
1959 ;;
1960 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
1961 machine=news-risc opsys=bsd4-3
1962 ;;
1963 mips-sony-newsos6* )
1964 machine=news-r6 opsys=newsos6
1965 ;;
1966 mips-sony-news* )
1967 machine=news-risc opsys=newsos5
1968 ;;
1969
1970 ## Stride
1971 m68*-stride-sysv* )
1972 machine=stride opsys=usg5-2
1973 ;;
1974
1975 ## Suns
1976 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
1977 machine=sparc opsys=gnu-linux
1978 ;;
1979
d054101f 1980 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
1981 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
1982 | rs6000-*-solaris2*)
1983 case "${canonical}" in
1984 m68*-sunos1* ) machine=sun1 ;;
1985 m68*-sunos2* ) machine=sun2 ;;
1986 m68* ) machine=sun3 ;;
1987 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
1988 i[3456]86-*-* ) machine=intel386 ;;
1989 powerpcle* ) machine=powerpcle ;;
1990 powerpc* | rs6000* ) machine=ibmrs6000 ;;
1991 sparc* ) machine=sparc ;;
1992 * ) unported=yes ;;
1993 esac
1994 case "${canonical}" in
1995 ## The Sun386 didn't get past 4.0.
1996 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
1997 *-sunos4.0* ) opsys=sunos4-0 ;;
1998 *-sunos4.1.[3-9]*noshare )
1999 ## This name is sunos413 instead of sunos4-1-3
2000 ## to avoid a file name conflict on MSDOS.
2001 opsys=sunos413
2002 NON_GNU_CPP=/usr/lib/cpp
2003 NON_GCC_TEST_OPTIONS=-Bstatic
2004 GCC_TEST_OPTIONS=-static
2005 ;;
2006 *-sunos4.1.[3-9]* | *-sunos4shr*)
2007 opsys=sunos4shr
2008 NON_GNU_CPP=/usr/lib/cpp
2009 ;;
2010 *-sunos4* | *-sunos )
2011 opsys=sunos4-1
2012 NON_GCC_TEST_OPTIONS=-Bstatic
2013 GCC_TEST_OPTIONS=-static
2014 ;;
2015 *-sunos5.3* | *-solaris2.3* )
2016 opsys=sol2-3
2017 NON_GNU_CPP=/usr/ccs/lib/cpp
2018 ;;
2019 *-sunos5.4* | *-solaris2.4* )
2020 opsys=sol2-4
2021 NON_GNU_CPP=/usr/ccs/lib/cpp
2022 RANLIB="ar -ts"
2023 ;;
2024 *-sunos5.5* | *-solaris2.5* )
2025 opsys=sol2-5
2026 NON_GNU_CPP=/usr/ccs/lib/cpp
2027 RANLIB="ar -ts"
2028 ;;
2029 *-sunos5* | *-solaris* )
2030 opsys=sol2-5
2031 NON_GNU_CPP=/usr/ccs/lib/cpp
2032 ;;
2033 * ) opsys=bsd4-2 ;;
2034 esac
2035 ## Watch out for a compiler that we know will not work.
2036 case "${canonical}" in
2037 *-solaris* | *-sunos5* )
2038 if [ "x$CC" = x/usr/ucb/cc ]; then
2039 ## /usr/ucb/cc doesn't work;
2040 ## we should find some other compiler that does work.
2041 unset CC
2042 fi
2043 ;;
2044 *) ;;
2045 esac
2046 ;;
2047 sparc-*-nextstep* )
2048 machine=sparc opsys=nextstep
2049 ;;
2050
2051 ## Tadpole 68k
2052 m68*-tadpole-sysv* )
2053 machine=tad68k opsys=usg5-3
2054 ;;
2055
2056 ## Tahoe machines
2057 tahoe-tahoe-bsd4.2* )
2058 machine=tahoe opsys=bsd4-2
2059 ;;
2060 tahoe-tahoe-bsd4.3* )
2061 machine=tahoe opsys=bsd4-3
2062 ;;
2063
2064 ## Tandem Integrity S2
2065 mips-tandem-sysv* )
2066 machine=tandem-s2 opsys=usg5-3
2067 ;;
2068
2069 ## Tektronix XD88
2070 m88k-tektronix-sysv3* )
2071 machine=tekxd88 opsys=usg5-3
2072 ;;
2073
2074 ## Tektronix 16000 box (6130?)
2075 ns16k-tektronix-bsd* )
2076 machine=ns16000 opsys=bsd4-2
2077 ;;
2078 ## Tektronix 4300
2079 ## src/m/tek4300.h hints that this is a m68k machine.
2080 m68*-tektronix-bsd* )
2081 machine=tek4300 opsys=bsd4-3
2082 ;;
2083
2084 ## Titan P2 or P3
2085 ## We seem to have lost the machine-description file titan.h!
2086 titan-titan-sysv* )
2087 machine=titan opsys=usg5-3
2088 ;;
2089
2090 ## Ustation E30 (SS5E)
2091 m68*-unisys-uniplus* )
2092 machine=ustation opsystem=unipl5-2
2093 ;;
2094
2095 ## Vaxen.
2096 vax-dec-* )
2097 machine=vax
2098 case "${canonical}" in
2099 *-bsd4.1* ) opsys=bsd4-1 ;;
2100 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
2101 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
2102 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
2103 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
2104 *-vms* ) opsys=vms ;;
2105 * ) unported=yes
2106 esac
2107 ;;
2108
2109 ## Whitechapel MG1
2110 ns16k-whitechapel-* )
2111 machine=mg1
2112 ## We don't know what sort of OS runs on these; we'll let the
2113 ## operating system guessing code below try.
2114 ;;
2115
2116 ## Wicat
2117 m68*-wicat-sysv* )
2118 machine=wicat opsys=usg5-2
2119 ;;
2120
f4988be7
GM
2121 ## IA-64
2122 ia64*-*-linux* )
2123 machine=ia64 opsys=gnu-linux
2124 ;;
2125
ba4481b5
DL
2126 ## Intel 386 machines where we don't care about the manufacturer
2127 i[3456]86-*-* )
2128 machine=intel386
2129 case "${canonical}" in
9f817ea4 2130 *-lynxos* ) opsys=lynxos ;;
ba4481b5
DL
2131 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
2132 *-isc2.2* ) opsys=isc2-2 ;;
2133 *-isc4.0* ) opsys=isc4-0 ;;
2134 *-isc4.* ) opsys=isc4-1
2135 GCC_TEST_OPTIONS=-posix
2136 NON_GCC_TEST_OPTIONS=-Xp
2137 ;;
2138 *-isc* ) opsys=isc3-0 ;;
2139 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
2140 *-esix* ) opsys=esix ;;
2141 *-xenix* ) opsys=xenix ;;
2142 *-linux-gnu* ) opsys=gnu-linux ;;
2143 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 2144 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
2145 NON_GNU_CPP=/lib/cpp
2146 # Prevent -belf from being passed to $CPP.
2147 # /lib/cpp does not accept it.
2148 OVERRIDE_CPPFLAGS=" "
2149 ;;
2150 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2151 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
2152 *-nextstep* ) opsys=nextstep ;;
2153 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2154 esac
2155 ;;
2156
2157 ## m68k Linux-based GNU system
2158 m68k-*-linux-gnu* )
2159 machine=m68k opsys=gnu-linux
2160 ;;
2161
2162 ## Mips Linux-based GNU system
2163 mips-*-linux-gnu* )
2164 machine=mips opsys=gnu-linux
2165 ;;
2166
2167 ## UXP/DS
2168 sparc-fujitsu-sysv4* )
2169 machine=sparc opsys=uxpds
2170 NON_GNU_CPP=/usr/ccs/lib/cpp
2171 RANLIB="ar -ts"
2172 ;;
2173
2174 ## UXP/V
2175 f301-fujitsu-uxpv4.1)
2176 machine=f301 opsys=uxpv
2177 ;;
2178
2179 * )
2180 unported=yes
2181 ;;
2182esac
2183
2184### If the code above didn't choose an operating system, just choose
2185### an operating system based on the configuration name. You really
2186### only want to use this when you have no idea what the right
2187### operating system is; if you know what operating systems a machine
2188### runs, it's cleaner to make it explicit in the case statement
2189### above.
2190if test x"${opsys}" = x; then
2191 case "${canonical}" in
2192 *-gnu* ) opsys=gnu ;;
2193 *-bsd4.[01] ) opsys=bsd4-1 ;;
2194 *-bsd4.2 ) opsys=bsd4-2 ;;
2195 *-bsd4.3 ) opsys=bsd4-3 ;;
2196 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
2197 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
2198 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
2199 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
2200 *-sysv4.2uw* ) opsys=unixware ;;
2201 *-sysv4.1* | *-sysvr4.1* )
2202 NON_GNU_CPP=/usr/lib/cpp
2203 opsys=usg5-4 ;;
2204 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2205 if [ x$NON_GNU_CPP = x ]; then
2206 if [ -f /usr/ccs/lib/cpp ]; then
2207 NON_GNU_CPP=/usr/ccs/lib/cpp
2208 else
2209 NON_GNU_CPP=/lib/cpp
2210 fi
2211 fi
2212 opsys=usg5-4-2 ;;
2213 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2214 * )
2215 unported=yes
2216 ;;
2217 esac
2218fi
2219
ba4481b5 2220if test $unported = yes; then
1096bcc0 2221 { { echo "$as_me:2221: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2222Check \`etc/MACHINES' for recognized configuration names." >&5
2223echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2224Check \`etc/MACHINES' for recognized configuration names." >&2;}
2225 { (exit 1); exit 1; }; }
ba4481b5
DL
2226fi
2227
2228machfile="m/${machine}.h"
2229opsysfile="s/${opsys}.h"
2230
ba4481b5
DL
2231#### Choose a compiler.
2232test -n "$CC" && cc_specified=yes
2233
2234# Save the value of CFLAGS that the user specified.
2235SPECIFIED_CFLAGS="$CFLAGS"
2236
2237case ${with_gcc} in
2238 "yes" ) CC="gcc" GCC=yes ;;
2239 "no" ) : ${CC=cc} ;;
503d2be0
AS
2240 * )
2241esac
2242ac_ext=c
2243ac_cpp='$CPP $CPPFLAGS'
2244ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2245ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2246ac_compiler_gnu=$ac_cv_c_compiler_gnu
2247if test -n "$ac_tool_prefix"; then
2248 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2249set dummy ${ac_tool_prefix}gcc; ac_word=$2
1096bcc0 2250echo "$as_me:2250: checking for $ac_word" >&5
503d2be0
AS
2251echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2252if test "${ac_cv_prog_CC+set}" = set; then
2253 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2254else
2255 if test -n "$CC"; then
2256 ac_cv_prog_CC="$CC" # Let the user override the test.
2257else
503d2be0
AS
2258 ac_save_IFS=$IFS; IFS=$ac_path_separator
2259ac_dummy="$PATH"
2260for ac_dir in $ac_dummy; do
2261 IFS=$ac_save_IFS
2262 test -z "$ac_dir" && ac_dir=.
2263 $as_executable_p "$ac_dir/$ac_word" || continue
2264ac_cv_prog_CC="${ac_tool_prefix}gcc"
1096bcc0 2265echo "$as_me:2265: found $ac_dir/$ac_word" >&5
503d2be0
AS
2266break
2267done
2268
ba4481b5
DL
2269fi
2270fi
503d2be0 2271CC=$ac_cv_prog_CC
ba4481b5 2272if test -n "$CC"; then
1096bcc0 2273 echo "$as_me:2273: result: $CC" >&5
503d2be0
AS
2274echo "${ECHO_T}$CC" >&6
2275else
1096bcc0 2276 echo "$as_me:2276: result: no" >&5
503d2be0
AS
2277echo "${ECHO_T}no" >&6
2278fi
2279
2280fi
2281if test -z "$ac_cv_prog_CC"; then
2282 ac_ct_CC=$CC
2283 # Extract the first word of "gcc", so it can be a program name with args.
2284set dummy gcc; ac_word=$2
1096bcc0 2285echo "$as_me:2285: checking for $ac_word" >&5
503d2be0
AS
2286echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2287if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2288 echo $ECHO_N "(cached) $ECHO_C" >&6
2289else
2290 if test -n "$ac_ct_CC"; then
2291 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2292else
2293 ac_save_IFS=$IFS; IFS=$ac_path_separator
2294ac_dummy="$PATH"
2295for ac_dir in $ac_dummy; do
2296 IFS=$ac_save_IFS
2297 test -z "$ac_dir" && ac_dir=.
2298 $as_executable_p "$ac_dir/$ac_word" || continue
2299ac_cv_prog_ac_ct_CC="gcc"
1096bcc0 2300echo "$as_me:2300: found $ac_dir/$ac_word" >&5
503d2be0
AS
2301break
2302done
2303
2304fi
2305fi
2306ac_ct_CC=$ac_cv_prog_ac_ct_CC
2307if test -n "$ac_ct_CC"; then
1096bcc0 2308 echo "$as_me:2308: result: $ac_ct_CC" >&5
503d2be0 2309echo "${ECHO_T}$ac_ct_CC" >&6
ba4481b5 2310else
1096bcc0 2311 echo "$as_me:2311: result: no" >&5
503d2be0
AS
2312echo "${ECHO_T}no" >&6
2313fi
2314
2315 CC=$ac_ct_CC
2316else
2317 CC="$ac_cv_prog_CC"
ba4481b5
DL
2318fi
2319
2320if test -z "$CC"; then
503d2be0
AS
2321 if test -n "$ac_tool_prefix"; then
2322 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2323set dummy ${ac_tool_prefix}cc; ac_word=$2
1096bcc0 2324echo "$as_me:2324: checking for $ac_word" >&5
503d2be0
AS
2325echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2326if test "${ac_cv_prog_CC+set}" = set; then
2327 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2328else
2329 if test -n "$CC"; then
2330 ac_cv_prog_CC="$CC" # Let the user override the test.
2331else
503d2be0
AS
2332 ac_save_IFS=$IFS; IFS=$ac_path_separator
2333ac_dummy="$PATH"
2334for ac_dir in $ac_dummy; do
2335 IFS=$ac_save_IFS
2336 test -z "$ac_dir" && ac_dir=.
2337 $as_executable_p "$ac_dir/$ac_word" || continue
2338ac_cv_prog_CC="${ac_tool_prefix}cc"
1096bcc0 2339echo "$as_me:2339: found $ac_dir/$ac_word" >&5
503d2be0
AS
2340break
2341done
2342
2343fi
2344fi
2345CC=$ac_cv_prog_CC
2346if test -n "$CC"; then
1096bcc0 2347 echo "$as_me:2347: result: $CC" >&5
503d2be0
AS
2348echo "${ECHO_T}$CC" >&6
2349else
1096bcc0 2350 echo "$as_me:2350: result: no" >&5
503d2be0
AS
2351echo "${ECHO_T}no" >&6
2352fi
2353
2354fi
2355if test -z "$ac_cv_prog_CC"; then
2356 ac_ct_CC=$CC
2357 # Extract the first word of "cc", so it can be a program name with args.
2358set dummy cc; ac_word=$2
1096bcc0 2359echo "$as_me:2359: checking for $ac_word" >&5
503d2be0
AS
2360echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2361if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2362 echo $ECHO_N "(cached) $ECHO_C" >&6
2363else
2364 if test -n "$ac_ct_CC"; then
2365 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2366else
2367 ac_save_IFS=$IFS; IFS=$ac_path_separator
2368ac_dummy="$PATH"
2369for ac_dir in $ac_dummy; do
2370 IFS=$ac_save_IFS
2371 test -z "$ac_dir" && ac_dir=.
2372 $as_executable_p "$ac_dir/$ac_word" || continue
2373ac_cv_prog_ac_ct_CC="cc"
1096bcc0 2374echo "$as_me:2374: found $ac_dir/$ac_word" >&5
503d2be0
AS
2375break
2376done
2377
2378fi
2379fi
2380ac_ct_CC=$ac_cv_prog_ac_ct_CC
2381if test -n "$ac_ct_CC"; then
1096bcc0 2382 echo "$as_me:2382: result: $ac_ct_CC" >&5
503d2be0
AS
2383echo "${ECHO_T}$ac_ct_CC" >&6
2384else
1096bcc0 2385 echo "$as_me:2385: result: no" >&5
503d2be0
AS
2386echo "${ECHO_T}no" >&6
2387fi
2388
2389 CC=$ac_ct_CC
2390else
2391 CC="$ac_cv_prog_CC"
2392fi
2393
2394fi
2395if test -z "$CC"; then
2396 # Extract the first word of "cc", so it can be a program name with args.
2397set dummy cc; ac_word=$2
1096bcc0 2398echo "$as_me:2398: checking for $ac_word" >&5
503d2be0
AS
2399echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2400if test "${ac_cv_prog_CC+set}" = set; then
2401 echo $ECHO_N "(cached) $ECHO_C" >&6
2402else
2403 if test -n "$CC"; then
2404 ac_cv_prog_CC="$CC" # Let the user override the test.
2405else
2406 ac_prog_rejected=no
2407 ac_save_IFS=$IFS; IFS=$ac_path_separator
2408ac_dummy="$PATH"
2409for ac_dir in $ac_dummy; do
2410 IFS=$ac_save_IFS
2411 test -z "$ac_dir" && ac_dir=.
2412 $as_executable_p "$ac_dir/$ac_word" || continue
2413if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2414 ac_prog_rejected=yes
2415 continue
2416fi
2417ac_cv_prog_CC="cc"
1096bcc0 2418echo "$as_me:2418: found $ac_dir/$ac_word" >&5
503d2be0
AS
2419break
2420done
2421
ba4481b5
DL
2422if test $ac_prog_rejected = yes; then
2423 # We found a bogon in the path, so make sure we never use it.
2424 set dummy $ac_cv_prog_CC
2425 shift
503d2be0 2426 if test $# != 0; then
ba4481b5
DL
2427 # We chose a different compiler from the bogus one.
2428 # However, it has the same basename, so the bogon will be chosen
2429 # first if we set CC to just the basename; use the full file name.
2430 shift
503d2be0 2431 set dummy "$ac_dir/$ac_word" ${1+"$@"}
ba4481b5
DL
2432 shift
2433 ac_cv_prog_CC="$@"
2434 fi
2435fi
2436fi
2437fi
503d2be0 2438CC=$ac_cv_prog_CC
ba4481b5 2439if test -n "$CC"; then
1096bcc0 2440 echo "$as_me:2440: result: $CC" >&5
503d2be0 2441echo "${ECHO_T}$CC" >&6
ba4481b5 2442else
1096bcc0 2443 echo "$as_me:2443: result: no" >&5
503d2be0 2444echo "${ECHO_T}no" >&6
ba4481b5
DL
2445fi
2446
503d2be0
AS
2447fi
2448if test -z "$CC"; then
2449 if test -n "$ac_tool_prefix"; then
2450 for ac_prog in cl
2451 do
2452 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2453set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1096bcc0 2454echo "$as_me:2454: checking for $ac_word" >&5
503d2be0
AS
2455echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2456if test "${ac_cv_prog_CC+set}" = set; then
2457 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2458else
2459 if test -n "$CC"; then
2460 ac_cv_prog_CC="$CC" # Let the user override the test.
2461else
503d2be0
AS
2462 ac_save_IFS=$IFS; IFS=$ac_path_separator
2463ac_dummy="$PATH"
2464for ac_dir in $ac_dummy; do
2465 IFS=$ac_save_IFS
2466 test -z "$ac_dir" && ac_dir=.
2467 $as_executable_p "$ac_dir/$ac_word" || continue
2468ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1096bcc0 2469echo "$as_me:2469: found $ac_dir/$ac_word" >&5
503d2be0
AS
2470break
2471done
2472
c4bb2108
DL
2473fi
2474fi
503d2be0 2475CC=$ac_cv_prog_CC
c4bb2108 2476if test -n "$CC"; then
1096bcc0 2477 echo "$as_me:2477: result: $CC" >&5
503d2be0 2478echo "${ECHO_T}$CC" >&6
c4bb2108 2479else
1096bcc0 2480 echo "$as_me:2480: result: no" >&5
503d2be0
AS
2481echo "${ECHO_T}no" >&6
2482fi
2483
2484 test -n "$CC" && break
2485 done
2486fi
2487if test -z "$CC"; then
2488 ac_ct_CC=$CC
2489 for ac_prog in cl
2490do
2491 # Extract the first word of "$ac_prog", so it can be a program name with args.
2492set dummy $ac_prog; ac_word=$2
1096bcc0 2493echo "$as_me:2493: checking for $ac_word" >&5
503d2be0
AS
2494echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2495if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2496 echo $ECHO_N "(cached) $ECHO_C" >&6
2497else
2498 if test -n "$ac_ct_CC"; then
2499 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2500else
2501 ac_save_IFS=$IFS; IFS=$ac_path_separator
2502ac_dummy="$PATH"
2503for ac_dir in $ac_dummy; do
2504 IFS=$ac_save_IFS
2505 test -z "$ac_dir" && ac_dir=.
2506 $as_executable_p "$ac_dir/$ac_word" || continue
2507ac_cv_prog_ac_ct_CC="$ac_prog"
1096bcc0 2508echo "$as_me:2508: found $ac_dir/$ac_word" >&5
503d2be0
AS
2509break
2510done
2511
c4bb2108 2512fi
503d2be0
AS
2513fi
2514ac_ct_CC=$ac_cv_prog_ac_ct_CC
2515if test -n "$ac_ct_CC"; then
1096bcc0 2516 echo "$as_me:2516: result: $ac_ct_CC" >&5
503d2be0
AS
2517echo "${ECHO_T}$ac_ct_CC" >&6
2518else
1096bcc0 2519 echo "$as_me:2519: result: no" >&5
503d2be0 2520echo "${ECHO_T}no" >&6
ba4481b5
DL
2521fi
2522
503d2be0
AS
2523 test -n "$ac_ct_CC" && break
2524done
ba4481b5 2525
503d2be0
AS
2526 CC=$ac_ct_CC
2527fi
2528
2529fi
ba4481b5 2530
1096bcc0 2531test -z "$CC" && { { echo "$as_me:2531: error: no acceptable cc found in \$PATH" >&5
503d2be0
AS
2532echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
2533 { (exit 1); exit 1; }; }
c4bb2108 2534
503d2be0 2535# Provide some information about the compiler.
1096bcc0 2536echo "$as_me:2536:" \
503d2be0
AS
2537 "checking for C compiler version" >&5
2538ac_compiler=`set X $ac_compile; echo $2`
1096bcc0 2539{ (eval echo "$as_me:2539: \"$ac_compiler --version </dev/null >&5\"") >&5
503d2be0
AS
2540 (eval $ac_compiler --version </dev/null >&5) 2>&5
2541 ac_status=$?
1096bcc0 2542 echo "$as_me:2542: \$? = $ac_status" >&5
503d2be0 2543 (exit $ac_status); }
1096bcc0 2544{ (eval echo "$as_me:2544: \"$ac_compiler -v </dev/null >&5\"") >&5
503d2be0
AS
2545 (eval $ac_compiler -v </dev/null >&5) 2>&5
2546 ac_status=$?
1096bcc0 2547 echo "$as_me:2547: \$? = $ac_status" >&5
503d2be0 2548 (exit $ac_status); }
1096bcc0 2549{ (eval echo "$as_me:2549: \"$ac_compiler -V </dev/null >&5\"") >&5
503d2be0
AS
2550 (eval $ac_compiler -V </dev/null >&5) 2>&5
2551 ac_status=$?
1096bcc0 2552 echo "$as_me:2552: \$? = $ac_status" >&5
503d2be0
AS
2553 (exit $ac_status); }
2554
2555cat >conftest.$ac_ext <<_ACEOF
1096bcc0 2556#line 2556 "configure"
ba4481b5 2557#include "confdefs.h"
c4bb2108 2558
503d2be0
AS
2559int
2560main ()
2561{
2562
2563 ;
2564 return 0;
2565}
2566_ACEOF
2567ac_clean_files_save=$ac_clean_files
2568ac_clean_files="$ac_clean_files a.out a.exe"
2569# Try to create an executable without -o first, disregard a.out.
2570# It will help us diagnose broken compilers, and finding out an intuition
2571# of exeext.
1096bcc0 2572echo "$as_me:2572: checking for C compiler default output" >&5
503d2be0
AS
2573echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2574ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1096bcc0 2575if { (eval echo "$as_me:2575: \"$ac_link_default\"") >&5
503d2be0
AS
2576 (eval $ac_link_default) 2>&5
2577 ac_status=$?
1096bcc0 2578 echo "$as_me:2578: \$? = $ac_status" >&5
503d2be0
AS
2579 (exit $ac_status); }; then
2580 # Find the output, starting from the most likely. This scheme is
2581# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2582# resort.
2583for ac_file in `ls a.exe conftest.exe 2>/dev/null;
2584 ls a.out conftest 2>/dev/null;
2585 ls a.* conftest.* 2>/dev/null`; do
2586 case $ac_file in
2587 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2588 a.out ) # We found the default executable, but exeext='' is most
2589 # certainly right.
2590 break;;
2591 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2592 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2593 export ac_cv_exeext
2594 break;;
2595 * ) break;;
2596 esac
2597done
2598else
2599 echo "$as_me: failed program was:" >&5
2600cat conftest.$ac_ext >&5
1096bcc0 2601{ { echo "$as_me:2601: error: C compiler cannot create executables" >&5
503d2be0
AS
2602echo "$as_me: error: C compiler cannot create executables" >&2;}
2603 { (exit 77); exit 77; }; }
2604fi
2605
2606ac_exeext=$ac_cv_exeext
1096bcc0 2607echo "$as_me:2607: result: $ac_file" >&5
503d2be0
AS
2608echo "${ECHO_T}$ac_file" >&6
2609
2610# Check the compiler produces executables we can run. If not, either
2611# the compiler is broken, or we cross compile.
1096bcc0 2612echo "$as_me:2612: checking whether the C compiler works" >&5
503d2be0
AS
2613echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2614# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2615# If not cross compiling, check that we can run a simple program.
2616if test "$cross_compiling" != yes; then
2617 if { ac_try='./$ac_file'
1096bcc0 2618 { (eval echo "$as_me:2618: \"$ac_try\"") >&5
503d2be0
AS
2619 (eval $ac_try) 2>&5
2620 ac_status=$?
1096bcc0 2621 echo "$as_me:2621: \$? = $ac_status" >&5
503d2be0
AS
2622 (exit $ac_status); }; }; then
2623 cross_compiling=no
ba4481b5 2624 else
503d2be0
AS
2625 if test "$cross_compiling" = maybe; then
2626 cross_compiling=yes
2627 else
1096bcc0 2628 { { echo "$as_me:2628: error: cannot run C compiled programs.
503d2be0
AS
2629If you meant to cross compile, use \`--host'." >&5
2630echo "$as_me: error: cannot run C compiled programs.
2631If you meant to cross compile, use \`--host'." >&2;}
2632 { (exit 1); exit 1; }; }
2633 fi
ba4481b5 2634 fi
503d2be0 2635fi
1096bcc0 2636echo "$as_me:2636: result: yes" >&5
503d2be0
AS
2637echo "${ECHO_T}yes" >&6
2638
2639rm -f a.out a.exe conftest$ac_cv_exeext
2640ac_clean_files=$ac_clean_files_save
2641# Check the compiler produces executables we can run. If not, either
2642# the compiler is broken, or we cross compile.
1096bcc0 2643echo "$as_me:2643: checking whether we are cross compiling" >&5
503d2be0 2644echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1096bcc0 2645echo "$as_me:2645: result: $cross_compiling" >&5
503d2be0
AS
2646echo "${ECHO_T}$cross_compiling" >&6
2647
1096bcc0 2648echo "$as_me:2648: checking for executable suffix" >&5
503d2be0 2649echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1096bcc0 2650if { (eval echo "$as_me:2650: \"$ac_link\"") >&5
503d2be0
AS
2651 (eval $ac_link) 2>&5
2652 ac_status=$?
1096bcc0 2653 echo "$as_me:2653: \$? = $ac_status" >&5
503d2be0
AS
2654 (exit $ac_status); }; then
2655 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2656# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2657# work properly (i.e., refer to `conftest.exe'), while it won't with
2658# `rm'.
2659for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2660 case $ac_file in
2661 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2662 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2663 export ac_cv_exeext
2664 break;;
2665 * ) break;;
2666 esac
2667done
ba4481b5 2668else
1096bcc0 2669 { { echo "$as_me:2669: error: cannot compute EXEEXT: cannot compile and link" >&5
503d2be0
AS
2670echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2671 { (exit 1); exit 1; }; }
ba4481b5 2672fi
ba4481b5 2673
503d2be0 2674rm -f conftest$ac_cv_exeext
1096bcc0 2675echo "$as_me:2675: result: $ac_cv_exeext" >&5
503d2be0 2676echo "${ECHO_T}$ac_cv_exeext" >&6
ba4481b5 2677
503d2be0
AS
2678rm -f conftest.$ac_ext
2679EXEEXT=$ac_cv_exeext
2680ac_exeext=$EXEEXT
1096bcc0 2681echo "$as_me:2681: checking for object suffix" >&5
503d2be0
AS
2682echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2683if test "${ac_cv_objext+set}" = set; then
2684 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 2685else
503d2be0 2686 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 2687#line 2687 "configure"
503d2be0 2688#include "confdefs.h"
ba4481b5 2689
503d2be0
AS
2690int
2691main ()
2692{
ba4481b5 2693
503d2be0
AS
2694 ;
2695 return 0;
2696}
2697_ACEOF
2698rm -f conftest.o conftest.obj
1096bcc0 2699if { (eval echo "$as_me:2699: \"$ac_compile\"") >&5
503d2be0
AS
2700 (eval $ac_compile) 2>&5
2701 ac_status=$?
1096bcc0 2702 echo "$as_me:2702: \$? = $ac_status" >&5
503d2be0
AS
2703 (exit $ac_status); }; then
2704 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2705 case $ac_file in
2706 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2707 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2708 break;;
2709 esac
2710done
c4bb2108 2711else
503d2be0
AS
2712 echo "$as_me: failed program was:" >&5
2713cat conftest.$ac_ext >&5
1096bcc0 2714{ { echo "$as_me:2714: error: cannot compute OBJEXT: cannot compile" >&5
503d2be0
AS
2715echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2716 { (exit 1); exit 1; }; }
c4bb2108
DL
2717fi
2718
503d2be0
AS
2719rm -f conftest.$ac_cv_objext conftest.$ac_ext
2720fi
1096bcc0 2721echo "$as_me:2721: result: $ac_cv_objext" >&5
503d2be0
AS
2722echo "${ECHO_T}$ac_cv_objext" >&6
2723OBJEXT=$ac_cv_objext
2724ac_objext=$OBJEXT
1096bcc0 2725echo "$as_me:2725: checking whether we are using the GNU C compiler" >&5
503d2be0
AS
2726echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2727if test "${ac_cv_c_compiler_gnu+set}" = set; then
2728 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 2729else
503d2be0 2730 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 2731#line 2731 "configure"
503d2be0
AS
2732#include "confdefs.h"
2733
2734int
2735main ()
2736{
2737#ifndef __GNUC__
2738 choke me
2739#endif
2740
2741 ;
2742 return 0;
2743}
2744_ACEOF
2745rm -f conftest.$ac_objext
1096bcc0 2746if { (eval echo "$as_me:2746: \"$ac_compile\"") >&5
503d2be0
AS
2747 (eval $ac_compile) 2>&5
2748 ac_status=$?
1096bcc0 2749 echo "$as_me:2749: \$? = $ac_status" >&5
503d2be0
AS
2750 (exit $ac_status); } &&
2751 { ac_try='test -s conftest.$ac_objext'
1096bcc0 2752 { (eval echo "$as_me:2752: \"$ac_try\"") >&5
503d2be0
AS
2753 (eval $ac_try) 2>&5
2754 ac_status=$?
1096bcc0 2755 echo "$as_me:2755: \$? = $ac_status" >&5
503d2be0
AS
2756 (exit $ac_status); }; }; then
2757 ac_compiler_gnu=yes
2758else
2759 echo "$as_me: failed program was:" >&5
2760cat conftest.$ac_ext >&5
2761ac_compiler_gnu=no
2762fi
2763rm -f conftest.$ac_objext conftest.$ac_ext
2764ac_cv_c_compiler_gnu=$ac_compiler_gnu
2765
2766fi
1096bcc0 2767echo "$as_me:2767: result: $ac_cv_c_compiler_gnu" >&5
503d2be0
AS
2768echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2769GCC=`test $ac_compiler_gnu = yes && echo yes`
2770ac_test_CFLAGS=${CFLAGS+set}
2771ac_save_CFLAGS=$CFLAGS
2772CFLAGS="-g"
1096bcc0 2773echo "$as_me:2773: checking whether $CC accepts -g" >&5
503d2be0
AS
2774echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2775if test "${ac_cv_prog_cc_g+set}" = set; then
2776 echo $ECHO_N "(cached) $ECHO_C" >&6
2777else
2778 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 2779#line 2779 "configure"
503d2be0
AS
2780#include "confdefs.h"
2781
2782int
2783main ()
2784{
2785
2786 ;
2787 return 0;
2788}
2789_ACEOF
2790rm -f conftest.$ac_objext
1096bcc0 2791if { (eval echo "$as_me:2791: \"$ac_compile\"") >&5
503d2be0
AS
2792 (eval $ac_compile) 2>&5
2793 ac_status=$?
1096bcc0 2794 echo "$as_me:2794: \$? = $ac_status" >&5
503d2be0
AS
2795 (exit $ac_status); } &&
2796 { ac_try='test -s conftest.$ac_objext'
1096bcc0 2797 { (eval echo "$as_me:2797: \"$ac_try\"") >&5
503d2be0
AS
2798 (eval $ac_try) 2>&5
2799 ac_status=$?
1096bcc0 2800 echo "$as_me:2800: \$? = $ac_status" >&5
503d2be0 2801 (exit $ac_status); }; }; then
ba4481b5
DL
2802 ac_cv_prog_cc_g=yes
2803else
503d2be0
AS
2804 echo "$as_me: failed program was:" >&5
2805cat conftest.$ac_ext >&5
2806ac_cv_prog_cc_g=no
ba4481b5 2807fi
503d2be0 2808rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 2809fi
1096bcc0 2810echo "$as_me:2810: result: $ac_cv_prog_cc_g" >&5
503d2be0 2811echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c4bb2108 2812if test "$ac_test_CFLAGS" = set; then
503d2be0 2813 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
2814elif test $ac_cv_prog_cc_g = yes; then
2815 if test "$GCC" = yes; then
ba4481b5
DL
2816 CFLAGS="-g -O2"
2817 else
c4bb2108 2818 CFLAGS="-g"
ba4481b5 2819 fi
22afa6e8 2820else
c4bb2108
DL
2821 if test "$GCC" = yes; then
2822 CFLAGS="-O2"
2823 else
2824 CFLAGS=
2825 fi
ba4481b5 2826fi
503d2be0
AS
2827# Some people use a C++ compiler to compile C. Since we use `exit',
2828# in C++ we need to declare it. In case someone uses the same compiler
2829# for both compiling C and C++ we need to have the C++ compiler decide
2830# the declaration of exit, since it's the most demanding environment.
2831cat >conftest.$ac_ext <<_ACEOF
2832#ifndef __cplusplus
2833 choke me
2834#endif
2835_ACEOF
2836rm -f conftest.$ac_objext
1096bcc0 2837if { (eval echo "$as_me:2837: \"$ac_compile\"") >&5
503d2be0
AS
2838 (eval $ac_compile) 2>&5
2839 ac_status=$?
1096bcc0 2840 echo "$as_me:2840: \$? = $ac_status" >&5
503d2be0
AS
2841 (exit $ac_status); } &&
2842 { ac_try='test -s conftest.$ac_objext'
1096bcc0 2843 { (eval echo "$as_me:2843: \"$ac_try\"") >&5
503d2be0
AS
2844 (eval $ac_try) 2>&5
2845 ac_status=$?
1096bcc0 2846 echo "$as_me:2846: \$? = $ac_status" >&5
503d2be0
AS
2847 (exit $ac_status); }; }; then
2848 for ac_declaration in \
2849 ''\
2850 '#include <stdlib.h>' \
2851 'extern "C" void std::exit (int) throw (); using std::exit;' \
2852 'extern "C" void std::exit (int); using std::exit;' \
2853 'extern "C" void exit (int) throw ();' \
2854 'extern "C" void exit (int);' \
2855 'void exit (int);'
2856do
2857 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 2858#line 2858 "configure"
503d2be0
AS
2859#include "confdefs.h"
2860#include <stdlib.h>
2861$ac_declaration
2862int
2863main ()
2864{
2865exit (42);
2866 ;
2867 return 0;
2868}
2869_ACEOF
2870rm -f conftest.$ac_objext
1096bcc0 2871if { (eval echo "$as_me:2871: \"$ac_compile\"") >&5
503d2be0
AS
2872 (eval $ac_compile) 2>&5
2873 ac_status=$?
1096bcc0 2874 echo "$as_me:2874: \$? = $ac_status" >&5
503d2be0
AS
2875 (exit $ac_status); } &&
2876 { ac_try='test -s conftest.$ac_objext'
1096bcc0 2877 { (eval echo "$as_me:2877: \"$ac_try\"") >&5
503d2be0
AS
2878 (eval $ac_try) 2>&5
2879 ac_status=$?
1096bcc0 2880 echo "$as_me:2880: \$? = $ac_status" >&5
503d2be0
AS
2881 (exit $ac_status); }; }; then
2882 :
2883else
2884 echo "$as_me: failed program was:" >&5
2885cat conftest.$ac_ext >&5
2886continue
2887fi
2888rm -f conftest.$ac_objext conftest.$ac_ext
2889 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 2890#line 2890 "configure"
503d2be0
AS
2891#include "confdefs.h"
2892$ac_declaration
2893int
2894main ()
2895{
2896exit (42);
2897 ;
2898 return 0;
2899}
2900_ACEOF
2901rm -f conftest.$ac_objext
1096bcc0 2902if { (eval echo "$as_me:2902: \"$ac_compile\"") >&5
503d2be0
AS
2903 (eval $ac_compile) 2>&5
2904 ac_status=$?
1096bcc0 2905 echo "$as_me:2905: \$? = $ac_status" >&5
503d2be0
AS
2906 (exit $ac_status); } &&
2907 { ac_try='test -s conftest.$ac_objext'
1096bcc0 2908 { (eval echo "$as_me:2908: \"$ac_try\"") >&5
503d2be0
AS
2909 (eval $ac_try) 2>&5
2910 ac_status=$?
1096bcc0 2911 echo "$as_me:2911: \$? = $ac_status" >&5
503d2be0
AS
2912 (exit $ac_status); }; }; then
2913 break
2914else
2915 echo "$as_me: failed program was:" >&5
2916cat conftest.$ac_ext >&5
2917fi
2918rm -f conftest.$ac_objext conftest.$ac_ext
2919done
2920rm -f conftest*
2921if test -n "$ac_declaration"; then
2922 echo '#ifdef __cplusplus' >>confdefs.h
2923 echo $ac_declaration >>confdefs.h
2924 echo '#endif' >>confdefs.h
2925fi
ba4481b5 2926
503d2be0
AS
2927else
2928 echo "$as_me: failed program was:" >&5
2929cat conftest.$ac_ext >&5
2930fi
2931rm -f conftest.$ac_objext conftest.$ac_ext
2932ac_ext=c
2933ac_cpp='$CPP $CPPFLAGS'
2934ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2935ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2936ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
2937
2938# On Suns, sometimes $CPP names a directory.
2939if test -n "$CPP" && test -d "$CPP"; then
2940 CPP=
2941fi
2942
2943#### Some systems specify a CPP to use unless we are using GCC.
2944#### Now that we know whether we are using GCC, we can decide whether
2945#### to use that one.
2946if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
2947then
2948 CPP="$NON_GNU_CPP"
2949fi
2950
2951#### Some systems specify a CC to use unless we are using GCC.
2952#### Now that we know whether we are using GCC, we can decide whether
2953#### to use that one.
2954if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
2955 test x$cc_specified != xyes
2956then
2957 CC="$NON_GNU_CC"
2958fi
2959
2960if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
2961then
2962 CC="$CC $GCC_TEST_OPTIONS"
2963fi
2964
2965if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
2966then
2967 CC="$CC $NON_GCC_TEST_OPTIONS"
2968fi
2969
2970if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
2971then
2972 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
2973fi
2974
2975if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
2976then
2977 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
2978fi
2979
2980#### Some other nice autoconf tests. If you add a test here which
2981#### should make an entry in src/config.h, don't forget to add an
2982#### #undef clause to src/config.h.in for autoconf to modify.
2983
1096bcc0 2984echo "$as_me:2984: checking whether ln -s works" >&5
503d2be0
AS
2985echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2986LN_S=$as_ln_s
2987if test "$LN_S" = "ln -s"; then
1096bcc0 2988 echo "$as_me:2988: result: yes" >&5
503d2be0 2989echo "${ECHO_T}yes" >&6
ba4481b5 2990else
1096bcc0 2991 echo "$as_me:2991: result: no, using $LN_S" >&5
503d2be0 2992echo "${ECHO_T}no, using $LN_S" >&6
ba4481b5
DL
2993fi
2994
503d2be0
AS
2995ac_ext=c
2996ac_cpp='$CPP $CPPFLAGS'
2997ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2998ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2999ac_compiler_gnu=$ac_cv_c_compiler_gnu
1096bcc0 3000echo "$as_me:3000: checking how to run the C preprocessor" >&5
503d2be0 3001echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
ba4481b5
DL
3002# On Suns, sometimes $CPP names a directory.
3003if test -n "$CPP" && test -d "$CPP"; then
3004 CPP=
3005fi
3006if test -z "$CPP"; then
503d2be0
AS
3007 if test "${ac_cv_prog_CPP+set}" = set; then
3008 echo $ECHO_N "(cached) $ECHO_C" >&6
3009else
3010 # Double quotes because CPP needs to be expanded
3011 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3012 do
3013 ac_preproc_ok=false
3014for ac_c_preproc_warn_flag in '' yes
3015do
3016 # Use a header file that comes with gcc, so configuring glibc
3017 # with a fresh cross-compiler works.
ba4481b5 3018 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
3019 # not just through cpp. "Syntax error" is here to catch this case.
3020 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 3021#line 3021 "configure"
ba4481b5
DL
3022#include "confdefs.h"
3023#include <assert.h>
503d2be0
AS
3024 Syntax error
3025_ACEOF
1096bcc0 3026if { (eval echo "$as_me:3026: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3027 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3028 ac_status=$?
3029 egrep -v '^ *\+' conftest.er1 >conftest.err
3030 rm -f conftest.er1
3031 cat conftest.err >&5
1096bcc0 3032 echo "$as_me:3032: \$? = $ac_status" >&5
503d2be0
AS
3033 (exit $ac_status); } >/dev/null; then
3034 if test -s conftest.err; then
3035 ac_cpp_err=$ac_c_preproc_warn_flag
3036 else
3037 ac_cpp_err=
3038 fi
3039else
3040 ac_cpp_err=yes
3041fi
3042if test -z "$ac_cpp_err"; then
ba4481b5
DL
3043 :
3044else
503d2be0 3045 echo "$as_me: failed program was:" >&5
ba4481b5 3046 cat conftest.$ac_ext >&5
503d2be0
AS
3047 # Broken: fails on valid input.
3048continue
3049fi
3050rm -f conftest.err conftest.$ac_ext
3051
3052 # OK, works on sane cases. Now check whether non-existent headers
3053 # can be detected and how.
3054 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 3055#line 3055 "configure"
503d2be0
AS
3056#include "confdefs.h"
3057#include <ac_nonexistent.h>
3058_ACEOF
1096bcc0 3059if { (eval echo "$as_me:3059: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3060 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3061 ac_status=$?
3062 egrep -v '^ *\+' conftest.er1 >conftest.err
3063 rm -f conftest.er1
3064 cat conftest.err >&5
1096bcc0 3065 echo "$as_me:3065: \$? = $ac_status" >&5
503d2be0
AS
3066 (exit $ac_status); } >/dev/null; then
3067 if test -s conftest.err; then
3068 ac_cpp_err=$ac_c_preproc_warn_flag
3069 else
3070 ac_cpp_err=
3071 fi
3072else
3073 ac_cpp_err=yes
3074fi
3075if test -z "$ac_cpp_err"; then
3076 # Broken: success on invalid input.
3077continue
c4bb2108 3078else
503d2be0 3079 echo "$as_me: failed program was:" >&5
c4bb2108 3080 cat conftest.$ac_ext >&5
503d2be0
AS
3081 # Passes both tests.
3082ac_preproc_ok=:
3083break
3084fi
3085rm -f conftest.err conftest.$ac_ext
3086
3087done
3088# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3089rm -f conftest.err conftest.$ac_ext
3090if $ac_preproc_ok; then
3091 break
3092fi
3093
3094 done
3095 ac_cv_prog_CPP=$CPP
3096
3097fi
3098 CPP=$ac_cv_prog_CPP
3099else
3100 ac_cv_prog_CPP=$CPP
3101fi
1096bcc0 3102echo "$as_me:3102: result: $CPP" >&5
503d2be0
AS
3103echo "${ECHO_T}$CPP" >&6
3104ac_preproc_ok=false
3105for ac_c_preproc_warn_flag in '' yes
3106do
3107 # Use a header file that comes with gcc, so configuring glibc
3108 # with a fresh cross-compiler works.
3109 # On the NeXT, cc -E runs the code through the compiler's parser,
3110 # not just through cpp. "Syntax error" is here to catch this case.
3111 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 3112#line 3112 "configure"
c4bb2108
DL
3113#include "confdefs.h"
3114#include <assert.h>
503d2be0
AS
3115 Syntax error
3116_ACEOF
1096bcc0 3117if { (eval echo "$as_me:3117: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3118 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3119 ac_status=$?
3120 egrep -v '^ *\+' conftest.er1 >conftest.err
3121 rm -f conftest.er1
3122 cat conftest.err >&5
1096bcc0 3123 echo "$as_me:3123: \$? = $ac_status" >&5
503d2be0
AS
3124 (exit $ac_status); } >/dev/null; then
3125 if test -s conftest.err; then
3126 ac_cpp_err=$ac_c_preproc_warn_flag
3127 else
3128 ac_cpp_err=
3129 fi
3130else
3131 ac_cpp_err=yes
3132fi
3133if test -z "$ac_cpp_err"; then
ba4481b5
DL
3134 :
3135else
503d2be0 3136 echo "$as_me: failed program was:" >&5
ba4481b5 3137 cat conftest.$ac_ext >&5
503d2be0
AS
3138 # Broken: fails on valid input.
3139continue
3140fi
3141rm -f conftest.err conftest.$ac_ext
3142
3143 # OK, works on sane cases. Now check whether non-existent headers
3144 # can be detected and how.
3145 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 3146#line 3146 "configure"
503d2be0
AS
3147#include "confdefs.h"
3148#include <ac_nonexistent.h>
3149_ACEOF
1096bcc0 3150if { (eval echo "$as_me:3150: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3151 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3152 ac_status=$?
3153 egrep -v '^ *\+' conftest.er1 >conftest.err
3154 rm -f conftest.er1
3155 cat conftest.err >&5
1096bcc0 3156 echo "$as_me:3156: \$? = $ac_status" >&5
503d2be0
AS
3157 (exit $ac_status); } >/dev/null; then
3158 if test -s conftest.err; then
3159 ac_cpp_err=$ac_c_preproc_warn_flag
3160 else
3161 ac_cpp_err=
3162 fi
3163else
3164 ac_cpp_err=yes
c4bb2108 3165fi
503d2be0
AS
3166if test -z "$ac_cpp_err"; then
3167 # Broken: success on invalid input.
3168continue
3169else
3170 echo "$as_me: failed program was:" >&5
3171 cat conftest.$ac_ext >&5
3172 # Passes both tests.
3173ac_preproc_ok=:
3174break
ba4481b5 3175fi
503d2be0
AS
3176rm -f conftest.err conftest.$ac_ext
3177
3178done
3179# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3180rm -f conftest.err conftest.$ac_ext
3181if $ac_preproc_ok; then
3182 :
ba4481b5 3183else
1096bcc0 3184 { { echo "$as_me:3184: error: C preprocessor \"$CPP\" fails sanity check" >&5
503d2be0
AS
3185echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3186 { (exit 1); exit 1; }; }
ba4481b5 3187fi
503d2be0
AS
3188
3189ac_ext=c
3190ac_cpp='$CPP $CPPFLAGS'
3191ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3192ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3193ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
3194
3195# Find a good install program. We prefer a C program (faster),
3196# so one script is as good as another. But avoid the broken or
3197# incompatible versions:
3198# SysV /etc/install, /usr/sbin/install
3199# SunOS /usr/etc/install
3200# IRIX /sbin/install
3201# AIX /bin/install
503d2be0 3202# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 3203# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
3204# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3205# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3206# ./install, which can be erroneously created by make from ./install.sh.
1096bcc0 3207echo "$as_me:3207: checking for a BSD compatible install" >&5
503d2be0 3208echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
ba4481b5 3209if test -z "$INSTALL"; then
503d2be0
AS
3210if test "${ac_cv_path_install+set}" = set; then
3211 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3212else
503d2be0 3213 ac_save_IFS=$IFS; IFS=$ac_path_separator
ba4481b5 3214 for ac_dir in $PATH; do
503d2be0 3215 IFS=$ac_save_IFS
ba4481b5 3216 # Account for people who put trailing slashes in PATH elements.
503d2be0
AS
3217 case $ac_dir/ in
3218 / | ./ | .// | /cC/* \
3219 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3220 | /usr/ucb/* ) ;;
ba4481b5
DL
3221 *)
3222 # OSF1 and SCO ODT 3.0 have their own names for install.
c4bb2108
DL
3223 # Don't use installbsd from OSF since it installs stuff as root
3224 # by default.
3225 for ac_prog in ginstall scoinst install; do
503d2be0 3226 if $as_executable_p "$ac_dir/$ac_prog"; then
ba4481b5 3227 if test $ac_prog = install &&
503d2be0 3228 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
ba4481b5
DL
3229 # AIX install. It has an incompatible calling convention.
3230 :
503d2be0
AS
3231 elif test $ac_prog = install &&
3232 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3233 # program-specific install script used by HP pwplus--don't use.
3234 :
ba4481b5
DL
3235 else
3236 ac_cv_path_install="$ac_dir/$ac_prog -c"
3237 break 2
3238 fi
3239 fi
3240 done
3241 ;;
3242 esac
3243 done
ba4481b5
DL
3244
3245fi
3246 if test "${ac_cv_path_install+set}" = set; then
503d2be0 3247 INSTALL=$ac_cv_path_install
ba4481b5
DL
3248 else
3249 # As a last resort, use the slow shell script. We don't cache a
3250 # path for INSTALL within a source directory, because that will
3251 # break other packages using the cache if that directory is
3252 # removed, or if the path is relative.
503d2be0 3253 INSTALL=$ac_install_sh
ba4481b5
DL
3254 fi
3255fi
1096bcc0 3256echo "$as_me:3256: result: $INSTALL" >&5
503d2be0 3257echo "${ECHO_T}$INSTALL" >&6
ba4481b5
DL
3258
3259# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3260# It thinks the first close brace ends the variable substitution.
3261test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3262
503d2be0 3263test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 3264
ba4481b5
DL
3265test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3266
3267for ac_prog in 'bison -y' byacc
3268do
503d2be0 3269 # Extract the first word of "$ac_prog", so it can be a program name with args.
ba4481b5 3270set dummy $ac_prog; ac_word=$2
1096bcc0 3271echo "$as_me:3271: checking for $ac_word" >&5
503d2be0
AS
3272echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3273if test "${ac_cv_prog_YACC+set}" = set; then
3274 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3275else
3276 if test -n "$YACC"; then
3277 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3278else
503d2be0
AS
3279 ac_save_IFS=$IFS; IFS=$ac_path_separator
3280ac_dummy="$PATH"
3281for ac_dir in $ac_dummy; do
3282 IFS=$ac_save_IFS
3283 test -z "$ac_dir" && ac_dir=.
3284 $as_executable_p "$ac_dir/$ac_word" || continue
3285ac_cv_prog_YACC="$ac_prog"
1096bcc0 3286echo "$as_me:3286: found $ac_dir/$ac_word" >&5
503d2be0
AS
3287break
3288done
3289
ba4481b5
DL
3290fi
3291fi
503d2be0 3292YACC=$ac_cv_prog_YACC
ba4481b5 3293if test -n "$YACC"; then
1096bcc0 3294 echo "$as_me:3294: result: $YACC" >&5
503d2be0 3295echo "${ECHO_T}$YACC" >&6
ba4481b5 3296else
1096bcc0 3297 echo "$as_me:3297: result: no" >&5
503d2be0 3298echo "${ECHO_T}no" >&6
ba4481b5
DL
3299fi
3300
503d2be0 3301 test -n "$YACC" && break
ba4481b5
DL
3302done
3303test -n "$YACC" || YACC="yacc"
3304
7397acc4 3305if test "x$RANLIB" = x; then
503d2be0
AS
3306 if test -n "$ac_tool_prefix"; then
3307 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3308set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1096bcc0 3309echo "$as_me:3309: checking for $ac_word" >&5
503d2be0
AS
3310echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3311if test "${ac_cv_prog_RANLIB+set}" = set; then
3312 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
3313else
3314 if test -n "$RANLIB"; then
3315 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3316else
503d2be0
AS
3317 ac_save_IFS=$IFS; IFS=$ac_path_separator
3318ac_dummy="$PATH"
3319for ac_dir in $ac_dummy; do
3320 IFS=$ac_save_IFS
3321 test -z "$ac_dir" && ac_dir=.
3322 $as_executable_p "$ac_dir/$ac_word" || continue
3323ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1096bcc0 3324echo "$as_me:3324: found $ac_dir/$ac_word" >&5
503d2be0
AS
3325break
3326done
3327
7397acc4
DL
3328fi
3329fi
503d2be0 3330RANLIB=$ac_cv_prog_RANLIB
7397acc4 3331if test -n "$RANLIB"; then
1096bcc0 3332 echo "$as_me:3332: result: $RANLIB" >&5
503d2be0
AS
3333echo "${ECHO_T}$RANLIB" >&6
3334else
1096bcc0 3335 echo "$as_me:3335: result: no" >&5
503d2be0
AS
3336echo "${ECHO_T}no" >&6
3337fi
3338
3339fi
3340if test -z "$ac_cv_prog_RANLIB"; then
3341 ac_ct_RANLIB=$RANLIB
3342 # Extract the first word of "ranlib", so it can be a program name with args.
3343set dummy ranlib; ac_word=$2
1096bcc0 3344echo "$as_me:3344: checking for $ac_word" >&5
503d2be0
AS
3345echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3346if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3347 echo $ECHO_N "(cached) $ECHO_C" >&6
3348else
3349 if test -n "$ac_ct_RANLIB"; then
3350 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3351else
3352 ac_save_IFS=$IFS; IFS=$ac_path_separator
3353ac_dummy="$PATH"
3354for ac_dir in $ac_dummy; do
3355 IFS=$ac_save_IFS
3356 test -z "$ac_dir" && ac_dir=.
3357 $as_executable_p "$ac_dir/$ac_word" || continue
3358ac_cv_prog_ac_ct_RANLIB="ranlib"
1096bcc0 3359echo "$as_me:3359: found $ac_dir/$ac_word" >&5
503d2be0
AS
3360break
3361done
3362
3363 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3364fi
3365fi
3366ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3367if test -n "$ac_ct_RANLIB"; then
1096bcc0 3368 echo "$as_me:3368: result: $ac_ct_RANLIB" >&5
503d2be0
AS
3369echo "${ECHO_T}$ac_ct_RANLIB" >&6
3370else
1096bcc0 3371 echo "$as_me:3371: result: no" >&5
503d2be0
AS
3372echo "${ECHO_T}no" >&6
3373fi
3374
3375 RANLIB=$ac_ct_RANLIB
7397acc4 3376else
503d2be0 3377 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
3378fi
3379
3380fi
ba4481b5 3381
1096bcc0 3382echo "$as_me:3382: checking for AIX" >&5
503d2be0
AS
3383echo $ECHO_N "checking for AIX... $ECHO_C" >&6
3384cat >conftest.$ac_ext <<_ACEOF
1096bcc0 3385#line 3385 "configure"
ba4481b5
DL
3386#include "confdefs.h"
3387#ifdef _AIX
3388 yes
3389#endif
3390
503d2be0 3391_ACEOF
ba4481b5
DL
3392if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3393 egrep "yes" >/dev/null 2>&1; then
1096bcc0 3394 echo "$as_me:3394: result: yes" >&5
503d2be0
AS
3395echo "${ECHO_T}yes" >&6
3396cat >>confdefs.h <<\EOF
ba4481b5
DL
3397#define _ALL_SOURCE 1
3398EOF
3399
3400else
1096bcc0 3401 echo "$as_me:3401: result: no" >&5
503d2be0 3402echo "${ECHO_T}no" >&6
ba4481b5
DL
3403fi
3404rm -f conftest*
3405
3b33a005
DL
3406#### Extract some information from the operating system and machine files.
3407
1096bcc0 3408{ echo "$as_me:3408: checking the machine- and system-dependent files to find out
3b33a005 3409 - which libraries the lib-src programs will want, and
503d2be0
AS
3410 - whether the GNU malloc routines are usable..." >&5
3411echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 3412 - which libraries the lib-src programs will want, and
503d2be0 3413 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
3414
3415### First figure out CFLAGS (which we use for running the compiler here)
3416### and REAL_CFLAGS (which we use for real compilation).
3417### The two are the same except on a few systems, where they are made
3418### different to work around various lossages. For example,
3419### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
3420### as implying static linking.
3421
3422### If the CFLAGS env var is specified, we use that value
3423### instead of the default.
3424
3425### It's not important that this name contain the PID; you can't run
3426### two configures in the same directory and have anything work
3427### anyway.
3428tempcname="conftest.c"
3429
3430echo '
3431#include "'${srcdir}'/src/'${opsysfile}'"
3432#include "'${srcdir}'/src/'${machfile}'"
3433#ifndef LIBS_MACHINE
3434#define LIBS_MACHINE
3435#endif
3436#ifndef LIBS_SYSTEM
3437#define LIBS_SYSTEM
3438#endif
3439#ifndef C_SWITCH_SYSTEM
3440#define C_SWITCH_SYSTEM
3441#endif
3442#ifndef C_SWITCH_MACHINE
3443#define C_SWITCH_MACHINE
3444#endif
3445configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
3446configure___ c_switch_system=C_SWITCH_SYSTEM
3447configure___ c_switch_machine=C_SWITCH_MACHINE
3448
3449#ifndef LIB_X11_LIB
3450#define LIB_X11_LIB -lX11
3451#endif
3452
3453#ifndef LIBX11_MACHINE
3454#define LIBX11_MACHINE
3455#endif
3456
3457#ifndef LIBX11_SYSTEM
3458#define LIBX11_SYSTEM
3459#endif
3460configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
3461
3462#ifdef UNEXEC
3463configure___ unexec=UNEXEC
3464#else
3465configure___ unexec=unexec.o
3466#endif
3467
3468#ifdef SYSTEM_MALLOC
3469configure___ system_malloc=yes
3470#else
3471configure___ system_malloc=no
3472#endif
3473
ef9e4345
GM
3474#ifdef USE_MMAP_FOR_BUFFERS
3475configure___ use_mmap_for_buffers=yes
73b77ee5 3476#else
ef9e4345 3477configure___ use_mmap_for_buffers=no
73b77ee5
GM
3478#endif
3479
3b33a005
DL
3480#ifndef C_DEBUG_SWITCH
3481#define C_DEBUG_SWITCH -g
3482#endif
3483
3484#ifndef C_OPTIMIZE_SWITCH
3485#ifdef __GNUC__
3486#define C_OPTIMIZE_SWITCH -O2
3487#else
3488#define C_OPTIMIZE_SWITCH -O
3489#endif
3490#endif
3491
3492#ifndef LD_SWITCH_MACHINE
3493#define LD_SWITCH_MACHINE
3494#endif
3495
3496#ifndef LD_SWITCH_SYSTEM
3497#define LD_SWITCH_SYSTEM
3498#endif
3499
3500#ifndef LD_SWITCH_X_SITE_AUX
3501#define LD_SWITCH_X_SITE_AUX
503d2be0 3502#endif
3b33a005
DL
3503
3504configure___ ld_switch_system=LD_SWITCH_SYSTEM
3505configure___ ld_switch_machine=LD_SWITCH_MACHINE
3506
3507#ifdef THIS_IS_CONFIGURE
3508
3509/* Get the CFLAGS for tests in configure. */
3510#ifdef __GNUC__
3511configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3512#else
3513configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3514#endif
3515
3516#else /* not THIS_IS_CONFIGURE */
3517
3518/* Get the CFLAGS for real compilation. */
3519#ifdef __GNUC__
3520configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3521#else
3522configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3523#endif
3524
3525#endif /* not THIS_IS_CONFIGURE */
3526' > ${tempcname}
3527
3528# The value of CPP is a quoted variable reference, so we need to do this
3529# to get its actual value...
3530CPP=`eval "echo $CPP"`
3531eval `${CPP} -Isrc ${tempcname} \
3532 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3533if test "x$SPECIFIED_CFLAGS" = x; then
3534 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
3535 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3536else
3537 REAL_CFLAGS="$CFLAGS"
3538fi
3539rm ${tempcname}
3540
3541ac_link="$ac_link $ld_switch_machine $ld_switch_system"
3542
3543### Make sure subsequent tests use flags consistent with the build flags.
3544
3545if test x"${OVERRIDE_CPPFLAGS}" != x; then
3546 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
3547else
3548 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
3549fi
3550
503d2be0 3551# Check whether --enable-largefile or --disable-largefile was given.
f4988be7
GM
3552if test "${enable_largefile+set}" = set; then
3553 enableval="$enable_largefile"
f4988be7 3554
503d2be0
AS
3555fi;
3556if test "$enable_largefile" != no; then
f4988be7 3557
1096bcc0 3558 echo "$as_me:3558: checking for special C compiler options needed for large files" >&5
503d2be0
AS
3559echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
3560if test "${ac_cv_sys_largefile_CC+set}" = set; then
3561 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3562else
f4988be7 3563 ac_cv_sys_largefile_CC=no
503d2be0
AS
3564 if test "$GCC" != yes; then
3565 ac_save_CC=$CC
3566 while :; do
3567 # IRIX 6.2 and later do not support large files by default,
3568 # so use the C compiler's -n32 option if that helps.
3569 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 3570#line 3570 "configure"
b192d653 3571#include "confdefs.h"
f4988be7 3572#include <sys/types.h>
503d2be0
AS
3573 /* Check that off_t can represent 2**63 - 1 correctly.
3574 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3575 since some C++ compilers masquerading as C compilers
3576 incorrectly reject 9223372036854775807. */
3577#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3578 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3579 && LARGE_OFF_T % 2147483647 == 1)
3580 ? 1 : -1];
3581int
3582main ()
3583{
f4988be7 3584
503d2be0
AS
3585 ;
3586 return 0;
3587}
3588_ACEOF
3589 rm -f conftest.$ac_objext
1096bcc0 3590if { (eval echo "$as_me:3590: \"$ac_compile\"") >&5
503d2be0
AS
3591 (eval $ac_compile) 2>&5
3592 ac_status=$?
1096bcc0 3593 echo "$as_me:3593: \$? = $ac_status" >&5
503d2be0
AS
3594 (exit $ac_status); } &&
3595 { ac_try='test -s conftest.$ac_objext'
1096bcc0 3596 { (eval echo "$as_me:3596: \"$ac_try\"") >&5
503d2be0
AS
3597 (eval $ac_try) 2>&5
3598 ac_status=$?
1096bcc0 3599 echo "$as_me:3599: \$? = $ac_status" >&5
503d2be0
AS
3600 (exit $ac_status); }; }; then
3601 break
b192d653 3602else
503d2be0
AS
3603 echo "$as_me: failed program was:" >&5
3604cat conftest.$ac_ext >&5
3605fi
3606rm -f conftest.$ac_objext
3607 CC="$CC -n32"
3608 rm -f conftest.$ac_objext
1096bcc0 3609if { (eval echo "$as_me:3609: \"$ac_compile\"") >&5
503d2be0
AS
3610 (eval $ac_compile) 2>&5
3611 ac_status=$?
1096bcc0 3612 echo "$as_me:3612: \$? = $ac_status" >&5
503d2be0
AS
3613 (exit $ac_status); } &&
3614 { ac_try='test -s conftest.$ac_objext'
1096bcc0 3615 { (eval echo "$as_me:3615: \"$ac_try\"") >&5
503d2be0
AS
3616 (eval $ac_try) 2>&5
3617 ac_status=$?
1096bcc0 3618 echo "$as_me:3618: \$? = $ac_status" >&5
503d2be0
AS
3619 (exit $ac_status); }; }; then
3620 ac_cv_sys_largefile_CC=' -n32'; break
3621else
3622 echo "$as_me: failed program was:" >&5
3623cat conftest.$ac_ext >&5
3624fi
3625rm -f conftest.$ac_objext
3626 break
3627 done
3628 CC=$ac_save_CC
3629 rm -f conftest.$ac_ext
3630 fi
b192d653 3631fi
1096bcc0 3632echo "$as_me:3632: result: $ac_cv_sys_largefile_CC" >&5
503d2be0
AS
3633echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
3634 if test "$ac_cv_sys_largefile_CC" != no; then
3635 CC=$CC$ac_cv_sys_largefile_CC
3636 fi
b192d653 3637
1096bcc0 3638 echo "$as_me:3638: checking for _FILE_OFFSET_BITS value needed for large files" >&5
503d2be0
AS
3639echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
3640if test "${ac_cv_sys_file_offset_bits+set}" = set; then
3641 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3642else
503d2be0 3643 while :; do
f4988be7 3644 ac_cv_sys_file_offset_bits=no
503d2be0 3645 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 3646#line 3646 "configure"
f4988be7
GM
3647#include "confdefs.h"
3648#include <sys/types.h>
503d2be0
AS
3649 /* Check that off_t can represent 2**63 - 1 correctly.
3650 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3651 since some C++ compilers masquerading as C compilers
3652 incorrectly reject 9223372036854775807. */
3653#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3654 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3655 && LARGE_OFF_T % 2147483647 == 1)
3656 ? 1 : -1];
3657int
3658main ()
3659{
f4988be7 3660
503d2be0
AS
3661 ;
3662 return 0;
3663}
3664_ACEOF
3665rm -f conftest.$ac_objext
1096bcc0 3666if { (eval echo "$as_me:3666: \"$ac_compile\"") >&5
503d2be0
AS
3667 (eval $ac_compile) 2>&5
3668 ac_status=$?
1096bcc0 3669 echo "$as_me:3669: \$? = $ac_status" >&5
503d2be0
AS
3670 (exit $ac_status); } &&
3671 { ac_try='test -s conftest.$ac_objext'
1096bcc0 3672 { (eval echo "$as_me:3672: \"$ac_try\"") >&5
503d2be0
AS
3673 (eval $ac_try) 2>&5
3674 ac_status=$?
1096bcc0 3675 echo "$as_me:3675: \$? = $ac_status" >&5
503d2be0
AS
3676 (exit $ac_status); }; }; then
3677 break
f4988be7 3678else
503d2be0
AS
3679 echo "$as_me: failed program was:" >&5
3680cat conftest.$ac_ext >&5
3681fi
3682rm -f conftest.$ac_objext conftest.$ac_ext
3683 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 3684#line 3684 "configure"
ba4481b5 3685#include "confdefs.h"
f4988be7
GM
3686#define _FILE_OFFSET_BITS 64
3687#include <sys/types.h>
503d2be0
AS
3688 /* Check that off_t can represent 2**63 - 1 correctly.
3689 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3690 since some C++ compilers masquerading as C compilers
3691 incorrectly reject 9223372036854775807. */
3692#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3693 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3694 && LARGE_OFF_T % 2147483647 == 1)
3695 ? 1 : -1];
3696int
3697main ()
3698{
3699
3700 ;
3701 return 0;
3702}
3703_ACEOF
3704rm -f conftest.$ac_objext
1096bcc0 3705if { (eval echo "$as_me:3705: \"$ac_compile\"") >&5
503d2be0
AS
3706 (eval $ac_compile) 2>&5
3707 ac_status=$?
1096bcc0 3708 echo "$as_me:3708: \$? = $ac_status" >&5
503d2be0
AS
3709 (exit $ac_status); } &&
3710 { ac_try='test -s conftest.$ac_objext'
1096bcc0 3711 { (eval echo "$as_me:3711: \"$ac_try\"") >&5
503d2be0
AS
3712 (eval $ac_try) 2>&5
3713 ac_status=$?
1096bcc0 3714 echo "$as_me:3714: \$? = $ac_status" >&5
503d2be0
AS
3715 (exit $ac_status); }; }; then
3716 ac_cv_sys_file_offset_bits=64; break
3717else
3718 echo "$as_me: failed program was:" >&5
3719cat conftest.$ac_ext >&5
3720fi
3721rm -f conftest.$ac_objext conftest.$ac_ext
3722 break
3723done
ba4481b5 3724fi
1096bcc0 3725echo "$as_me:3725: result: $ac_cv_sys_file_offset_bits" >&5
503d2be0
AS
3726echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
3727if test "$ac_cv_sys_file_offset_bits" != no; then
ba4481b5 3728
503d2be0 3729cat >>confdefs.h <<EOF
f4988be7 3730#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
ba4481b5 3731EOF
f4988be7 3732
503d2be0
AS
3733fi
3734rm -f conftest*
1096bcc0 3735 echo "$as_me:3735: checking for _LARGE_FILES value needed for large files" >&5
503d2be0
AS
3736echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
3737if test "${ac_cv_sys_large_files+set}" = set; then
3738 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3739else
503d2be0 3740 while :; do
f4988be7 3741 ac_cv_sys_large_files=no
503d2be0 3742 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 3743#line 3743 "configure"
f4988be7 3744#include "confdefs.h"
503d2be0
AS
3745#include <sys/types.h>
3746 /* Check that off_t can represent 2**63 - 1 correctly.
3747 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3748 since some C++ compilers masquerading as C compilers
3749 incorrectly reject 9223372036854775807. */
3750#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3751 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3752 && LARGE_OFF_T % 2147483647 == 1)
3753 ? 1 : -1];
3754int
3755main ()
3756{
ba4481b5 3757
503d2be0
AS
3758 ;
3759 return 0;
3760}
3761_ACEOF
3762rm -f conftest.$ac_objext
1096bcc0 3763if { (eval echo "$as_me:3763: \"$ac_compile\"") >&5
503d2be0
AS
3764 (eval $ac_compile) 2>&5
3765 ac_status=$?
1096bcc0 3766 echo "$as_me:3766: \$? = $ac_status" >&5
503d2be0
AS
3767 (exit $ac_status); } &&
3768 { ac_try='test -s conftest.$ac_objext'
1096bcc0 3769 { (eval echo "$as_me:3769: \"$ac_try\"") >&5
503d2be0
AS
3770 (eval $ac_try) 2>&5
3771 ac_status=$?
1096bcc0 3772 echo "$as_me:3772: \$? = $ac_status" >&5
503d2be0
AS
3773 (exit $ac_status); }; }; then
3774 break
ba4481b5 3775else
503d2be0
AS
3776 echo "$as_me: failed program was:" >&5
3777cat conftest.$ac_ext >&5
3778fi
3779rm -f conftest.$ac_objext conftest.$ac_ext
3780 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 3781#line 3781 "configure"
ba4481b5 3782#include "confdefs.h"
f4988be7 3783#define _LARGE_FILES 1
503d2be0
AS
3784#include <sys/types.h>
3785 /* Check that off_t can represent 2**63 - 1 correctly.
3786 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3787 since some C++ compilers masquerading as C compilers
3788 incorrectly reject 9223372036854775807. */
3789#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3790 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3791 && LARGE_OFF_T % 2147483647 == 1)
3792 ? 1 : -1];
3793int
3794main ()
3795{
f4988be7 3796
503d2be0
AS
3797 ;
3798 return 0;
3799}
3800_ACEOF
3801rm -f conftest.$ac_objext
1096bcc0 3802if { (eval echo "$as_me:3802: \"$ac_compile\"") >&5
503d2be0
AS
3803 (eval $ac_compile) 2>&5
3804 ac_status=$?
1096bcc0 3805 echo "$as_me:3805: \$? = $ac_status" >&5
503d2be0
AS
3806 (exit $ac_status); } &&
3807 { ac_try='test -s conftest.$ac_objext'
1096bcc0 3808 { (eval echo "$as_me:3808: \"$ac_try\"") >&5
503d2be0
AS
3809 (eval $ac_try) 2>&5
3810 ac_status=$?
1096bcc0 3811 echo "$as_me:3811: \$? = $ac_status" >&5
503d2be0
AS
3812 (exit $ac_status); }; }; then
3813 ac_cv_sys_large_files=1; break
3814else
3815 echo "$as_me: failed program was:" >&5
3816cat conftest.$ac_ext >&5
3817fi
3818rm -f conftest.$ac_objext conftest.$ac_ext
3819 break
3820done
ba4481b5 3821fi
1096bcc0 3822echo "$as_me:3822: result: $ac_cv_sys_large_files" >&5
503d2be0
AS
3823echo "${ECHO_T}$ac_cv_sys_large_files" >&6
3824if test "$ac_cv_sys_large_files" != no; then
ba4481b5 3825
503d2be0 3826cat >>confdefs.h <<EOF
f4988be7 3827#define _LARGE_FILES $ac_cv_sys_large_files
ba4481b5
DL
3828EOF
3829
503d2be0
AS
3830fi
3831rm -f conftest*
3832fi
ba4481b5 3833
f4988be7 3834# Sound support for GNU/Linux and the free BSDs.
503d2be0
AS
3835
3836for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
f4988be7 3837do
503d2be0 3838as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
1096bcc0 3839echo "$as_me:3839: checking for $ac_header" >&5
503d2be0
AS
3840echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3841if eval "test \"\${$as_ac_Header+set}\" = set"; then
3842 echo $ECHO_N "(cached) $ECHO_C" >&6
3843else
3844 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 3845#line 3845 "configure"
503d2be0
AS
3846#include "confdefs.h"
3847#include <$ac_header>
3848_ACEOF
1096bcc0 3849if { (eval echo "$as_me:3849: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3850 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3851 ac_status=$?
3852 egrep -v '^ *\+' conftest.er1 >conftest.err
3853 rm -f conftest.er1
3854 cat conftest.err >&5
1096bcc0 3855 echo "$as_me:3855: \$? = $ac_status" >&5
503d2be0
AS
3856 (exit $ac_status); } >/dev/null; then
3857 if test -s conftest.err; then
3858 ac_cpp_err=$ac_c_preproc_warn_flag
3859 else
3860 ac_cpp_err=
3861 fi
3862else
3863 ac_cpp_err=yes
3864fi
3865if test -z "$ac_cpp_err"; then
3866 eval "$as_ac_Header=yes"
3867else
3868 echo "$as_me: failed program was:" >&5
ba4481b5 3869 cat conftest.$ac_ext >&5
503d2be0 3870 eval "$as_ac_Header=no"
ba4481b5 3871fi
503d2be0 3872rm -f conftest.err conftest.$ac_ext
ba4481b5 3873fi
1096bcc0 3874echo "$as_me:3874: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
3875echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3876if test `eval echo '${'$as_ac_Header'}'` = yes; then
3877 cat >>confdefs.h <<EOF
3878#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba4481b5 3879EOF
503d2be0 3880
ba4481b5 3881fi
f4988be7 3882done
ba4481b5 3883
f4988be7 3884# Emulation library used on NetBSD.
1096bcc0 3885echo "$as_me:3885: checking for _oss_ioctl in -lossaudio" >&5
503d2be0
AS
3886echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6
3887if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
3888 echo $ECHO_N "(cached) $ECHO_C" >&6
65171e3a 3889else
503d2be0 3890 ac_check_lib_save_LIBS=$LIBS
f4988be7 3891LIBS="-lossaudio $LIBS"
503d2be0 3892cat >conftest.$ac_ext <<_ACEOF
1096bcc0 3893#line 3893 "configure"
65171e3a 3894#include "confdefs.h"
503d2be0 3895
f4988be7 3896/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
3897#ifdef __cplusplus
3898extern "C"
3899#endif
f4988be7 3900/* We use char because int might match the return type of a gcc2
503d2be0
AS
3901 builtin and then its argument prototype would still apply. */
3902char _oss_ioctl ();
3903int
3904main ()
3905{
3906_oss_ioctl ();
3907 ;
3908 return 0;
3909}
3910_ACEOF
3911rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 3912if { (eval echo "$as_me:3912: \"$ac_link\"") >&5
503d2be0
AS
3913 (eval $ac_link) 2>&5
3914 ac_status=$?
1096bcc0 3915 echo "$as_me:3915: \$? = $ac_status" >&5
503d2be0
AS
3916 (exit $ac_status); } &&
3917 { ac_try='test -s conftest$ac_exeext'
1096bcc0 3918 { (eval echo "$as_me:3918: \"$ac_try\"") >&5
503d2be0
AS
3919 (eval $ac_try) 2>&5
3920 ac_status=$?
1096bcc0 3921 echo "$as_me:3921: \$? = $ac_status" >&5
503d2be0
AS
3922 (exit $ac_status); }; }; then
3923 ac_cv_lib_ossaudio__oss_ioctl=yes
3924else
3925 echo "$as_me: failed program was:" >&5
3926cat conftest.$ac_ext >&5
3927ac_cv_lib_ossaudio__oss_ioctl=no
3928fi
3929rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3930LIBS=$ac_check_lib_save_LIBS
3931fi
1096bcc0 3932echo "$as_me:3932: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
503d2be0
AS
3933echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6
3934if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
f4988be7
GM
3935 LIBSOUND=-lossaudio
3936else
503d2be0 3937 LIBSOUND=
f4988be7 3938fi
65171e3a 3939
503d2be0 3940for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
f4988be7 3941 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
b1b84649 3942 termcap.h stdio_ext.h fcntl.h term.h strings.h coff.h
f4988be7 3943do
503d2be0 3944as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
1096bcc0 3945echo "$as_me:3945: checking for $ac_header" >&5
503d2be0
AS
3946echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3947if eval "test \"\${$as_ac_Header+set}\" = set"; then
3948 echo $ECHO_N "(cached) $ECHO_C" >&6
3949else
3950 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 3951#line 3951 "configure"
503d2be0
AS
3952#include "confdefs.h"
3953#include <$ac_header>
3954_ACEOF
1096bcc0 3955if { (eval echo "$as_me:3955: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3956 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3957 ac_status=$?
3958 egrep -v '^ *\+' conftest.er1 >conftest.err
3959 rm -f conftest.er1
3960 cat conftest.err >&5
1096bcc0 3961 echo "$as_me:3961: \$? = $ac_status" >&5
503d2be0
AS
3962 (exit $ac_status); } >/dev/null; then
3963 if test -s conftest.err; then
3964 ac_cpp_err=$ac_c_preproc_warn_flag
3965 else
3966 ac_cpp_err=
3967 fi
3968else
3969 ac_cpp_err=yes
3970fi
3971if test -z "$ac_cpp_err"; then
3972 eval "$as_ac_Header=yes"
3973else
3974 echo "$as_me: failed program was:" >&5
ba4481b5 3975 cat conftest.$ac_ext >&5
503d2be0 3976 eval "$as_ac_Header=no"
ba4481b5 3977fi
503d2be0 3978rm -f conftest.err conftest.$ac_ext
ba4481b5 3979fi
1096bcc0 3980echo "$as_me:3980: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
3981echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3982if test `eval echo '${'$as_ac_Header'}'` = yes; then
3983 cat >>confdefs.h <<EOF
3984#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba4481b5 3985EOF
503d2be0 3986
ba4481b5 3987fi
f4988be7 3988done
ba4481b5 3989
1096bcc0 3990echo "$as_me:3990: checking for ANSI C header files" >&5
503d2be0
AS
3991echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3992if test "${ac_cv_header_stdc+set}" = set; then
3993 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3994else
503d2be0 3995 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 3996#line 3996 "configure"
ba4481b5 3997#include "confdefs.h"
f4988be7
GM
3998#include <stdlib.h>
3999#include <stdarg.h>
4000#include <string.h>
4001#include <float.h>
503d2be0
AS
4002
4003_ACEOF
1096bcc0 4004if { (eval echo "$as_me:4004: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
4005 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4006 ac_status=$?
4007 egrep -v '^ *\+' conftest.er1 >conftest.err
4008 rm -f conftest.er1
4009 cat conftest.err >&5
1096bcc0 4010 echo "$as_me:4010: \$? = $ac_status" >&5
503d2be0
AS
4011 (exit $ac_status); } >/dev/null; then
4012 if test -s conftest.err; then
4013 ac_cpp_err=$ac_c_preproc_warn_flag
4014 else
4015 ac_cpp_err=
4016 fi
4017else
4018 ac_cpp_err=yes
4019fi
4020if test -z "$ac_cpp_err"; then
f4988be7 4021 ac_cv_header_stdc=yes
ba4481b5 4022else
503d2be0 4023 echo "$as_me: failed program was:" >&5
ba4481b5 4024 cat conftest.$ac_ext >&5
f4988be7 4025 ac_cv_header_stdc=no
ba4481b5 4026fi
503d2be0 4027rm -f conftest.err conftest.$ac_ext
ba4481b5 4028
f4988be7
GM
4029if test $ac_cv_header_stdc = yes; then
4030 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
503d2be0 4031 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 4032#line 4032 "configure"
f4988be7
GM
4033#include "confdefs.h"
4034#include <string.h>
503d2be0
AS
4035
4036_ACEOF
f4988be7
GM
4037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4038 egrep "memchr" >/dev/null 2>&1; then
4039 :
4040else
f4988be7
GM
4041 ac_cv_header_stdc=no
4042fi
4043rm -f conftest*
4044
4045fi
4046
4047if test $ac_cv_header_stdc = yes; then
4048 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
503d2be0 4049 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 4050#line 4050 "configure"
f4988be7
GM
4051#include "confdefs.h"
4052#include <stdlib.h>
503d2be0
AS
4053
4054_ACEOF
f4988be7
GM
4055if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4056 egrep "free" >/dev/null 2>&1; then
4057 :
4058else
f4988be7
GM
4059 ac_cv_header_stdc=no
4060fi
4061rm -f conftest*
4062
4063fi
4064
4065if test $ac_cv_header_stdc = yes; then
4066 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
503d2be0 4067 if test "$cross_compiling" = yes; then
f4988be7
GM
4068 :
4069else
503d2be0 4070 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 4071#line 4071 "configure"
f4988be7
GM
4072#include "confdefs.h"
4073#include <ctype.h>
503d2be0
AS
4074#if ((' ' & 0x0FF) == 0x020)
4075# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4076# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4077#else
4078# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4079 || ('j' <= (c) && (c) <= 'r') \
4080 || ('s' <= (c) && (c) <= 'z'))
4081# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4082#endif
f4988be7 4083
503d2be0
AS
4084#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4085int
4086main ()
4087{
4088 int i;
4089 for (i = 0; i < 256; i++)
4090 if (XOR (islower (i), ISLOWER (i))
4091 || toupper (i) != TOUPPER (i))
4092 exit(2);
4093 exit (0);
4094}
4095_ACEOF
4096rm -f conftest$ac_exeext
1096bcc0 4097if { (eval echo "$as_me:4097: \"$ac_link\"") >&5
503d2be0
AS
4098 (eval $ac_link) 2>&5
4099 ac_status=$?
1096bcc0 4100 echo "$as_me:4100: \$? = $ac_status" >&5
503d2be0 4101 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
1096bcc0 4102 { (eval echo "$as_me:4102: \"$ac_try\"") >&5
503d2be0
AS
4103 (eval $ac_try) 2>&5
4104 ac_status=$?
1096bcc0 4105 echo "$as_me:4105: \$? = $ac_status" >&5
503d2be0 4106 (exit $ac_status); }; }; then
f4988be7
GM
4107 :
4108else
503d2be0
AS
4109 echo "$as_me: program exited with status $ac_status" >&5
4110echo "$as_me: failed program was:" >&5
4111cat conftest.$ac_ext >&5
4112ac_cv_header_stdc=no
f4988be7 4113fi
503d2be0 4114rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
f4988be7 4115fi
f4988be7
GM
4116fi
4117fi
1096bcc0 4118echo "$as_me:4118: result: $ac_cv_header_stdc" >&5
503d2be0 4119echo "${ECHO_T}$ac_cv_header_stdc" >&6
f4988be7 4120if test $ac_cv_header_stdc = yes; then
503d2be0
AS
4121
4122cat >>confdefs.h <<\EOF
f4988be7
GM
4123#define STDC_HEADERS 1
4124EOF
4125
4126fi
4127
1096bcc0 4128echo "$as_me:4128: checking whether time.h and sys/time.h may both be included" >&5
503d2be0
AS
4129echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
4130if test "${ac_cv_header_time+set}" = set; then
4131 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4132else
503d2be0 4133 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 4134#line 4134 "configure"
f4988be7
GM
4135#include "confdefs.h"
4136#include <sys/types.h>
4137#include <sys/time.h>
4138#include <time.h>
503d2be0
AS
4139
4140int
4141main ()
4142{
4143if ((struct tm *) 0)
4144return 0;
4145 ;
4146 return 0;
4147}
4148_ACEOF
4149rm -f conftest.$ac_objext
1096bcc0 4150if { (eval echo "$as_me:4150: \"$ac_compile\"") >&5
503d2be0
AS
4151 (eval $ac_compile) 2>&5
4152 ac_status=$?
1096bcc0 4153 echo "$as_me:4153: \$? = $ac_status" >&5
503d2be0
AS
4154 (exit $ac_status); } &&
4155 { ac_try='test -s conftest.$ac_objext'
1096bcc0 4156 { (eval echo "$as_me:4156: \"$ac_try\"") >&5
503d2be0
AS
4157 (eval $ac_try) 2>&5
4158 ac_status=$?
1096bcc0 4159 echo "$as_me:4159: \$? = $ac_status" >&5
503d2be0 4160 (exit $ac_status); }; }; then
f4988be7
GM
4161 ac_cv_header_time=yes
4162else
503d2be0
AS
4163 echo "$as_me: failed program was:" >&5
4164cat conftest.$ac_ext >&5
4165ac_cv_header_time=no
f4988be7 4166fi
503d2be0 4167rm -f conftest.$ac_objext conftest.$ac_ext
f4988be7 4168fi
1096bcc0 4169echo "$as_me:4169: result: $ac_cv_header_time" >&5
503d2be0 4170echo "${ECHO_T}$ac_cv_header_time" >&6
f4988be7 4171if test $ac_cv_header_time = yes; then
503d2be0
AS
4172
4173cat >>confdefs.h <<\EOF
f4988be7
GM
4174#define TIME_WITH_SYS_TIME 1
4175EOF
4176
4177fi
4178
1096bcc0 4179echo "$as_me:4179: checking for sys_siglist declaration in signal.h or unistd.h" >&5
503d2be0
AS
4180echo $ECHO_N "checking for sys_siglist declaration in signal.h or unistd.h... $ECHO_C" >&6
4181if test "${ac_cv_decl_sys_siglist+set}" = set; then
4182 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4183else
503d2be0 4184 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 4185#line 4185 "configure"
f4988be7
GM
4186#include "confdefs.h"
4187#include <sys/types.h>
4188#include <signal.h>
4189/* NetBSD declares sys_siglist in unistd.h. */
503d2be0
AS
4190#if HAVE_UNISTD_H
4191# include <unistd.h>
f4988be7 4192#endif
503d2be0
AS
4193
4194int
4195main ()
4196{
f4988be7 4197char *msg = *(sys_siglist + 1);
503d2be0
AS
4198 ;
4199 return 0;
4200}
4201_ACEOF
4202rm -f conftest.$ac_objext
1096bcc0 4203if { (eval echo "$as_me:4203: \"$ac_compile\"") >&5
503d2be0
AS
4204 (eval $ac_compile) 2>&5
4205 ac_status=$?
1096bcc0 4206 echo "$as_me:4206: \$? = $ac_status" >&5
503d2be0
AS
4207 (exit $ac_status); } &&
4208 { ac_try='test -s conftest.$ac_objext'
1096bcc0 4209 { (eval echo "$as_me:4209: \"$ac_try\"") >&5
503d2be0
AS
4210 (eval $ac_try) 2>&5
4211 ac_status=$?
1096bcc0 4212 echo "$as_me:4212: \$? = $ac_status" >&5
503d2be0 4213 (exit $ac_status); }; }; then
f4988be7
GM
4214 ac_cv_decl_sys_siglist=yes
4215else
503d2be0
AS
4216 echo "$as_me: failed program was:" >&5
4217cat conftest.$ac_ext >&5
4218ac_cv_decl_sys_siglist=no
f4988be7 4219fi
503d2be0 4220rm -f conftest.$ac_objext conftest.$ac_ext
f4988be7 4221fi
1096bcc0 4222echo "$as_me:4222: result: $ac_cv_decl_sys_siglist" >&5
503d2be0 4223echo "${ECHO_T}$ac_cv_decl_sys_siglist" >&6
f4988be7 4224if test $ac_cv_decl_sys_siglist = yes; then
503d2be0
AS
4225
4226cat >>confdefs.h <<\EOF
f4988be7
GM
4227#define SYS_SIGLIST_DECLARED 1
4228EOF
4229
4230fi
4231
1096bcc0 4232echo "$as_me:4232: checking for sys/wait.h that is POSIX.1 compatible" >&5
503d2be0
AS
4233echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
4234if test "${ac_cv_header_sys_wait_h+set}" = set; then
4235 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4236else
503d2be0 4237 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 4238#line 4238 "configure"
f4988be7
GM
4239#include "confdefs.h"
4240#include <sys/types.h>
4241#include <sys/wait.h>
4242#ifndef WEXITSTATUS
503d2be0 4243# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
f4988be7
GM
4244#endif
4245#ifndef WIFEXITED
503d2be0 4246# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
f4988be7 4247#endif
503d2be0
AS
4248
4249int
4250main ()
4251{
4252 int s;
4253 wait (&s);
4254 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4255 ;
4256 return 0;
4257}
4258_ACEOF
4259rm -f conftest.$ac_objext
1096bcc0 4260if { (eval echo "$as_me:4260: \"$ac_compile\"") >&5
503d2be0
AS
4261 (eval $ac_compile) 2>&5
4262 ac_status=$?
1096bcc0 4263 echo "$as_me:4263: \$? = $ac_status" >&5
503d2be0
AS
4264 (exit $ac_status); } &&
4265 { ac_try='test -s conftest.$ac_objext'
1096bcc0 4266 { (eval echo "$as_me:4266: \"$ac_try\"") >&5
503d2be0
AS
4267 (eval $ac_try) 2>&5
4268 ac_status=$?
1096bcc0 4269 echo "$as_me:4269: \$? = $ac_status" >&5
503d2be0 4270 (exit $ac_status); }; }; then
f4988be7
GM
4271 ac_cv_header_sys_wait_h=yes
4272else
503d2be0
AS
4273 echo "$as_me: failed program was:" >&5
4274cat conftest.$ac_ext >&5
4275ac_cv_header_sys_wait_h=no
f4988be7 4276fi
503d2be0 4277rm -f conftest.$ac_objext conftest.$ac_ext
f4988be7 4278fi
1096bcc0 4279echo "$as_me:4279: result: $ac_cv_header_sys_wait_h" >&5
503d2be0 4280echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
f4988be7 4281if test $ac_cv_header_sys_wait_h = yes; then
503d2be0
AS
4282
4283cat >>confdefs.h <<\EOF
f4988be7
GM
4284#define HAVE_SYS_WAIT_H 1
4285EOF
4286
4287fi
4288
1096bcc0 4289echo "$as_me:4289: checking for struct utimbuf" >&5
503d2be0
AS
4290echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
4291if test "${emacs_cv_struct_utimbuf+set}" = set; then
4292 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4293else
503d2be0 4294 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 4295#line 4295 "configure"
f4988be7
GM
4296#include "confdefs.h"
4297#ifdef TIME_WITH_SYS_TIME
4298#include <sys/time.h>
4299#include <time.h>
4300#else
4301#ifdef HAVE_SYS_TIME_H
4302#include <sys/time.h>
4303#else
4304#include <time.h>
4305#endif
4306#endif
4307#ifdef HAVE_UTIME_H
4308#include <utime.h>
4309#endif
503d2be0
AS
4310int
4311main ()
4312{
f4988be7 4313static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
4314 ;
4315 return 0;
4316}
4317_ACEOF
4318rm -f conftest.$ac_objext
1096bcc0 4319if { (eval echo "$as_me:4319: \"$ac_compile\"") >&5
503d2be0
AS
4320 (eval $ac_compile) 2>&5
4321 ac_status=$?
1096bcc0 4322 echo "$as_me:4322: \$? = $ac_status" >&5
503d2be0
AS
4323 (exit $ac_status); } &&
4324 { ac_try='test -s conftest.$ac_objext'
1096bcc0 4325 { (eval echo "$as_me:4325: \"$ac_try\"") >&5
503d2be0
AS
4326 (eval $ac_try) 2>&5
4327 ac_status=$?
1096bcc0 4328 echo "$as_me:4328: \$? = $ac_status" >&5
503d2be0 4329 (exit $ac_status); }; }; then
f4988be7
GM
4330 emacs_cv_struct_utimbuf=yes
4331else
503d2be0
AS
4332 echo "$as_me: failed program was:" >&5
4333cat conftest.$ac_ext >&5
4334emacs_cv_struct_utimbuf=no
f4988be7 4335fi
503d2be0 4336rm -f conftest.$ac_objext conftest.$ac_ext
f4988be7 4337fi
1096bcc0 4338echo "$as_me:4338: result: $emacs_cv_struct_utimbuf" >&5
503d2be0 4339echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6
f4988be7 4340if test $emacs_cv_struct_utimbuf = yes; then
503d2be0 4341 cat >>confdefs.h <<\EOF
f4988be7
GM
4342#define HAVE_STRUCT_UTIMBUF 1
4343EOF
4344
4345fi
4346
1096bcc0 4347echo "$as_me:4347: checking return type of signal handlers" >&5
503d2be0
AS
4348echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4349if test "${ac_cv_type_signal+set}" = set; then
4350 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4351else
503d2be0 4352 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 4353#line 4353 "configure"
f4988be7
GM
4354#include "confdefs.h"
4355#include <sys/types.h>
4356#include <signal.h>
4357#ifdef signal
503d2be0 4358# undef signal
f4988be7
GM
4359#endif
4360#ifdef __cplusplus
4361extern "C" void (*signal (int, void (*)(int)))(int);
4362#else
4363void (*signal ()) ();
4364#endif
4365
503d2be0
AS
4366int
4367main ()
4368{
f4988be7 4369int i;
503d2be0
AS
4370 ;
4371 return 0;
4372}
4373_ACEOF
4374rm -f conftest.$ac_objext
1096bcc0 4375if { (eval echo "$as_me:4375: \"$ac_compile\"") >&5
503d2be0
AS
4376 (eval $ac_compile) 2>&5
4377 ac_status=$?
1096bcc0 4378 echo "$as_me:4378: \$? = $ac_status" >&5
503d2be0
AS
4379 (exit $ac_status); } &&
4380 { ac_try='test -s conftest.$ac_objext'
1096bcc0 4381 { (eval echo "$as_me:4381: \"$ac_try\"") >&5
503d2be0
AS
4382 (eval $ac_try) 2>&5
4383 ac_status=$?
1096bcc0 4384 echo "$as_me:4384: \$? = $ac_status" >&5
503d2be0 4385 (exit $ac_status); }; }; then
f4988be7
GM
4386 ac_cv_type_signal=void
4387else
503d2be0
AS
4388 echo "$as_me: failed program was:" >&5
4389cat conftest.$ac_ext >&5
4390ac_cv_type_signal=int
f4988be7 4391fi
503d2be0 4392rm -f conftest.$ac_objext conftest.$ac_ext
f4988be7 4393fi
1096bcc0 4394echo "$as_me:4394: result: $ac_cv_type_signal" >&5
503d2be0 4395echo "${ECHO_T}$ac_cv_type_signal" >&6
f4988be7 4396
503d2be0 4397cat >>confdefs.h <<EOF
f4988be7 4398#define RETSIGTYPE $ac_cv_type_signal
ba4481b5
DL
4399EOF
4400
1096bcc0 4401echo "$as_me:4401: checking for speed_t" >&5
503d2be0
AS
4402echo $ECHO_N "checking for speed_t... $ECHO_C" >&6
4403if test "${emacs_cv_speed_t+set}" = set; then
4404 echo $ECHO_N "(cached) $ECHO_C" >&6
34ec9ebe 4405else
503d2be0 4406 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 4407#line 4407 "configure"
34ec9ebe
GM
4408#include "confdefs.h"
4409#include <termios.h>
503d2be0
AS
4410int
4411main ()
4412{
34ec9ebe 4413speed_t x = 1;
503d2be0
AS
4414 ;
4415 return 0;
4416}
4417_ACEOF
4418rm -f conftest.$ac_objext
1096bcc0 4419if { (eval echo "$as_me:4419: \"$ac_compile\"") >&5
503d2be0
AS
4420 (eval $ac_compile) 2>&5
4421 ac_status=$?
1096bcc0 4422 echo "$as_me:4422: \$? = $ac_status" >&5
503d2be0
AS
4423 (exit $ac_status); } &&
4424 { ac_try='test -s conftest.$ac_objext'
1096bcc0 4425 { (eval echo "$as_me:4425: \"$ac_try\"") >&5
503d2be0
AS
4426 (eval $ac_try) 2>&5
4427 ac_status=$?
1096bcc0 4428 echo "$as_me:4428: \$? = $ac_status" >&5
503d2be0 4429 (exit $ac_status); }; }; then
34ec9ebe
GM
4430 emacs_cv_speed_t=yes
4431else
503d2be0
AS
4432 echo "$as_me: failed program was:" >&5
4433cat conftest.$ac_ext >&5
4434emacs_cv_speed_t=no
34ec9ebe 4435fi
503d2be0 4436rm -f conftest.$ac_objext conftest.$ac_ext
34ec9ebe 4437fi
1096bcc0 4438echo "$as_me:4438: result: $emacs_cv_speed_t" >&5
503d2be0 4439echo "${ECHO_T}$emacs_cv_speed_t" >&6
34ec9ebe 4440if test $emacs_cv_speed_t = yes; then
503d2be0 4441 cat >>confdefs.h <<\EOF
34ec9ebe
GM
4442#define HAVE_SPEED_T 1
4443EOF
4444
4445fi
4446
1096bcc0 4447echo "$as_me:4447: checking for struct timeval" >&5
503d2be0
AS
4448echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
4449if test "${emacs_cv_struct_timeval+set}" = set; then
4450 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4451else
503d2be0 4452 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 4453#line 4453 "configure"
ba4481b5
DL
4454#include "confdefs.h"
4455#ifdef TIME_WITH_SYS_TIME
4456#include <sys/time.h>
4457#include <time.h>
4458#else
4459#ifdef HAVE_SYS_TIME_H
4460#include <sys/time.h>
4461#else
4462#include <time.h>
4463#endif
4464#endif
503d2be0
AS
4465int
4466main ()
4467{
ba4481b5 4468static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
4469 ;
4470 return 0;
4471}
4472_ACEOF
4473rm -f conftest.$ac_objext
1096bcc0 4474if { (eval echo "$as_me:4474: \"$ac_compile\"") >&5
503d2be0
AS
4475 (eval $ac_compile) 2>&5
4476 ac_status=$?
1096bcc0 4477 echo "$as_me:4477: \$? = $ac_status" >&5
503d2be0
AS
4478 (exit $ac_status); } &&
4479 { ac_try='test -s conftest.$ac_objext'
1096bcc0 4480 { (eval echo "$as_me:4480: \"$ac_try\"") >&5
503d2be0
AS
4481 (eval $ac_try) 2>&5
4482 ac_status=$?
1096bcc0 4483 echo "$as_me:4483: \$? = $ac_status" >&5
503d2be0 4484 (exit $ac_status); }; }; then
ba4481b5
DL
4485 emacs_cv_struct_timeval=yes
4486else
503d2be0
AS
4487 echo "$as_me: failed program was:" >&5
4488cat conftest.$ac_ext >&5
4489emacs_cv_struct_timeval=no
ba4481b5 4490fi
503d2be0 4491rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 4492fi
1096bcc0 4493echo "$as_me:4493: result: $emacs_cv_struct_timeval" >&5
503d2be0 4494echo "${ECHO_T}$emacs_cv_struct_timeval" >&6
ba4481b5
DL
4495HAVE_TIMEVAL=$emacs_cv_struct_timeval
4496if test $emacs_cv_struct_timeval = yes; then
503d2be0 4497 cat >>confdefs.h <<\EOF
ba4481b5
DL
4498#define HAVE_TIMEVAL 1
4499EOF
4500
4501fi
4502
1096bcc0 4503echo "$as_me:4503: checking for struct exception" >&5
503d2be0
AS
4504echo $ECHO_N "checking for struct exception... $ECHO_C" >&6
4505if test "${emacs_cv_struct_exception+set}" = set; then
4506 echo $ECHO_N "(cached) $ECHO_C" >&6
d42122a3 4507else
503d2be0 4508 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 4509#line 4509 "configure"
d42122a3
DL
4510#include "confdefs.h"
4511#include <math.h>
503d2be0
AS
4512int
4513main ()
4514{
d42122a3 4515static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
4516 ;
4517 return 0;
4518}
4519_ACEOF
4520rm -f conftest.$ac_objext
1096bcc0 4521if { (eval echo "$as_me:4521: \"$ac_compile\"") >&5
503d2be0
AS
4522 (eval $ac_compile) 2>&5
4523 ac_status=$?
1096bcc0 4524 echo "$as_me:4524: \$? = $ac_status" >&5
503d2be0
AS
4525 (exit $ac_status); } &&
4526 { ac_try='test -s conftest.$ac_objext'
1096bcc0 4527 { (eval echo "$as_me:4527: \"$ac_try\"") >&5
503d2be0
AS
4528 (eval $ac_try) 2>&5
4529 ac_status=$?
1096bcc0 4530 echo "$as_me:4530: \$? = $ac_status" >&5
503d2be0 4531 (exit $ac_status); }; }; then
d42122a3
DL
4532 emacs_cv_struct_exception=yes
4533else
503d2be0
AS
4534 echo "$as_me: failed program was:" >&5
4535cat conftest.$ac_ext >&5
4536emacs_cv_struct_exception=no
d42122a3 4537fi
503d2be0 4538rm -f conftest.$ac_objext conftest.$ac_ext
d42122a3 4539fi
1096bcc0 4540echo "$as_me:4540: result: $emacs_cv_struct_exception" >&5
503d2be0 4541echo "${ECHO_T}$emacs_cv_struct_exception" >&6
d42122a3
DL
4542HAVE_EXCEPTION=$emacs_cv_struct_exception
4543if test $emacs_cv_struct_exception != yes; then
503d2be0 4544 cat >>confdefs.h <<\EOF
d42122a3
DL
4545#define NO_MATHERR 1
4546EOF
4547
4548fi
4549
1096bcc0 4550echo "$as_me:4550: checking whether struct tm is in sys/time.h or time.h" >&5
503d2be0
AS
4551echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
4552if test "${ac_cv_struct_tm+set}" = set; then
4553 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4554else
503d2be0 4555 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 4556#line 4556 "configure"
ba4481b5
DL
4557#include "confdefs.h"
4558#include <sys/types.h>
4559#include <time.h>
503d2be0
AS
4560
4561int
4562main ()
4563{
ba4481b5 4564struct tm *tp; tp->tm_sec;
503d2be0
AS
4565 ;
4566 return 0;
4567}
4568_ACEOF
4569rm -f conftest.$ac_objext
1096bcc0 4570if { (eval echo "$as_me:4570: \"$ac_compile\"") >&5
503d2be0
AS
4571 (eval $ac_compile) 2>&5
4572 ac_status=$?
1096bcc0 4573 echo "$as_me:4573: \$? = $ac_status" >&5
503d2be0
AS
4574 (exit $ac_status); } &&
4575 { ac_try='test -s conftest.$ac_objext'
1096bcc0 4576 { (eval echo "$as_me:4576: \"$ac_try\"") >&5
503d2be0
AS
4577 (eval $ac_try) 2>&5
4578 ac_status=$?
1096bcc0 4579 echo "$as_me:4579: \$? = $ac_status" >&5
503d2be0 4580 (exit $ac_status); }; }; then
ba4481b5
DL
4581 ac_cv_struct_tm=time.h
4582else
503d2be0
AS
4583 echo "$as_me: failed program was:" >&5
4584cat conftest.$ac_ext >&5
4585ac_cv_struct_tm=sys/time.h
ba4481b5 4586fi
503d2be0 4587rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 4588fi
1096bcc0 4589echo "$as_me:4589: result: $ac_cv_struct_tm" >&5
503d2be0 4590echo "${ECHO_T}$ac_cv_struct_tm" >&6
ba4481b5 4591if test $ac_cv_struct_tm = sys/time.h; then
503d2be0
AS
4592
4593cat >>confdefs.h <<\EOF
ba4481b5
DL
4594#define TM_IN_SYS_TIME 1
4595EOF
4596
4597fi
4598
1096bcc0 4599echo "$as_me:4599: checking for struct tm.tm_zone" >&5
503d2be0
AS
4600echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
4601if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
4602 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4603else
503d2be0 4604 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 4605#line 4605 "configure"
ba4481b5
DL
4606#include "confdefs.h"
4607#include <sys/types.h>
4608#include <$ac_cv_struct_tm>
503d2be0
AS
4609
4610int
4611main ()
4612{
4613static struct tm ac_aggr;
4614if (ac_aggr.tm_zone)
4615return 0;
4616 ;
4617 return 0;
4618}
4619_ACEOF
4620rm -f conftest.$ac_objext
1096bcc0 4621if { (eval echo "$as_me:4621: \"$ac_compile\"") >&5
503d2be0
AS
4622 (eval $ac_compile) 2>&5
4623 ac_status=$?
1096bcc0 4624 echo "$as_me:4624: \$? = $ac_status" >&5
503d2be0
AS
4625 (exit $ac_status); } &&
4626 { ac_try='test -s conftest.$ac_objext'
1096bcc0 4627 { (eval echo "$as_me:4627: \"$ac_try\"") >&5
503d2be0
AS
4628 (eval $ac_try) 2>&5
4629 ac_status=$?
1096bcc0 4630 echo "$as_me:4630: \$? = $ac_status" >&5
503d2be0
AS
4631 (exit $ac_status); }; }; then
4632 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 4633else
503d2be0
AS
4634 echo "$as_me: failed program was:" >&5
4635cat conftest.$ac_ext >&5
4636ac_cv_member_struct_tm_tm_zone=no
ba4481b5 4637fi
503d2be0
AS
4638rm -f conftest.$ac_objext conftest.$ac_ext
4639fi
1096bcc0 4640echo "$as_me:4640: result: $ac_cv_member_struct_tm_tm_zone" >&5
503d2be0
AS
4641echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
4642if test $ac_cv_member_struct_tm_tm_zone = yes; then
4643
4644cat >>confdefs.h <<EOF
4645#define HAVE_STRUCT_TM_TM_ZONE 1
4646EOF
4647
ba4481b5
DL
4648fi
4649
503d2be0
AS
4650if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
4651
4652cat >>confdefs.h <<\EOF
ba4481b5
DL
4653#define HAVE_TM_ZONE 1
4654EOF
4655
4656else
1096bcc0 4657 echo "$as_me:4657: checking for tzname" >&5
503d2be0
AS
4658echo $ECHO_N "checking for tzname... $ECHO_C" >&6
4659if test "${ac_cv_var_tzname+set}" = set; then
4660 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4661else
503d2be0 4662 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 4663#line 4663 "configure"
ba4481b5
DL
4664#include "confdefs.h"
4665#include <time.h>
4666#ifndef tzname /* For SGI. */
4667extern char *tzname[]; /* RS6000 and others reject char **tzname. */
4668#endif
503d2be0
AS
4669
4670int
4671main ()
4672{
ba4481b5 4673atoi(*tzname);
503d2be0
AS
4674 ;
4675 return 0;
4676}
4677_ACEOF
4678rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 4679if { (eval echo "$as_me:4679: \"$ac_link\"") >&5
503d2be0
AS
4680 (eval $ac_link) 2>&5
4681 ac_status=$?
1096bcc0 4682 echo "$as_me:4682: \$? = $ac_status" >&5
503d2be0
AS
4683 (exit $ac_status); } &&
4684 { ac_try='test -s conftest$ac_exeext'
1096bcc0 4685 { (eval echo "$as_me:4685: \"$ac_try\"") >&5
503d2be0
AS
4686 (eval $ac_try) 2>&5
4687 ac_status=$?
1096bcc0 4688 echo "$as_me:4688: \$? = $ac_status" >&5
503d2be0 4689 (exit $ac_status); }; }; then
ba4481b5
DL
4690 ac_cv_var_tzname=yes
4691else
503d2be0
AS
4692 echo "$as_me: failed program was:" >&5
4693cat conftest.$ac_ext >&5
4694ac_cv_var_tzname=no
ba4481b5 4695fi
503d2be0 4696rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 4697fi
1096bcc0 4698echo "$as_me:4698: result: $ac_cv_var_tzname" >&5
503d2be0 4699echo "${ECHO_T}$ac_cv_var_tzname" >&6
ba4481b5 4700 if test $ac_cv_var_tzname = yes; then
503d2be0
AS
4701
4702cat >>confdefs.h <<\EOF
ba4481b5
DL
4703#define HAVE_TZNAME 1
4704EOF
4705
4706 fi
4707fi
4708
1096bcc0 4709echo "$as_me:4709: checking for tm_gmtoff in struct tm" >&5
503d2be0
AS
4710echo $ECHO_N "checking for tm_gmtoff in struct tm... $ECHO_C" >&6
4711if test "${emacs_cv_tm_gmtoff+set}" = set; then
4712 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 4713else
503d2be0 4714 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 4715#line 4715 "configure"
1113b624
PE
4716#include "confdefs.h"
4717#include <time.h>
503d2be0
AS
4718int
4719main ()
4720{
1113b624 4721struct tm t; t.tm_gmtoff = 0
503d2be0
AS
4722 ;
4723 return 0;
4724}
4725_ACEOF
4726rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 4727if { (eval echo "$as_me:4727: \"$ac_link\"") >&5
503d2be0
AS
4728 (eval $ac_link) 2>&5
4729 ac_status=$?
1096bcc0 4730 echo "$as_me:4730: \$? = $ac_status" >&5
503d2be0
AS
4731 (exit $ac_status); } &&
4732 { ac_try='test -s conftest$ac_exeext'
1096bcc0 4733 { (eval echo "$as_me:4733: \"$ac_try\"") >&5
503d2be0
AS
4734 (eval $ac_try) 2>&5
4735 ac_status=$?
1096bcc0 4736 echo "$as_me:4736: \$? = $ac_status" >&5
503d2be0 4737 (exit $ac_status); }; }; then
1113b624
PE
4738 emacs_cv_tm_gmtoff=yes
4739else
503d2be0
AS
4740 echo "$as_me: failed program was:" >&5
4741cat conftest.$ac_ext >&5
4742emacs_cv_tm_gmtoff=no
1113b624 4743fi
503d2be0 4744rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1113b624 4745fi
1096bcc0 4746echo "$as_me:4746: result: $emacs_cv_tm_gmtoff" >&5
503d2be0 4747echo "${ECHO_T}$emacs_cv_tm_gmtoff" >&6
1113b624 4748if test $emacs_cv_tm_gmtoff = yes; then
503d2be0 4749 cat >>confdefs.h <<\EOF
1113b624
PE
4750#define HAVE_TM_GMTOFF 1
4751EOF
4752
4753fi
ba4481b5 4754
1096bcc0 4755echo "$as_me:4755: checking for $CC option to accept ANSI C" >&5
503d2be0
AS
4756echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
4757if test "${ac_cv_prog_cc_stdc+set}" = set; then
4758 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
4759else
4760 ac_cv_prog_cc_stdc=no
503d2be0
AS
4761ac_save_CC=$CC
4762cat >conftest.$ac_ext <<_ACEOF
1096bcc0 4763#line 4763 "configure"
7397acc4
DL
4764#include "confdefs.h"
4765#include <stdarg.h>
4766#include <stdio.h>
4767#include <sys/types.h>
4768#include <sys/stat.h>
4769/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4770struct buf { int x; };
4771FILE * (*rcsopen) (struct buf *, struct stat *, int);
4772static char *e (p, i)
4773 char **p;
4774 int i;
4775{
4776 return p[i];
4777}
4778static char *f (char * (*g) (char **, int), char **p, ...)
4779{
4780 char *s;
4781 va_list v;
4782 va_start (v,p);
4783 s = g (p, va_arg (v,int));
4784 va_end (v);
4785 return s;
4786}
4787int test (int i, double x);
4788struct s1 {int (*f) (int a);};
4789struct s2 {int (*f) (double a);};
4790int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4791int argc;
4792char **argv;
503d2be0
AS
4793int
4794main ()
4795{
7397acc4 4796return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
503d2be0
AS
4797 ;
4798 return 0;
4799}
4800_ACEOF
4801# Don't try gcc -ansi; that turns off useful extensions and
4802# breaks some systems' header files.
4803# AIX -qlanglvl=ansi
4804# Ultrix and OSF/1 -std1
4805# HP-UX 10.20 and later -Ae
4806# HP-UX older versions -Aa -D_HPUX_SOURCE
4807# SVR4 -Xc -D__EXTENSIONS__
4808for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4809do
4810 CC="$ac_save_CC $ac_arg"
4811 rm -f conftest.$ac_objext
1096bcc0 4812if { (eval echo "$as_me:4812: \"$ac_compile\"") >&5
503d2be0
AS
4813 (eval $ac_compile) 2>&5
4814 ac_status=$?
1096bcc0 4815 echo "$as_me:4815: \$? = $ac_status" >&5
503d2be0
AS
4816 (exit $ac_status); } &&
4817 { ac_try='test -s conftest.$ac_objext'
1096bcc0 4818 { (eval echo "$as_me:4818: \"$ac_try\"") >&5
503d2be0
AS
4819 (eval $ac_try) 2>&5
4820 ac_status=$?
1096bcc0 4821 echo "$as_me:4821: \$? = $ac_status" >&5
503d2be0
AS
4822 (exit $ac_status); }; }; then
4823 ac_cv_prog_cc_stdc=$ac_arg
4824break
4825else
4826 echo "$as_me: failed program was:" >&5
4827cat conftest.$ac_ext >&5
4828fi
4829rm -f conftest.$ac_objext
7397acc4 4830done
503d2be0
AS
4831rm -f conftest.$ac_ext conftest.$ac_objext
4832CC=$ac_save_CC
7397acc4
DL
4833
4834fi
4835
4836case "x$ac_cv_prog_cc_stdc" in
4837 x|xno)
1096bcc0 4838 echo "$as_me:4838: result: none needed" >&5
503d2be0 4839echo "${ECHO_T}none needed" >&6 ;;
7397acc4 4840 *)
1096bcc0 4841 echo "$as_me:4841: result: $ac_cv_prog_cc_stdc" >&5
503d2be0 4842echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
7397acc4
DL
4843 CC="$CC $ac_cv_prog_cc_stdc" ;;
4844esac
4845
1096bcc0 4846echo "$as_me:4846: checking for function prototypes" >&5
503d2be0 4847echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
7397acc4 4848if test "$ac_cv_prog_cc_stdc" != no; then
1096bcc0 4849 echo "$as_me:4849: result: yes" >&5
503d2be0
AS
4850echo "${ECHO_T}yes" >&6
4851
4852cat >>confdefs.h <<\EOF
7397acc4
DL
4853#define PROTOTYPES 1
4854EOF
4855
4856else
1096bcc0 4857 echo "$as_me:4857: result: no" >&5
503d2be0 4858echo "${ECHO_T}no" >&6
7397acc4
DL
4859fi
4860
1096bcc0 4861echo "$as_me:4861: checking for working volatile" >&5
503d2be0
AS
4862echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
4863if test "${ac_cv_c_volatile+set}" = set; then
4864 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 4865else
503d2be0 4866 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 4867#line 4867 "configure"
7397acc4
DL
4868#include "confdefs.h"
4869
503d2be0
AS
4870int
4871main ()
4872{
7397acc4
DL
4873
4874volatile int x;
4875int * volatile y;
503d2be0
AS
4876 ;
4877 return 0;
4878}
4879_ACEOF
4880rm -f conftest.$ac_objext
1096bcc0 4881if { (eval echo "$as_me:4881: \"$ac_compile\"") >&5
503d2be0
AS
4882 (eval $ac_compile) 2>&5
4883 ac_status=$?
1096bcc0 4884 echo "$as_me:4884: \$? = $ac_status" >&5
503d2be0
AS
4885 (exit $ac_status); } &&
4886 { ac_try='test -s conftest.$ac_objext'
1096bcc0 4887 { (eval echo "$as_me:4887: \"$ac_try\"") >&5
503d2be0
AS
4888 (eval $ac_try) 2>&5
4889 ac_status=$?
1096bcc0 4890 echo "$as_me:4890: \$? = $ac_status" >&5
503d2be0 4891 (exit $ac_status); }; }; then
7397acc4
DL
4892 ac_cv_c_volatile=yes
4893else
503d2be0
AS
4894 echo "$as_me: failed program was:" >&5
4895cat conftest.$ac_ext >&5
4896ac_cv_c_volatile=no
7397acc4 4897fi
503d2be0 4898rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 4899fi
1096bcc0 4900echo "$as_me:4900: result: $ac_cv_c_volatile" >&5
503d2be0 4901echo "${ECHO_T}$ac_cv_c_volatile" >&6
7397acc4 4902if test $ac_cv_c_volatile = no; then
503d2be0
AS
4903
4904cat >>confdefs.h <<\EOF
4905#define volatile
7397acc4
DL
4906EOF
4907
4908fi
4909
1096bcc0 4910echo "$as_me:4910: checking for an ANSI C-conforming const" >&5
503d2be0
AS
4911echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
4912if test "${ac_cv_c_const+set}" = set; then
4913 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4914else
503d2be0 4915 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 4916#line 4916 "configure"
ba4481b5
DL
4917#include "confdefs.h"
4918
503d2be0
AS
4919int
4920main ()
4921{
4922/* FIXME: Include the comments suggested by Paul. */
4923#ifndef __cplusplus
4924 /* Ultrix mips cc rejects this. */
4925 typedef int charset[2];
4926 const charset x;
4927 /* SunOS 4.1.1 cc rejects this. */
4928 char const *const *ccp;
4929 char **p;
4930 /* NEC SVR4.0.2 mips cc rejects this. */
4931 struct point {int x, y;};
4932 static struct point const zero = {0,0};
4933 /* AIX XL C 1.02.0.0 rejects this.
4934 It does not let you subtract one const X* pointer from another in
4935 an arm of an if-expression whose if-part is not a constant
4936 expression */
4937 const char *g = "string";
4938 ccp = &g + (g ? g-g : 0);
4939 /* HPUX 7.0 cc rejects these. */
4940 ++ccp;
4941 p = (char**) ccp;
4942 ccp = (char const *const *) p;
4943 { /* SCO 3.2v4 cc rejects this. */
4944 char *t;
4945 char const *s = 0 ? (char *) 0 : (char const *) 0;
4946
4947 *t++ = 0;
4948 }
4949 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
4950 int x[] = {25, 17};
4951 const int *foo = &x[0];
4952 ++foo;
4953 }
4954 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4955 typedef const int *iptr;
4956 iptr p = 0;
4957 ++p;
4958 }
4959 { /* AIX XL C 1.02.0.0 rejects this saying
4960 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4961 struct s { int j; const int *ap[3]; };
4962 struct s *b; b->j = 5;
4963 }
4964 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4965 const int foo = 10;
4966 }
4967#endif
ba4481b5 4968
503d2be0
AS
4969 ;
4970 return 0;
ba4481b5 4971}
503d2be0
AS
4972_ACEOF
4973rm -f conftest.$ac_objext
1096bcc0 4974if { (eval echo "$as_me:4974: \"$ac_compile\"") >&5
503d2be0
AS
4975 (eval $ac_compile) 2>&5
4976 ac_status=$?
1096bcc0 4977 echo "$as_me:4977: \$? = $ac_status" >&5
503d2be0
AS
4978 (exit $ac_status); } &&
4979 { ac_try='test -s conftest.$ac_objext'
1096bcc0 4980 { (eval echo "$as_me:4980: \"$ac_try\"") >&5
503d2be0
AS
4981 (eval $ac_try) 2>&5
4982 ac_status=$?
1096bcc0 4983 echo "$as_me:4983: \$? = $ac_status" >&5
503d2be0 4984 (exit $ac_status); }; }; then
ba4481b5
DL
4985 ac_cv_c_const=yes
4986else
503d2be0
AS
4987 echo "$as_me: failed program was:" >&5
4988cat conftest.$ac_ext >&5
4989ac_cv_c_const=no
ba4481b5 4990fi
503d2be0 4991rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 4992fi
1096bcc0 4993echo "$as_me:4993: result: $ac_cv_c_const" >&5
503d2be0 4994echo "${ECHO_T}$ac_cv_c_const" >&6
ba4481b5 4995if test $ac_cv_c_const = no; then
503d2be0
AS
4996
4997cat >>confdefs.h <<\EOF
4998#define const
ba4481b5
DL
4999EOF
5000
5001fi
5002
1096bcc0 5003echo "$as_me:5003: checking for void * support" >&5
503d2be0
AS
5004echo $ECHO_N "checking for void * support... $ECHO_C" >&6
5005if test "${emacs_cv_void_star+set}" = set; then
5006 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 5007else
503d2be0 5008 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 5009#line 5009 "configure"
7397acc4
DL
5010#include "confdefs.h"
5011
503d2be0
AS
5012int
5013main ()
5014{
7397acc4 5015void * foo;
503d2be0
AS
5016 ;
5017 return 0;
5018}
5019_ACEOF
5020rm -f conftest.$ac_objext
1096bcc0 5021if { (eval echo "$as_me:5021: \"$ac_compile\"") >&5
503d2be0
AS
5022 (eval $ac_compile) 2>&5
5023 ac_status=$?
1096bcc0 5024 echo "$as_me:5024: \$? = $ac_status" >&5
503d2be0
AS
5025 (exit $ac_status); } &&
5026 { ac_try='test -s conftest.$ac_objext'
1096bcc0 5027 { (eval echo "$as_me:5027: \"$ac_try\"") >&5
503d2be0
AS
5028 (eval $ac_try) 2>&5
5029 ac_status=$?
1096bcc0 5030 echo "$as_me:5030: \$? = $ac_status" >&5
503d2be0 5031 (exit $ac_status); }; }; then
7397acc4
DL
5032 emacs_cv_void_star=yes
5033else
503d2be0
AS
5034 echo "$as_me: failed program was:" >&5
5035cat conftest.$ac_ext >&5
5036emacs_cv_void_star=no
7397acc4 5037fi
503d2be0 5038rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 5039fi
1096bcc0 5040echo "$as_me:5040: result: $emacs_cv_void_star" >&5
503d2be0 5041echo "${ECHO_T}$emacs_cv_void_star" >&6
7397acc4 5042if test $emacs_cv_void_star = yes; then
503d2be0 5043 cat >>confdefs.h <<\EOF
7397acc4
DL
5044#define POINTER_TYPE void
5045EOF
5046
5047else
503d2be0 5048 cat >>confdefs.h <<\EOF
7397acc4
DL
5049#define POINTER_TYPE char
5050EOF
5051
5052fi
ba4481b5 5053
1096bcc0 5054echo "$as_me:5054: checking whether ${MAKE-make} sets \${MAKE}" >&5
503d2be0
AS
5055echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
5056set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
5057if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
5058 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5059else
503d2be0 5060 cat >conftest.make <<\EOF
ba4481b5
DL
5061all:
5062 @echo 'ac_maketemp="${MAKE}"'
5063EOF
5064# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
503d2be0 5065eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
ba4481b5
DL
5066if test -n "$ac_maketemp"; then
5067 eval ac_cv_prog_make_${ac_make}_set=yes
5068else
5069 eval ac_cv_prog_make_${ac_make}_set=no
5070fi
503d2be0 5071rm -f conftest.make
ba4481b5
DL
5072fi
5073if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1096bcc0 5074 echo "$as_me:5074: result: yes" >&5
503d2be0 5075echo "${ECHO_T}yes" >&6
ba4481b5
DL
5076 SET_MAKE=
5077else
1096bcc0 5078 echo "$as_me:5078: result: no" >&5
503d2be0 5079echo "${ECHO_T}no" >&6
ba4481b5
DL
5080 SET_MAKE="MAKE=${MAKE-make}"
5081fi
5082
1096bcc0 5083echo "$as_me:5083: checking for long file names" >&5
503d2be0
AS
5084echo $ECHO_N "checking for long file names... $ECHO_C" >&6
5085if test "${ac_cv_sys_long_file_names+set}" = set; then
5086 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
5087else
5088 ac_cv_sys_long_file_names=yes
5089# Test for long file names in all the places we know might matter:
5090# . the current directory, where building will happen
5091# $prefix/lib where we will be installing things
5092# $exec_prefix/lib likewise
5093# eval it to expand exec_prefix.
5094# $TMPDIR if set, where it might want to write temporary files
5095# if $TMPDIR is not set:
5096# /tmp where it might want to write temporary files
5097# /var/tmp likewise
5098# /usr/tmp likewise
5099if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
503d2be0 5100 ac_tmpdirs=$TMPDIR
ba4481b5
DL
5101else
5102 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
5103fi
5104for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
5105 test -d $ac_dir || continue
5106 test -w $ac_dir || continue # It is less confusing to not echo anything here.
503d2be0
AS
5107 ac_xdir=$ac_dir/cf$$
5108 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
5109 ac_tf1=$ac_xdir/conftest9012345
5110 ac_tf2=$ac_xdir/conftest9012346
5111 (echo 1 >$ac_tf1) 2>/dev/null
5112 (echo 2 >$ac_tf2) 2>/dev/null
5113 ac_val=`cat $ac_tf1 2>/dev/null`
5114 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
ba4481b5 5115 ac_cv_sys_long_file_names=no
503d2be0 5116 rm -rf $ac_xdir 2>/dev/null
ba4481b5
DL
5117 break
5118 fi
503d2be0 5119 rm -rf $ac_xdir 2>/dev/null
ba4481b5
DL
5120done
5121fi
1096bcc0 5122echo "$as_me:5122: result: $ac_cv_sys_long_file_names" >&5
503d2be0 5123echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
ba4481b5 5124if test $ac_cv_sys_long_file_names = yes; then
503d2be0
AS
5125
5126cat >>confdefs.h <<\EOF
ba4481b5
DL
5127#define HAVE_LONG_FILE_NAMES 1
5128EOF
5129
5130fi
5131
ba4481b5
DL
5132#### Choose a window system.
5133
1096bcc0 5134echo "$as_me:5134: checking for X" >&5
503d2be0 5135echo $ECHO_N "checking for X... $ECHO_C" >&6
ba4481b5
DL
5136
5137# Check whether --with-x or --without-x was given.
5138if test "${with_x+set}" = set; then
5139 withval="$with_x"
ba4481b5 5140
503d2be0 5141fi;
ba4481b5
DL
5142# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5143if test "x$with_x" = xno; then
5144 # The user explicitly disabled X.
5145 have_x=disabled
5146else
5147 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5148 # Both variables are already set.
5149 have_x=yes
5150 else
503d2be0
AS
5151 if test "${ac_cv_have_x+set}" = set; then
5152 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
5153else
5154 # One or both of the vars are not set, and there is no cached value.
503d2be0
AS
5155ac_x_includes=no ac_x_libraries=no
5156rm -fr conftest.dir
5157if mkdir conftest.dir; then
5158 cd conftest.dir
ba4481b5 5159 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
503d2be0 5160 cat >Imakefile <<'EOF'
ba4481b5
DL
5161acfindx:
5162 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5163EOF
5164 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5165 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5166 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5167 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5168 for ac_extension in a so sl; do
5169 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
503d2be0 5170 test -f $ac_im_libdir/libX11.$ac_extension; then
ba4481b5
DL
5171 ac_im_usrlibdir=$ac_im_libdir; break
5172 fi
5173 done
5174 # Screen out bogus values from the imake configuration. They are
5175 # bogus both because they are the default anyway, and because
5176 # using them would break gcc on systems where it needs fixed includes.
503d2be0 5177 case $ac_im_incroot in
ba4481b5 5178 /usr/include) ;;
503d2be0 5179 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
ba4481b5 5180 esac
503d2be0 5181 case $ac_im_usrlibdir in
ba4481b5 5182 /usr/lib | /lib) ;;
503d2be0 5183 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
ba4481b5
DL
5184 esac
5185 fi
5186 cd ..
503d2be0 5187 rm -fr conftest.dir
ba4481b5
DL
5188fi
5189
503d2be0
AS
5190# Standard set of common directories for X headers.
5191# Check X11 before X11Rn because it is often a symlink to the current release.
5192ac_x_header_dirs='
5193/usr/X11/include
5194/usr/X11R6/include
5195/usr/X11R5/include
5196/usr/X11R4/include
5197
5198/usr/include/X11
5199/usr/include/X11R6
5200/usr/include/X11R5
5201/usr/include/X11R4
5202
5203/usr/local/X11/include
5204/usr/local/X11R6/include
5205/usr/local/X11R5/include
5206/usr/local/X11R4/include
5207
5208/usr/local/include/X11
5209/usr/local/include/X11R6
5210/usr/local/include/X11R5
5211/usr/local/include/X11R4
5212
5213/usr/X386/include
5214/usr/x386/include
5215/usr/XFree86/include/X11
5216
5217/usr/include
5218/usr/local/include
5219/usr/unsupported/include
5220/usr/athena/include
5221/usr/local/x11r5/include
5222/usr/lpp/Xamples/include
5223
5224/usr/openwin/include
5225/usr/openwin/share/include'
5226
5227if test "$ac_x_includes" = no; then
5228 # Guess where to find include files, by looking for Intrinsic.h.
ba4481b5 5229 # First, try using that file with no special directory specified.
503d2be0 5230 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 5231#line 5231 "configure"
ba4481b5 5232#include "confdefs.h"
503d2be0
AS
5233#include <X11/Intrinsic.h>
5234_ACEOF
1096bcc0 5235if { (eval echo "$as_me:5235: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
5236 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5237 ac_status=$?
5238 egrep -v '^ *\+' conftest.er1 >conftest.err
5239 rm -f conftest.er1
5240 cat conftest.err >&5
1096bcc0 5241 echo "$as_me:5241: \$? = $ac_status" >&5
503d2be0
AS
5242 (exit $ac_status); } >/dev/null; then
5243 if test -s conftest.err; then
5244 ac_cpp_err=$ac_c_preproc_warn_flag
5245 else
5246 ac_cpp_err=
5247 fi
5248else
5249 ac_cpp_err=yes
5250fi
5251if test -z "$ac_cpp_err"; then
ba4481b5
DL
5252 # We can compile using X headers with no special include directory.
5253ac_x_includes=
5254else
503d2be0 5255 echo "$as_me: failed program was:" >&5
ba4481b5 5256 cat conftest.$ac_ext >&5
503d2be0
AS
5257 for ac_dir in $ac_x_header_dirs; do
5258 if test -r "$ac_dir/X11/Intrinsic.h"; then
5259 ac_x_includes=$ac_dir
5260 break
5261 fi
5262done
ba4481b5 5263fi
503d2be0
AS
5264rm -f conftest.err conftest.$ac_ext
5265fi # $ac_x_includes = no
ba4481b5 5266
503d2be0 5267if test "$ac_x_libraries" = no; then
ba4481b5 5268 # Check for the libraries.
ba4481b5
DL
5269 # See if we find them without any special options.
5270 # Don't add to $LIBS permanently.
503d2be0
AS
5271 ac_save_LIBS=$LIBS
5272 LIBS="-lXt $LIBS"
5273 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 5274#line 5274 "configure"
ba4481b5 5275#include "confdefs.h"
503d2be0
AS
5276#include <X11/Intrinsic.h>
5277int
5278main ()
5279{
5280XtMalloc (0)
5281 ;
5282 return 0;
5283}
5284_ACEOF
5285rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 5286if { (eval echo "$as_me:5286: \"$ac_link\"") >&5
503d2be0
AS
5287 (eval $ac_link) 2>&5
5288 ac_status=$?
1096bcc0 5289 echo "$as_me:5289: \$? = $ac_status" >&5
503d2be0
AS
5290 (exit $ac_status); } &&
5291 { ac_try='test -s conftest$ac_exeext'
1096bcc0 5292 { (eval echo "$as_me:5292: \"$ac_try\"") >&5
503d2be0
AS
5293 (eval $ac_try) 2>&5
5294 ac_status=$?
1096bcc0 5295 echo "$as_me:5295: \$? = $ac_status" >&5
503d2be0
AS
5296 (exit $ac_status); }; }; then
5297 LIBS=$ac_save_LIBS
ba4481b5
DL
5298# We can link X programs with no special library path.
5299ac_x_libraries=
5300else
503d2be0
AS
5301 echo "$as_me: failed program was:" >&5
5302cat conftest.$ac_ext >&5
5303LIBS=$ac_save_LIBS
5304for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
ba4481b5 5305do
503d2be0 5306 # Don't even attempt the hair of trying to link an X program!
ba4481b5 5307 for ac_extension in a so sl; do
503d2be0 5308 if test -r $ac_dir/libXt.$ac_extension; then
ba4481b5
DL
5309 ac_x_libraries=$ac_dir
5310 break 2
5311 fi
5312 done
5313done
5314fi
503d2be0
AS
5315rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5316fi # $ac_x_libraries = no
ba4481b5 5317
503d2be0 5318if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
ba4481b5
DL
5319 # Didn't find X anywhere. Cache the known absence of X.
5320 ac_cv_have_x="have_x=no"
5321else
5322 # Record where we found X for the cache.
5323 ac_cv_have_x="have_x=yes \
5324 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5325fi
5326fi
503d2be0 5327
ba4481b5
DL
5328 fi
5329 eval "$ac_cv_have_x"
5330fi # $with_x != no
5331
5332if test "$have_x" != yes; then
1096bcc0 5333 echo "$as_me:5333: result: $have_x" >&5
503d2be0 5334echo "${ECHO_T}$have_x" >&6
ba4481b5
DL
5335 no_x=yes
5336else
5337 # If each of the values was on the command line, it overrides each guess.
5338 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5339 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5340 # Update the cache value to reflect the command line values.
5341 ac_cv_have_x="have_x=yes \
5342 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
1096bcc0 5343 echo "$as_me:5343: result: libraries $x_libraries, headers $x_includes" >&5
503d2be0 5344echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
ba4481b5
DL
5345fi
5346
5347if test "$no_x" = yes; then
5348 window_system=none
5349else
5350 window_system=x11
5351fi
5352
5353if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
5354 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
5355 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
5356 x_default_search_path=""
5357 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
f5215ba5
GM
5358 x_search_path="\
5359${x_library}/X11/%L/%T/%N%C%S:\
5360${x_library}/X11/%l/%T/%N%C%S:\
5361${x_library}/X11/%T/%N%C%S:\
5362${x_library}/X11/%L/%T/%N%S:\
5363${x_library}/X11/%l/%T/%N%S:\
5364${x_library}/X11/%T/%N%S"
ba4481b5
DL
5365 if test x"${x_default_search_path}" = x; then
5366 x_default_search_path=${x_search_path}
5367 else
5368 x_default_search_path="${x_search_path}:${x_default_search_path}"
5369 fi
5370 done
5371fi
5372if test "${x_includes}" != NONE && test -n "${x_includes}"; then
5373 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
5374fi
5375
5376if test x"${x_includes}" = x; then
5377 bitmapdir=/usr/include/X11/bitmaps
5378else
5379 # accumulate include directories that have X11 bitmap subdirectories
5380 bmd_acc="dummyval"
5381 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
5382 if test -d "${bmd}/X11/bitmaps"; then
5383 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
946173ad
DL
5384 fi
5385 if test -d "${bmd}/bitmaps"; then
ba4481b5
DL
5386 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
5387 fi
5388 done
5389 if test ${bmd_acc} != "dummyval"; then
5390 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
5391 fi
5392fi
5393
5394case "${window_system}" in
5395 x11 )
5396 HAVE_X_WINDOWS=yes
5397 HAVE_X11=yes
5398 case "${with_x_toolkit}" in
5399 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
5400 motif ) USE_X_TOOLKIT=MOTIF ;;
5401 no ) USE_X_TOOLKIT=none ;;
5402 * ) USE_X_TOOLKIT=maybe ;;
5403 esac
5404 ;;
5405 none )
5406 HAVE_X_WINDOWS=no
5407 HAVE_X11=no
5408 USE_X_TOOLKIT=none
5409 ;;
5410esac
5411
5412### If we're using X11, we should use the X menu package.
5413HAVE_MENUS=no
5414case ${HAVE_X11} in
5415 yes ) HAVE_MENUS=yes ;;
5416esac
503d2be0 5417
ba4481b5
DL
5418if test "${opsys}" = "hpux9"; then
5419 case "${x_libraries}" in
5420 *X11R4* )
5421 opsysfile="s/hpux9-x11r4.h"
5422 ;;
5423 esac
5424fi
5425
5426if test "${opsys}" = "hpux9shr"; then
5427 case "${x_libraries}" in
5428 *X11R4* )
5429 opsysfile="s/hpux9shxr4.h"
5430 ;;
5431 esac
5432fi
5433
ba4481b5
DL
5434### Compute the unexec source name from the object name.
5435UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
5436
5437# Do the opsystem or machine files prohibit the use of the GNU malloc?
5438# Assume not, until told otherwise.
5439GNU_MALLOC=yes
5440doug_lea_malloc=yes
1096bcc0 5441echo "$as_me:5441: checking for malloc_get_state" >&5
503d2be0
AS
5442echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6
5443if test "${ac_cv_func_malloc_get_state+set}" = set; then
5444 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5445else
503d2be0 5446 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 5447#line 5447 "configure"
ba4481b5
DL
5448#include "confdefs.h"
5449/* System header to define __stub macros and hopefully few prototypes,
503d2be0 5450 which can conflict with char malloc_get_state (); below. */
ba4481b5
DL
5451#include <assert.h>
5452/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
5453#ifdef __cplusplus
5454extern "C"
5455#endif
ba4481b5 5456/* We use char because int might match the return type of a gcc2
503d2be0
AS
5457 builtin and then its argument prototype would still apply. */
5458char malloc_get_state ();
5459char (*f) ();
ba4481b5 5460
503d2be0
AS
5461int
5462main ()
5463{
ba4481b5
DL
5464/* The GNU C library defines this for functions which it implements
5465 to always fail with ENOSYS. Some functions are actually named
5466 something starting with __ and the normal name is an alias. */
5467#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
5468choke me
5469#else
503d2be0 5470f = malloc_get_state;
ba4481b5
DL
5471#endif
5472
503d2be0
AS
5473 ;
5474 return 0;
5475}
5476_ACEOF
5477rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 5478if { (eval echo "$as_me:5478: \"$ac_link\"") >&5
503d2be0
AS
5479 (eval $ac_link) 2>&5
5480 ac_status=$?
1096bcc0 5481 echo "$as_me:5481: \$? = $ac_status" >&5
503d2be0
AS
5482 (exit $ac_status); } &&
5483 { ac_try='test -s conftest$ac_exeext'
1096bcc0 5484 { (eval echo "$as_me:5484: \"$ac_try\"") >&5
503d2be0
AS
5485 (eval $ac_try) 2>&5
5486 ac_status=$?
1096bcc0 5487 echo "$as_me:5487: \$? = $ac_status" >&5
503d2be0
AS
5488 (exit $ac_status); }; }; then
5489 ac_cv_func_malloc_get_state=yes
5490else
5491 echo "$as_me: failed program was:" >&5
5492cat conftest.$ac_ext >&5
5493ac_cv_func_malloc_get_state=no
5494fi
5495rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5496fi
1096bcc0 5497echo "$as_me:5497: result: $ac_cv_func_malloc_get_state" >&5
503d2be0
AS
5498echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6
5499if test $ac_cv_func_malloc_get_state = yes; then
ba4481b5
DL
5500 :
5501else
503d2be0 5502 doug_lea_malloc=no
ba4481b5
DL
5503fi
5504
1096bcc0 5505echo "$as_me:5505: checking for malloc_set_state" >&5
503d2be0
AS
5506echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6
5507if test "${ac_cv_func_malloc_set_state+set}" = set; then
5508 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5509else
503d2be0 5510 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 5511#line 5511 "configure"
ba4481b5
DL
5512#include "confdefs.h"
5513/* System header to define __stub macros and hopefully few prototypes,
503d2be0 5514 which can conflict with char malloc_set_state (); below. */
ba4481b5
DL
5515#include <assert.h>
5516/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
5517#ifdef __cplusplus
5518extern "C"
5519#endif
ba4481b5 5520/* We use char because int might match the return type of a gcc2
503d2be0
AS
5521 builtin and then its argument prototype would still apply. */
5522char malloc_set_state ();
5523char (*f) ();
ba4481b5 5524
503d2be0
AS
5525int
5526main ()
5527{
ba4481b5
DL
5528/* The GNU C library defines this for functions which it implements
5529 to always fail with ENOSYS. Some functions are actually named
5530 something starting with __ and the normal name is an alias. */
5531#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
5532choke me
5533#else
503d2be0 5534f = malloc_set_state;
ba4481b5
DL
5535#endif
5536
503d2be0
AS
5537 ;
5538 return 0;
5539}
5540_ACEOF
5541rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 5542if { (eval echo "$as_me:5542: \"$ac_link\"") >&5
503d2be0
AS
5543 (eval $ac_link) 2>&5
5544 ac_status=$?
1096bcc0 5545 echo "$as_me:5545: \$? = $ac_status" >&5
503d2be0
AS
5546 (exit $ac_status); } &&
5547 { ac_try='test -s conftest$ac_exeext'
1096bcc0 5548 { (eval echo "$as_me:5548: \"$ac_try\"") >&5
503d2be0
AS
5549 (eval $ac_try) 2>&5
5550 ac_status=$?
1096bcc0 5551 echo "$as_me:5551: \$? = $ac_status" >&5
503d2be0
AS
5552 (exit $ac_status); }; }; then
5553 ac_cv_func_malloc_set_state=yes
5554else
5555 echo "$as_me: failed program was:" >&5
5556cat conftest.$ac_ext >&5
5557ac_cv_func_malloc_set_state=no
5558fi
5559rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5560fi
1096bcc0 5561echo "$as_me:5561: result: $ac_cv_func_malloc_set_state" >&5
503d2be0
AS
5562echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6
5563if test $ac_cv_func_malloc_set_state = yes; then
ba4481b5
DL
5564 :
5565else
503d2be0 5566 doug_lea_malloc=no
ba4481b5
DL
5567fi
5568
1096bcc0 5569echo "$as_me:5569: checking whether __after_morecore_hook exists" >&5
503d2be0
AS
5570echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6
5571if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
5572 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5573else
503d2be0 5574 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 5575#line 5575 "configure"
ba4481b5
DL
5576#include "confdefs.h"
5577extern void (* __after_morecore_hook)();
503d2be0
AS
5578int
5579main ()
5580{
ba4481b5 5581__after_morecore_hook = 0
503d2be0
AS
5582 ;
5583 return 0;
5584}
5585_ACEOF
5586rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 5587if { (eval echo "$as_me:5587: \"$ac_link\"") >&5
503d2be0
AS
5588 (eval $ac_link) 2>&5
5589 ac_status=$?
1096bcc0 5590 echo "$as_me:5590: \$? = $ac_status" >&5
503d2be0
AS
5591 (exit $ac_status); } &&
5592 { ac_try='test -s conftest$ac_exeext'
1096bcc0 5593 { (eval echo "$as_me:5593: \"$ac_try\"") >&5
503d2be0
AS
5594 (eval $ac_try) 2>&5
5595 ac_status=$?
1096bcc0 5596 echo "$as_me:5596: \$? = $ac_status" >&5
503d2be0 5597 (exit $ac_status); }; }; then
ba4481b5
DL
5598 emacs_cv_var___after_morecore_hook=yes
5599else
503d2be0
AS
5600 echo "$as_me: failed program was:" >&5
5601cat conftest.$ac_ext >&5
5602emacs_cv_var___after_morecore_hook=no
ba4481b5 5603fi
503d2be0 5604rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 5605fi
1096bcc0 5606echo "$as_me:5606: result: $emacs_cv_var___after_morecore_hook" >&5
503d2be0 5607echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6
ba4481b5
DL
5608if test $emacs_cv_var___after_morecore_hook = no; then
5609 doug_lea_malloc=no
5610fi
5611if test "${system_malloc}" = "yes"; then
5612 GNU_MALLOC=no
5613 GNU_MALLOC_reason="
5614 (The GNU allocators don't work with this system configuration.)"
5615fi
5616if test "$doug_lea_malloc" = "yes" ; then
5617 if test "$GNU_MALLOC" = yes ; then
5618 GNU_MALLOC_reason="
5619 (Using Doug Lea's new malloc from the GNU C Library.)"
5620 fi
503d2be0 5621 cat >>confdefs.h <<\EOF
ba4481b5
DL
5622#define DOUG_LEA_MALLOC 1
5623EOF
5624
5625fi
5626
5627if test x"${REL_ALLOC}" = x; then
5628 REL_ALLOC=${GNU_MALLOC}
5629fi
5630
503d2be0
AS
5631# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5632
5633for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5634 inttypes.h stdint.h unistd.h
5635do
5636as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
1096bcc0 5637echo "$as_me:5637: checking for $ac_header" >&5
503d2be0
AS
5638echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5639if eval "test \"\${$as_ac_Header+set}\" = set"; then
5640 echo $ECHO_N "(cached) $ECHO_C" >&6
5641else
5642 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 5643#line 5643 "configure"
503d2be0
AS
5644#include "confdefs.h"
5645$ac_includes_default
5646#include <$ac_header>
5647_ACEOF
5648rm -f conftest.$ac_objext
1096bcc0 5649if { (eval echo "$as_me:5649: \"$ac_compile\"") >&5
503d2be0
AS
5650 (eval $ac_compile) 2>&5
5651 ac_status=$?
1096bcc0 5652 echo "$as_me:5652: \$? = $ac_status" >&5
503d2be0
AS
5653 (exit $ac_status); } &&
5654 { ac_try='test -s conftest.$ac_objext'
1096bcc0 5655 { (eval echo "$as_me:5655: \"$ac_try\"") >&5
503d2be0
AS
5656 (eval $ac_try) 2>&5
5657 ac_status=$?
1096bcc0 5658 echo "$as_me:5658: \$? = $ac_status" >&5
503d2be0
AS
5659 (exit $ac_status); }; }; then
5660 eval "$as_ac_Header=yes"
5661else
5662 echo "$as_me: failed program was:" >&5
5663cat conftest.$ac_ext >&5
5664eval "$as_ac_Header=no"
5665fi
5666rm -f conftest.$ac_objext conftest.$ac_ext
5667fi
1096bcc0 5668echo "$as_me:5668: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
5669echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5670if test `eval echo '${'$as_ac_Header'}'` = yes; then
5671 cat >>confdefs.h <<EOF
5672#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5673EOF
5674
5675fi
5676done
a55b799a 5677
503d2be0 5678for ac_header in stdlib.h unistd.h
73b77ee5 5679do
503d2be0 5680as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
1096bcc0 5681echo "$as_me:5681: checking for $ac_header" >&5
503d2be0
AS
5682echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5683if eval "test \"\${$as_ac_Header+set}\" = set"; then
5684 echo $ECHO_N "(cached) $ECHO_C" >&6
5685else
5686 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 5687#line 5687 "configure"
503d2be0
AS
5688#include "confdefs.h"
5689#include <$ac_header>
5690_ACEOF
1096bcc0 5691if { (eval echo "$as_me:5691: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
5692 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5693 ac_status=$?
5694 egrep -v '^ *\+' conftest.er1 >conftest.err
5695 rm -f conftest.er1
5696 cat conftest.err >&5
1096bcc0 5697 echo "$as_me:5697: \$? = $ac_status" >&5
503d2be0
AS
5698 (exit $ac_status); } >/dev/null; then
5699 if test -s conftest.err; then
5700 ac_cpp_err=$ac_c_preproc_warn_flag
5701 else
5702 ac_cpp_err=
5703 fi
5704else
5705 ac_cpp_err=yes
5706fi
5707if test -z "$ac_cpp_err"; then
5708 eval "$as_ac_Header=yes"
5709else
5710 echo "$as_me: failed program was:" >&5
ba4481b5 5711 cat conftest.$ac_ext >&5
503d2be0 5712 eval "$as_ac_Header=no"
ba4481b5 5713fi
503d2be0 5714rm -f conftest.err conftest.$ac_ext
ba4481b5 5715fi
1096bcc0 5716echo "$as_me:5716: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
5717echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5718if test `eval echo '${'$as_ac_Header'}'` = yes; then
5719 cat >>confdefs.h <<EOF
5720#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba4481b5 5721EOF
503d2be0 5722
ba4481b5 5723fi
73b77ee5 5724done
ba4481b5 5725
73b77ee5 5726for ac_func in getpagesize
ba4481b5 5727do
503d2be0 5728as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
1096bcc0 5729echo "$as_me:5729: checking for $ac_func" >&5
503d2be0
AS
5730echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5731if eval "test \"\${$as_ac_var+set}\" = set"; then
5732 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5733else
503d2be0 5734 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 5735#line 5735 "configure"
ba4481b5
DL
5736#include "confdefs.h"
5737/* System header to define __stub macros and hopefully few prototypes,
503d2be0 5738 which can conflict with char $ac_func (); below. */
ba4481b5
DL
5739#include <assert.h>
5740/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
5741#ifdef __cplusplus
5742extern "C"
5743#endif
ba4481b5 5744/* We use char because int might match the return type of a gcc2
503d2be0
AS
5745 builtin and then its argument prototype would still apply. */
5746char $ac_func ();
5747char (*f) ();
ba4481b5 5748
503d2be0
AS
5749int
5750main ()
5751{
ba4481b5
DL
5752/* The GNU C library defines this for functions which it implements
5753 to always fail with ENOSYS. Some functions are actually named
5754 something starting with __ and the normal name is an alias. */
5755#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5756choke me
5757#else
503d2be0 5758f = $ac_func;
ba4481b5
DL
5759#endif
5760
503d2be0
AS
5761 ;
5762 return 0;
5763}
5764_ACEOF
5765rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 5766if { (eval echo "$as_me:5766: \"$ac_link\"") >&5
503d2be0
AS
5767 (eval $ac_link) 2>&5
5768 ac_status=$?
1096bcc0 5769 echo "$as_me:5769: \$? = $ac_status" >&5
503d2be0
AS
5770 (exit $ac_status); } &&
5771 { ac_try='test -s conftest$ac_exeext'
1096bcc0 5772 { (eval echo "$as_me:5772: \"$ac_try\"") >&5
503d2be0
AS
5773 (eval $ac_try) 2>&5
5774 ac_status=$?
1096bcc0 5775 echo "$as_me:5775: \$? = $ac_status" >&5
503d2be0
AS
5776 (exit $ac_status); }; }; then
5777 eval "$as_ac_var=yes"
5778else
5779 echo "$as_me: failed program was:" >&5
5780cat conftest.$ac_ext >&5
5781eval "$as_ac_var=no"
5782fi
5783rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5784fi
1096bcc0 5785echo "$as_me:5785: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
5786echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5787if test `eval echo '${'$as_ac_var'}'` = yes; then
5788 cat >>confdefs.h <<EOF
5789#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
ba4481b5 5790EOF
ba4481b5 5791
ba4481b5
DL
5792fi
5793done
5794
1096bcc0 5795echo "$as_me:5795: checking for working mmap" >&5
503d2be0
AS
5796echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
5797if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
5798 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5
GM
5799else
5800 if test "$cross_compiling" = yes; then
5801 ac_cv_func_mmap_fixed_mapped=no
ba4481b5 5802else
503d2be0 5803 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 5804#line 5804 "configure"
ba4481b5 5805#include "confdefs.h"
503d2be0 5806$ac_includes_default
73b77ee5
GM
5807/* Thanks to Mike Haertel and Jim Avera for this test.
5808 Here is a matrix of mmap possibilities:
5809 mmap private not fixed
5810 mmap private fixed at somewhere currently unmapped
5811 mmap private fixed at somewhere already mapped
5812 mmap shared not fixed
5813 mmap shared fixed at somewhere currently unmapped
5814 mmap shared fixed at somewhere already mapped
5815 For private mappings, we should verify that changes cannot be read()
5816 back from the file, nor mmap's back from the file at a different
5817 address. (There have been systems where private was not correctly
5818 implemented like the infamous i386 svr4.0, and systems where the
1932bc86 5819 VM page cache was not coherent with the file system buffer cache
73b77ee5
GM
5820 like early versions of FreeBSD and possibly contemporary NetBSD.)
5821 For shared mappings, we should conversely verify that changes get
5822 propogated back to all the places they're supposed to be.
5823
5824 Grep wants private fixed already mapped.
5825 The main things grep needs to know about mmap are:
5826 * does it exist and is it safe to write into the mmap'd area
5827 * how to use it (BSD variants) */
503d2be0 5828
73b77ee5
GM
5829#include <fcntl.h>
5830#include <sys/mman.h>
5831
503d2be0 5832#if !STDC_HEADERS && !HAVE_STDLIB_H
1932bc86
DL
5833char *malloc ();
5834#endif
73b77ee5 5835
1932bc86
DL
5836/* This mess was copied from the GNU getpagesize.h. */
5837#if !HAVE_GETPAGESIZE
73b77ee5 5838/* Assume that all systems that can run configure have sys/param.h. */
1932bc86 5839# if !HAVE_SYS_PARAM_H
73b77ee5
GM
5840# define HAVE_SYS_PARAM_H 1
5841# endif
5842
5843# ifdef _SC_PAGESIZE
5844# define getpagesize() sysconf(_SC_PAGESIZE)
5845# else /* no _SC_PAGESIZE */
1932bc86 5846# if HAVE_SYS_PARAM_H
73b77ee5
GM
5847# include <sys/param.h>
5848# ifdef EXEC_PAGESIZE
5849# define getpagesize() EXEC_PAGESIZE
5850# else /* no EXEC_PAGESIZE */
5851# ifdef NBPG
5852# define getpagesize() NBPG * CLSIZE
5853# ifndef CLSIZE
5854# define CLSIZE 1
5855# endif /* no CLSIZE */
5856# else /* no NBPG */
5857# ifdef NBPC
5858# define getpagesize() NBPC
5859# else /* no NBPC */
5860# ifdef PAGESIZE
5861# define getpagesize() PAGESIZE
5862# endif /* PAGESIZE */
5863# endif /* no NBPC */
5864# endif /* no NBPG */
5865# endif /* no EXEC_PAGESIZE */
5866# else /* no HAVE_SYS_PARAM_H */
5867# define getpagesize() 8192 /* punt totally */
5868# endif /* no HAVE_SYS_PARAM_H */
5869# endif /* no _SC_PAGESIZE */
5870
5871#endif /* no HAVE_GETPAGESIZE */
5872
73b77ee5 5873int
1932bc86 5874main ()
73b77ee5 5875{
1932bc86
DL
5876 char *data, *data2, *data3;
5877 int i, pagesize;
5878 int fd;
5879
5880 pagesize = getpagesize ();
5881
5882 /* First, make a file with some known garbage in it. */
5883 data = (char *) malloc (pagesize);
5884 if (!data)
5885 exit (1);
5886 for (i = 0; i < pagesize; ++i)
5887 *(data + i) = rand ();
5888 umask (0);
503d2be0 5889 fd = creat ("conftest.mmap", 0600);
1932bc86
DL
5890 if (fd < 0)
5891 exit (1);
5892 if (write (fd, data, pagesize) != pagesize)
5893 exit (1);
5894 close (fd);
73b77ee5 5895
1932bc86
DL
5896 /* Next, try to mmap the file at a fixed address which already has
5897 something else allocated at it. If we can, also make sure that
5898 we see the same garbage. */
503d2be0 5899 fd = open ("conftest.mmap", O_RDWR);
1932bc86
DL
5900 if (fd < 0)
5901 exit (1);
5902 data2 = (char *) malloc (2 * pagesize);
5903 if (!data2)
5904 exit (1);
5905 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5906 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
5907 MAP_PRIVATE | MAP_FIXED, fd, 0L))
5908 exit (1);
5909 for (i = 0; i < pagesize; ++i)
5910 if (*(data + i) != *(data2 + i))
5911 exit (1);
5912
5913 /* Finally, make sure that changes to the mapped area do not
5914 percolate back to the file as seen by read(). (This is a bug on
5915 some variants of i386 svr4.0.) */
5916 for (i = 0; i < pagesize; ++i)
5917 *(data2 + i) = *(data2 + i) + 1;
5918 data3 = (char *) malloc (pagesize);
5919 if (!data3)
5920 exit (1);
5921 if (read (fd, data3, pagesize) != pagesize)
5922 exit (1);
5923 for (i = 0; i < pagesize; ++i)
5924 if (*(data + i) != *(data3 + i))
5925 exit (1);
5926 close (fd);
1932bc86
DL
5927 exit (0);
5928}
503d2be0
AS
5929_ACEOF
5930rm -f conftest$ac_exeext
1096bcc0 5931if { (eval echo "$as_me:5931: \"$ac_link\"") >&5
503d2be0
AS
5932 (eval $ac_link) 2>&5
5933 ac_status=$?
1096bcc0 5934 echo "$as_me:5934: \$? = $ac_status" >&5
503d2be0 5935 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
1096bcc0 5936 { (eval echo "$as_me:5936: \"$ac_try\"") >&5
503d2be0
AS
5937 (eval $ac_try) 2>&5
5938 ac_status=$?
1096bcc0 5939 echo "$as_me:5939: \$? = $ac_status" >&5
503d2be0 5940 (exit $ac_status); }; }; then
73b77ee5
GM
5941 ac_cv_func_mmap_fixed_mapped=yes
5942else
503d2be0
AS
5943 echo "$as_me: program exited with status $ac_status" >&5
5944echo "$as_me: failed program was:" >&5
5945cat conftest.$ac_ext >&5
5946ac_cv_func_mmap_fixed_mapped=no
73b77ee5 5947fi
503d2be0 5948rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
73b77ee5 5949fi
73b77ee5 5950fi
1096bcc0 5951echo "$as_me:5951: result: $ac_cv_func_mmap_fixed_mapped" >&5
503d2be0 5952echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
73b77ee5 5953if test $ac_cv_func_mmap_fixed_mapped = yes; then
503d2be0
AS
5954
5955cat >>confdefs.h <<\EOF
73b77ee5
GM
5956#define HAVE_MMAP 1
5957EOF
5958
5959fi
503d2be0 5960rm -f conftest.mmap
73b77ee5 5961
ef9e4345
GM
5962if test $use_mmap_for_buffers = yes; then
5963 REL_ALLOC=no
73b77ee5
GM
5964fi
5965
5966LIBS="$libsrc_libs $LIBS"
5967
1096bcc0 5968echo "$as_me:5968: checking for dnet_ntoa in -ldnet" >&5
503d2be0
AS
5969echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
5970if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
5971 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 5972else
503d2be0 5973 ac_check_lib_save_LIBS=$LIBS
73b77ee5 5974LIBS="-ldnet $LIBS"
503d2be0 5975cat >conftest.$ac_ext <<_ACEOF
1096bcc0 5976#line 5976 "configure"
73b77ee5 5977#include "confdefs.h"
503d2be0 5978
73b77ee5 5979/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
5980#ifdef __cplusplus
5981extern "C"
5982#endif
73b77ee5 5983/* We use char because int might match the return type of a gcc2
503d2be0
AS
5984 builtin and then its argument prototype would still apply. */
5985char dnet_ntoa ();
5986int
5987main ()
5988{
5989dnet_ntoa ();
5990 ;
5991 return 0;
5992}
5993_ACEOF
5994rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 5995if { (eval echo "$as_me:5995: \"$ac_link\"") >&5
503d2be0
AS
5996 (eval $ac_link) 2>&5
5997 ac_status=$?
1096bcc0 5998 echo "$as_me:5998: \$? = $ac_status" >&5
503d2be0
AS
5999 (exit $ac_status); } &&
6000 { ac_try='test -s conftest$ac_exeext'
1096bcc0 6001 { (eval echo "$as_me:6001: \"$ac_try\"") >&5
503d2be0
AS
6002 (eval $ac_try) 2>&5
6003 ac_status=$?
1096bcc0 6004 echo "$as_me:6004: \$? = $ac_status" >&5
503d2be0
AS
6005 (exit $ac_status); }; }; then
6006 ac_cv_lib_dnet_dnet_ntoa=yes
6007else
6008 echo "$as_me: failed program was:" >&5
6009cat conftest.$ac_ext >&5
6010ac_cv_lib_dnet_dnet_ntoa=no
6011fi
6012rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6013LIBS=$ac_check_lib_save_LIBS
6014fi
1096bcc0 6015echo "$as_me:6015: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
503d2be0
AS
6016echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
6017if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
6018 cat >>confdefs.h <<EOF
6019#define HAVE_LIBDNET 1
73b77ee5
GM
6020EOF
6021
6022 LIBS="-ldnet $LIBS"
6023
73b77ee5
GM
6024fi
6025
1096bcc0 6026echo "$as_me:6026: checking for main in -lXbsd" >&5
503d2be0
AS
6027echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6
6028if test "${ac_cv_lib_Xbsd_main+set}" = set; then
6029 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 6030else
503d2be0 6031 ac_check_lib_save_LIBS=$LIBS
73b77ee5 6032LIBS="-lXbsd $LIBS"
503d2be0 6033cat >conftest.$ac_ext <<_ACEOF
1096bcc0 6034#line 6034 "configure"
73b77ee5
GM
6035#include "confdefs.h"
6036
503d2be0
AS
6037int
6038main ()
6039{
6040main ();
6041 ;
6042 return 0;
6043}
6044_ACEOF
6045rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 6046if { (eval echo "$as_me:6046: \"$ac_link\"") >&5
503d2be0
AS
6047 (eval $ac_link) 2>&5
6048 ac_status=$?
1096bcc0 6049 echo "$as_me:6049: \$? = $ac_status" >&5
503d2be0
AS
6050 (exit $ac_status); } &&
6051 { ac_try='test -s conftest$ac_exeext'
1096bcc0 6052 { (eval echo "$as_me:6052: \"$ac_try\"") >&5
503d2be0
AS
6053 (eval $ac_try) 2>&5
6054 ac_status=$?
1096bcc0 6055 echo "$as_me:6055: \$? = $ac_status" >&5
503d2be0
AS
6056 (exit $ac_status); }; }; then
6057 ac_cv_lib_Xbsd_main=yes
6058else
6059 echo "$as_me: failed program was:" >&5
6060cat conftest.$ac_ext >&5
6061ac_cv_lib_Xbsd_main=no
6062fi
6063rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6064LIBS=$ac_check_lib_save_LIBS
6065fi
1096bcc0 6066echo "$as_me:6066: result: $ac_cv_lib_Xbsd_main" >&5
503d2be0
AS
6067echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6
6068if test $ac_cv_lib_Xbsd_main = yes; then
73b77ee5 6069 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
73b77ee5
GM
6070fi
6071
1096bcc0 6072echo "$as_me:6072: checking for cma_open in -lpthreads" >&5
503d2be0
AS
6073echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6
6074if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
6075 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 6076else
503d2be0 6077 ac_check_lib_save_LIBS=$LIBS
73b77ee5 6078LIBS="-lpthreads $LIBS"
503d2be0 6079cat >conftest.$ac_ext <<_ACEOF
1096bcc0 6080#line 6080 "configure"
73b77ee5 6081#include "confdefs.h"
503d2be0 6082
73b77ee5 6083/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6084#ifdef __cplusplus
6085extern "C"
6086#endif
73b77ee5 6087/* We use char because int might match the return type of a gcc2
503d2be0
AS
6088 builtin and then its argument prototype would still apply. */
6089char cma_open ();
6090int
6091main ()
6092{
6093cma_open ();
6094 ;
6095 return 0;
6096}
6097_ACEOF
6098rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 6099if { (eval echo "$as_me:6099: \"$ac_link\"") >&5
503d2be0
AS
6100 (eval $ac_link) 2>&5
6101 ac_status=$?
1096bcc0 6102 echo "$as_me:6102: \$? = $ac_status" >&5
503d2be0
AS
6103 (exit $ac_status); } &&
6104 { ac_try='test -s conftest$ac_exeext'
1096bcc0 6105 { (eval echo "$as_me:6105: \"$ac_try\"") >&5
503d2be0
AS
6106 (eval $ac_try) 2>&5
6107 ac_status=$?
1096bcc0 6108 echo "$as_me:6108: \$? = $ac_status" >&5
503d2be0
AS
6109 (exit $ac_status); }; }; then
6110 ac_cv_lib_pthreads_cma_open=yes
6111else
6112 echo "$as_me: failed program was:" >&5
6113cat conftest.$ac_ext >&5
6114ac_cv_lib_pthreads_cma_open=no
6115fi
6116rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6117LIBS=$ac_check_lib_save_LIBS
6118fi
1096bcc0 6119echo "$as_me:6119: result: $ac_cv_lib_pthreads_cma_open" >&5
503d2be0
AS
6120echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6
6121if test $ac_cv_lib_pthreads_cma_open = yes; then
6122 cat >>confdefs.h <<EOF
6123#define HAVE_LIBPTHREADS 1
73b77ee5
GM
6124EOF
6125
6126 LIBS="-lpthreads $LIBS"
6127
73b77ee5
GM
6128fi
6129
1096bcc0 6130echo "$as_me:6130: checking for XFree86 in /usr/X386" >&5
503d2be0 6131echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6
73b77ee5
GM
6132if test -d /usr/X386/include; then
6133 HAVE_XFREE386=yes
6134 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
6135else
6136 HAVE_XFREE386=no
6137fi
1096bcc0 6138echo "$as_me:6138: result: $HAVE_XFREE386" >&5
503d2be0 6139echo "${ECHO_T}$HAVE_XFREE386" >&6
73b77ee5
GM
6140
6141# Change CFLAGS temporarily so that C_SWITCH_X_SITE gets used
6142# for the tests that follow. We set it back to REAL_CFLAGS later on.
6143
6144REAL_CPPFLAGS="$CPPFLAGS"
6145
6146if test "${HAVE_X11}" = "yes"; then
6147 DEFS="$C_SWITCH_X_SITE $DEFS"
6148 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
6149 LIBS="$LIBX $LIBS"
6150 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
6151 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
6152
6153 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
6154 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
6155 # but it's more convenient here to set LD_RUN_PATH
6156 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
6157 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
6158 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
6159 export LD_RUN_PATH
6160 fi
6161
6162 if test "${opsys}" = "gnu-linux"; then
1096bcc0 6163 echo "$as_me:6163: checking whether X on GNU/Linux needs -b to link" >&5
503d2be0
AS
6164echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6
6165 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 6166#line 6166 "configure"
73b77ee5
GM
6167#include "confdefs.h"
6168
503d2be0
AS
6169int
6170main ()
6171{
73b77ee5 6172XOpenDisplay ("foo");
503d2be0
AS
6173 ;
6174 return 0;
6175}
6176_ACEOF
6177rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 6178if { (eval echo "$as_me:6178: \"$ac_link\"") >&5
503d2be0
AS
6179 (eval $ac_link) 2>&5
6180 ac_status=$?
1096bcc0 6181 echo "$as_me:6181: \$? = $ac_status" >&5
503d2be0
AS
6182 (exit $ac_status); } &&
6183 { ac_try='test -s conftest$ac_exeext'
1096bcc0 6184 { (eval echo "$as_me:6184: \"$ac_try\"") >&5
503d2be0
AS
6185 (eval $ac_try) 2>&5
6186 ac_status=$?
1096bcc0 6187 echo "$as_me:6187: \$? = $ac_status" >&5
503d2be0 6188 (exit $ac_status); }; }; then
73b77ee5
GM
6189 xlinux_first_failure=no
6190else
503d2be0
AS
6191 echo "$as_me: failed program was:" >&5
6192cat conftest.$ac_ext >&5
6193xlinux_first_failure=yes
73b77ee5 6194fi
503d2be0 6195rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
73b77ee5
GM
6196 if test "${xlinux_first_failure}" = "yes"; then
6197 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
6198 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
6199 OLD_CPPFLAGS="$CPPFLAGS"
6200 OLD_LIBS="$LIBS"
6201 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
6202 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
6203 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
6204 LIBS="$LIBS -b i486-linuxaout"
503d2be0 6205 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 6206#line 6206 "configure"
73b77ee5
GM
6207#include "confdefs.h"
6208
503d2be0
AS
6209int
6210main ()
6211{
73b77ee5 6212XOpenDisplay ("foo");
503d2be0
AS
6213 ;
6214 return 0;
6215}
6216_ACEOF
6217rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 6218if { (eval echo "$as_me:6218: \"$ac_link\"") >&5
503d2be0
AS
6219 (eval $ac_link) 2>&5
6220 ac_status=$?
1096bcc0 6221 echo "$as_me:6221: \$? = $ac_status" >&5
503d2be0
AS
6222 (exit $ac_status); } &&
6223 { ac_try='test -s conftest$ac_exeext'
1096bcc0 6224 { (eval echo "$as_me:6224: \"$ac_try\"") >&5
503d2be0
AS
6225 (eval $ac_try) 2>&5
6226 ac_status=$?
1096bcc0 6227 echo "$as_me:6227: \$? = $ac_status" >&5
503d2be0 6228 (exit $ac_status); }; }; then
73b77ee5
GM
6229 xlinux_second_failure=no
6230else
503d2be0
AS
6231 echo "$as_me: failed program was:" >&5
6232cat conftest.$ac_ext >&5
6233xlinux_second_failure=yes
73b77ee5 6234fi
503d2be0 6235rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
73b77ee5
GM
6236 if test "${xlinux_second_failure}" = "yes"; then
6237 # If we get the same failure with -b, there is no use adding -b.
6238 # So take it out. This plays safe.
6239 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
6240 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
6241 CPPFLAGS="$OLD_CPPFLAGS"
6242 LIBS="$OLD_LIBS"
1096bcc0 6243 echo "$as_me:6243: result: no" >&5
503d2be0 6244echo "${ECHO_T}no" >&6
73b77ee5 6245 else
1096bcc0 6246 echo "$as_me:6246: result: yes" >&5
503d2be0 6247echo "${ECHO_T}yes" >&6
73b77ee5
GM
6248 fi
6249 else
1096bcc0 6250 echo "$as_me:6250: result: no" >&5
503d2be0 6251echo "${ECHO_T}no" >&6
73b77ee5
GM
6252 fi
6253 fi
6254
ac95a621
GM
6255 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
6256 # header files included from there.
1096bcc0 6257 echo "$as_me:6257: checking for Xkb" >&5
503d2be0
AS
6258echo $ECHO_N "checking for Xkb... $ECHO_C" >&6
6259 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 6260#line 6260 "configure"
ac95a621
GM
6261#include "confdefs.h"
6262#include <X11/Xlib.h>
6263#include <X11/XKBlib.h>
503d2be0
AS
6264int
6265main ()
6266{
ac95a621 6267XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
503d2be0
AS
6268 ;
6269 return 0;
6270}
6271_ACEOF
6272rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 6273if { (eval echo "$as_me:6273: \"$ac_link\"") >&5
503d2be0
AS
6274 (eval $ac_link) 2>&5
6275 ac_status=$?
1096bcc0 6276 echo "$as_me:6276: \$? = $ac_status" >&5
503d2be0
AS
6277 (exit $ac_status); } &&
6278 { ac_try='test -s conftest$ac_exeext'
1096bcc0 6279 { (eval echo "$as_me:6279: \"$ac_try\"") >&5
503d2be0
AS
6280 (eval $ac_try) 2>&5
6281 ac_status=$?
1096bcc0 6282 echo "$as_me:6282: \$? = $ac_status" >&5
503d2be0 6283 (exit $ac_status); }; }; then
ac95a621
GM
6284 emacs_xkb=yes
6285else
503d2be0
AS
6286 echo "$as_me: failed program was:" >&5
6287cat conftest.$ac_ext >&5
6288emacs_xkb=no
ac95a621 6289fi
503d2be0 6290rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1096bcc0 6291 echo "$as_me:6291: result: $emacs_xkb" >&5
503d2be0 6292echo "${ECHO_T}$emacs_xkb" >&6
ac95a621 6293 if test $emacs_xkb = yes; then
503d2be0 6294 cat >>confdefs.h <<\EOF
ac95a621
GM
6295#define HAVE_XKBGETKEYBOARD 1
6296EOF
6297
6298 fi
6299
503d2be0 6300for ac_func in XrmSetDatabase XScreenResourceString \
73b77ee5
GM
6301XScreenNumberOfScreen XSetWMProtocols
6302do
503d2be0 6303as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
1096bcc0 6304echo "$as_me:6304: checking for $ac_func" >&5
503d2be0
AS
6305echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6306if eval "test \"\${$as_ac_var+set}\" = set"; then
6307 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 6308else
503d2be0 6309 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 6310#line 6310 "configure"
73b77ee5
GM
6311#include "confdefs.h"
6312/* System header to define __stub macros and hopefully few prototypes,
503d2be0 6313 which can conflict with char $ac_func (); below. */
73b77ee5
GM
6314#include <assert.h>
6315/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6316#ifdef __cplusplus
6317extern "C"
6318#endif
73b77ee5 6319/* We use char because int might match the return type of a gcc2
503d2be0
AS
6320 builtin and then its argument prototype would still apply. */
6321char $ac_func ();
6322char (*f) ();
73b77ee5 6323
503d2be0
AS
6324int
6325main ()
6326{
73b77ee5
GM
6327/* The GNU C library defines this for functions which it implements
6328 to always fail with ENOSYS. Some functions are actually named
6329 something starting with __ and the normal name is an alias. */
6330#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6331choke me
6332#else
503d2be0 6333f = $ac_func;
73b77ee5
GM
6334#endif
6335
503d2be0
AS
6336 ;
6337 return 0;
6338}
6339_ACEOF
6340rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 6341if { (eval echo "$as_me:6341: \"$ac_link\"") >&5
503d2be0
AS
6342 (eval $ac_link) 2>&5
6343 ac_status=$?
1096bcc0 6344 echo "$as_me:6344: \$? = $ac_status" >&5
503d2be0
AS
6345 (exit $ac_status); } &&
6346 { ac_try='test -s conftest$ac_exeext'
1096bcc0 6347 { (eval echo "$as_me:6347: \"$ac_try\"") >&5
503d2be0
AS
6348 (eval $ac_try) 2>&5
6349 ac_status=$?
1096bcc0 6350 echo "$as_me:6350: \$? = $ac_status" >&5
503d2be0
AS
6351 (exit $ac_status); }; }; then
6352 eval "$as_ac_var=yes"
6353else
6354 echo "$as_me: failed program was:" >&5
6355cat conftest.$ac_ext >&5
6356eval "$as_ac_var=no"
6357fi
6358rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6359fi
1096bcc0 6360echo "$as_me:6360: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
6361echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6362if test `eval echo '${'$as_ac_var'}'` = yes; then
6363 cat >>confdefs.h <<EOF
6364#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
73b77ee5 6365EOF
73b77ee5 6366
73b77ee5
GM
6367fi
6368done
6369
6370fi
6371
6372if test "${window_system}" = "x11"; then
1096bcc0 6373 echo "$as_me:6373: checking X11 version 6" >&5
503d2be0
AS
6374echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6
6375 if test "${emacs_cv_x11_version_6+set}" = set; then
6376 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 6377else
503d2be0 6378 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 6379#line 6379 "configure"
73b77ee5
GM
6380#include "confdefs.h"
6381#include <X11/Xlib.h>
503d2be0
AS
6382int
6383main ()
6384{
73b77ee5
GM
6385#if XlibSpecificationRelease < 6
6386fail;
6387#endif
6388
503d2be0
AS
6389 ;
6390 return 0;
6391}
6392_ACEOF
6393rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 6394if { (eval echo "$as_me:6394: \"$ac_link\"") >&5
503d2be0
AS
6395 (eval $ac_link) 2>&5
6396 ac_status=$?
1096bcc0 6397 echo "$as_me:6397: \$? = $ac_status" >&5
503d2be0
AS
6398 (exit $ac_status); } &&
6399 { ac_try='test -s conftest$ac_exeext'
1096bcc0 6400 { (eval echo "$as_me:6400: \"$ac_try\"") >&5
503d2be0
AS
6401 (eval $ac_try) 2>&5
6402 ac_status=$?
1096bcc0 6403 echo "$as_me:6403: \$? = $ac_status" >&5
503d2be0 6404 (exit $ac_status); }; }; then
73b77ee5
GM
6405 emacs_cv_x11_version_6=yes
6406else
503d2be0
AS
6407 echo "$as_me: failed program was:" >&5
6408cat conftest.$ac_ext >&5
6409emacs_cv_x11_version_6=no
73b77ee5 6410fi
503d2be0 6411rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
73b77ee5
GM
6412fi
6413
6414 if test $emacs_cv_x11_version_6 = yes; then
1096bcc0 6415 echo "$as_me:6415: result: 6 or newer" >&5
503d2be0
AS
6416echo "${ECHO_T}6 or newer" >&6
6417 cat >>confdefs.h <<\EOF
73b77ee5
GM
6418#define HAVE_X11R6 1
6419EOF
6420
6421 else
1096bcc0 6422 echo "$as_me:6422: result: before 6" >&5
503d2be0 6423echo "${ECHO_T}before 6" >&6
ba4481b5
DL
6424 fi
6425fi
6426
6427if test "${window_system}" = "x11"; then
1096bcc0 6428 echo "$as_me:6428: checking X11 version 5" >&5
503d2be0
AS
6429echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6
6430 if test "${emacs_cv_x11_version_5+set}" = set; then
6431 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6432else
503d2be0 6433 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 6434#line 6434 "configure"
ba4481b5
DL
6435#include "confdefs.h"
6436#include <X11/Xlib.h>
503d2be0
AS
6437int
6438main ()
6439{
ba4481b5
DL
6440#if XlibSpecificationRelease < 5
6441fail;
6442#endif
6443
503d2be0
AS
6444 ;
6445 return 0;
6446}
6447_ACEOF
6448rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 6449if { (eval echo "$as_me:6449: \"$ac_link\"") >&5
503d2be0
AS
6450 (eval $ac_link) 2>&5
6451 ac_status=$?
1096bcc0 6452 echo "$as_me:6452: \$? = $ac_status" >&5
503d2be0
AS
6453 (exit $ac_status); } &&
6454 { ac_try='test -s conftest$ac_exeext'
1096bcc0 6455 { (eval echo "$as_me:6455: \"$ac_try\"") >&5
503d2be0
AS
6456 (eval $ac_try) 2>&5
6457 ac_status=$?
1096bcc0 6458 echo "$as_me:6458: \$? = $ac_status" >&5
503d2be0 6459 (exit $ac_status); }; }; then
ba4481b5
DL
6460 emacs_cv_x11_version_5=yes
6461else
503d2be0
AS
6462 echo "$as_me: failed program was:" >&5
6463cat conftest.$ac_ext >&5
6464emacs_cv_x11_version_5=no
ba4481b5 6465fi
503d2be0 6466rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5
DL
6467fi
6468
6469 if test $emacs_cv_x11_version_5 = yes; then
1096bcc0 6470 echo "$as_me:6470: result: 5 or newer" >&5
503d2be0 6471echo "${ECHO_T}5 or newer" >&6
ba4481b5 6472 HAVE_X11R5=yes
503d2be0 6473 cat >>confdefs.h <<\EOF
ba4481b5
DL
6474#define HAVE_X11R5 1
6475EOF
6476
6477 else
6478 HAVE_X11R5=no
1096bcc0 6479 echo "$as_me:6479: result: before 5" >&5
503d2be0 6480echo "${ECHO_T}before 5" >&6
ba4481b5
DL
6481 fi
6482fi
6483
6484if test x"${USE_X_TOOLKIT}" = xmaybe; then
6485 if test x"${HAVE_X11R5}" = xyes; then
1096bcc0 6486 echo "$as_me:6486: checking X11 version 5 with Xaw" >&5
503d2be0
AS
6487echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6
6488 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
6489 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6490else
503d2be0 6491 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 6492#line 6492 "configure"
ba4481b5
DL
6493#include "confdefs.h"
6494
6495#include <X11/Intrinsic.h>
6496#include <X11/Xaw/Simple.h>
503d2be0
AS
6497int
6498main ()
6499{
ba4481b5 6500
503d2be0
AS
6501 ;
6502 return 0;
6503}
6504_ACEOF
6505rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 6506if { (eval echo "$as_me:6506: \"$ac_link\"") >&5
503d2be0
AS
6507 (eval $ac_link) 2>&5
6508 ac_status=$?
1096bcc0 6509 echo "$as_me:6509: \$? = $ac_status" >&5
503d2be0
AS
6510 (exit $ac_status); } &&
6511 { ac_try='test -s conftest$ac_exeext'
1096bcc0 6512 { (eval echo "$as_me:6512: \"$ac_try\"") >&5
503d2be0
AS
6513 (eval $ac_try) 2>&5
6514 ac_status=$?
1096bcc0 6515 echo "$as_me:6515: \$? = $ac_status" >&5
503d2be0 6516 (exit $ac_status); }; }; then
ba4481b5
DL
6517 emacs_cv_x11_version_5_with_xaw=yes
6518else
503d2be0
AS
6519 echo "$as_me: failed program was:" >&5
6520cat conftest.$ac_ext >&5
6521emacs_cv_x11_version_5_with_xaw=no
ba4481b5 6522fi
503d2be0 6523rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5
DL
6524fi
6525
6526 if test $emacs_cv_x11_version_5_with_xaw = yes; then
1096bcc0 6527 echo "$as_me:6527: result: 5 or newer, with Xaw; use toolkit by default" >&5
503d2be0 6528echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6
ba4481b5
DL
6529 USE_X_TOOLKIT=LUCID
6530 else
1096bcc0 6531 echo "$as_me:6531: result: before 5 or no Xaw; do not use toolkit by default" >&5
503d2be0 6532echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6
ba4481b5
DL
6533 USE_X_TOOLKIT=none
6534 fi
6535 else
6536 USE_X_TOOLKIT=none
6537 fi
6538fi
6539
6540X_TOOLKIT_TYPE=$USE_X_TOOLKIT
6541
6542if test "${USE_X_TOOLKIT}" != "none"; then
1096bcc0 6543 echo "$as_me:6543: checking X11 toolkit version" >&5
503d2be0
AS
6544echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6
6545 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
6546 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6547else
503d2be0 6548 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 6549#line 6549 "configure"
ba4481b5
DL
6550#include "confdefs.h"
6551#include <X11/Intrinsic.h>
503d2be0
AS
6552int
6553main ()
6554{
ba4481b5
DL
6555#if XtSpecificationRelease < 6
6556fail;
6557#endif
6558
503d2be0
AS
6559 ;
6560 return 0;
6561}
6562_ACEOF
6563rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 6564if { (eval echo "$as_me:6564: \"$ac_link\"") >&5
503d2be0
AS
6565 (eval $ac_link) 2>&5
6566 ac_status=$?
1096bcc0 6567 echo "$as_me:6567: \$? = $ac_status" >&5
503d2be0
AS
6568 (exit $ac_status); } &&
6569 { ac_try='test -s conftest$ac_exeext'
1096bcc0 6570 { (eval echo "$as_me:6570: \"$ac_try\"") >&5
503d2be0
AS
6571 (eval $ac_try) 2>&5
6572 ac_status=$?
1096bcc0 6573 echo "$as_me:6573: \$? = $ac_status" >&5
503d2be0 6574 (exit $ac_status); }; }; then
ba4481b5
DL
6575 emacs_cv_x11_toolkit_version_6=yes
6576else
503d2be0
AS
6577 echo "$as_me: failed program was:" >&5
6578cat conftest.$ac_ext >&5
6579emacs_cv_x11_toolkit_version_6=no
ba4481b5 6580fi
503d2be0 6581rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5
DL
6582fi
6583
6584 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
6585 if test $emacs_cv_x11_toolkit_version_6 = yes; then
1096bcc0 6586 echo "$as_me:6586: result: 6 or newer" >&5
503d2be0
AS
6587echo "${ECHO_T}6 or newer" >&6
6588 cat >>confdefs.h <<\EOF
ba4481b5
DL
6589#define HAVE_X11XTR6 1
6590EOF
6591
6592 else
1096bcc0 6593 echo "$as_me:6593: result: before 6" >&5
503d2be0 6594echo "${ECHO_T}before 6" >&6
ba4481b5
DL
6595 fi
6596
6597 OLDLIBS="$LIBS"
6598 if test x$HAVE_X11XTR6 = xyes; then
6599 LIBS="-lXt -lSM -lICE $LIBS"
6600 else
6601 LIBS="-lXt $LIBS"
6602 fi
503d2be0 6603
1096bcc0 6604echo "$as_me:6604: checking for XmuConvertStandardSelection in -lXmu" >&5
503d2be0
AS
6605echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6
6606if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
6607 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6608else
503d2be0 6609 ac_check_lib_save_LIBS=$LIBS
ba4481b5 6610LIBS="-lXmu $LIBS"
503d2be0 6611cat >conftest.$ac_ext <<_ACEOF
1096bcc0 6612#line 6612 "configure"
ba4481b5 6613#include "confdefs.h"
503d2be0 6614
ba4481b5 6615/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6616#ifdef __cplusplus
6617extern "C"
6618#endif
ba4481b5 6619/* We use char because int might match the return type of a gcc2
503d2be0
AS
6620 builtin and then its argument prototype would still apply. */
6621char XmuConvertStandardSelection ();
6622int
6623main ()
6624{
6625XmuConvertStandardSelection ();
6626 ;
6627 return 0;
6628}
6629_ACEOF
6630rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 6631if { (eval echo "$as_me:6631: \"$ac_link\"") >&5
503d2be0
AS
6632 (eval $ac_link) 2>&5
6633 ac_status=$?
1096bcc0 6634 echo "$as_me:6634: \$? = $ac_status" >&5
503d2be0
AS
6635 (exit $ac_status); } &&
6636 { ac_try='test -s conftest$ac_exeext'
1096bcc0 6637 { (eval echo "$as_me:6637: \"$ac_try\"") >&5
503d2be0
AS
6638 (eval $ac_try) 2>&5
6639 ac_status=$?
1096bcc0 6640 echo "$as_me:6640: \$? = $ac_status" >&5
503d2be0
AS
6641 (exit $ac_status); }; }; then
6642 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
6643else
6644 echo "$as_me: failed program was:" >&5
6645cat conftest.$ac_ext >&5
6646ac_cv_lib_Xmu_XmuConvertStandardSelection=no
6647fi
6648rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6649LIBS=$ac_check_lib_save_LIBS
6650fi
1096bcc0 6651echo "$as_me:6651: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
503d2be0
AS
6652echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6
6653if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
6654 cat >>confdefs.h <<EOF
6655#define HAVE_LIBXMU 1
ba4481b5
DL
6656EOF
6657
6658 LIBS="-lXmu $LIBS"
6659
ba4481b5
DL
6660fi
6661
457b792c
GM
6662 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
6663fi
6664
6665# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
6666if test "${HAVE_X11}" = "yes"; then
6667 if test "${USE_X_TOOLKIT}" != "none"; then
503d2be0 6668
1096bcc0 6669echo "$as_me:6669: checking for XShapeQueryExtension in -lXext" >&5
503d2be0
AS
6670echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6
6671if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
6672 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 6673else
503d2be0 6674 ac_check_lib_save_LIBS=$LIBS
457b792c 6675LIBS="-lXext $LIBS"
503d2be0 6676cat >conftest.$ac_ext <<_ACEOF
1096bcc0 6677#line 6677 "configure"
457b792c 6678#include "confdefs.h"
503d2be0 6679
457b792c 6680/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6681#ifdef __cplusplus
6682extern "C"
6683#endif
457b792c 6684/* We use char because int might match the return type of a gcc2
503d2be0
AS
6685 builtin and then its argument prototype would still apply. */
6686char XShapeQueryExtension ();
6687int
6688main ()
6689{
6690XShapeQueryExtension ();
6691 ;
6692 return 0;
6693}
6694_ACEOF
6695rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 6696if { (eval echo "$as_me:6696: \"$ac_link\"") >&5
503d2be0
AS
6697 (eval $ac_link) 2>&5
6698 ac_status=$?
1096bcc0 6699 echo "$as_me:6699: \$? = $ac_status" >&5
503d2be0
AS
6700 (exit $ac_status); } &&
6701 { ac_try='test -s conftest$ac_exeext'
1096bcc0 6702 { (eval echo "$as_me:6702: \"$ac_try\"") >&5
503d2be0
AS
6703 (eval $ac_try) 2>&5
6704 ac_status=$?
1096bcc0 6705 echo "$as_me:6705: \$? = $ac_status" >&5
503d2be0
AS
6706 (exit $ac_status); }; }; then
6707 ac_cv_lib_Xext_XShapeQueryExtension=yes
6708else
6709 echo "$as_me: failed program was:" >&5
6710cat conftest.$ac_ext >&5
6711ac_cv_lib_Xext_XShapeQueryExtension=no
6712fi
6713rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6714LIBS=$ac_check_lib_save_LIBS
6715fi
1096bcc0 6716echo "$as_me:6716: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
503d2be0
AS
6717echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6
6718if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
6719 cat >>confdefs.h <<EOF
6720#define HAVE_LIBXEXT 1
457b792c
GM
6721EOF
6722
6723 LIBS="-lXext $LIBS"
6724
457b792c
GM
6725fi
6726
6727 fi
ba4481b5
DL
6728fi
6729
6730if test "${USE_X_TOOLKIT}" = "MOTIF"; then
1096bcc0 6731 echo "$as_me:6731: checking for Motif version 2.1" >&5
503d2be0
AS
6732echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6
6733if test "${emacs_cv_motif_version_2_1+set}" = set; then
6734 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6735else
503d2be0 6736 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 6737#line 6737 "configure"
ba4481b5
DL
6738#include "confdefs.h"
6739#include <Xm/Xm.h>
503d2be0
AS
6740int
6741main ()
6742{
ba4481b5
DL
6743#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
6744int x = 5;
6745#else
6746Motif version prior to 2.1.
6747#endif
503d2be0
AS
6748 ;
6749 return 0;
6750}
6751_ACEOF
6752rm -f conftest.$ac_objext
1096bcc0 6753if { (eval echo "$as_me:6753: \"$ac_compile\"") >&5
503d2be0
AS
6754 (eval $ac_compile) 2>&5
6755 ac_status=$?
1096bcc0 6756 echo "$as_me:6756: \$? = $ac_status" >&5
503d2be0
AS
6757 (exit $ac_status); } &&
6758 { ac_try='test -s conftest.$ac_objext'
1096bcc0 6759 { (eval echo "$as_me:6759: \"$ac_try\"") >&5
503d2be0
AS
6760 (eval $ac_try) 2>&5
6761 ac_status=$?
1096bcc0 6762 echo "$as_me:6762: \$? = $ac_status" >&5
503d2be0 6763 (exit $ac_status); }; }; then
ba4481b5
DL
6764 emacs_cv_motif_version_2_1=yes
6765else
503d2be0
AS
6766 echo "$as_me: failed program was:" >&5
6767cat conftest.$ac_ext >&5
6768emacs_cv_motif_version_2_1=no
ba4481b5 6769fi
503d2be0 6770rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 6771fi
1096bcc0 6772echo "$as_me:6772: result: $emacs_cv_motif_version_2_1" >&5
503d2be0 6773echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6
ba4481b5
DL
6774 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
6775 if test $emacs_cv_motif_version_2_1 = yes; then
169fe44e 6776 HAVE_LIBXP=no
503d2be0 6777 cat >>confdefs.h <<\EOF
ba4481b5
DL
6778#define HAVE_MOTIF_2_1 1
6779EOF
6780
1096bcc0 6781 echo "$as_me:6781: checking for XpCreateContext in -lXp" >&5
503d2be0
AS
6782echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6
6783if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
6784 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6785else
503d2be0 6786 ac_check_lib_save_LIBS=$LIBS
457b792c 6787LIBS="-lXp $LIBS"
503d2be0 6788cat >conftest.$ac_ext <<_ACEOF
1096bcc0 6789#line 6789 "configure"
ba4481b5 6790#include "confdefs.h"
503d2be0 6791
ba4481b5 6792/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6793#ifdef __cplusplus
6794extern "C"
6795#endif
ba4481b5 6796/* We use char because int might match the return type of a gcc2
503d2be0
AS
6797 builtin and then its argument prototype would still apply. */
6798char XpCreateContext ();
6799int
6800main ()
6801{
6802XpCreateContext ();
6803 ;
6804 return 0;
6805}
6806_ACEOF
6807rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 6808if { (eval echo "$as_me:6808: \"$ac_link\"") >&5
503d2be0
AS
6809 (eval $ac_link) 2>&5
6810 ac_status=$?
1096bcc0 6811 echo "$as_me:6811: \$? = $ac_status" >&5
503d2be0
AS
6812 (exit $ac_status); } &&
6813 { ac_try='test -s conftest$ac_exeext'
1096bcc0 6814 { (eval echo "$as_me:6814: \"$ac_try\"") >&5
503d2be0
AS
6815 (eval $ac_try) 2>&5
6816 ac_status=$?
1096bcc0 6817 echo "$as_me:6817: \$? = $ac_status" >&5
503d2be0
AS
6818 (exit $ac_status); }; }; then
6819 ac_cv_lib_Xp_XpCreateContext=yes
6820else
6821 echo "$as_me: failed program was:" >&5
6822cat conftest.$ac_ext >&5
6823ac_cv_lib_Xp_XpCreateContext=no
6824fi
6825rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6826LIBS=$ac_check_lib_save_LIBS
6827fi
1096bcc0 6828echo "$as_me:6828: result: $ac_cv_lib_Xp_XpCreateContext" >&5
503d2be0
AS
6829echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6
6830if test $ac_cv_lib_Xp_XpCreateContext = yes; then
48d4b120 6831 HAVE_LIBXP=yes
ba4481b5
DL
6832fi
6833
48d4b120 6834 if test ${HAVE_LIBXP} = yes; then
503d2be0 6835 cat >>confdefs.h <<\EOF
48d4b120
DL
6836#define HAVE_LIBXP 1
6837EOF
6838
503d2be0 6839 fi
ba4481b5
DL
6840 fi
6841fi
6842
6843### Is -lXaw3d available?
6844HAVE_XAW3D=no
6845if test "${HAVE_X11}" = "yes"; then
6846 if test "${USE_X_TOOLKIT}" != "none"; then
1096bcc0 6847 echo "$as_me:6847: checking for X11/Xaw3d/Scrollbar.h" >&5
503d2be0
AS
6848echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6
6849if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
6850 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6851else
503d2be0 6852 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 6853#line 6853 "configure"
ba4481b5
DL
6854#include "confdefs.h"
6855#include <X11/Xaw3d/Scrollbar.h>
503d2be0 6856_ACEOF
1096bcc0 6857if { (eval echo "$as_me:6857: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
6858 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6859 ac_status=$?
6860 egrep -v '^ *\+' conftest.er1 >conftest.err
6861 rm -f conftest.er1
6862 cat conftest.err >&5
1096bcc0 6863 echo "$as_me:6863: \$? = $ac_status" >&5
503d2be0
AS
6864 (exit $ac_status); } >/dev/null; then
6865 if test -s conftest.err; then
6866 ac_cpp_err=$ac_c_preproc_warn_flag
6867 else
6868 ac_cpp_err=
6869 fi
6870else
6871 ac_cpp_err=yes
6872fi
6873if test -z "$ac_cpp_err"; then
6874 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 6875else
503d2be0 6876 echo "$as_me: failed program was:" >&5
ba4481b5 6877 cat conftest.$ac_ext >&5
503d2be0 6878 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 6879fi
503d2be0 6880rm -f conftest.err conftest.$ac_ext
ba4481b5 6881fi
1096bcc0 6882echo "$as_me:6882: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
503d2be0
AS
6883echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6
6884if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
1096bcc0 6885 echo "$as_me:6885: checking for XawScrollbarSetThumb in -lXaw3d" >&5
503d2be0
AS
6886echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6
6887if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
6888 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6889else
503d2be0 6890 ac_check_lib_save_LIBS=$LIBS
457b792c 6891LIBS="-lXaw3d $LIBS"
503d2be0 6892cat >conftest.$ac_ext <<_ACEOF
1096bcc0 6893#line 6893 "configure"
ba4481b5 6894#include "confdefs.h"
503d2be0 6895
ba4481b5 6896/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
6897#ifdef __cplusplus
6898extern "C"
6899#endif
ba4481b5 6900/* We use char because int might match the return type of a gcc2
503d2be0
AS
6901 builtin and then its argument prototype would still apply. */
6902char XawScrollbarSetThumb ();
6903int
6904main ()
6905{
6906XawScrollbarSetThumb ();
6907 ;
6908 return 0;
6909}
6910_ACEOF
6911rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 6912if { (eval echo "$as_me:6912: \"$ac_link\"") >&5
503d2be0
AS
6913 (eval $ac_link) 2>&5
6914 ac_status=$?
1096bcc0 6915 echo "$as_me:6915: \$? = $ac_status" >&5
503d2be0
AS
6916 (exit $ac_status); } &&
6917 { ac_try='test -s conftest$ac_exeext'
1096bcc0 6918 { (eval echo "$as_me:6918: \"$ac_try\"") >&5
503d2be0
AS
6919 (eval $ac_try) 2>&5
6920 ac_status=$?
1096bcc0 6921 echo "$as_me:6921: \$? = $ac_status" >&5
503d2be0
AS
6922 (exit $ac_status); }; }; then
6923 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
6924else
6925 echo "$as_me: failed program was:" >&5
6926cat conftest.$ac_ext >&5
6927ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
6928fi
6929rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6930LIBS=$ac_check_lib_save_LIBS
6931fi
1096bcc0 6932echo "$as_me:6932: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
503d2be0
AS
6933echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6
6934if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
ba4481b5 6935 HAVE_XAW3D=yes
ba4481b5
DL
6936fi
6937
ba4481b5
DL
6938fi
6939
ba4481b5 6940 if test "${HAVE_XAW3D}" = "yes"; then
503d2be0 6941 cat >>confdefs.h <<\EOF
ba4481b5
DL
6942#define HAVE_XAW3D 1
6943EOF
6944
6945 fi
6946 fi
6947fi
ba4481b5
DL
6948
6949USE_TOOLKIT_SCROLL_BARS=no
6950if test "${with_toolkit_scroll_bars}" != "no"; then
6951 if test "${USE_X_TOOLKIT}" != "none"; then
6952 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
503d2be0 6953 cat >>confdefs.h <<\EOF
ba4481b5
DL
6954#define USE_TOOLKIT_SCROLL_BARS 1
6955EOF
6956
6957 HAVE_XAW3D=no
6958 USE_TOOLKIT_SCROLL_BARS=yes
6959 elif test "${HAVE_XAW3D}" = "yes"; then
503d2be0 6960 cat >>confdefs.h <<\EOF
ba4481b5
DL
6961#define USE_TOOLKIT_SCROLL_BARS 1
6962EOF
6963
6964 USE_TOOLKIT_SCROLL_BARS=yes
6965 fi
6966 fi
6967fi
6968
1d36487c 6969if test "${with_xim}" != "no"; then
503d2be0 6970 cat >>confdefs.h <<\EOF
1d36487c
GM
6971#define USE_XIM 1
6972EOF
6973
6974fi
6975
ba4481b5
DL
6976### Use -lXpm if available, unless `--with-xpm=no'.
6977HAVE_XPM=no
6978if test "${HAVE_X11}" = "yes"; then
6979 if test "${with_xpm}" != "no"; then
1096bcc0 6980 echo "$as_me:6980: checking for X11/xpm.h" >&5
503d2be0
AS
6981echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
6982if test "${ac_cv_header_X11_xpm_h+set}" = set; then
6983 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6984else
503d2be0 6985 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 6986#line 6986 "configure"
ba4481b5
DL
6987#include "confdefs.h"
6988#include <X11/xpm.h>
503d2be0 6989_ACEOF
1096bcc0 6990if { (eval echo "$as_me:6990: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
6991 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6992 ac_status=$?
6993 egrep -v '^ *\+' conftest.er1 >conftest.err
6994 rm -f conftest.er1
6995 cat conftest.err >&5
1096bcc0 6996 echo "$as_me:6996: \$? = $ac_status" >&5
503d2be0
AS
6997 (exit $ac_status); } >/dev/null; then
6998 if test -s conftest.err; then
6999 ac_cpp_err=$ac_c_preproc_warn_flag
7000 else
7001 ac_cpp_err=
7002 fi
7003else
7004 ac_cpp_err=yes
7005fi
7006if test -z "$ac_cpp_err"; then
7007 ac_cv_header_X11_xpm_h=yes
ba4481b5 7008else
503d2be0 7009 echo "$as_me: failed program was:" >&5
ba4481b5 7010 cat conftest.$ac_ext >&5
503d2be0 7011 ac_cv_header_X11_xpm_h=no
ba4481b5 7012fi
503d2be0 7013rm -f conftest.err conftest.$ac_ext
ba4481b5 7014fi
1096bcc0 7015echo "$as_me:7015: result: $ac_cv_header_X11_xpm_h" >&5
503d2be0
AS
7016echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
7017if test $ac_cv_header_X11_xpm_h = yes; then
1096bcc0 7018 echo "$as_me:7018: checking for XpmReadFileToPixmap in -lXpm" >&5
503d2be0
AS
7019echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6
7020if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
7021 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7022else
503d2be0 7023 ac_check_lib_save_LIBS=$LIBS
ba4481b5 7024LIBS="-lXpm -lX11 $LIBS"
503d2be0 7025cat >conftest.$ac_ext <<_ACEOF
1096bcc0 7026#line 7026 "configure"
ba4481b5 7027#include "confdefs.h"
503d2be0 7028
ba4481b5 7029/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7030#ifdef __cplusplus
7031extern "C"
7032#endif
ba4481b5 7033/* We use char because int might match the return type of a gcc2
503d2be0
AS
7034 builtin and then its argument prototype would still apply. */
7035char XpmReadFileToPixmap ();
7036int
7037main ()
7038{
7039XpmReadFileToPixmap ();
7040 ;
7041 return 0;
7042}
7043_ACEOF
7044rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 7045if { (eval echo "$as_me:7045: \"$ac_link\"") >&5
503d2be0
AS
7046 (eval $ac_link) 2>&5
7047 ac_status=$?
1096bcc0 7048 echo "$as_me:7048: \$? = $ac_status" >&5
503d2be0
AS
7049 (exit $ac_status); } &&
7050 { ac_try='test -s conftest$ac_exeext'
1096bcc0 7051 { (eval echo "$as_me:7051: \"$ac_try\"") >&5
503d2be0
AS
7052 (eval $ac_try) 2>&5
7053 ac_status=$?
1096bcc0 7054 echo "$as_me:7054: \$? = $ac_status" >&5
503d2be0
AS
7055 (exit $ac_status); }; }; then
7056 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
7057else
7058 echo "$as_me: failed program was:" >&5
7059cat conftest.$ac_ext >&5
7060ac_cv_lib_Xpm_XpmReadFileToPixmap=no
7061fi
7062rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7063LIBS=$ac_check_lib_save_LIBS
7064fi
1096bcc0 7065echo "$as_me:7065: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
503d2be0
AS
7066echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6
7067if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
ba4481b5 7068 HAVE_XPM=yes
ba4481b5
DL
7069fi
7070
ba4481b5
DL
7071fi
7072
4b92c49a 7073 if test "${HAVE_XPM}" = "yes"; then
1096bcc0 7074 echo "$as_me:7074: checking for XpmReturnAllocPixels preprocessor define" >&5
503d2be0
AS
7075echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6
7076 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 7077#line 7077 "configure"
4b92c49a
GM
7078#include "confdefs.h"
7079#include "X11/xpm.h"
7080#ifndef XpmReturnAllocPixels
7081no_return_alloc_pixels
7082#endif
503d2be0
AS
7083
7084_ACEOF
4b92c49a
GM
7085if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7086 egrep "no_return_alloc_pixels" >/dev/null 2>&1; then
4b92c49a
GM
7087 HAVE_XPM=no
7088else
4b92c49a
GM
7089 HAVE_XPM=yes
7090fi
7091rm -f conftest*
7092
5721ae13 7093 if test "${HAVE_XPM}" = "yes"; then
1096bcc0 7094 echo "$as_me:7094: result: yes" >&5
503d2be0 7095echo "${ECHO_T}yes" >&6
5721ae13 7096 else
1096bcc0 7097 echo "$as_me:7097: result: no" >&5
503d2be0 7098echo "${ECHO_T}no" >&6
5721ae13 7099 fi
ff8df3be 7100 fi
ba4481b5
DL
7101 fi
7102
7103 if test "${HAVE_XPM}" = "yes"; then
503d2be0 7104 cat >>confdefs.h <<\EOF
ba4481b5
DL
7105#define HAVE_XPM 1
7106EOF
7107
7108 fi
7109fi
503d2be0 7110
ba4481b5
DL
7111### Use -ljpeg if available, unless `--with-jpeg=no'.
7112HAVE_JPEG=no
7113if test "${HAVE_X11}" = "yes"; then
7114 if test "${with_jpeg}" != "no"; then
1096bcc0 7115 echo "$as_me:7115: checking for jerror.h" >&5
503d2be0
AS
7116echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
7117if test "${ac_cv_header_jerror_h+set}" = set; then
7118 echo $ECHO_N "(cached) $ECHO_C" >&6
ffe36136 7119else
503d2be0 7120 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 7121#line 7121 "configure"
ffe36136
GM
7122#include "confdefs.h"
7123#include <jerror.h>
503d2be0 7124_ACEOF
1096bcc0 7125if { (eval echo "$as_me:7125: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
7126 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7127 ac_status=$?
7128 egrep -v '^ *\+' conftest.er1 >conftest.err
7129 rm -f conftest.er1
7130 cat conftest.err >&5
1096bcc0 7131 echo "$as_me:7131: \$? = $ac_status" >&5
503d2be0
AS
7132 (exit $ac_status); } >/dev/null; then
7133 if test -s conftest.err; then
7134 ac_cpp_err=$ac_c_preproc_warn_flag
7135 else
7136 ac_cpp_err=
7137 fi
7138else
7139 ac_cpp_err=yes
7140fi
7141if test -z "$ac_cpp_err"; then
7142 ac_cv_header_jerror_h=yes
ffe36136 7143else
503d2be0 7144 echo "$as_me: failed program was:" >&5
ffe36136 7145 cat conftest.$ac_ext >&5
503d2be0 7146 ac_cv_header_jerror_h=no
ffe36136 7147fi
503d2be0 7148rm -f conftest.err conftest.$ac_ext
ffe36136 7149fi
1096bcc0 7150echo "$as_me:7150: result: $ac_cv_header_jerror_h" >&5
503d2be0
AS
7151echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
7152if test $ac_cv_header_jerror_h = yes; then
1096bcc0 7153 echo "$as_me:7153: checking for jpeg_destroy_compress in -ljpeg" >&5
503d2be0
AS
7154echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6
7155if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
7156 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7157else
503d2be0 7158 ac_check_lib_save_LIBS=$LIBS
457b792c 7159LIBS="-ljpeg $LIBS"
503d2be0 7160cat >conftest.$ac_ext <<_ACEOF
1096bcc0 7161#line 7161 "configure"
ba4481b5 7162#include "confdefs.h"
503d2be0 7163
ba4481b5 7164/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7165#ifdef __cplusplus
7166extern "C"
7167#endif
ba4481b5 7168/* We use char because int might match the return type of a gcc2
503d2be0
AS
7169 builtin and then its argument prototype would still apply. */
7170char jpeg_destroy_compress ();
7171int
7172main ()
7173{
7174jpeg_destroy_compress ();
7175 ;
7176 return 0;
7177}
7178_ACEOF
7179rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 7180if { (eval echo "$as_me:7180: \"$ac_link\"") >&5
503d2be0
AS
7181 (eval $ac_link) 2>&5
7182 ac_status=$?
1096bcc0 7183 echo "$as_me:7183: \$? = $ac_status" >&5
503d2be0
AS
7184 (exit $ac_status); } &&
7185 { ac_try='test -s conftest$ac_exeext'
1096bcc0 7186 { (eval echo "$as_me:7186: \"$ac_try\"") >&5
503d2be0
AS
7187 (eval $ac_try) 2>&5
7188 ac_status=$?
1096bcc0 7189 echo "$as_me:7189: \$? = $ac_status" >&5
503d2be0
AS
7190 (exit $ac_status); }; }; then
7191 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
7192else
7193 echo "$as_me: failed program was:" >&5
7194cat conftest.$ac_ext >&5
7195ac_cv_lib_jpeg_jpeg_destroy_compress=no
7196fi
7197rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7198LIBS=$ac_check_lib_save_LIBS
7199fi
1096bcc0 7200echo "$as_me:7200: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
503d2be0
AS
7201echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6
7202if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
ba4481b5 7203 HAVE_JPEG=yes
ffe36136
GM
7204fi
7205
ba4481b5
DL
7206fi
7207
ba4481b5
DL
7208 fi
7209
7210 if test "${HAVE_JPEG}" = "yes"; then
503d2be0 7211 cat >>confdefs.h <<\EOF
ba4481b5
DL
7212#define HAVE_JPEG 1
7213EOF
7214
7215 fi
7216fi
503d2be0 7217
ba4481b5
DL
7218### Use -lpng if available, unless `--with-png=no'.
7219HAVE_PNG=no
7220if test "${HAVE_X11}" = "yes"; then
7221 if test "${with_png}" != "no"; then
1096bcc0 7222 echo "$as_me:7222: checking for png.h" >&5
503d2be0
AS
7223echo $ECHO_N "checking for png.h... $ECHO_C" >&6
7224if test "${ac_cv_header_png_h+set}" = set; then
7225 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7226else
503d2be0 7227 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 7228#line 7228 "configure"
ba4481b5
DL
7229#include "confdefs.h"
7230#include <png.h>
503d2be0 7231_ACEOF
1096bcc0 7232if { (eval echo "$as_me:7232: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
7233 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7234 ac_status=$?
7235 egrep -v '^ *\+' conftest.er1 >conftest.err
7236 rm -f conftest.er1
7237 cat conftest.err >&5
1096bcc0 7238 echo "$as_me:7238: \$? = $ac_status" >&5
503d2be0
AS
7239 (exit $ac_status); } >/dev/null; then
7240 if test -s conftest.err; then
7241 ac_cpp_err=$ac_c_preproc_warn_flag
7242 else
7243 ac_cpp_err=
7244 fi
7245else
7246 ac_cpp_err=yes
7247fi
7248if test -z "$ac_cpp_err"; then
7249 ac_cv_header_png_h=yes
ba4481b5 7250else
503d2be0 7251 echo "$as_me: failed program was:" >&5
ba4481b5 7252 cat conftest.$ac_ext >&5
503d2be0 7253 ac_cv_header_png_h=no
ba4481b5 7254fi
503d2be0 7255rm -f conftest.err conftest.$ac_ext
ba4481b5 7256fi
1096bcc0 7257echo "$as_me:7257: result: $ac_cv_header_png_h" >&5
503d2be0
AS
7258echo "${ECHO_T}$ac_cv_header_png_h" >&6
7259if test $ac_cv_header_png_h = yes; then
1096bcc0 7260 echo "$as_me:7260: checking for png_get_channels in -lpng" >&5
503d2be0
AS
7261echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6
7262if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
7263 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7264else
503d2be0 7265 ac_check_lib_save_LIBS=$LIBS
457b792c 7266LIBS="-lpng -lz -lm $LIBS"
503d2be0 7267cat >conftest.$ac_ext <<_ACEOF
1096bcc0 7268#line 7268 "configure"
ba4481b5 7269#include "confdefs.h"
503d2be0 7270
ba4481b5 7271/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7272#ifdef __cplusplus
7273extern "C"
7274#endif
ba4481b5 7275/* We use char because int might match the return type of a gcc2
503d2be0
AS
7276 builtin and then its argument prototype would still apply. */
7277char png_get_channels ();
7278int
7279main ()
7280{
7281png_get_channels ();
7282 ;
7283 return 0;
7284}
7285_ACEOF
7286rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 7287if { (eval echo "$as_me:7287: \"$ac_link\"") >&5
503d2be0
AS
7288 (eval $ac_link) 2>&5
7289 ac_status=$?
1096bcc0 7290 echo "$as_me:7290: \$? = $ac_status" >&5
503d2be0
AS
7291 (exit $ac_status); } &&
7292 { ac_try='test -s conftest$ac_exeext'
1096bcc0 7293 { (eval echo "$as_me:7293: \"$ac_try\"") >&5
503d2be0
AS
7294 (eval $ac_try) 2>&5
7295 ac_status=$?
1096bcc0 7296 echo "$as_me:7296: \$? = $ac_status" >&5
503d2be0
AS
7297 (exit $ac_status); }; }; then
7298 ac_cv_lib_png_png_get_channels=yes
7299else
7300 echo "$as_me: failed program was:" >&5
7301cat conftest.$ac_ext >&5
7302ac_cv_lib_png_png_get_channels=no
7303fi
7304rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7305LIBS=$ac_check_lib_save_LIBS
7306fi
1096bcc0 7307echo "$as_me:7307: result: $ac_cv_lib_png_png_get_channels" >&5
503d2be0
AS
7308echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6
7309if test $ac_cv_lib_png_png_get_channels = yes; then
ba4481b5 7310 HAVE_PNG=yes
ba4481b5
DL
7311fi
7312
ba4481b5
DL
7313fi
7314
ba4481b5
DL
7315 fi
7316
7317 if test "${HAVE_PNG}" = "yes"; then
503d2be0 7318 cat >>confdefs.h <<\EOF
ba4481b5
DL
7319#define HAVE_PNG 1
7320EOF
7321
7322 fi
7323fi
503d2be0 7324
ba4481b5
DL
7325### Use -ltiff if available, unless `--with-tiff=no'.
7326HAVE_TIFF=no
7327if test "${HAVE_X11}" = "yes"; then
7328 if test "${with_tiff}" != "no"; then
1096bcc0 7329 echo "$as_me:7329: checking for tiffio.h" >&5
503d2be0
AS
7330echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
7331if test "${ac_cv_header_tiffio_h+set}" = set; then
7332 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7333else
503d2be0 7334 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 7335#line 7335 "configure"
ba4481b5
DL
7336#include "confdefs.h"
7337#include <tiffio.h>
503d2be0 7338_ACEOF
1096bcc0 7339if { (eval echo "$as_me:7339: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
7340 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7341 ac_status=$?
7342 egrep -v '^ *\+' conftest.er1 >conftest.err
7343 rm -f conftest.er1
7344 cat conftest.err >&5
1096bcc0 7345 echo "$as_me:7345: \$? = $ac_status" >&5
503d2be0
AS
7346 (exit $ac_status); } >/dev/null; then
7347 if test -s conftest.err; then
7348 ac_cpp_err=$ac_c_preproc_warn_flag
7349 else
7350 ac_cpp_err=
7351 fi
7352else
7353 ac_cpp_err=yes
7354fi
7355if test -z "$ac_cpp_err"; then
7356 ac_cv_header_tiffio_h=yes
ba4481b5 7357else
503d2be0 7358 echo "$as_me: failed program was:" >&5
ba4481b5 7359 cat conftest.$ac_ext >&5
503d2be0 7360 ac_cv_header_tiffio_h=no
ba4481b5 7361fi
503d2be0 7362rm -f conftest.err conftest.$ac_ext
ba4481b5 7363fi
1096bcc0 7364echo "$as_me:7364: result: $ac_cv_header_tiffio_h" >&5
503d2be0
AS
7365echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
7366if test $ac_cv_header_tiffio_h = yes; then
457b792c 7367 tifflibs="-lz -lm"
3b3cc4a4
KR
7368 # At least one tiff package requires the jpeg library.
7369 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
1096bcc0 7370 echo "$as_me:7370: checking for TIFFGetVersion in -ltiff" >&5
503d2be0
AS
7371echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6
7372if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
7373 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7374else
503d2be0 7375 ac_check_lib_save_LIBS=$LIBS
3b3cc4a4 7376LIBS="-ltiff $tifflibs $LIBS"
503d2be0 7377cat >conftest.$ac_ext <<_ACEOF
1096bcc0 7378#line 7378 "configure"
ba4481b5 7379#include "confdefs.h"
503d2be0 7380
ba4481b5 7381/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7382#ifdef __cplusplus
7383extern "C"
7384#endif
ba4481b5 7385/* We use char because int might match the return type of a gcc2
503d2be0
AS
7386 builtin and then its argument prototype would still apply. */
7387char TIFFGetVersion ();
7388int
7389main ()
7390{
7391TIFFGetVersion ();
7392 ;
7393 return 0;
7394}
7395_ACEOF
7396rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 7397if { (eval echo "$as_me:7397: \"$ac_link\"") >&5
503d2be0
AS
7398 (eval $ac_link) 2>&5
7399 ac_status=$?
1096bcc0 7400 echo "$as_me:7400: \$? = $ac_status" >&5
503d2be0
AS
7401 (exit $ac_status); } &&
7402 { ac_try='test -s conftest$ac_exeext'
1096bcc0 7403 { (eval echo "$as_me:7403: \"$ac_try\"") >&5
503d2be0
AS
7404 (eval $ac_try) 2>&5
7405 ac_status=$?
1096bcc0 7406 echo "$as_me:7406: \$? = $ac_status" >&5
503d2be0
AS
7407 (exit $ac_status); }; }; then
7408 ac_cv_lib_tiff_TIFFGetVersion=yes
7409else
7410 echo "$as_me: failed program was:" >&5
7411cat conftest.$ac_ext >&5
7412ac_cv_lib_tiff_TIFFGetVersion=no
7413fi
7414rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7415LIBS=$ac_check_lib_save_LIBS
7416fi
1096bcc0 7417echo "$as_me:7417: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
503d2be0
AS
7418echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6
7419if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
ba4481b5 7420 HAVE_TIFF=yes
ba4481b5
DL
7421fi
7422
ba4481b5
DL
7423fi
7424
ba4481b5
DL
7425 fi
7426
7427 if test "${HAVE_TIFF}" = "yes"; then
503d2be0 7428 cat >>confdefs.h <<\EOF
ba4481b5
DL
7429#define HAVE_TIFF 1
7430EOF
7431
7432 fi
7433fi
503d2be0 7434
ba4481b5
DL
7435### Use -lgif if available, unless `--with-gif=no'.
7436HAVE_GIF=no
7437if test "${HAVE_X11}" = "yes"; then
7438 if test "${with_gif}" != "no"; then
1096bcc0 7439 echo "$as_me:7439: checking for gif_lib.h" >&5
503d2be0
AS
7440echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
7441if test "${ac_cv_header_gif_lib_h+set}" = set; then
7442 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7443else
503d2be0 7444 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 7445#line 7445 "configure"
ba4481b5
DL
7446#include "confdefs.h"
7447#include <gif_lib.h>
503d2be0 7448_ACEOF
1096bcc0 7449if { (eval echo "$as_me:7449: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
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
1096bcc0 7455 echo "$as_me:7455: \$? = $ac_status" >&5
503d2be0
AS
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
7466 ac_cv_header_gif_lib_h=yes
ba4481b5 7467else
503d2be0 7468 echo "$as_me: failed program was:" >&5
ba4481b5 7469 cat conftest.$ac_ext >&5
503d2be0 7470 ac_cv_header_gif_lib_h=no
ba4481b5 7471fi
503d2be0 7472rm -f conftest.err conftest.$ac_ext
ba4481b5 7473fi
1096bcc0 7474echo "$as_me:7474: result: $ac_cv_header_gif_lib_h" >&5
503d2be0
AS
7475echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
7476if test $ac_cv_header_gif_lib_h = yes; then
1096bcc0 7477 echo "$as_me:7477: checking for DGifOpen in -lungif" >&5
503d2be0
AS
7478echo $ECHO_N "checking for DGifOpen in -lungif... $ECHO_C" >&6
7479if test "${ac_cv_lib_ungif_DGifOpen+set}" = set; then
7480 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7481else
503d2be0 7482 ac_check_lib_save_LIBS=$LIBS
457b792c 7483LIBS="-lungif $LIBS"
503d2be0 7484cat >conftest.$ac_ext <<_ACEOF
1096bcc0 7485#line 7485 "configure"
ba4481b5 7486#include "confdefs.h"
503d2be0 7487
ba4481b5 7488/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7489#ifdef __cplusplus
7490extern "C"
7491#endif
ba4481b5 7492/* We use char because int might match the return type of a gcc2
503d2be0
AS
7493 builtin and then its argument prototype would still apply. */
7494char DGifOpen ();
7495int
7496main ()
7497{
7498DGifOpen ();
7499 ;
7500 return 0;
7501}
7502_ACEOF
7503rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 7504if { (eval echo "$as_me:7504: \"$ac_link\"") >&5
503d2be0
AS
7505 (eval $ac_link) 2>&5
7506 ac_status=$?
1096bcc0 7507 echo "$as_me:7507: \$? = $ac_status" >&5
503d2be0
AS
7508 (exit $ac_status); } &&
7509 { ac_try='test -s conftest$ac_exeext'
1096bcc0 7510 { (eval echo "$as_me:7510: \"$ac_try\"") >&5
503d2be0
AS
7511 (eval $ac_try) 2>&5
7512 ac_status=$?
1096bcc0 7513 echo "$as_me:7513: \$? = $ac_status" >&5
503d2be0
AS
7514 (exit $ac_status); }; }; then
7515 ac_cv_lib_ungif_DGifOpen=yes
7516else
7517 echo "$as_me: failed program was:" >&5
7518cat conftest.$ac_ext >&5
7519ac_cv_lib_ungif_DGifOpen=no
7520fi
7521rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7522LIBS=$ac_check_lib_save_LIBS
7523fi
1096bcc0 7524echo "$as_me:7524: result: $ac_cv_lib_ungif_DGifOpen" >&5
503d2be0
AS
7525echo "${ECHO_T}$ac_cv_lib_ungif_DGifOpen" >&6
7526if test $ac_cv_lib_ungif_DGifOpen = yes; then
ba4481b5 7527 HAVE_GIF=yes
ba4481b5
DL
7528fi
7529
ba4481b5
DL
7530fi
7531
ba4481b5
DL
7532 fi
7533
7534 if test "${HAVE_GIF}" = "yes"; then
503d2be0 7535 cat >>confdefs.h <<\EOF
ba4481b5
DL
7536#define HAVE_GIF 1
7537EOF
7538
7539 fi
7540fi
7541
7542# If netdb.h doesn't declare h_errno, we must declare it by hand.
1096bcc0 7543echo "$as_me:7543: checking whether netdb declares h_errno" >&5
503d2be0
AS
7544echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6
7545if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
7546 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7547else
503d2be0 7548 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 7549#line 7549 "configure"
ba4481b5
DL
7550#include "confdefs.h"
7551#include <netdb.h>
503d2be0
AS
7552int
7553main ()
7554{
ba4481b5 7555return h_errno;
503d2be0
AS
7556 ;
7557 return 0;
7558}
7559_ACEOF
7560rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 7561if { (eval echo "$as_me:7561: \"$ac_link\"") >&5
503d2be0
AS
7562 (eval $ac_link) 2>&5
7563 ac_status=$?
1096bcc0 7564 echo "$as_me:7564: \$? = $ac_status" >&5
503d2be0
AS
7565 (exit $ac_status); } &&
7566 { ac_try='test -s conftest$ac_exeext'
1096bcc0 7567 { (eval echo "$as_me:7567: \"$ac_try\"") >&5
503d2be0
AS
7568 (eval $ac_try) 2>&5
7569 ac_status=$?
1096bcc0 7570 echo "$as_me:7570: \$? = $ac_status" >&5
503d2be0 7571 (exit $ac_status); }; }; then
ba4481b5
DL
7572 emacs_cv_netdb_declares_h_errno=yes
7573else
503d2be0
AS
7574 echo "$as_me: failed program was:" >&5
7575cat conftest.$ac_ext >&5
7576emacs_cv_netdb_declares_h_errno=no
ba4481b5 7577fi
503d2be0 7578rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 7579fi
1096bcc0 7580echo "$as_me:7580: result: $emacs_cv_netdb_declares_h_errno" >&5
503d2be0 7581echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6
ba4481b5 7582if test $emacs_cv_netdb_declares_h_errno = yes; then
503d2be0 7583 cat >>confdefs.h <<\EOF
ba4481b5
DL
7584#define HAVE_H_ERRNO 1
7585EOF
7586
7587fi
7588
7589# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7590# for constant arguments. Useless!
1096bcc0 7591echo "$as_me:7591: checking for working alloca.h" >&5
503d2be0
AS
7592echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
7593if test "${ac_cv_working_alloca_h+set}" = set; then
7594 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7595else
503d2be0 7596 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 7597#line 7597 "configure"
ba4481b5
DL
7598#include "confdefs.h"
7599#include <alloca.h>
503d2be0
AS
7600int
7601main ()
7602{
7603char *p = (char *) alloca (2 * sizeof (int));
7604 ;
7605 return 0;
7606}
7607_ACEOF
7608rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 7609if { (eval echo "$as_me:7609: \"$ac_link\"") >&5
503d2be0
AS
7610 (eval $ac_link) 2>&5
7611 ac_status=$?
1096bcc0 7612 echo "$as_me:7612: \$? = $ac_status" >&5
503d2be0
AS
7613 (exit $ac_status); } &&
7614 { ac_try='test -s conftest$ac_exeext'
1096bcc0 7615 { (eval echo "$as_me:7615: \"$ac_try\"") >&5
503d2be0
AS
7616 (eval $ac_try) 2>&5
7617 ac_status=$?
1096bcc0 7618 echo "$as_me:7618: \$? = $ac_status" >&5
503d2be0
AS
7619 (exit $ac_status); }; }; then
7620 ac_cv_working_alloca_h=yes
7621else
7622 echo "$as_me: failed program was:" >&5
7623cat conftest.$ac_ext >&5
7624ac_cv_working_alloca_h=no
7625fi
7626rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7627fi
1096bcc0 7628echo "$as_me:7628: result: $ac_cv_working_alloca_h" >&5
503d2be0
AS
7629echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
7630if test $ac_cv_working_alloca_h = yes; then
7631
7632cat >>confdefs.h <<\EOF
ba4481b5
DL
7633#define HAVE_ALLOCA_H 1
7634EOF
7635
7636fi
7637
1096bcc0 7638echo "$as_me:7638: checking for alloca" >&5
503d2be0
AS
7639echo $ECHO_N "checking for alloca... $ECHO_C" >&6
7640if test "${ac_cv_func_alloca_works+set}" = set; then
7641 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7642else
503d2be0 7643 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 7644#line 7644 "configure"
ba4481b5 7645#include "confdefs.h"
ba4481b5
DL
7646#ifdef __GNUC__
7647# define alloca __builtin_alloca
7648#else
c4bb2108
DL
7649# ifdef _MSC_VER
7650# include <malloc.h>
7651# define alloca _alloca
ba4481b5 7652# else
c4bb2108
DL
7653# if HAVE_ALLOCA_H
7654# include <alloca.h>
22afa6e8 7655# else
c4bb2108
DL
7656# ifdef _AIX
7657 #pragma alloca
7658# else
7659# ifndef alloca /* predefined by HP cc +Olibcalls */
ba4481b5 7660char *alloca ();
c4bb2108 7661# endif
ba4481b5
DL
7662# endif
7663# endif
7664# endif
7665#endif
7666
503d2be0
AS
7667int
7668main ()
7669{
7670char *p = (char *) alloca (1);
7671 ;
7672 return 0;
7673}
7674_ACEOF
7675rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 7676if { (eval echo "$as_me:7676: \"$ac_link\"") >&5
503d2be0
AS
7677 (eval $ac_link) 2>&5
7678 ac_status=$?
1096bcc0 7679 echo "$as_me:7679: \$? = $ac_status" >&5
503d2be0
AS
7680 (exit $ac_status); } &&
7681 { ac_try='test -s conftest$ac_exeext'
1096bcc0 7682 { (eval echo "$as_me:7682: \"$ac_try\"") >&5
503d2be0
AS
7683 (eval $ac_try) 2>&5
7684 ac_status=$?
1096bcc0 7685 echo "$as_me:7685: \$? = $ac_status" >&5
503d2be0 7686 (exit $ac_status); }; }; then
ba4481b5
DL
7687 ac_cv_func_alloca_works=yes
7688else
503d2be0
AS
7689 echo "$as_me: failed program was:" >&5
7690cat conftest.$ac_ext >&5
7691ac_cv_func_alloca_works=no
ba4481b5 7692fi
503d2be0 7693rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 7694fi
1096bcc0 7695echo "$as_me:7695: result: $ac_cv_func_alloca_works" >&5
503d2be0 7696echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
ba4481b5 7697
ba4481b5 7698if test $ac_cv_func_alloca_works = yes; then
503d2be0
AS
7699
7700cat >>confdefs.h <<\EOF
ba4481b5
DL
7701#define HAVE_ALLOCA 1
7702EOF
7703
503d2be0 7704else
ba4481b5 7705 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
503d2be0
AS
7706# that cause trouble. Some versions do not even contain alloca or
7707# contain a buggy version. If you still want to use their alloca,
7708# use ar to extract alloca.o from them instead of compiling alloca.c.
7709
7710ALLOCA=alloca.$ac_objext
7711
7712cat >>confdefs.h <<\EOF
ba4481b5
DL
7713#define C_ALLOCA 1
7714EOF
7715
1096bcc0 7716echo "$as_me:7716: checking whether \`alloca.c' needs Cray hooks" >&5
503d2be0
AS
7717echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
7718if test "${ac_cv_os_cray+set}" = set; then
7719 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7720else
503d2be0 7721 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 7722#line 7722 "configure"
ba4481b5
DL
7723#include "confdefs.h"
7724#if defined(CRAY) && ! defined(CRAY2)
7725webecray
7726#else
7727wenotbecray
7728#endif
7729
503d2be0 7730_ACEOF
ba4481b5
DL
7731if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7732 egrep "webecray" >/dev/null 2>&1; then
ba4481b5
DL
7733 ac_cv_os_cray=yes
7734else
ba4481b5
DL
7735 ac_cv_os_cray=no
7736fi
7737rm -f conftest*
7738
7739fi
1096bcc0 7740echo "$as_me:7740: result: $ac_cv_os_cray" >&5
503d2be0 7741echo "${ECHO_T}$ac_cv_os_cray" >&6
ba4481b5 7742if test $ac_cv_os_cray = yes; then
503d2be0
AS
7743 for ac_func in _getb67 GETB67 getb67; do
7744 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
1096bcc0 7745echo "$as_me:7745: checking for $ac_func" >&5
503d2be0
AS
7746echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7747if eval "test \"\${$as_ac_var+set}\" = set"; then
7748 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7749else
503d2be0 7750 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 7751#line 7751 "configure"
ba4481b5
DL
7752#include "confdefs.h"
7753/* System header to define __stub macros and hopefully few prototypes,
503d2be0 7754 which can conflict with char $ac_func (); below. */
ba4481b5
DL
7755#include <assert.h>
7756/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7757#ifdef __cplusplus
7758extern "C"
7759#endif
ba4481b5 7760/* We use char because int might match the return type of a gcc2
503d2be0
AS
7761 builtin and then its argument prototype would still apply. */
7762char $ac_func ();
7763char (*f) ();
ba4481b5 7764
503d2be0
AS
7765int
7766main ()
7767{
ba4481b5
DL
7768/* The GNU C library defines this for functions which it implements
7769 to always fail with ENOSYS. Some functions are actually named
7770 something starting with __ and the normal name is an alias. */
7771#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7772choke me
7773#else
503d2be0 7774f = $ac_func;
ba4481b5
DL
7775#endif
7776
503d2be0
AS
7777 ;
7778 return 0;
7779}
7780_ACEOF
7781rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 7782if { (eval echo "$as_me:7782: \"$ac_link\"") >&5
503d2be0
AS
7783 (eval $ac_link) 2>&5
7784 ac_status=$?
1096bcc0 7785 echo "$as_me:7785: \$? = $ac_status" >&5
503d2be0
AS
7786 (exit $ac_status); } &&
7787 { ac_try='test -s conftest$ac_exeext'
1096bcc0 7788 { (eval echo "$as_me:7788: \"$ac_try\"") >&5
503d2be0
AS
7789 (eval $ac_try) 2>&5
7790 ac_status=$?
1096bcc0 7791 echo "$as_me:7791: \$? = $ac_status" >&5
503d2be0
AS
7792 (exit $ac_status); }; }; then
7793 eval "$as_ac_var=yes"
7794else
7795 echo "$as_me: failed program was:" >&5
7796cat conftest.$ac_ext >&5
7797eval "$as_ac_var=no"
7798fi
7799rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7800fi
1096bcc0 7801echo "$as_me:7801: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
7802echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7803if test `eval echo '${'$as_ac_var'}'` = yes; then
7804
7805cat >>confdefs.h <<EOF
ba4481b5
DL
7806#define CRAY_STACKSEG_END $ac_func
7807EOF
7808
503d2be0 7809 break
ba4481b5
DL
7810fi
7811
503d2be0 7812 done
ba4481b5
DL
7813fi
7814
1096bcc0 7815echo "$as_me:7815: checking stack direction for C alloca" >&5
503d2be0
AS
7816echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
7817if test "${ac_cv_c_stack_direction+set}" = set; then
7818 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
7819else
7820 if test "$cross_compiling" = yes; then
7821 ac_cv_c_stack_direction=0
7822else
503d2be0 7823 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 7824#line 7824 "configure"
ba4481b5 7825#include "confdefs.h"
503d2be0 7826int
ba4481b5
DL
7827find_stack_direction ()
7828{
7829 static char *addr = 0;
7830 auto char dummy;
7831 if (addr == 0)
7832 {
7833 addr = &dummy;
7834 return find_stack_direction ();
7835 }
7836 else
7837 return (&dummy > addr) ? 1 : -1;
7838}
503d2be0
AS
7839
7840int
ba4481b5
DL
7841main ()
7842{
503d2be0 7843 exit (find_stack_direction () < 0);
ba4481b5 7844}
503d2be0
AS
7845_ACEOF
7846rm -f conftest$ac_exeext
1096bcc0 7847if { (eval echo "$as_me:7847: \"$ac_link\"") >&5
503d2be0
AS
7848 (eval $ac_link) 2>&5
7849 ac_status=$?
1096bcc0 7850 echo "$as_me:7850: \$? = $ac_status" >&5
503d2be0 7851 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
1096bcc0 7852 { (eval echo "$as_me:7852: \"$ac_try\"") >&5
503d2be0
AS
7853 (eval $ac_try) 2>&5
7854 ac_status=$?
1096bcc0 7855 echo "$as_me:7855: \$? = $ac_status" >&5
503d2be0 7856 (exit $ac_status); }; }; then
ba4481b5
DL
7857 ac_cv_c_stack_direction=1
7858else
503d2be0
AS
7859 echo "$as_me: program exited with status $ac_status" >&5
7860echo "$as_me: failed program was:" >&5
7861cat conftest.$ac_ext >&5
7862ac_cv_c_stack_direction=-1
ba4481b5 7863fi
503d2be0 7864rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 7865fi
ba4481b5 7866fi
1096bcc0 7867echo "$as_me:7867: result: $ac_cv_c_stack_direction" >&5
503d2be0 7868echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
ba4481b5 7869
503d2be0 7870cat >>confdefs.h <<EOF
ba4481b5
DL
7871#define STACK_DIRECTION $ac_cv_c_stack_direction
7872EOF
7873
7874fi
7875
ba4481b5
DL
7876# fmod, logb, and frexp are found in -lm on most systems.
7877# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
503d2be0 7878
1096bcc0 7879echo "$as_me:7879: checking for sqrt in -lm" >&5
503d2be0
AS
7880echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
7881if test "${ac_cv_lib_m_sqrt+set}" = set; then
7882 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7883else
503d2be0 7884 ac_check_lib_save_LIBS=$LIBS
ba4481b5 7885LIBS="-lm $LIBS"
503d2be0 7886cat >conftest.$ac_ext <<_ACEOF
1096bcc0 7887#line 7887 "configure"
ba4481b5 7888#include "confdefs.h"
503d2be0 7889
ba4481b5 7890/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7891#ifdef __cplusplus
7892extern "C"
7893#endif
ba4481b5 7894/* We use char because int might match the return type of a gcc2
503d2be0
AS
7895 builtin and then its argument prototype would still apply. */
7896char sqrt ();
7897int
7898main ()
7899{
7900sqrt ();
7901 ;
7902 return 0;
7903}
7904_ACEOF
7905rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 7906if { (eval echo "$as_me:7906: \"$ac_link\"") >&5
503d2be0
AS
7907 (eval $ac_link) 2>&5
7908 ac_status=$?
1096bcc0 7909 echo "$as_me:7909: \$? = $ac_status" >&5
503d2be0
AS
7910 (exit $ac_status); } &&
7911 { ac_try='test -s conftest$ac_exeext'
1096bcc0 7912 { (eval echo "$as_me:7912: \"$ac_try\"") >&5
503d2be0
AS
7913 (eval $ac_try) 2>&5
7914 ac_status=$?
1096bcc0 7915 echo "$as_me:7915: \$? = $ac_status" >&5
503d2be0
AS
7916 (exit $ac_status); }; }; then
7917 ac_cv_lib_m_sqrt=yes
7918else
7919 echo "$as_me: failed program was:" >&5
7920cat conftest.$ac_ext >&5
7921ac_cv_lib_m_sqrt=no
7922fi
7923rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7924LIBS=$ac_check_lib_save_LIBS
7925fi
1096bcc0 7926echo "$as_me:7926: result: $ac_cv_lib_m_sqrt" >&5
503d2be0
AS
7927echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
7928if test $ac_cv_lib_m_sqrt = yes; then
7929 cat >>confdefs.h <<EOF
7930#define HAVE_LIBM 1
ba4481b5
DL
7931EOF
7932
7933 LIBS="-lm $LIBS"
7934
ba4481b5
DL
7935fi
7936
ba4481b5 7937# Check for mail-locking functions in a "mail" library
503d2be0 7938
1096bcc0 7939echo "$as_me:7939: checking for maillock in -lmail" >&5
503d2be0
AS
7940echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6
7941if test "${ac_cv_lib_mail_maillock+set}" = set; then
7942 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7943else
503d2be0 7944 ac_check_lib_save_LIBS=$LIBS
ba4481b5 7945LIBS="-lmail $LIBS"
503d2be0 7946cat >conftest.$ac_ext <<_ACEOF
1096bcc0 7947#line 7947 "configure"
ba4481b5 7948#include "confdefs.h"
503d2be0 7949
ba4481b5 7950/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
7951#ifdef __cplusplus
7952extern "C"
7953#endif
ba4481b5 7954/* We use char because int might match the return type of a gcc2
503d2be0
AS
7955 builtin and then its argument prototype would still apply. */
7956char maillock ();
7957int
7958main ()
7959{
7960maillock ();
7961 ;
7962 return 0;
7963}
7964_ACEOF
7965rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 7966if { (eval echo "$as_me:7966: \"$ac_link\"") >&5
503d2be0
AS
7967 (eval $ac_link) 2>&5
7968 ac_status=$?
1096bcc0 7969 echo "$as_me:7969: \$? = $ac_status" >&5
503d2be0
AS
7970 (exit $ac_status); } &&
7971 { ac_try='test -s conftest$ac_exeext'
1096bcc0 7972 { (eval echo "$as_me:7972: \"$ac_try\"") >&5
503d2be0
AS
7973 (eval $ac_try) 2>&5
7974 ac_status=$?
1096bcc0 7975 echo "$as_me:7975: \$? = $ac_status" >&5
503d2be0
AS
7976 (exit $ac_status); }; }; then
7977 ac_cv_lib_mail_maillock=yes
7978else
7979 echo "$as_me: failed program was:" >&5
7980cat conftest.$ac_ext >&5
7981ac_cv_lib_mail_maillock=no
7982fi
7983rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7984LIBS=$ac_check_lib_save_LIBS
7985fi
1096bcc0 7986echo "$as_me:7986: result: $ac_cv_lib_mail_maillock" >&5
503d2be0
AS
7987echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6
7988if test $ac_cv_lib_mail_maillock = yes; then
7989 cat >>confdefs.h <<EOF
7990#define HAVE_LIBMAIL 1
ba4481b5
DL
7991EOF
7992
7993 LIBS="-lmail $LIBS"
7994
ba4481b5
DL
7995fi
7996
1096bcc0 7997echo "$as_me:7997: checking for maillock in -llockfile" >&5
503d2be0
AS
7998echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6
7999if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
8000 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8001else
503d2be0 8002 ac_check_lib_save_LIBS=$LIBS
ba4481b5 8003LIBS="-llockfile $LIBS"
503d2be0 8004cat >conftest.$ac_ext <<_ACEOF
1096bcc0 8005#line 8005 "configure"
ba4481b5 8006#include "confdefs.h"
503d2be0 8007
ba4481b5 8008/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8009#ifdef __cplusplus
8010extern "C"
8011#endif
ba4481b5 8012/* We use char because int might match the return type of a gcc2
503d2be0
AS
8013 builtin and then its argument prototype would still apply. */
8014char maillock ();
8015int
8016main ()
8017{
8018maillock ();
8019 ;
8020 return 0;
8021}
8022_ACEOF
8023rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 8024if { (eval echo "$as_me:8024: \"$ac_link\"") >&5
503d2be0
AS
8025 (eval $ac_link) 2>&5
8026 ac_status=$?
1096bcc0 8027 echo "$as_me:8027: \$? = $ac_status" >&5
503d2be0
AS
8028 (exit $ac_status); } &&
8029 { ac_try='test -s conftest$ac_exeext'
1096bcc0 8030 { (eval echo "$as_me:8030: \"$ac_try\"") >&5
503d2be0
AS
8031 (eval $ac_try) 2>&5
8032 ac_status=$?
1096bcc0 8033 echo "$as_me:8033: \$? = $ac_status" >&5
503d2be0
AS
8034 (exit $ac_status); }; }; then
8035 ac_cv_lib_lockfile_maillock=yes
8036else
8037 echo "$as_me: failed program was:" >&5
8038cat conftest.$ac_ext >&5
8039ac_cv_lib_lockfile_maillock=no
8040fi
8041rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8042LIBS=$ac_check_lib_save_LIBS
8043fi
1096bcc0 8044echo "$as_me:8044: result: $ac_cv_lib_lockfile_maillock" >&5
503d2be0
AS
8045echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6
8046if test $ac_cv_lib_lockfile_maillock = yes; then
8047 cat >>confdefs.h <<EOF
8048#define HAVE_LIBLOCKFILE 1
ba4481b5
DL
8049EOF
8050
8051 LIBS="-llockfile $LIBS"
8052
ba4481b5
DL
8053fi
8054
8055# If we have the shared liblockfile, assume we must use it for mail
8056# locking (e.g. Debian). If we couldn't link against liblockfile
8057# (no liblockfile.a installed), ensure that we don't need to.
8058if test "$ac_cv_lib_lockfile_maillock" = no; then
8059 # Extract the first word of "liblockfile.so", so it can be a program name with args.
8060set dummy liblockfile.so; ac_word=$2
1096bcc0 8061echo "$as_me:8061: checking for $ac_word" >&5
503d2be0
AS
8062echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8063if test "${ac_cv_prog_liblockfile+set}" = set; then
8064 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
8065else
8066 if test -n "$liblockfile"; then
8067 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
8068else
503d2be0
AS
8069 ac_save_IFS=$IFS; IFS=$ac_path_separator
8070ac_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
8071for ac_dir in $ac_dummy; do
8072 IFS=$ac_save_IFS
8073 test -z "$ac_dir" && ac_dir=.
8074 $as_executable_p "$ac_dir/$ac_word" || continue
8075ac_cv_prog_liblockfile="yes"
1096bcc0 8076echo "$as_me:8076: found $ac_dir/$ac_word" >&5
503d2be0
AS
8077break
8078done
8079
ba4481b5
DL
8080 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
8081fi
8082fi
503d2be0 8083liblockfile=$ac_cv_prog_liblockfile
ba4481b5 8084if test -n "$liblockfile"; then
1096bcc0 8085 echo "$as_me:8085: result: $liblockfile" >&5
503d2be0 8086echo "${ECHO_T}$liblockfile" >&6
ba4481b5 8087else
1096bcc0 8088 echo "$as_me:8088: result: no" >&5
503d2be0 8089echo "${ECHO_T}no" >&6
ba4481b5
DL
8090fi
8091
8092 if test $ac_cv_prog_liblockfile = yes; then
1096bcc0 8093 { { echo "$as_me:8093: error: Shared liblockfile found but can't link against it.
503d2be0
AS
8094This probably means that movemail could lose mail.
8095There may be a \`development' package to install containing liblockfile." >&5
8096echo "$as_me: error: Shared liblockfile found but can't link against it.
ba4481b5 8097This probably means that movemail could lose mail.
503d2be0
AS
8098There may be a \`development' package to install containing liblockfile." >&2;}
8099 { (exit 1); exit 1; }; }
8100 else cat >>confdefs.h <<\EOF
ba4481b5
DL
8101#define LIBMAIL -llockfile
8102EOF
8103
8104 fi
8105 else :
8106fi
503d2be0 8107
ba4481b5
DL
8108for ac_func in touchlock
8109do
503d2be0 8110as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
1096bcc0 8111echo "$as_me:8111: checking for $ac_func" >&5
503d2be0
AS
8112echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8113if eval "test \"\${$as_ac_var+set}\" = set"; then
8114 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8115else
503d2be0 8116 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 8117#line 8117 "configure"
ba4481b5
DL
8118#include "confdefs.h"
8119/* System header to define __stub macros and hopefully few prototypes,
503d2be0 8120 which can conflict with char $ac_func (); below. */
ba4481b5
DL
8121#include <assert.h>
8122/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8123#ifdef __cplusplus
8124extern "C"
8125#endif
ba4481b5 8126/* We use char because int might match the return type of a gcc2
503d2be0
AS
8127 builtin and then its argument prototype would still apply. */
8128char $ac_func ();
8129char (*f) ();
ba4481b5 8130
503d2be0
AS
8131int
8132main ()
8133{
ba4481b5
DL
8134/* The GNU C library defines this for functions which it implements
8135 to always fail with ENOSYS. Some functions are actually named
8136 something starting with __ and the normal name is an alias. */
8137#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8138choke me
8139#else
503d2be0 8140f = $ac_func;
ba4481b5
DL
8141#endif
8142
503d2be0
AS
8143 ;
8144 return 0;
8145}
8146_ACEOF
8147rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 8148if { (eval echo "$as_me:8148: \"$ac_link\"") >&5
503d2be0
AS
8149 (eval $ac_link) 2>&5
8150 ac_status=$?
1096bcc0 8151 echo "$as_me:8151: \$? = $ac_status" >&5
503d2be0
AS
8152 (exit $ac_status); } &&
8153 { ac_try='test -s conftest$ac_exeext'
1096bcc0 8154 { (eval echo "$as_me:8154: \"$ac_try\"") >&5
503d2be0
AS
8155 (eval $ac_try) 2>&5
8156 ac_status=$?
1096bcc0 8157 echo "$as_me:8157: \$? = $ac_status" >&5
503d2be0
AS
8158 (exit $ac_status); }; }; then
8159 eval "$as_ac_var=yes"
8160else
8161 echo "$as_me: failed program was:" >&5
8162cat conftest.$ac_ext >&5
8163eval "$as_ac_var=no"
8164fi
8165rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8166fi
1096bcc0 8167echo "$as_me:8167: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
8168echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8169if test `eval echo '${'$as_ac_var'}'` = yes; then
8170 cat >>confdefs.h <<EOF
8171#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
ba4481b5 8172EOF
ba4481b5 8173
ba4481b5
DL
8174fi
8175done
8176
503d2be0 8177for ac_header in maillock.h
ba4481b5 8178do
503d2be0 8179as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
1096bcc0 8180echo "$as_me:8180: checking for $ac_header" >&5
503d2be0
AS
8181echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8182if eval "test \"\${$as_ac_Header+set}\" = set"; then
8183 echo $ECHO_N "(cached) $ECHO_C" >&6
8184else
8185 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 8186#line 8186 "configure"
503d2be0
AS
8187#include "confdefs.h"
8188#include <$ac_header>
8189_ACEOF
1096bcc0 8190if { (eval echo "$as_me:8190: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
8191 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8192 ac_status=$?
8193 egrep -v '^ *\+' conftest.er1 >conftest.err
8194 rm -f conftest.er1
8195 cat conftest.err >&5
1096bcc0 8196 echo "$as_me:8196: \$? = $ac_status" >&5
503d2be0
AS
8197 (exit $ac_status); } >/dev/null; then
8198 if test -s conftest.err; then
8199 ac_cpp_err=$ac_c_preproc_warn_flag
8200 else
8201 ac_cpp_err=
8202 fi
8203else
8204 ac_cpp_err=yes
8205fi
8206if test -z "$ac_cpp_err"; then
8207 eval "$as_ac_Header=yes"
8208else
8209 echo "$as_me: failed program was:" >&5
ba4481b5 8210 cat conftest.$ac_ext >&5
503d2be0 8211 eval "$as_ac_Header=no"
ba4481b5 8212fi
503d2be0 8213rm -f conftest.err conftest.$ac_ext
ba4481b5 8214fi
1096bcc0 8215echo "$as_me:8215: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
8216echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8217if test `eval echo '${'$as_ac_Header'}'` = yes; then
8218 cat >>confdefs.h <<EOF
8219#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba4481b5 8220EOF
503d2be0 8221
ba4481b5
DL
8222fi
8223done
8224
48d4b120 8225for ac_func in gethostname getdomainname dup2 \
ba4481b5
DL
8226rename closedir mkdir rmdir sysinfo \
8227random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
8228strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
a3f08d9e 8229utimes setrlimit setpgid getcwd getwd shutdown strftime getaddrinfo \
03391420
DL
8230__fpending mblen mbrlen strsignal setitimer ualarm index rindex \
8231gai_strerror mkstemp
ba4481b5 8232do
503d2be0 8233as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
1096bcc0 8234echo "$as_me:8234: checking for $ac_func" >&5
503d2be0
AS
8235echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8236if eval "test \"\${$as_ac_var+set}\" = set"; then
8237 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8238else
503d2be0 8239 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 8240#line 8240 "configure"
ba4481b5
DL
8241#include "confdefs.h"
8242/* System header to define __stub macros and hopefully few prototypes,
503d2be0 8243 which can conflict with char $ac_func (); below. */
ba4481b5
DL
8244#include <assert.h>
8245/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8246#ifdef __cplusplus
8247extern "C"
8248#endif
ba4481b5 8249/* We use char because int might match the return type of a gcc2
503d2be0
AS
8250 builtin and then its argument prototype would still apply. */
8251char $ac_func ();
8252char (*f) ();
ba4481b5 8253
503d2be0
AS
8254int
8255main ()
8256{
ba4481b5
DL
8257/* The GNU C library defines this for functions which it implements
8258 to always fail with ENOSYS. Some functions are actually named
8259 something starting with __ and the normal name is an alias. */
8260#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8261choke me
8262#else
503d2be0 8263f = $ac_func;
ba4481b5
DL
8264#endif
8265
503d2be0
AS
8266 ;
8267 return 0;
8268}
8269_ACEOF
8270rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 8271if { (eval echo "$as_me:8271: \"$ac_link\"") >&5
503d2be0
AS
8272 (eval $ac_link) 2>&5
8273 ac_status=$?
1096bcc0 8274 echo "$as_me:8274: \$? = $ac_status" >&5
503d2be0
AS
8275 (exit $ac_status); } &&
8276 { ac_try='test -s conftest$ac_exeext'
1096bcc0 8277 { (eval echo "$as_me:8277: \"$ac_try\"") >&5
503d2be0
AS
8278 (eval $ac_try) 2>&5
8279 ac_status=$?
1096bcc0 8280 echo "$as_me:8280: \$? = $ac_status" >&5
503d2be0
AS
8281 (exit $ac_status); }; }; then
8282 eval "$as_ac_var=yes"
8283else
8284 echo "$as_me: failed program was:" >&5
8285cat conftest.$ac_ext >&5
8286eval "$as_ac_var=no"
8287fi
8288rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8289fi
1096bcc0 8290echo "$as_me:8290: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
8291echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8292if test `eval echo '${'$as_ac_var'}'` = yes; then
8293 cat >>confdefs.h <<EOF
8294#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
ba4481b5 8295EOF
ba4481b5 8296
ba4481b5
DL
8297fi
8298done
8299
503d2be0 8300for ac_header in sys/time.h unistd.h
b5de8dc0 8301do
503d2be0 8302as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
1096bcc0 8303echo "$as_me:8303: checking for $ac_header" >&5
503d2be0
AS
8304echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8305if eval "test \"\${$as_ac_Header+set}\" = set"; then
8306 echo $ECHO_N "(cached) $ECHO_C" >&6
8307else
8308 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 8309#line 8309 "configure"
503d2be0
AS
8310#include "confdefs.h"
8311#include <$ac_header>
8312_ACEOF
1096bcc0 8313if { (eval echo "$as_me:8313: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
8314 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8315 ac_status=$?
8316 egrep -v '^ *\+' conftest.er1 >conftest.err
8317 rm -f conftest.er1
8318 cat conftest.err >&5
1096bcc0 8319 echo "$as_me:8319: \$? = $ac_status" >&5
503d2be0
AS
8320 (exit $ac_status); } >/dev/null; then
8321 if test -s conftest.err; then
8322 ac_cpp_err=$ac_c_preproc_warn_flag
8323 else
8324 ac_cpp_err=
8325 fi
8326else
8327 ac_cpp_err=yes
8328fi
8329if test -z "$ac_cpp_err"; then
8330 eval "$as_ac_Header=yes"
8331else
8332 echo "$as_me: failed program was:" >&5
b5de8dc0 8333 cat conftest.$ac_ext >&5
503d2be0 8334 eval "$as_ac_Header=no"
b5de8dc0 8335fi
503d2be0 8336rm -f conftest.err conftest.$ac_ext
b5de8dc0 8337fi
1096bcc0 8338echo "$as_me:8338: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
8339echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8340if test `eval echo '${'$as_ac_Header'}'` = yes; then
8341 cat >>confdefs.h <<EOF
8342#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
b5de8dc0 8343EOF
503d2be0 8344
b5de8dc0
DL
8345fi
8346done
8347
8348for ac_func in alarm
8349do
503d2be0 8350as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
1096bcc0 8351echo "$as_me:8351: checking for $ac_func" >&5
503d2be0
AS
8352echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8353if eval "test \"\${$as_ac_var+set}\" = set"; then
8354 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 8355else
503d2be0 8356 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 8357#line 8357 "configure"
b5de8dc0
DL
8358#include "confdefs.h"
8359/* System header to define __stub macros and hopefully few prototypes,
503d2be0 8360 which can conflict with char $ac_func (); below. */
b5de8dc0
DL
8361#include <assert.h>
8362/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8363#ifdef __cplusplus
8364extern "C"
8365#endif
b5de8dc0 8366/* We use char because int might match the return type of a gcc2
503d2be0
AS
8367 builtin and then its argument prototype would still apply. */
8368char $ac_func ();
8369char (*f) ();
b5de8dc0 8370
503d2be0
AS
8371int
8372main ()
8373{
b5de8dc0
DL
8374/* The GNU C library defines this for functions which it implements
8375 to always fail with ENOSYS. Some functions are actually named
8376 something starting with __ and the normal name is an alias. */
8377#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8378choke me
8379#else
503d2be0 8380f = $ac_func;
b5de8dc0
DL
8381#endif
8382
503d2be0
AS
8383 ;
8384 return 0;
8385}
8386_ACEOF
8387rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 8388if { (eval echo "$as_me:8388: \"$ac_link\"") >&5
503d2be0
AS
8389 (eval $ac_link) 2>&5
8390 ac_status=$?
1096bcc0 8391 echo "$as_me:8391: \$? = $ac_status" >&5
503d2be0
AS
8392 (exit $ac_status); } &&
8393 { ac_try='test -s conftest$ac_exeext'
1096bcc0 8394 { (eval echo "$as_me:8394: \"$ac_try\"") >&5
503d2be0
AS
8395 (eval $ac_try) 2>&5
8396 ac_status=$?
1096bcc0 8397 echo "$as_me:8397: \$? = $ac_status" >&5
503d2be0
AS
8398 (exit $ac_status); }; }; then
8399 eval "$as_ac_var=yes"
8400else
8401 echo "$as_me: failed program was:" >&5
8402cat conftest.$ac_ext >&5
8403eval "$as_ac_var=no"
8404fi
8405rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8406fi
1096bcc0 8407echo "$as_me:8407: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
8408echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8409if test `eval echo '${'$as_ac_var'}'` = yes; then
8410 cat >>confdefs.h <<EOF
8411#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
b5de8dc0 8412EOF
b5de8dc0 8413
b5de8dc0
DL
8414fi
8415done
8416
1096bcc0 8417echo "$as_me:8417: checking for working mktime" >&5
503d2be0
AS
8418echo $ECHO_N "checking for working mktime... $ECHO_C" >&6
8419if test "${ac_cv_func_working_mktime+set}" = set; then
8420 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0
DL
8421else
8422 if test "$cross_compiling" = yes; then
8423 ac_cv_func_working_mktime=no
8424else
503d2be0 8425 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 8426#line 8426 "configure"
b5de8dc0 8427#include "confdefs.h"
503d2be0 8428/* Test program from Paul Eggert and Tony Leneis. */
b5de8dc0
DL
8429#if TIME_WITH_SYS_TIME
8430# include <sys/time.h>
8431# include <time.h>
8432#else
8433# if HAVE_SYS_TIME_H
8434# include <sys/time.h>
8435# else
8436# include <time.h>
8437# endif
8438#endif
8439
8440#if HAVE_UNISTD_H
8441# include <unistd.h>
8442#endif
8443
8444#if !HAVE_ALARM
8445# define alarm(X) /* empty */
8446#endif
8447
8448/* Work around redefinition to rpl_putenv by other config tests. */
8449#undef putenv
8450
8451static time_t time_t_max;
8452
8453/* Values we'll use to set the TZ environment variable. */
8454static const char *const tz_strings[] = {
8455 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
8456 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
8457};
8458#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
8459
8460/* Fail if mktime fails to convert a date in the spring-forward gap.
8461 Based on a problem report from Andreas Jaeger. */
8462static void
8463spring_forward_gap ()
8464{
503d2be0 8465 /* glibc (up to about 1998-10-07) failed this test. */
b5de8dc0
DL
8466 struct tm tm;
8467
8468 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
8469 instead of "TZ=America/Vancouver" in order to detect the bug even
8470 on systems that don't support the Olson extension, or don't have the
8471 full zoneinfo tables installed. */
8472 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
8473
8474 tm.tm_year = 98;
8475 tm.tm_mon = 3;
8476 tm.tm_mday = 5;
8477 tm.tm_hour = 2;
8478 tm.tm_min = 0;
8479 tm.tm_sec = 0;
8480 tm.tm_isdst = -1;
8481 if (mktime (&tm) == (time_t)-1)
8482 exit (1);
8483}
8484
8485static void
8486mktime_test (now)
8487 time_t now;
8488{
8489 struct tm *lt;
8490 if ((lt = localtime (&now)) && mktime (lt) != now)
8491 exit (1);
8492 now = time_t_max - now;
8493 if ((lt = localtime (&now)) && mktime (lt) != now)
8494 exit (1);
8495}
8496
8497static void
8498irix_6_4_bug ()
8499{
8500 /* Based on code from Ariel Faigon. */
8501 struct tm tm;
8502 tm.tm_year = 96;
8503 tm.tm_mon = 3;
8504 tm.tm_mday = 0;
8505 tm.tm_hour = 0;
8506 tm.tm_min = 0;
8507 tm.tm_sec = 0;
8508 tm.tm_isdst = -1;
8509 mktime (&tm);
8510 if (tm.tm_mon != 2 || tm.tm_mday != 31)
8511 exit (1);
8512}
8513
8514static void
8515bigtime_test (j)
8516 int j;
8517{
8518 struct tm tm;
8519 time_t now;
8520 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
8521 now = mktime (&tm);
8522 if (now != (time_t) -1)
8523 {
8524 struct tm *lt = localtime (&now);
8525 if (! (lt
8526 && lt->tm_year == tm.tm_year
8527 && lt->tm_mon == tm.tm_mon
8528 && lt->tm_mday == tm.tm_mday
8529 && lt->tm_hour == tm.tm_hour
8530 && lt->tm_min == tm.tm_min
8531 && lt->tm_sec == tm.tm_sec
8532 && lt->tm_yday == tm.tm_yday
8533 && lt->tm_wday == tm.tm_wday
8534 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
8535 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
8536 exit (1);
8537 }
8538}
8539
8540int
8541main ()
8542{
8543 time_t t, delta;
8544 int i, j;
8545
8546 /* This test makes some buggy mktime implementations loop.
8547 Give up after 60 seconds; a mktime slower than that
8548 isn't worth using anyway. */
8549 alarm (60);
8550
8551 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
8552 continue;
8553 time_t_max--;
8554 delta = time_t_max / 997; /* a suitable prime number */
8555 for (i = 0; i < N_STRINGS; i++)
8556 {
8557 if (tz_strings[i])
8558 putenv (tz_strings[i]);
8559
8560 for (t = 0; t <= time_t_max - delta; t += delta)
8561 mktime_test (t);
8562 mktime_test ((time_t) 60 * 60);
8563 mktime_test ((time_t) 60 * 60 * 24);
8564
8565 for (j = 1; 0 < j; j *= 2)
8566 bigtime_test (j);
8567 bigtime_test (j - 1);
8568 }
8569 irix_6_4_bug ();
8570 spring_forward_gap ();
8571 exit (0);
8572}
503d2be0
AS
8573_ACEOF
8574rm -f conftest$ac_exeext
1096bcc0 8575if { (eval echo "$as_me:8575: \"$ac_link\"") >&5
503d2be0
AS
8576 (eval $ac_link) 2>&5
8577 ac_status=$?
1096bcc0 8578 echo "$as_me:8578: \$? = $ac_status" >&5
503d2be0 8579 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
1096bcc0 8580 { (eval echo "$as_me:8580: \"$ac_try\"") >&5
503d2be0
AS
8581 (eval $ac_try) 2>&5
8582 ac_status=$?
1096bcc0 8583 echo "$as_me:8583: \$? = $ac_status" >&5
503d2be0 8584 (exit $ac_status); }; }; then
b5de8dc0
DL
8585 ac_cv_func_working_mktime=yes
8586else
503d2be0
AS
8587 echo "$as_me: program exited with status $ac_status" >&5
8588echo "$as_me: failed program was:" >&5
8589cat conftest.$ac_ext >&5
8590ac_cv_func_working_mktime=no
b5de8dc0 8591fi
503d2be0 8592rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
b5de8dc0 8593fi
b5de8dc0 8594fi
1096bcc0 8595echo "$as_me:8595: result: $ac_cv_func_working_mktime" >&5
503d2be0 8596echo "${ECHO_T}$ac_cv_func_working_mktime" >&6
b5de8dc0 8597if test $ac_cv_func_working_mktime = no; then
503d2be0 8598 LIBOBJS="$LIBOBJS mktime.$ac_objext"
b5de8dc0
DL
8599fi
8600
8601if test "$ac_cv_func_working_mktime" = no; then
503d2be0 8602 cat >>confdefs.h <<\EOF
b5de8dc0
DL
8603#define BROKEN_MKTIME 1
8604EOF
8605
8606fi
8607
4c343001
DL
8608ac_have_func=no # yes means we've found a way to get the load average.
8609
503d2be0
AS
8610ac_save_LIBS=$LIBS
8611
8612# Check for getloadavg, but be sure not to touch the cache variable.
1096bcc0 8613(echo "$as_me:8613: checking for getloadavg" >&5
503d2be0
AS
8614echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6
8615if test "${ac_cv_func_getloadavg+set}" = set; then
8616 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 8617else
503d2be0 8618 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 8619#line 8619 "configure"
4c343001 8620#include "confdefs.h"
503d2be0
AS
8621/* System header to define __stub macros and hopefully few prototypes,
8622 which can conflict with char getloadavg (); below. */
8623#include <assert.h>
4c343001 8624/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8625#ifdef __cplusplus
8626extern "C"
8627#endif
4c343001 8628/* We use char because int might match the return type of a gcc2
503d2be0
AS
8629 builtin and then its argument prototype would still apply. */
8630char getloadavg ();
8631char (*f) ();
4c343001 8632
503d2be0
AS
8633int
8634main ()
8635{
8636/* The GNU C library defines this for functions which it implements
8637 to always fail with ENOSYS. Some functions are actually named
8638 something starting with __ and the normal name is an alias. */
8639#if defined (__stub_getloadavg) || defined (__stub___getloadavg)
8640choke me
8641#else
8642f = getloadavg;
8643#endif
4c343001 8644
503d2be0
AS
8645 ;
8646 return 0;
8647}
8648_ACEOF
8649rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 8650if { (eval echo "$as_me:8650: \"$ac_link\"") >&5
503d2be0
AS
8651 (eval $ac_link) 2>&5
8652 ac_status=$?
1096bcc0 8653 echo "$as_me:8653: \$? = $ac_status" >&5
503d2be0
AS
8654 (exit $ac_status); } &&
8655 { ac_try='test -s conftest$ac_exeext'
1096bcc0 8656 { (eval echo "$as_me:8656: \"$ac_try\"") >&5
503d2be0
AS
8657 (eval $ac_try) 2>&5
8658 ac_status=$?
1096bcc0 8659 echo "$as_me:8659: \$? = $ac_status" >&5
503d2be0
AS
8660 (exit $ac_status); }; }; then
8661 ac_cv_func_getloadavg=yes
8662else
8663 echo "$as_me: failed program was:" >&5
8664cat conftest.$ac_ext >&5
8665ac_cv_func_getloadavg=no
8666fi
8667rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8668fi
1096bcc0 8669echo "$as_me:8669: result: $ac_cv_func_getloadavg" >&5
503d2be0
AS
8670echo "${ECHO_T}$ac_cv_func_getloadavg" >&6
8671if test $ac_cv_func_getloadavg = yes; then
8672 exit 0
4c343001 8673else
503d2be0 8674 exit 1
4c343001 8675fi
503d2be0 8676) && ac_have_func=yes
4c343001 8677
503d2be0
AS
8678# On HPUX9, an unprivileged user can get load averages through this function.
8679
8680for ac_func in pstat_getdynamic
8681do
8682as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
1096bcc0 8683echo "$as_me:8683: checking for $ac_func" >&5
503d2be0
AS
8684echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8685if eval "test \"\${$as_ac_var+set}\" = set"; then
8686 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 8687else
503d2be0 8688 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 8689#line 8689 "configure"
4c343001 8690#include "confdefs.h"
503d2be0
AS
8691/* System header to define __stub macros and hopefully few prototypes,
8692 which can conflict with char $ac_func (); below. */
8693#include <assert.h>
4c343001 8694/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8695#ifdef __cplusplus
8696extern "C"
8697#endif
4c343001 8698/* We use char because int might match the return type of a gcc2
503d2be0
AS
8699 builtin and then its argument prototype would still apply. */
8700char $ac_func ();
8701char (*f) ();
8702
8703int
8704main ()
8705{
8706/* The GNU C library defines this for functions which it implements
8707 to always fail with ENOSYS. Some functions are actually named
8708 something starting with __ and the normal name is an alias. */
8709#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8710choke me
8711#else
8712f = $ac_func;
8713#endif
4c343001 8714
503d2be0
AS
8715 ;
8716 return 0;
8717}
8718_ACEOF
8719rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 8720if { (eval echo "$as_me:8720: \"$ac_link\"") >&5
503d2be0
AS
8721 (eval $ac_link) 2>&5
8722 ac_status=$?
1096bcc0 8723 echo "$as_me:8723: \$? = $ac_status" >&5
503d2be0
AS
8724 (exit $ac_status); } &&
8725 { ac_try='test -s conftest$ac_exeext'
1096bcc0 8726 { (eval echo "$as_me:8726: \"$ac_try\"") >&5
503d2be0
AS
8727 (eval $ac_try) 2>&5
8728 ac_status=$?
1096bcc0 8729 echo "$as_me:8729: \$? = $ac_status" >&5
503d2be0
AS
8730 (exit $ac_status); }; }; then
8731 eval "$as_ac_var=yes"
8732else
8733 echo "$as_me: failed program was:" >&5
8734cat conftest.$ac_ext >&5
8735eval "$as_ac_var=no"
8736fi
8737rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8738fi
1096bcc0 8739echo "$as_me:8739: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
8740echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8741if test `eval echo '${'$as_ac_var'}'` = yes; then
8742 cat >>confdefs.h <<EOF
8743#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4c343001 8744EOF
4c343001
DL
8745
8746fi
503d2be0
AS
8747done
8748
8749# Solaris has libkstat which does not require root.
4c343001 8750
1096bcc0 8751echo "$as_me:8751: checking for kstat_open in -lkstat" >&5
503d2be0
AS
8752echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
8753if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
8754 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 8755else
503d2be0
AS
8756 ac_check_lib_save_LIBS=$LIBS
8757LIBS="-lkstat $LIBS"
8758cat >conftest.$ac_ext <<_ACEOF
1096bcc0 8759#line 8759 "configure"
4c343001 8760#include "confdefs.h"
503d2be0 8761
4c343001 8762/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8763#ifdef __cplusplus
8764extern "C"
8765#endif
4c343001 8766/* We use char because int might match the return type of a gcc2
503d2be0
AS
8767 builtin and then its argument prototype would still apply. */
8768char kstat_open ();
8769int
8770main ()
8771{
8772kstat_open ();
8773 ;
8774 return 0;
8775}
8776_ACEOF
8777rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 8778if { (eval echo "$as_me:8778: \"$ac_link\"") >&5
503d2be0
AS
8779 (eval $ac_link) 2>&5
8780 ac_status=$?
1096bcc0 8781 echo "$as_me:8781: \$? = $ac_status" >&5
503d2be0
AS
8782 (exit $ac_status); } &&
8783 { ac_try='test -s conftest$ac_exeext'
1096bcc0 8784 { (eval echo "$as_me:8784: \"$ac_try\"") >&5
503d2be0
AS
8785 (eval $ac_try) 2>&5
8786 ac_status=$?
1096bcc0 8787 echo "$as_me:8787: \$? = $ac_status" >&5
503d2be0
AS
8788 (exit $ac_status); }; }; then
8789 ac_cv_lib_kstat_kstat_open=yes
4c343001 8790else
503d2be0
AS
8791 echo "$as_me: failed program was:" >&5
8792cat conftest.$ac_ext >&5
8793ac_cv_lib_kstat_kstat_open=no
4c343001 8794fi
503d2be0
AS
8795rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8796LIBS=$ac_check_lib_save_LIBS
4c343001 8797fi
1096bcc0 8798echo "$as_me:8798: result: $ac_cv_lib_kstat_kstat_open" >&5
503d2be0
AS
8799echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6
8800if test $ac_cv_lib_kstat_kstat_open = yes; then
8801 cat >>confdefs.h <<EOF
8802#define HAVE_LIBKSTAT 1
8803EOF
8804
8805 LIBS="-lkstat $LIBS"
8806
4c343001
DL
8807fi
8808
503d2be0 8809test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
4c343001 8810
503d2be0
AS
8811# Some systems with -lutil have (and need) -lkvm as well, some do not.
8812# On Solaris, -lkvm requires nlist from -lelf, so check that first
8813# to get the right answer into the cache.
8814# For kstat on solaris, we need libelf to force the definition of SVR4 below.
4c343001 8815if test $ac_have_func = no; then
1096bcc0 8816 echo "$as_me:8816: checking for elf_begin in -lelf" >&5
503d2be0
AS
8817echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
8818if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
8819 echo $ECHO_N "(cached) $ECHO_C" >&6
8820else
8821 ac_check_lib_save_LIBS=$LIBS
8822LIBS="-lelf $LIBS"
8823cat >conftest.$ac_ext <<_ACEOF
1096bcc0 8824#line 8824 "configure"
4c343001 8825#include "confdefs.h"
503d2be0 8826
4c343001 8827/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8828#ifdef __cplusplus
8829extern "C"
8830#endif
4c343001 8831/* We use char because int might match the return type of a gcc2
503d2be0
AS
8832 builtin and then its argument prototype would still apply. */
8833char elf_begin ();
8834int
8835main ()
8836{
8837elf_begin ();
8838 ;
8839 return 0;
8840}
8841_ACEOF
8842rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 8843if { (eval echo "$as_me:8843: \"$ac_link\"") >&5
503d2be0
AS
8844 (eval $ac_link) 2>&5
8845 ac_status=$?
1096bcc0 8846 echo "$as_me:8846: \$? = $ac_status" >&5
503d2be0
AS
8847 (exit $ac_status); } &&
8848 { ac_try='test -s conftest$ac_exeext'
1096bcc0 8849 { (eval echo "$as_me:8849: \"$ac_try\"") >&5
503d2be0
AS
8850 (eval $ac_try) 2>&5
8851 ac_status=$?
1096bcc0 8852 echo "$as_me:8852: \$? = $ac_status" >&5
503d2be0
AS
8853 (exit $ac_status); }; }; then
8854 ac_cv_lib_elf_elf_begin=yes
8855else
8856 echo "$as_me: failed program was:" >&5
8857cat conftest.$ac_ext >&5
8858ac_cv_lib_elf_elf_begin=no
8859fi
8860rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8861LIBS=$ac_check_lib_save_LIBS
8862fi
1096bcc0 8863echo "$as_me:8863: result: $ac_cv_lib_elf_elf_begin" >&5
503d2be0
AS
8864echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
8865if test $ac_cv_lib_elf_elf_begin = yes; then
8866 LIBS="-lelf $LIBS"
4c343001 8867fi
4c343001
DL
8868
8869fi
503d2be0 8870if test $ac_have_func = no; then
1096bcc0 8871 echo "$as_me:8871: checking for kvm_open in -lkvm" >&5
503d2be0
AS
8872echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6
8873if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
8874 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 8875else
503d2be0
AS
8876 ac_check_lib_save_LIBS=$LIBS
8877LIBS="-lkvm $LIBS"
8878cat >conftest.$ac_ext <<_ACEOF
1096bcc0 8879#line 8879 "configure"
503d2be0 8880#include "confdefs.h"
4c343001 8881
503d2be0
AS
8882/* Override any gcc2 internal prototype to avoid an error. */
8883#ifdef __cplusplus
8884extern "C"
8885#endif
8886/* We use char because int might match the return type of a gcc2
8887 builtin and then its argument prototype would still apply. */
8888char kvm_open ();
8889int
8890main ()
8891{
8892kvm_open ();
8893 ;
8894 return 0;
8895}
8896_ACEOF
8897rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 8898if { (eval echo "$as_me:8898: \"$ac_link\"") >&5
503d2be0
AS
8899 (eval $ac_link) 2>&5
8900 ac_status=$?
1096bcc0 8901 echo "$as_me:8901: \$? = $ac_status" >&5
503d2be0
AS
8902 (exit $ac_status); } &&
8903 { ac_try='test -s conftest$ac_exeext'
1096bcc0 8904 { (eval echo "$as_me:8904: \"$ac_try\"") >&5
503d2be0
AS
8905 (eval $ac_try) 2>&5
8906 ac_status=$?
1096bcc0 8907 echo "$as_me:8907: \$? = $ac_status" >&5
503d2be0
AS
8908 (exit $ac_status); }; }; then
8909 ac_cv_lib_kvm_kvm_open=yes
8910else
8911 echo "$as_me: failed program was:" >&5
8912cat conftest.$ac_ext >&5
8913ac_cv_lib_kvm_kvm_open=no
8914fi
8915rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8916LIBS=$ac_check_lib_save_LIBS
8917fi
1096bcc0 8918echo "$as_me:8918: result: $ac_cv_lib_kvm_kvm_open" >&5
503d2be0
AS
8919echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6
8920if test $ac_cv_lib_kvm_kvm_open = yes; then
8921 LIBS="-lkvm $LIBS"
4c343001
DL
8922fi
8923
503d2be0 8924 # Check for the 4.4BSD definition of getloadavg.
1096bcc0 8925 echo "$as_me:8925: checking for getloadavg in -lutil" >&5
503d2be0
AS
8926echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6
8927if test "${ac_cv_lib_util_getloadavg+set}" = set; then
8928 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 8929else
503d2be0
AS
8930 ac_check_lib_save_LIBS=$LIBS
8931LIBS="-lutil $LIBS"
8932cat >conftest.$ac_ext <<_ACEOF
1096bcc0 8933#line 8933 "configure"
4c343001 8934#include "confdefs.h"
503d2be0 8935
4c343001 8936/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8937#ifdef __cplusplus
8938extern "C"
8939#endif
8940/* We use char because int might match the return type of a gcc2
8941 builtin and then its argument prototype would still apply. */
8942char getloadavg ();
8943int
8944main ()
8945{
8946getloadavg ();
8947 ;
8948 return 0;
8949}
8950_ACEOF
8951rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 8952if { (eval echo "$as_me:8952: \"$ac_link\"") >&5
503d2be0
AS
8953 (eval $ac_link) 2>&5
8954 ac_status=$?
1096bcc0 8955 echo "$as_me:8955: \$? = $ac_status" >&5
503d2be0
AS
8956 (exit $ac_status); } &&
8957 { ac_try='test -s conftest$ac_exeext'
1096bcc0 8958 { (eval echo "$as_me:8958: \"$ac_try\"") >&5
503d2be0
AS
8959 (eval $ac_try) 2>&5
8960 ac_status=$?
1096bcc0 8961 echo "$as_me:8961: \$? = $ac_status" >&5
503d2be0
AS
8962 (exit $ac_status); }; }; then
8963 ac_cv_lib_util_getloadavg=yes
8964else
8965 echo "$as_me: failed program was:" >&5
8966cat conftest.$ac_ext >&5
8967ac_cv_lib_util_getloadavg=no
8968fi
8969rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8970LIBS=$ac_check_lib_save_LIBS
8971fi
1096bcc0 8972echo "$as_me:8972: result: $ac_cv_lib_util_getloadavg" >&5
503d2be0
AS
8973echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6
8974if test $ac_cv_lib_util_getloadavg = yes; then
8975 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
8976fi
8977
8978fi
8979
8980if test $ac_have_func = no; then
8981 # There is a commonly available library for RS/6000 AIX.
8982 # Since it is not a standard part of AIX, it might be installed locally.
8983 ac_getloadavg_LIBS=$LIBS
8984 LIBS="-L/usr/local/lib $LIBS"
1096bcc0 8985 echo "$as_me:8985: checking for getloadavg in -lgetloadavg" >&5
503d2be0
AS
8986echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6
8987if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
8988 echo $ECHO_N "(cached) $ECHO_C" >&6
8989else
8990 ac_check_lib_save_LIBS=$LIBS
8991LIBS="-lgetloadavg $LIBS"
8992cat >conftest.$ac_ext <<_ACEOF
1096bcc0 8993#line 8993 "configure"
503d2be0
AS
8994#include "confdefs.h"
8995
8996/* Override any gcc2 internal prototype to avoid an error. */
8997#ifdef __cplusplus
8998extern "C"
8999#endif
4c343001 9000/* We use char because int might match the return type of a gcc2
503d2be0
AS
9001 builtin and then its argument prototype would still apply. */
9002char getloadavg ();
9003int
9004main ()
9005{
9006getloadavg ();
9007 ;
9008 return 0;
9009}
9010_ACEOF
9011rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 9012if { (eval echo "$as_me:9012: \"$ac_link\"") >&5
503d2be0
AS
9013 (eval $ac_link) 2>&5
9014 ac_status=$?
1096bcc0 9015 echo "$as_me:9015: \$? = $ac_status" >&5
503d2be0
AS
9016 (exit $ac_status); } &&
9017 { ac_try='test -s conftest$ac_exeext'
1096bcc0 9018 { (eval echo "$as_me:9018: \"$ac_try\"") >&5
503d2be0
AS
9019 (eval $ac_try) 2>&5
9020 ac_status=$?
1096bcc0 9021 echo "$as_me:9021: \$? = $ac_status" >&5
503d2be0
AS
9022 (exit $ac_status); }; }; then
9023 ac_cv_lib_getloadavg_getloadavg=yes
9024else
9025 echo "$as_me: failed program was:" >&5
9026cat conftest.$ac_ext >&5
9027ac_cv_lib_getloadavg_getloadavg=no
9028fi
9029rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9030LIBS=$ac_check_lib_save_LIBS
9031fi
1096bcc0 9032echo "$as_me:9032: result: $ac_cv_lib_getloadavg_getloadavg" >&5
503d2be0
AS
9033echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6
9034if test $ac_cv_lib_getloadavg_getloadavg = yes; then
9035 LIBS="-lgetloadavg $LIBS"
9036else
9037 LIBS=$ac_getloadavg_LIBS
9038fi
9039
9040fi
9041
9042# Make sure it is really in the library, if we think we found it,
9043# otherwise set up the replacement function.
4c343001 9044
503d2be0
AS
9045for ac_func in getloadavg
9046do
9047as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
1096bcc0 9048echo "$as_me:9048: checking for $ac_func" >&5
503d2be0
AS
9049echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9050if eval "test \"\${$as_ac_var+set}\" = set"; then
9051 echo $ECHO_N "(cached) $ECHO_C" >&6
9052else
9053 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 9054#line 9054 "configure"
503d2be0
AS
9055#include "confdefs.h"
9056/* System header to define __stub macros and hopefully few prototypes,
9057 which can conflict with char $ac_func (); below. */
9058#include <assert.h>
9059/* Override any gcc2 internal prototype to avoid an error. */
9060#ifdef __cplusplus
9061extern "C"
9062#endif
9063/* We use char because int might match the return type of a gcc2
9064 builtin and then its argument prototype would still apply. */
9065char $ac_func ();
9066char (*f) ();
4c343001 9067
503d2be0
AS
9068int
9069main ()
9070{
4c343001
DL
9071/* The GNU C library defines this for functions which it implements
9072 to always fail with ENOSYS. Some functions are actually named
9073 something starting with __ and the normal name is an alias. */
9074#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9075choke me
9076#else
503d2be0 9077f = $ac_func;
4c343001
DL
9078#endif
9079
503d2be0
AS
9080 ;
9081 return 0;
9082}
9083_ACEOF
9084rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 9085if { (eval echo "$as_me:9085: \"$ac_link\"") >&5
503d2be0
AS
9086 (eval $ac_link) 2>&5
9087 ac_status=$?
1096bcc0 9088 echo "$as_me:9088: \$? = $ac_status" >&5
503d2be0
AS
9089 (exit $ac_status); } &&
9090 { ac_try='test -s conftest$ac_exeext'
1096bcc0 9091 { (eval echo "$as_me:9091: \"$ac_try\"") >&5
503d2be0
AS
9092 (eval $ac_try) 2>&5
9093 ac_status=$?
1096bcc0 9094 echo "$as_me:9094: \$? = $ac_status" >&5
503d2be0
AS
9095 (exit $ac_status); }; }; then
9096 eval "$as_ac_var=yes"
4c343001 9097else
503d2be0
AS
9098 echo "$as_me: failed program was:" >&5
9099cat conftest.$ac_ext >&5
9100eval "$as_ac_var=no"
4c343001 9101fi
503d2be0 9102rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4c343001 9103fi
1096bcc0 9104echo "$as_me:9104: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
9105echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9106if test `eval echo '${'$as_ac_var'}'` = yes; then
9107 cat >>confdefs.h <<EOF
9108#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4c343001 9109EOF
4c343001 9110
503d2be0
AS
9111else
9112 LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
4c343001 9113
503d2be0
AS
9114cat >>confdefs.h <<\EOF
9115#define C_GETLOADAVG 1
4c343001
DL
9116EOF
9117
503d2be0
AS
9118# Figure out what our getloadavg.c needs.
9119ac_have_func=no
1096bcc0 9120echo "$as_me:9120: checking for sys/dg_sys_info.h" >&5
503d2be0
AS
9121echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
9122if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
9123 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9124else
503d2be0 9125 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 9126#line 9126 "configure"
4c343001
DL
9127#include "confdefs.h"
9128#include <sys/dg_sys_info.h>
503d2be0 9129_ACEOF
1096bcc0 9130if { (eval echo "$as_me:9130: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9131 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9132 ac_status=$?
9133 egrep -v '^ *\+' conftest.er1 >conftest.err
9134 rm -f conftest.er1
9135 cat conftest.err >&5
1096bcc0 9136 echo "$as_me:9136: \$? = $ac_status" >&5
503d2be0
AS
9137 (exit $ac_status); } >/dev/null; then
9138 if test -s conftest.err; then
9139 ac_cpp_err=$ac_c_preproc_warn_flag
9140 else
9141 ac_cpp_err=
9142 fi
9143else
9144 ac_cpp_err=yes
9145fi
9146if test -z "$ac_cpp_err"; then
9147 ac_cv_header_sys_dg_sys_info_h=yes
4c343001 9148else
503d2be0 9149 echo "$as_me: failed program was:" >&5
4c343001 9150 cat conftest.$ac_ext >&5
503d2be0 9151 ac_cv_header_sys_dg_sys_info_h=no
4c343001 9152fi
503d2be0 9153rm -f conftest.err conftest.$ac_ext
4c343001 9154fi
1096bcc0 9155echo "$as_me:9155: result: $ac_cv_header_sys_dg_sys_info_h" >&5
503d2be0
AS
9156echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
9157if test $ac_cv_header_sys_dg_sys_info_h = yes; then
9158 ac_have_func=yes
9159
9160cat >>confdefs.h <<\EOF
4c343001
DL
9161#define DGUX 1
9162EOF
9163
1096bcc0 9164echo "$as_me:9164: checking for dg_sys_info in -ldgc" >&5
503d2be0
AS
9165echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6
9166if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
9167 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9168else
503d2be0 9169 ac_check_lib_save_LIBS=$LIBS
4c343001 9170LIBS="-ldgc $LIBS"
503d2be0 9171cat >conftest.$ac_ext <<_ACEOF
1096bcc0 9172#line 9172 "configure"
4c343001 9173#include "confdefs.h"
503d2be0 9174
4c343001 9175/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9176#ifdef __cplusplus
9177extern "C"
9178#endif
4c343001 9179/* We use char because int might match the return type of a gcc2
503d2be0
AS
9180 builtin and then its argument prototype would still apply. */
9181char dg_sys_info ();
9182int
9183main ()
9184{
9185dg_sys_info ();
9186 ;
9187 return 0;
9188}
9189_ACEOF
9190rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 9191if { (eval echo "$as_me:9191: \"$ac_link\"") >&5
503d2be0
AS
9192 (eval $ac_link) 2>&5
9193 ac_status=$?
1096bcc0 9194 echo "$as_me:9194: \$? = $ac_status" >&5
503d2be0
AS
9195 (exit $ac_status); } &&
9196 { ac_try='test -s conftest$ac_exeext'
1096bcc0 9197 { (eval echo "$as_me:9197: \"$ac_try\"") >&5
503d2be0
AS
9198 (eval $ac_try) 2>&5
9199 ac_status=$?
1096bcc0 9200 echo "$as_me:9200: \$? = $ac_status" >&5
503d2be0
AS
9201 (exit $ac_status); }; }; then
9202 ac_cv_lib_dgc_dg_sys_info=yes
9203else
9204 echo "$as_me: failed program was:" >&5
9205cat conftest.$ac_ext >&5
9206ac_cv_lib_dgc_dg_sys_info=no
9207fi
9208rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9209LIBS=$ac_check_lib_save_LIBS
9210fi
1096bcc0 9211echo "$as_me:9211: result: $ac_cv_lib_dgc_dg_sys_info" >&5
503d2be0
AS
9212echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6
9213if test $ac_cv_lib_dgc_dg_sys_info = yes; then
9214 cat >>confdefs.h <<EOF
9215#define HAVE_LIBDGC 1
4c343001 9216EOF
503d2be0
AS
9217
9218 LIBS="-ldgc $LIBS"
4c343001
DL
9219
9220fi
4c343001 9221
503d2be0 9222fi
4c343001 9223
1096bcc0 9224echo "$as_me:9224: checking for locale.h" >&5
503d2be0
AS
9225echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
9226if test "${ac_cv_header_locale_h+set}" = set; then
9227 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9228else
503d2be0 9229 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 9230#line 9230 "configure"
503d2be0
AS
9231#include "confdefs.h"
9232#include <locale.h>
9233_ACEOF
1096bcc0 9234if { (eval echo "$as_me:9234: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9235 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9236 ac_status=$?
9237 egrep -v '^ *\+' conftest.er1 >conftest.err
9238 rm -f conftest.er1
9239 cat conftest.err >&5
1096bcc0 9240 echo "$as_me:9240: \$? = $ac_status" >&5
503d2be0
AS
9241 (exit $ac_status); } >/dev/null; then
9242 if test -s conftest.err; then
9243 ac_cpp_err=$ac_c_preproc_warn_flag
9244 else
9245 ac_cpp_err=
9246 fi
9247else
9248 ac_cpp_err=yes
4c343001 9249fi
503d2be0
AS
9250if test -z "$ac_cpp_err"; then
9251 ac_cv_header_locale_h=yes
9252else
9253 echo "$as_me: failed program was:" >&5
9254 cat conftest.$ac_ext >&5
9255 ac_cv_header_locale_h=no
9256fi
9257rm -f conftest.err conftest.$ac_ext
9258fi
1096bcc0 9259echo "$as_me:9259: result: $ac_cv_header_locale_h" >&5
503d2be0 9260echo "${ECHO_T}$ac_cv_header_locale_h" >&6
4c343001 9261
503d2be0
AS
9262for ac_func in setlocale
9263do
9264as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
1096bcc0 9265echo "$as_me:9265: checking for $ac_func" >&5
503d2be0
AS
9266echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9267if eval "test \"\${$as_ac_var+set}\" = set"; then
9268 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9269else
503d2be0 9270 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 9271#line 9271 "configure"
503d2be0
AS
9272#include "confdefs.h"
9273/* System header to define __stub macros and hopefully few prototypes,
9274 which can conflict with char $ac_func (); below. */
9275#include <assert.h>
9276/* Override any gcc2 internal prototype to avoid an error. */
9277#ifdef __cplusplus
9278extern "C"
9279#endif
9280/* We use char because int might match the return type of a gcc2
9281 builtin and then its argument prototype would still apply. */
9282char $ac_func ();
9283char (*f) ();
9284
9285int
9286main ()
9287{
9288/* The GNU C library defines this for functions which it implements
9289 to always fail with ENOSYS. Some functions are actually named
9290 something starting with __ and the normal name is an alias. */
9291#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9292choke me
9293#else
9294f = $ac_func;
9295#endif
9296
9297 ;
9298 return 0;
9299}
9300_ACEOF
9301rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 9302if { (eval echo "$as_me:9302: \"$ac_link\"") >&5
503d2be0
AS
9303 (eval $ac_link) 2>&5
9304 ac_status=$?
1096bcc0 9305 echo "$as_me:9305: \$? = $ac_status" >&5
503d2be0
AS
9306 (exit $ac_status); } &&
9307 { ac_try='test -s conftest$ac_exeext'
1096bcc0 9308 { (eval echo "$as_me:9308: \"$ac_try\"") >&5
503d2be0
AS
9309 (eval $ac_try) 2>&5
9310 ac_status=$?
1096bcc0 9311 echo "$as_me:9311: \$? = $ac_status" >&5
503d2be0
AS
9312 (exit $ac_status); }; }; then
9313 eval "$as_ac_var=yes"
9314else
9315 echo "$as_me: failed program was:" >&5
9316cat conftest.$ac_ext >&5
9317eval "$as_ac_var=no"
9318fi
9319rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9320fi
1096bcc0 9321echo "$as_me:9321: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
9322echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9323if test `eval echo '${'$as_ac_var'}'` = yes; then
9324 cat >>confdefs.h <<EOF
9325#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9326EOF
9327
4c343001 9328fi
503d2be0 9329done
4c343001 9330
503d2be0
AS
9331# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
9332# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
9333# Irix 4.0.5F has the header but not the library.
9334if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
9335 ac_have_func=yes
4c343001 9336
503d2be0 9337cat >>confdefs.h <<\EOF
4c343001
DL
9338#define SVR4 1
9339EOF
9340
503d2be0 9341fi
4c343001 9342
503d2be0 9343if test $ac_have_func = no; then
1096bcc0 9344 echo "$as_me:9344: checking for inq_stats/cpustats.h" >&5
503d2be0
AS
9345echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
9346if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
9347 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9348else
503d2be0 9349 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 9350#line 9350 "configure"
4c343001
DL
9351#include "confdefs.h"
9352#include <inq_stats/cpustats.h>
503d2be0 9353_ACEOF
1096bcc0 9354if { (eval echo "$as_me:9354: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9355 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9356 ac_status=$?
9357 egrep -v '^ *\+' conftest.er1 >conftest.err
9358 rm -f conftest.er1
9359 cat conftest.err >&5
1096bcc0 9360 echo "$as_me:9360: \$? = $ac_status" >&5
503d2be0
AS
9361 (exit $ac_status); } >/dev/null; then
9362 if test -s conftest.err; then
9363 ac_cpp_err=$ac_c_preproc_warn_flag
9364 else
9365 ac_cpp_err=
9366 fi
9367else
9368 ac_cpp_err=yes
9369fi
9370if test -z "$ac_cpp_err"; then
9371 ac_cv_header_inq_stats_cpustats_h=yes
4c343001 9372else
503d2be0 9373 echo "$as_me: failed program was:" >&5
4c343001 9374 cat conftest.$ac_ext >&5
503d2be0 9375 ac_cv_header_inq_stats_cpustats_h=no
4c343001 9376fi
503d2be0 9377rm -f conftest.err conftest.$ac_ext
4c343001 9378fi
1096bcc0 9379echo "$as_me:9379: result: $ac_cv_header_inq_stats_cpustats_h" >&5
503d2be0
AS
9380echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
9381if test $ac_cv_header_inq_stats_cpustats_h = yes; then
9382 ac_have_func=yes
9383
9384cat >>confdefs.h <<\EOF
4c343001
DL
9385#define UMAX 1
9386EOF
9387
503d2be0 9388cat >>confdefs.h <<\EOF
4c343001
DL
9389#define UMAX4_3 1
9390EOF
9391
4c343001
DL
9392fi
9393
503d2be0 9394fi
4c343001 9395
503d2be0 9396if test $ac_have_func = no; then
1096bcc0 9397 echo "$as_me:9397: checking for sys/cpustats.h" >&5
503d2be0
AS
9398echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
9399if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
9400 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9401else
503d2be0 9402 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 9403#line 9403 "configure"
4c343001
DL
9404#include "confdefs.h"
9405#include <sys/cpustats.h>
503d2be0 9406_ACEOF
1096bcc0 9407if { (eval echo "$as_me:9407: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9408 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9409 ac_status=$?
9410 egrep -v '^ *\+' conftest.er1 >conftest.err
9411 rm -f conftest.er1
9412 cat conftest.err >&5
1096bcc0 9413 echo "$as_me:9413: \$? = $ac_status" >&5
503d2be0
AS
9414 (exit $ac_status); } >/dev/null; then
9415 if test -s conftest.err; then
9416 ac_cpp_err=$ac_c_preproc_warn_flag
9417 else
9418 ac_cpp_err=
9419 fi
4c343001 9420else
503d2be0
AS
9421 ac_cpp_err=yes
9422fi
9423if test -z "$ac_cpp_err"; then
9424 ac_cv_header_sys_cpustats_h=yes
9425else
9426 echo "$as_me: failed program was:" >&5
4c343001 9427 cat conftest.$ac_ext >&5
503d2be0 9428 ac_cv_header_sys_cpustats_h=no
4c343001 9429fi
503d2be0 9430rm -f conftest.err conftest.$ac_ext
4c343001 9431fi
1096bcc0 9432echo "$as_me:9432: result: $ac_cv_header_sys_cpustats_h" >&5
503d2be0
AS
9433echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
9434if test $ac_cv_header_sys_cpustats_h = yes; then
9435 ac_have_func=yes; cat >>confdefs.h <<\EOF
4c343001
DL
9436#define UMAX 1
9437EOF
9438
4c343001
DL
9439fi
9440
503d2be0 9441fi
4c343001 9442
503d2be0
AS
9443if test $ac_have_func = no; then
9444
9445for ac_header in mach/mach.h
4c343001 9446do
503d2be0 9447as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
1096bcc0 9448echo "$as_me:9448: checking for $ac_header" >&5
503d2be0
AS
9449echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9450if eval "test \"\${$as_ac_Header+set}\" = set"; then
9451 echo $ECHO_N "(cached) $ECHO_C" >&6
9452else
9453 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 9454#line 9454 "configure"
503d2be0
AS
9455#include "confdefs.h"
9456#include <$ac_header>
9457_ACEOF
1096bcc0 9458if { (eval echo "$as_me:9458: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9459 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9460 ac_status=$?
9461 egrep -v '^ *\+' conftest.er1 >conftest.err
9462 rm -f conftest.er1
9463 cat conftest.err >&5
1096bcc0 9464 echo "$as_me:9464: \$? = $ac_status" >&5
503d2be0
AS
9465 (exit $ac_status); } >/dev/null; then
9466 if test -s conftest.err; then
9467 ac_cpp_err=$ac_c_preproc_warn_flag
9468 else
9469 ac_cpp_err=
9470 fi
9471else
9472 ac_cpp_err=yes
9473fi
9474if test -z "$ac_cpp_err"; then
9475 eval "$as_ac_Header=yes"
9476else
9477 echo "$as_me: failed program was:" >&5
4c343001 9478 cat conftest.$ac_ext >&5
503d2be0 9479 eval "$as_ac_Header=no"
4c343001 9480fi
503d2be0 9481rm -f conftest.err conftest.$ac_ext
4c343001 9482fi
1096bcc0 9483echo "$as_me:9483: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
9484echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9485if test `eval echo '${'$as_ac_Header'}'` = yes; then
9486 cat >>confdefs.h <<EOF
9487#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4c343001 9488EOF
503d2be0 9489
4c343001
DL
9490fi
9491done
9492
503d2be0 9493fi
4c343001 9494
503d2be0
AS
9495for ac_header in nlist.h
9496do
9497as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
1096bcc0 9498echo "$as_me:9498: checking for $ac_header" >&5
503d2be0
AS
9499echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9500if eval "test \"\${$as_ac_Header+set}\" = set"; then
9501 echo $ECHO_N "(cached) $ECHO_C" >&6
9502else
9503 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 9504#line 9504 "configure"
503d2be0
AS
9505#include "confdefs.h"
9506#include <$ac_header>
9507_ACEOF
1096bcc0 9508if { (eval echo "$as_me:9508: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9509 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9510 ac_status=$?
9511 egrep -v '^ *\+' conftest.er1 >conftest.err
9512 rm -f conftest.er1
9513 cat conftest.err >&5
1096bcc0 9514 echo "$as_me:9514: \$? = $ac_status" >&5
503d2be0
AS
9515 (exit $ac_status); } >/dev/null; then
9516 if test -s conftest.err; then
9517 ac_cpp_err=$ac_c_preproc_warn_flag
9518 else
9519 ac_cpp_err=
9520 fi
4c343001 9521else
503d2be0
AS
9522 ac_cpp_err=yes
9523fi
9524if test -z "$ac_cpp_err"; then
9525 eval "$as_ac_Header=yes"
4c343001 9526else
503d2be0 9527 echo "$as_me: failed program was:" >&5
4c343001 9528 cat conftest.$ac_ext >&5
503d2be0 9529 eval "$as_ac_Header=no"
4c343001 9530fi
503d2be0 9531rm -f conftest.err conftest.$ac_ext
4c343001 9532fi
1096bcc0 9533echo "$as_me:9533: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
9534echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9535if test `eval echo '${'$as_ac_Header'}'` = yes; then
9536 cat >>confdefs.h <<EOF
9537#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4c343001 9538EOF
1096bcc0 9539 echo "$as_me:9539: checking for struct nlist.n_un.n_name" >&5
503d2be0
AS
9540echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6
9541if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
9542 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9543else
503d2be0 9544 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 9545#line 9545 "configure"
4c343001
DL
9546#include "confdefs.h"
9547#include <nlist.h>
4c343001 9548
503d2be0
AS
9549int
9550main ()
9551{
9552static struct nlist ac_aggr;
9553if (ac_aggr.n_un.n_name)
9554return 0;
9555 ;
9556 return 0;
9557}
9558_ACEOF
9559rm -f conftest.$ac_objext
1096bcc0 9560if { (eval echo "$as_me:9560: \"$ac_compile\"") >&5
503d2be0
AS
9561 (eval $ac_compile) 2>&5
9562 ac_status=$?
1096bcc0 9563 echo "$as_me:9563: \$? = $ac_status" >&5
503d2be0
AS
9564 (exit $ac_status); } &&
9565 { ac_try='test -s conftest.$ac_objext'
1096bcc0 9566 { (eval echo "$as_me:9566: \"$ac_try\"") >&5
503d2be0
AS
9567 (eval $ac_try) 2>&5
9568 ac_status=$?
1096bcc0 9569 echo "$as_me:9569: \$? = $ac_status" >&5
503d2be0
AS
9570 (exit $ac_status); }; }; then
9571 ac_cv_member_struct_nlist_n_un_n_name=yes
9572else
9573 echo "$as_me: failed program was:" >&5
9574cat conftest.$ac_ext >&5
9575ac_cv_member_struct_nlist_n_un_n_name=no
9576fi
9577rm -f conftest.$ac_objext conftest.$ac_ext
9578fi
1096bcc0 9579echo "$as_me:9579: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
503d2be0
AS
9580echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6
9581if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
9582
9583cat >>confdefs.h <<EOF
9584#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
9585EOF
9586
9587cat >>confdefs.h <<\EOF
4c343001
DL
9588#define NLIST_NAME_UNION 1
9589EOF
9590
4c343001 9591fi
503d2be0
AS
9592
9593fi
9594done
9595
9596fi
9597done
4c343001
DL
9598
9599# Some definitions of getloadavg require that the program be installed setgid.
1096bcc0 9600echo "$as_me:9600: checking whether getloadavg requires setgid" >&5
503d2be0
AS
9601echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6
9602if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
9603 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9604else
503d2be0 9605 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 9606#line 9606 "configure"
4c343001
DL
9607#include "confdefs.h"
9608#include "$srcdir/getloadavg.c"
9609#ifdef LDAV_PRIVILEGED
9610Yowza Am I SETGID yet
9611#endif
503d2be0 9612_ACEOF
4c343001
DL
9613if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9614 egrep "Yowza Am I SETGID yet" >/dev/null 2>&1; then
4c343001
DL
9615 ac_cv_func_getloadavg_setgid=yes
9616else
4c343001
DL
9617 ac_cv_func_getloadavg_setgid=no
9618fi
9619rm -f conftest*
9620
9621fi
1096bcc0 9622echo "$as_me:9622: result: $ac_cv_func_getloadavg_setgid" >&5
503d2be0 9623echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6
4c343001 9624if test $ac_cv_func_getloadavg_setgid = yes; then
503d2be0
AS
9625 NEED_SETGID=true
9626
9627cat >>confdefs.h <<\EOF
4c343001
DL
9628#define GETLOADAVG_PRIVILEGED 1
9629EOF
9630
9631else
9632 NEED_SETGID=false
9633fi
9634
9635if test $ac_cv_func_getloadavg_setgid = yes; then
1096bcc0 9636 echo "$as_me:9636: checking group of /dev/kmem" >&5
503d2be0
AS
9637echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6
9638if test "${ac_cv_group_kmem+set}" = set; then
9639 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 9640else
503d2be0 9641 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
4c343001
DL
9642 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
9643 # If we got an error (system does not support symlinks), try without -L.
9644 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
9645 ac_cv_group_kmem=`echo $ac_ls_output \
9646 | sed -ne 's/[ ][ ]*/ /g;
9647 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
9648 / /s/.* //;p;'`
9649
9650fi
1096bcc0 9651echo "$as_me:9651: result: $ac_cv_group_kmem" >&5
503d2be0 9652echo "${ECHO_T}$ac_cv_group_kmem" >&6
4c343001
DL
9653 KMEM_GROUP=$ac_cv_group_kmem
9654fi
503d2be0
AS
9655if test "x$ac_save_LIBS" = x; then
9656 GETLOADAVG_LIBS=$LIBS
9657else
9658 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
9659fi
9660LIBS=$ac_save_LIBS
4c343001 9661
1096bcc0 9662echo "$as_me:9662: checking for _LARGEFILE_SOURCE value needed for large files" >&5
503d2be0
AS
9663echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9664if test "${ac_cv_sys_largefile_source+set}" = set; then
9665 echo $ECHO_N "(cached) $ECHO_C" >&6
d42122a3 9666else
503d2be0 9667 while :; do
169fe44e 9668 ac_cv_sys_largefile_source=no
503d2be0 9669 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 9670#line 9670 "configure"
169fe44e
GM
9671#include "confdefs.h"
9672#include <stdio.h>
503d2be0
AS
9673int
9674main ()
9675{
169fe44e 9676return !fseeko;
503d2be0
AS
9677 ;
9678 return 0;
9679}
9680_ACEOF
9681rm -f conftest.$ac_objext
1096bcc0 9682if { (eval echo "$as_me:9682: \"$ac_compile\"") >&5
503d2be0
AS
9683 (eval $ac_compile) 2>&5
9684 ac_status=$?
1096bcc0 9685 echo "$as_me:9685: \$? = $ac_status" >&5
503d2be0
AS
9686 (exit $ac_status); } &&
9687 { ac_try='test -s conftest.$ac_objext'
1096bcc0 9688 { (eval echo "$as_me:9688: \"$ac_try\"") >&5
503d2be0
AS
9689 (eval $ac_try) 2>&5
9690 ac_status=$?
1096bcc0 9691 echo "$as_me:9691: \$? = $ac_status" >&5
503d2be0
AS
9692 (exit $ac_status); }; }; then
9693 break
169fe44e 9694else
503d2be0
AS
9695 echo "$as_me: failed program was:" >&5
9696cat conftest.$ac_ext >&5
9697fi
9698rm -f conftest.$ac_objext conftest.$ac_ext
9699 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 9700#line 9700 "configure"
d42122a3 9701#include "confdefs.h"
169fe44e
GM
9702#define _LARGEFILE_SOURCE 1
9703#include <stdio.h>
503d2be0
AS
9704int
9705main ()
9706{
169fe44e 9707return !fseeko;
503d2be0
AS
9708 ;
9709 return 0;
9710}
9711_ACEOF
9712rm -f conftest.$ac_objext
1096bcc0 9713if { (eval echo "$as_me:9713: \"$ac_compile\"") >&5
503d2be0
AS
9714 (eval $ac_compile) 2>&5
9715 ac_status=$?
1096bcc0 9716 echo "$as_me:9716: \$? = $ac_status" >&5
503d2be0
AS
9717 (exit $ac_status); } &&
9718 { ac_try='test -s conftest.$ac_objext'
1096bcc0 9719 { (eval echo "$as_me:9719: \"$ac_try\"") >&5
503d2be0
AS
9720 (eval $ac_try) 2>&5
9721 ac_status=$?
1096bcc0 9722 echo "$as_me:9722: \$? = $ac_status" >&5
503d2be0
AS
9723 (exit $ac_status); }; }; then
9724 ac_cv_sys_largefile_source=1; break
9725else
9726 echo "$as_me: failed program was:" >&5
9727cat conftest.$ac_ext >&5
9728fi
9729rm -f conftest.$ac_objext conftest.$ac_ext
9730 break
9731done
d42122a3 9732fi
1096bcc0 9733echo "$as_me:9733: result: $ac_cv_sys_largefile_source" >&5
503d2be0
AS
9734echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9735if test "$ac_cv_sys_largefile_source" != no; then
d42122a3 9736
503d2be0 9737cat >>confdefs.h <<EOF
169fe44e 9738#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
d42122a3 9739EOF
169fe44e 9740
503d2be0
AS
9741fi
9742rm -f conftest*
169fe44e 9743
503d2be0
AS
9744# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9745# in glibc 2.1.3, but that breaks too many other things.
9746# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
1096bcc0 9747echo "$as_me:9747: checking for fseeko" >&5
503d2be0
AS
9748echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9749if test "${ac_cv_func_fseeko+set}" = set; then
9750 echo $ECHO_N "(cached) $ECHO_C" >&6
d42122a3 9751else
503d2be0 9752 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 9753#line 9753 "configure"
169fe44e
GM
9754#include "confdefs.h"
9755#include <stdio.h>
503d2be0
AS
9756int
9757main ()
9758{
169fe44e 9759return fseeko && fseeko (stdin, 0, 0);
503d2be0
AS
9760 ;
9761 return 0;
9762}
9763_ACEOF
9764rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 9765if { (eval echo "$as_me:9765: \"$ac_link\"") >&5
503d2be0
AS
9766 (eval $ac_link) 2>&5
9767 ac_status=$?
1096bcc0 9768 echo "$as_me:9768: \$? = $ac_status" >&5
503d2be0
AS
9769 (exit $ac_status); } &&
9770 { ac_try='test -s conftest$ac_exeext'
1096bcc0 9771 { (eval echo "$as_me:9771: \"$ac_try\"") >&5
503d2be0
AS
9772 (eval $ac_try) 2>&5
9773 ac_status=$?
1096bcc0 9774 echo "$as_me:9774: \$? = $ac_status" >&5
503d2be0 9775 (exit $ac_status); }; }; then
169fe44e
GM
9776 ac_cv_func_fseeko=yes
9777else
503d2be0
AS
9778 echo "$as_me: failed program was:" >&5
9779cat conftest.$ac_ext >&5
9780ac_cv_func_fseeko=no
169fe44e 9781fi
503d2be0 9782rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
d42122a3 9783fi
1096bcc0 9784echo "$as_me:9784: result: $ac_cv_func_fseeko" >&5
503d2be0
AS
9785echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9786if test $ac_cv_func_fseeko = yes; then
d42122a3 9787
503d2be0 9788cat >>confdefs.h <<\EOF
169fe44e
GM
9789#define HAVE_FSEEKO 1
9790EOF
9791
503d2be0 9792fi
d42122a3 9793
169fe44e 9794# UNIX98 PTYs.
503d2be0 9795
087121cc
GM
9796for ac_func in grantpt
9797do
503d2be0 9798as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
1096bcc0 9799echo "$as_me:9799: checking for $ac_func" >&5
503d2be0
AS
9800echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9801if eval "test \"\${$as_ac_var+set}\" = set"; then
9802 echo $ECHO_N "(cached) $ECHO_C" >&6
087121cc 9803else
503d2be0 9804 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 9805#line 9805 "configure"
087121cc
GM
9806#include "confdefs.h"
9807/* System header to define __stub macros and hopefully few prototypes,
503d2be0 9808 which can conflict with char $ac_func (); below. */
087121cc
GM
9809#include <assert.h>
9810/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9811#ifdef __cplusplus
9812extern "C"
9813#endif
087121cc 9814/* We use char because int might match the return type of a gcc2
503d2be0
AS
9815 builtin and then its argument prototype would still apply. */
9816char $ac_func ();
9817char (*f) ();
087121cc 9818
503d2be0
AS
9819int
9820main ()
9821{
087121cc
GM
9822/* The GNU C library defines this for functions which it implements
9823 to always fail with ENOSYS. Some functions are actually named
9824 something starting with __ and the normal name is an alias. */
9825#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9826choke me
9827#else
503d2be0 9828f = $ac_func;
087121cc
GM
9829#endif
9830
503d2be0
AS
9831 ;
9832 return 0;
9833}
9834_ACEOF
9835rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 9836if { (eval echo "$as_me:9836: \"$ac_link\"") >&5
503d2be0
AS
9837 (eval $ac_link) 2>&5
9838 ac_status=$?
1096bcc0 9839 echo "$as_me:9839: \$? = $ac_status" >&5
503d2be0
AS
9840 (exit $ac_status); } &&
9841 { ac_try='test -s conftest$ac_exeext'
1096bcc0 9842 { (eval echo "$as_me:9842: \"$ac_try\"") >&5
503d2be0
AS
9843 (eval $ac_try) 2>&5
9844 ac_status=$?
1096bcc0 9845 echo "$as_me:9845: \$? = $ac_status" >&5
503d2be0
AS
9846 (exit $ac_status); }; }; then
9847 eval "$as_ac_var=yes"
9848else
9849 echo "$as_me: failed program was:" >&5
9850cat conftest.$ac_ext >&5
9851eval "$as_ac_var=no"
9852fi
9853rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9854fi
1096bcc0 9855echo "$as_me:9855: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
9856echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9857if test `eval echo '${'$as_ac_var'}'` = yes; then
9858 cat >>confdefs.h <<EOF
9859#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
087121cc 9860EOF
087121cc 9861
087121cc
GM
9862fi
9863done
9864
087121cc 9865# PTY-related GNU extensions.
503d2be0 9866
087121cc
GM
9867for ac_func in getpt
9868do
503d2be0 9869as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
1096bcc0 9870echo "$as_me:9870: checking for $ac_func" >&5
503d2be0
AS
9871echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9872if eval "test \"\${$as_ac_var+set}\" = set"; then
9873 echo $ECHO_N "(cached) $ECHO_C" >&6
087121cc 9874else
503d2be0 9875 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 9876#line 9876 "configure"
087121cc
GM
9877#include "confdefs.h"
9878/* System header to define __stub macros and hopefully few prototypes,
503d2be0 9879 which can conflict with char $ac_func (); below. */
087121cc
GM
9880#include <assert.h>
9881/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9882#ifdef __cplusplus
9883extern "C"
9884#endif
087121cc 9885/* We use char because int might match the return type of a gcc2
503d2be0
AS
9886 builtin and then its argument prototype would still apply. */
9887char $ac_func ();
9888char (*f) ();
087121cc 9889
503d2be0
AS
9890int
9891main ()
9892{
087121cc
GM
9893/* The GNU C library defines this for functions which it implements
9894 to always fail with ENOSYS. Some functions are actually named
9895 something starting with __ and the normal name is an alias. */
9896#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9897choke me
9898#else
503d2be0 9899f = $ac_func;
087121cc
GM
9900#endif
9901
503d2be0
AS
9902 ;
9903 return 0;
9904}
9905_ACEOF
9906rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 9907if { (eval echo "$as_me:9907: \"$ac_link\"") >&5
503d2be0
AS
9908 (eval $ac_link) 2>&5
9909 ac_status=$?
1096bcc0 9910 echo "$as_me:9910: \$? = $ac_status" >&5
503d2be0
AS
9911 (exit $ac_status); } &&
9912 { ac_try='test -s conftest$ac_exeext'
1096bcc0 9913 { (eval echo "$as_me:9913: \"$ac_try\"") >&5
503d2be0
AS
9914 (eval $ac_try) 2>&5
9915 ac_status=$?
1096bcc0 9916 echo "$as_me:9916: \$? = $ac_status" >&5
503d2be0
AS
9917 (exit $ac_status); }; }; then
9918 eval "$as_ac_var=yes"
9919else
9920 echo "$as_me: failed program was:" >&5
9921cat conftest.$ac_ext >&5
9922eval "$as_ac_var=no"
9923fi
9924rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9925fi
1096bcc0 9926echo "$as_me:9926: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
9927echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9928if test `eval echo '${'$as_ac_var'}'` = yes; then
9929 cat >>confdefs.h <<EOF
9930#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
087121cc 9931EOF
087121cc 9932
087121cc
GM
9933fi
9934done
9935
ba4481b5
DL
9936# Check this now, so that we will NOT find the above functions in ncurses.
9937# That is because we have not set up to link ncurses in lib-src.
9938# It's better to believe a function is not available
9939# than to expect to find it in ncurses.
503d2be0 9940
1096bcc0 9941echo "$as_me:9941: checking for tparm in -lncurses" >&5
503d2be0
AS
9942echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6
9943if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
9944 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9945else
503d2be0 9946 ac_check_lib_save_LIBS=$LIBS
ba4481b5 9947LIBS="-lncurses $LIBS"
503d2be0 9948cat >conftest.$ac_ext <<_ACEOF
1096bcc0 9949#line 9949 "configure"
ba4481b5 9950#include "confdefs.h"
503d2be0 9951
ba4481b5 9952/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9953#ifdef __cplusplus
9954extern "C"
9955#endif
ba4481b5 9956/* We use char because int might match the return type of a gcc2
503d2be0
AS
9957 builtin and then its argument prototype would still apply. */
9958char tparm ();
9959int
9960main ()
9961{
9962tparm ();
9963 ;
9964 return 0;
9965}
9966_ACEOF
9967rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 9968if { (eval echo "$as_me:9968: \"$ac_link\"") >&5
503d2be0
AS
9969 (eval $ac_link) 2>&5
9970 ac_status=$?
1096bcc0 9971 echo "$as_me:9971: \$? = $ac_status" >&5
503d2be0
AS
9972 (exit $ac_status); } &&
9973 { ac_try='test -s conftest$ac_exeext'
1096bcc0 9974 { (eval echo "$as_me:9974: \"$ac_try\"") >&5
503d2be0
AS
9975 (eval $ac_try) 2>&5
9976 ac_status=$?
1096bcc0 9977 echo "$as_me:9977: \$? = $ac_status" >&5
503d2be0
AS
9978 (exit $ac_status); }; }; then
9979 ac_cv_lib_ncurses_tparm=yes
9980else
9981 echo "$as_me: failed program was:" >&5
9982cat conftest.$ac_ext >&5
9983ac_cv_lib_ncurses_tparm=no
9984fi
9985rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9986LIBS=$ac_check_lib_save_LIBS
9987fi
1096bcc0 9988echo "$as_me:9988: result: $ac_cv_lib_ncurses_tparm" >&5
503d2be0
AS
9989echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6
9990if test $ac_cv_lib_ncurses_tparm = yes; then
9991 cat >>confdefs.h <<EOF
9992#define HAVE_LIBNCURSES 1
ba4481b5
DL
9993EOF
9994
9995 LIBS="-lncurses $LIBS"
9996
ba4481b5
DL
9997fi
9998
84e70f78
KR
9999# Do we need the Hesiod library to provide the support routines?
10000if test "$with_hesiod" = yes ; then
10001 # Don't set $LIBS here -- see comments above.
10002 resolv=no
1096bcc0 10003 echo "$as_me:10003: checking for res_send" >&5
84e70f78
KR
10004echo $ECHO_N "checking for res_send... $ECHO_C" >&6
10005if test "${ac_cv_func_res_send+set}" = set; then
10006 echo $ECHO_N "(cached) $ECHO_C" >&6
10007else
10008 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 10009#line 10009 "configure"
84e70f78
KR
10010#include "confdefs.h"
10011/* System header to define __stub macros and hopefully few prototypes,
10012 which can conflict with char res_send (); below. */
10013#include <assert.h>
10014/* Override any gcc2 internal prototype to avoid an error. */
10015#ifdef __cplusplus
10016extern "C"
10017#endif
10018/* We use char because int might match the return type of a gcc2
10019 builtin and then its argument prototype would still apply. */
10020char res_send ();
10021char (*f) ();
10022
10023int
10024main ()
10025{
10026/* The GNU C library defines this for functions which it implements
10027 to always fail with ENOSYS. Some functions are actually named
10028 something starting with __ and the normal name is an alias. */
10029#if defined (__stub_res_send) || defined (__stub___res_send)
10030choke me
10031#else
10032f = res_send;
10033#endif
10034
10035 ;
10036 return 0;
10037}
10038_ACEOF
10039rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 10040if { (eval echo "$as_me:10040: \"$ac_link\"") >&5
84e70f78
KR
10041 (eval $ac_link) 2>&5
10042 ac_status=$?
1096bcc0 10043 echo "$as_me:10043: \$? = $ac_status" >&5
84e70f78
KR
10044 (exit $ac_status); } &&
10045 { ac_try='test -s conftest$ac_exeext'
1096bcc0 10046 { (eval echo "$as_me:10046: \"$ac_try\"") >&5
84e70f78
KR
10047 (eval $ac_try) 2>&5
10048 ac_status=$?
1096bcc0 10049 echo "$as_me:10049: \$? = $ac_status" >&5
84e70f78
KR
10050 (exit $ac_status); }; }; then
10051 ac_cv_func_res_send=yes
10052else
10053 echo "$as_me: failed program was:" >&5
10054cat conftest.$ac_ext >&5
10055ac_cv_func_res_send=no
10056fi
10057rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10058fi
1096bcc0 10059echo "$as_me:10059: result: $ac_cv_func_res_send" >&5
84e70f78
KR
10060echo "${ECHO_T}$ac_cv_func_res_send" >&6
10061if test $ac_cv_func_res_send = yes; then
10062 :
10063else
1096bcc0 10064 echo "$as_me:10064: checking for __res_send" >&5
84e70f78
KR
10065echo $ECHO_N "checking for __res_send... $ECHO_C" >&6
10066if test "${ac_cv_func___res_send+set}" = set; then
10067 echo $ECHO_N "(cached) $ECHO_C" >&6
10068else
10069 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 10070#line 10070 "configure"
84e70f78
KR
10071#include "confdefs.h"
10072/* System header to define __stub macros and hopefully few prototypes,
10073 which can conflict with char __res_send (); below. */
10074#include <assert.h>
10075/* Override any gcc2 internal prototype to avoid an error. */
10076#ifdef __cplusplus
10077extern "C"
10078#endif
10079/* We use char because int might match the return type of a gcc2
10080 builtin and then its argument prototype would still apply. */
10081char __res_send ();
10082char (*f) ();
10083
10084int
10085main ()
10086{
10087/* The GNU C library defines this for functions which it implements
10088 to always fail with ENOSYS. Some functions are actually named
10089 something starting with __ and the normal name is an alias. */
10090#if defined (__stub___res_send) || defined (__stub_____res_send)
10091choke me
10092#else
10093f = __res_send;
10094#endif
10095
10096 ;
10097 return 0;
10098}
10099_ACEOF
10100rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 10101if { (eval echo "$as_me:10101: \"$ac_link\"") >&5
84e70f78
KR
10102 (eval $ac_link) 2>&5
10103 ac_status=$?
1096bcc0 10104 echo "$as_me:10104: \$? = $ac_status" >&5
84e70f78
KR
10105 (exit $ac_status); } &&
10106 { ac_try='test -s conftest$ac_exeext'
1096bcc0 10107 { (eval echo "$as_me:10107: \"$ac_try\"") >&5
84e70f78
KR
10108 (eval $ac_try) 2>&5
10109 ac_status=$?
1096bcc0 10110 echo "$as_me:10110: \$? = $ac_status" >&5
84e70f78
KR
10111 (exit $ac_status); }; }; then
10112 ac_cv_func___res_send=yes
10113else
10114 echo "$as_me: failed program was:" >&5
10115cat conftest.$ac_ext >&5
10116ac_cv_func___res_send=no
10117fi
10118rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10119fi
1096bcc0 10120echo "$as_me:10120: result: $ac_cv_func___res_send" >&5
84e70f78
KR
10121echo "${ECHO_T}$ac_cv_func___res_send" >&6
10122if test $ac_cv_func___res_send = yes; then
10123 :
10124else
1096bcc0 10125 echo "$as_me:10125: checking for res_send in -lresolv" >&5
84e70f78
KR
10126echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6
10127if test "${ac_cv_lib_resolv_res_send+set}" = set; then
10128 echo $ECHO_N "(cached) $ECHO_C" >&6
10129else
10130 ac_check_lib_save_LIBS=$LIBS
10131LIBS="-lresolv $LIBS"
10132cat >conftest.$ac_ext <<_ACEOF
1096bcc0 10133#line 10133 "configure"
84e70f78
KR
10134#include "confdefs.h"
10135
10136/* Override any gcc2 internal prototype to avoid an error. */
10137#ifdef __cplusplus
10138extern "C"
10139#endif
10140/* We use char because int might match the return type of a gcc2
10141 builtin and then its argument prototype would still apply. */
10142char res_send ();
10143int
10144main ()
10145{
10146res_send ();
10147 ;
10148 return 0;
10149}
10150_ACEOF
10151rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 10152if { (eval echo "$as_me:10152: \"$ac_link\"") >&5
84e70f78
KR
10153 (eval $ac_link) 2>&5
10154 ac_status=$?
1096bcc0 10155 echo "$as_me:10155: \$? = $ac_status" >&5
84e70f78
KR
10156 (exit $ac_status); } &&
10157 { ac_try='test -s conftest$ac_exeext'
1096bcc0 10158 { (eval echo "$as_me:10158: \"$ac_try\"") >&5
84e70f78
KR
10159 (eval $ac_try) 2>&5
10160 ac_status=$?
1096bcc0 10161 echo "$as_me:10161: \$? = $ac_status" >&5
84e70f78
KR
10162 (exit $ac_status); }; }; then
10163 ac_cv_lib_resolv_res_send=yes
10164else
10165 echo "$as_me: failed program was:" >&5
10166cat conftest.$ac_ext >&5
10167ac_cv_lib_resolv_res_send=no
10168fi
10169rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10170LIBS=$ac_check_lib_save_LIBS
10171fi
1096bcc0 10172echo "$as_me:10172: result: $ac_cv_lib_resolv_res_send" >&5
84e70f78
KR
10173echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6
10174if test $ac_cv_lib_resolv_res_send = yes; then
10175 resolv=yes
10176else
1096bcc0 10177 echo "$as_me:10177: checking for __res_send in -lresolv" >&5
84e70f78
KR
10178echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6
10179if test "${ac_cv_lib_resolv___res_send+set}" = set; then
10180 echo $ECHO_N "(cached) $ECHO_C" >&6
10181else
10182 ac_check_lib_save_LIBS=$LIBS
10183LIBS="-lresolv $LIBS"
10184cat >conftest.$ac_ext <<_ACEOF
1096bcc0 10185#line 10185 "configure"
84e70f78
KR
10186#include "confdefs.h"
10187
10188/* Override any gcc2 internal prototype to avoid an error. */
10189#ifdef __cplusplus
10190extern "C"
10191#endif
10192/* We use char because int might match the return type of a gcc2
10193 builtin and then its argument prototype would still apply. */
10194char __res_send ();
10195int
10196main ()
10197{
10198__res_send ();
10199 ;
10200 return 0;
10201}
10202_ACEOF
10203rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 10204if { (eval echo "$as_me:10204: \"$ac_link\"") >&5
84e70f78
KR
10205 (eval $ac_link) 2>&5
10206 ac_status=$?
1096bcc0 10207 echo "$as_me:10207: \$? = $ac_status" >&5
84e70f78
KR
10208 (exit $ac_status); } &&
10209 { ac_try='test -s conftest$ac_exeext'
1096bcc0 10210 { (eval echo "$as_me:10210: \"$ac_try\"") >&5
84e70f78
KR
10211 (eval $ac_try) 2>&5
10212 ac_status=$?
1096bcc0 10213 echo "$as_me:10213: \$? = $ac_status" >&5
84e70f78
KR
10214 (exit $ac_status); }; }; then
10215 ac_cv_lib_resolv___res_send=yes
10216else
10217 echo "$as_me: failed program was:" >&5
10218cat conftest.$ac_ext >&5
10219ac_cv_lib_resolv___res_send=no
10220fi
10221rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10222LIBS=$ac_check_lib_save_LIBS
10223fi
1096bcc0 10224echo "$as_me:10224: result: $ac_cv_lib_resolv___res_send" >&5
84e70f78
KR
10225echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6
10226if test $ac_cv_lib_resolv___res_send = yes; then
10227 resolv=yes
10228fi
10229
10230fi
10231
10232fi
10233
10234fi
10235
10236 if test "$resolv" = yes ; then
10237 RESOLVLIB=-lresolv
10238 cat >>confdefs.h <<\EOF
10239#define HAVE_LIBRESOLV 1
10240EOF
10241
10242 else
10243 RESOLVLIB=
10244 fi
1096bcc0 10245 echo "$as_me:10245: checking for hes_getmailhost" >&5
84e70f78
KR
10246echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6
10247if test "${ac_cv_func_hes_getmailhost+set}" = set; then
10248 echo $ECHO_N "(cached) $ECHO_C" >&6
10249else
10250 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 10251#line 10251 "configure"
84e70f78
KR
10252#include "confdefs.h"
10253/* System header to define __stub macros and hopefully few prototypes,
10254 which can conflict with char hes_getmailhost (); below. */
10255#include <assert.h>
10256/* Override any gcc2 internal prototype to avoid an error. */
10257#ifdef __cplusplus
10258extern "C"
10259#endif
10260/* We use char because int might match the return type of a gcc2
10261 builtin and then its argument prototype would still apply. */
10262char hes_getmailhost ();
10263char (*f) ();
10264
10265int
10266main ()
10267{
10268/* The GNU C library defines this for functions which it implements
10269 to always fail with ENOSYS. Some functions are actually named
10270 something starting with __ and the normal name is an alias. */
10271#if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
10272choke me
10273#else
10274f = hes_getmailhost;
10275#endif
10276
10277 ;
10278 return 0;
10279}
10280_ACEOF
10281rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 10282if { (eval echo "$as_me:10282: \"$ac_link\"") >&5
84e70f78
KR
10283 (eval $ac_link) 2>&5
10284 ac_status=$?
1096bcc0 10285 echo "$as_me:10285: \$? = $ac_status" >&5
84e70f78
KR
10286 (exit $ac_status); } &&
10287 { ac_try='test -s conftest$ac_exeext'
1096bcc0 10288 { (eval echo "$as_me:10288: \"$ac_try\"") >&5
84e70f78
KR
10289 (eval $ac_try) 2>&5
10290 ac_status=$?
1096bcc0 10291 echo "$as_me:10291: \$? = $ac_status" >&5
84e70f78
KR
10292 (exit $ac_status); }; }; then
10293 ac_cv_func_hes_getmailhost=yes
10294else
10295 echo "$as_me: failed program was:" >&5
10296cat conftest.$ac_ext >&5
10297ac_cv_func_hes_getmailhost=no
10298fi
10299rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10300fi
1096bcc0 10301echo "$as_me:10301: result: $ac_cv_func_hes_getmailhost" >&5
84e70f78
KR
10302echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6
10303if test $ac_cv_func_hes_getmailhost = yes; then
10304 :
10305else
1096bcc0 10306 echo "$as_me:10306: checking for hes_getmailhost in -lhesiod" >&5
84e70f78
KR
10307echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6
10308if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
10309 echo $ECHO_N "(cached) $ECHO_C" >&6
10310else
10311 ac_check_lib_save_LIBS=$LIBS
10312LIBS="-lhesiod $RESOLVLIB $LIBS"
10313cat >conftest.$ac_ext <<_ACEOF
1096bcc0 10314#line 10314 "configure"
84e70f78
KR
10315#include "confdefs.h"
10316
10317/* Override any gcc2 internal prototype to avoid an error. */
10318#ifdef __cplusplus
10319extern "C"
10320#endif
10321/* We use char because int might match the return type of a gcc2
10322 builtin and then its argument prototype would still apply. */
10323char hes_getmailhost ();
10324int
10325main ()
10326{
10327hes_getmailhost ();
10328 ;
10329 return 0;
10330}
10331_ACEOF
10332rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 10333if { (eval echo "$as_me:10333: \"$ac_link\"") >&5
84e70f78
KR
10334 (eval $ac_link) 2>&5
10335 ac_status=$?
1096bcc0 10336 echo "$as_me:10336: \$? = $ac_status" >&5
84e70f78
KR
10337 (exit $ac_status); } &&
10338 { ac_try='test -s conftest$ac_exeext'
1096bcc0 10339 { (eval echo "$as_me:10339: \"$ac_try\"") >&5
84e70f78
KR
10340 (eval $ac_try) 2>&5
10341 ac_status=$?
1096bcc0 10342 echo "$as_me:10342: \$? = $ac_status" >&5
84e70f78
KR
10343 (exit $ac_status); }; }; then
10344 ac_cv_lib_hesiod_hes_getmailhost=yes
10345else
10346 echo "$as_me: failed program was:" >&5
10347cat conftest.$ac_ext >&5
10348ac_cv_lib_hesiod_hes_getmailhost=no
10349fi
10350rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10351LIBS=$ac_check_lib_save_LIBS
10352fi
1096bcc0 10353echo "$as_me:10353: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
84e70f78
KR
10354echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6
10355if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
10356 cat >>confdefs.h <<\EOF
10357#define HAVE_LIBHESIOD 1
10358EOF
10359
10360else
10361 :
10362fi
10363
10364fi
10365
10366fi
10367
a21616bd
KR
10368# These tell us which Kerberos-related libraries to use.
10369if test "${with_kerberos+set}" = set; then
503d2be0 10370
1096bcc0 10371echo "$as_me:10371: checking for com_err in -lcom_err" >&5
503d2be0
AS
10372echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
10373if test "${ac_cv_lib_com_err_com_err+set}" = set; then
10374 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10375else
503d2be0 10376 ac_check_lib_save_LIBS=$LIBS
a21616bd 10377LIBS="-lcom_err $LIBS"
503d2be0 10378cat >conftest.$ac_ext <<_ACEOF
1096bcc0 10379#line 10379 "configure"
a21616bd 10380#include "confdefs.h"
503d2be0 10381
a21616bd 10382/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10383#ifdef __cplusplus
10384extern "C"
10385#endif
a21616bd 10386/* We use char because int might match the return type of a gcc2
503d2be0
AS
10387 builtin and then its argument prototype would still apply. */
10388char com_err ();
10389int
10390main ()
10391{
10392com_err ();
10393 ;
10394 return 0;
10395}
10396_ACEOF
10397rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 10398if { (eval echo "$as_me:10398: \"$ac_link\"") >&5
503d2be0
AS
10399 (eval $ac_link) 2>&5
10400 ac_status=$?
1096bcc0 10401 echo "$as_me:10401: \$? = $ac_status" >&5
503d2be0
AS
10402 (exit $ac_status); } &&
10403 { ac_try='test -s conftest$ac_exeext'
1096bcc0 10404 { (eval echo "$as_me:10404: \"$ac_try\"") >&5
503d2be0
AS
10405 (eval $ac_try) 2>&5
10406 ac_status=$?
1096bcc0 10407 echo "$as_me:10407: \$? = $ac_status" >&5
503d2be0
AS
10408 (exit $ac_status); }; }; then
10409 ac_cv_lib_com_err_com_err=yes
10410else
10411 echo "$as_me: failed program was:" >&5
10412cat conftest.$ac_ext >&5
10413ac_cv_lib_com_err_com_err=no
10414fi
10415rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10416LIBS=$ac_check_lib_save_LIBS
10417fi
1096bcc0 10418echo "$as_me:10418: result: $ac_cv_lib_com_err_com_err" >&5
503d2be0
AS
10419echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
10420if test $ac_cv_lib_com_err_com_err = yes; then
10421 cat >>confdefs.h <<EOF
10422#define HAVE_LIBCOM_ERR 1
a21616bd
KR
10423EOF
10424
10425 LIBS="-lcom_err $LIBS"
10426
a21616bd
KR
10427fi
10428
1096bcc0 10429echo "$as_me:10429: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
503d2be0
AS
10430echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6
10431if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
10432 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10433else
503d2be0 10434 ac_check_lib_save_LIBS=$LIBS
a21616bd 10435LIBS="-lk5crypto $LIBS"
503d2be0 10436cat >conftest.$ac_ext <<_ACEOF
1096bcc0 10437#line 10437 "configure"
a21616bd 10438#include "confdefs.h"
503d2be0 10439
a21616bd 10440/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10441#ifdef __cplusplus
10442extern "C"
10443#endif
a21616bd 10444/* We use char because int might match the return type of a gcc2
503d2be0
AS
10445 builtin and then its argument prototype would still apply. */
10446char mit_des_cbc_encrypt ();
10447int
10448main ()
10449{
10450mit_des_cbc_encrypt ();
10451 ;
10452 return 0;
10453}
10454_ACEOF
10455rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 10456if { (eval echo "$as_me:10456: \"$ac_link\"") >&5
503d2be0
AS
10457 (eval $ac_link) 2>&5
10458 ac_status=$?
1096bcc0 10459 echo "$as_me:10459: \$? = $ac_status" >&5
503d2be0
AS
10460 (exit $ac_status); } &&
10461 { ac_try='test -s conftest$ac_exeext'
1096bcc0 10462 { (eval echo "$as_me:10462: \"$ac_try\"") >&5
503d2be0
AS
10463 (eval $ac_try) 2>&5
10464 ac_status=$?
1096bcc0 10465 echo "$as_me:10465: \$? = $ac_status" >&5
503d2be0
AS
10466 (exit $ac_status); }; }; then
10467 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
10468else
10469 echo "$as_me: failed program was:" >&5
10470cat conftest.$ac_ext >&5
10471ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
10472fi
10473rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10474LIBS=$ac_check_lib_save_LIBS
10475fi
1096bcc0 10476echo "$as_me:10476: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
10477echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6
10478if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
10479 cat >>confdefs.h <<EOF
10480#define HAVE_LIBK5CRYPTO 1
a21616bd
KR
10481EOF
10482
10483 LIBS="-lk5crypto $LIBS"
10484
a21616bd
KR
10485fi
10486
1096bcc0 10487echo "$as_me:10487: checking for mit_des_cbc_encrypt in -lcrypto" >&5
503d2be0
AS
10488echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6
10489if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
10490 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10491else
503d2be0 10492 ac_check_lib_save_LIBS=$LIBS
a21616bd 10493LIBS="-lcrypto $LIBS"
503d2be0 10494cat >conftest.$ac_ext <<_ACEOF
1096bcc0 10495#line 10495 "configure"
a21616bd 10496#include "confdefs.h"
503d2be0 10497
a21616bd 10498/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10499#ifdef __cplusplus
10500extern "C"
10501#endif
a21616bd 10502/* We use char because int might match the return type of a gcc2
503d2be0
AS
10503 builtin and then its argument prototype would still apply. */
10504char mit_des_cbc_encrypt ();
10505int
10506main ()
10507{
10508mit_des_cbc_encrypt ();
10509 ;
10510 return 0;
10511}
10512_ACEOF
10513rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 10514if { (eval echo "$as_me:10514: \"$ac_link\"") >&5
503d2be0
AS
10515 (eval $ac_link) 2>&5
10516 ac_status=$?
1096bcc0 10517 echo "$as_me:10517: \$? = $ac_status" >&5
503d2be0
AS
10518 (exit $ac_status); } &&
10519 { ac_try='test -s conftest$ac_exeext'
1096bcc0 10520 { (eval echo "$as_me:10520: \"$ac_try\"") >&5
503d2be0
AS
10521 (eval $ac_try) 2>&5
10522 ac_status=$?
1096bcc0 10523 echo "$as_me:10523: \$? = $ac_status" >&5
503d2be0
AS
10524 (exit $ac_status); }; }; then
10525 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
10526else
10527 echo "$as_me: failed program was:" >&5
10528cat conftest.$ac_ext >&5
10529ac_cv_lib_crypto_mit_des_cbc_encrypt=no
10530fi
10531rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10532LIBS=$ac_check_lib_save_LIBS
10533fi
1096bcc0 10534echo "$as_me:10534: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
10535echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6
10536if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
10537 cat >>confdefs.h <<EOF
10538#define HAVE_LIBCRYPTO 1
a21616bd
KR
10539EOF
10540
10541 LIBS="-lcrypto $LIBS"
10542
a21616bd
KR
10543fi
10544
1096bcc0 10545echo "$as_me:10545: checking for krb5_init_context in -lkrb5" >&5
503d2be0
AS
10546echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6
10547if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
10548 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10549else
503d2be0 10550 ac_check_lib_save_LIBS=$LIBS
a21616bd 10551LIBS="-lkrb5 $LIBS"
503d2be0 10552cat >conftest.$ac_ext <<_ACEOF
1096bcc0 10553#line 10553 "configure"
a21616bd 10554#include "confdefs.h"
a21616bd 10555
503d2be0
AS
10556/* Override any gcc2 internal prototype to avoid an error. */
10557#ifdef __cplusplus
10558extern "C"
10559#endif
10560/* We use char because int might match the return type of a gcc2
10561 builtin and then its argument prototype would still apply. */
10562char krb5_init_context ();
10563int
10564main ()
10565{
10566krb5_init_context ();
10567 ;
10568 return 0;
10569}
10570_ACEOF
10571rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 10572if { (eval echo "$as_me:10572: \"$ac_link\"") >&5
503d2be0
AS
10573 (eval $ac_link) 2>&5
10574 ac_status=$?
1096bcc0 10575 echo "$as_me:10575: \$? = $ac_status" >&5
503d2be0
AS
10576 (exit $ac_status); } &&
10577 { ac_try='test -s conftest$ac_exeext'
1096bcc0 10578 { (eval echo "$as_me:10578: \"$ac_try\"") >&5
503d2be0
AS
10579 (eval $ac_try) 2>&5
10580 ac_status=$?
1096bcc0 10581 echo "$as_me:10581: \$? = $ac_status" >&5
503d2be0
AS
10582 (exit $ac_status); }; }; then
10583 ac_cv_lib_krb5_krb5_init_context=yes
10584else
10585 echo "$as_me: failed program was:" >&5
10586cat conftest.$ac_ext >&5
10587ac_cv_lib_krb5_krb5_init_context=no
10588fi
10589rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10590LIBS=$ac_check_lib_save_LIBS
10591fi
1096bcc0 10592echo "$as_me:10592: result: $ac_cv_lib_krb5_krb5_init_context" >&5
503d2be0
AS
10593echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6
10594if test $ac_cv_lib_krb5_krb5_init_context = yes; then
10595 cat >>confdefs.h <<EOF
10596#define HAVE_LIBKRB5 1
a21616bd
KR
10597EOF
10598
10599 LIBS="-lkrb5 $LIBS"
10600
a21616bd
KR
10601fi
10602
10603 if test "${with_kerberos5+set}" != set; then
503d2be0 10604
1096bcc0 10605echo "$as_me:10605: checking for des_cbc_encrypt in -ldes425" >&5
503d2be0
AS
10606echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
10607if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
10608 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10609else
503d2be0 10610 ac_check_lib_save_LIBS=$LIBS
a21616bd 10611LIBS="-ldes425 $LIBS"
503d2be0 10612cat >conftest.$ac_ext <<_ACEOF
1096bcc0 10613#line 10613 "configure"
a21616bd 10614#include "confdefs.h"
503d2be0 10615
a21616bd 10616/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10617#ifdef __cplusplus
10618extern "C"
10619#endif
a21616bd 10620/* We use char because int might match the return type of a gcc2
503d2be0
AS
10621 builtin and then its argument prototype would still apply. */
10622char des_cbc_encrypt ();
10623int
10624main ()
10625{
10626des_cbc_encrypt ();
10627 ;
10628 return 0;
10629}
10630_ACEOF
10631rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 10632if { (eval echo "$as_me:10632: \"$ac_link\"") >&5
503d2be0
AS
10633 (eval $ac_link) 2>&5
10634 ac_status=$?
1096bcc0 10635 echo "$as_me:10635: \$? = $ac_status" >&5
503d2be0
AS
10636 (exit $ac_status); } &&
10637 { ac_try='test -s conftest$ac_exeext'
1096bcc0 10638 { (eval echo "$as_me:10638: \"$ac_try\"") >&5
503d2be0
AS
10639 (eval $ac_try) 2>&5
10640 ac_status=$?
1096bcc0 10641 echo "$as_me:10641: \$? = $ac_status" >&5
503d2be0
AS
10642 (exit $ac_status); }; }; then
10643 ac_cv_lib_des425_des_cbc_encrypt=yes
10644else
10645 echo "$as_me: failed program was:" >&5
10646cat conftest.$ac_ext >&5
10647ac_cv_lib_des425_des_cbc_encrypt=no
10648fi
10649rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10650LIBS=$ac_check_lib_save_LIBS
10651fi
1096bcc0 10652echo "$as_me:10652: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
503d2be0
AS
10653echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
10654if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
10655 cat >>confdefs.h <<EOF
10656#define HAVE_LIBDES425 1
a21616bd
KR
10657EOF
10658
10659 LIBS="-ldes425 $LIBS"
10660
10661else
503d2be0 10662
1096bcc0 10663echo "$as_me:10663: checking for des_cbc_encrypt in -ldes" >&5
503d2be0
AS
10664echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
10665if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
10666 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10667else
503d2be0 10668 ac_check_lib_save_LIBS=$LIBS
a21616bd 10669LIBS="-ldes $LIBS"
503d2be0 10670cat >conftest.$ac_ext <<_ACEOF
1096bcc0 10671#line 10671 "configure"
a21616bd 10672#include "confdefs.h"
503d2be0 10673
a21616bd 10674/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10675#ifdef __cplusplus
10676extern "C"
10677#endif
a21616bd 10678/* We use char because int might match the return type of a gcc2
503d2be0
AS
10679 builtin and then its argument prototype would still apply. */
10680char des_cbc_encrypt ();
10681int
10682main ()
10683{
10684des_cbc_encrypt ();
10685 ;
10686 return 0;
10687}
10688_ACEOF
10689rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 10690if { (eval echo "$as_me:10690: \"$ac_link\"") >&5
503d2be0
AS
10691 (eval $ac_link) 2>&5
10692 ac_status=$?
1096bcc0 10693 echo "$as_me:10693: \$? = $ac_status" >&5
503d2be0
AS
10694 (exit $ac_status); } &&
10695 { ac_try='test -s conftest$ac_exeext'
1096bcc0 10696 { (eval echo "$as_me:10696: \"$ac_try\"") >&5
503d2be0
AS
10697 (eval $ac_try) 2>&5
10698 ac_status=$?
1096bcc0 10699 echo "$as_me:10699: \$? = $ac_status" >&5
503d2be0
AS
10700 (exit $ac_status); }; }; then
10701 ac_cv_lib_des_des_cbc_encrypt=yes
10702else
10703 echo "$as_me: failed program was:" >&5
10704cat conftest.$ac_ext >&5
10705ac_cv_lib_des_des_cbc_encrypt=no
10706fi
10707rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10708LIBS=$ac_check_lib_save_LIBS
10709fi
1096bcc0 10710echo "$as_me:10710: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
503d2be0
AS
10711echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
10712if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
10713 cat >>confdefs.h <<EOF
10714#define HAVE_LIBDES 1
a21616bd
KR
10715EOF
10716
10717 LIBS="-ldes $LIBS"
10718
a21616bd
KR
10719fi
10720
10721fi
10722
1096bcc0 10723echo "$as_me:10723: checking for krb_get_cred in -lkrb4" >&5
503d2be0
AS
10724echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6
10725if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
10726 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10727else
503d2be0 10728 ac_check_lib_save_LIBS=$LIBS
a21616bd 10729LIBS="-lkrb4 $LIBS"
503d2be0 10730cat >conftest.$ac_ext <<_ACEOF
1096bcc0 10731#line 10731 "configure"
a21616bd 10732#include "confdefs.h"
503d2be0 10733
a21616bd 10734/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10735#ifdef __cplusplus
10736extern "C"
10737#endif
a21616bd 10738/* We use char because int might match the return type of a gcc2
503d2be0
AS
10739 builtin and then its argument prototype would still apply. */
10740char krb_get_cred ();
10741int
10742main ()
10743{
10744krb_get_cred ();
10745 ;
10746 return 0;
10747}
10748_ACEOF
10749rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 10750if { (eval echo "$as_me:10750: \"$ac_link\"") >&5
503d2be0
AS
10751 (eval $ac_link) 2>&5
10752 ac_status=$?
1096bcc0 10753 echo "$as_me:10753: \$? = $ac_status" >&5
503d2be0
AS
10754 (exit $ac_status); } &&
10755 { ac_try='test -s conftest$ac_exeext'
1096bcc0 10756 { (eval echo "$as_me:10756: \"$ac_try\"") >&5
503d2be0
AS
10757 (eval $ac_try) 2>&5
10758 ac_status=$?
1096bcc0 10759 echo "$as_me:10759: \$? = $ac_status" >&5
503d2be0
AS
10760 (exit $ac_status); }; }; then
10761 ac_cv_lib_krb4_krb_get_cred=yes
10762else
10763 echo "$as_me: failed program was:" >&5
10764cat conftest.$ac_ext >&5
10765ac_cv_lib_krb4_krb_get_cred=no
10766fi
10767rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10768LIBS=$ac_check_lib_save_LIBS
10769fi
1096bcc0 10770echo "$as_me:10770: result: $ac_cv_lib_krb4_krb_get_cred" >&5
503d2be0
AS
10771echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6
10772if test $ac_cv_lib_krb4_krb_get_cred = yes; then
10773 cat >>confdefs.h <<EOF
10774#define HAVE_LIBKRB4 1
a21616bd
KR
10775EOF
10776
10777 LIBS="-lkrb4 $LIBS"
10778
10779else
503d2be0 10780
1096bcc0 10781echo "$as_me:10781: checking for krb_get_cred in -lkrb" >&5
503d2be0
AS
10782echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6
10783if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
10784 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 10785else
503d2be0 10786 ac_check_lib_save_LIBS=$LIBS
a21616bd 10787LIBS="-lkrb $LIBS"
503d2be0 10788cat >conftest.$ac_ext <<_ACEOF
1096bcc0 10789#line 10789 "configure"
a21616bd 10790#include "confdefs.h"
503d2be0 10791
a21616bd 10792/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10793#ifdef __cplusplus
10794extern "C"
10795#endif
a21616bd 10796/* We use char because int might match the return type of a gcc2
503d2be0
AS
10797 builtin and then its argument prototype would still apply. */
10798char krb_get_cred ();
10799int
10800main ()
10801{
10802krb_get_cred ();
10803 ;
10804 return 0;
10805}
10806_ACEOF
10807rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 10808if { (eval echo "$as_me:10808: \"$ac_link\"") >&5
503d2be0
AS
10809 (eval $ac_link) 2>&5
10810 ac_status=$?
1096bcc0 10811 echo "$as_me:10811: \$? = $ac_status" >&5
503d2be0
AS
10812 (exit $ac_status); } &&
10813 { ac_try='test -s conftest$ac_exeext'
1096bcc0 10814 { (eval echo "$as_me:10814: \"$ac_try\"") >&5
503d2be0
AS
10815 (eval $ac_try) 2>&5
10816 ac_status=$?
1096bcc0 10817 echo "$as_me:10817: \$? = $ac_status" >&5
503d2be0
AS
10818 (exit $ac_status); }; }; then
10819 ac_cv_lib_krb_krb_get_cred=yes
10820else
10821 echo "$as_me: failed program was:" >&5
10822cat conftest.$ac_ext >&5
10823ac_cv_lib_krb_krb_get_cred=no
10824fi
10825rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10826LIBS=$ac_check_lib_save_LIBS
10827fi
1096bcc0 10828echo "$as_me:10828: result: $ac_cv_lib_krb_krb_get_cred" >&5
503d2be0
AS
10829echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6
10830if test $ac_cv_lib_krb_krb_get_cred = yes; then
10831 cat >>confdefs.h <<EOF
10832#define HAVE_LIBKRB 1
a21616bd
KR
10833EOF
10834
10835 LIBS="-lkrb $LIBS"
10836
a21616bd
KR
10837fi
10838
10839fi
10840
10841 fi
10842
10843 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
10844
10845for ac_header in krb5.h
a21616bd 10846do
503d2be0 10847as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
1096bcc0 10848echo "$as_me:10848: checking for $ac_header" >&5
503d2be0
AS
10849echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10850if eval "test \"\${$as_ac_Header+set}\" = set"; then
10851 echo $ECHO_N "(cached) $ECHO_C" >&6
10852else
10853 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 10854#line 10854 "configure"
503d2be0
AS
10855#include "confdefs.h"
10856#include <$ac_header>
10857_ACEOF
1096bcc0 10858if { (eval echo "$as_me:10858: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
10859 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10860 ac_status=$?
10861 egrep -v '^ *\+' conftest.er1 >conftest.err
10862 rm -f conftest.er1
10863 cat conftest.err >&5
1096bcc0 10864 echo "$as_me:10864: \$? = $ac_status" >&5
503d2be0
AS
10865 (exit $ac_status); } >/dev/null; then
10866 if test -s conftest.err; then
10867 ac_cpp_err=$ac_c_preproc_warn_flag
10868 else
10869 ac_cpp_err=
10870 fi
10871else
10872 ac_cpp_err=yes
10873fi
10874if test -z "$ac_cpp_err"; then
10875 eval "$as_ac_Header=yes"
10876else
10877 echo "$as_me: failed program was:" >&5
a21616bd 10878 cat conftest.$ac_ext >&5
503d2be0 10879 eval "$as_ac_Header=no"
a21616bd 10880fi
503d2be0 10881rm -f conftest.err conftest.$ac_ext
a21616bd 10882fi
1096bcc0 10883echo "$as_me:10883: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
10884echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10885if test `eval echo '${'$as_ac_Header'}'` = yes; then
10886 cat >>confdefs.h <<EOF
10887#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 10888EOF
503d2be0 10889
a21616bd
KR
10890fi
10891done
10892
10893 else
503d2be0
AS
10894
10895for ac_header in des.h
a21616bd 10896do
503d2be0 10897as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
1096bcc0 10898echo "$as_me:10898: checking for $ac_header" >&5
503d2be0
AS
10899echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10900if eval "test \"\${$as_ac_Header+set}\" = set"; then
10901 echo $ECHO_N "(cached) $ECHO_C" >&6
10902else
10903 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 10904#line 10904 "configure"
503d2be0
AS
10905#include "confdefs.h"
10906#include <$ac_header>
10907_ACEOF
1096bcc0 10908if { (eval echo "$as_me:10908: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
10909 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10910 ac_status=$?
10911 egrep -v '^ *\+' conftest.er1 >conftest.err
10912 rm -f conftest.er1
10913 cat conftest.err >&5
1096bcc0 10914 echo "$as_me:10914: \$? = $ac_status" >&5
503d2be0
AS
10915 (exit $ac_status); } >/dev/null; then
10916 if test -s conftest.err; then
10917 ac_cpp_err=$ac_c_preproc_warn_flag
10918 else
10919 ac_cpp_err=
10920 fi
10921else
10922 ac_cpp_err=yes
10923fi
10924if test -z "$ac_cpp_err"; then
10925 eval "$as_ac_Header=yes"
10926else
10927 echo "$as_me: failed program was:" >&5
a21616bd 10928 cat conftest.$ac_ext >&5
503d2be0 10929 eval "$as_ac_Header=no"
a21616bd 10930fi
503d2be0 10931rm -f conftest.err conftest.$ac_ext
a21616bd 10932fi
1096bcc0 10933echo "$as_me:10933: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
10934echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10935if test `eval echo '${'$as_ac_Header'}'` = yes; then
10936 cat >>confdefs.h <<EOF
10937#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 10938EOF
503d2be0 10939
a21616bd 10940else
503d2be0
AS
10941
10942for ac_header in kerberosIV/des.h
a21616bd 10943do
503d2be0 10944as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
1096bcc0 10945echo "$as_me:10945: checking for $ac_header" >&5
503d2be0
AS
10946echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10947if eval "test \"\${$as_ac_Header+set}\" = set"; then
10948 echo $ECHO_N "(cached) $ECHO_C" >&6
10949else
10950 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 10951#line 10951 "configure"
503d2be0
AS
10952#include "confdefs.h"
10953#include <$ac_header>
10954_ACEOF
1096bcc0 10955if { (eval echo "$as_me:10955: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
10956 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10957 ac_status=$?
10958 egrep -v '^ *\+' conftest.er1 >conftest.err
10959 rm -f conftest.er1
10960 cat conftest.err >&5
1096bcc0 10961 echo "$as_me:10961: \$? = $ac_status" >&5
503d2be0
AS
10962 (exit $ac_status); } >/dev/null; then
10963 if test -s conftest.err; then
10964 ac_cpp_err=$ac_c_preproc_warn_flag
10965 else
10966 ac_cpp_err=
10967 fi
10968else
10969 ac_cpp_err=yes
10970fi
10971if test -z "$ac_cpp_err"; then
10972 eval "$as_ac_Header=yes"
10973else
10974 echo "$as_me: failed program was:" >&5
a21616bd 10975 cat conftest.$ac_ext >&5
503d2be0 10976 eval "$as_ac_Header=no"
a21616bd 10977fi
503d2be0 10978rm -f conftest.err conftest.$ac_ext
a21616bd 10979fi
1096bcc0 10980echo "$as_me:10980: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
10981echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10982if test `eval echo '${'$as_ac_Header'}'` = yes; then
10983 cat >>confdefs.h <<EOF
10984#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 10985EOF
503d2be0 10986
a21616bd 10987else
503d2be0
AS
10988
10989for ac_header in kerberos/des.h
a21616bd 10990do
503d2be0 10991as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
1096bcc0 10992echo "$as_me:10992: checking for $ac_header" >&5
503d2be0
AS
10993echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10994if eval "test \"\${$as_ac_Header+set}\" = set"; then
10995 echo $ECHO_N "(cached) $ECHO_C" >&6
10996else
10997 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 10998#line 10998 "configure"
503d2be0
AS
10999#include "confdefs.h"
11000#include <$ac_header>
11001_ACEOF
1096bcc0 11002if { (eval echo "$as_me:11002: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11003 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11004 ac_status=$?
11005 egrep -v '^ *\+' conftest.er1 >conftest.err
11006 rm -f conftest.er1
11007 cat conftest.err >&5
1096bcc0 11008 echo "$as_me:11008: \$? = $ac_status" >&5
503d2be0
AS
11009 (exit $ac_status); } >/dev/null; then
11010 if test -s conftest.err; then
11011 ac_cpp_err=$ac_c_preproc_warn_flag
11012 else
11013 ac_cpp_err=
11014 fi
11015else
11016 ac_cpp_err=yes
11017fi
11018if test -z "$ac_cpp_err"; then
11019 eval "$as_ac_Header=yes"
11020else
11021 echo "$as_me: failed program was:" >&5
a21616bd 11022 cat conftest.$ac_ext >&5
503d2be0 11023 eval "$as_ac_Header=no"
a21616bd 11024fi
503d2be0 11025rm -f conftest.err conftest.$ac_ext
a21616bd 11026fi
1096bcc0 11027echo "$as_me:11027: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11028echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11029if test `eval echo '${'$as_ac_Header'}'` = yes; then
11030 cat >>confdefs.h <<EOF
11031#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 11032EOF
503d2be0 11033
a21616bd
KR
11034fi
11035done
11036
11037fi
11038done
11039
11040fi
11041done
11042
503d2be0 11043for ac_header in krb.h
a21616bd 11044do
503d2be0 11045as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
1096bcc0 11046echo "$as_me:11046: checking for $ac_header" >&5
503d2be0
AS
11047echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11048if eval "test \"\${$as_ac_Header+set}\" = set"; then
11049 echo $ECHO_N "(cached) $ECHO_C" >&6
11050else
11051 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 11052#line 11052 "configure"
503d2be0
AS
11053#include "confdefs.h"
11054#include <$ac_header>
11055_ACEOF
1096bcc0 11056if { (eval echo "$as_me:11056: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11057 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11058 ac_status=$?
11059 egrep -v '^ *\+' conftest.er1 >conftest.err
11060 rm -f conftest.er1
11061 cat conftest.err >&5
1096bcc0 11062 echo "$as_me:11062: \$? = $ac_status" >&5
503d2be0
AS
11063 (exit $ac_status); } >/dev/null; then
11064 if test -s conftest.err; then
11065 ac_cpp_err=$ac_c_preproc_warn_flag
11066 else
11067 ac_cpp_err=
11068 fi
11069else
11070 ac_cpp_err=yes
11071fi
11072if test -z "$ac_cpp_err"; then
11073 eval "$as_ac_Header=yes"
11074else
11075 echo "$as_me: failed program was:" >&5
a21616bd 11076 cat conftest.$ac_ext >&5
503d2be0 11077 eval "$as_ac_Header=no"
a21616bd 11078fi
503d2be0 11079rm -f conftest.err conftest.$ac_ext
a21616bd 11080fi
1096bcc0 11081echo "$as_me:11081: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11082echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11083if test `eval echo '${'$as_ac_Header'}'` = yes; then
11084 cat >>confdefs.h <<EOF
11085#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 11086EOF
503d2be0 11087
a21616bd 11088else
503d2be0
AS
11089
11090for ac_header in kerberosIV/krb.h
a21616bd 11091do
503d2be0 11092as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
1096bcc0 11093echo "$as_me:11093: checking for $ac_header" >&5
503d2be0
AS
11094echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11095if eval "test \"\${$as_ac_Header+set}\" = set"; then
11096 echo $ECHO_N "(cached) $ECHO_C" >&6
11097else
11098 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 11099#line 11099 "configure"
503d2be0
AS
11100#include "confdefs.h"
11101#include <$ac_header>
11102_ACEOF
1096bcc0 11103if { (eval echo "$as_me:11103: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11104 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11105 ac_status=$?
11106 egrep -v '^ *\+' conftest.er1 >conftest.err
11107 rm -f conftest.er1
11108 cat conftest.err >&5
1096bcc0 11109 echo "$as_me:11109: \$? = $ac_status" >&5
503d2be0
AS
11110 (exit $ac_status); } >/dev/null; then
11111 if test -s conftest.err; then
11112 ac_cpp_err=$ac_c_preproc_warn_flag
11113 else
11114 ac_cpp_err=
11115 fi
11116else
11117 ac_cpp_err=yes
11118fi
11119if test -z "$ac_cpp_err"; then
11120 eval "$as_ac_Header=yes"
11121else
11122 echo "$as_me: failed program was:" >&5
a21616bd 11123 cat conftest.$ac_ext >&5
503d2be0 11124 eval "$as_ac_Header=no"
a21616bd 11125fi
503d2be0 11126rm -f conftest.err conftest.$ac_ext
a21616bd 11127fi
1096bcc0 11128echo "$as_me:11128: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11129echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11130if test `eval echo '${'$as_ac_Header'}'` = yes; then
11131 cat >>confdefs.h <<EOF
11132#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 11133EOF
503d2be0 11134
a21616bd 11135else
503d2be0
AS
11136
11137for ac_header in kerberos/krb.h
a21616bd 11138do
503d2be0 11139as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
1096bcc0 11140echo "$as_me:11140: checking for $ac_header" >&5
503d2be0
AS
11141echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11142if eval "test \"\${$as_ac_Header+set}\" = set"; then
11143 echo $ECHO_N "(cached) $ECHO_C" >&6
11144else
11145 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 11146#line 11146 "configure"
503d2be0
AS
11147#include "confdefs.h"
11148#include <$ac_header>
11149_ACEOF
1096bcc0 11150if { (eval echo "$as_me:11150: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11151 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11152 ac_status=$?
11153 egrep -v '^ *\+' conftest.er1 >conftest.err
11154 rm -f conftest.er1
11155 cat conftest.err >&5
1096bcc0 11156 echo "$as_me:11156: \$? = $ac_status" >&5
503d2be0
AS
11157 (exit $ac_status); } >/dev/null; then
11158 if test -s conftest.err; then
11159 ac_cpp_err=$ac_c_preproc_warn_flag
11160 else
11161 ac_cpp_err=
11162 fi
11163else
11164 ac_cpp_err=yes
11165fi
11166if test -z "$ac_cpp_err"; then
11167 eval "$as_ac_Header=yes"
11168else
11169 echo "$as_me: failed program was:" >&5
a21616bd 11170 cat conftest.$ac_ext >&5
503d2be0 11171 eval "$as_ac_Header=no"
a21616bd 11172fi
503d2be0 11173rm -f conftest.err conftest.$ac_ext
a21616bd 11174fi
1096bcc0 11175echo "$as_me:11175: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11176echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11177if test `eval echo '${'$as_ac_Header'}'` = yes; then
11178 cat >>confdefs.h <<EOF
11179#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 11180EOF
503d2be0 11181
a21616bd
KR
11182fi
11183done
11184
11185fi
11186done
11187
11188fi
11189done
11190
11191 fi
503d2be0
AS
11192
11193for ac_header in com_err.h
a21616bd 11194do
503d2be0 11195as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
1096bcc0 11196echo "$as_me:11196: checking for $ac_header" >&5
503d2be0
AS
11197echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11198if eval "test \"\${$as_ac_Header+set}\" = set"; then
11199 echo $ECHO_N "(cached) $ECHO_C" >&6
11200else
11201 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 11202#line 11202 "configure"
503d2be0
AS
11203#include "confdefs.h"
11204#include <$ac_header>
11205_ACEOF
1096bcc0 11206if { (eval echo "$as_me:11206: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11207 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11208 ac_status=$?
11209 egrep -v '^ *\+' conftest.er1 >conftest.err
11210 rm -f conftest.er1
11211 cat conftest.err >&5
1096bcc0 11212 echo "$as_me:11212: \$? = $ac_status" >&5
503d2be0
AS
11213 (exit $ac_status); } >/dev/null; then
11214 if test -s conftest.err; then
11215 ac_cpp_err=$ac_c_preproc_warn_flag
11216 else
11217 ac_cpp_err=
11218 fi
11219else
11220 ac_cpp_err=yes
11221fi
11222if test -z "$ac_cpp_err"; then
11223 eval "$as_ac_Header=yes"
11224else
11225 echo "$as_me: failed program was:" >&5
a21616bd 11226 cat conftest.$ac_ext >&5
503d2be0 11227 eval "$as_ac_Header=no"
a21616bd 11228fi
503d2be0 11229rm -f conftest.err conftest.$ac_ext
a21616bd 11230fi
1096bcc0 11231echo "$as_me:11231: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11232echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11233if test `eval echo '${'$as_ac_Header'}'` = yes; then
11234 cat >>confdefs.h <<EOF
11235#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a21616bd 11236EOF
503d2be0 11237
a21616bd
KR
11238fi
11239done
11240
11241fi
11242
ba4481b5
DL
11243# Solaris requires -lintl if you want strerror (which calls dgettext)
11244# to return localized messages.
503d2be0 11245
1096bcc0 11246echo "$as_me:11246: checking for dgettext in -lintl" >&5
503d2be0
AS
11247echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
11248if test "${ac_cv_lib_intl_dgettext+set}" = set; then
11249 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11250else
503d2be0 11251 ac_check_lib_save_LIBS=$LIBS
ba4481b5 11252LIBS="-lintl $LIBS"
503d2be0 11253cat >conftest.$ac_ext <<_ACEOF
1096bcc0 11254#line 11254 "configure"
ba4481b5 11255#include "confdefs.h"
503d2be0 11256
ba4481b5 11257/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11258#ifdef __cplusplus
11259extern "C"
11260#endif
ba4481b5 11261/* We use char because int might match the return type of a gcc2
503d2be0
AS
11262 builtin and then its argument prototype would still apply. */
11263char dgettext ();
11264int
11265main ()
11266{
11267dgettext ();
11268 ;
11269 return 0;
11270}
11271_ACEOF
11272rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 11273if { (eval echo "$as_me:11273: \"$ac_link\"") >&5
503d2be0
AS
11274 (eval $ac_link) 2>&5
11275 ac_status=$?
1096bcc0 11276 echo "$as_me:11276: \$? = $ac_status" >&5
503d2be0
AS
11277 (exit $ac_status); } &&
11278 { ac_try='test -s conftest$ac_exeext'
1096bcc0 11279 { (eval echo "$as_me:11279: \"$ac_try\"") >&5
503d2be0
AS
11280 (eval $ac_try) 2>&5
11281 ac_status=$?
1096bcc0 11282 echo "$as_me:11282: \$? = $ac_status" >&5
503d2be0
AS
11283 (exit $ac_status); }; }; then
11284 ac_cv_lib_intl_dgettext=yes
11285else
11286 echo "$as_me: failed program was:" >&5
11287cat conftest.$ac_ext >&5
11288ac_cv_lib_intl_dgettext=no
11289fi
11290rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11291LIBS=$ac_check_lib_save_LIBS
11292fi
1096bcc0 11293echo "$as_me:11293: result: $ac_cv_lib_intl_dgettext" >&5
503d2be0
AS
11294echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
11295if test $ac_cv_lib_intl_dgettext = yes; then
11296 cat >>confdefs.h <<EOF
11297#define HAVE_LIBINTL 1
ba4481b5
DL
11298EOF
11299
11300 LIBS="-lintl $LIBS"
11301
ba4481b5
DL
11302fi
11303
1096bcc0 11304echo "$as_me:11304: checking whether localtime caches TZ" >&5
503d2be0
AS
11305echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6
11306if test "${emacs_cv_localtime_cache+set}" = set; then
11307 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
11308else
11309 if test x$ac_cv_func_tzset = xyes; then
11310if test "$cross_compiling" = yes; then
11311 # If we have tzset, assume the worst when cross-compiling.
11312emacs_cv_localtime_cache=yes
11313else
503d2be0 11314 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 11315#line 11315 "configure"
ba4481b5
DL
11316#include "confdefs.h"
11317#include <time.h>
ba4481b5
DL
11318extern char **environ;
11319unset_TZ ()
11320{
11321 char **from, **to;
11322 for (to = from = environ; (*to = *from); from++)
11323 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11324 to++;
11325}
11326char TZ_GMT0[] = "TZ=GMT0";
11327char TZ_PST8[] = "TZ=PST8";
11328main()
11329{
11330 time_t now = time ((time_t *) 0);
11331 int hour_GMT0, hour_unset;
11332 if (putenv (TZ_GMT0) != 0)
11333 exit (1);
11334 hour_GMT0 = localtime (&now)->tm_hour;
11335 unset_TZ ();
11336 hour_unset = localtime (&now)->tm_hour;
11337 if (putenv (TZ_PST8) != 0)
11338 exit (1);
11339 if (localtime (&now)->tm_hour == hour_GMT0)
11340 exit (1);
11341 unset_TZ ();
11342 if (localtime (&now)->tm_hour != hour_unset)
11343 exit (1);
11344 exit (0);
11345}
503d2be0
AS
11346_ACEOF
11347rm -f conftest$ac_exeext
1096bcc0 11348if { (eval echo "$as_me:11348: \"$ac_link\"") >&5
503d2be0
AS
11349 (eval $ac_link) 2>&5
11350 ac_status=$?
1096bcc0 11351 echo "$as_me:11351: \$? = $ac_status" >&5
503d2be0 11352 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
1096bcc0 11353 { (eval echo "$as_me:11353: \"$ac_try\"") >&5
503d2be0
AS
11354 (eval $ac_try) 2>&5
11355 ac_status=$?
1096bcc0 11356 echo "$as_me:11356: \$? = $ac_status" >&5
503d2be0 11357 (exit $ac_status); }; }; then
ba4481b5
DL
11358 emacs_cv_localtime_cache=no
11359else
503d2be0
AS
11360 echo "$as_me: program exited with status $ac_status" >&5
11361echo "$as_me: failed program was:" >&5
11362cat conftest.$ac_ext >&5
11363emacs_cv_localtime_cache=yes
ba4481b5 11364fi
503d2be0 11365rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 11366fi
ba4481b5
DL
11367else
11368 # If we lack tzset, report that localtime does not cache TZ,
11369 # since we can't invalidate the cache if we don't have tzset.
11370 emacs_cv_localtime_cache=no
11371fi
11372fi
1096bcc0 11373echo "$as_me:11373: result: $emacs_cv_localtime_cache" >&5
503d2be0 11374echo "${ECHO_T}$emacs_cv_localtime_cache" >&6
ba4481b5 11375if test $emacs_cv_localtime_cache = yes; then
503d2be0 11376 cat >>confdefs.h <<\EOF
ba4481b5
DL
11377#define LOCALTIME_CACHE 1
11378EOF
11379
11380fi
11381
11382if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
11383
11384for ac_func in gettimeofday
48d4b120 11385do
503d2be0 11386as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
1096bcc0 11387echo "$as_me:11387: checking for $ac_func" >&5
503d2be0
AS
11388echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11389if eval "test \"\${$as_ac_var+set}\" = set"; then
11390 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 11391else
503d2be0 11392 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 11393#line 11393 "configure"
48d4b120
DL
11394#include "confdefs.h"
11395/* System header to define __stub macros and hopefully few prototypes,
503d2be0 11396 which can conflict with char $ac_func (); below. */
48d4b120
DL
11397#include <assert.h>
11398/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11399#ifdef __cplusplus
11400extern "C"
11401#endif
48d4b120 11402/* We use char because int might match the return type of a gcc2
503d2be0
AS
11403 builtin and then its argument prototype would still apply. */
11404char $ac_func ();
11405char (*f) ();
48d4b120 11406
503d2be0
AS
11407int
11408main ()
11409{
48d4b120
DL
11410/* The GNU C library defines this for functions which it implements
11411 to always fail with ENOSYS. Some functions are actually named
11412 something starting with __ and the normal name is an alias. */
11413#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11414choke me
11415#else
503d2be0 11416f = $ac_func;
48d4b120
DL
11417#endif
11418
503d2be0
AS
11419 ;
11420 return 0;
11421}
11422_ACEOF
11423rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 11424if { (eval echo "$as_me:11424: \"$ac_link\"") >&5
503d2be0
AS
11425 (eval $ac_link) 2>&5
11426 ac_status=$?
1096bcc0 11427 echo "$as_me:11427: \$? = $ac_status" >&5
503d2be0
AS
11428 (exit $ac_status); } &&
11429 { ac_try='test -s conftest$ac_exeext'
1096bcc0 11430 { (eval echo "$as_me:11430: \"$ac_try\"") >&5
503d2be0
AS
11431 (eval $ac_try) 2>&5
11432 ac_status=$?
1096bcc0 11433 echo "$as_me:11433: \$? = $ac_status" >&5
503d2be0
AS
11434 (exit $ac_status); }; }; then
11435 eval "$as_ac_var=yes"
11436else
11437 echo "$as_me: failed program was:" >&5
11438cat conftest.$ac_ext >&5
11439eval "$as_ac_var=no"
11440fi
11441rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11442fi
1096bcc0 11443echo "$as_me:11443: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
11444echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11445if test `eval echo '${'$as_ac_var'}'` = yes; then
11446 cat >>confdefs.h <<EOF
11447#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
48d4b120 11448EOF
48d4b120 11449
48d4b120
DL
11450fi
11451done
11452
1096bcc0 11453 echo "$as_me:11453: checking whether gettimeofday can accept two arguments" >&5
503d2be0
AS
11454echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6
11455if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
11456 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11457else
503d2be0 11458 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 11459#line 11459 "configure"
a3f08d9e 11460#include "confdefs.h"
ba4481b5 11461
a3f08d9e
DL
11462#ifdef TIME_WITH_SYS_TIME
11463#include <sys/time.h>
11464#include <time.h>
11465#else
11466#ifdef HAVE_SYS_TIME_H
11467#include <sys/time.h>
11468#else
11469#include <time.h>
11470#endif
11471#endif
503d2be0
AS
11472int
11473main ()
11474{
a3f08d9e 11475struct timeval time;
48d4b120 11476 gettimeofday (&time, 0);
503d2be0
AS
11477 ;
11478 return 0;
11479}
11480_ACEOF
11481rm -f conftest.$ac_objext
1096bcc0 11482if { (eval echo "$as_me:11482: \"$ac_compile\"") >&5
503d2be0
AS
11483 (eval $ac_compile) 2>&5
11484 ac_status=$?
1096bcc0 11485 echo "$as_me:11485: \$? = $ac_status" >&5
503d2be0
AS
11486 (exit $ac_status); } &&
11487 { ac_try='test -s conftest.$ac_objext'
1096bcc0 11488 { (eval echo "$as_me:11488: \"$ac_try\"") >&5
503d2be0
AS
11489 (eval $ac_try) 2>&5
11490 ac_status=$?
1096bcc0 11491 echo "$as_me:11491: \$? = $ac_status" >&5
503d2be0 11492 (exit $ac_status); }; }; then
ba4481b5
DL
11493 emacs_cv_gettimeofday_two_arguments=yes
11494else
503d2be0
AS
11495 echo "$as_me: failed program was:" >&5
11496cat conftest.$ac_ext >&5
11497emacs_cv_gettimeofday_two_arguments=no
ba4481b5 11498fi
503d2be0 11499rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 11500fi
1096bcc0 11501echo "$as_me:11501: result: $emacs_cv_gettimeofday_two_arguments" >&5
503d2be0 11502echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6
ba4481b5 11503 if test $emacs_cv_gettimeofday_two_arguments = no; then
503d2be0 11504 cat >>confdefs.h <<\EOF
ba4481b5
DL
11505#define GETTIMEOFDAY_ONE_ARGUMENT 1
11506EOF
11507
11508 fi
11509fi
11510
48d4b120 11511if test "$ac_cv_func_gettimeofday" = yes; then
1096bcc0 11512 echo "$as_me:11512: checking for struct timezone" >&5
503d2be0
AS
11513echo $ECHO_N "checking for struct timezone... $ECHO_C" >&6
11514if test "${emacs_cv_struct_timezone+set}" = set; then
11515 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 11516else
503d2be0 11517 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 11518#line 11518 "configure"
48d4b120
DL
11519#include "confdefs.h"
11520#include <sys/time.h>
503d2be0
AS
11521int
11522main ()
11523{
48d4b120 11524struct timezone tz;
503d2be0
AS
11525 ;
11526 return 0;
11527}
11528_ACEOF
11529rm -f conftest.$ac_objext
1096bcc0 11530if { (eval echo "$as_me:11530: \"$ac_compile\"") >&5
503d2be0
AS
11531 (eval $ac_compile) 2>&5
11532 ac_status=$?
1096bcc0 11533 echo "$as_me:11533: \$? = $ac_status" >&5
503d2be0
AS
11534 (exit $ac_status); } &&
11535 { ac_try='test -s conftest.$ac_objext'
1096bcc0 11536 { (eval echo "$as_me:11536: \"$ac_try\"") >&5
503d2be0
AS
11537 (eval $ac_try) 2>&5
11538 ac_status=$?
1096bcc0 11539 echo "$as_me:11539: \$? = $ac_status" >&5
503d2be0 11540 (exit $ac_status); }; }; then
48d4b120
DL
11541 if test "$cross_compiling" = yes; then
11542 emacs_cv_struct_timezone=yes
11543else
503d2be0 11544 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 11545#line 11545 "configure"
48d4b120
DL
11546#include "confdefs.h"
11547
11548#ifdef TIME_WITH_SYS_TIME
11549#include <sys/time.h>
11550#include <time.h>
11551#else
11552#ifdef HAVE_SYS_TIME_H
11553#include <sys/time.h>
11554#else
11555#include <time.h>
11556#endif
11557#endif
11558main () {
11559 struct timeval time;
11560 struct timezone dummy;
11561 exit (gettimeofday (&time, &dummy));
11562}
503d2be0
AS
11563_ACEOF
11564rm -f conftest$ac_exeext
1096bcc0 11565if { (eval echo "$as_me:11565: \"$ac_link\"") >&5
503d2be0
AS
11566 (eval $ac_link) 2>&5
11567 ac_status=$?
1096bcc0 11568 echo "$as_me:11568: \$? = $ac_status" >&5
503d2be0 11569 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
1096bcc0 11570 { (eval echo "$as_me:11570: \"$ac_try\"") >&5
503d2be0
AS
11571 (eval $ac_try) 2>&5
11572 ac_status=$?
1096bcc0 11573 echo "$as_me:11573: \$? = $ac_status" >&5
503d2be0 11574 (exit $ac_status); }; }; then
48d4b120
DL
11575 emacs_cv_struct_timezone=yes
11576else
503d2be0
AS
11577 echo "$as_me: program exited with status $ac_status" >&5
11578echo "$as_me: failed program was:" >&5
11579cat conftest.$ac_ext >&5
11580emacs_cv_struct_timezone=no
48d4b120 11581fi
503d2be0 11582rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
48d4b120 11583fi
48d4b120 11584else
503d2be0
AS
11585 echo "$as_me: failed program was:" >&5
11586cat conftest.$ac_ext >&5
11587emacs_cv_struct_timezone=no
48d4b120 11588fi
503d2be0 11589rm -f conftest.$ac_objext conftest.$ac_ext
48d4b120 11590fi
1096bcc0 11591echo "$as_me:11591: result: $emacs_cv_struct_timezone" >&5
503d2be0 11592echo "${ECHO_T}$emacs_cv_struct_timezone" >&6
48d4b120
DL
11593fi
11594
ba4481b5 11595ok_so_far=yes
1096bcc0 11596echo "$as_me:11596: checking for socket" >&5
503d2be0
AS
11597echo $ECHO_N "checking for socket... $ECHO_C" >&6
11598if test "${ac_cv_func_socket+set}" = set; then
11599 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11600else
503d2be0 11601 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 11602#line 11602 "configure"
ba4481b5
DL
11603#include "confdefs.h"
11604/* System header to define __stub macros and hopefully few prototypes,
503d2be0 11605 which can conflict with char socket (); below. */
ba4481b5
DL
11606#include <assert.h>
11607/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11608#ifdef __cplusplus
11609extern "C"
11610#endif
ba4481b5 11611/* We use char because int might match the return type of a gcc2
503d2be0
AS
11612 builtin and then its argument prototype would still apply. */
11613char socket ();
11614char (*f) ();
ba4481b5 11615
503d2be0
AS
11616int
11617main ()
11618{
ba4481b5
DL
11619/* The GNU C library defines this for functions which it implements
11620 to always fail with ENOSYS. Some functions are actually named
11621 something starting with __ and the normal name is an alias. */
11622#if defined (__stub_socket) || defined (__stub___socket)
11623choke me
11624#else
503d2be0 11625f = socket;
ba4481b5
DL
11626#endif
11627
503d2be0
AS
11628 ;
11629 return 0;
11630}
11631_ACEOF
11632rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 11633if { (eval echo "$as_me:11633: \"$ac_link\"") >&5
503d2be0
AS
11634 (eval $ac_link) 2>&5
11635 ac_status=$?
1096bcc0 11636 echo "$as_me:11636: \$? = $ac_status" >&5
503d2be0
AS
11637 (exit $ac_status); } &&
11638 { ac_try='test -s conftest$ac_exeext'
1096bcc0 11639 { (eval echo "$as_me:11639: \"$ac_try\"") >&5
503d2be0
AS
11640 (eval $ac_try) 2>&5
11641 ac_status=$?
1096bcc0 11642 echo "$as_me:11642: \$? = $ac_status" >&5
503d2be0
AS
11643 (exit $ac_status); }; }; then
11644 ac_cv_func_socket=yes
11645else
11646 echo "$as_me: failed program was:" >&5
11647cat conftest.$ac_ext >&5
11648ac_cv_func_socket=no
11649fi
11650rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11651fi
1096bcc0 11652echo "$as_me:11652: result: $ac_cv_func_socket" >&5
503d2be0
AS
11653echo "${ECHO_T}$ac_cv_func_socket" >&6
11654if test $ac_cv_func_socket = yes; then
ba4481b5
DL
11655 :
11656else
503d2be0 11657 ok_so_far=no
ba4481b5
DL
11658fi
11659
11660if test $ok_so_far = yes; then
1096bcc0 11661 echo "$as_me:11661: checking for netinet/in.h" >&5
503d2be0
AS
11662echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
11663if test "${ac_cv_header_netinet_in_h+set}" = set; then
11664 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11665else
503d2be0 11666 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 11667#line 11667 "configure"
ba4481b5
DL
11668#include "confdefs.h"
11669#include <netinet/in.h>
503d2be0 11670_ACEOF
1096bcc0 11671if { (eval echo "$as_me:11671: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11672 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11673 ac_status=$?
11674 egrep -v '^ *\+' conftest.er1 >conftest.err
11675 rm -f conftest.er1
11676 cat conftest.err >&5
1096bcc0 11677 echo "$as_me:11677: \$? = $ac_status" >&5
503d2be0
AS
11678 (exit $ac_status); } >/dev/null; then
11679 if test -s conftest.err; then
11680 ac_cpp_err=$ac_c_preproc_warn_flag
11681 else
11682 ac_cpp_err=
11683 fi
11684else
11685 ac_cpp_err=yes
11686fi
11687if test -z "$ac_cpp_err"; then
11688 ac_cv_header_netinet_in_h=yes
ba4481b5 11689else
503d2be0 11690 echo "$as_me: failed program was:" >&5
ba4481b5 11691 cat conftest.$ac_ext >&5
503d2be0 11692 ac_cv_header_netinet_in_h=no
ba4481b5 11693fi
503d2be0 11694rm -f conftest.err conftest.$ac_ext
ba4481b5 11695fi
1096bcc0 11696echo "$as_me:11696: result: $ac_cv_header_netinet_in_h" >&5
503d2be0
AS
11697echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
11698if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
11699 :
11700else
503d2be0 11701 ok_so_far=no
ba4481b5
DL
11702fi
11703
11704fi
11705if test $ok_so_far = yes; then
1096bcc0 11706 echo "$as_me:11706: checking for arpa/inet.h" >&5
503d2be0
AS
11707echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
11708if test "${ac_cv_header_arpa_inet_h+set}" = set; then
11709 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11710else
503d2be0 11711 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 11712#line 11712 "configure"
ba4481b5
DL
11713#include "confdefs.h"
11714#include <arpa/inet.h>
503d2be0 11715_ACEOF
1096bcc0 11716if { (eval echo "$as_me:11716: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11717 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11718 ac_status=$?
11719 egrep -v '^ *\+' conftest.er1 >conftest.err
11720 rm -f conftest.er1
11721 cat conftest.err >&5
1096bcc0 11722 echo "$as_me:11722: \$? = $ac_status" >&5
503d2be0
AS
11723 (exit $ac_status); } >/dev/null; then
11724 if test -s conftest.err; then
11725 ac_cpp_err=$ac_c_preproc_warn_flag
11726 else
11727 ac_cpp_err=
11728 fi
11729else
11730 ac_cpp_err=yes
11731fi
11732if test -z "$ac_cpp_err"; then
11733 ac_cv_header_arpa_inet_h=yes
ba4481b5 11734else
503d2be0 11735 echo "$as_me: failed program was:" >&5
ba4481b5 11736 cat conftest.$ac_ext >&5
503d2be0 11737 ac_cv_header_arpa_inet_h=no
ba4481b5 11738fi
503d2be0 11739rm -f conftest.err conftest.$ac_ext
ba4481b5 11740fi
1096bcc0 11741echo "$as_me:11741: result: $ac_cv_header_arpa_inet_h" >&5
503d2be0
AS
11742echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
11743if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
11744 :
11745else
503d2be0 11746 ok_so_far=no
ba4481b5
DL
11747fi
11748
11749fi
11750if test $ok_so_far = yes; then
503d2be0 11751 cat >>confdefs.h <<\EOF
ba4481b5
DL
11752#define HAVE_INET_SOCKETS 1
11753EOF
11754
11755fi
11756
11757if test -f /usr/lpp/X11/bin/smt.exp; then
503d2be0 11758 cat >>confdefs.h <<\EOF
ba4481b5
DL
11759#define HAVE_AIX_SMT_EXP 1
11760EOF
11761
11762fi
11763
1096bcc0 11764echo "$as_me:11764: checking whether system supports dynamic ptys" >&5
503d2be0 11765echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6
3d9fec71 11766if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
1096bcc0 11767 echo "$as_me:11767: result: yes" >&5
503d2be0
AS
11768echo "${ECHO_T}yes" >&6
11769 cat >>confdefs.h <<\EOF
3d9fec71
DL
11770#define HAVE_DEV_PTMX 1
11771EOF
11772
11773else
1096bcc0 11774 echo "$as_me:11774: result: no" >&5
503d2be0 11775echo "${ECHO_T}no" >&6
3d9fec71
DL
11776fi
11777
1096bcc0 11778echo "$as_me:11778: checking for pid_t" >&5
503d2be0
AS
11779echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
11780if test "${ac_cv_type_pid_t+set}" = set; then
11781 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 11782else
503d2be0 11783 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 11784#line 11784 "configure"
647847ea 11785#include "confdefs.h"
503d2be0
AS
11786$ac_includes_default
11787int
11788main ()
11789{
11790if ((pid_t *) 0)
11791 return 0;
11792if (sizeof (pid_t))
11793 return 0;
11794 ;
11795 return 0;
11796}
11797_ACEOF
11798rm -f conftest.$ac_objext
1096bcc0 11799if { (eval echo "$as_me:11799: \"$ac_compile\"") >&5
503d2be0
AS
11800 (eval $ac_compile) 2>&5
11801 ac_status=$?
1096bcc0 11802 echo "$as_me:11802: \$? = $ac_status" >&5
503d2be0
AS
11803 (exit $ac_status); } &&
11804 { ac_try='test -s conftest.$ac_objext'
1096bcc0 11805 { (eval echo "$as_me:11805: \"$ac_try\"") >&5
503d2be0
AS
11806 (eval $ac_try) 2>&5
11807 ac_status=$?
1096bcc0 11808 echo "$as_me:11808: \$? = $ac_status" >&5
503d2be0 11809 (exit $ac_status); }; }; then
647847ea
DL
11810 ac_cv_type_pid_t=yes
11811else
503d2be0
AS
11812 echo "$as_me: failed program was:" >&5
11813cat conftest.$ac_ext >&5
11814ac_cv_type_pid_t=no
647847ea 11815fi
503d2be0 11816rm -f conftest.$ac_objext conftest.$ac_ext
647847ea 11817fi
1096bcc0 11818echo "$as_me:11818: result: $ac_cv_type_pid_t" >&5
503d2be0
AS
11819echo "${ECHO_T}$ac_cv_type_pid_t" >&6
11820if test $ac_cv_type_pid_t = yes; then
11821 :
11822else
11823
11824cat >>confdefs.h <<EOF
647847ea
DL
11825#define pid_t int
11826EOF
11827
11828fi
11829
503d2be0
AS
11830for ac_header in unistd.h vfork.h
11831do
11832as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
1096bcc0 11833echo "$as_me:11833: checking for $ac_header" >&5
503d2be0
AS
11834echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11835if eval "test \"\${$as_ac_Header+set}\" = set"; then
11836 echo $ECHO_N "(cached) $ECHO_C" >&6
11837else
11838 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 11839#line 11839 "configure"
503d2be0
AS
11840#include "confdefs.h"
11841#include <$ac_header>
11842_ACEOF
1096bcc0 11843if { (eval echo "$as_me:11843: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11844 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11845 ac_status=$?
11846 egrep -v '^ *\+' conftest.er1 >conftest.err
11847 rm -f conftest.er1
11848 cat conftest.err >&5
1096bcc0 11849 echo "$as_me:11849: \$? = $ac_status" >&5
503d2be0
AS
11850 (exit $ac_status); } >/dev/null; then
11851 if test -s conftest.err; then
11852 ac_cpp_err=$ac_c_preproc_warn_flag
11853 else
11854 ac_cpp_err=
11855 fi
647847ea 11856else
503d2be0
AS
11857 ac_cpp_err=yes
11858fi
11859if test -z "$ac_cpp_err"; then
11860 eval "$as_ac_Header=yes"
647847ea 11861else
503d2be0 11862 echo "$as_me: failed program was:" >&5
647847ea 11863 cat conftest.$ac_ext >&5
503d2be0 11864 eval "$as_ac_Header=no"
647847ea 11865fi
503d2be0 11866rm -f conftest.err conftest.$ac_ext
647847ea 11867fi
1096bcc0 11868echo "$as_me:11868: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0
AS
11869echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11870if test `eval echo '${'$as_ac_Header'}'` = yes; then
11871 cat >>confdefs.h <<EOF
11872#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
647847ea
DL
11873EOF
11874
73b77ee5 11875fi
503d2be0 11876done
73b77ee5 11877
503d2be0
AS
11878for ac_func in fork vfork
11879do
11880as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
1096bcc0 11881echo "$as_me:11881: checking for $ac_func" >&5
503d2be0
AS
11882echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11883if eval "test \"\${$as_ac_var+set}\" = set"; then
11884 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 11885else
503d2be0 11886 cat >conftest.$ac_ext <<_ACEOF
1096bcc0 11887#line 11887 "configure"
fa0b693c
GM
11888#include "confdefs.h"
11889/* System header to define __stub macros and hopefully few prototypes,
503d2be0 11890 which can conflict with char $ac_func (); below. */
fa0b693c
GM
11891#include <assert.h>
11892/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11893#ifdef __cplusplus
11894extern "C"
11895#endif
fa0b693c 11896/* We use char because int might match the return type of a gcc2
503d2be0
AS
11897 builtin and then its argument prototype would still apply. */
11898char $ac_func ();
11899char (*f) ();
fa0b693c 11900
503d2be0
AS
11901int
11902main ()
11903{
fa0b693c
GM
11904/* The GNU C library defines this for functions which it implements
11905 to always fail with ENOSYS. Some functions are actually named
11906 something starting with __ and the normal name is an alias. */
503d2be0 11907#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
fa0b693c
GM
11908choke me
11909#else
503d2be0 11910f = $ac_func;
fa0b693c
GM
11911#endif
11912
503d2be0
AS
11913 ;
11914 return 0;
11915}
11916_ACEOF
11917rm -f conftest.$ac_objext conftest$ac_exeext
1096bcc0 11918if { (eval echo "$as_me:11918: \"$ac_link\"") >&5
503d2be0
AS
11919 (eval $ac_link) 2>&5
11920 ac_status=$?
1096bcc0 11921 echo "$as_me:11921: \$? = $ac_status" >&5
503d2be0
AS
11922 (exit $ac_status); } &&
11923 { ac_try='test -s conftest$ac_exeext'
1096bcc0 11924 { (eval echo "$as_me:11924: \"$ac_try\"") >&5
503d2be0
AS
11925 (eval $ac_try) 2>&5
11926 ac_status=$?
1096bcc0 11927 echo "$as_me:11927: \$? = $ac_status" >&5
503d2be0
AS
11928 (exit $ac_status); }; }; then
11929 eval "$as_ac_var=yes"
11930else
11931 echo "$as_me: failed program was:" >&5
11932cat conftest.$ac_ext >&5
11933eval "$as_ac_var=no"
11934fi
11935rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11936fi
1096bcc0 11937echo "$as_me:11937: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
11938echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11939if test `eval echo '${'$as_ac_var'}'` = yes; then
11940 cat >>confdefs.h <<EOF
11941#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
fa0b693c 11942EOF
503d2be0 11943
fa0b693c 11944fi
503d2be0 11945done
fa0b693c 11946
503d2be0
AS
11947ac_cv_func_fork_works=$ac_cv_func_fork
11948if test "x$ac_cv_func_fork" = xyes; then
1096bcc0 11949 echo "$as_me:11949: checking for working fork" >&5
503d2be0
AS
11950echo $ECHO_N "checking for working fork... $ECHO_C" >&6
11951if test "${ac_cv_func_fork_works+set}" = set; then
11952 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 11953else
503d2be0
AS
11954 if test "$cross_compiling" = yes; then
11955 ac_cv_func_fork_works=cross
11956else
11957 cat >conftest.$ac_ext <<_ACEOF
11958