(archive-arc-rename-entry): Fix error message.
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
9e71690e 3# Generated by GNU Autoconf 2.57.
ba4481b5 4#
c0d27fcc 5# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
503d2be0 6# Free Software Foundation, Inc.
ba4481b5
DL
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
c0d27fcc
MR
9## --------------------- ##
10## M4sh Initialization. ##
11## --------------------- ##
503d2be0
AS
12
13# Be Bourne compatible
14if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15 emulate sh
16 NULLCMD=:
6bae0ccf
DL
17 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18 # is contrary to our usage. Disable this feature.
19 alias -g '${1+"$@"}'='"$@"'
503d2be0
AS
20elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21 set -o posix
22fi
23
c0d27fcc
MR
24# Support unset when possible.
25if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
26 as_unset=unset
27else
28 as_unset=false
29fi
30
6bae0ccf
DL
31
32# Work around bugs in pre-3.0 UWIN ksh.
33$as_unset ENV MAIL MAILPATH
34PS1='$ '
35PS2='> '
36PS4='+ '
37
38# NLS nuisances.
cd958eb3
MB
39for as_var in \
40 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
41 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
42 LC_TELEPHONE LC_TIME
6bae0ccf
DL
43do
44 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
45 eval $as_var=C; export $as_var
46 else
47 $as_unset $as_var
48 fi
49done
50
51# Required to use basename.
52if expr a : '\(a\)' >/dev/null 2>&1; then
53 as_expr=expr
54else
55 as_expr=false
56fi
57
58if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
59 as_basename=basename
60else
61 as_basename=false
62fi
c0d27fcc
MR
63
64
503d2be0 65# Name of the executable.
6bae0ccf 66as_me=`$as_basename "$0" ||
c0d27fcc
MR
67$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68 X"$0" : 'X\(//\)$' \| \
69 X"$0" : 'X\(/\)$' \| \
70 . : '\(.\)' 2>/dev/null ||
71echo X/"$0" |
72 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73 /^X\/\(\/\/\)$/{ s//\1/; q; }
74 /^X\/\(\/\).*/{ s//\1/; q; }
75 s/.*/./; q'`
76
6bae0ccf 77
c0d27fcc
MR
78# PATH needs CR, and LINENO needs CR and PATH.
79# Avoid depending upon Character Ranges.
80as_cr_letters='abcdefghijklmnopqrstuvwxyz'
81as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
82as_cr_Letters=$as_cr_letters$as_cr_LETTERS
83as_cr_digits='0123456789'
84as_cr_alnum=$as_cr_Letters$as_cr_digits
85
86# The user is always right.
87if test "${PATH_SEPARATOR+set}" != set; then
cd958eb3
MB
88 echo "#! /bin/sh" >conf$$.sh
89 echo "exit 0" >>conf$$.sh
90 chmod +x conf$$.sh
91 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
c0d27fcc
MR
92 PATH_SEPARATOR=';'
93 else
94 PATH_SEPARATOR=:
95 fi
cd958eb3 96 rm -f conf$$.sh
c0d27fcc
MR
97fi
98
99
100 as_lineno_1=$LINENO
101 as_lineno_2=$LINENO
102 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
103 test "x$as_lineno_1" != "x$as_lineno_2" &&
104 test "x$as_lineno_3" = "x$as_lineno_2" || {
105 # Find who we are. Look in the path if we contain no path at all
106 # relative or not.
107 case $0 in
108 *[\\/]* ) as_myself=$0 ;;
109 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
110for as_dir in $PATH
111do
112 IFS=$as_save_IFS
113 test -z "$as_dir" && as_dir=.
114 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
115done
116
117 ;;
118 esac
119 # We did not find ourselves, most probably we were run as `sh COMMAND'
120 # in which case we are not to be found in the path.
121 if test "x$as_myself" = x; then
122 as_myself=$0
123 fi
124 if test ! -f "$as_myself"; then
125 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
126 { (exit 1); exit 1; }; }
127 fi
128 case $CONFIG_SHELL in
129 '')
130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
131for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
132do
133 IFS=$as_save_IFS
134 test -z "$as_dir" && as_dir=.
135 for as_base in sh bash ksh sh5; do
136 case $as_dir in
137 /*)
138 if ("$as_dir/$as_base" -c '
139 as_lineno_1=$LINENO
140 as_lineno_2=$LINENO
141 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
142 test "x$as_lineno_1" != "x$as_lineno_2" &&
143 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
6bae0ccf
DL
144 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
145 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
c0d27fcc
MR
146 CONFIG_SHELL=$as_dir/$as_base
147 export CONFIG_SHELL
148 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
149 fi;;
150 esac
151 done
152done
153;;
154 esac
155
156 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
157 # uniformly replaced by the line number. The first 'sed' inserts a
158 # line-number line before each line; the second 'sed' does the real
159 # work. The second script uses 'N' to pair each line-number line
160 # with the numbered line, and appends trailing '-' during
161 # substitution so that $LINENO is not a special case at line end.
162 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
163 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
164 sed '=' <$as_myself |
165 sed '
166 N
167 s,$,-,
168 : loop
169 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
170 t loop
171 s,-$,,
172 s,^['$as_cr_digits']*\n,,
173 ' >$as_me.lineno &&
174 chmod +x $as_me.lineno ||
175 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
176 { (exit 1); exit 1; }; }
177
178 # Don't try to exec as it changes $[0], causing all sort of problems
179 # (the dirname of $[0] is not the place where we might find the
180 # original and so on. Autoconf is especially sensible to this).
181 . ./$as_me.lineno
182 # Exit status is that of the last command.
183 exit
184}
185
186
187case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
188 *c*,-n*) ECHO_N= ECHO_C='
189' ECHO_T=' ' ;;
190 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
191 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
192esac
503d2be0
AS
193
194if expr a : '\(a\)' >/dev/null 2>&1; then
195 as_expr=expr
196else
197 as_expr=false
198fi
199
200rm -f conf$$ conf$$.exe conf$$.file
201echo >conf$$.file
202if ln -s conf$$.file conf$$ 2>/dev/null; then
203 # We could just check for DJGPP; but this test a) works b) is more generic
204 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
205 if test -f conf$$.exe; then
206 # Don't use ln at all; we don't have any links
207 as_ln_s='cp -p'
208 else
209 as_ln_s='ln -s'
210 fi
211elif ln conf$$.file conf$$ 2>/dev/null; then
212 as_ln_s=ln
213else
214 as_ln_s='cp -p'
215fi
216rm -f conf$$ conf$$.exe conf$$.file
217
6bae0ccf
DL
218if mkdir -p . 2>/dev/null; then
219 as_mkdir_p=:
220else
221 as_mkdir_p=false
222fi
223
503d2be0
AS
224as_executable_p="test -f"
225
c0d27fcc
MR
226# Sed expression to map a string onto a valid CPP name.
227as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
228
229# Sed expression to map a string onto a valid variable name.
230as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
503d2be0 231
503d2be0
AS
232
233# IFS
234# We need space, tab and new line, in precisely that order.
235as_nl='
236'
237IFS=" $as_nl"
238
239# CDPATH.
6bae0ccf 240$as_unset CDPATH
c0d27fcc 241
503d2be0
AS
242
243# Name of the host.
244# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
245# so uname gets run too.
246ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
247
248exec 6>&1
249
250#
251# Initializations.
252#
ba4481b5 253ac_default_prefix=/usr/local
6bae0ccf 254ac_config_libobj_dir=.
503d2be0
AS
255cross_compiling=no
256subdirs=
c0d27fcc
MR
257MFLAGS=
258MAKEFLAGS=
503d2be0
AS
259SHELL=${CONFIG_SHELL-/bin/sh}
260
261# Maximum number of lines to put in a shell here document.
262# This variable seems obsolete. It should probably be removed, and
263# only ac_max_sed_lines should be used.
264: ${ac_max_here_lines=38}
265
c0d27fcc
MR
266# Identity of this package.
267PACKAGE_NAME=
268PACKAGE_TARNAME=
269PACKAGE_VERSION=
270PACKAGE_STRING=
271PACKAGE_BUGREPORT=
272
503d2be0 273ac_unique_file="src/lisp.h"
6bae0ccf 274ac_config_libobj_dir=src
503d2be0
AS
275# Factoring default headers for most tests.
276ac_includes_default="\
277#include <stdio.h>
278#if HAVE_SYS_TYPES_H
279# include <sys/types.h>
280#endif
281#if HAVE_SYS_STAT_H
282# include <sys/stat.h>
283#endif
284#if STDC_HEADERS
285# include <stdlib.h>
286# include <stddef.h>
287#else
288# if HAVE_STDLIB_H
289# include <stdlib.h>
290# endif
291#endif
292#if HAVE_STRING_H
293# if !STDC_HEADERS && HAVE_MEMORY_H
294# include <memory.h>
295# endif
296# include <string.h>
297#endif
298#if HAVE_STRINGS_H
299# include <strings.h>
300#endif
301#if HAVE_INTTYPES_H
302# include <inttypes.h>
303#else
304# if HAVE_STDINT_H
305# include <stdint.h>
306# endif
307#endif
308#if HAVE_UNISTD_H
309# include <unistd.h>
310#endif"
ba4481b5 311
6a3a24fa 312ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LN_S CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB INSTALL_INFO EGREP LIBSOUND SET_MAKE ALLOCA liblockfile LIBOBJS NEED_SETGID KMEM_GROUP GETLOADAVG_LIBS version configuration canonical srcdir lispdir locallisppath lisppath x_default_search_path etcdir archlibdir docdir bitmapdir gamedir gameuser c_switch_system c_switch_machine LD_SWITCH_X_SITE LD_SWITCH_X_SITE_AUX C_SWITCH_X_SITE X_TOOLKIT_TYPE machfile opsysfile carbon_appdir LTLIBOBJS'
6bae0ccf 313ac_subst_files=''
c0d27fcc 314
ba4481b5 315# Initialize some variables set by options.
503d2be0
AS
316ac_init_help=
317ac_init_version=false
ba4481b5
DL
318# The variables have the same names as the options, with
319# dashes changed to underlines.
503d2be0 320cache_file=/dev/null
ba4481b5 321exec_prefix=NONE
ba4481b5 322no_create=
ba4481b5
DL
323no_recursion=
324prefix=NONE
325program_prefix=NONE
326program_suffix=NONE
327program_transform_name=s,x,x,
328silent=
329site=
330srcdir=
ba4481b5
DL
331verbose=
332x_includes=NONE
333x_libraries=NONE
503d2be0
AS
334
335# Installation directory options.
336# These are left unexpanded so users can "make install exec_prefix=/foo"
337# and all the variables that are supposed to be based on exec_prefix
338# by default will actually change.
339# Use braces instead of parens because sh, perl, etc. also accept them.
ba4481b5
DL
340bindir='${exec_prefix}/bin'
341sbindir='${exec_prefix}/sbin'
342libexecdir='${exec_prefix}/libexec'
343datadir='${prefix}/share'
344sysconfdir='${prefix}/etc'
345sharedstatedir='${prefix}/com'
346localstatedir='${prefix}/var'
347libdir='${exec_prefix}/lib'
348includedir='${prefix}/include'
349oldincludedir='/usr/include'
350infodir='${prefix}/info'
351mandir='${prefix}/man'
352
ba4481b5
DL
353ac_prev=
354for ac_option
355do
ba4481b5
DL
356 # If the previous option needs an argument, assign it.
357 if test -n "$ac_prev"; then
358 eval "$ac_prev=\$ac_option"
359 ac_prev=
360 continue
361 fi
362
503d2be0 363 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
ba4481b5
DL
364
365 # Accept the important Cygnus configure options, so we can diagnose typos.
366
503d2be0 367 case $ac_option in
ba4481b5
DL
368
369 -bindir | --bindir | --bindi | --bind | --bin | --bi)
370 ac_prev=bindir ;;
371 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 372 bindir=$ac_optarg ;;
ba4481b5
DL
373
374 -build | --build | --buil | --bui | --bu)
503d2be0 375 ac_prev=build_alias ;;
ba4481b5 376 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 377 build_alias=$ac_optarg ;;
ba4481b5
DL
378
379 -cache-file | --cache-file | --cache-fil | --cache-fi \
380 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
381 ac_prev=cache_file ;;
382 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
383 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
384 cache_file=$ac_optarg ;;
385
386 --config-cache | -C)
387 cache_file=config.cache ;;
ba4481b5
DL
388
389 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
390 ac_prev=datadir ;;
391 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
392 | --da=*)
503d2be0 393 datadir=$ac_optarg ;;
ba4481b5
DL
394
395 -disable-* | --disable-*)
503d2be0 396 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 397 # Reject names that are not valid shell variable names.
503d2be0
AS
398 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
400 { (exit 1); exit 1; }; }
401 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
402 eval "enable_$ac_feature=no" ;;
ba4481b5
DL
403
404 -enable-* | --enable-*)
503d2be0 405 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 406 # Reject names that are not valid shell variable names.
503d2be0
AS
407 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
408 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
409 { (exit 1); exit 1; }; }
410 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
411 case $ac_option in
412 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
ba4481b5
DL
413 *) ac_optarg=yes ;;
414 esac
503d2be0 415 eval "enable_$ac_feature='$ac_optarg'" ;;
ba4481b5
DL
416
417 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
418 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
419 | --exec | --exe | --ex)
420 ac_prev=exec_prefix ;;
421 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
422 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
423 | --exec=* | --exe=* | --ex=*)
503d2be0 424 exec_prefix=$ac_optarg ;;
ba4481b5
DL
425
426 -gas | --gas | --ga | --g)
427 # Obsolete; use --with-gas.
428 with_gas=yes ;;
429
503d2be0
AS
430 -help | --help | --hel | --he | -h)
431 ac_init_help=long ;;
432 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
433 ac_init_help=recursive ;;
434 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
435 ac_init_help=short ;;
ba4481b5
DL
436
437 -host | --host | --hos | --ho)
503d2be0 438 ac_prev=host_alias ;;
ba4481b5 439 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 440 host_alias=$ac_optarg ;;
ba4481b5
DL
441
442 -includedir | --includedir | --includedi | --included | --include \
443 | --includ | --inclu | --incl | --inc)
444 ac_prev=includedir ;;
445 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
446 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 447 includedir=$ac_optarg ;;
ba4481b5
DL
448
449 -infodir | --infodir | --infodi | --infod | --info | --inf)
450 ac_prev=infodir ;;
451 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 452 infodir=$ac_optarg ;;
ba4481b5
DL
453
454 -libdir | --libdir | --libdi | --libd)
455 ac_prev=libdir ;;
456 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 457 libdir=$ac_optarg ;;
ba4481b5
DL
458
459 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
460 | --libexe | --libex | --libe)
461 ac_prev=libexecdir ;;
462 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
463 | --libexe=* | --libex=* | --libe=*)
503d2be0 464 libexecdir=$ac_optarg ;;
ba4481b5
DL
465
466 -localstatedir | --localstatedir | --localstatedi | --localstated \
467 | --localstate | --localstat | --localsta | --localst \
468 | --locals | --local | --loca | --loc | --lo)
469 ac_prev=localstatedir ;;
470 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
471 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
503d2be0 473 localstatedir=$ac_optarg ;;
ba4481b5
DL
474
475 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476 ac_prev=mandir ;;
477 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 478 mandir=$ac_optarg ;;
ba4481b5
DL
479
480 -nfp | --nfp | --nf)
481 # Obsolete; use --without-fp.
482 with_fp=no ;;
483
484 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 485 | --no-cr | --no-c | -n)
ba4481b5
DL
486 no_create=yes ;;
487
488 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
489 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
490 no_recursion=yes ;;
491
492 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
493 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
494 | --oldin | --oldi | --old | --ol | --o)
495 ac_prev=oldincludedir ;;
496 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
497 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
498 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 499 oldincludedir=$ac_optarg ;;
ba4481b5
DL
500
501 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502 ac_prev=prefix ;;
503 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 504 prefix=$ac_optarg ;;
ba4481b5
DL
505
506 -program-prefix | --program-prefix | --program-prefi | --program-pref \
507 | --program-pre | --program-pr | --program-p)
508 ac_prev=program_prefix ;;
509 -program-prefix=* | --program-prefix=* | --program-prefi=* \
510 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 511 program_prefix=$ac_optarg ;;
ba4481b5
DL
512
513 -program-suffix | --program-suffix | --program-suffi | --program-suff \
514 | --program-suf | --program-su | --program-s)
515 ac_prev=program_suffix ;;
516 -program-suffix=* | --program-suffix=* | --program-suffi=* \
517 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 518 program_suffix=$ac_optarg ;;
ba4481b5
DL
519
520 -program-transform-name | --program-transform-name \
521 | --program-transform-nam | --program-transform-na \
522 | --program-transform-n | --program-transform- \
523 | --program-transform | --program-transfor \
524 | --program-transfo | --program-transf \
525 | --program-trans | --program-tran \
526 | --progr-tra | --program-tr | --program-t)
527 ac_prev=program_transform_name ;;
528 -program-transform-name=* | --program-transform-name=* \
529 | --program-transform-nam=* | --program-transform-na=* \
530 | --program-transform-n=* | --program-transform-=* \
531 | --program-transform=* | --program-transfor=* \
532 | --program-transfo=* | --program-transf=* \
533 | --program-trans=* | --program-tran=* \
534 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 535 program_transform_name=$ac_optarg ;;
ba4481b5
DL
536
537 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
538 | -silent | --silent | --silen | --sile | --sil)
539 silent=yes ;;
540
541 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
542 ac_prev=sbindir ;;
543 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
544 | --sbi=* | --sb=*)
503d2be0 545 sbindir=$ac_optarg ;;
ba4481b5
DL
546
547 -sharedstatedir | --sharedstatedir | --sharedstatedi \
548 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
549 | --sharedst | --shareds | --shared | --share | --shar \
550 | --sha | --sh)
551 ac_prev=sharedstatedir ;;
552 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
553 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
554 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
555 | --sha=* | --sh=*)
503d2be0 556 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
557
558 -site | --site | --sit)
559 ac_prev=site ;;
560 -site=* | --site=* | --sit=*)
503d2be0 561 site=$ac_optarg ;;
ba4481b5
DL
562
563 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564 ac_prev=srcdir ;;
565 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 566 srcdir=$ac_optarg ;;
ba4481b5
DL
567
568 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
569 | --syscon | --sysco | --sysc | --sys | --sy)
570 ac_prev=sysconfdir ;;
571 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
572 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 573 sysconfdir=$ac_optarg ;;
ba4481b5
DL
574
575 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 576 ac_prev=target_alias ;;
ba4481b5 577 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 578 target_alias=$ac_optarg ;;
ba4481b5
DL
579
580 -v | -verbose | --verbose | --verbos | --verbo | --verb)
581 verbose=yes ;;
582
503d2be0
AS
583 -version | --version | --versio | --versi | --vers | -V)
584 ac_init_version=: ;;
ba4481b5
DL
585
586 -with-* | --with-*)
503d2be0 587 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 588 # Reject names that are not valid shell variable names.
503d2be0
AS
589 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
590 { echo "$as_me: error: invalid package name: $ac_package" >&2
591 { (exit 1); exit 1; }; }
ba4481b5 592 ac_package=`echo $ac_package| sed 's/-/_/g'`
503d2be0
AS
593 case $ac_option in
594 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
ba4481b5
DL
595 *) ac_optarg=yes ;;
596 esac
503d2be0 597 eval "with_$ac_package='$ac_optarg'" ;;
ba4481b5
DL
598
599 -without-* | --without-*)
503d2be0 600 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 601 # Reject names that are not valid shell variable names.
503d2be0
AS
602 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
603 { echo "$as_me: error: invalid package name: $ac_package" >&2
604 { (exit 1); exit 1; }; }
605 ac_package=`echo $ac_package | sed 's/-/_/g'`
606 eval "with_$ac_package=no" ;;
ba4481b5
DL
607
608 --x)
609 # Obsolete; use --with-x.
610 with_x=yes ;;
611
612 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
613 | --x-incl | --x-inc | --x-in | --x-i)
614 ac_prev=x_includes ;;
615 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
616 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 617 x_includes=$ac_optarg ;;
ba4481b5
DL
618
619 -x-libraries | --x-libraries | --x-librarie | --x-librari \
620 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
621 ac_prev=x_libraries ;;
622 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
623 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 624 x_libraries=$ac_optarg ;;
ba4481b5 625
503d2be0
AS
626 -*) { echo "$as_me: error: unrecognized option: $ac_option
627Try \`$0 --help' for more information." >&2
628 { (exit 1); exit 1; }; }
ba4481b5
DL
629 ;;
630
503d2be0
AS
631 *=*)
632 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
633 # Reject names that are not valid shell variable names.
634 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
635 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
636 { (exit 1); exit 1; }; }
637 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638 eval "$ac_envvar='$ac_optarg'"
639 export $ac_envvar ;;
640
ba4481b5 641 *)
503d2be0
AS
642 # FIXME: should be removed in autoconf 3.0.
643 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
644 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
645 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
646 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
647 ;;
648
649 esac
650done
651
652if test -n "$ac_prev"; then
503d2be0
AS
653 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
654 { echo "$as_me: error: missing argument to $ac_option" >&2
655 { (exit 1); exit 1; }; }
ba4481b5 656fi
ba4481b5 657
503d2be0
AS
658# Be sure to have absolute paths.
659for ac_var in exec_prefix prefix
660do
661 eval ac_val=$`echo $ac_var`
662 case $ac_val in
663 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
c0d27fcc 664 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
503d2be0
AS
665 { (exit 1); exit 1; }; };;
666 esac
667done
ba4481b5 668
503d2be0
AS
669# Be sure to have absolute paths.
670for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
671 localstatedir libdir includedir oldincludedir infodir mandir
ba4481b5 672do
503d2be0
AS
673 eval ac_val=$`echo $ac_var`
674 case $ac_val in
675 [\\/$]* | ?:[\\/]* ) ;;
c0d27fcc 676 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
503d2be0 677 { (exit 1); exit 1; }; };;
ba4481b5
DL
678 esac
679done
680
503d2be0
AS
681# There might be people who depend on the old broken behavior: `$host'
682# used to hold the argument of --host etc.
c0d27fcc 683# FIXME: To remove some day.
503d2be0
AS
684build=$build_alias
685host=$host_alias
686target=$target_alias
687
c0d27fcc 688# FIXME: To remove some day.
503d2be0
AS
689if test "x$host_alias" != x; then
690 if test "x$build_alias" = x; then
691 cross_compiling=maybe
692 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
693 If a cross compiler is detected then cross compile mode will be used." >&2
694 elif test "x$build_alias" != "x$host_alias"; then
695 cross_compiling=yes
696 fi
697fi
ba4481b5 698
503d2be0
AS
699ac_tool_prefix=
700test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 701
503d2be0 702test "$silent" = yes && exec 6>/dev/null
ba4481b5 703
c0d27fcc 704
ba4481b5
DL
705# Find the source files, if location was not specified.
706if test -z "$srcdir"; then
707 ac_srcdir_defaulted=yes
708 # Try the directory containing this script, then its parent.
c0d27fcc
MR
709 ac_confdir=`(dirname "$0") 2>/dev/null ||
710$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
711 X"$0" : 'X\(//\)[^/]' \| \
712 X"$0" : 'X\(//\)$' \| \
713 X"$0" : 'X\(/\)' \| \
714 . : '\(.\)' 2>/dev/null ||
715echo X"$0" |
716 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718 /^X\(\/\/\)$/{ s//\1/; q; }
719 /^X\(\/\).*/{ s//\1/; q; }
720 s/.*/./; q'`
ba4481b5
DL
721 srcdir=$ac_confdir
722 if test ! -r $srcdir/$ac_unique_file; then
723 srcdir=..
724 fi
725else
726 ac_srcdir_defaulted=no
727fi
728if test ! -r $srcdir/$ac_unique_file; then
729 if test "$ac_srcdir_defaulted" = yes; then
c0d27fcc 730 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
503d2be0 731 { (exit 1); exit 1; }; }
ba4481b5 732 else
c0d27fcc 733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
503d2be0 734 { (exit 1); exit 1; }; }
ba4481b5
DL
735 fi
736fi
6bae0ccf
DL
737(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
738 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
739 { (exit 1); exit 1; }; }
503d2be0
AS
740srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
741ac_env_build_alias_set=${build_alias+set}
742ac_env_build_alias_value=$build_alias
743ac_cv_env_build_alias_set=${build_alias+set}
744ac_cv_env_build_alias_value=$build_alias
745ac_env_host_alias_set=${host_alias+set}
746ac_env_host_alias_value=$host_alias
747ac_cv_env_host_alias_set=${host_alias+set}
748ac_cv_env_host_alias_value=$host_alias
749ac_env_target_alias_set=${target_alias+set}
750ac_env_target_alias_value=$target_alias
751ac_cv_env_target_alias_set=${target_alias+set}
752ac_cv_env_target_alias_value=$target_alias
753ac_env_CC_set=${CC+set}
754ac_env_CC_value=$CC
755ac_cv_env_CC_set=${CC+set}
756ac_cv_env_CC_value=$CC
757ac_env_CFLAGS_set=${CFLAGS+set}
758ac_env_CFLAGS_value=$CFLAGS
759ac_cv_env_CFLAGS_set=${CFLAGS+set}
760ac_cv_env_CFLAGS_value=$CFLAGS
761ac_env_LDFLAGS_set=${LDFLAGS+set}
762ac_env_LDFLAGS_value=$LDFLAGS
763ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
764ac_cv_env_LDFLAGS_value=$LDFLAGS
765ac_env_CPPFLAGS_set=${CPPFLAGS+set}
766ac_env_CPPFLAGS_value=$CPPFLAGS
767ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
768ac_cv_env_CPPFLAGS_value=$CPPFLAGS
769ac_env_CPP_set=${CPP+set}
770ac_env_CPP_value=$CPP
771ac_cv_env_CPP_set=${CPP+set}
772ac_cv_env_CPP_value=$CPP
773
774#
775# Report the --help message.
776#
777if test "$ac_init_help" = "long"; then
778 # Omit some internal or obsolete options to make the list less imposing.
779 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 780 cat <<_ACEOF
503d2be0
AS
781\`configure' configures this package to adapt to many kinds of systems.
782
783Usage: $0 [OPTION]... [VAR=VALUE]...
784
785To assign environment variables (e.g., CC, CFLAGS...), specify them as
786VAR=VALUE. See below for descriptions of some of the useful variables.
787
788Defaults for the options are specified in brackets.
789
790Configuration:
791 -h, --help display this help and exit
792 --help=short display options specific to this package
793 --help=recursive display the short help of all the included packages
794 -V, --version display version information and exit
795 -q, --quiet, --silent do not print \`checking...' messages
796 --cache-file=FILE cache test results in FILE [disabled]
797 -C, --config-cache alias for \`--cache-file=config.cache'
798 -n, --no-create do not create output files
799 --srcdir=DIR find the sources in DIR [configure dir or \`..']
800
c0d27fcc 801_ACEOF
503d2be0 802
c0d27fcc 803 cat <<_ACEOF
503d2be0
AS
804Installation directories:
805 --prefix=PREFIX install architecture-independent files in PREFIX
806 [$ac_default_prefix]
807 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
808 [PREFIX]
809
810By default, \`make install' will install all the files in
811\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
812an installation prefix other than \`$ac_default_prefix' using \`--prefix',
813for instance \`--prefix=\$HOME'.
814
815For better control, use the options below.
816
817Fine tuning of the installation directories:
818 --bindir=DIR user executables [EPREFIX/bin]
819 --sbindir=DIR system admin executables [EPREFIX/sbin]
820 --libexecdir=DIR program executables [EPREFIX/libexec]
821 --datadir=DIR read-only architecture-independent data [PREFIX/share]
822 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
823 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
824 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
825 --libdir=DIR object code libraries [EPREFIX/lib]
826 --includedir=DIR C header files [PREFIX/include]
827 --oldincludedir=DIR C header files for non-gcc [/usr/include]
828 --infodir=DIR info documentation [PREFIX/info]
829 --mandir=DIR man documentation [PREFIX/man]
c0d27fcc 830_ACEOF
503d2be0 831
c0d27fcc 832 cat <<\_ACEOF
503d2be0 833
ba5da88a
PJ
834Program names:
835 --program-prefix=PREFIX prepend PREFIX to installed program names
836 --program-suffix=SUFFIX append SUFFIX to installed program names
837 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
838
503d2be0
AS
839X features:
840 --x-includes=DIR X include files are in DIR
841 --x-libraries=DIR X library files are in DIR
842
843System types:
844 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
845 --host=HOST cross-compile to build programs to run on HOST [BUILD]
846_ACEOF
503d2be0
AS
847fi
848
849if test -n "$ac_init_help"; then
850
c0d27fcc 851 cat <<\_ACEOF
503d2be0
AS
852
853Optional Features:
854 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
855 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
6a3a24fa
JD
856 --enable-carbon-app[=DIR] [DIR=/Application]
857 specify install directory for Emacs.app on Mac OS X
503d2be0
AS
858 --disable-largefile omit support for large files
859
860Optional Packages:
861 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
862 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
863 --without-gcc don't use GCC to compile Emacs if GCC is found
864 --without-pop don't support POP mail retrieval with movemail
865 --with-kerberos support Kerberos-authenticated POP
866 --with-kerberos5 support Kerberos version 5 authenticated POP
867 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 868 --without-sound don't compile with sound support
503d2be0
AS
869 --with-x-toolkit=KIT use an X toolkit (KIT = yes/lucid/athena/motif/no)
870 --with-xpm use -lXpm for displaying XPM images
871 --with-jpeg use -ljpeg for displaying JPEG images
872 --with-tiff use -ltiff for displaying TIFF images
873 --with-gif use -lungif for displaying GIF images
874 --with-png use -lpng for displaying PNG images
875 --without-toolkit-scroll-bars
cc227489
MB
876 don't use Motif or Xaw3d scroll bars
877 --without-xim don't use X11 XIM
e0f712ba 878 --without-carbon don't use Carbon GUI on Mac OS X
503d2be0
AS
879 --with-x use the X Window System
880
881Some influential environment variables:
882 CC C compiler command
883 CFLAGS C compiler flags
884 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
885 nonstandard directory <lib dir>
886 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
887 headers in a nonstandard directory <include dir>
888 CPP C preprocessor
889
890Use these variables to override the choices made by `configure' or to help
891it to find libraries and programs with nonstandard names/locations.
892
c0d27fcc 893_ACEOF
503d2be0
AS
894fi
895
896if test "$ac_init_help" = "recursive"; then
897 # If there are subdirs, report their specific --help.
898 ac_popdir=`pwd`
c0d27fcc
MR
899 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
900 test -d $ac_dir || continue
901 ac_builddir=.
902
903if test "$ac_dir" != .; then
904 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
905 # A "../" for each directory in $ac_dir_suffix.
906 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
907else
908 ac_dir_suffix= ac_top_builddir=
909fi
503d2be0 910
c0d27fcc
MR
911case $srcdir in
912 .) # No --srcdir option. We are building in place.
913 ac_srcdir=.
914 if test -z "$ac_top_builddir"; then
915 ac_top_srcdir=.
916 else
917 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
918 fi ;;
919 [\\/]* | ?:[\\/]* ) # Absolute path.
920 ac_srcdir=$srcdir$ac_dir_suffix;
921 ac_top_srcdir=$srcdir ;;
922 *) # Relative path.
923 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
924 ac_top_srcdir=$ac_top_builddir$srcdir ;;
925esac
926# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
927# absolute.
928ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
6bae0ccf 929ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
c0d27fcc
MR
930ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
931ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
932
933 cd $ac_dir
503d2be0 934 # Check for guested configure; otherwise get Cygnus style configure.
c0d27fcc 935 if test -f $ac_srcdir/configure.gnu; then
503d2be0 936 echo
c0d27fcc
MR
937 $SHELL $ac_srcdir/configure.gnu --help=recursive
938 elif test -f $ac_srcdir/configure; then
503d2be0 939 echo
c0d27fcc
MR
940 $SHELL $ac_srcdir/configure --help=recursive
941 elif test -f $ac_srcdir/configure.ac ||
942 test -f $ac_srcdir/configure.in; then
503d2be0
AS
943 echo
944 $ac_configure --help
945 else
c0d27fcc 946 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
503d2be0
AS
947 fi
948 cd $ac_popdir
949 done
950fi
951
952test -n "$ac_init_help" && exit 0
953if $ac_init_version; then
c0d27fcc 954 cat <<\_ACEOF
503d2be0 955
c0d27fcc 956Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
503d2be0
AS
957Free Software Foundation, Inc.
958This configure script is free software; the Free Software Foundation
959gives unlimited permission to copy, distribute and modify it.
c0d27fcc 960_ACEOF
503d2be0
AS
961 exit 0
962fi
963exec 5>config.log
c0d27fcc 964cat >&5 <<_ACEOF
503d2be0
AS
965This file contains any messages produced by compilers while
966running configure, to aid debugging if configure makes a mistake.
967
968It was created by $as_me, which was
9e71690e 969generated by GNU Autoconf 2.57. Invocation command line was
503d2be0
AS
970
971 $ $0 $@
972
c0d27fcc 973_ACEOF
503d2be0
AS
974{
975cat <<_ASUNAME
c0d27fcc
MR
976## --------- ##
977## Platform. ##
978## --------- ##
503d2be0
AS
979
980hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
981uname -m = `(uname -m) 2>/dev/null || echo unknown`
982uname -r = `(uname -r) 2>/dev/null || echo unknown`
983uname -s = `(uname -s) 2>/dev/null || echo unknown`
984uname -v = `(uname -v) 2>/dev/null || echo unknown`
985
986/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
987/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
988
989/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
990/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
991/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
992hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
993/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
994/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
995/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
996
925c2f3f 997_ASUNAME
c0d27fcc
MR
998
999as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1000for as_dir in $PATH
1001do
1002 IFS=$as_save_IFS
1003 test -z "$as_dir" && as_dir=.
1004 echo "PATH: $as_dir"
1005done
1006
503d2be0
AS
1007} >&5
1008
c0d27fcc
MR
1009cat >&5 <<_ACEOF
1010
1011
1012## ----------- ##
1013## Core tests. ##
1014## ----------- ##
1015
1016_ACEOF
503d2be0 1017
503d2be0
AS
1018
1019# Keep a trace of the command line.
1020# Strip out --no-create and --no-recursion so they do not pile up.
cd958eb3 1021# Strip out --silent because we don't want to record it for future runs.
503d2be0 1022# Also quote any args containing shell meta-characters.
cd958eb3 1023# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1024ac_configure_args=
cd958eb3
MB
1025ac_configure_args0=
1026ac_configure_args1=
503d2be0 1027ac_sep=
cd958eb3
MB
1028ac_must_keep_next=false
1029for ac_pass in 1 2
503d2be0 1030do
cd958eb3
MB
1031 for ac_arg
1032 do
1033 case $ac_arg in
1034 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1035 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1036 | -silent | --silent | --silen | --sile | --sil)
1037 continue ;;
1038 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1039 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1040 esac
1041 case $ac_pass in
1042 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1043 2)
1044 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1045 if test $ac_must_keep_next = true; then
1046 ac_must_keep_next=false # Got value, back to normal.
1047 else
1048 case $ac_arg in
1049 *=* | --config-cache | -C | -disable-* | --disable-* \
1050 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1051 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1052 | -with-* | --with-* | -without-* | --without-* | --x)
1053 case "$ac_configure_args0 " in
1054 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1055 esac
1056 ;;
1057 -* ) ac_must_keep_next=true ;;
1058 esac
1059 fi
1060 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1061 # Get rid of the leading space.
1062 ac_sep=" "
1063 ;;
1064 esac
1065 done
503d2be0 1066done
cd958eb3
MB
1067$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1068$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1069
1070# When interrupted or exit'd, cleanup temporary files, and complete
1071# config.log. We remove comments because anyway the quotes in there
1072# would cause problems or look ugly.
c0d27fcc
MR
1073# WARNING: Be sure not to use single quotes in there, as some shells,
1074# such as our DU 5.0 friend, will then `close' the trap.
503d2be0
AS
1075trap 'exit_status=$?
1076 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1077 {
1078 echo
6bae0ccf 1079
c0d27fcc
MR
1080 cat <<\_ASBOX
1081## ---------------- ##
1082## Cache variables. ##
1083## ---------------- ##
1084_ASBOX
1085 echo
1086 # The following way of writing the cache mishandles newlines in values,
503d2be0
AS
1087{
1088 (set) 2>&1 |
1089 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1090 *ac_space=\ *)
1091 sed -n \
1092 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1093 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1094 ;;
1095 *)
1096 sed -n \
1097 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1098 ;;
1099 esac;
c0d27fcc
MR
1100}
1101 echo
6bae0ccf
DL
1102
1103 cat <<\_ASBOX
1104## ----------------- ##
1105## Output variables. ##
1106## ----------------- ##
1107_ASBOX
1108 echo
1109 for ac_var in $ac_subst_vars
1110 do
1111 eval ac_val=$`echo $ac_var`
1112 echo "$ac_var='"'"'$ac_val'"'"'"
1113 done | sort
1114 echo
1115
1116 if test -n "$ac_subst_files"; then
1117 cat <<\_ASBOX
1118## ------------- ##
1119## Output files. ##
1120## ------------- ##
1121_ASBOX
1122 echo
1123 for ac_var in $ac_subst_files
1124 do
1125 eval ac_val=$`echo $ac_var`
1126 echo "$ac_var='"'"'$ac_val'"'"'"
1127 done | sort
1128 echo
1129 fi
1130
c0d27fcc
MR
1131 if test -s confdefs.h; then
1132 cat <<\_ASBOX
1133## ----------- ##
1134## confdefs.h. ##
1135## ----------- ##
1136_ASBOX
1137 echo
6bae0ccf 1138 sed "/^$/d" confdefs.h | sort
c0d27fcc
MR
1139 echo
1140 fi
1141 test "$ac_signal" != 0 &&
1142 echo "$as_me: caught signal $ac_signal"
1143 echo "$as_me: exit $exit_status"
1144 } >&5
1145 rm -f core core.* *.core &&
1146 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0
AS
1147 exit $exit_status
1148 ' 0
1149for ac_signal in 1 2 13 15; do
1150 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1151done
1152ac_signal=0
1153
1154# confdefs.h avoids OS command line length limits that DEFS can exceed.
1155rm -rf conftest* confdefs.h
1156# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1157echo >confdefs.h
ba4481b5 1158
c0d27fcc
MR
1159# Predefined preprocessor variables.
1160
1161cat >>confdefs.h <<_ACEOF
1162#define PACKAGE_NAME "$PACKAGE_NAME"
1163_ACEOF
1164
1165
1166cat >>confdefs.h <<_ACEOF
1167#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1168_ACEOF
1169
1170
1171cat >>confdefs.h <<_ACEOF
1172#define PACKAGE_VERSION "$PACKAGE_VERSION"
1173_ACEOF
1174
1175
1176cat >>confdefs.h <<_ACEOF
1177#define PACKAGE_STRING "$PACKAGE_STRING"
1178_ACEOF
1179
1180
1181cat >>confdefs.h <<_ACEOF
1182#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1183_ACEOF
1184
1185
503d2be0 1186# Let the site file select an alternate cache file if it wants to.
ba4481b5
DL
1187# Prefer explicitly selected file to automatically selected ones.
1188if test -z "$CONFIG_SITE"; then
1189 if test "x$prefix" != xNONE; then
1190 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1191 else
1192 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1193 fi
1194fi
1195for ac_site_file in $CONFIG_SITE; do
1196 if test -r "$ac_site_file"; then
c0d27fcc 1197 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1198echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1199 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1200 . "$ac_site_file"
1201 fi
1202done
1203
1204if test -r "$cache_file"; then
503d2be0
AS
1205 # Some versions of bash will fail to source /dev/null (special
1206 # files actually), so we avoid doing that.
1207 if test -f "$cache_file"; then
c0d27fcc 1208 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1209echo "$as_me: loading cache $cache_file" >&6;}
1210 case $cache_file in
1211 [\\/]* | ?:[\\/]* ) . $cache_file;;
1212 *) . ./$cache_file;;
1213 esac
1214 fi
ba4481b5 1215else
c0d27fcc 1216 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1217echo "$as_me: creating cache $cache_file" >&6;}
1218 >$cache_file
1219fi
1220
1221# Check that the precious variables saved in the cache have kept the same
1222# value.
1223ac_cache_corrupted=false
1224for ac_var in `(set) 2>&1 |
1225 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1226 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1227 eval ac_new_set=\$ac_env_${ac_var}_set
1228 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1229 eval ac_new_val="\$ac_env_${ac_var}_value"
1230 case $ac_old_set,$ac_new_set in
1231 set,)
c0d27fcc 1232 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1233echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1234 ac_cache_corrupted=: ;;
1235 ,set)
c0d27fcc 1236 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1237echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1238 ac_cache_corrupted=: ;;
1239 ,);;
1240 *)
1241 if test "x$ac_old_val" != "x$ac_new_val"; then
c0d27fcc 1242 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1243echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
c0d27fcc 1244 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1245echo "$as_me: former value: $ac_old_val" >&2;}
c0d27fcc 1246 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0
AS
1247echo "$as_me: current value: $ac_new_val" >&2;}
1248 ac_cache_corrupted=:
1249 fi;;
1250 esac
c0d27fcc 1251 # Pass precious variables to config.status.
503d2be0
AS
1252 if test "$ac_new_set" = set; then
1253 case $ac_new_val in
1254 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
c0d27fcc
MR
1255 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1256 *) ac_arg=$ac_var=$ac_new_val ;;
1257 esac
1258 case " $ac_configure_args " in
1259 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1260 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1261 esac
1262 fi
1263done
1264if $ac_cache_corrupted; then
c0d27fcc 1265 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1266echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1267 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1268echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1269 { (exit 1); exit 1; }; }
ba4481b5
DL
1270fi
1271
1272ac_ext=c
ba4481b5 1273ac_cpp='$CPP $CPPFLAGS'
503d2be0
AS
1274ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1275ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1276ac_compiler_gnu=$ac_cv_c_compiler_gnu
1277
c0d27fcc
MR
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
ba4481b5 1294
6bae0ccf
DL
1295
1296 ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1297
c0d27fcc 1298
ba5da88a
PJ
1299test "$program_prefix" != NONE &&
1300 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1301# Use a double $ so make ignores it.
1302test "$program_suffix" != NONE &&
1303 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1304# Double any \ or $. echo might interpret backslashes.
1305# By default was `s,x,x', remove it if useless.
1306cat <<\_ACEOF >conftest.sed
1307s/[\\$]/&&/g;s/;s,x,x,$//
1308_ACEOF
1309program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1310rm conftest.sed
1311
c0d27fcc 1312
ba4481b5
DL
1313lispdir='${datadir}/emacs/${version}/lisp'
1314locallisppath='${datadir}/emacs/${version}/site-lisp:'\
1315'${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
1316lisppath='${locallisppath}:${lispdir}'
1317etcdir='${datadir}/emacs/${version}/etc'
1318archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1319docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1320gamedir='${localstatedir}/games/emacs'
98418dba
CW
1321
1322gameuser=games
1323
c0d27fcc 1324
ba4481b5
DL
1325# Check whether --with-gcc or --without-gcc was given.
1326if test "${with_gcc+set}" = set; then
1327 withval="$with_gcc"
503d2be0
AS
1328
1329fi;
ba4481b5
DL
1330
1331# Check whether --with-pop or --without-pop was given.
1332if test "${with_pop+set}" = set; then
1333 withval="$with_pop"
243cf185 1334 if test "$withval" = yes; then
c0d27fcc 1335 cat >>confdefs.h <<\_ACEOF
ba4481b5 1336#define MAIL_USE_POP 1
c0d27fcc 1337_ACEOF
ba4481b5 1338
243cf185
DL
1339else :
1340fi
3d9fec71 1341else
c0d27fcc 1342 cat >>confdefs.h <<\_ACEOF
3d9fec71 1343#define MAIL_USE_POP 1
c0d27fcc 1344_ACEOF
3d9fec71 1345
503d2be0 1346fi;
ba4481b5 1347
c0d27fcc 1348
a21616bd
KR
1349# Check whether --with-kerberos or --without-kerberos was given.
1350if test "${with_kerberos+set}" = set; then
1351 withval="$with_kerberos"
c0d27fcc 1352 cat >>confdefs.h <<\_ACEOF
a21616bd 1353#define KERBEROS 1
c0d27fcc 1354_ACEOF
a21616bd 1355
503d2be0 1356fi;
a21616bd 1357
c0d27fcc 1358
a21616bd
KR
1359# Check whether --with-kerberos5 or --without-kerberos5 was given.
1360if test "${with_kerberos5+set}" = set; then
1361 withval="$with_kerberos5"
1362 if test "${with_kerberos5+set}" = set; then
1363 if test "${with_kerberos+set}" != set; then
1364 with_kerberos=yes
c0d27fcc 1365 cat >>confdefs.h <<\_ACEOF
a21616bd 1366#define KERBEROS 1
c0d27fcc 1367_ACEOF
a21616bd
KR
1368
1369 fi
1370fi
b936fae4 1371
c0d27fcc 1372cat >>confdefs.h <<\_ACEOF
a21616bd 1373#define KERBEROS5 1
c0d27fcc 1374_ACEOF
a21616bd 1375
503d2be0 1376fi;
a21616bd 1377
ba4481b5
DL
1378# Check whether --with-hesiod or --without-hesiod was given.
1379if test "${with_hesiod+set}" = set; then
1380 withval="$with_hesiod"
b936fae4 1381
c0d27fcc 1382cat >>confdefs.h <<\_ACEOF
ba4481b5 1383#define HESIOD 1
c0d27fcc 1384_ACEOF
ba4481b5 1385
503d2be0 1386fi;
ba4481b5 1387
c0d27fcc 1388
2c9dccc9
PJ
1389# Check whether --with-sound or --without-sound was given.
1390if test "${with_sound+set}" = set; then
1391 withval="$with_sound"
1392
1393fi;
1394
c0d27fcc 1395
ba4481b5
DL
1396# Check whether --with-x-toolkit or --without-x-toolkit was given.
1397if test "${with_x_toolkit+set}" = set; then
1398 withval="$with_x_toolkit"
1399 case "${withval}" in
1400 y | ye | yes ) val=athena ;;
1401 n | no ) val=no ;;
1402 l | lu | luc | luci | lucid ) val=lucid ;;
1403 a | at | ath | athe | athen | athena ) val=athena ;;
1404 m | mo | mot | moti | motif ) val=motif ;;
1405 * )
c0d27fcc 1406{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid\;
ba4481b5 1407this option's value should be \`yes', \`no', \`lucid', \`athena', or \`motif'.
503d2be0
AS
1408Currently, \`yes', \`athena' and \`lucid' are synonyms." >&5
1409echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid\;
1410this option's value should be \`yes', \`no', \`lucid', \`athena', or \`motif'.
1411Currently, \`yes', \`athena' and \`lucid' are synonyms." >&2;}
1412 { (exit 1); exit 1; }; }
ba4481b5
DL
1413 ;;
1414 esac
1415 with_x_toolkit=$val
1416
503d2be0 1417fi;
ba4481b5
DL
1418
1419# Check whether --with-xpm or --without-xpm was given.
1420if test "${with_xpm+set}" = set; then
1421 withval="$with_xpm"
503d2be0
AS
1422
1423fi;
ba4481b5
DL
1424
1425# Check whether --with-jpeg or --without-jpeg was given.
1426if test "${with_jpeg+set}" = set; then
1427 withval="$with_jpeg"
503d2be0
AS
1428
1429fi;
ba4481b5
DL
1430
1431# Check whether --with-tiff or --without-tiff was given.
1432if test "${with_tiff+set}" = set; then
1433 withval="$with_tiff"
503d2be0
AS
1434
1435fi;
ba4481b5
DL
1436
1437# Check whether --with-gif or --without-gif was given.
1438if test "${with_gif+set}" = set; then
1439 withval="$with_gif"
503d2be0
AS
1440
1441fi;
ba4481b5
DL
1442
1443# Check whether --with-png or --without-png was given.
1444if test "${with_png+set}" = set; then
1445 withval="$with_png"
503d2be0
AS
1446
1447fi;
ba4481b5
DL
1448
1449# Check whether --with-toolkit-scroll-bars or --without-toolkit-scroll-bars was given.
1450if test "${with_toolkit_scroll_bars+set}" = set; then
1451 withval="$with_toolkit_scroll_bars"
503d2be0
AS
1452
1453fi;
ba4481b5 1454
1d36487c
GM
1455# Check whether --with-xim or --without-xim was given.
1456if test "${with_xim+set}" = set; then
1457 withval="$with_xim"
1d36487c 1458
503d2be0 1459fi;
ba4481b5 1460
e0f712ba
AC
1461# Check whether --with-carbon or --without-carbon was given.
1462if test "${with_carbon+set}" = set; then
1463 withval="$with_carbon"
1464
1465fi;
6a3a24fa
JD
1466# Check whether --enable-carbon-app or --disable-carbon-app was given.
1467if test "${enable_carbon_app+set}" = set; then
1468 enableval="$enable_carbon_app"
1469 carbon_appdir_x=${enableval}
1470fi;
e0f712ba 1471
ba4481b5 1472#### Make srcdir absolute, if it isn't already. It's important to
17494071 1473#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
1474#### give you automounter prefixes, which can go away. We do all this
1475#### so Emacs can find its files when run uninstalled.
17494071
GM
1476## Make sure CDPATH doesn't affect cd (in case PWD is relative).
1477unset CDPATH
ba4481b5
DL
1478case "${srcdir}" in
1479 /* ) ;;
1480 . )
1481 ## We may be able to use the $PWD environment variable to make this
1482 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
1483 ## Note: we used to use ${PWD} at the end instead of `pwd`,
1484 ## but that tested only for a well-formed and valid PWD,
1485 ## it did not object when PWD was well-formed and valid but just wrong.
1486 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
1487 then
1488 srcdir="$PWD"
1489 else
1490 srcdir="`(cd ${srcdir}; pwd)`"
1491 fi
1492 ;;
1493 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
1494esac
1495
1496#### Check if the source directory already has a configured system in it.
1497if test `pwd` != `(cd ${srcdir} && pwd)` \
1498 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 1499 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
1500 as a build directory right now; it has been configured in its own
1501 right. To configure in another directory as well, you MUST
1502 use GNU make. If you do not have GNU make, then you must
1503 now do \`make distclean' in ${srcdir},
1504 and then run $0 again." >&5
1505echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
1506 as a build directory right now; it has been configured in its own
1507 right. To configure in another directory as well, you MUST
1508 use GNU make. If you do not have GNU make, then you must
1509 now do \`make distclean' in ${srcdir},
503d2be0 1510 and then run $0 again." >&2;}
ba4481b5 1511
22044edf 1512extrasub='/^VPATH[ ]*=/c\
ba4481b5
DL
1513vpath %.c $(srcdir)\
1514vpath %.h $(srcdir)\
1515vpath %.y $(srcdir)\
1516vpath %.l $(srcdir)\
1517vpath %.s $(srcdir)\
1518vpath %.in $(srcdir)\
1519vpath %.texi $(srcdir)'
1520fi
1521
1522#### Given the configuration name, set machfile and opsysfile to the
1523#### names of the m/*.h and s/*.h files we should use.
1524
1525### Canonicalize the configuration name.
1526
1527ac_aux_dir=
1528for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1529 if test -f $ac_dir/install-sh; then
1530 ac_aux_dir=$ac_dir
1531 ac_install_sh="$ac_aux_dir/install-sh -c"
1532 break
1533 elif test -f $ac_dir/install.sh; then
1534 ac_aux_dir=$ac_dir
1535 ac_install_sh="$ac_aux_dir/install.sh -c"
1536 break
503d2be0
AS
1537 elif test -f $ac_dir/shtool; then
1538 ac_aux_dir=$ac_dir
1539 ac_install_sh="$ac_aux_dir/shtool install -c"
1540 break
ba4481b5
DL
1541 fi
1542done
1543if test -z "$ac_aux_dir"; then
c0d27fcc 1544 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
503d2be0
AS
1545echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1546 { (exit 1); exit 1; }; }
ba4481b5 1547fi
503d2be0
AS
1548ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1549ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1550ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ba4481b5
DL
1551
1552# Make sure we can run config.sub.
503d2be0 1553$ac_config_sub sun4 >/dev/null 2>&1 ||
c0d27fcc 1554 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
503d2be0
AS
1555echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1556 { (exit 1); exit 1; }; }
1557
c0d27fcc 1558echo "$as_me:$LINENO: checking build system type" >&5
503d2be0
AS
1559echo $ECHO_N "checking build system type... $ECHO_C" >&6
1560if test "${ac_cv_build+set}" = set; then
1561 echo $ECHO_N "(cached) $ECHO_C" >&6
1562else
1563 ac_cv_build_alias=$build_alias
1564test -z "$ac_cv_build_alias" &&
1565 ac_cv_build_alias=`$ac_config_guess`
1566test -z "$ac_cv_build_alias" &&
c0d27fcc 1567 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
1568echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1569 { (exit 1); exit 1; }; }
1570ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
c0d27fcc
MR
1571 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1572echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
503d2be0
AS
1573 { (exit 1); exit 1; }; }
1574
1575fi
c0d27fcc 1576echo "$as_me:$LINENO: result: $ac_cv_build" >&5
503d2be0
AS
1577echo "${ECHO_T}$ac_cv_build" >&6
1578build=$ac_cv_build
1579build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1580build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1581build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1582
c0d27fcc
MR
1583
1584echo "$as_me:$LINENO: checking host system type" >&5
503d2be0
AS
1585echo $ECHO_N "checking host system type... $ECHO_C" >&6
1586if test "${ac_cv_host+set}" = set; then
1587 echo $ECHO_N "(cached) $ECHO_C" >&6
1588else
1589 ac_cv_host_alias=$host_alias
1590test -z "$ac_cv_host_alias" &&
1591 ac_cv_host_alias=$ac_cv_build_alias
1592ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
c0d27fcc 1593 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
503d2be0
AS
1594echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1595 { (exit 1); exit 1; }; }
1596
1597fi
c0d27fcc 1598echo "$as_me:$LINENO: result: $ac_cv_host" >&5
503d2be0
AS
1599echo "${ECHO_T}$ac_cv_host" >&6
1600host=$ac_cv_host
1601host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1602host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1603host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ba4481b5 1604
c0d27fcc 1605
ba4481b5 1606canonical=$host
531a3336 1607configuration=${host_alias-$host}
ba4481b5 1608
c0d27fcc 1609
22044edf 1610
ba4481b5
DL
1611### If you add support for a new configuration, add code to this
1612### switch statement to recognize your configuration name and select
1613### the appropriate operating system and machine description files.
1614
1615### You would hope that you could choose an m/*.h file pretty much
1616### based on the machine portion of the configuration name, and an s-
1617### file based on the operating system portion. However, it turns out
1618### that each m/*.h file is pretty manufacturer-specific - for
1619### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
1620### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
1621### machines. So we basically have to have a special case for each
1622### configuration name.
1623###
1624### As far as handling version numbers on operating systems is
1625### concerned, make sure things will fail in a fixable way. If
1626### /etc/MACHINES doesn't say anything about version numbers, be
1627### prepared to handle anything reasonably. If version numbers
1628### matter, be sure /etc/MACHINES says something about it.
1629###
1630### Eric Raymond says we should accept strings like "sysvr4" to mean
1631### "System V Release 4"; he writes, "The old convention encouraged
1632### confusion between `system' and `release' levels'."
1633
1634machine='' opsys='' unported=no
1635case "${canonical}" in
1636
1096bcc0
GM
1637 ## FreeBSD ports
1638 *-*-freebsd* )
1639 opsys=freebsd
1640 case "${canonical}" in
1641 alpha*-*-freebsd*) machine=alpha ;;
1642 i[3456]86-*-freebsd*) machine=intel386 ;;
1643 esac
1644 ;;
1645
ba4481b5
DL
1646 ## NetBSD ports
1647 *-*-netbsd* )
1648 opsys=netbsd
1649 case "${canonical}" in
1650 alpha*-*-netbsd*) machine=alpha ;;
1651 i[3456]86-*-netbsd*) machine=intel386 ;;
1652 m68k-*-netbsd*)
1653 # This is somewhat bogus.
1654 machine=hp9000s300 ;;
1655 powerpc-apple-netbsd*) machine=macppc ;;
1656 mips-*-netbsd*) machine=pmax ;;
2df636f4 1657 mipsel-*-netbsd*) machine=pmax ;;
97836269 1658 mipseb-*-netbsd*) machine=pmax ;;
ba4481b5 1659 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 1660 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 1661 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 1662 vax-*-netbsd*) machine=vax ;;
2df636f4 1663 arm-*-netbsd*) machine=arm ;;
ba4481b5
DL
1664 esac
1665 ;;
1666
1667 ## OpenBSD ports
1668 *-*-openbsd* )
1669 opsys=openbsd
1670 case "${canonical}" in
1671 alpha*-*-openbsd*) machine=alpha ;;
1672 i386-*-openbsd*) machine=intel386 ;;
1673 m68k-*-openbsd*) machine=hp9000s300 ;;
1674 mipsel-*-openbsd*) machine=pmax ;;
1675 ns32k-*-openbsd*) machine=ns32000 ;;
1676 sparc-*-openbsd*) machine=sparc ;;
1677 vax-*-openbsd*) machine=vax ;;
1678 esac
1679 ;;
1680
1681 ## Acorn RISCiX:
1682 arm-acorn-riscix1.1* )
1683 machine=acorn opsys=riscix1-1
1684 ;;
1685 arm-acorn-riscix1.2* | arm-acorn-riscix )
1686 ## This name is riscix12 instead of riscix1.2
1687 ## to avoid a file name conflict on MSDOS.
1688 machine=acorn opsys=riscix12
1689 ;;
1690
1691 ## BSDI ports
1692 *-*-bsdi* )
1693 opsys=bsdi
1694 case "${canonical}" in
1695 i[345]86-*-bsdi*) machine=intel386 ;;
1696 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 1697 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
1698 esac
1699 case "${canonical}" in
1700 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
1701 *-*-bsdi2.0* ) opsys=bsdos2 ;;
1702 *-*-bsdi2* ) opsys=bsdos2-1 ;;
1703 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 1704 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
1705 esac
1706 ;;
1707
1708 ## Alliant machines
1709 ## Strictly speaking, we need the version of the alliant operating
1710 ## system to choose the right machine file, but currently the
1711 ## configuration name doesn't tell us enough to choose the right
1712 ## one; we need to give alliants their own operating system name to
1713 ## do this right. When someone cares, they can help us.
1714 fx80-alliant-* )
1715 machine=alliant4 opsys=bsd4-2
1716 ;;
1717 i860-alliant-* )
1718 machine=alliant-2800 opsys=bsd4-3
1719 ;;
1720
1721 ## Alpha (DEC) machines.
1722 alpha*-dec-osf* )
1723 machine=alpha opsys=osf1
1724 # This is needed to find X11R6.1 libraries for certain tests.
1725 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
1726 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
1727 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
1728 # due to non-traditional preprocessing with the current compiler
1729 # defaults. OSF 4 can also have that compiler version, and there
1730 # seems always to have been a usable /usr/bin/cpp.
1731 NON_GNU_CPP=/usr/bin/cpp
ca512671 1732 case "${canonical}" in
a55b799a 1733 alpha*-dec-osf[5-9]*)
bb17930d 1734 opsys=osf5-0 ;;
ca512671 1735 esac
ba4481b5
DL
1736 ;;
1737
1738 alpha*-*-linux-gnu* )
1739 machine=alpha opsys=gnu-linux
1740 ;;
1741
c4bb2108
DL
1742 arm*-*-linux-gnu* )
1743 machine=arm opsys=gnu-linux
1744 ;;
1745
1746 ppc-*-linux | \
1747 powerpc-*-linux* )
3aeecf97 1748 machine=macppc opsys=gnu-linux
c4bb2108
DL
1749 ;;
1750
ba4481b5
DL
1751 ## Altos 3068
1752 m68*-altos-sysv* )
1753 machine=altos opsys=usg5-2
1754 ;;
1755
1756 ## Amdahl UTS
1757 580-amdahl-sysv* )
1758 machine=amdahl opsys=usg5-2-2
1759 ;;
1760
1761 ## Apollo, Domain/OS
1762 m68*-apollo-* )
1763 machine=apollo opsys=bsd4-3
1764 ;;
1765
1766 ## AT&T 3b2, 3b5, 3b15, 3b20
1767 we32k-att-sysv* )
1768 machine=att3b opsys=usg5-2-2
1769 ;;
1770
1771 ## AT&T 3b1 - The Mighty Unix PC!
1772 m68*-att-sysv* )
1773 machine=7300 opsys=usg5-2-2
1774 ;;
1775
1776 ## Bull dpx20
1777 rs6000-bull-bosx* )
1778 machine=ibmrs6000 opsys=aix3-2
1779 ;;
1780
1781 ## Bull dpx2
1782 m68*-bull-sysv3* )
1783 machine=dpx2 opsys=usg5-3
1784 ;;
1785
1786 ## Bull sps7
1787 m68*-bull-sysv2* )
1788 machine=sps7 opsys=usg5-2
1789 ;;
1790
1791 ## CCI 5/32, 6/32 -- see "Tahoe".
1792
1793 ## Celerity
1794 ## I don't know what configuration name to use for this; config.sub
1795 ## doesn't seem to know anything about it. Hey, Celerity users, get
1796 ## in touch with us!
1797 celerity-celerity-bsd* )
1798 machine=celerity opsys=bsd4-2
1799 ;;
1800
1801 ## Clipper
1802 ## What operating systems does this chip run that Emacs has been
1803 ## tested on?
1804 clipper-* )
1805 machine=clipper
1806 ## We'll use the catch-all code at the bottom to guess the
1807 ## operating system.
1808 ;;
1809
df645f7c
AS
1810 ## Compaq Nonstop
1811 mips-compaq-nonstopux* )
1812 machine=nonstopux opsys=nonstopux
1813 ;;
1814
ba4481b5
DL
1815 ## Convex
1816 *-convex-bsd* | *-convex-convexos* )
1817 machine=convex opsys=bsd4-3
1818 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
1819 NON_GNU_CPP="cc -E -P"
1820 ;;
1821
1822 ## Cubix QBx/386
1823 i[3456]86-cubix-sysv* )
1824 machine=intel386 opsys=usg5-3
1825 ;;
1826
1827 ## Cydra 5
1828 cydra*-cydrome-sysv* )
1829 machine=cydra5 opsys=usg5-3
1830 ;;
1831
1832 ## Data General AViiON Machines
1833 ## DG changed naming conventions with the release of 5.4.4.10, they
1834 ## dropped the initial 5.4 but left the intervening R. Because of the
1835 ## R this shouldn't conflict with older versions of the OS (which I
1836 ## think were named like dgux4.*). In addition, DG new AViiONs series
1837 ## uses either Motorola M88k or Intel Pentium CPUs.
1838 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
1839 machine=aviion opsys=dgux4
1840 ;;
1841 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
1842 ## This name is dgux5-4-3 instead of dgux5-4r3
1843 ## to avoid a file name conflict on MSDOS.
1844 machine=aviion opsys=dgux5-4-3
1845 ;;
1846 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
1847 machine=aviion opsys=dgux5-4r2
1848 ;;
1849 m88k-dg-dgux* )
1850 machine=aviion opsys=dgux
1851 ;;
1852
1853 ## Data General AViiON Intel (x86) Machines
1854 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
1855 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
1856 i[345]86-dg-dguxR4* )
1857 machine=aviion-intel opsys=dgux4
1858 ;;
1859
1860 ## DECstations
1861 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1862 machine=pmax opsys=bsd4-2
1863 ;;
1864 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1865 machine=pmax opsys=bsd4-3
1866 ;;
1867 mips-dec-ultrix* )
1868 machine=pmax opsys=ultrix4-3
1869 ;;
1870 mips-dec-osf* )
1871 machine=pmax opsys=osf1
1872 ;;
1873 mips-dec-mach_bsd4.3* )
1874 machine=pmax opsys=mach-bsd4-3
1875 ;;
1876
171ce848 1877 ## Motorola Delta m88k
ba4481b5
DL
1878 m88k-motorola-sysv4* )
1879 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1880 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1881 # I hope there are not other 4.0 versions for this machine
1882 # which really need usg5-4 instead.
1883 machine=delta88k opsys=usg5-4-2
1884 ;;
1885 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1886 machine=delta88k opsys=usg5-3
1887 ;;
1888
1889 ## Dual machines
1890 m68*-dual-sysv* )
1891 machine=dual opsys=usg5-2
1892 ;;
1893 m68*-dual-uniplus* )
1894 machine=dual opsys=unipl5-2
1895 ;;
1896
1897 ## Elxsi 6400
1898 elxsi-elxsi-sysv* )
1899 machine=elxsi opsys=usg5-2
1900 ;;
1901
1902 ## Encore machines
1903 ns16k-encore-bsd* )
1904 machine=ns16000 opsys=umax
1905 ;;
1906
65171e3a
DL
1907 ## The GEC 63 - apparently, this port isn't really finished yet.
1908 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
1909
1910 ## Gould Power Node and NP1
1911 pn-gould-bsd4.2* )
1912 machine=gould opsys=bsd4-2
1913 ;;
1914 pn-gould-bsd4.3* )
1915 machine=gould opsys=bsd4-3
1916 ;;
1917 np1-gould-bsd* )
1918 machine=gould-np1 opsys=bsd4-3
1919 ;;
1920
1921 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
1922 ## as far as Emacs is concerned).
1923 m88k-harris-cxux* )
1924 # Build needs to be different on 7.0 and later releases
1925 case "`uname -r`" in
1926 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
1927 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
1928 esac
1929 NON_GNU_CPP="/lib/cpp"
1930 ;;
1931 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
1932 m68k-harris-cxux* )
1933 machine=nh3000 opsys=cxux
1934 ;;
1935 ## Harris power pc NightHawk running Power UNIX (Series 6000)
1936 powerpc-harris-powerunix )
1937 machine=nh6000 opsys=powerunix
1938 NON_GNU_CPP="cc -Xo -E -P"
1939 ;;
1940 ## SR2001/SR2201 running HI-UX/MPP
1941 hppa1.1-hitachi-hiuxmpp* )
1942 machine=sr2k opsys=hiuxmpp
1943 ;;
89a336fa
GM
1944 hppa1.1-hitachi-hiuxwe2* )
1945 machine=sr2k opsys=hiuxwe2
1946 ;;
ba4481b5
DL
1947 ## Honeywell XPS100
1948 xps*-honeywell-sysv* )
1949 machine=xps100 opsys=usg5-2
1950 ;;
1951
1952 ## HP 9000 series 200 or 300
1953 m68*-hp-bsd* )
1954 machine=hp9000s300 opsys=bsd4-3
1955 ;;
1956 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
1957 m68*-hp-hpux* )
1958 case "`uname -r`" in
1959 ## Someone's system reports A.B8.05 for this.
1960 ## I wonder what other possibilities there are.
1961 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
1962 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
1963 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
1964 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
1965 *) machine=hp9000s300 opsys=hpux ;;
1966 esac
1967 ;;
1968
1969 ## HP 9000 series 700 and 800, running HP/UX
1970 hppa*-hp-hpux7* )
1971 machine=hp800 opsys=hpux
1972 ;;
1973 hppa*-hp-hpux8* )
1974 machine=hp800 opsys=hpux8
1975 ;;
1976 hppa*-hp-hpux9shr* )
1977 machine=hp800 opsys=hpux9shr
1978 ;;
1979 hppa*-hp-hpux9* )
1980 machine=hp800 opsys=hpux9
1981 ;;
cc227489 1982 hppa*-hp-hpux10* )
ba4481b5
DL
1983 machine=hp800 opsys=hpux10
1984 ;;
cc227489
MB
1985 hppa*-hp-hpux1[1-9]* )
1986 machine=hp800 opsys=hpux11
1987 ;;
ba4481b5 1988
409d9577
GM
1989 hppa*-*-linux-gnu* )
1990 machine=hp800 opsys=gnu-linux
1991 ;;
1992
ba4481b5
DL
1993 ## HP 9000 series 700 and 800, running HP/UX
1994 hppa*-hp-hpux* )
1995 ## Cross-compilation? Nah!
1996 case "`uname -r`" in
1997 ## Someone's system reports A.B8.05 for this.
1998 ## I wonder what other possibilities there are.
1999 *.B8.* ) machine=hp800 opsys=hpux8 ;;
2000 *.08.* ) machine=hp800 opsys=hpux8 ;;
2001 *.09.* ) machine=hp800 opsys=hpux9 ;;
2002 *) machine=hp800 opsys=hpux10 ;;
2003 esac
2004 ;;
2005 hppa*-*-nextstep* )
2006 machine=hp800 opsys=nextstep
2007 ;;
2008
2009 ## Orion machines
2010 orion-orion-bsd* )
2011 machine=orion opsys=bsd4-2
2012 ;;
2013 clipper-orion-bsd* )
2014 machine=orion105 opsys=bsd4-2
2015 ;;
2016
2017 ## IBM machines
2018 i[3456]86-ibm-aix1.1* )
2019 machine=ibmps2-aix opsys=usg5-2-2
2020 ;;
2021 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
2022 machine=ibmps2-aix opsys=usg5-3
2023 ;;
2024 i370-ibm-aix*)
2025 machine=ibm370aix opsys=usg5-3
2026 ;;
138f0859
GM
2027 s390-*-linux-gnu)
2028 machine=ibms390 opsys=gnu-linux
2029 ;;
ba4481b5
DL
2030 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2031 machine=ibmrs6000 opsys=aix3-1
2032 ;;
2033 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2034 machine=ibmrs6000 opsys=aix3-2-5
2035 ;;
2036 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2037 machine=ibmrs6000 opsys=aix4-1
2038 ;;
2039 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2040 machine=ibmrs6000 opsys=aix4-2
2041 ;;
d6b82250
EZ
2042 rs6000-ibm-aix5.1* | powerpc-ibm-aix5.1* )
2043 machine=ibmrs6000 opsys=aix4-2
2044 ;;
ba4481b5
DL
2045 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2046 machine=ibmrs6000 opsys=aix4
2047 ;;
2048 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2049 machine=ibmrs6000 opsys=aix4-1
2050 ;;
2051 rs6000-ibm-aix* | powerpc-ibm-aix* )
2052 machine=ibmrs6000 opsys=aix3-2
2053 ;;
2054 romp-ibm-bsd4.3* )
2055 machine=ibmrt opsys=bsd4-3
2056 ;;
2057 romp-ibm-bsd4.2* )
2058 machine=ibmrt opsys=bsd4-2
2059 ;;
2060 romp-ibm-aos4.3* )
2061 machine=ibmrt opsys=bsd4-3
2062 ;;
2063 romp-ibm-aos4.2* )
2064 machine=ibmrt opsys=bsd4-2
2065 ;;
2066 romp-ibm-aos* )
2067 machine=ibmrt opsys=bsd4-3
2068 ;;
2069 romp-ibm-bsd* )
2070 machine=ibmrt opsys=bsd4-3
2071 ;;
2072 romp-ibm-aix* )
2073 machine=ibmrt-aix opsys=usg5-2-2
2074 ;;
2075
2076 ## Integrated Solutions `Optimum V'
2077 m68*-isi-bsd4.2* )
2078 machine=isi-ov opsys=bsd4-2
2079 ;;
2080 m68*-isi-bsd4.3* )
2081 machine=isi-ov opsys=bsd4-3
2082 ;;
2083
2084 ## Intel 386 machines where we do care about the manufacturer
2085 i[3456]86-intsys-sysv* )
2086 machine=is386 opsys=usg5-2-2
2087 ;;
2088
2089 ## Prime EXL
2090 i[3456]86-prime-sysv* )
2091 machine=i386 opsys=usg5-3
2092 ;;
2093
2094 ## Sequent Symmetry running Dynix
2095 i[3456]86-sequent-bsd* )
2096 machine=symmetry opsys=bsd4-3
2097 ;;
2098
2099 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
2100 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
2101 machine=sequent-ptx opsys=ptx4
2102 NON_GNU_CPP=/lib/cpp
2103 ;;
2104
2105 ## Sequent Symmetry running DYNIX/ptx
2106 ## Use the old cpp rather than the newer ANSI one.
2107 i[3456]86-sequent-ptx* )
2108 machine=sequent-ptx opsys=ptx
2109 NON_GNU_CPP="/lib/cpp"
2110 ;;
2111
2112 ## ncr machine running svr4.3.
2113 i[3456]86-ncr-sysv4.3 )
2114 machine=ncr386 opsys=usg5-4-3
2115 ;;
2116
2117 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2118 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2119 i[3456]86-ncr-sysv* )
2120 machine=ncr386 opsys=usg5-4-2
2121 ;;
2122
2123 ## Intel Paragon OSF/1
2124 i860-intel-osf1* )
2125 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
2126 ;;
2127
2128 ## Intel 860
2129 i860-*-sysv4* )
2130 machine=i860 opsys=usg5-4
2131 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
2132 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
2133 ;;
2134
c76e04a8
GM
2135 ## Macintosh PowerPC
2136 powerpc*-*-linux-gnu* )
2137 machine=macppc opsys=gnu-linux
2138 ;;
2139
ba4481b5
DL
2140 ## Masscomp machines
2141 m68*-masscomp-rtu* )
2142 machine=masscomp opsys=rtu
2143 ;;
2144
2145 ## Megatest machines
2146 m68*-megatest-bsd* )
2147 machine=mega68 opsys=bsd4-2
2148 ;;
2149
2150 ## Workstations sold by MIPS
2151 ## This is not necessarily all workstations using the MIPS processor -
2152 ## Irises are produced by SGI, and DECstations by DEC.
2153
2154 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
2155 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
2156 ## it gives for choosing between the alternatives seems to be "Use
2157 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
2158 ## the BSD world." I'll assume that these are instructions for
2159 ## handling two odd situations, and that every other situation
2160 ## should use mips.h and usg5-2-2, they being listed first.
2161 mips-mips-usg* )
2162 machine=mips4
2163 ## Fall through to the general code at the bottom to decide on the OS.
2164 ;;
2165 mips-mips-riscos4* )
2166 machine=mips4 opsys=bsd4-3
2167 NON_GNU_CC="cc -systype bsd43"
2168 NON_GNU_CPP="cc -systype bsd43 -E"
2169 ;;
2170 mips-mips-riscos5* )
2171 machine=mips4 opsys=riscos5
2172 NON_GNU_CC="cc -systype bsd43"
2173 NON_GNU_CPP="cc -systype bsd43 -E"
2174 ;;
2175 mips-mips-bsd* )
2176 machine=mips opsys=bsd4-3
2177 ;;
2178 mips-mips-* )
2179 machine=mips opsys=usg5-2-2
2180 ;;
2181
2182 ## NeXT
2183 m68*-next-* | m68k-*-nextstep* )
2184 machine=m68k opsys=nextstep
2185 ;;
2186
2187 ## The complete machine from National Semiconductor
2188 ns32k-ns-genix* )
2189 machine=ns32000 opsys=usg5-2
2190 ;;
2191
2192 ## NCR machines
2193 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
2194 machine=tower32 opsys=usg5-2-2
2195 ;;
2196 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
2197 machine=tower32v3 opsys=usg5-3
2198 ;;
2199
2200 ## NEC EWS4800
2201 mips-nec-sysv4*)
2202 machine=ews4800 opsys=ux4800
2203 ;;
2204
2205 ## Nixdorf Targon 31
2206 m68*-nixdorf-sysv* )
2207 machine=targon31 opsys=usg5-2-2
2208 ;;
2209
2210 ## Nu (TI or LMI)
2211 m68*-nu-sysv* )
2212 machine=nu opsys=usg5-2
2213 ;;
2214
2215 ## Plexus
2216 m68*-plexus-sysv* )
2217 machine=plexus opsys=usg5-2
2218 ;;
2219
ba4481b5
DL
2220 ## Pyramid machines
2221 ## I don't really have any idea what sort of processor the Pyramid has,
2222 ## so I'm assuming it is its own architecture.
2223 pyramid-pyramid-bsd* )
2224 machine=pyramid opsys=bsd4-2
2225 ;;
2226
2227 ## Sequent Balance
2228 ns32k-sequent-bsd4.2* )
2229 machine=sequent opsys=bsd4-2
2230 ;;
2231 ns32k-sequent-bsd4.3* )
2232 machine=sequent opsys=bsd4-3
2233 ;;
2234
2235 ## Siemens Nixdorf
2236 mips-siemens-sysv* | mips-sni-sysv*)
2237 machine=mips-siemens opsys=usg5-4
2238 NON_GNU_CC=/usr/ccs/bin/cc
2239 NON_GNU_CPP=/usr/ccs/lib/cpp
2240 ;;
2241
2242 ## Silicon Graphics machines
2243 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
2244 m68*-sgi-iris3.5* )
2245 machine=irist opsys=iris3-5
2246 ;;
2247 m68*-sgi-iris3.6* | m68*-sgi-iris*)
2248 machine=irist opsys=iris3-6
2249 ;;
2250 ## Iris 4D
2251 mips-sgi-irix3* )
2252 machine=iris4d opsys=irix3-3
2253 ;;
2254 mips-sgi-irix4* )
2255 machine=iris4d opsys=irix4-0
2256 ;;
2257 mips-sgi-irix6.5 )
2258 machine=iris4d opsys=irix6-5
946173ad
DL
2259 # Without defining _LANGUAGE_C, things get masked out in the headers
2260 # so that, for instance, grepping for `free' in stdlib.h fails and
2261 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2262 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2263 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
2264 ;;
2265 mips-sgi-irix6* )
2266 machine=iris4d opsys=irix6-0
c4bb2108 2267 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2268 # but presumably it does no harm.
2269 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2270 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2271 NON_GCC_TEST_OPTIONS=-32
2272 ;;
2273 mips-sgi-irix5.[01]* )
2274 machine=iris4d opsys=irix5-0
2275 ;;
2276 mips-sgi-irix5* | mips-sgi-irix* )
2277 machine=iris4d opsys=irix5-2
2278 ;;
2279
2280 ## SONY machines
2281 m68*-sony-bsd4.2* )
2282 machine=news opsys=bsd4-2
2283 ;;
2284 m68*-sony-bsd4.3* )
2285 machine=news opsys=bsd4-3
2286 ;;
2287 m68*-sony-newsos3* | m68*-sony-news3*)
2288 machine=news opsys=bsd4-3
2289 ;;
2290 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2291 machine=news-risc opsys=bsd4-3
2292 ;;
2293 mips-sony-newsos6* )
2294 machine=news-r6 opsys=newsos6
2295 ;;
2296 mips-sony-news* )
2297 machine=news-risc opsys=newsos5
2298 ;;
2299
2300 ## Stride
2301 m68*-stride-sysv* )
2302 machine=stride opsys=usg5-2
2303 ;;
2304
2305 ## Suns
2306 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2307 machine=sparc opsys=gnu-linux
2308 ;;
2309
d054101f 2310 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2311 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2312 | rs6000-*-solaris2*)
2313 case "${canonical}" in
2314 m68*-sunos1* ) machine=sun1 ;;
2315 m68*-sunos2* ) machine=sun2 ;;
2316 m68* ) machine=sun3 ;;
2317 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
2318 i[3456]86-*-* ) machine=intel386 ;;
2319 powerpcle* ) machine=powerpcle ;;
2320 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2321 sparc* ) machine=sparc ;;
2322 * ) unported=yes ;;
2323 esac
2324 case "${canonical}" in
2325 ## The Sun386 didn't get past 4.0.
2326 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2327 *-sunos4.0* ) opsys=sunos4-0 ;;
2328 *-sunos4.1.[3-9]*noshare )
2329 ## This name is sunos413 instead of sunos4-1-3
2330 ## to avoid a file name conflict on MSDOS.
2331 opsys=sunos413
2332 NON_GNU_CPP=/usr/lib/cpp
2333 NON_GCC_TEST_OPTIONS=-Bstatic
2334 GCC_TEST_OPTIONS=-static
2335 ;;
2336 *-sunos4.1.[3-9]* | *-sunos4shr*)
2337 opsys=sunos4shr
2338 NON_GNU_CPP=/usr/lib/cpp
2339 ;;
2340 *-sunos4* | *-sunos )
2341 opsys=sunos4-1
2342 NON_GCC_TEST_OPTIONS=-Bstatic
2343 GCC_TEST_OPTIONS=-static
2344 ;;
2345 *-sunos5.3* | *-solaris2.3* )
2346 opsys=sol2-3
2347 NON_GNU_CPP=/usr/ccs/lib/cpp
2348 ;;
2349 *-sunos5.4* | *-solaris2.4* )
2350 opsys=sol2-4
2351 NON_GNU_CPP=/usr/ccs/lib/cpp
2352 RANLIB="ar -ts"
2353 ;;
2354 *-sunos5.5* | *-solaris2.5* )
2355 opsys=sol2-5
2356 NON_GNU_CPP=/usr/ccs/lib/cpp
2357 RANLIB="ar -ts"
2358 ;;
8e967cf7
MR
2359 *-sunos5.6* | *-solaris2.6* )
2360 opsys=sol2-6
2361 NON_GNU_CPP=/usr/ccs/lib/cpp
2362 RANLIB="ar -ts"
2363 ;;
ba4481b5 2364 *-sunos5* | *-solaris* )
9e71690e 2365 opsys=sol2-6
ba4481b5
DL
2366 NON_GNU_CPP=/usr/ccs/lib/cpp
2367 ;;
2368 * ) opsys=bsd4-2 ;;
2369 esac
2370 ## Watch out for a compiler that we know will not work.
2371 case "${canonical}" in
2372 *-solaris* | *-sunos5* )
2373 if [ "x$CC" = x/usr/ucb/cc ]; then
2374 ## /usr/ucb/cc doesn't work;
2375 ## we should find some other compiler that does work.
2376 unset CC
2377 fi
2378 ;;
2379 *) ;;
2380 esac
2381 ;;
2382 sparc-*-nextstep* )
2383 machine=sparc opsys=nextstep
2384 ;;
2385
2386 ## Tadpole 68k
2387 m68*-tadpole-sysv* )
2388 machine=tad68k opsys=usg5-3
2389 ;;
2390
2391 ## Tahoe machines
2392 tahoe-tahoe-bsd4.2* )
2393 machine=tahoe opsys=bsd4-2
2394 ;;
2395 tahoe-tahoe-bsd4.3* )
2396 machine=tahoe opsys=bsd4-3
2397 ;;
2398
2399 ## Tandem Integrity S2
2400 mips-tandem-sysv* )
2401 machine=tandem-s2 opsys=usg5-3
2402 ;;
2403
2404 ## Tektronix XD88
2405 m88k-tektronix-sysv3* )
2406 machine=tekxd88 opsys=usg5-3
2407 ;;
2408
2409 ## Tektronix 16000 box (6130?)
2410 ns16k-tektronix-bsd* )
2411 machine=ns16000 opsys=bsd4-2
2412 ;;
2413 ## Tektronix 4300
2414 ## src/m/tek4300.h hints that this is a m68k machine.
2415 m68*-tektronix-bsd* )
2416 machine=tek4300 opsys=bsd4-3
2417 ;;
2418
2419 ## Titan P2 or P3
2420 ## We seem to have lost the machine-description file titan.h!
2421 titan-titan-sysv* )
2422 machine=titan opsys=usg5-3
2423 ;;
2424
2425 ## Ustation E30 (SS5E)
2426 m68*-unisys-uniplus* )
2427 machine=ustation opsystem=unipl5-2
2428 ;;
2429
2430 ## Vaxen.
2431 vax-dec-* )
2432 machine=vax
2433 case "${canonical}" in
2434 *-bsd4.1* ) opsys=bsd4-1 ;;
2435 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
2436 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
2437 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
2438 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
2439 *-vms* ) opsys=vms ;;
2440 * ) unported=yes
2441 esac
2442 ;;
2443
2444 ## Whitechapel MG1
2445 ns16k-whitechapel-* )
2446 machine=mg1
2447 ## We don't know what sort of OS runs on these; we'll let the
2448 ## operating system guessing code below try.
2449 ;;
2450
2451 ## Wicat
2452 m68*-wicat-sysv* )
2453 machine=wicat opsys=usg5-2
2454 ;;
2455
f4988be7
GM
2456 ## IA-64
2457 ia64*-*-linux* )
2458 machine=ia64 opsys=gnu-linux
2459 ;;
2460
ba4481b5
DL
2461 ## Intel 386 machines where we don't care about the manufacturer
2462 i[3456]86-*-* )
2463 machine=intel386
2464 case "${canonical}" in
9f817ea4 2465 *-lynxos* ) opsys=lynxos ;;
ba4481b5
DL
2466 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
2467 *-isc2.2* ) opsys=isc2-2 ;;
2468 *-isc4.0* ) opsys=isc4-0 ;;
2469 *-isc4.* ) opsys=isc4-1
2470 GCC_TEST_OPTIONS=-posix
2471 NON_GCC_TEST_OPTIONS=-Xp
2472 ;;
2473 *-isc* ) opsys=isc3-0 ;;
2474 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
2475 *-esix* ) opsys=esix ;;
2476 *-xenix* ) opsys=xenix ;;
2477 *-linux-gnu* ) opsys=gnu-linux ;;
2478 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 2479 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
2480 NON_GNU_CPP=/lib/cpp
2481 # Prevent -belf from being passed to $CPP.
2482 # /lib/cpp does not accept it.
2483 OVERRIDE_CPPFLAGS=" "
2484 ;;
2485 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2486 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
2487 *-nextstep* ) opsys=nextstep ;;
2488 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2489 esac
2490 ;;
2491
2492 ## m68k Linux-based GNU system
2493 m68k-*-linux-gnu* )
2494 machine=m68k opsys=gnu-linux
2495 ;;
2496
2497 ## Mips Linux-based GNU system
cd958eb3 2498 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
2499 machine=mips opsys=gnu-linux
2500 ;;
2501
2502 ## UXP/DS
2503 sparc-fujitsu-sysv4* )
2504 machine=sparc opsys=uxpds
2505 NON_GNU_CPP=/usr/ccs/lib/cpp
2506 RANLIB="ar -ts"
2507 ;;
2508
2509 ## UXP/V
2510 f301-fujitsu-uxpv4.1)
2511 machine=f301 opsys=uxpv
2512 ;;
2513
e0f712ba
AC
2514 ## Darwin / Mac OS X
2515 powerpc-apple-darwin* )
2516 machine=powermac opsys=darwin
2517 # Define CPP as follows to make autoconf work correctly.
2518 CPP="cc -E -traditional-cpp"
2519 ;;
2520
598a2813
AS
2521 ## AMD x86-64 Linux-based GNU system
2522 x86_64-*-linux-gnu* )
24b01ec4 2523 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2524 ;;
2525
ba4481b5
DL
2526 * )
2527 unported=yes
2528 ;;
2529esac
2530
2531### If the code above didn't choose an operating system, just choose
2532### an operating system based on the configuration name. You really
2533### only want to use this when you have no idea what the right
2534### operating system is; if you know what operating systems a machine
2535### runs, it's cleaner to make it explicit in the case statement
2536### above.
2537if test x"${opsys}" = x; then
2538 case "${canonical}" in
2539 *-gnu* ) opsys=gnu ;;
2540 *-bsd4.[01] ) opsys=bsd4-1 ;;
2541 *-bsd4.2 ) opsys=bsd4-2 ;;
2542 *-bsd4.3 ) opsys=bsd4-3 ;;
2543 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
2544 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
2545 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
2546 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
2547 *-sysv4.2uw* ) opsys=unixware ;;
2548 *-sysv4.1* | *-sysvr4.1* )
2549 NON_GNU_CPP=/usr/lib/cpp
2550 opsys=usg5-4 ;;
2551 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2552 if [ x$NON_GNU_CPP = x ]; then
2553 if [ -f /usr/ccs/lib/cpp ]; then
2554 NON_GNU_CPP=/usr/ccs/lib/cpp
2555 else
2556 NON_GNU_CPP=/lib/cpp
2557 fi
2558 fi
2559 opsys=usg5-4-2 ;;
2560 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2561 * )
2562 unported=yes
2563 ;;
2564 esac
2565fi
2566
c0d27fcc 2567
22044edf 2568
ba4481b5 2569if test $unported = yes; then
c0d27fcc 2570 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2571Check \`etc/MACHINES' for recognized configuration names." >&5
2572echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2573Check \`etc/MACHINES' for recognized configuration names." >&2;}
2574 { (exit 1); exit 1; }; }
ba4481b5
DL
2575fi
2576
2577machfile="m/${machine}.h"
2578opsysfile="s/${opsys}.h"
2579
c0d27fcc 2580
ba4481b5
DL
2581#### Choose a compiler.
2582test -n "$CC" && cc_specified=yes
2583
2584# Save the value of CFLAGS that the user specified.
2585SPECIFIED_CFLAGS="$CFLAGS"
2586
2587case ${with_gcc} in
2588 "yes" ) CC="gcc" GCC=yes ;;
2589 "no" ) : ${CC=cc} ;;
503d2be0
AS
2590 * )
2591esac
2592ac_ext=c
2593ac_cpp='$CPP $CPPFLAGS'
2594ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2595ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2596ac_compiler_gnu=$ac_cv_c_compiler_gnu
2597if test -n "$ac_tool_prefix"; then
2598 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2599set dummy ${ac_tool_prefix}gcc; ac_word=$2
c0d27fcc 2600echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2601echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2602if test "${ac_cv_prog_CC+set}" = set; then
2603 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2604else
2605 if test -n "$CC"; then
2606 ac_cv_prog_CC="$CC" # Let the user override the test.
2607else
c0d27fcc
MR
2608as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2609for as_dir in $PATH
2610do
2611 IFS=$as_save_IFS
2612 test -z "$as_dir" && as_dir=.
2613 for ac_exec_ext in '' $ac_executable_extensions; do
2614 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2615 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2616 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2617 break 2
2618 fi
2619done
503d2be0
AS
2620done
2621
ba4481b5
DL
2622fi
2623fi
503d2be0 2624CC=$ac_cv_prog_CC
ba4481b5 2625if test -n "$CC"; then
c0d27fcc 2626 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2627echo "${ECHO_T}$CC" >&6
2628else
c0d27fcc 2629 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2630echo "${ECHO_T}no" >&6
2631fi
2632
2633fi
2634if test -z "$ac_cv_prog_CC"; then
2635 ac_ct_CC=$CC
2636 # Extract the first word of "gcc", so it can be a program name with args.
2637set dummy gcc; ac_word=$2
c0d27fcc 2638echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2639echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2640if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2641 echo $ECHO_N "(cached) $ECHO_C" >&6
2642else
2643 if test -n "$ac_ct_CC"; then
2644 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2645else
c0d27fcc
MR
2646as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2647for as_dir in $PATH
2648do
2649 IFS=$as_save_IFS
2650 test -z "$as_dir" && as_dir=.
2651 for ac_exec_ext in '' $ac_executable_extensions; do
2652 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2653 ac_cv_prog_ac_ct_CC="gcc"
2654 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2655 break 2
2656 fi
2657done
503d2be0
AS
2658done
2659
2660fi
2661fi
2662ac_ct_CC=$ac_cv_prog_ac_ct_CC
2663if test -n "$ac_ct_CC"; then
c0d27fcc 2664 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0 2665echo "${ECHO_T}$ac_ct_CC" >&6
ba4481b5 2666else
c0d27fcc 2667 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2668echo "${ECHO_T}no" >&6
2669fi
2670
2671 CC=$ac_ct_CC
2672else
2673 CC="$ac_cv_prog_CC"
ba4481b5
DL
2674fi
2675
2676if test -z "$CC"; then
503d2be0
AS
2677 if test -n "$ac_tool_prefix"; then
2678 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2679set dummy ${ac_tool_prefix}cc; ac_word=$2
c0d27fcc 2680echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2681echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2682if test "${ac_cv_prog_CC+set}" = set; then
2683 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2684else
2685 if test -n "$CC"; then
2686 ac_cv_prog_CC="$CC" # Let the user override the test.
2687else
c0d27fcc
MR
2688as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2689for as_dir in $PATH
2690do
2691 IFS=$as_save_IFS
2692 test -z "$as_dir" && as_dir=.
2693 for ac_exec_ext in '' $ac_executable_extensions; do
2694 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2695 ac_cv_prog_CC="${ac_tool_prefix}cc"
2696 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2697 break 2
2698 fi
2699done
503d2be0
AS
2700done
2701
2702fi
2703fi
2704CC=$ac_cv_prog_CC
2705if test -n "$CC"; then
c0d27fcc 2706 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2707echo "${ECHO_T}$CC" >&6
2708else
c0d27fcc 2709 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2710echo "${ECHO_T}no" >&6
2711fi
2712
2713fi
2714if test -z "$ac_cv_prog_CC"; then
2715 ac_ct_CC=$CC
2716 # Extract the first word of "cc", so it can be a program name with args.
2717set dummy cc; ac_word=$2
c0d27fcc 2718echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2719echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2720if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2721 echo $ECHO_N "(cached) $ECHO_C" >&6
2722else
2723 if test -n "$ac_ct_CC"; then
2724 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2725else
c0d27fcc
MR
2726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2727for as_dir in $PATH
2728do
2729 IFS=$as_save_IFS
2730 test -z "$as_dir" && as_dir=.
2731 for ac_exec_ext in '' $ac_executable_extensions; do
2732 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2733 ac_cv_prog_ac_ct_CC="cc"
2734 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2735 break 2
2736 fi
2737done
503d2be0
AS
2738done
2739
2740fi
2741fi
2742ac_ct_CC=$ac_cv_prog_ac_ct_CC
2743if test -n "$ac_ct_CC"; then
c0d27fcc 2744 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
2745echo "${ECHO_T}$ac_ct_CC" >&6
2746else
c0d27fcc 2747 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2748echo "${ECHO_T}no" >&6
2749fi
2750
2751 CC=$ac_ct_CC
2752else
2753 CC="$ac_cv_prog_CC"
2754fi
2755
2756fi
2757if test -z "$CC"; then
2758 # Extract the first word of "cc", so it can be a program name with args.
2759set dummy cc; ac_word=$2
c0d27fcc 2760echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2761echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2762if test "${ac_cv_prog_CC+set}" = set; then
2763 echo $ECHO_N "(cached) $ECHO_C" >&6
2764else
2765 if test -n "$CC"; then
2766 ac_cv_prog_CC="$CC" # Let the user override the test.
2767else
2768 ac_prog_rejected=no
c0d27fcc
MR
2769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2770for as_dir in $PATH
2771do
2772 IFS=$as_save_IFS
2773 test -z "$as_dir" && as_dir=.
2774 for ac_exec_ext in '' $ac_executable_extensions; do
2775 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2776 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2777 ac_prog_rejected=yes
2778 continue
2779 fi
2780 ac_cv_prog_CC="cc"
2781 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2782 break 2
2783 fi
2784done
503d2be0
AS
2785done
2786
ba4481b5
DL
2787if test $ac_prog_rejected = yes; then
2788 # We found a bogon in the path, so make sure we never use it.
2789 set dummy $ac_cv_prog_CC
2790 shift
503d2be0 2791 if test $# != 0; then
ba4481b5
DL
2792 # We chose a different compiler from the bogus one.
2793 # However, it has the same basename, so the bogon will be chosen
2794 # first if we set CC to just the basename; use the full file name.
2795 shift
6bae0ccf 2796 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
2797 fi
2798fi
2799fi
2800fi
503d2be0 2801CC=$ac_cv_prog_CC
ba4481b5 2802if test -n "$CC"; then
c0d27fcc 2803 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2804echo "${ECHO_T}$CC" >&6
ba4481b5 2805else
c0d27fcc 2806 echo "$as_me:$LINENO: result: no" >&5
503d2be0 2807echo "${ECHO_T}no" >&6
ba4481b5
DL
2808fi
2809
503d2be0
AS
2810fi
2811if test -z "$CC"; then
2812 if test -n "$ac_tool_prefix"; then
2813 for ac_prog in cl
2814 do
2815 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2816set dummy $ac_tool_prefix$ac_prog; ac_word=$2
c0d27fcc 2817echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2818echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2819if test "${ac_cv_prog_CC+set}" = set; then
2820 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2821else
2822 if test -n "$CC"; then
2823 ac_cv_prog_CC="$CC" # Let the user override the test.
2824else
c0d27fcc
MR
2825as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2826for as_dir in $PATH
2827do
2828 IFS=$as_save_IFS
2829 test -z "$as_dir" && as_dir=.
2830 for ac_exec_ext in '' $ac_executable_extensions; do
2831 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2832 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2833 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2834 break 2
2835 fi
2836done
503d2be0
AS
2837done
2838
c4bb2108
DL
2839fi
2840fi
503d2be0 2841CC=$ac_cv_prog_CC
c4bb2108 2842if test -n "$CC"; then
c0d27fcc 2843 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2844echo "${ECHO_T}$CC" >&6
c4bb2108 2845else
c0d27fcc 2846 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2847echo "${ECHO_T}no" >&6
2848fi
2849
2850 test -n "$CC" && break
2851 done
2852fi
2853if test -z "$CC"; then
2854 ac_ct_CC=$CC
2855 for ac_prog in cl
2856do
2857 # Extract the first word of "$ac_prog", so it can be a program name with args.
2858set dummy $ac_prog; ac_word=$2
c0d27fcc 2859echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2860echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2861if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2862 echo $ECHO_N "(cached) $ECHO_C" >&6
2863else
2864 if test -n "$ac_ct_CC"; then
2865 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2866else
c0d27fcc
MR
2867as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2868for as_dir in $PATH
2869do
2870 IFS=$as_save_IFS
2871 test -z "$as_dir" && as_dir=.
2872 for ac_exec_ext in '' $ac_executable_extensions; do
2873 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2874 ac_cv_prog_ac_ct_CC="$ac_prog"
2875 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2876 break 2
2877 fi
2878done
503d2be0
AS
2879done
2880
c4bb2108 2881fi
503d2be0
AS
2882fi
2883ac_ct_CC=$ac_cv_prog_ac_ct_CC
2884if test -n "$ac_ct_CC"; then
c0d27fcc 2885 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
2886echo "${ECHO_T}$ac_ct_CC" >&6
2887else
c0d27fcc 2888 echo "$as_me:$LINENO: result: no" >&5
503d2be0 2889echo "${ECHO_T}no" >&6
ba4481b5
DL
2890fi
2891
503d2be0
AS
2892 test -n "$ac_ct_CC" && break
2893done
ba4481b5 2894
503d2be0
AS
2895 CC=$ac_ct_CC
2896fi
2897
2898fi
ba4481b5 2899
c0d27fcc 2900
cd958eb3
MB
2901test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2902See \`config.log' for more details." >&5
2903echo "$as_me: error: no acceptable C compiler found in \$PATH
2904See \`config.log' for more details." >&2;}
503d2be0 2905 { (exit 1); exit 1; }; }
c4bb2108 2906
503d2be0 2907# Provide some information about the compiler.
c0d27fcc 2908echo "$as_me:$LINENO:" \
503d2be0
AS
2909 "checking for C compiler version" >&5
2910ac_compiler=`set X $ac_compile; echo $2`
c0d27fcc 2911{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
503d2be0
AS
2912 (eval $ac_compiler --version </dev/null >&5) 2>&5
2913 ac_status=$?
c0d27fcc 2914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 2915 (exit $ac_status); }
c0d27fcc 2916{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
503d2be0
AS
2917 (eval $ac_compiler -v </dev/null >&5) 2>&5
2918 ac_status=$?
c0d27fcc 2919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 2920 (exit $ac_status); }
c0d27fcc 2921{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
503d2be0
AS
2922 (eval $ac_compiler -V </dev/null >&5) 2>&5
2923 ac_status=$?
c0d27fcc 2924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
2925 (exit $ac_status); }
2926
2927cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 2928#line $LINENO "configure"
cd958eb3
MB
2929/* confdefs.h. */
2930_ACEOF
2931cat confdefs.h >>conftest.$ac_ext
2932cat >>conftest.$ac_ext <<_ACEOF
2933/* end confdefs.h. */
c4bb2108 2934
503d2be0
AS
2935int
2936main ()
2937{
2938
2939 ;
2940 return 0;
2941}
2942_ACEOF
2943ac_clean_files_save=$ac_clean_files
cd958eb3 2944ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
2945# Try to create an executable without -o first, disregard a.out.
2946# It will help us diagnose broken compilers, and finding out an intuition
2947# of exeext.
c0d27fcc 2948echo "$as_me:$LINENO: checking for C compiler default output" >&5
503d2be0
AS
2949echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2950ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
c0d27fcc 2951if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
503d2be0
AS
2952 (eval $ac_link_default) 2>&5
2953 ac_status=$?
c0d27fcc 2954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
2955 (exit $ac_status); }; then
2956 # Find the output, starting from the most likely. This scheme is
2957# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2958# resort.
c0d27fcc
MR
2959
2960# Be careful to initialize this variable, since it used to be cached.
2961# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2962ac_cv_exeext=
cd958eb3
MB
2963# b.out is created by i960 compilers.
2964for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2965do
6bae0ccf 2966 test -f "$ac_file" || continue
503d2be0 2967 case $ac_file in
cd958eb3
MB
2968 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2969 ;;
2970 conftest.$ac_ext )
2971 # This is the source file.
2972 ;;
2973 [ab].out )
2974 # We found the default executable, but exeext='' is most
2975 # certainly right.
2976 break;;
2977 *.* )
2978 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2979 # FIXME: I believe we export ac_cv_exeext for Libtool,
2980 # but it would be cool to find out if it's true. Does anybody
2981 # maintain Libtool? --akim.
2982 export ac_cv_exeext
2983 break;;
2984 * )
2985 break;;
503d2be0
AS
2986 esac
2987done
2988else
2989 echo "$as_me: failed program was:" >&5
cd958eb3
MB
2990sed 's/^/| /' conftest.$ac_ext >&5
2991
6bae0ccf 2992{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
cd958eb3 2993See \`config.log' for more details." >&5
6bae0ccf 2994echo "$as_me: error: C compiler cannot create executables
cd958eb3 2995See \`config.log' for more details." >&2;}
503d2be0
AS
2996 { (exit 77); exit 77; }; }
2997fi
2998
2999ac_exeext=$ac_cv_exeext
c0d27fcc 3000echo "$as_me:$LINENO: result: $ac_file" >&5
503d2be0
AS
3001echo "${ECHO_T}$ac_file" >&6
3002
3003# Check the compiler produces executables we can run. If not, either
3004# the compiler is broken, or we cross compile.
c0d27fcc 3005echo "$as_me:$LINENO: checking whether the C compiler works" >&5
503d2be0
AS
3006echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
3007# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3008# If not cross compiling, check that we can run a simple program.
3009if test "$cross_compiling" != yes; then
3010 if { ac_try='./$ac_file'
c0d27fcc 3011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3012 (eval $ac_try) 2>&5
3013 ac_status=$?
c0d27fcc 3014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3015 (exit $ac_status); }; }; then
3016 cross_compiling=no
ba4481b5 3017 else
503d2be0
AS
3018 if test "$cross_compiling" = maybe; then
3019 cross_compiling=yes
3020 else
c0d27fcc 3021 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
cd958eb3
MB
3022If you meant to cross compile, use \`--host'.
3023See \`config.log' for more details." >&5
503d2be0 3024echo "$as_me: error: cannot run C compiled programs.
cd958eb3
MB
3025If you meant to cross compile, use \`--host'.
3026See \`config.log' for more details." >&2;}
503d2be0
AS
3027 { (exit 1); exit 1; }; }
3028 fi
ba4481b5 3029 fi
503d2be0 3030fi
c0d27fcc 3031echo "$as_me:$LINENO: result: yes" >&5
503d2be0
AS
3032echo "${ECHO_T}yes" >&6
3033
cd958eb3 3034rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0
AS
3035ac_clean_files=$ac_clean_files_save
3036# Check the compiler produces executables we can run. If not, either
3037# the compiler is broken, or we cross compile.
c0d27fcc 3038echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
503d2be0 3039echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
c0d27fcc 3040echo "$as_me:$LINENO: result: $cross_compiling" >&5
503d2be0
AS
3041echo "${ECHO_T}$cross_compiling" >&6
3042
c0d27fcc
MR
3043echo "$as_me:$LINENO: checking for suffix of executables" >&5
3044echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
3045if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
3046 (eval $ac_link) 2>&5
3047 ac_status=$?
c0d27fcc 3048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3049 (exit $ac_status); }; then
3050 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3051# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3052# work properly (i.e., refer to `conftest.exe'), while it won't with
3053# `rm'.
6bae0ccf
DL
3054for ac_file in conftest.exe conftest conftest.*; do
3055 test -f "$ac_file" || continue
503d2be0 3056 case $ac_file in
6bae0ccf 3057 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
503d2be0
AS
3058 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3059 export ac_cv_exeext
3060 break;;
3061 * ) break;;
3062 esac
3063done
ba4481b5 3064else
cd958eb3
MB
3065 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3066See \`config.log' for more details." >&5
3067echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3068See \`config.log' for more details." >&2;}
503d2be0 3069 { (exit 1); exit 1; }; }
ba4481b5 3070fi
ba4481b5 3071
503d2be0 3072rm -f conftest$ac_cv_exeext
c0d27fcc 3073echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
503d2be0 3074echo "${ECHO_T}$ac_cv_exeext" >&6
ba4481b5 3075
503d2be0
AS
3076rm -f conftest.$ac_ext
3077EXEEXT=$ac_cv_exeext
3078ac_exeext=$EXEEXT
c0d27fcc
MR
3079echo "$as_me:$LINENO: checking for suffix of object files" >&5
3080echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
503d2be0
AS
3081if test "${ac_cv_objext+set}" = set; then
3082 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3083else
503d2be0 3084 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3085#line $LINENO "configure"
cd958eb3
MB
3086/* confdefs.h. */
3087_ACEOF
3088cat confdefs.h >>conftest.$ac_ext
3089cat >>conftest.$ac_ext <<_ACEOF
3090/* end confdefs.h. */
ba4481b5 3091
503d2be0
AS
3092int
3093main ()
3094{
ba4481b5 3095
503d2be0
AS
3096 ;
3097 return 0;
3098}
3099_ACEOF
3100rm -f conftest.o conftest.obj
c0d27fcc 3101if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3102 (eval $ac_compile) 2>&5
3103 ac_status=$?
c0d27fcc 3104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3105 (exit $ac_status); }; then
3106 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
3107 case $ac_file in
6bae0ccf 3108 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
503d2be0
AS
3109 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3110 break;;
3111 esac
3112done
c4bb2108 3113else
503d2be0 3114 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3115sed 's/^/| /' conftest.$ac_ext >&5
3116
3117{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3118See \`config.log' for more details." >&5
3119echo "$as_me: error: cannot compute suffix of object files: cannot compile
3120See \`config.log' for more details." >&2;}
503d2be0 3121 { (exit 1); exit 1; }; }
c4bb2108
DL
3122fi
3123
503d2be0
AS
3124rm -f conftest.$ac_cv_objext conftest.$ac_ext
3125fi
c0d27fcc 3126echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
503d2be0
AS
3127echo "${ECHO_T}$ac_cv_objext" >&6
3128OBJEXT=$ac_cv_objext
3129ac_objext=$OBJEXT
c0d27fcc 3130echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
503d2be0
AS
3131echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
3132if test "${ac_cv_c_compiler_gnu+set}" = set; then
3133 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3134else
503d2be0 3135 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3136#line $LINENO "configure"
cd958eb3
MB
3137/* confdefs.h. */
3138_ACEOF
3139cat confdefs.h >>conftest.$ac_ext
3140cat >>conftest.$ac_ext <<_ACEOF
3141/* end confdefs.h. */
503d2be0
AS
3142
3143int
3144main ()
3145{
3146#ifndef __GNUC__
3147 choke me
3148#endif
3149
3150 ;
3151 return 0;
3152}
3153_ACEOF
3154rm -f conftest.$ac_objext
c0d27fcc 3155if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3156 (eval $ac_compile) 2>&5
3157 ac_status=$?
c0d27fcc 3158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3159 (exit $ac_status); } &&
3160 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3162 (eval $ac_try) 2>&5
3163 ac_status=$?
c0d27fcc 3164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3165 (exit $ac_status); }; }; then
3166 ac_compiler_gnu=yes
3167else
3168 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3169sed 's/^/| /' conftest.$ac_ext >&5
3170
503d2be0
AS
3171ac_compiler_gnu=no
3172fi
3173rm -f conftest.$ac_objext conftest.$ac_ext
3174ac_cv_c_compiler_gnu=$ac_compiler_gnu
3175
3176fi
c0d27fcc 3177echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
503d2be0
AS
3178echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
3179GCC=`test $ac_compiler_gnu = yes && echo yes`
3180ac_test_CFLAGS=${CFLAGS+set}
3181ac_save_CFLAGS=$CFLAGS
3182CFLAGS="-g"
c0d27fcc 3183echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
503d2be0
AS
3184echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
3185if test "${ac_cv_prog_cc_g+set}" = set; then
3186 echo $ECHO_N "(cached) $ECHO_C" >&6
3187else
3188 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3189#line $LINENO "configure"
cd958eb3
MB
3190/* confdefs.h. */
3191_ACEOF
3192cat confdefs.h >>conftest.$ac_ext
3193cat >>conftest.$ac_ext <<_ACEOF
3194/* end confdefs.h. */
503d2be0
AS
3195
3196int
3197main ()
3198{
3199
3200 ;
3201 return 0;
3202}
3203_ACEOF
3204rm -f conftest.$ac_objext
c0d27fcc 3205if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3206 (eval $ac_compile) 2>&5
3207 ac_status=$?
c0d27fcc 3208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3209 (exit $ac_status); } &&
3210 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3212 (eval $ac_try) 2>&5
3213 ac_status=$?
c0d27fcc 3214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3215 (exit $ac_status); }; }; then
ba4481b5
DL
3216 ac_cv_prog_cc_g=yes
3217else
503d2be0 3218 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3219sed 's/^/| /' conftest.$ac_ext >&5
3220
503d2be0 3221ac_cv_prog_cc_g=no
ba4481b5 3222fi
503d2be0 3223rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 3224fi
c0d27fcc 3225echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
503d2be0 3226echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c4bb2108 3227if test "$ac_test_CFLAGS" = set; then
503d2be0 3228 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
3229elif test $ac_cv_prog_cc_g = yes; then
3230 if test "$GCC" = yes; then
ba4481b5
DL
3231 CFLAGS="-g -O2"
3232 else
c4bb2108 3233 CFLAGS="-g"
ba4481b5 3234 fi
22afa6e8 3235else
c4bb2108
DL
3236 if test "$GCC" = yes; then
3237 CFLAGS="-O2"
3238 else
3239 CFLAGS=
3240 fi
ba4481b5 3241fi
6bae0ccf
DL
3242echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
3243echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3244if test "${ac_cv_prog_cc_stdc+set}" = set; then
3245 echo $ECHO_N "(cached) $ECHO_C" >&6
3246else
3247 ac_cv_prog_cc_stdc=no
3248ac_save_CC=$CC
3249cat >conftest.$ac_ext <<_ACEOF
3250#line $LINENO "configure"
cd958eb3
MB
3251/* confdefs.h. */
3252_ACEOF
3253cat confdefs.h >>conftest.$ac_ext
3254cat >>conftest.$ac_ext <<_ACEOF
3255/* end confdefs.h. */
6bae0ccf
DL
3256#include <stdarg.h>
3257#include <stdio.h>
3258#include <sys/types.h>
3259#include <sys/stat.h>
3260/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3261struct buf { int x; };
3262FILE * (*rcsopen) (struct buf *, struct stat *, int);
3263static char *e (p, i)
3264 char **p;
3265 int i;
3266{
3267 return p[i];
3268}
3269static char *f (char * (*g) (char **, int), char **p, ...)
3270{
3271 char *s;
3272 va_list v;
3273 va_start (v,p);
3274 s = g (p, va_arg (v,int));
3275 va_end (v);
3276 return s;
3277}
3278int test (int i, double x);
3279struct s1 {int (*f) (int a);};
3280struct s2 {int (*f) (double a);};
3281int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3282int argc;
3283char **argv;
3284int
3285main ()
3286{
3287return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3288 ;
3289 return 0;
3290}
3291_ACEOF
3292# Don't try gcc -ansi; that turns off useful extensions and
3293# breaks some systems' header files.
3294# AIX -qlanglvl=ansi
3295# Ultrix and OSF/1 -std1
3296# HP-UX 10.20 and later -Ae
3297# HP-UX older versions -Aa -D_HPUX_SOURCE
3298# SVR4 -Xc -D__EXTENSIONS__
3299for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3300do
3301 CC="$ac_save_CC $ac_arg"
3302 rm -f conftest.$ac_objext
3303if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3304 (eval $ac_compile) 2>&5
3305 ac_status=$?
3306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3307 (exit $ac_status); } &&
3308 { ac_try='test -s conftest.$ac_objext'
3309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3310 (eval $ac_try) 2>&5
3311 ac_status=$?
3312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3313 (exit $ac_status); }; }; then
3314 ac_cv_prog_cc_stdc=$ac_arg
3315break
3316else
3317 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3318sed 's/^/| /' conftest.$ac_ext >&5
3319
6bae0ccf
DL
3320fi
3321rm -f conftest.$ac_objext
3322done
3323rm -f conftest.$ac_ext conftest.$ac_objext
3324CC=$ac_save_CC
3325
3326fi
3327
3328case "x$ac_cv_prog_cc_stdc" in
3329 x|xno)
3330 echo "$as_me:$LINENO: result: none needed" >&5
3331echo "${ECHO_T}none needed" >&6 ;;
3332 *)
3333 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
3334echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3335 CC="$CC $ac_cv_prog_cc_stdc" ;;
3336esac
3337
503d2be0
AS
3338# Some people use a C++ compiler to compile C. Since we use `exit',
3339# in C++ we need to declare it. In case someone uses the same compiler
3340# for both compiling C and C++ we need to have the C++ compiler decide
3341# the declaration of exit, since it's the most demanding environment.
3342cat >conftest.$ac_ext <<_ACEOF
3343#ifndef __cplusplus
3344 choke me
3345#endif
3346_ACEOF
3347rm -f conftest.$ac_objext
c0d27fcc 3348if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3349 (eval $ac_compile) 2>&5
3350 ac_status=$?
c0d27fcc 3351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3352 (exit $ac_status); } &&
3353 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3355 (eval $ac_try) 2>&5
3356 ac_status=$?
c0d27fcc 3357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3358 (exit $ac_status); }; }; then
3359 for ac_declaration in \
3360 ''\
3361 '#include <stdlib.h>' \
3362 'extern "C" void std::exit (int) throw (); using std::exit;' \
3363 'extern "C" void std::exit (int); using std::exit;' \
3364 'extern "C" void exit (int) throw ();' \
3365 'extern "C" void exit (int);' \
3366 'void exit (int);'
3367do
3368 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3369#line $LINENO "configure"
cd958eb3
MB
3370/* confdefs.h. */
3371_ACEOF
3372cat confdefs.h >>conftest.$ac_ext
3373cat >>conftest.$ac_ext <<_ACEOF
3374/* end confdefs.h. */
503d2be0
AS
3375#include <stdlib.h>
3376$ac_declaration
3377int
3378main ()
3379{
3380exit (42);
3381 ;
3382 return 0;
3383}
3384_ACEOF
3385rm -f conftest.$ac_objext
c0d27fcc 3386if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3387 (eval $ac_compile) 2>&5
3388 ac_status=$?
c0d27fcc 3389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3390 (exit $ac_status); } &&
3391 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3393 (eval $ac_try) 2>&5
3394 ac_status=$?
c0d27fcc 3395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3396 (exit $ac_status); }; }; then
3397 :
3398else
3399 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3400sed 's/^/| /' conftest.$ac_ext >&5
3401
503d2be0
AS
3402continue
3403fi
3404rm -f conftest.$ac_objext conftest.$ac_ext
3405 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3406#line $LINENO "configure"
cd958eb3
MB
3407/* confdefs.h. */
3408_ACEOF
3409cat confdefs.h >>conftest.$ac_ext
3410cat >>conftest.$ac_ext <<_ACEOF
3411/* end confdefs.h. */
503d2be0
AS
3412$ac_declaration
3413int
3414main ()
3415{
3416exit (42);
3417 ;
3418 return 0;
3419}
3420_ACEOF
3421rm -f conftest.$ac_objext
c0d27fcc 3422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3423 (eval $ac_compile) 2>&5
3424 ac_status=$?
c0d27fcc 3425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3426 (exit $ac_status); } &&
3427 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3429 (eval $ac_try) 2>&5
3430 ac_status=$?
c0d27fcc 3431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3432 (exit $ac_status); }; }; then
3433 break
3434else
3435 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3436sed 's/^/| /' conftest.$ac_ext >&5
3437
503d2be0
AS
3438fi
3439rm -f conftest.$ac_objext conftest.$ac_ext
3440done
3441rm -f conftest*
3442if test -n "$ac_declaration"; then
3443 echo '#ifdef __cplusplus' >>confdefs.h
3444 echo $ac_declaration >>confdefs.h
3445 echo '#endif' >>confdefs.h
3446fi
ba4481b5 3447
503d2be0
AS
3448else
3449 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3450sed 's/^/| /' conftest.$ac_ext >&5
3451
503d2be0
AS
3452fi
3453rm -f conftest.$ac_objext conftest.$ac_ext
3454ac_ext=c
3455ac_cpp='$CPP $CPPFLAGS'
3456ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3457ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3458ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3459
c0d27fcc 3460
ba4481b5
DL
3461# On Suns, sometimes $CPP names a directory.
3462if test -n "$CPP" && test -d "$CPP"; then
3463 CPP=
3464fi
3465
3466#### Some systems specify a CPP to use unless we are using GCC.
3467#### Now that we know whether we are using GCC, we can decide whether
3468#### to use that one.
3469if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3470then
3471 CPP="$NON_GNU_CPP"
3472fi
3473
3474#### Some systems specify a CC to use unless we are using GCC.
3475#### Now that we know whether we are using GCC, we can decide whether
3476#### to use that one.
3477if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3478 test x$cc_specified != xyes
3479then
3480 CC="$NON_GNU_CC"
3481fi
3482
3483if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3484then
3485 CC="$CC $GCC_TEST_OPTIONS"
3486fi
3487
3488if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3489then
3490 CC="$CC $NON_GCC_TEST_OPTIONS"
3491fi
3492
6a3a24fa 3493#### Some other nice autoconf tests.
ba4481b5 3494
c0d27fcc 3495echo "$as_me:$LINENO: checking whether ln -s works" >&5
503d2be0
AS
3496echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3497LN_S=$as_ln_s
3498if test "$LN_S" = "ln -s"; then
c0d27fcc 3499 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 3500echo "${ECHO_T}yes" >&6
ba4481b5 3501else
c0d27fcc 3502 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
503d2be0 3503echo "${ECHO_T}no, using $LN_S" >&6
ba4481b5
DL
3504fi
3505
503d2be0
AS
3506ac_ext=c
3507ac_cpp='$CPP $CPPFLAGS'
3508ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3509ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3510ac_compiler_gnu=$ac_cv_c_compiler_gnu
c0d27fcc 3511echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
503d2be0 3512echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
ba4481b5
DL
3513# On Suns, sometimes $CPP names a directory.
3514if test -n "$CPP" && test -d "$CPP"; then
3515 CPP=
3516fi
3517if test -z "$CPP"; then
503d2be0
AS
3518 if test "${ac_cv_prog_CPP+set}" = set; then
3519 echo $ECHO_N "(cached) $ECHO_C" >&6
3520else
3521 # Double quotes because CPP needs to be expanded
3522 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3523 do
3524 ac_preproc_ok=false
3525for ac_c_preproc_warn_flag in '' yes
3526do
3527 # Use a header file that comes with gcc, so configuring glibc
3528 # with a fresh cross-compiler works.
9e71690e
DK
3529 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3530 # <limits.h> exists even on freestanding compilers.
ba4481b5 3531 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
3532 # not just through cpp. "Syntax error" is here to catch this case.
3533 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3534#line $LINENO "configure"
cd958eb3
MB
3535/* confdefs.h. */
3536_ACEOF
3537cat confdefs.h >>conftest.$ac_ext
3538cat >>conftest.$ac_ext <<_ACEOF
3539/* end confdefs.h. */
9e71690e
DK
3540#ifdef __STDC__
3541# include <limits.h>
3542#else
3543# include <assert.h>
3544#endif
503d2be0
AS
3545 Syntax error
3546_ACEOF
c0d27fcc 3547if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3548 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3549 ac_status=$?
6bae0ccf 3550 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3551 rm -f conftest.er1
3552 cat conftest.err >&5
c0d27fcc 3553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3554 (exit $ac_status); } >/dev/null; then
3555 if test -s conftest.err; then
3556 ac_cpp_err=$ac_c_preproc_warn_flag
3557 else
3558 ac_cpp_err=
3559 fi
3560else
3561 ac_cpp_err=yes
3562fi
3563if test -z "$ac_cpp_err"; then
ba4481b5
DL
3564 :
3565else
503d2be0 3566 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3567sed 's/^/| /' conftest.$ac_ext >&5
3568
503d2be0
AS
3569 # Broken: fails on valid input.
3570continue
3571fi
3572rm -f conftest.err conftest.$ac_ext
3573
3574 # OK, works on sane cases. Now check whether non-existent headers
3575 # can be detected and how.
3576 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3577#line $LINENO "configure"
cd958eb3
MB
3578/* confdefs.h. */
3579_ACEOF
3580cat confdefs.h >>conftest.$ac_ext
3581cat >>conftest.$ac_ext <<_ACEOF
3582/* end confdefs.h. */
503d2be0
AS
3583#include <ac_nonexistent.h>
3584_ACEOF
c0d27fcc 3585if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3586 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3587 ac_status=$?
6bae0ccf 3588 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3589 rm -f conftest.er1
3590 cat conftest.err >&5
c0d27fcc 3591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3592 (exit $ac_status); } >/dev/null; then
3593 if test -s conftest.err; then
3594 ac_cpp_err=$ac_c_preproc_warn_flag
3595 else
3596 ac_cpp_err=
3597 fi
3598else
3599 ac_cpp_err=yes
3600fi
3601if test -z "$ac_cpp_err"; then
3602 # Broken: success on invalid input.
3603continue
c4bb2108 3604else
503d2be0 3605 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3606sed 's/^/| /' conftest.$ac_ext >&5
3607
503d2be0
AS
3608 # Passes both tests.
3609ac_preproc_ok=:
3610break
3611fi
3612rm -f conftest.err conftest.$ac_ext
3613
3614done
3615# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3616rm -f conftest.err conftest.$ac_ext
3617if $ac_preproc_ok; then
3618 break
3619fi
3620
3621 done
3622 ac_cv_prog_CPP=$CPP
3623
3624fi
3625 CPP=$ac_cv_prog_CPP
3626else
3627 ac_cv_prog_CPP=$CPP
3628fi
c0d27fcc 3629echo "$as_me:$LINENO: result: $CPP" >&5
503d2be0
AS
3630echo "${ECHO_T}$CPP" >&6
3631ac_preproc_ok=false
3632for ac_c_preproc_warn_flag in '' yes
3633do
3634 # Use a header file that comes with gcc, so configuring glibc
3635 # with a fresh cross-compiler works.
9e71690e
DK
3636 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3637 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
3638 # On the NeXT, cc -E runs the code through the compiler's parser,
3639 # not just through cpp. "Syntax error" is here to catch this case.
3640 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3641#line $LINENO "configure"
cd958eb3
MB
3642/* confdefs.h. */
3643_ACEOF
3644cat confdefs.h >>conftest.$ac_ext
3645cat >>conftest.$ac_ext <<_ACEOF
3646/* end confdefs.h. */
9e71690e
DK
3647#ifdef __STDC__
3648# include <limits.h>
3649#else
3650# include <assert.h>
3651#endif
503d2be0
AS
3652 Syntax error
3653_ACEOF
c0d27fcc 3654if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3655 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3656 ac_status=$?
6bae0ccf 3657 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3658 rm -f conftest.er1
3659 cat conftest.err >&5
c0d27fcc 3660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3661 (exit $ac_status); } >/dev/null; then
3662 if test -s conftest.err; then
3663 ac_cpp_err=$ac_c_preproc_warn_flag
3664 else
3665 ac_cpp_err=
3666 fi
3667else
3668 ac_cpp_err=yes
3669fi
3670if test -z "$ac_cpp_err"; then
ba4481b5
DL
3671 :
3672else
503d2be0 3673 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3674sed 's/^/| /' conftest.$ac_ext >&5
3675
503d2be0
AS
3676 # Broken: fails on valid input.
3677continue
3678fi
3679rm -f conftest.err conftest.$ac_ext
3680
3681 # OK, works on sane cases. Now check whether non-existent headers
3682 # can be detected and how.
3683 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3684#line $LINENO "configure"
cd958eb3
MB
3685/* confdefs.h. */
3686_ACEOF
3687cat confdefs.h >>conftest.$ac_ext
3688cat >>conftest.$ac_ext <<_ACEOF
3689/* end confdefs.h. */
503d2be0
AS
3690#include <ac_nonexistent.h>
3691_ACEOF
c0d27fcc 3692if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3693 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3694 ac_status=$?
6bae0ccf 3695 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3696 rm -f conftest.er1
3697 cat conftest.err >&5
c0d27fcc 3698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3699 (exit $ac_status); } >/dev/null; then
3700 if test -s conftest.err; then
3701 ac_cpp_err=$ac_c_preproc_warn_flag
3702 else
3703 ac_cpp_err=
3704 fi
3705else
3706 ac_cpp_err=yes
c4bb2108 3707fi
503d2be0
AS
3708if test -z "$ac_cpp_err"; then
3709 # Broken: success on invalid input.
3710continue
3711else
3712 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3713sed 's/^/| /' conftest.$ac_ext >&5
3714
503d2be0
AS
3715 # Passes both tests.
3716ac_preproc_ok=:
3717break
ba4481b5 3718fi
503d2be0
AS
3719rm -f conftest.err conftest.$ac_ext
3720
3721done
3722# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3723rm -f conftest.err conftest.$ac_ext
3724if $ac_preproc_ok; then
3725 :
ba4481b5 3726else
cd958eb3
MB
3727 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3728See \`config.log' for more details." >&5
3729echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3730See \`config.log' for more details." >&2;}
503d2be0 3731 { (exit 1); exit 1; }; }
ba4481b5 3732fi
503d2be0
AS
3733
3734ac_ext=c
3735ac_cpp='$CPP $CPPFLAGS'
3736ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3737ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3738ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
3739
3740# Find a good install program. We prefer a C program (faster),
3741# so one script is as good as another. But avoid the broken or
3742# incompatible versions:
3743# SysV /etc/install, /usr/sbin/install
3744# SunOS /usr/etc/install
3745# IRIX /sbin/install
3746# AIX /bin/install
503d2be0 3747# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 3748# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
3749# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3750# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3751# ./install, which can be erroneously created by make from ./install.sh.
c0d27fcc
MR
3752echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3753echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
ba4481b5 3754if test -z "$INSTALL"; then
503d2be0
AS
3755if test "${ac_cv_path_install+set}" = set; then
3756 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3757else
c0d27fcc
MR
3758 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3759for as_dir in $PATH
3760do
3761 IFS=$as_save_IFS
3762 test -z "$as_dir" && as_dir=.
3763 # Account for people who put trailing slashes in PATH elements.
3764case $as_dir/ in
3765 ./ | .// | /cC/* | \
3766 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3767 /usr/ucb/* ) ;;
3768 *)
3769 # OSF1 and SCO ODT 3.0 have their own names for install.
3770 # Don't use installbsd from OSF since it installs stuff as root
3771 # by default.
3772 for ac_prog in ginstall scoinst install; do
3773 for ac_exec_ext in '' $ac_executable_extensions; do
3774 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3775 if test $ac_prog = install &&
3776 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3777 # AIX install. It has an incompatible calling convention.
3778 :
3779 elif test $ac_prog = install &&
3780 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3781 # program-specific install script used by HP pwplus--don't use.
3782 :
3783 else
3784 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3785 break 3
3786 fi
3787 fi
ba4481b5 3788 done
c0d27fcc
MR
3789 done
3790 ;;
3791esac
3792done
3793
ba4481b5
DL
3794
3795fi
3796 if test "${ac_cv_path_install+set}" = set; then
503d2be0 3797 INSTALL=$ac_cv_path_install
ba4481b5
DL
3798 else
3799 # As a last resort, use the slow shell script. We don't cache a
3800 # path for INSTALL within a source directory, because that will
3801 # break other packages using the cache if that directory is
3802 # removed, or if the path is relative.
503d2be0 3803 INSTALL=$ac_install_sh
ba4481b5
DL
3804 fi
3805fi
c0d27fcc 3806echo "$as_me:$LINENO: result: $INSTALL" >&5
503d2be0 3807echo "${ECHO_T}$INSTALL" >&6
ba4481b5
DL
3808
3809# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3810# It thinks the first close brace ends the variable substitution.
3811test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3812
503d2be0 3813test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 3814
ba4481b5
DL
3815test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3816
c0d27fcc
MR
3817if test "x$RANLIB" = x; then
3818 if test -n "$ac_tool_prefix"; then
3819 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3820set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3821echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0 3822echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
c0d27fcc 3823if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 3824 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
3825else
3826 if test -n "$RANLIB"; then
3827 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3828else
c0d27fcc
MR
3829as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3830for as_dir in $PATH
3831do
3832 IFS=$as_save_IFS
3833 test -z "$as_dir" && as_dir=.
3834 for ac_exec_ext in '' $ac_executable_extensions; do
3835 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3836 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3837 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3838 break 2
3839 fi
3840done
503d2be0
AS
3841done
3842
7397acc4
DL
3843fi
3844fi
503d2be0 3845RANLIB=$ac_cv_prog_RANLIB
7397acc4 3846if test -n "$RANLIB"; then
c0d27fcc 3847 echo "$as_me:$LINENO: result: $RANLIB" >&5
503d2be0
AS
3848echo "${ECHO_T}$RANLIB" >&6
3849else
c0d27fcc 3850 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
3851echo "${ECHO_T}no" >&6
3852fi
3853
3854fi
3855if test -z "$ac_cv_prog_RANLIB"; then
3856 ac_ct_RANLIB=$RANLIB
3857 # Extract the first word of "ranlib", so it can be a program name with args.
3858set dummy ranlib; ac_word=$2
c0d27fcc 3859echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
3860echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3861if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3862 echo $ECHO_N "(cached) $ECHO_C" >&6
3863else
3864 if test -n "$ac_ct_RANLIB"; then
3865 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3866else
c0d27fcc
MR
3867as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3868for as_dir in $PATH
3869do
3870 IFS=$as_save_IFS
3871 test -z "$as_dir" && as_dir=.
3872 for ac_exec_ext in '' $ac_executable_extensions; do
3873 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3874 ac_cv_prog_ac_ct_RANLIB="ranlib"
3875 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3876 break 2
3877 fi
3878done
503d2be0
AS
3879done
3880
3881 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3882fi
3883fi
3884ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3885if test -n "$ac_ct_RANLIB"; then
c0d27fcc 3886 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
503d2be0
AS
3887echo "${ECHO_T}$ac_ct_RANLIB" >&6
3888else
c0d27fcc 3889 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
3890echo "${ECHO_T}no" >&6
3891fi
3892
3893 RANLIB=$ac_ct_RANLIB
7397acc4 3894else
503d2be0 3895 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
3896fi
3897
3898fi
9e71690e
DK
3899# Extract the first word of "install-info", so it can be a program name with args.
3900set dummy install-info; ac_word=$2
3901echo "$as_me:$LINENO: checking for $ac_word" >&5
3902echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3903if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
3904 echo $ECHO_N "(cached) $ECHO_C" >&6
3905else
3906 case $INSTALL_INFO in
3907 [\\/]* | ?:[\\/]*)
3908 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
3909 ;;
3910 *)
3911 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3912for as_dir in $PATH
3913do
3914 IFS=$as_save_IFS
3915 test -z "$as_dir" && as_dir=.
3916 for ac_exec_ext in '' $ac_executable_extensions; do
3917 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3918 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
3919 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3920 break 2
3921 fi
3922done
3923done
3924
3925 ;;
3926esac
3927fi
3928INSTALL_INFO=$ac_cv_path_INSTALL_INFO
3929
3930if test -n "$INSTALL_INFO"; then
3931 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
3932echo "${ECHO_T}$INSTALL_INFO" >&6
3933else
3934 echo "$as_me:$LINENO: result: no" >&5
3935echo "${ECHO_T}no" >&6
3936fi
3937
3938# Extract the first word of "install-info", so it can be a program name with args.
3939set dummy install-info; ac_word=$2
3940echo "$as_me:$LINENO: checking for $ac_word" >&5
3941echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3942if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
3943 echo $ECHO_N "(cached) $ECHO_C" >&6
3944else
3945 case $INSTALL_INFO in
3946 [\\/]* | ?:[\\/]*)
3947 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
3948 ;;
3949 *)
3950 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3951for as_dir in /usr/sbin
3952do
3953 IFS=$as_save_IFS
3954 test -z "$as_dir" && as_dir=.
3955 for ac_exec_ext in '' $ac_executable_extensions; do
3956 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3957 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
3958 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3959 break 2
3960 fi
3961done
3962done
3963
3964 ;;
3965esac
3966fi
3967INSTALL_INFO=$ac_cv_path_INSTALL_INFO
3968
3969if test -n "$INSTALL_INFO"; then
3970 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
3971echo "${ECHO_T}$INSTALL_INFO" >&6
3972else
3973 echo "$as_me:$LINENO: result: no" >&5
3974echo "${ECHO_T}no" >&6
3975fi
3976
3977# Extract the first word of "install-info", so it can be a program name with args.
3978set dummy install-info; ac_word=$2
3979echo "$as_me:$LINENO: checking for $ac_word" >&5
3980echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3981if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
3982 echo $ECHO_N "(cached) $ECHO_C" >&6
3983else
3984 case $INSTALL_INFO in
3985 [\\/]* | ?:[\\/]*)
3986 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
3987 ;;
3988 *)
3989 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3990for as_dir in /sbin
3991do
3992 IFS=$as_save_IFS
3993 test -z "$as_dir" && as_dir=.
3994 for ac_exec_ext in '' $ac_executable_extensions; do
3995 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3996 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
3997 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3998 break 2
3999 fi
4000done
4001done
4002
4003 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
4004 ;;
4005esac
4006fi
4007INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4008
4009if test -n "$INSTALL_INFO"; then
4010 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4011echo "${ECHO_T}$INSTALL_INFO" >&6
4012else
4013 echo "$as_me:$LINENO: result: no" >&5
4014echo "${ECHO_T}no" >&6
4015fi
4016
ba4481b5 4017
c0d27fcc 4018
8e967cf7
MR
4019if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
4020then
4021 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
4022fi
4023
4024if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
4025then
4026 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
4027fi
4028
c0d27fcc
MR
4029
4030
6bae0ccf
DL
4031echo "$as_me:$LINENO: checking for egrep" >&5
4032echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4033if test "${ac_cv_prog_egrep+set}" = set; then
4034 echo $ECHO_N "(cached) $ECHO_C" >&6
4035else
4036 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4037 then ac_cv_prog_egrep='grep -E'
4038 else ac_cv_prog_egrep='egrep'
4039 fi
4040fi
4041echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4042echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4043 EGREP=$ac_cv_prog_egrep
4044
4045
c0d27fcc
MR
4046
4047echo "$as_me:$LINENO: checking for AIX" >&5
503d2be0
AS
4048echo $ECHO_N "checking for AIX... $ECHO_C" >&6
4049cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 4050#line $LINENO "configure"
cd958eb3
MB
4051/* confdefs.h. */
4052_ACEOF
4053cat confdefs.h >>conftest.$ac_ext
4054cat >>conftest.$ac_ext <<_ACEOF
4055/* end confdefs.h. */
ba4481b5
DL
4056#ifdef _AIX
4057 yes
4058#endif
4059
503d2be0 4060_ACEOF
ba4481b5 4061if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4062 $EGREP "yes" >/dev/null 2>&1; then
c0d27fcc 4063 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 4064echo "${ECHO_T}yes" >&6
c0d27fcc 4065cat >>confdefs.h <<\_ACEOF
ba4481b5 4066#define _ALL_SOURCE 1
c0d27fcc 4067_ACEOF
ba4481b5
DL
4068
4069else
c0d27fcc 4070 echo "$as_me:$LINENO: result: no" >&5
503d2be0 4071echo "${ECHO_T}no" >&6
ba4481b5
DL
4072fi
4073rm -f conftest*
4074
c0d27fcc
MR
4075
4076
3b33a005
DL
4077#### Extract some information from the operating system and machine files.
4078
c0d27fcc 4079{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 4080 - which libraries the lib-src programs will want, and
503d2be0
AS
4081 - whether the GNU malloc routines are usable..." >&5
4082echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 4083 - which libraries the lib-src programs will want, and
503d2be0 4084 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
4085
4086### First figure out CFLAGS (which we use for running the compiler here)
4087### and REAL_CFLAGS (which we use for real compilation).
4088### The two are the same except on a few systems, where they are made
4089### different to work around various lossages. For example,
4090### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
4091### as implying static linking.
4092
4093### If the CFLAGS env var is specified, we use that value
4094### instead of the default.
4095
4096### It's not important that this name contain the PID; you can't run
4097### two configures in the same directory and have anything work
4098### anyway.
4099tempcname="conftest.c"
4100
4101echo '
4102#include "'${srcdir}'/src/'${opsysfile}'"
4103#include "'${srcdir}'/src/'${machfile}'"
4104#ifndef LIBS_MACHINE
4105#define LIBS_MACHINE
4106#endif
4107#ifndef LIBS_SYSTEM
4108#define LIBS_SYSTEM
4109#endif
4110#ifndef C_SWITCH_SYSTEM
4111#define C_SWITCH_SYSTEM
4112#endif
4113#ifndef C_SWITCH_MACHINE
4114#define C_SWITCH_MACHINE
4115#endif
4116configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
4117configure___ c_switch_system=C_SWITCH_SYSTEM
4118configure___ c_switch_machine=C_SWITCH_MACHINE
4119
4120#ifndef LIB_X11_LIB
4121#define LIB_X11_LIB -lX11
4122#endif
4123
4124#ifndef LIBX11_MACHINE
4125#define LIBX11_MACHINE
4126#endif
4127
4128#ifndef LIBX11_SYSTEM
4129#define LIBX11_SYSTEM
4130#endif
4131configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
4132
4133#ifdef UNEXEC
4134configure___ unexec=UNEXEC
4135#else
4136configure___ unexec=unexec.o
4137#endif
4138
4139#ifdef SYSTEM_MALLOC
4140configure___ system_malloc=yes
4141#else
4142configure___ system_malloc=no
4143#endif
4144
ef9e4345
GM
4145#ifdef USE_MMAP_FOR_BUFFERS
4146configure___ use_mmap_for_buffers=yes
73b77ee5 4147#else
ef9e4345 4148configure___ use_mmap_for_buffers=no
73b77ee5
GM
4149#endif
4150
3b33a005
DL
4151#ifndef C_DEBUG_SWITCH
4152#define C_DEBUG_SWITCH -g
4153#endif
4154
4155#ifndef C_OPTIMIZE_SWITCH
4156#ifdef __GNUC__
4157#define C_OPTIMIZE_SWITCH -O2
4158#else
4159#define C_OPTIMIZE_SWITCH -O
4160#endif
4161#endif
4162
4163#ifndef LD_SWITCH_MACHINE
4164#define LD_SWITCH_MACHINE
4165#endif
4166
4167#ifndef LD_SWITCH_SYSTEM
4168#define LD_SWITCH_SYSTEM
4169#endif
4170
4171#ifndef LD_SWITCH_X_SITE_AUX
4172#define LD_SWITCH_X_SITE_AUX
503d2be0 4173#endif
3b33a005
DL
4174
4175configure___ ld_switch_system=LD_SWITCH_SYSTEM
4176configure___ ld_switch_machine=LD_SWITCH_MACHINE
4177
4178#ifdef THIS_IS_CONFIGURE
4179
4180/* Get the CFLAGS for tests in configure. */
4181#ifdef __GNUC__
4182configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
4183#else
4184configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4185#endif
4186
4187#else /* not THIS_IS_CONFIGURE */
4188
4189/* Get the CFLAGS for real compilation. */
4190#ifdef __GNUC__
4191configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
4192#else
4193configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4194#endif
4195
4196#endif /* not THIS_IS_CONFIGURE */
4197' > ${tempcname}
4198
4199# The value of CPP is a quoted variable reference, so we need to do this
4200# to get its actual value...
4201CPP=`eval "echo $CPP"`
4202eval `${CPP} -Isrc ${tempcname} \
4203 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4204if test "x$SPECIFIED_CFLAGS" = x; then
4205 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
4206 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4207else
4208 REAL_CFLAGS="$CFLAGS"
4209fi
4210rm ${tempcname}
4211
4212ac_link="$ac_link $ld_switch_machine $ld_switch_system"
4213
4214### Make sure subsequent tests use flags consistent with the build flags.
4215
4216if test x"${OVERRIDE_CPPFLAGS}" != x; then
4217 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
4218else
4219 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
4220fi
4221
6bae0ccf
DL
4222
4223
22044edf
DL
4224
4225cat >>confdefs.h <<\_ACEOF
4226#define _GNU_SOURCE 1
4227_ACEOF
4228
4229
4230
503d2be0 4231# Check whether --enable-largefile or --disable-largefile was given.
f4988be7
GM
4232if test "${enable_largefile+set}" = set; then
4233 enableval="$enable_largefile"
f4988be7 4234
503d2be0
AS
4235fi;
4236if test "$enable_largefile" != no; then
f4988be7 4237
c0d27fcc 4238 echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
503d2be0
AS
4239echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
4240if test "${ac_cv_sys_largefile_CC+set}" = set; then
4241 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4242else
f4988be7 4243 ac_cv_sys_largefile_CC=no
503d2be0
AS
4244 if test "$GCC" != yes; then
4245 ac_save_CC=$CC
4246 while :; do
4247 # IRIX 6.2 and later do not support large files by default,
4248 # so use the C compiler's -n32 option if that helps.
4249 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 4250#line $LINENO "configure"
cd958eb3
MB
4251/* confdefs.h. */
4252_ACEOF
4253cat confdefs.h >>conftest.$ac_ext
4254cat >>conftest.$ac_ext <<_ACEOF
4255/* end confdefs.h. */
f4988be7 4256#include <sys/types.h>
503d2be0
AS
4257 /* Check that off_t can represent 2**63 - 1 correctly.
4258 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4259 since some C++ compilers masquerading as C compilers
4260 incorrectly reject 9223372036854775807. */
4261#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4262 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4263 && LARGE_OFF_T % 2147483647 == 1)
4264 ? 1 : -1];
4265int
4266main ()
4267{
f4988be7 4268
503d2be0
AS
4269 ;
4270 return 0;
4271}
4272_ACEOF
4273 rm -f conftest.$ac_objext
c0d27fcc 4274if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
4275 (eval $ac_compile) 2>&5
4276 ac_status=$?
c0d27fcc 4277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4278 (exit $ac_status); } &&
4279 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4281 (eval $ac_try) 2>&5
4282 ac_status=$?
c0d27fcc 4283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4284 (exit $ac_status); }; }; then
4285 break
b192d653 4286else
503d2be0 4287 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4288sed 's/^/| /' conftest.$ac_ext >&5
4289
503d2be0
AS
4290fi
4291rm -f conftest.$ac_objext
4292 CC="$CC -n32"
4293 rm -f conftest.$ac_objext
c0d27fcc 4294if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
4295 (eval $ac_compile) 2>&5
4296 ac_status=$?
c0d27fcc 4297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4298 (exit $ac_status); } &&
4299 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4301 (eval $ac_try) 2>&5
4302 ac_status=$?
c0d27fcc 4303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4304 (exit $ac_status); }; }; then
4305 ac_cv_sys_largefile_CC=' -n32'; break
4306else
4307 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4308sed 's/^/| /' conftest.$ac_ext >&5
4309
503d2be0
AS
4310fi
4311rm -f conftest.$ac_objext
4312 break
4313 done
4314 CC=$ac_save_CC
4315 rm -f conftest.$ac_ext
4316 fi
b192d653 4317fi
c0d27fcc 4318echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
503d2be0
AS
4319echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
4320 if test "$ac_cv_sys_largefile_CC" != no; then
4321 CC=$CC$ac_cv_sys_largefile_CC
4322 fi
b192d653 4323
c0d27fcc 4324 echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
503d2be0
AS
4325echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
4326if test "${ac_cv_sys_file_offset_bits+set}" = set; then
4327 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4328else
503d2be0 4329 while :; do
f4988be7 4330 ac_cv_sys_file_offset_bits=no
503d2be0 4331 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 4332#line $LINENO "configure"
cd958eb3
MB
4333/* confdefs.h. */
4334_ACEOF
4335cat confdefs.h >>conftest.$ac_ext
4336cat >>conftest.$ac_ext <<_ACEOF
4337/* end confdefs.h. */
f4988be7 4338#include <sys/types.h>
503d2be0
AS
4339 /* Check that off_t can represent 2**63 - 1 correctly.
4340 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4341 since some C++ compilers masquerading as C compilers
4342 incorrectly reject 9223372036854775807. */
4343#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4344 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4345 && LARGE_OFF_T % 2147483647 == 1)
4346 ? 1 : -1];
4347int
4348main ()
4349{
f4988be7 4350
503d2be0
AS
4351 ;
4352 return 0;
4353}
4354_ACEOF
4355rm -f conftest.$ac_objext
c0d27fcc 4356if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
4357 (eval $ac_compile) 2>&5
4358 ac_status=$?
c0d27fcc 4359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4360 (exit $ac_status); } &&
4361 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4363 (eval $ac_try) 2>&5
4364 ac_status=$?
c0d27fcc 4365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4366 (exit $ac_status); }; }; then
4367 break
f4988be7 4368else
503d2be0 4369 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4370sed 's/^/| /' conftest.$ac_ext >&5
4371
503d2be0
AS
4372fi
4373rm -f conftest.$ac_objext conftest.$ac_ext
4374 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 4375#line $LINENO "configure"
cd958eb3
MB
4376/* confdefs.h. */
4377_ACEOF
4378cat confdefs.h >>conftest.$ac_ext
4379cat >>conftest.$ac_ext <<_ACEOF
4380/* end confdefs.h. */
f4988be7
GM
4381#define _FILE_OFFSET_BITS 64
4382#include <sys/types.h>
503d2be0
AS
4383 /* Check that off_t can represent 2**63 - 1 correctly.
4384 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4385 since some C++ compilers masquerading as C compilers
4386 incorrectly reject 9223372036854775807. */
4387#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4388 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4389 && LARGE_OFF_T % 2147483647 == 1)
4390 ? 1 : -1];
4391int
4392main ()
4393{
4394
4395 ;
4396 return 0;
4397}
4398_ACEOF
4399rm -f conftest.$ac_objext
c0d27fcc 4400if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
4401 (eval $ac_compile) 2>&5
4402 ac_status=$?
c0d27fcc 4403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4404 (exit $ac_status); } &&
4405 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4407 (eval $ac_try) 2>&5
4408 ac_status=$?
c0d27fcc 4409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4410 (exit $ac_status); }; }; then
4411 ac_cv_sys_file_offset_bits=64; break
4412else
4413 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4414sed 's/^/| /' conftest.$ac_ext >&5
4415
503d2be0
AS
4416fi
4417rm -f conftest.$ac_objext conftest.$ac_ext
4418 break
4419done
ba4481b5 4420fi
c0d27fcc 4421echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
503d2be0
AS
4422echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
4423if test "$ac_cv_sys_file_offset_bits" != no; then
ba4481b5 4424
c0d27fcc 4425cat >>confdefs.h <<_ACEOF
f4988be7 4426#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 4427_ACEOF
f4988be7 4428
503d2be0
AS
4429fi
4430rm -f conftest*
c0d27fcc 4431 echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
503d2be0
AS
4432echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
4433if test "${ac_cv_sys_large_files+set}" = set; then
4434 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4435else
503d2be0 4436 while :; do
f4988be7 4437 ac_cv_sys_large_files=no
503d2be0 4438 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 4439#line $LINENO "configure"
cd958eb3
MB
4440/* confdefs.h. */
4441_ACEOF
4442cat confdefs.h >>conftest.$ac_ext
4443cat >>conftest.$ac_ext <<_ACEOF
4444/* end confdefs.h. */
503d2be0
AS
4445#include <sys/types.h>
4446 /* Check that off_t can represent 2**63 - 1 correctly.
4447 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4448 since some C++ compilers masquerading as C compilers
4449 incorrectly reject 9223372036854775807. */
4450#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4451 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4452 && LARGE_OFF_T % 2147483647 == 1)
4453 ? 1 : -1];
4454int
4455main ()
4456{
ba4481b5 4457
503d2be0
AS
4458 ;
4459 return 0;
4460}
4461_ACEOF
4462rm -f conftest.$ac_objext
c0d27fcc 4463if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
4464 (eval $ac_compile) 2>&5
4465 ac_status=$?
c0d27fcc 4466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4467 (exit $ac_status); } &&
4468 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4470 (eval $ac_try) 2>&5
4471 ac_status=$?
c0d27fcc 4472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4473 (exit $ac_status); }; }; then
4474 break
ba4481b5 4475else
503d2be0 4476 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4477sed 's/^/| /' conftest.$ac_ext >&5
4478
503d2be0
AS
4479fi
4480rm -f conftest.$ac_objext conftest.$ac_ext
4481 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 4482#line $LINENO "configure"
cd958eb3
MB
4483/* confdefs.h. */
4484_ACEOF
4485cat confdefs.h >>conftest.$ac_ext
4486cat >>conftest.$ac_ext <<_ACEOF
4487/* end confdefs.h. */
f4988be7 4488#define _LARGE_FILES 1
503d2be0
AS
4489#include <sys/types.h>
4490 /* Check that off_t can represent 2**63 - 1 correctly.
4491 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4492 since some C++ compilers masquerading as C compilers
4493 incorrectly reject 9223372036854775807. */
4494#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4495 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4496 && LARGE_OFF_T % 2147483647 == 1)
4497 ? 1 : -1];
4498int
4499main ()
4500{
f4988be7 4501
503d2be0
AS
4502 ;
4503 return 0;
4504}
4505_ACEOF
4506rm -f conftest.$ac_objext
c0d27fcc 4507if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
4508 (eval $ac_compile) 2>&5
4509 ac_status=$?
c0d27fcc 4510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4511 (exit $ac_status); } &&
4512 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4514 (eval $ac_try) 2>&5
4515 ac_status=$?
c0d27fcc 4516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4517 (exit $ac_status); }; }; then
4518 ac_cv_sys_large_files=1; break
4519else
4520 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4521sed 's/^/| /' conftest.$ac_ext >&5
4522
503d2be0
AS
4523fi
4524rm -f conftest.$ac_objext conftest.$ac_ext
4525 break
4526done
ba4481b5 4527fi
c0d27fcc 4528echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
503d2be0
AS
4529echo "${ECHO_T}$ac_cv_sys_large_files" >&6
4530if test "$ac_cv_sys_large_files" != no; then
ba4481b5 4531
c0d27fcc 4532cat >>confdefs.h <<_ACEOF
f4988be7 4533#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 4534_ACEOF
ba4481b5 4535
503d2be0
AS
4536fi
4537rm -f conftest*
4538fi
ba4481b5 4539
c0d27fcc 4540
2c9dccc9
PJ
4541if test "${with_sound}" != "no"; then
4542 # Sound support for GNU/Linux and the free BSDs.
c0d27fcc
MR
4543 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4544echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4545if test "${ac_cv_header_stdc+set}" = set; then
4546 echo $ECHO_N "(cached) $ECHO_C" >&6
4547else
4548 cat >conftest.$ac_ext <<_ACEOF
4549#line $LINENO "configure"
cd958eb3
MB
4550/* confdefs.h. */
4551_ACEOF
4552cat confdefs.h >>conftest.$ac_ext
4553cat >>conftest.$ac_ext <<_ACEOF
4554/* end confdefs.h. */
c0d27fcc
MR
4555#include <stdlib.h>
4556#include <stdarg.h>
4557#include <string.h>
4558#include <float.h>
98418dba 4559
cd958eb3
MB
4560int
4561main ()
4562{
4563
4564 ;
4565 return 0;
4566}
c0d27fcc 4567_ACEOF
cd958eb3
MB
4568rm -f conftest.$ac_objext
4569if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4570 (eval $ac_compile) 2>&5
c0d27fcc 4571 ac_status=$?
c0d27fcc 4572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
cd958eb3
MB
4573 (exit $ac_status); } &&
4574 { ac_try='test -s conftest.$ac_objext'
4575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4576 (eval $ac_try) 2>&5
4577 ac_status=$?
4578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4579 (exit $ac_status); }; }; then
c0d27fcc
MR
4580 ac_cv_header_stdc=yes
4581else
4582 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4583sed 's/^/| /' conftest.$ac_ext >&5
4584
4585ac_cv_header_stdc=no
c0d27fcc 4586fi
cd958eb3 4587rm -f conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
4588
4589if test $ac_cv_header_stdc = yes; then
4590 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4591 cat >conftest.$ac_ext <<_ACEOF
4592#line $LINENO "configure"
cd958eb3
MB
4593/* confdefs.h. */
4594_ACEOF
4595cat confdefs.h >>conftest.$ac_ext
4596cat >>conftest.$ac_ext <<_ACEOF
4597/* end confdefs.h. */
c0d27fcc
MR
4598#include <string.h>
4599
4600_ACEOF
4601if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4602 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
4603 :
4604else
4605 ac_cv_header_stdc=no
4606fi
4607rm -f conftest*
4608
4609fi
4610
4611if test $ac_cv_header_stdc = yes; then
4612 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4613 cat >conftest.$ac_ext <<_ACEOF
4614#line $LINENO "configure"
cd958eb3
MB
4615/* confdefs.h. */
4616_ACEOF
4617cat confdefs.h >>conftest.$ac_ext
4618cat >>conftest.$ac_ext <<_ACEOF
4619/* end confdefs.h. */
c0d27fcc
MR
4620#include <stdlib.h>
4621
4622_ACEOF
4623if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4624 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
4625 :
4626else
4627 ac_cv_header_stdc=no
4628fi
4629rm -f conftest*
4630
4631fi
4632
4633if test $ac_cv_header_stdc = yes; then
4634 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4635 if test "$cross_compiling" = yes; then
4636 :
4637else
4638 cat >conftest.$ac_ext <<_ACEOF
4639#line $LINENO "configure"
cd958eb3
MB
4640/* confdefs.h. */
4641_ACEOF
4642cat confdefs.h >>conftest.$ac_ext
4643cat >>conftest.$ac_ext <<_ACEOF
4644/* end confdefs.h. */
c0d27fcc
MR
4645#include <ctype.h>
4646#if ((' ' & 0x0FF) == 0x020)
4647# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4648# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4649#else
cd958eb3
MB
4650# define ISLOWER(c) \
4651 (('a' <= (c) && (c) <= 'i') \
c0d27fcc
MR
4652 || ('j' <= (c) && (c) <= 'r') \
4653 || ('s' <= (c) && (c) <= 'z'))
4654# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4655#endif
4656
4657#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4658int
4659main ()
4660{
4661 int i;
4662 for (i = 0; i < 256; i++)
4663 if (XOR (islower (i), ISLOWER (i))
4664 || toupper (i) != TOUPPER (i))
4665 exit(2);
4666 exit (0);
4667}
4668_ACEOF
4669rm -f conftest$ac_exeext
4670if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4671 (eval $ac_link) 2>&5
4672 ac_status=$?
4673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4674 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4676 (eval $ac_try) 2>&5
4677 ac_status=$?
4678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4679 (exit $ac_status); }; }; then
4680 :
4681else
4682 echo "$as_me: program exited with status $ac_status" >&5
4683echo "$as_me: failed program was:" >&5
cd958eb3
MB
4684sed 's/^/| /' conftest.$ac_ext >&5
4685
c0d27fcc
MR
4686( exit $ac_status )
4687ac_cv_header_stdc=no
4688fi
6bae0ccf 4689rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
4690fi
4691fi
4692fi
4693echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4694echo "${ECHO_T}$ac_cv_header_stdc" >&6
4695if test $ac_cv_header_stdc = yes; then
4696
4697cat >>confdefs.h <<\_ACEOF
4698#define STDC_HEADERS 1
4699_ACEOF
4700
4701fi
4702
4703# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4714 inttypes.h stdint.h unistd.h
98418dba
CW
4715do
4716as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc 4717echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
4718echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4719if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 4720 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4721else
925c2f3f 4722 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 4723#line $LINENO "configure"
cd958eb3
MB
4724/* confdefs.h. */
4725_ACEOF
4726cat confdefs.h >>conftest.$ac_ext
4727cat >>conftest.$ac_ext <<_ACEOF
4728/* end confdefs.h. */
c0d27fcc
MR
4729$ac_includes_default
4730
4731#include <$ac_header>
4732_ACEOF
4733rm -f conftest.$ac_objext
4734if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4735 (eval $ac_compile) 2>&5
4736 ac_status=$?
4737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4738 (exit $ac_status); } &&
4739 { ac_try='test -s conftest.$ac_objext'
4740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4741 (eval $ac_try) 2>&5
4742 ac_status=$?
4743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4744 (exit $ac_status); }; }; then
4745 eval "$as_ac_Header=yes"
4746else
4747 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4748sed 's/^/| /' conftest.$ac_ext >&5
4749
c0d27fcc
MR
4750eval "$as_ac_Header=no"
4751fi
4752rm -f conftest.$ac_objext conftest.$ac_ext
4753fi
4754echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4755echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4756if test `eval echo '${'$as_ac_Header'}'` = yes; then
4757 cat >>confdefs.h <<_ACEOF
4758#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4759_ACEOF
4760
4761fi
4762
4763done
4764
4765
4766
4767
4768
4769for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
4770do
4771as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4772if eval "test \"\${$as_ac_Header+set}\" = set"; then
4773 echo "$as_me:$LINENO: checking for $ac_header" >&5
4774echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4775if eval "test \"\${$as_ac_Header+set}\" = set"; then
4776 echo $ECHO_N "(cached) $ECHO_C" >&6
4777fi
4778echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4779echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4780else
4781 # Is the header compilable?
4782echo "$as_me:$LINENO: checking $ac_header usability" >&5
4783echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4784cat >conftest.$ac_ext <<_ACEOF
4785#line $LINENO "configure"
cd958eb3
MB
4786/* confdefs.h. */
4787_ACEOF
4788cat confdefs.h >>conftest.$ac_ext
4789cat >>conftest.$ac_ext <<_ACEOF
4790/* end confdefs.h. */
c0d27fcc 4791$ac_includes_default
98418dba 4792#include <$ac_header>
503d2be0 4793_ACEOF
c0d27fcc
MR
4794rm -f conftest.$ac_objext
4795if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4796 (eval $ac_compile) 2>&5
4797 ac_status=$?
4798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4799 (exit $ac_status); } &&
4800 { ac_try='test -s conftest.$ac_objext'
4801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4802 (eval $ac_try) 2>&5
4803 ac_status=$?
4804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4805 (exit $ac_status); }; }; then
4806 ac_header_compiler=yes
4807else
4808 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4809sed 's/^/| /' conftest.$ac_ext >&5
4810
c0d27fcc
MR
4811ac_header_compiler=no
4812fi
4813rm -f conftest.$ac_objext conftest.$ac_ext
4814echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4815echo "${ECHO_T}$ac_header_compiler" >&6
4816
4817# Is the header present?
4818echo "$as_me:$LINENO: checking $ac_header presence" >&5
4819echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4820cat >conftest.$ac_ext <<_ACEOF
4821#line $LINENO "configure"
cd958eb3
MB
4822/* confdefs.h. */
4823_ACEOF
4824cat confdefs.h >>conftest.$ac_ext
4825cat >>conftest.$ac_ext <<_ACEOF
4826/* end confdefs.h. */
c0d27fcc
MR
4827#include <$ac_header>
4828_ACEOF
4829if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 4830 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 4831 ac_status=$?
6bae0ccf 4832 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
4833 rm -f conftest.er1
4834 cat conftest.err >&5
c0d27fcc 4835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
4836 (exit $ac_status); } >/dev/null; then
4837 if test -s conftest.err; then
4838 ac_cpp_err=$ac_c_preproc_warn_flag
4839 else
4840 ac_cpp_err=
4841 fi
4842else
4843 ac_cpp_err=yes
4844fi
4845if test -z "$ac_cpp_err"; then
c0d27fcc 4846 ac_header_preproc=yes
f4988be7 4847else
503d2be0 4848 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4849sed 's/^/| /' conftest.$ac_ext >&5
4850
c0d27fcc 4851 ac_header_preproc=no
f4988be7 4852fi
98418dba 4853rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
4854echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4855echo "${ECHO_T}$ac_header_preproc" >&6
4856
4857# So? What about this header?
4858case $ac_header_compiler:$ac_header_preproc in
4859 yes:no )
4860 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4861echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4862 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
4863echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4864 (
4865 cat <<\_ASBOX
4866## ------------------------------------ ##
4867## Report this to bug-autoconf@gnu.org. ##
4868## ------------------------------------ ##
4869_ASBOX
4870 ) |
4871 sed "s/^/$as_me: WARNING: /" >&2
4872 ;;
c0d27fcc
MR
4873 no:yes )
4874 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4875echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4876 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4877echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4878 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
4879echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4880 (
4881 cat <<\_ASBOX
4882## ------------------------------------ ##
4883## Report this to bug-autoconf@gnu.org. ##
4884## ------------------------------------ ##
4885_ASBOX
4886 ) |
4887 sed "s/^/$as_me: WARNING: /" >&2
4888 ;;
c0d27fcc
MR
4889esac
4890echo "$as_me:$LINENO: checking for $ac_header" >&5
4891echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4892if eval "test \"\${$as_ac_Header+set}\" = set"; then
4893 echo $ECHO_N "(cached) $ECHO_C" >&6
4894else
4895 eval "$as_ac_Header=$ac_header_preproc"
f4988be7 4896fi
c0d27fcc 4897echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 4898echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
4899
4900fi
98418dba 4901if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 4902 cat >>confdefs.h <<_ACEOF
98418dba 4903#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 4904_ACEOF
f4988be7
GM
4905
4906fi
c0d27fcc 4907
98418dba
CW
4908done
4909
4910 # Emulation library used on NetBSD.
c0d27fcc 4911 echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
98418dba
CW
4912echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6
4913if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 4914 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4915else
98418dba
CW
4916 ac_check_lib_save_LIBS=$LIBS
4917LIBS="-lossaudio $LIBS"
4918cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 4919#line $LINENO "configure"
cd958eb3
MB
4920/* confdefs.h. */
4921_ACEOF
4922cat confdefs.h >>conftest.$ac_ext
4923cat >>conftest.$ac_ext <<_ACEOF
4924/* end confdefs.h. */
98418dba
CW
4925
4926/* Override any gcc2 internal prototype to avoid an error. */
4927#ifdef __cplusplus
4928extern "C"
f4988be7 4929#endif
98418dba
CW
4930/* We use char because int might match the return type of a gcc2
4931 builtin and then its argument prototype would still apply. */
4932char _oss_ioctl ();
503d2be0
AS
4933int
4934main ()
4935{
98418dba 4936_oss_ioctl ();
503d2be0
AS
4937 ;
4938 return 0;
4939}
4940_ACEOF
98418dba 4941rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 4942if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba 4943 (eval $ac_link) 2>&5
503d2be0 4944 ac_status=$?
c0d27fcc 4945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4946 (exit $ac_status); } &&
98418dba 4947 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 4948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4949 (eval $ac_try) 2>&5
4950 ac_status=$?
c0d27fcc 4951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4952 (exit $ac_status); }; }; then
98418dba 4953 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 4954else
503d2be0 4955 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4956sed 's/^/| /' conftest.$ac_ext >&5
4957
98418dba 4958ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 4959fi
98418dba
CW
4960rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4961LIBS=$ac_check_lib_save_LIBS
f4988be7 4962fi
c0d27fcc 4963echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
98418dba
CW
4964echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6
4965if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
4966 LIBSOUND=-lossaudio
4967else
4968 LIBSOUND=
4969fi
4970
c0d27fcc 4971
f4988be7 4972fi
c0d27fcc
MR
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
22044edf
DL
4991
4992
c0d27fcc
MR
4993
4994
f4988be7 4995
98418dba
CW
4996for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
4997 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
c0d27fcc 4998 termcap.h stdio_ext.h fcntl.h term.h strings.h coff.h pty.h sys/mman.h \
22044edf 4999 sys/param.h sys/vlimit.h sys/resource.h
98418dba
CW
5000do
5001as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
5002if eval "test \"\${$as_ac_Header+set}\" = set"; then
5003 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
5004echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5005if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 5006 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
5007fi
5008echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5009echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
f4988be7 5010else
c0d27fcc
MR
5011 # Is the header compilable?
5012echo "$as_me:$LINENO: checking $ac_header usability" >&5
5013echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5014cat >conftest.$ac_ext <<_ACEOF
5015#line $LINENO "configure"
cd958eb3
MB
5016/* confdefs.h. */
5017_ACEOF
5018cat confdefs.h >>conftest.$ac_ext
5019cat >>conftest.$ac_ext <<_ACEOF
5020/* end confdefs.h. */
c0d27fcc
MR
5021$ac_includes_default
5022#include <$ac_header>
5023_ACEOF
5024rm -f conftest.$ac_objext
5025if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5026 (eval $ac_compile) 2>&5
5027 ac_status=$?
5028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5029 (exit $ac_status); } &&
5030 { ac_try='test -s conftest.$ac_objext'
5031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5032 (eval $ac_try) 2>&5
5033 ac_status=$?
5034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5035 (exit $ac_status); }; }; then
5036 ac_header_compiler=yes
5037else
5038 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5039sed 's/^/| /' conftest.$ac_ext >&5
5040
c0d27fcc
MR
5041ac_header_compiler=no
5042fi
5043rm -f conftest.$ac_objext conftest.$ac_ext
5044echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5045echo "${ECHO_T}$ac_header_compiler" >&6
5046
5047# Is the header present?
5048echo "$as_me:$LINENO: checking $ac_header presence" >&5
5049echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5050cat >conftest.$ac_ext <<_ACEOF
5051#line $LINENO "configure"
cd958eb3
MB
5052/* confdefs.h. */
5053_ACEOF
5054cat confdefs.h >>conftest.$ac_ext
5055cat >>conftest.$ac_ext <<_ACEOF
5056/* end confdefs.h. */
98418dba 5057#include <$ac_header>
503d2be0 5058_ACEOF
c0d27fcc 5059if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5060 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5061 ac_status=$?
6bae0ccf 5062 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5063 rm -f conftest.er1
5064 cat conftest.err >&5
c0d27fcc 5065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5066 (exit $ac_status); } >/dev/null; then
5067 if test -s conftest.err; then
5068 ac_cpp_err=$ac_c_preproc_warn_flag
5069 else
5070 ac_cpp_err=
5071 fi
5072else
5073 ac_cpp_err=yes
5074fi
5075if test -z "$ac_cpp_err"; then
c0d27fcc 5076 ac_header_preproc=yes
34ec9ebe 5077else
503d2be0 5078 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5079sed 's/^/| /' conftest.$ac_ext >&5
5080
c0d27fcc 5081 ac_header_preproc=no
34ec9ebe 5082fi
98418dba 5083rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5084echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5085echo "${ECHO_T}$ac_header_preproc" >&6
5086
5087# So? What about this header?
5088case $ac_header_compiler:$ac_header_preproc in
5089 yes:no )
5090 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5091echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5092 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
5093echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5094 (
5095 cat <<\_ASBOX
5096## ------------------------------------ ##
5097## Report this to bug-autoconf@gnu.org. ##
5098## ------------------------------------ ##
5099_ASBOX
5100 ) |
5101 sed "s/^/$as_me: WARNING: /" >&2
5102 ;;
c0d27fcc
MR
5103 no:yes )
5104 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5105echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5106 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5107echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5108 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
5109echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5110 (
5111 cat <<\_ASBOX
5112## ------------------------------------ ##
5113## Report this to bug-autoconf@gnu.org. ##
5114## ------------------------------------ ##
5115_ASBOX
5116 ) |
5117 sed "s/^/$as_me: WARNING: /" >&2
5118 ;;
c0d27fcc
MR
5119esac
5120echo "$as_me:$LINENO: checking for $ac_header" >&5
5121echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5122if eval "test \"\${$as_ac_Header+set}\" = set"; then
5123 echo $ECHO_N "(cached) $ECHO_C" >&6
5124else
5125 eval "$as_ac_Header=$ac_header_preproc"
34ec9ebe 5126fi
c0d27fcc 5127echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5128echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5129
5130fi
98418dba 5131if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5132 cat >>confdefs.h <<_ACEOF
98418dba 5133#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5134_ACEOF
34ec9ebe 5135
98418dba 5136fi
c0d27fcc 5137
98418dba
CW
5138done
5139
22044edf
DL
5140
5141for ac_header in term.h
5142do
5143as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5144echo "$as_me:$LINENO: checking for $ac_header" >&5
5145echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5146if eval "test \"\${$as_ac_Header+set}\" = set"; then
5147 echo $ECHO_N "(cached) $ECHO_C" >&6
5148else
5149 cat >conftest.$ac_ext <<_ACEOF
5150#line $LINENO "configure"
cd958eb3
MB
5151/* confdefs.h. */
5152_ACEOF
5153cat confdefs.h >>conftest.$ac_ext
5154cat >>conftest.$ac_ext <<_ACEOF
5155/* end confdefs.h. */
22044edf
DL
5156#include <$ac_header>
5157_ACEOF
5158if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5159 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5160 ac_status=$?
5161 grep -v '^ *+' conftest.er1 >conftest.err
5162 rm -f conftest.er1
5163 cat conftest.err >&5
5164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5165 (exit $ac_status); } >/dev/null; then
5166 if test -s conftest.err; then
5167 ac_cpp_err=$ac_c_preproc_warn_flag
5168 else
5169 ac_cpp_err=
5170 fi
5171else
5172 ac_cpp_err=yes
5173fi
5174if test -z "$ac_cpp_err"; then
5175 eval "$as_ac_Header=yes"
5176else
5177 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5178sed 's/^/| /' conftest.$ac_ext >&5
5179
22044edf
DL
5180 eval "$as_ac_Header=no"
5181fi
5182rm -f conftest.err conftest.$ac_ext
5183fi
5184echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5185echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5186if test `eval echo '${'$as_ac_Header'}'` = yes; then
5187 cat >>confdefs.h <<_ACEOF
5188#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5189_ACEOF
5190
5191fi
5192
5193done
5194
c0d27fcc 5195echo "$as_me:$LINENO: checking for ANSI C header files" >&5
98418dba
CW
5196echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5197if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 5198 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5199else
503d2be0 5200 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5201#line $LINENO "configure"
cd958eb3
MB
5202/* confdefs.h. */
5203_ACEOF
5204cat confdefs.h >>conftest.$ac_ext
5205cat >>conftest.$ac_ext <<_ACEOF
5206/* end confdefs.h. */
98418dba
CW
5207#include <stdlib.h>
5208#include <stdarg.h>
5209#include <string.h>
5210#include <float.h>
5211
cd958eb3
MB
5212int
5213main ()
5214{
5215
5216 ;
5217 return 0;
5218}
98418dba 5219_ACEOF
cd958eb3
MB
5220rm -f conftest.$ac_objext
5221if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5222 (eval $ac_compile) 2>&5
503d2be0 5223 ac_status=$?
c0d27fcc 5224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
cd958eb3
MB
5225 (exit $ac_status); } &&
5226 { ac_try='test -s conftest.$ac_objext'
5227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5228 (eval $ac_try) 2>&5
5229 ac_status=$?
5230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5231 (exit $ac_status); }; }; then
98418dba 5232 ac_cv_header_stdc=yes
ba4481b5 5233else
503d2be0 5234 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5235sed 's/^/| /' conftest.$ac_ext >&5
5236
5237ac_cv_header_stdc=no
ba4481b5 5238fi
cd958eb3 5239rm -f conftest.$ac_objext conftest.$ac_ext
98418dba
CW
5240
5241if test $ac_cv_header_stdc = yes; then
5242 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5243 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5244#line $LINENO "configure"
cd958eb3
MB
5245/* confdefs.h. */
5246_ACEOF
5247cat confdefs.h >>conftest.$ac_ext
5248cat >>conftest.$ac_ext <<_ACEOF
5249/* end confdefs.h. */
98418dba
CW
5250#include <string.h>
5251
5252_ACEOF
5253if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5254 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
5255 :
5256else
5257 ac_cv_header_stdc=no
ba4481b5 5258fi
98418dba 5259rm -f conftest*
ba4481b5
DL
5260
5261fi
5262
98418dba
CW
5263if test $ac_cv_header_stdc = yes; then
5264 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5265 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5266#line $LINENO "configure"
cd958eb3
MB
5267/* confdefs.h. */
5268_ACEOF
5269cat confdefs.h >>conftest.$ac_ext
5270cat >>conftest.$ac_ext <<_ACEOF
5271/* end confdefs.h. */
98418dba
CW
5272#include <stdlib.h>
5273
5274_ACEOF
5275if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5276 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
5277 :
5278else
5279 ac_cv_header_stdc=no
5280fi
5281rm -f conftest*
5282
5283fi
5284
5285if test $ac_cv_header_stdc = yes; then
5286 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5287 if test "$cross_compiling" = yes; then
5288 :
d42122a3 5289else
503d2be0 5290 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5291#line $LINENO "configure"
cd958eb3
MB
5292/* confdefs.h. */
5293_ACEOF
5294cat confdefs.h >>conftest.$ac_ext
5295cat >>conftest.$ac_ext <<_ACEOF
5296/* end confdefs.h. */
98418dba
CW
5297#include <ctype.h>
5298#if ((' ' & 0x0FF) == 0x020)
5299# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5300# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5301#else
cd958eb3
MB
5302# define ISLOWER(c) \
5303 (('a' <= (c) && (c) <= 'i') \
98418dba
CW
5304 || ('j' <= (c) && (c) <= 'r') \
5305 || ('s' <= (c) && (c) <= 'z'))
5306# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5307#endif
5308
5309#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
5310int
5311main ()
5312{
98418dba
CW
5313 int i;
5314 for (i = 0; i < 256; i++)
5315 if (XOR (islower (i), ISLOWER (i))
5316 || toupper (i) != TOUPPER (i))
5317 exit(2);
5318 exit (0);
503d2be0
AS
5319}
5320_ACEOF
98418dba 5321rm -f conftest$ac_exeext
c0d27fcc 5322if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba 5323 (eval $ac_link) 2>&5
503d2be0 5324 ac_status=$?
c0d27fcc 5325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 5326 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 5327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5328 (eval $ac_try) 2>&5
5329 ac_status=$?
c0d27fcc 5330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5331 (exit $ac_status); }; }; then
98418dba 5332 :
d42122a3 5333else
98418dba
CW
5334 echo "$as_me: program exited with status $ac_status" >&5
5335echo "$as_me: failed program was:" >&5
cd958eb3
MB
5336sed 's/^/| /' conftest.$ac_ext >&5
5337
c0d27fcc 5338( exit $ac_status )
98418dba 5339ac_cv_header_stdc=no
d42122a3 5340fi
6bae0ccf 5341rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 5342fi
98418dba
CW
5343fi
5344fi
c0d27fcc 5345echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
98418dba
CW
5346echo "${ECHO_T}$ac_cv_header_stdc" >&6
5347if test $ac_cv_header_stdc = yes; then
5348
c0d27fcc 5349cat >>confdefs.h <<\_ACEOF
98418dba 5350#define STDC_HEADERS 1
c0d27fcc 5351_ACEOF
d42122a3
DL
5352
5353fi
5354
c0d27fcc 5355echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
98418dba
CW
5356echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
5357if test "${ac_cv_header_time+set}" = set; then
503d2be0 5358 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5359else
503d2be0 5360 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5361#line $LINENO "configure"
cd958eb3
MB
5362/* confdefs.h. */
5363_ACEOF
5364cat confdefs.h >>conftest.$ac_ext
5365cat >>conftest.$ac_ext <<_ACEOF
5366/* end confdefs.h. */
ba4481b5 5367#include <sys/types.h>
98418dba 5368#include <sys/time.h>
ba4481b5 5369#include <time.h>
503d2be0
AS
5370
5371int
5372main ()
5373{
98418dba
CW
5374if ((struct tm *) 0)
5375return 0;
503d2be0
AS
5376 ;
5377 return 0;
5378}
5379_ACEOF
5380rm -f conftest.$ac_objext
c0d27fcc 5381if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
5382 (eval $ac_compile) 2>&5
5383 ac_status=$?
c0d27fcc 5384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5385 (exit $ac_status); } &&
5386 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5388 (eval $ac_try) 2>&5
5389 ac_status=$?
c0d27fcc 5390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5391 (exit $ac_status); }; }; then
98418dba 5392 ac_cv_header_time=yes
ba4481b5 5393else
503d2be0 5394 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5395sed 's/^/| /' conftest.$ac_ext >&5
5396
98418dba 5397ac_cv_header_time=no
ba4481b5 5398fi
503d2be0 5399rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 5400fi
c0d27fcc 5401echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
98418dba
CW
5402echo "${ECHO_T}$ac_cv_header_time" >&6
5403if test $ac_cv_header_time = yes; then
503d2be0 5404
c0d27fcc 5405cat >>confdefs.h <<\_ACEOF
98418dba 5406#define TIME_WITH_SYS_TIME 1
c0d27fcc 5407_ACEOF
ba4481b5
DL
5408
5409fi
5410
cd958eb3
MB
5411echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
5412echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6
5413if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 5414 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5415else
503d2be0 5416 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5417#line $LINENO "configure"
cd958eb3
MB
5418/* confdefs.h. */
5419_ACEOF
5420cat confdefs.h >>conftest.$ac_ext
5421cat >>conftest.$ac_ext <<_ACEOF
5422/* end confdefs.h. */
5423$ac_includes_default
5424int
5425main ()
5426{
5427#ifndef sys_siglist
5428 char *p = (char *) sys_siglist;
98418dba 5429#endif
503d2be0 5430
cd958eb3
MB
5431 ;
5432 return 0;
5433}
5434_ACEOF
5435rm -f conftest.$ac_objext
5436if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5437 (eval $ac_compile) 2>&5
5438 ac_status=$?
5439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5440 (exit $ac_status); } &&
5441 { ac_try='test -s conftest.$ac_objext'
5442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5443 (eval $ac_try) 2>&5
5444 ac_status=$?
5445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5446 (exit $ac_status); }; }; then
5447 ac_cv_have_decl_sys_siglist=yes
5448else
5449 echo "$as_me: failed program was:" >&5
5450sed 's/^/| /' conftest.$ac_ext >&5
5451
5452ac_cv_have_decl_sys_siglist=no
5453fi
5454rm -f conftest.$ac_objext conftest.$ac_ext
5455fi
5456echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
5457echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6
5458if test $ac_cv_have_decl_sys_siglist = yes; then
5459
5460cat >>confdefs.h <<_ACEOF
5461#define HAVE_DECL_SYS_SIGLIST 1
5462_ACEOF
5463
5464
5465else
5466 cat >>confdefs.h <<_ACEOF
5467#define HAVE_DECL_SYS_SIGLIST 0
5468_ACEOF
5469
5470
5471fi
5472
5473
5474if test $ac_cv_have_decl_sys_siglist != yes; then
5475 # For Tru64, at least:
5476 echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
5477echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6
5478if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
5479 echo $ECHO_N "(cached) $ECHO_C" >&6
5480else
5481 cat >conftest.$ac_ext <<_ACEOF
5482#line $LINENO "configure"
5483/* confdefs.h. */
5484_ACEOF
5485cat confdefs.h >>conftest.$ac_ext
5486cat >>conftest.$ac_ext <<_ACEOF
5487/* end confdefs.h. */
5488$ac_includes_default
503d2be0
AS
5489int
5490main ()
5491{
cd958eb3
MB
5492#ifndef __sys_siglist
5493 char *p = (char *) __sys_siglist;
5494#endif
5495
503d2be0
AS
5496 ;
5497 return 0;
5498}
5499_ACEOF
5500rm -f conftest.$ac_objext
c0d27fcc 5501if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
5502 (eval $ac_compile) 2>&5
5503 ac_status=$?
c0d27fcc 5504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5505 (exit $ac_status); } &&
5506 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5508 (eval $ac_try) 2>&5
5509 ac_status=$?
c0d27fcc 5510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5511 (exit $ac_status); }; }; then
cd958eb3 5512 ac_cv_have_decl___sys_siglist=yes
ba4481b5 5513else
503d2be0 5514 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5515sed 's/^/| /' conftest.$ac_ext >&5
5516
5517ac_cv_have_decl___sys_siglist=no
ba4481b5 5518fi
503d2be0
AS
5519rm -f conftest.$ac_objext conftest.$ac_ext
5520fi
cd958eb3
MB
5521echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
5522echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6
5523if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 5524
cd958eb3
MB
5525cat >>confdefs.h <<_ACEOF
5526#define HAVE_DECL___SYS_SIGLIST 1
5527_ACEOF
5528
5529
5530else
5531 cat >>confdefs.h <<_ACEOF
5532#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 5533_ACEOF
503d2be0 5534
cd958eb3 5535
ba4481b5
DL
5536fi
5537
cd958eb3
MB
5538
5539 if test $ac_cv_have_decl___sys_siglist = yes; then
5540
5541cat >>confdefs.h <<\_ACEOF
5542#define sys_siglist __sys_siglist
5543_ACEOF
5544
5545 fi
5546fi
c0d27fcc 5547echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
98418dba
CW
5548echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
5549if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 5550 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5551else
503d2be0 5552 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5553#line $LINENO "configure"
cd958eb3
MB
5554/* confdefs.h. */
5555_ACEOF
5556cat confdefs.h >>conftest.$ac_ext
5557cat >>conftest.$ac_ext <<_ACEOF
5558/* end confdefs.h. */
98418dba
CW
5559#include <sys/types.h>
5560#include <sys/wait.h>
5561#ifndef WEXITSTATUS
5562# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
5563#endif
5564#ifndef WIFEXITED
5565# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 5566#endif
503d2be0
AS
5567
5568int
5569main ()
5570{
98418dba
CW
5571 int s;
5572 wait (&s);
5573 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
5574 ;
5575 return 0;
5576}
5577_ACEOF
98418dba 5578rm -f conftest.$ac_objext
c0d27fcc 5579if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba 5580 (eval $ac_compile) 2>&5
503d2be0 5581 ac_status=$?
c0d27fcc 5582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5583 (exit $ac_status); } &&
98418dba 5584 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5586 (eval $ac_try) 2>&5
5587 ac_status=$?
c0d27fcc 5588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5589 (exit $ac_status); }; }; then
98418dba 5590 ac_cv_header_sys_wait_h=yes
ba4481b5 5591else
503d2be0 5592 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5593sed 's/^/| /' conftest.$ac_ext >&5
5594
98418dba 5595ac_cv_header_sys_wait_h=no
ba4481b5 5596fi
98418dba 5597rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 5598fi
c0d27fcc 5599echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
98418dba
CW
5600echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
5601if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 5602
c0d27fcc 5603cat >>confdefs.h <<\_ACEOF
98418dba 5604#define HAVE_SYS_WAIT_H 1
c0d27fcc 5605_ACEOF
ba4481b5 5606
ba4481b5
DL
5607fi
5608
c0d27fcc
MR
5609
5610echo "$as_me:$LINENO: checking for struct utimbuf" >&5
98418dba
CW
5611echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
5612if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 5613 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 5614else
503d2be0 5615 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5616#line $LINENO "configure"
cd958eb3
MB
5617/* confdefs.h. */
5618_ACEOF
5619cat confdefs.h >>conftest.$ac_ext
5620cat >>conftest.$ac_ext <<_ACEOF
5621/* end confdefs.h. */
98418dba
CW
5622#ifdef TIME_WITH_SYS_TIME
5623#include <sys/time.h>
5624#include <time.h>
5625#else
5626#ifdef HAVE_SYS_TIME_H
5627#include <sys/time.h>
5628#else
1113b624 5629#include <time.h>
98418dba
CW
5630#endif
5631#endif
5632#ifdef HAVE_UTIME_H
5633#include <utime.h>
5634#endif
503d2be0
AS
5635int
5636main ()
5637{
98418dba 5638static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
5639 ;
5640 return 0;
5641}
5642_ACEOF
98418dba 5643rm -f conftest.$ac_objext
c0d27fcc 5644if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba 5645 (eval $ac_compile) 2>&5
503d2be0 5646 ac_status=$?
c0d27fcc 5647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5648 (exit $ac_status); } &&
98418dba 5649 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5651 (eval $ac_try) 2>&5
5652 ac_status=$?
c0d27fcc 5653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5654 (exit $ac_status); }; }; then
98418dba 5655 emacs_cv_struct_utimbuf=yes
1113b624 5656else
503d2be0 5657 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5658sed 's/^/| /' conftest.$ac_ext >&5
5659
98418dba 5660emacs_cv_struct_utimbuf=no
1113b624 5661fi
98418dba 5662rm -f conftest.$ac_objext conftest.$ac_ext
1113b624 5663fi
c0d27fcc 5664echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
98418dba
CW
5665echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6
5666if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 5667
c0d27fcc 5668cat >>confdefs.h <<\_ACEOF
98418dba 5669#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 5670_ACEOF
1113b624
PE
5671
5672fi
ba4481b5 5673
c0d27fcc 5674echo "$as_me:$LINENO: checking return type of signal handlers" >&5
98418dba
CW
5675echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5676if test "${ac_cv_type_signal+set}" = set; then
503d2be0 5677 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 5678else
98418dba 5679 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5680#line $LINENO "configure"
cd958eb3
MB
5681/* confdefs.h. */
5682_ACEOF
5683cat confdefs.h >>conftest.$ac_ext
5684cat >>conftest.$ac_ext <<_ACEOF
5685/* end confdefs.h. */
7397acc4 5686#include <sys/types.h>
98418dba
CW
5687#include <signal.h>
5688#ifdef signal
5689# undef signal
5690#endif
5691#ifdef __cplusplus
5692extern "C" void (*signal (int, void (*)(int)))(int);
5693#else
5694void (*signal ()) ();
5695#endif
5696
503d2be0
AS
5697int
5698main ()
5699{
98418dba 5700int i;
503d2be0
AS
5701 ;
5702 return 0;
5703}
5704_ACEOF
98418dba 5705rm -f conftest.$ac_objext
c0d27fcc 5706if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
5707 (eval $ac_compile) 2>&5
5708 ac_status=$?
c0d27fcc 5709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5710 (exit $ac_status); } &&
5711 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5713 (eval $ac_try) 2>&5
5714 ac_status=$?
c0d27fcc 5715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5716 (exit $ac_status); }; }; then
98418dba 5717 ac_cv_type_signal=void
503d2be0
AS
5718else
5719 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5720sed 's/^/| /' conftest.$ac_ext >&5
5721
98418dba 5722ac_cv_type_signal=int
503d2be0 5723fi
98418dba 5724rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 5725fi
c0d27fcc 5726echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
98418dba 5727echo "${ECHO_T}$ac_cv_type_signal" >&6
7397acc4 5728
c0d27fcc 5729cat >>confdefs.h <<_ACEOF
98418dba 5730#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
5731_ACEOF
5732
503d2be0 5733
c0d27fcc
MR
5734
5735echo "$as_me:$LINENO: checking for speed_t" >&5
98418dba
CW
5736echo $ECHO_N "checking for speed_t... $ECHO_C" >&6
5737if test "${emacs_cv_speed_t+set}" = set; then
5738 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 5739else
98418dba 5740 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5741#line $LINENO "configure"
cd958eb3
MB
5742/* confdefs.h. */
5743_ACEOF
5744cat confdefs.h >>conftest.$ac_ext
5745cat >>conftest.$ac_ext <<_ACEOF
5746/* end confdefs.h. */
98418dba 5747#include <termios.h>
98418dba
CW
5748int
5749main ()
5750{
5751speed_t x = 1;
5752 ;
5753 return 0;
5754}
5755_ACEOF
5756rm -f conftest.$ac_objext
c0d27fcc 5757if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
5758 (eval $ac_compile) 2>&5
5759 ac_status=$?
c0d27fcc 5760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5761 (exit $ac_status); } &&
5762 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
5764 (eval $ac_try) 2>&5
5765 ac_status=$?
c0d27fcc 5766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5767 (exit $ac_status); }; }; then
5768 emacs_cv_speed_t=yes
5769else
5770 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5771sed 's/^/| /' conftest.$ac_ext >&5
5772
98418dba
CW
5773emacs_cv_speed_t=no
5774fi
5775rm -f conftest.$ac_objext conftest.$ac_ext
5776fi
c0d27fcc 5777echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
98418dba
CW
5778echo "${ECHO_T}$emacs_cv_speed_t" >&6
5779if test $emacs_cv_speed_t = yes; then
b936fae4 5780
c0d27fcc 5781cat >>confdefs.h <<\_ACEOF
98418dba 5782#define HAVE_SPEED_T 1
c0d27fcc 5783_ACEOF
98418dba 5784
7397acc4
DL
5785fi
5786
c0d27fcc 5787echo "$as_me:$LINENO: checking for struct timeval" >&5
98418dba
CW
5788echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
5789if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 5790 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 5791else
503d2be0 5792 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5793#line $LINENO "configure"
cd958eb3
MB
5794/* confdefs.h. */
5795_ACEOF
5796cat confdefs.h >>conftest.$ac_ext
5797cat >>conftest.$ac_ext <<_ACEOF
5798/* end confdefs.h. */
98418dba
CW
5799#ifdef TIME_WITH_SYS_TIME
5800#include <sys/time.h>
5801#include <time.h>
5802#else
5803#ifdef HAVE_SYS_TIME_H
5804#include <sys/time.h>
5805#else
5806#include <time.h>
5807#endif
5808#endif
503d2be0
AS
5809int
5810main ()
5811{
98418dba 5812static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
5813 ;
5814 return 0;
5815}
5816_ACEOF
5817rm -f conftest.$ac_objext
c0d27fcc 5818if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
5819 (eval $ac_compile) 2>&5
5820 ac_status=$?
c0d27fcc 5821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5822 (exit $ac_status); } &&
5823 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5825 (eval $ac_try) 2>&5
5826 ac_status=$?
c0d27fcc 5827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5828 (exit $ac_status); }; }; then
98418dba 5829 emacs_cv_struct_timeval=yes
7397acc4 5830else
503d2be0 5831 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5832sed 's/^/| /' conftest.$ac_ext >&5
5833
98418dba 5834emacs_cv_struct_timeval=no
7397acc4 5835fi
503d2be0 5836rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 5837fi
c0d27fcc 5838echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
98418dba
CW
5839echo "${ECHO_T}$emacs_cv_struct_timeval" >&6
5840HAVE_TIMEVAL=$emacs_cv_struct_timeval
5841if test $emacs_cv_struct_timeval = yes; then
b936fae4 5842
c0d27fcc 5843cat >>confdefs.h <<\_ACEOF
98418dba 5844#define HAVE_TIMEVAL 1
c0d27fcc 5845_ACEOF
7397acc4
DL
5846
5847fi
5848
c0d27fcc 5849echo "$as_me:$LINENO: checking for struct exception" >&5
98418dba
CW
5850echo $ECHO_N "checking for struct exception... $ECHO_C" >&6
5851if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 5852 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5853else
503d2be0 5854 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5855#line $LINENO "configure"
cd958eb3
MB
5856/* confdefs.h. */
5857_ACEOF
5858cat confdefs.h >>conftest.$ac_ext
5859cat >>conftest.$ac_ext <<_ACEOF
5860/* end confdefs.h. */
98418dba 5861#include <math.h>
503d2be0
AS
5862int
5863main ()
5864{
98418dba 5865static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
5866 ;
5867 return 0;
ba4481b5 5868}
503d2be0
AS
5869_ACEOF
5870rm -f conftest.$ac_objext
c0d27fcc 5871if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
5872 (eval $ac_compile) 2>&5
5873 ac_status=$?
c0d27fcc 5874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5875 (exit $ac_status); } &&
5876 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5878 (eval $ac_try) 2>&5
5879 ac_status=$?
c0d27fcc 5880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5881 (exit $ac_status); }; }; then
98418dba 5882 emacs_cv_struct_exception=yes
ba4481b5 5883else
503d2be0 5884 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5885sed 's/^/| /' conftest.$ac_ext >&5
5886
98418dba 5887emacs_cv_struct_exception=no
ba4481b5 5888fi
503d2be0 5889rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 5890fi
c0d27fcc 5891echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
98418dba
CW
5892echo "${ECHO_T}$emacs_cv_struct_exception" >&6
5893HAVE_EXCEPTION=$emacs_cv_struct_exception
5894if test $emacs_cv_struct_exception != yes; then
b936fae4 5895
c0d27fcc 5896cat >>confdefs.h <<\_ACEOF
98418dba 5897#define NO_MATHERR 1
c0d27fcc 5898_ACEOF
ba4481b5
DL
5899
5900fi
5901
c0d27fcc 5902echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
98418dba
CW
5903echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
5904if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 5905 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 5906else
503d2be0 5907 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5908#line $LINENO "configure"
cd958eb3
MB
5909/* confdefs.h. */
5910_ACEOF
5911cat confdefs.h >>conftest.$ac_ext
5912cat >>conftest.$ac_ext <<_ACEOF
5913/* end confdefs.h. */
98418dba
CW
5914#include <sys/types.h>
5915#include <time.h>
7397acc4 5916
503d2be0
AS
5917int
5918main ()
5919{
98418dba 5920struct tm *tp; tp->tm_sec;
503d2be0
AS
5921 ;
5922 return 0;
5923}
5924_ACEOF
5925rm -f conftest.$ac_objext
c0d27fcc 5926if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
5927 (eval $ac_compile) 2>&5
5928 ac_status=$?
c0d27fcc 5929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5930 (exit $ac_status); } &&
5931 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5933 (eval $ac_try) 2>&5
5934 ac_status=$?
c0d27fcc 5935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5936 (exit $ac_status); }; }; then
98418dba 5937 ac_cv_struct_tm=time.h
7397acc4 5938else
503d2be0 5939 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5940sed 's/^/| /' conftest.$ac_ext >&5
5941
98418dba 5942ac_cv_struct_tm=sys/time.h
7397acc4 5943fi
503d2be0 5944rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 5945fi
c0d27fcc 5946echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
98418dba
CW
5947echo "${ECHO_T}$ac_cv_struct_tm" >&6
5948if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 5949
c0d27fcc 5950cat >>confdefs.h <<\_ACEOF
98418dba 5951#define TM_IN_SYS_TIME 1
c0d27fcc 5952_ACEOF
7397acc4
DL
5953
5954fi
ba4481b5 5955
c0d27fcc 5956echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
98418dba
CW
5957echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
5958if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 5959 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5960else
98418dba 5961 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5962#line $LINENO "configure"
cd958eb3
MB
5963/* confdefs.h. */
5964_ACEOF
5965cat confdefs.h >>conftest.$ac_ext
5966cat >>conftest.$ac_ext <<_ACEOF
5967/* end confdefs.h. */
98418dba
CW
5968#include <sys/types.h>
5969#include <$ac_cv_struct_tm>
ba4481b5 5970
c0d27fcc 5971
98418dba
CW
5972int
5973main ()
5974{
5975static struct tm ac_aggr;
5976if (ac_aggr.tm_zone)
5977return 0;
5978 ;
5979 return 0;
5980}
5981_ACEOF
5982rm -f conftest.$ac_objext
c0d27fcc 5983if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
5984 (eval $ac_compile) 2>&5
5985 ac_status=$?
c0d27fcc 5986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5987 (exit $ac_status); } &&
5988 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
5990 (eval $ac_try) 2>&5
5991 ac_status=$?
c0d27fcc 5992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5993 (exit $ac_status); }; }; then
5994 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 5995else
98418dba 5996 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5997sed 's/^/| /' conftest.$ac_ext >&5
5998
6bae0ccf
DL
5999cat >conftest.$ac_ext <<_ACEOF
6000#line $LINENO "configure"
cd958eb3
MB
6001/* confdefs.h. */
6002_ACEOF
6003cat confdefs.h >>conftest.$ac_ext
6004cat >>conftest.$ac_ext <<_ACEOF
6005/* end confdefs.h. */
6bae0ccf
DL
6006#include <sys/types.h>
6007#include <$ac_cv_struct_tm>
6008
6009
6010int
6011main ()
6012{
6013static struct tm ac_aggr;
6014if (sizeof ac_aggr.tm_zone)
6015return 0;
6016 ;
6017 return 0;
6018}
6019_ACEOF
6020rm -f conftest.$ac_objext
6021if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6022 (eval $ac_compile) 2>&5
6023 ac_status=$?
6024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6025 (exit $ac_status); } &&
6026 { ac_try='test -s conftest.$ac_objext'
6027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6028 (eval $ac_try) 2>&5
6029 ac_status=$?
6030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6031 (exit $ac_status); }; }; then
6032 ac_cv_member_struct_tm_tm_zone=yes
6033else
6034 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6035sed 's/^/| /' conftest.$ac_ext >&5
6036
98418dba 6037ac_cv_member_struct_tm_tm_zone=no
ba4481b5 6038fi
98418dba 6039rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 6040fi
6bae0ccf
DL
6041rm -f conftest.$ac_objext conftest.$ac_ext
6042fi
c0d27fcc 6043echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
98418dba
CW
6044echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
6045if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 6046
c0d27fcc 6047cat >>confdefs.h <<_ACEOF
98418dba 6048#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
6049_ACEOF
6050
ba4481b5 6051
98418dba 6052fi
ba4481b5 6053
98418dba 6054if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 6055
c0d27fcc 6056cat >>confdefs.h <<\_ACEOF
98418dba 6057#define HAVE_TM_ZONE 1
c0d27fcc 6058_ACEOF
ba4481b5 6059
ba4481b5 6060else
c0d27fcc 6061 echo "$as_me:$LINENO: checking for tzname" >&5
98418dba
CW
6062echo $ECHO_N "checking for tzname... $ECHO_C" >&6
6063if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 6064 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6065else
98418dba 6066 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6067#line $LINENO "configure"
cd958eb3
MB
6068/* confdefs.h. */
6069_ACEOF
6070cat confdefs.h >>conftest.$ac_ext
6071cat >>conftest.$ac_ext <<_ACEOF
6072/* end confdefs.h. */
98418dba
CW
6073#include <time.h>
6074#ifndef tzname /* For SGI. */
6075extern char *tzname[]; /* RS6000 and others reject char **tzname. */
6076#endif
6077
98418dba
CW
6078int
6079main ()
6080{
6081atoi(*tzname);
6082 ;
6083 return 0;
6084}
6085_ACEOF
6086rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 6087if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
6088 (eval $ac_link) 2>&5
6089 ac_status=$?
c0d27fcc 6090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6091 (exit $ac_status); } &&
6092 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 6093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6094 (eval $ac_try) 2>&5
6095 ac_status=$?
c0d27fcc 6096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6097 (exit $ac_status); }; }; then
6098 ac_cv_var_tzname=yes
6099else
6100 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6101sed 's/^/| /' conftest.$ac_ext >&5
6102
98418dba 6103ac_cv_var_tzname=no
ba4481b5 6104fi
98418dba
CW
6105rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6106fi
c0d27fcc 6107echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
98418dba
CW
6108echo "${ECHO_T}$ac_cv_var_tzname" >&6
6109 if test $ac_cv_var_tzname = yes; then
ba4481b5 6110
c0d27fcc 6111cat >>confdefs.h <<\_ACEOF
98418dba 6112#define HAVE_TZNAME 1
c0d27fcc 6113_ACEOF
503d2be0 6114
98418dba
CW
6115 fi
6116fi
503d2be0 6117
c0d27fcc 6118echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
b936fae4
AS
6119echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6
6120if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
6121 echo $ECHO_N "(cached) $ECHO_C" >&6
6122else
6123 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6124#line $LINENO "configure"
cd958eb3
MB
6125/* confdefs.h. */
6126_ACEOF
6127cat confdefs.h >>conftest.$ac_ext
6128cat >>conftest.$ac_ext <<_ACEOF
6129/* end confdefs.h. */
98418dba 6130#include <time.h>
b936fae4 6131
98418dba
CW
6132int
6133main ()
6134{
b936fae4
AS
6135static struct tm ac_aggr;
6136if (ac_aggr.tm_gmtoff)
6137return 0;
98418dba
CW
6138 ;
6139 return 0;
6140}
6141_ACEOF
b936fae4 6142rm -f conftest.$ac_objext
c0d27fcc 6143if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
b936fae4 6144 (eval $ac_compile) 2>&5
98418dba 6145 ac_status=$?
c0d27fcc 6146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6147 (exit $ac_status); } &&
b936fae4 6148 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6150 (eval $ac_try) 2>&5
6151 ac_status=$?
c0d27fcc 6152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6153 (exit $ac_status); }; }; then
b936fae4 6154 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
6155else
6156 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6157sed 's/^/| /' conftest.$ac_ext >&5
6158
8799b3e4 6159cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6160#line $LINENO "configure"
cd958eb3
MB
6161/* confdefs.h. */
6162_ACEOF
6163cat confdefs.h >>conftest.$ac_ext
6164cat >>conftest.$ac_ext <<_ACEOF
6165/* end confdefs.h. */
6bae0ccf
DL
6166#include <time.h>
6167
8799b3e4
CW
6168int
6169main ()
6170{
6bae0ccf
DL
6171static struct tm ac_aggr;
6172if (sizeof ac_aggr.tm_gmtoff)
6173return 0;
8799b3e4
CW
6174 ;
6175 return 0;
6176}
6177_ACEOF
6bae0ccf 6178rm -f conftest.$ac_objext
c0d27fcc 6179if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8799b3e4
CW
6180 (eval $ac_compile) 2>&5
6181 ac_status=$?
c0d27fcc 6182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4
CW
6183 (exit $ac_status); } &&
6184 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6185 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8799b3e4
CW
6186 (eval $ac_try) 2>&5
6187 ac_status=$?
c0d27fcc 6188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 6189 (exit $ac_status); }; }; then
6bae0ccf 6190 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
6191else
6192 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6193sed 's/^/| /' conftest.$ac_ext >&5
6194
6bae0ccf 6195ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 6196fi
6bae0ccf
DL
6197rm -f conftest.$ac_objext conftest.$ac_ext
6198fi
6199rm -f conftest.$ac_objext conftest.$ac_ext
8799b3e4 6200fi
6bae0ccf
DL
6201echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
6202echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6
6203if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
6204
6205cat >>confdefs.h <<\_ACEOF
6206#define HAVE_TM_GMTOFF 1
6207_ACEOF
6208
6209fi
6210
8799b3e4 6211
8799b3e4 6212
c0d27fcc 6213echo "$as_me:$LINENO: checking for function prototypes" >&5
98418dba
CW
6214echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
6215if test "$ac_cv_prog_cc_stdc" != no; then
c0d27fcc 6216 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
6217echo "${ECHO_T}yes" >&6
6218
c0d27fcc 6219cat >>confdefs.h <<\_ACEOF
98418dba 6220#define PROTOTYPES 1
c0d27fcc
MR
6221_ACEOF
6222
6223
6224cat >>confdefs.h <<\_ACEOF
6225#define __PROTOTYPES 1
6226_ACEOF
98418dba
CW
6227
6228else
c0d27fcc 6229 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
6230echo "${ECHO_T}no" >&6
6231fi
6232
c0d27fcc 6233echo "$as_me:$LINENO: checking for working volatile" >&5
98418dba
CW
6234echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
6235if test "${ac_cv_c_volatile+set}" = set; then
6236 echo $ECHO_N "(cached) $ECHO_C" >&6
6237else
6238 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6239#line $LINENO "configure"
cd958eb3
MB
6240/* confdefs.h. */
6241_ACEOF
6242cat confdefs.h >>conftest.$ac_ext
6243cat >>conftest.$ac_ext <<_ACEOF
6244/* end confdefs.h. */
98418dba 6245
98418dba
CW
6246int
6247main ()
6248{
6249
6250volatile int x;
6251int * volatile y;
6252 ;
6253 return 0;
6254}
6255_ACEOF
6256rm -f conftest.$ac_objext
c0d27fcc 6257if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
6258 (eval $ac_compile) 2>&5
6259 ac_status=$?
c0d27fcc 6260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6261 (exit $ac_status); } &&
6262 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6264 (eval $ac_try) 2>&5
6265 ac_status=$?
c0d27fcc 6266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6267 (exit $ac_status); }; }; then
6268 ac_cv_c_volatile=yes
6269else
6270 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6271sed 's/^/| /' conftest.$ac_ext >&5
6272
98418dba
CW
6273ac_cv_c_volatile=no
6274fi
6275rm -f conftest.$ac_objext conftest.$ac_ext
6276fi
c0d27fcc 6277echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
98418dba
CW
6278echo "${ECHO_T}$ac_cv_c_volatile" >&6
6279if test $ac_cv_c_volatile = no; then
6280
c0d27fcc 6281cat >>confdefs.h <<\_ACEOF
98418dba 6282#define volatile
c0d27fcc 6283_ACEOF
98418dba
CW
6284
6285fi
6286
c0d27fcc 6287echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
98418dba
CW
6288echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
6289if test "${ac_cv_c_const+set}" = set; then
6290 echo $ECHO_N "(cached) $ECHO_C" >&6
6291else
6292 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6293#line $LINENO "configure"
cd958eb3
MB
6294/* confdefs.h. */
6295_ACEOF
6296cat confdefs.h >>conftest.$ac_ext
6297cat >>conftest.$ac_ext <<_ACEOF
6298/* end confdefs.h. */
98418dba 6299
98418dba
CW
6300int
6301main ()
6302{
6303/* FIXME: Include the comments suggested by Paul. */
6304#ifndef __cplusplus
6305 /* Ultrix mips cc rejects this. */
6306 typedef int charset[2];
6307 const charset x;
6308 /* SunOS 4.1.1 cc rejects this. */
6309 char const *const *ccp;
6310 char **p;
6311 /* NEC SVR4.0.2 mips cc rejects this. */
6312 struct point {int x, y;};
6313 static struct point const zero = {0,0};
6314 /* AIX XL C 1.02.0.0 rejects this.
6315 It does not let you subtract one const X* pointer from another in
6316 an arm of an if-expression whose if-part is not a constant
6317 expression */
6318 const char *g = "string";
6319 ccp = &g + (g ? g-g : 0);
6320 /* HPUX 7.0 cc rejects these. */
6321 ++ccp;
6322 p = (char**) ccp;
6323 ccp = (char const *const *) p;
6324 { /* SCO 3.2v4 cc rejects this. */
6325 char *t;
6326 char const *s = 0 ? (char *) 0 : (char const *) 0;
6327
6328 *t++ = 0;
6329 }
6330 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6331 int x[] = {25, 17};
6332 const int *foo = &x[0];
6333 ++foo;
6334 }
6335 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6336 typedef const int *iptr;
6337 iptr p = 0;
6338 ++p;
6339 }
6340 { /* AIX XL C 1.02.0.0 rejects this saying
6341 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6342 struct s { int j; const int *ap[3]; };
6343 struct s *b; b->j = 5;
6344 }
6345 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6346 const int foo = 10;
6347 }
6348#endif
6349
6350 ;
6351 return 0;
6352}
6353_ACEOF
6354rm -f conftest.$ac_objext
c0d27fcc 6355if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
6356 (eval $ac_compile) 2>&5
6357 ac_status=$?
c0d27fcc 6358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6359 (exit $ac_status); } &&
6360 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6361 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6362 (eval $ac_try) 2>&5
6363 ac_status=$?
c0d27fcc 6364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6365 (exit $ac_status); }; }; then
6366 ac_cv_c_const=yes
6367else
6368 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6369sed 's/^/| /' conftest.$ac_ext >&5
6370
98418dba
CW
6371ac_cv_c_const=no
6372fi
6373rm -f conftest.$ac_objext conftest.$ac_ext
6374fi
c0d27fcc 6375echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
98418dba
CW
6376echo "${ECHO_T}$ac_cv_c_const" >&6
6377if test $ac_cv_c_const = no; then
6378
c0d27fcc 6379cat >>confdefs.h <<\_ACEOF
98418dba 6380#define const
c0d27fcc 6381_ACEOF
98418dba
CW
6382
6383fi
6384
c0d27fcc 6385echo "$as_me:$LINENO: checking for void * support" >&5
98418dba
CW
6386echo $ECHO_N "checking for void * support... $ECHO_C" >&6
6387if test "${emacs_cv_void_star+set}" = set; then
6388 echo $ECHO_N "(cached) $ECHO_C" >&6
6389else
6390 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6391#line $LINENO "configure"
cd958eb3
MB
6392/* confdefs.h. */
6393_ACEOF
6394cat confdefs.h >>conftest.$ac_ext
6395cat >>conftest.$ac_ext <<_ACEOF
6396/* end confdefs.h. */
98418dba 6397
98418dba
CW
6398int
6399main ()
6400{
6401void * foo;
6402 ;
6403 return 0;
6404}
6405_ACEOF
6406rm -f conftest.$ac_objext
c0d27fcc 6407if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
6408 (eval $ac_compile) 2>&5
6409 ac_status=$?
c0d27fcc 6410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6411 (exit $ac_status); } &&
6412 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6414 (eval $ac_try) 2>&5
6415 ac_status=$?
c0d27fcc 6416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6417 (exit $ac_status); }; }; then
6418 emacs_cv_void_star=yes
6419else
6420 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6421sed 's/^/| /' conftest.$ac_ext >&5
6422
98418dba
CW
6423emacs_cv_void_star=no
6424fi
6425rm -f conftest.$ac_objext conftest.$ac_ext
6426fi
c0d27fcc 6427echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
98418dba
CW
6428echo "${ECHO_T}$emacs_cv_void_star" >&6
6429if test $emacs_cv_void_star = yes; then
c0d27fcc 6430 cat >>confdefs.h <<\_ACEOF
98418dba 6431#define POINTER_TYPE void
c0d27fcc 6432_ACEOF
98418dba
CW
6433
6434else
c0d27fcc 6435 cat >>confdefs.h <<\_ACEOF
98418dba 6436#define POINTER_TYPE char
c0d27fcc 6437_ACEOF
98418dba
CW
6438
6439fi
6440
c0d27fcc 6441
cd958eb3
MB
6442
6443echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
6444echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
98418dba
CW
6445set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
6446if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
6447 echo $ECHO_N "(cached) $ECHO_C" >&6
6448else
c0d27fcc 6449 cat >conftest.make <<\_ACEOF
98418dba 6450all:
cd958eb3 6451 @echo 'ac_maketemp="$(MAKE)"'
c0d27fcc 6452_ACEOF
98418dba
CW
6453# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6454eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
6455if test -n "$ac_maketemp"; then
6456 eval ac_cv_prog_make_${ac_make}_set=yes
6457else
6458 eval ac_cv_prog_make_${ac_make}_set=no
6459fi
6460rm -f conftest.make
6461fi
6462if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
c0d27fcc 6463 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
6464echo "${ECHO_T}yes" >&6
6465 SET_MAKE=
6466else
c0d27fcc 6467 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
6468echo "${ECHO_T}no" >&6
6469 SET_MAKE="MAKE=${MAKE-make}"
6470fi
6471
c0d27fcc
MR
6472
6473echo "$as_me:$LINENO: checking for long file names" >&5
98418dba
CW
6474echo $ECHO_N "checking for long file names... $ECHO_C" >&6
6475if test "${ac_cv_sys_long_file_names+set}" = set; then
6476 echo $ECHO_N "(cached) $ECHO_C" >&6
6477else
6478 ac_cv_sys_long_file_names=yes
6479# Test for long file names in all the places we know might matter:
6480# . the current directory, where building will happen
6481# $prefix/lib where we will be installing things
6482# $exec_prefix/lib likewise
6483# eval it to expand exec_prefix.
6484# $TMPDIR if set, where it might want to write temporary files
6485# if $TMPDIR is not set:
6486# /tmp where it might want to write temporary files
6487# /var/tmp likewise
6488# /usr/tmp likewise
6489if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
6490 ac_tmpdirs=$TMPDIR
6491else
6492 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
6493fi
6494for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
6495 test -d $ac_dir || continue
6496 test -w $ac_dir || continue # It is less confusing to not echo anything here.
6497 ac_xdir=$ac_dir/cf$$
6498 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
6499 ac_tf1=$ac_xdir/conftest9012345
6500 ac_tf2=$ac_xdir/conftest9012346
6501 (echo 1 >$ac_tf1) 2>/dev/null
6502 (echo 2 >$ac_tf2) 2>/dev/null
6503 ac_val=`cat $ac_tf1 2>/dev/null`
6504 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
6505 ac_cv_sys_long_file_names=no
6506 rm -rf $ac_xdir 2>/dev/null
6507 break
6508 fi
6509 rm -rf $ac_xdir 2>/dev/null
6510done
6511fi
c0d27fcc 6512echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
98418dba
CW
6513echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
6514if test $ac_cv_sys_long_file_names = yes; then
6515
c0d27fcc 6516cat >>confdefs.h <<\_ACEOF
98418dba 6517#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 6518_ACEOF
98418dba
CW
6519
6520fi
6521
c0d27fcc 6522
98418dba
CW
6523#### Choose a window system.
6524
c0d27fcc 6525echo "$as_me:$LINENO: checking for X" >&5
98418dba
CW
6526echo $ECHO_N "checking for X... $ECHO_C" >&6
6527
c0d27fcc 6528
98418dba
CW
6529# Check whether --with-x or --without-x was given.
6530if test "${with_x+set}" = set; then
6531 withval="$with_x"
6532
6533fi;
6534# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6535if test "x$with_x" = xno; then
6536 # The user explicitly disabled X.
6537 have_x=disabled
6538else
6539 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
6540 # Both variables are already set.
6541 have_x=yes
6542 else
6543 if test "${ac_cv_have_x+set}" = set; then
6544 echo $ECHO_N "(cached) $ECHO_C" >&6
6545else
6546 # One or both of the vars are not set, and there is no cached value.
6547ac_x_includes=no ac_x_libraries=no
6548rm -fr conftest.dir
6549if mkdir conftest.dir; then
6550 cd conftest.dir
6551 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
c0d27fcc 6552 cat >Imakefile <<'_ACEOF'
98418dba
CW
6553acfindx:
6554 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
c0d27fcc 6555_ACEOF
98418dba
CW
6556 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6557 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6558 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6559 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6560 for ac_extension in a so sl; do
6561 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
6562 test -f $ac_im_libdir/libX11.$ac_extension; then
6563 ac_im_usrlibdir=$ac_im_libdir; break
6564 fi
6565 done
6566 # Screen out bogus values from the imake configuration. They are
6567 # bogus both because they are the default anyway, and because
6568 # using them would break gcc on systems where it needs fixed includes.
6569 case $ac_im_incroot in
6570 /usr/include) ;;
6571 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6572 esac
6573 case $ac_im_usrlibdir in
6574 /usr/lib | /lib) ;;
6575 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6576 esac
6577 fi
6578 cd ..
6579 rm -fr conftest.dir
6580fi
6581
6582# Standard set of common directories for X headers.
6583# Check X11 before X11Rn because it is often a symlink to the current release.
6584ac_x_header_dirs='
6585/usr/X11/include
6586/usr/X11R6/include
6587/usr/X11R5/include
6588/usr/X11R4/include
6589
6590/usr/include/X11
6591/usr/include/X11R6
6592/usr/include/X11R5
6593/usr/include/X11R4
6594
6595/usr/local/X11/include
6596/usr/local/X11R6/include
6597/usr/local/X11R5/include
6598/usr/local/X11R4/include
6599
6600/usr/local/include/X11
6601/usr/local/include/X11R6
6602/usr/local/include/X11R5
6603/usr/local/include/X11R4
6604
6605/usr/X386/include
6606/usr/x386/include
6607/usr/XFree86/include/X11
6608
6609/usr/include
6610/usr/local/include
6611/usr/unsupported/include
6612/usr/athena/include
6613/usr/local/x11r5/include
6614/usr/lpp/Xamples/include
6615
6616/usr/openwin/include
6617/usr/openwin/share/include'
6618
6619if test "$ac_x_includes" = no; then
6620 # Guess where to find include files, by looking for Intrinsic.h.
6621 # First, try using that file with no special directory specified.
6622 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6623#line $LINENO "configure"
cd958eb3
MB
6624/* confdefs.h. */
6625_ACEOF
6626cat confdefs.h >>conftest.$ac_ext
6627cat >>conftest.$ac_ext <<_ACEOF
6628/* end confdefs.h. */
98418dba
CW
6629#include <X11/Intrinsic.h>
6630_ACEOF
c0d27fcc 6631if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
6632 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6633 ac_status=$?
6bae0ccf 6634 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6635 rm -f conftest.er1
6636 cat conftest.err >&5
c0d27fcc 6637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6638 (exit $ac_status); } >/dev/null; then
6639 if test -s conftest.err; then
6640 ac_cpp_err=$ac_c_preproc_warn_flag
6641 else
6642 ac_cpp_err=
6643 fi
6644else
6645 ac_cpp_err=yes
6646fi
6647if test -z "$ac_cpp_err"; then
6648 # We can compile using X headers with no special include directory.
6649ac_x_includes=
6650else
6651 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6652sed 's/^/| /' conftest.$ac_ext >&5
6653
98418dba
CW
6654 for ac_dir in $ac_x_header_dirs; do
6655 if test -r "$ac_dir/X11/Intrinsic.h"; then
6656 ac_x_includes=$ac_dir
6657 break
6658 fi
6659done
6660fi
6661rm -f conftest.err conftest.$ac_ext
6662fi # $ac_x_includes = no
6663
6664if test "$ac_x_libraries" = no; then
6665 # Check for the libraries.
6666 # See if we find them without any special options.
6667 # Don't add to $LIBS permanently.
6668 ac_save_LIBS=$LIBS
6669 LIBS="-lXt $LIBS"
6670 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6671#line $LINENO "configure"
cd958eb3
MB
6672/* confdefs.h. */
6673_ACEOF
6674cat confdefs.h >>conftest.$ac_ext
6675cat >>conftest.$ac_ext <<_ACEOF
6676/* end confdefs.h. */
98418dba 6677#include <X11/Intrinsic.h>
98418dba
CW
6678int
6679main ()
6680{
6681XtMalloc (0)
6682 ;
6683 return 0;
6684}
6685_ACEOF
6686rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 6687if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
6688 (eval $ac_link) 2>&5
6689 ac_status=$?
c0d27fcc 6690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6691 (exit $ac_status); } &&
6692 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 6693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6694 (eval $ac_try) 2>&5
6695 ac_status=$?
c0d27fcc 6696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6697 (exit $ac_status); }; }; then
6698 LIBS=$ac_save_LIBS
6699# We can link X programs with no special library path.
6700ac_x_libraries=
6701else
6702 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6703sed 's/^/| /' conftest.$ac_ext >&5
6704
98418dba
CW
6705LIBS=$ac_save_LIBS
6706for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6707do
6708 # Don't even attempt the hair of trying to link an X program!
6709 for ac_extension in a so sl; do
6710 if test -r $ac_dir/libXt.$ac_extension; then
6711 ac_x_libraries=$ac_dir
6712 break 2
6713 fi
6714 done
6715done
6716fi
6717rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6718fi # $ac_x_libraries = no
6719
6720if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
6721 # Didn't find X anywhere. Cache the known absence of X.
6722 ac_cv_have_x="have_x=no"
6723else
6724 # Record where we found X for the cache.
6725 ac_cv_have_x="have_x=yes \
6726 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
6727fi
6728fi
6729
6730 fi
6731 eval "$ac_cv_have_x"
6732fi # $with_x != no
6733
6734if test "$have_x" != yes; then
c0d27fcc 6735 echo "$as_me:$LINENO: result: $have_x" >&5
98418dba
CW
6736echo "${ECHO_T}$have_x" >&6
6737 no_x=yes
6738else
6739 # If each of the values was on the command line, it overrides each guess.
6740 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6741 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6742 # Update the cache value to reflect the command line values.
6743 ac_cv_have_x="have_x=yes \
6744 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
c0d27fcc 6745 echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
98418dba
CW
6746echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
6747fi
6748
6749if test "$no_x" = yes; then
6750 window_system=none
6751else
6752 window_system=x11
6753fi
6754
6755if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
6756 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
6757 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
6758 x_default_search_path=""
6759 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
6760 x_search_path="\
6761${x_library}/X11/%L/%T/%N%C%S:\
6762${x_library}/X11/%l/%T/%N%C%S:\
6763${x_library}/X11/%T/%N%C%S:\
6764${x_library}/X11/%L/%T/%N%S:\
6765${x_library}/X11/%l/%T/%N%S:\
6766${x_library}/X11/%T/%N%S"
6767 if test x"${x_default_search_path}" = x; then
6768 x_default_search_path=${x_search_path}
6769 else
6770 x_default_search_path="${x_search_path}:${x_default_search_path}"
6771 fi
6772 done
6773fi
6774if test "${x_includes}" != NONE && test -n "${x_includes}"; then
6775 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
6776fi
6777
6778if test x"${x_includes}" = x; then
6779 bitmapdir=/usr/include/X11/bitmaps
6780else
6781 # accumulate include directories that have X11 bitmap subdirectories
6782 bmd_acc="dummyval"
6783 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
6784 if test -d "${bmd}/X11/bitmaps"; then
6785 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
6786 fi
6787 if test -d "${bmd}/bitmaps"; then
6788 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
6789 fi
6790 done
6791 if test ${bmd_acc} != "dummyval"; then
6792 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
6793 fi
6794fi
6795
6796case "${window_system}" in
6797 x11 )
6798 HAVE_X_WINDOWS=yes
6799 HAVE_X11=yes
6800 case "${with_x_toolkit}" in
6801 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
6802 motif ) USE_X_TOOLKIT=MOTIF ;;
6803 no ) USE_X_TOOLKIT=none ;;
6804 * ) USE_X_TOOLKIT=maybe ;;
6805 esac
6806 ;;
6807 none )
6808 HAVE_X_WINDOWS=no
6809 HAVE_X11=no
6810 USE_X_TOOLKIT=none
6811 ;;
6812esac
6813
6814### If we're using X11, we should use the X menu package.
6815HAVE_MENUS=no
6816case ${HAVE_X11} in
6817 yes ) HAVE_MENUS=yes ;;
6818esac
6819
6820if test "${opsys}" = "hpux9"; then
6821 case "${x_libraries}" in
6822 *X11R4* )
6823 opsysfile="s/hpux9-x11r4.h"
6824 ;;
6825 esac
6826fi
6827
6828if test "${opsys}" = "hpux9shr"; then
6829 case "${x_libraries}" in
6830 *X11R4* )
6831 opsysfile="s/hpux9shxr4.h"
6832 ;;
6833 esac
6834fi
6835
6836### Compute the unexec source name from the object name.
6837UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
6838
6839# Do the opsystem or machine files prohibit the use of the GNU malloc?
6840# Assume not, until told otherwise.
6841GNU_MALLOC=yes
6842doug_lea_malloc=yes
c0d27fcc 6843echo "$as_me:$LINENO: checking for malloc_get_state" >&5
98418dba
CW
6844echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6
6845if test "${ac_cv_func_malloc_get_state+set}" = set; then
6846 echo $ECHO_N "(cached) $ECHO_C" >&6
6847else
6848 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6849#line $LINENO "configure"
cd958eb3
MB
6850/* confdefs.h. */
6851_ACEOF
6852cat confdefs.h >>conftest.$ac_ext
6853cat >>conftest.$ac_ext <<_ACEOF
6854/* end confdefs.h. */
98418dba 6855/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
6856 which can conflict with char malloc_get_state (); below.
6857 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6858 <limits.h> exists even on freestanding compilers. */
6859#ifdef __STDC__
6860# include <limits.h>
6861#else
6862# include <assert.h>
6863#endif
98418dba
CW
6864/* Override any gcc2 internal prototype to avoid an error. */
6865#ifdef __cplusplus
6866extern "C"
cd958eb3 6867{
98418dba
CW
6868#endif
6869/* We use char because int might match the return type of a gcc2
6870 builtin and then its argument prototype would still apply. */
6871char malloc_get_state ();
98418dba
CW
6872/* The GNU C library defines this for functions which it implements
6873 to always fail with ENOSYS. Some functions are actually named
6874 something starting with __ and the normal name is an alias. */
6875#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
6876choke me
6877#else
cd958eb3
MB
6878char (*f) () = malloc_get_state;
6879#endif
6880#ifdef __cplusplus
6881}
98418dba
CW
6882#endif
6883
cd958eb3
MB
6884int
6885main ()
6886{
9e71690e 6887return f != malloc_get_state;
98418dba
CW
6888 ;
6889 return 0;
6890}
6891_ACEOF
6892rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 6893if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
6894 (eval $ac_link) 2>&5
6895 ac_status=$?
c0d27fcc 6896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6897 (exit $ac_status); } &&
6898 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 6899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6900 (eval $ac_try) 2>&5
6901 ac_status=$?
c0d27fcc 6902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6903 (exit $ac_status); }; }; then
6904 ac_cv_func_malloc_get_state=yes
6905else
6906 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6907sed 's/^/| /' conftest.$ac_ext >&5
6908
98418dba
CW
6909ac_cv_func_malloc_get_state=no
6910fi
6911rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6912fi
c0d27fcc 6913echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
98418dba
CW
6914echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6
6915if test $ac_cv_func_malloc_get_state = yes; then
6916 :
6917else
6918 doug_lea_malloc=no
6919fi
6920
c0d27fcc 6921echo "$as_me:$LINENO: checking for malloc_set_state" >&5
98418dba
CW
6922echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6
6923if test "${ac_cv_func_malloc_set_state+set}" = set; then
6924 echo $ECHO_N "(cached) $ECHO_C" >&6
6925else
6926 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6927#line $LINENO "configure"
cd958eb3
MB
6928/* confdefs.h. */
6929_ACEOF
6930cat confdefs.h >>conftest.$ac_ext
6931cat >>conftest.$ac_ext <<_ACEOF
6932/* end confdefs.h. */
98418dba 6933/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
6934 which can conflict with char malloc_set_state (); below.
6935 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6936 <limits.h> exists even on freestanding compilers. */
6937#ifdef __STDC__
6938# include <limits.h>
6939#else
6940# include <assert.h>
6941#endif
98418dba
CW
6942/* Override any gcc2 internal prototype to avoid an error. */
6943#ifdef __cplusplus
6944extern "C"
cd958eb3 6945{
98418dba
CW
6946#endif
6947/* We use char because int might match the return type of a gcc2
6948 builtin and then its argument prototype would still apply. */
6949char malloc_set_state ();
98418dba
CW
6950/* The GNU C library defines this for functions which it implements
6951 to always fail with ENOSYS. Some functions are actually named
6952 something starting with __ and the normal name is an alias. */
6953#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
6954choke me
6955#else
cd958eb3
MB
6956char (*f) () = malloc_set_state;
6957#endif
6958#ifdef __cplusplus
6959}
98418dba
CW
6960#endif
6961
cd958eb3
MB
6962int
6963main ()
6964{
9e71690e 6965return f != malloc_set_state;
98418dba
CW
6966 ;
6967 return 0;
6968}
6969_ACEOF
6970rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 6971if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
6972 (eval $ac_link) 2>&5
6973 ac_status=$?
c0d27fcc 6974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6975 (exit $ac_status); } &&
6976 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 6977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6978 (eval $ac_try) 2>&5
6979 ac_status=$?
c0d27fcc 6980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6981 (exit $ac_status); }; }; then
6982 ac_cv_func_malloc_set_state=yes
6983else
6984 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6985sed 's/^/| /' conftest.$ac_ext >&5
6986
98418dba
CW
6987ac_cv_func_malloc_set_state=no
6988fi
6989rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6990fi
c0d27fcc 6991echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
98418dba
CW
6992echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6
6993if test $ac_cv_func_malloc_set_state = yes; then
6994 :
6995else
6996 doug_lea_malloc=no
6997fi
6998
c0d27fcc 6999echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
98418dba
CW
7000echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6
7001if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
7002 echo $ECHO_N "(cached) $ECHO_C" >&6
7003else
7004 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7005#line $LINENO "configure"
cd958eb3
MB
7006/* confdefs.h. */
7007_ACEOF
7008cat confdefs.h >>conftest.$ac_ext
7009cat >>conftest.$ac_ext <<_ACEOF
7010/* end confdefs.h. */
98418dba 7011extern void (* __after_morecore_hook)();
98418dba
CW
7012int
7013main ()
7014{
7015__after_morecore_hook = 0
7016 ;
7017 return 0;
7018}
7019_ACEOF
7020rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7021if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7022 (eval $ac_link) 2>&5
7023 ac_status=$?
c0d27fcc 7024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7025 (exit $ac_status); } &&
7026 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7028 (eval $ac_try) 2>&5
7029 ac_status=$?
c0d27fcc 7030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7031 (exit $ac_status); }; }; then
7032 emacs_cv_var___after_morecore_hook=yes
7033else
7034 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7035sed 's/^/| /' conftest.$ac_ext >&5
7036
98418dba
CW
7037emacs_cv_var___after_morecore_hook=no
7038fi
7039rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7040fi
c0d27fcc 7041echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
98418dba
CW
7042echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6
7043if test $emacs_cv_var___after_morecore_hook = no; then
7044 doug_lea_malloc=no
7045fi
7046if test "${system_malloc}" = "yes"; then
7047 GNU_MALLOC=no
7048 GNU_MALLOC_reason="
7049 (The GNU allocators don't work with this system configuration.)"
7050fi
7051if test "$doug_lea_malloc" = "yes" ; then
7052 if test "$GNU_MALLOC" = yes ; then
7053 GNU_MALLOC_reason="
7054 (Using Doug Lea's new malloc from the GNU C Library.)"
7055 fi
b936fae4 7056
c0d27fcc 7057cat >>confdefs.h <<\_ACEOF
98418dba 7058#define DOUG_LEA_MALLOC 1
c0d27fcc 7059_ACEOF
98418dba
CW
7060
7061fi
7062
7063if test x"${REL_ALLOC}" = x; then
7064 REL_ALLOC=${GNU_MALLOC}
7065fi
7066
7067
c0d27fcc
MR
7068
7069
7070for ac_header in stdlib.h unistd.h
98418dba
CW
7071do
7072as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
7073if eval "test \"\${$as_ac_Header+set}\" = set"; then
7074 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
7075echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7076if eval "test \"\${$as_ac_Header+set}\" = set"; then
7077 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
7078fi
7079echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7080echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 7081else
c0d27fcc
MR
7082 # Is the header compilable?
7083echo "$as_me:$LINENO: checking $ac_header usability" >&5
7084echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7085cat >conftest.$ac_ext <<_ACEOF
7086#line $LINENO "configure"
cd958eb3
MB
7087/* confdefs.h. */
7088_ACEOF
7089cat confdefs.h >>conftest.$ac_ext
7090cat >>conftest.$ac_ext <<_ACEOF
7091/* end confdefs.h. */
98418dba
CW
7092$ac_includes_default
7093#include <$ac_header>
7094_ACEOF
7095rm -f conftest.$ac_objext
c0d27fcc 7096if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
7097 (eval $ac_compile) 2>&5
7098 ac_status=$?
c0d27fcc 7099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7100 (exit $ac_status); } &&
7101 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7103 (eval $ac_try) 2>&5
7104 ac_status=$?
c0d27fcc 7105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7106 (exit $ac_status); }; }; then
c0d27fcc 7107 ac_header_compiler=yes
98418dba
CW
7108else
7109 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7110sed 's/^/| /' conftest.$ac_ext >&5
7111
c0d27fcc 7112ac_header_compiler=no
98418dba
CW
7113fi
7114rm -f conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
7115echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7116echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 7117
c0d27fcc
MR
7118# Is the header present?
7119echo "$as_me:$LINENO: checking $ac_header presence" >&5
7120echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7121cat >conftest.$ac_ext <<_ACEOF
7122#line $LINENO "configure"
cd958eb3
MB
7123/* confdefs.h. */
7124_ACEOF
7125cat confdefs.h >>conftest.$ac_ext
7126cat >>conftest.$ac_ext <<_ACEOF
7127/* end confdefs.h. */
98418dba
CW
7128#include <$ac_header>
7129_ACEOF
c0d27fcc 7130if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
7131 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7132 ac_status=$?
6bae0ccf 7133 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
7134 rm -f conftest.er1
7135 cat conftest.err >&5
c0d27fcc 7136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7137 (exit $ac_status); } >/dev/null; then
7138 if test -s conftest.err; then
7139 ac_cpp_err=$ac_c_preproc_warn_flag
7140 else
7141 ac_cpp_err=
7142 fi
7143else
7144 ac_cpp_err=yes
7145fi
7146if test -z "$ac_cpp_err"; then
c0d27fcc 7147 ac_header_preproc=yes
98418dba
CW
7148else
7149 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7150sed 's/^/| /' conftest.$ac_ext >&5
7151
c0d27fcc 7152 ac_header_preproc=no
98418dba
CW
7153fi
7154rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
7155echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7156echo "${ECHO_T}$ac_header_preproc" >&6
7157
7158# So? What about this header?
7159case $ac_header_compiler:$ac_header_preproc in
7160 yes:no )
7161 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7162echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7163 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
7164echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7165 (
7166 cat <<\_ASBOX
7167## ------------------------------------ ##
7168## Report this to bug-autoconf@gnu.org. ##
7169## ------------------------------------ ##
7170_ASBOX
7171 ) |
7172 sed "s/^/$as_me: WARNING: /" >&2
7173 ;;
c0d27fcc
MR
7174 no:yes )
7175 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7176echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7177 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7178echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7179 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
7180echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7181 (
7182 cat <<\_ASBOX
7183## ------------------------------------ ##
7184## Report this to bug-autoconf@gnu.org. ##
7185## ------------------------------------ ##
7186_ASBOX
7187 ) |
7188 sed "s/^/$as_me: WARNING: /" >&2
7189 ;;
c0d27fcc
MR
7190esac
7191echo "$as_me:$LINENO: checking for $ac_header" >&5
7192echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7193if eval "test \"\${$as_ac_Header+set}\" = set"; then
7194 echo $ECHO_N "(cached) $ECHO_C" >&6
7195else
7196 eval "$as_ac_Header=$ac_header_preproc"
98418dba 7197fi
c0d27fcc 7198echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 7199echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
7200
7201fi
98418dba 7202if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 7203 cat >>confdefs.h <<_ACEOF
98418dba 7204#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 7205_ACEOF
98418dba
CW
7206
7207fi
c0d27fcc 7208
98418dba
CW
7209done
7210
c0d27fcc 7211
98418dba
CW
7212for ac_func in getpagesize
7213do
7214as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 7215echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
7216echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7217if eval "test \"\${$as_ac_var+set}\" = set"; then
7218 echo $ECHO_N "(cached) $ECHO_C" >&6
7219else
7220 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7221#line $LINENO "configure"
cd958eb3
MB
7222/* confdefs.h. */
7223_ACEOF
7224cat confdefs.h >>conftest.$ac_ext
7225cat >>conftest.$ac_ext <<_ACEOF
7226/* end confdefs.h. */
98418dba 7227/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
7228 which can conflict with char $ac_func (); below.
7229 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7230 <limits.h> exists even on freestanding compilers. */
7231#ifdef __STDC__
7232# include <limits.h>
7233#else
7234# include <assert.h>
7235#endif
98418dba
CW
7236/* Override any gcc2 internal prototype to avoid an error. */
7237#ifdef __cplusplus
7238extern "C"
cd958eb3 7239{
98418dba
CW
7240#endif
7241/* We use char because int might match the return type of a gcc2
7242 builtin and then its argument prototype would still apply. */
7243char $ac_func ();
98418dba
CW
7244/* The GNU C library defines this for functions which it implements
7245 to always fail with ENOSYS. Some functions are actually named
7246 something starting with __ and the normal name is an alias. */
7247#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7248choke me
7249#else
cd958eb3
MB
7250char (*f) () = $ac_func;
7251#endif
7252#ifdef __cplusplus
7253}
98418dba
CW
7254#endif
7255
cd958eb3
MB
7256int
7257main ()
7258{
9e71690e 7259return f != $ac_func;
98418dba
CW
7260 ;
7261 return 0;
7262}
7263_ACEOF
7264rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7265if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7266 (eval $ac_link) 2>&5
7267 ac_status=$?
c0d27fcc 7268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7269 (exit $ac_status); } &&
7270 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7272 (eval $ac_try) 2>&5
7273 ac_status=$?
c0d27fcc 7274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7275 (exit $ac_status); }; }; then
7276 eval "$as_ac_var=yes"
7277else
7278 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7279sed 's/^/| /' conftest.$ac_ext >&5
7280
98418dba
CW
7281eval "$as_ac_var=no"
7282fi
7283rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7284fi
c0d27fcc 7285echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
7286echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7287if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 7288 cat >>confdefs.h <<_ACEOF
98418dba 7289#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 7290_ACEOF
98418dba
CW
7291
7292fi
7293done
7294
c0d27fcc 7295echo "$as_me:$LINENO: checking for working mmap" >&5
98418dba
CW
7296echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
7297if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
7298 echo $ECHO_N "(cached) $ECHO_C" >&6
7299else
7300 if test "$cross_compiling" = yes; then
7301 ac_cv_func_mmap_fixed_mapped=no
7302else
7303 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7304#line $LINENO "configure"
cd958eb3
MB
7305/* confdefs.h. */
7306_ACEOF
7307cat confdefs.h >>conftest.$ac_ext
7308cat >>conftest.$ac_ext <<_ACEOF
7309/* end confdefs.h. */
98418dba 7310$ac_includes_default
c0d27fcc
MR
7311/* malloc might have been renamed as rpl_malloc. */
7312#undef malloc
7313
98418dba
CW
7314/* Thanks to Mike Haertel and Jim Avera for this test.
7315 Here is a matrix of mmap possibilities:
7316 mmap private not fixed
7317 mmap private fixed at somewhere currently unmapped
7318 mmap private fixed at somewhere already mapped
7319 mmap shared not fixed
7320 mmap shared fixed at somewhere currently unmapped
7321 mmap shared fixed at somewhere already mapped
7322 For private mappings, we should verify that changes cannot be read()
7323 back from the file, nor mmap's back from the file at a different
7324 address. (There have been systems where private was not correctly
7325 implemented like the infamous i386 svr4.0, and systems where the
7326 VM page cache was not coherent with the file system buffer cache
7327 like early versions of FreeBSD and possibly contemporary NetBSD.)
7328 For shared mappings, we should conversely verify that changes get
c0d27fcc 7329 propagated back to all the places they're supposed to be.
98418dba
CW
7330
7331 Grep wants private fixed already mapped.
7332 The main things grep needs to know about mmap are:
7333 * does it exist and is it safe to write into the mmap'd area
7334 * how to use it (BSD variants) */
7335
7336#include <fcntl.h>
7337#include <sys/mman.h>
7338
7339#if !STDC_HEADERS && !HAVE_STDLIB_H
7340char *malloc ();
7341#endif
7342
7343/* This mess was copied from the GNU getpagesize.h. */
7344#if !HAVE_GETPAGESIZE
7345/* Assume that all systems that can run configure have sys/param.h. */
7346# if !HAVE_SYS_PARAM_H
7347# define HAVE_SYS_PARAM_H 1
7348# endif
7349
7350# ifdef _SC_PAGESIZE
7351# define getpagesize() sysconf(_SC_PAGESIZE)
7352# else /* no _SC_PAGESIZE */
7353# if HAVE_SYS_PARAM_H
7354# include <sys/param.h>
7355# ifdef EXEC_PAGESIZE
7356# define getpagesize() EXEC_PAGESIZE
7357# else /* no EXEC_PAGESIZE */
7358# ifdef NBPG
7359# define getpagesize() NBPG * CLSIZE
7360# ifndef CLSIZE
7361# define CLSIZE 1
7362# endif /* no CLSIZE */
7363# else /* no NBPG */
7364# ifdef NBPC
7365# define getpagesize() NBPC
7366# else /* no NBPC */
7367# ifdef PAGESIZE
7368# define getpagesize() PAGESIZE
7369# endif /* PAGESIZE */
7370# endif /* no NBPC */
7371# endif /* no NBPG */
7372# endif /* no EXEC_PAGESIZE */
7373# else /* no HAVE_SYS_PARAM_H */
7374# define getpagesize() 8192 /* punt totally */
7375# endif /* no HAVE_SYS_PARAM_H */
7376# endif /* no _SC_PAGESIZE */
7377
7378#endif /* no HAVE_GETPAGESIZE */
7379
7380int
7381main ()
7382{
7383 char *data, *data2, *data3;
7384 int i, pagesize;
7385 int fd;
7386
7387 pagesize = getpagesize ();
7388
7389 /* First, make a file with some known garbage in it. */
7390 data = (char *) malloc (pagesize);
7391 if (!data)
7392 exit (1);
7393 for (i = 0; i < pagesize; ++i)
7394 *(data + i) = rand ();
7395 umask (0);
7396 fd = creat ("conftest.mmap", 0600);
7397 if (fd < 0)
7398 exit (1);
7399 if (write (fd, data, pagesize) != pagesize)
7400 exit (1);
7401 close (fd);
7402
7403 /* Next, try to mmap the file at a fixed address which already has
7404 something else allocated at it. If we can, also make sure that
7405 we see the same garbage. */
7406 fd = open ("conftest.mmap", O_RDWR);
7407 if (fd < 0)
7408 exit (1);
7409 data2 = (char *) malloc (2 * pagesize);
7410 if (!data2)
7411 exit (1);
7412 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
7413 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7414 MAP_PRIVATE | MAP_FIXED, fd, 0L))
7415 exit (1);
7416 for (i = 0; i < pagesize; ++i)
7417 if (*(data + i) != *(data2 + i))
7418 exit (1);
7419
7420 /* Finally, make sure that changes to the mapped area do not
7421 percolate back to the file as seen by read(). (This is a bug on
7422 some variants of i386 svr4.0.) */
7423 for (i = 0; i < pagesize; ++i)
7424 *(data2 + i) = *(data2 + i) + 1;
7425 data3 = (char *) malloc (pagesize);
7426 if (!data3)
7427 exit (1);
7428 if (read (fd, data3, pagesize) != pagesize)
7429 exit (1);
7430 for (i = 0; i < pagesize; ++i)
7431 if (*(data + i) != *(data3 + i))
7432 exit (1);
7433 close (fd);
7434 exit (0);
7435}
7436_ACEOF
7437rm -f conftest$ac_exeext
c0d27fcc 7438if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7439 (eval $ac_link) 2>&5
7440 ac_status=$?
c0d27fcc 7441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7442 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 7443 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7444 (eval $ac_try) 2>&5
7445 ac_status=$?
c0d27fcc 7446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7447 (exit $ac_status); }; }; then
7448 ac_cv_func_mmap_fixed_mapped=yes
7449else
7450 echo "$as_me: program exited with status $ac_status" >&5
7451echo "$as_me: failed program was:" >&5
cd958eb3
MB
7452sed 's/^/| /' conftest.$ac_ext >&5
7453
c0d27fcc 7454( exit $ac_status )
98418dba
CW
7455ac_cv_func_mmap_fixed_mapped=no
7456fi
6bae0ccf 7457rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba
CW
7458fi
7459fi
c0d27fcc 7460echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
98418dba
CW
7461echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
7462if test $ac_cv_func_mmap_fixed_mapped = yes; then
7463
c0d27fcc 7464cat >>confdefs.h <<\_ACEOF
98418dba 7465#define HAVE_MMAP 1
c0d27fcc 7466_ACEOF
98418dba
CW
7467
7468fi
7469rm -f conftest.mmap
7470
7471if test $use_mmap_for_buffers = yes; then
7472 REL_ALLOC=no
7473fi
7474
7475LIBS="$libsrc_libs $LIBS"
7476
c0d27fcc
MR
7477
7478echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
98418dba
CW
7479echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
7480if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
7481 echo $ECHO_N "(cached) $ECHO_C" >&6
7482else
7483 ac_check_lib_save_LIBS=$LIBS
7484LIBS="-ldnet $LIBS"
7485cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7486#line $LINENO "configure"
cd958eb3
MB
7487/* confdefs.h. */
7488_ACEOF
7489cat confdefs.h >>conftest.$ac_ext
7490cat >>conftest.$ac_ext <<_ACEOF
7491/* end confdefs.h. */
98418dba
CW
7492
7493/* Override any gcc2 internal prototype to avoid an error. */
7494#ifdef __cplusplus
7495extern "C"
7496#endif
7497/* We use char because int might match the return type of a gcc2
7498 builtin and then its argument prototype would still apply. */
7499char dnet_ntoa ();
98418dba
CW
7500int
7501main ()
7502{
7503dnet_ntoa ();
7504 ;
7505 return 0;
7506}
7507_ACEOF
7508rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7509if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7510 (eval $ac_link) 2>&5
7511 ac_status=$?
c0d27fcc 7512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7513 (exit $ac_status); } &&
7514 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7516 (eval $ac_try) 2>&5
7517 ac_status=$?
c0d27fcc 7518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7519 (exit $ac_status); }; }; then
7520 ac_cv_lib_dnet_dnet_ntoa=yes
7521else
7522 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7523sed 's/^/| /' conftest.$ac_ext >&5
7524
98418dba
CW
7525ac_cv_lib_dnet_dnet_ntoa=no
7526fi
7527rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7528LIBS=$ac_check_lib_save_LIBS
7529fi
c0d27fcc 7530echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
98418dba
CW
7531echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
7532if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 7533 cat >>confdefs.h <<_ACEOF
98418dba 7534#define HAVE_LIBDNET 1
c0d27fcc 7535_ACEOF
98418dba
CW
7536
7537 LIBS="-ldnet $LIBS"
7538
7539fi
7540
c0d27fcc
MR
7541
7542echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
98418dba
CW
7543echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6
7544if test "${ac_cv_lib_Xbsd_main+set}" = set; then
7545 echo $ECHO_N "(cached) $ECHO_C" >&6
7546else
7547 ac_check_lib_save_LIBS=$LIBS
7548LIBS="-lXbsd $LIBS"
7549cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7550#line $LINENO "configure"
cd958eb3
MB
7551/* confdefs.h. */
7552_ACEOF
7553cat confdefs.h >>conftest.$ac_ext
7554cat >>conftest.$ac_ext <<_ACEOF
7555/* end confdefs.h. */
98418dba 7556
c0d27fcc 7557
98418dba
CW
7558int
7559main ()
7560{
7561main ();
7562 ;
7563 return 0;
7564}
7565_ACEOF
7566rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7567if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7568 (eval $ac_link) 2>&5
7569 ac_status=$?
c0d27fcc 7570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7571 (exit $ac_status); } &&
7572 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7574 (eval $ac_try) 2>&5
7575 ac_status=$?
c0d27fcc 7576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7577 (exit $ac_status); }; }; then
7578 ac_cv_lib_Xbsd_main=yes
7579else
7580 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7581sed 's/^/| /' conftest.$ac_ext >&5
7582
98418dba
CW
7583ac_cv_lib_Xbsd_main=no
7584fi
7585rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7586LIBS=$ac_check_lib_save_LIBS
7587fi
c0d27fcc 7588echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
98418dba
CW
7589echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6
7590if test $ac_cv_lib_Xbsd_main = yes; then
7591 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
7592fi
7593
c0d27fcc
MR
7594
7595
7596echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
98418dba
CW
7597echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6
7598if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
7599 echo $ECHO_N "(cached) $ECHO_C" >&6
7600else
7601 ac_check_lib_save_LIBS=$LIBS
7602LIBS="-lpthreads $LIBS"
7603cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7604#line $LINENO "configure"
cd958eb3
MB
7605/* confdefs.h. */
7606_ACEOF
7607cat confdefs.h >>conftest.$ac_ext
7608cat >>conftest.$ac_ext <<_ACEOF
7609/* end confdefs.h. */
98418dba
CW
7610
7611/* Override any gcc2 internal prototype to avoid an error. */
7612#ifdef __cplusplus
7613extern "C"
7614#endif
7615/* We use char because int might match the return type of a gcc2
7616 builtin and then its argument prototype would still apply. */
7617char cma_open ();
98418dba
CW
7618int
7619main ()
7620{
7621cma_open ();
7622 ;
7623 return 0;
7624}
7625_ACEOF
7626rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7627if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7628 (eval $ac_link) 2>&5
7629 ac_status=$?
c0d27fcc 7630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7631 (exit $ac_status); } &&
7632 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7634 (eval $ac_try) 2>&5
7635 ac_status=$?
c0d27fcc 7636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7637 (exit $ac_status); }; }; then
7638 ac_cv_lib_pthreads_cma_open=yes
7639else
7640 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7641sed 's/^/| /' conftest.$ac_ext >&5
7642
98418dba
CW
7643ac_cv_lib_pthreads_cma_open=no
7644fi
7645rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7646LIBS=$ac_check_lib_save_LIBS
7647fi
c0d27fcc 7648echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
98418dba
CW
7649echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6
7650if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 7651 cat >>confdefs.h <<_ACEOF
98418dba 7652#define HAVE_LIBPTHREADS 1
c0d27fcc 7653_ACEOF
98418dba
CW
7654
7655 LIBS="-lpthreads $LIBS"
7656
7657fi
7658
c0d27fcc
MR
7659
7660echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
98418dba
CW
7661echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6
7662if test -d /usr/X386/include; then
7663 HAVE_XFREE386=yes
7664 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
7665else
7666 HAVE_XFREE386=no
7667fi
c0d27fcc 7668echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
98418dba
CW
7669echo "${ECHO_T}$HAVE_XFREE386" >&6
7670
ae1a998c
RS
7671# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
7672# used for the tests that follow. We set them back to REAL_CFLAGS and
7673# REAL_CPPFLAGS later on.
98418dba
CW
7674
7675REAL_CPPFLAGS="$CPPFLAGS"
7676
7677if test "${HAVE_X11}" = "yes"; then
7678 DEFS="$C_SWITCH_X_SITE $DEFS"
7679 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
7680 LIBS="$LIBX $LIBS"
7681 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
7682 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
7683
7684 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
7685 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
7686 # but it's more convenient here to set LD_RUN_PATH
7687 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
7688 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
7689 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
7690 export LD_RUN_PATH
7691 fi
7692
7693 if test "${opsys}" = "gnu-linux"; then
c0d27fcc 7694 echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
98418dba
CW
7695echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6
7696 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7697#line $LINENO "configure"
cd958eb3
MB
7698/* confdefs.h. */
7699_ACEOF
7700cat confdefs.h >>conftest.$ac_ext
7701cat >>conftest.$ac_ext <<_ACEOF
7702/* end confdefs.h. */
98418dba 7703
98418dba
CW
7704int
7705main ()
7706{
7707XOpenDisplay ("foo");
7708 ;
7709 return 0;
7710}
7711_ACEOF
7712rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7713if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7714 (eval $ac_link) 2>&5
7715 ac_status=$?
c0d27fcc 7716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7717 (exit $ac_status); } &&
7718 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7720 (eval $ac_try) 2>&5
7721 ac_status=$?
c0d27fcc 7722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7723 (exit $ac_status); }; }; then
7724 xlinux_first_failure=no
7725else
7726 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7727sed 's/^/| /' conftest.$ac_ext >&5
7728
98418dba
CW
7729xlinux_first_failure=yes
7730fi
7731rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7732 if test "${xlinux_first_failure}" = "yes"; then
7733 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
7734 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
7735 OLD_CPPFLAGS="$CPPFLAGS"
7736 OLD_LIBS="$LIBS"
7737 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
7738 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
7739 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
7740 LIBS="$LIBS -b i486-linuxaout"
7741 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7742#line $LINENO "configure"
cd958eb3
MB
7743/* confdefs.h. */
7744_ACEOF
7745cat confdefs.h >>conftest.$ac_ext
7746cat >>conftest.$ac_ext <<_ACEOF
7747/* end confdefs.h. */
98418dba 7748
98418dba
CW
7749int
7750main ()
7751{
7752XOpenDisplay ("foo");
7753 ;
7754 return 0;
7755}
7756_ACEOF
7757rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7758if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7759 (eval $ac_link) 2>&5
7760 ac_status=$?
c0d27fcc 7761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7762 (exit $ac_status); } &&
7763 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7765 (eval $ac_try) 2>&5
7766 ac_status=$?
c0d27fcc 7767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7768 (exit $ac_status); }; }; then
7769 xlinux_second_failure=no
7770else
7771 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7772sed 's/^/| /' conftest.$ac_ext >&5
7773
98418dba
CW
7774xlinux_second_failure=yes
7775fi
7776rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7777 if test "${xlinux_second_failure}" = "yes"; then
7778 # If we get the same failure with -b, there is no use adding -b.
7779 # So take it out. This plays safe.
7780 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
7781 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
7782 CPPFLAGS="$OLD_CPPFLAGS"
7783 LIBS="$OLD_LIBS"
c0d27fcc 7784 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
7785echo "${ECHO_T}no" >&6
7786 else
c0d27fcc 7787 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
7788echo "${ECHO_T}yes" >&6
7789 fi
7790 else
c0d27fcc 7791 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
7792echo "${ECHO_T}no" >&6
7793 fi
7794 fi
7795
7796 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
7797 # header files included from there.
c0d27fcc 7798 echo "$as_me:$LINENO: checking for Xkb" >&5
98418dba
CW
7799echo $ECHO_N "checking for Xkb... $ECHO_C" >&6
7800 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7801#line $LINENO "configure"
cd958eb3
MB
7802/* confdefs.h. */
7803_ACEOF
7804cat confdefs.h >>conftest.$ac_ext
7805cat >>conftest.$ac_ext <<_ACEOF
7806/* end confdefs.h. */
98418dba
CW
7807#include <X11/Xlib.h>
7808#include <X11/XKBlib.h>
98418dba
CW
7809int
7810main ()
7811{
7812XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
7813 ;
7814 return 0;
7815}
7816_ACEOF
7817rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7818if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7819 (eval $ac_link) 2>&5
7820 ac_status=$?
c0d27fcc 7821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7822 (exit $ac_status); } &&
7823 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7825 (eval $ac_try) 2>&5
7826 ac_status=$?
c0d27fcc 7827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7828 (exit $ac_status); }; }; then
7829 emacs_xkb=yes
7830else
7831 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7832sed 's/^/| /' conftest.$ac_ext >&5
7833
98418dba
CW
7834emacs_xkb=no
7835fi
7836rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
c0d27fcc 7837 echo "$as_me:$LINENO: result: $emacs_xkb" >&5
98418dba
CW
7838echo "${ECHO_T}$emacs_xkb" >&6
7839 if test $emacs_xkb = yes; then
b936fae4 7840
c0d27fcc 7841cat >>confdefs.h <<\_ACEOF
98418dba 7842#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 7843_ACEOF
98418dba
CW
7844
7845 fi
7846
c0d27fcc
MR
7847
7848
7849
7850
98418dba
CW
7851for ac_func in XrmSetDatabase XScreenResourceString \
7852XScreenNumberOfScreen XSetWMProtocols
7853do
7854as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 7855echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
7856echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7857if eval "test \"\${$as_ac_var+set}\" = set"; then
7858 echo $ECHO_N "(cached) $ECHO_C" >&6
7859else
7860 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7861#line $LINENO "configure"
cd958eb3
MB
7862/* confdefs.h. */
7863_ACEOF
7864cat confdefs.h >>conftest.$ac_ext
7865cat >>conftest.$ac_ext <<_ACEOF
7866/* end confdefs.h. */
98418dba 7867/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
7868 which can conflict with char $ac_func (); below.
7869 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7870 <limits.h> exists even on freestanding compilers. */
7871#ifdef __STDC__
7872# include <limits.h>
7873#else
7874# include <assert.h>
7875#endif
98418dba
CW
7876/* Override any gcc2 internal prototype to avoid an error. */
7877#ifdef __cplusplus
7878extern "C"
cd958eb3 7879{
98418dba
CW
7880#endif
7881/* We use char because int might match the return type of a gcc2
7882 builtin and then its argument prototype would still apply. */
7883char $ac_func ();
98418dba
CW
7884/* The GNU C library defines this for functions which it implements
7885 to always fail with ENOSYS. Some functions are actually named
7886 something starting with __ and the normal name is an alias. */
7887#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7888choke me
7889#else
cd958eb3
MB
7890char (*f) () = $ac_func;
7891#endif
7892#ifdef __cplusplus
7893}
98418dba
CW
7894#endif
7895
cd958eb3
MB
7896int
7897main ()
7898{
9e71690e 7899return f != $ac_func;
98418dba
CW
7900 ;
7901 return 0;
7902}
7903_ACEOF
7904rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7905if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7906 (eval $ac_link) 2>&5
7907 ac_status=$?
c0d27fcc 7908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7909 (exit $ac_status); } &&
7910 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7912 (eval $ac_try) 2>&5
7913 ac_status=$?
c0d27fcc 7914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7915 (exit $ac_status); }; }; then
7916 eval "$as_ac_var=yes"
7917else
7918 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7919sed 's/^/| /' conftest.$ac_ext >&5
7920
98418dba
CW
7921eval "$as_ac_var=no"
7922fi
7923rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7924fi
c0d27fcc 7925echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
7926echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7927if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 7928 cat >>confdefs.h <<_ACEOF
98418dba 7929#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 7930_ACEOF
98418dba
CW
7931
7932fi
7933done
7934
7935fi
7936
7937if test "${window_system}" = "x11"; then
c0d27fcc 7938 echo "$as_me:$LINENO: checking X11 version 6" >&5
98418dba
CW
7939echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6
7940 if test "${emacs_cv_x11_version_6+set}" = set; then
7941 echo $ECHO_N "(cached) $ECHO_C" >&6
7942else
7943 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7944#line $LINENO "configure"
cd958eb3
MB
7945/* confdefs.h. */
7946_ACEOF
7947cat confdefs.h >>conftest.$ac_ext
7948cat >>conftest.$ac_ext <<_ACEOF
7949/* end confdefs.h. */
98418dba 7950#include <X11/Xlib.h>
98418dba
CW
7951int
7952main ()
7953{
7954#if XlibSpecificationRelease < 6
7955fail;
7956#endif
7957
7958 ;
7959 return 0;
7960}
7961_ACEOF
7962rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7963if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7964 (eval $ac_link) 2>&5
7965 ac_status=$?
c0d27fcc 7966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7967 (exit $ac_status); } &&
7968 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7970 (eval $ac_try) 2>&5
7971 ac_status=$?
c0d27fcc 7972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7973 (exit $ac_status); }; }; then
7974 emacs_cv_x11_version_6=yes
7975else
7976 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7977sed 's/^/| /' conftest.$ac_ext >&5
7978
98418dba
CW
7979emacs_cv_x11_version_6=no
7980fi
7981rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7982fi
7983
7984 if test $emacs_cv_x11_version_6 = yes; then
c0d27fcc 7985 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 7986echo "${ECHO_T}6 or newer" >&6
b936fae4 7987
c0d27fcc 7988cat >>confdefs.h <<\_ACEOF
98418dba 7989#define HAVE_X11R6 1
c0d27fcc 7990_ACEOF
98418dba
CW
7991
7992 else
c0d27fcc 7993 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
7994echo "${ECHO_T}before 6" >&6
7995 fi
7996fi
7997
7998if test "${window_system}" = "x11"; then
c0d27fcc 7999 echo "$as_me:$LINENO: checking X11 version 5" >&5
98418dba
CW
8000echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6
8001 if test "${emacs_cv_x11_version_5+set}" = set; then
8002 echo $ECHO_N "(cached) $ECHO_C" >&6
8003else
8004 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8005#line $LINENO "configure"
cd958eb3
MB
8006/* confdefs.h. */
8007_ACEOF
8008cat confdefs.h >>conftest.$ac_ext
8009cat >>conftest.$ac_ext <<_ACEOF
8010/* end confdefs.h. */
98418dba 8011#include <X11/Xlib.h>
98418dba
CW
8012int
8013main ()
8014{
8015#if XlibSpecificationRelease < 5
8016fail;
8017#endif
8018
8019 ;
8020 return 0;
8021}
8022_ACEOF
8023rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8024if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8025 (eval $ac_link) 2>&5
8026 ac_status=$?
c0d27fcc 8027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8028 (exit $ac_status); } &&
8029 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8031 (eval $ac_try) 2>&5
8032 ac_status=$?
c0d27fcc 8033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8034 (exit $ac_status); }; }; then
8035 emacs_cv_x11_version_5=yes
8036else
8037 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8038sed 's/^/| /' conftest.$ac_ext >&5
8039
98418dba
CW
8040emacs_cv_x11_version_5=no
8041fi
8042rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8043fi
8044
8045 if test $emacs_cv_x11_version_5 = yes; then
c0d27fcc 8046 echo "$as_me:$LINENO: result: 5 or newer" >&5
98418dba
CW
8047echo "${ECHO_T}5 or newer" >&6
8048 HAVE_X11R5=yes
b936fae4 8049
c0d27fcc 8050cat >>confdefs.h <<\_ACEOF
98418dba 8051#define HAVE_X11R5 1
c0d27fcc 8052_ACEOF
98418dba
CW
8053
8054 else
8055 HAVE_X11R5=no
c0d27fcc 8056 echo "$as_me:$LINENO: result: before 5" >&5
98418dba
CW
8057echo "${ECHO_T}before 5" >&6
8058 fi
8059fi
8060
8061if test x"${USE_X_TOOLKIT}" = xmaybe; then
8062 if test x"${HAVE_X11R5}" = xyes; then
c0d27fcc 8063 echo "$as_me:$LINENO: checking X11 version 5 with Xaw" >&5
98418dba
CW
8064echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6
8065 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
8066 echo $ECHO_N "(cached) $ECHO_C" >&6
8067else
8068 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8069#line $LINENO "configure"
cd958eb3
MB
8070/* confdefs.h. */
8071_ACEOF
8072cat confdefs.h >>conftest.$ac_ext
8073cat >>conftest.$ac_ext <<_ACEOF
8074/* end confdefs.h. */
98418dba
CW
8075
8076#include <X11/Intrinsic.h>
8077#include <X11/Xaw/Simple.h>
98418dba
CW
8078int
8079main ()
8080{
8081
8082 ;
8083 return 0;
8084}
8085_ACEOF
8086rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8087if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8088 (eval $ac_link) 2>&5
8089 ac_status=$?
c0d27fcc 8090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8091 (exit $ac_status); } &&
8092 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8094 (eval $ac_try) 2>&5
8095 ac_status=$?
c0d27fcc 8096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8097 (exit $ac_status); }; }; then
8098 emacs_cv_x11_version_5_with_xaw=yes
8099else
8100 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8101sed 's/^/| /' conftest.$ac_ext >&5
8102
98418dba
CW
8103emacs_cv_x11_version_5_with_xaw=no
8104fi
8105rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8106fi
8107
8108 if test $emacs_cv_x11_version_5_with_xaw = yes; then
c0d27fcc 8109 echo "$as_me:$LINENO: result: 5 or newer, with Xaw; use toolkit by default" >&5
98418dba
CW
8110echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6
8111 USE_X_TOOLKIT=LUCID
8112 else
c0d27fcc 8113 echo "$as_me:$LINENO: result: before 5 or no Xaw; do not use toolkit by default" >&5
98418dba
CW
8114echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6
8115 USE_X_TOOLKIT=none
8116 fi
8117 else
8118 USE_X_TOOLKIT=none
8119 fi
8120fi
8121
8122X_TOOLKIT_TYPE=$USE_X_TOOLKIT
8123
8124if test "${USE_X_TOOLKIT}" != "none"; then
c0d27fcc 8125 echo "$as_me:$LINENO: checking X11 toolkit version" >&5
98418dba
CW
8126echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6
8127 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
8128 echo $ECHO_N "(cached) $ECHO_C" >&6
8129else
8130 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8131#line $LINENO "configure"
cd958eb3
MB
8132/* confdefs.h. */
8133_ACEOF
8134cat confdefs.h >>conftest.$ac_ext
8135cat >>conftest.$ac_ext <<_ACEOF
8136/* end confdefs.h. */
98418dba 8137#include <X11/Intrinsic.h>
98418dba
CW
8138int
8139main ()
8140{
8141#if XtSpecificationRelease < 6
8142fail;
8143#endif
8144
8145 ;
8146 return 0;
8147}
8148_ACEOF
8149rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8150if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8151 (eval $ac_link) 2>&5
8152 ac_status=$?
c0d27fcc 8153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8154 (exit $ac_status); } &&
8155 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8157 (eval $ac_try) 2>&5
8158 ac_status=$?
c0d27fcc 8159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8160 (exit $ac_status); }; }; then
8161 emacs_cv_x11_toolkit_version_6=yes
8162else
8163 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8164sed 's/^/| /' conftest.$ac_ext >&5
8165
98418dba
CW
8166emacs_cv_x11_toolkit_version_6=no
8167fi
8168rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8169fi
8170
8171 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
8172 if test $emacs_cv_x11_toolkit_version_6 = yes; then
c0d27fcc 8173 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 8174echo "${ECHO_T}6 or newer" >&6
b936fae4 8175
c0d27fcc 8176cat >>confdefs.h <<\_ACEOF
98418dba 8177#define HAVE_X11XTR6 1
c0d27fcc 8178_ACEOF
98418dba
CW
8179
8180 else
c0d27fcc 8181 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
8182echo "${ECHO_T}before 6" >&6
8183 fi
8184
8185 OLDLIBS="$LIBS"
8186 if test x$HAVE_X11XTR6 = xyes; then
8187 LIBS="-lXt -lSM -lICE $LIBS"
8188 else
8189 LIBS="-lXt $LIBS"
8190 fi
8191
c0d27fcc 8192echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
98418dba
CW
8193echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6
8194if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
8195 echo $ECHO_N "(cached) $ECHO_C" >&6
8196else
8197 ac_check_lib_save_LIBS=$LIBS
8198LIBS="-lXmu $LIBS"
8199cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8200#line $LINENO "configure"
cd958eb3
MB
8201/* confdefs.h. */
8202_ACEOF
8203cat confdefs.h >>conftest.$ac_ext
8204cat >>conftest.$ac_ext <<_ACEOF
8205/* end confdefs.h. */
98418dba
CW
8206
8207/* Override any gcc2 internal prototype to avoid an error. */
8208#ifdef __cplusplus
8209extern "C"
8210#endif
8211/* We use char because int might match the return type of a gcc2
8212 builtin and then its argument prototype would still apply. */
8213char XmuConvertStandardSelection ();
98418dba
CW
8214int
8215main ()
8216{
8217XmuConvertStandardSelection ();
8218 ;
8219 return 0;
8220}
8221_ACEOF
8222rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8223if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8224 (eval $ac_link) 2>&5
8225 ac_status=$?
c0d27fcc 8226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8227 (exit $ac_status); } &&
8228 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8230 (eval $ac_try) 2>&5
8231 ac_status=$?
c0d27fcc 8232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8233 (exit $ac_status); }; }; then
8234 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
8235else
8236 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8237sed 's/^/| /' conftest.$ac_ext >&5
8238
98418dba
CW
8239ac_cv_lib_Xmu_XmuConvertStandardSelection=no
8240fi
8241rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8242LIBS=$ac_check_lib_save_LIBS
8243fi
c0d27fcc 8244echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
98418dba
CW
8245echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6
8246if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 8247 cat >>confdefs.h <<_ACEOF
98418dba 8248#define HAVE_LIBXMU 1
c0d27fcc 8249_ACEOF
98418dba
CW
8250
8251 LIBS="-lXmu $LIBS"
8252
8253fi
8254
8255 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
8256fi
8257
8258# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
8259if test "${HAVE_X11}" = "yes"; then
8260 if test "${USE_X_TOOLKIT}" != "none"; then
8261
c0d27fcc 8262echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
98418dba
CW
8263echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6
8264if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
8265 echo $ECHO_N "(cached) $ECHO_C" >&6
8266else
8267 ac_check_lib_save_LIBS=$LIBS
8268LIBS="-lXext $LIBS"
8269cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8270#line $LINENO "configure"
cd958eb3
MB
8271/* confdefs.h. */
8272_ACEOF
8273cat confdefs.h >>conftest.$ac_ext
8274cat >>conftest.$ac_ext <<_ACEOF
8275/* end confdefs.h. */
98418dba
CW
8276
8277/* Override any gcc2 internal prototype to avoid an error. */
8278#ifdef __cplusplus
8279extern "C"
8280#endif
8281/* We use char because int might match the return type of a gcc2
8282 builtin and then its argument prototype would still apply. */
8283char XShapeQueryExtension ();
98418dba
CW
8284int
8285main ()
8286{
8287XShapeQueryExtension ();
8288 ;
8289 return 0;
8290}
8291_ACEOF
8292rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8293if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8294 (eval $ac_link) 2>&5
8295 ac_status=$?
c0d27fcc 8296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8297 (exit $ac_status); } &&
8298 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8300 (eval $ac_try) 2>&5
8301 ac_status=$?
c0d27fcc 8302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8303 (exit $ac_status); }; }; then
8304 ac_cv_lib_Xext_XShapeQueryExtension=yes
8305else
8306 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8307sed 's/^/| /' conftest.$ac_ext >&5
8308
98418dba
CW
8309ac_cv_lib_Xext_XShapeQueryExtension=no
8310fi
8311rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8312LIBS=$ac_check_lib_save_LIBS
8313fi
c0d27fcc 8314echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
98418dba
CW
8315echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6
8316if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 8317 cat >>confdefs.h <<_ACEOF
98418dba 8318#define HAVE_LIBXEXT 1
c0d27fcc 8319_ACEOF
98418dba
CW
8320
8321 LIBS="-lXext $LIBS"
8322
8323fi
8324
8325 fi
8326fi
8327
8328if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 8329 echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
8e967cf7
MR
8330echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6
8331if test "${emacs_cv_lesstif+set}" = set; then
8332 echo $ECHO_N "(cached) $ECHO_C" >&6
8333else
ae1a998c
RS
8334 # We put this in CFLAGS temporarily to precede other -I options
8335 # that might be in CFLAGS temporarily.
8336 # We put this in CPPFLAGS where it precedes the other -I options.
8337 OLD_CPPFLAGS=$CPPFLAGS
8338 OLD_CFLAGS=$CFLAGS
8339 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
8340 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
8e967cf7 8341 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8342#line $LINENO "configure"
cd958eb3
MB
8343/* confdefs.h. */
8344_ACEOF
8345cat confdefs.h >>conftest.$ac_ext
8346cat >>conftest.$ac_ext <<_ACEOF
8347/* end confdefs.h. */
8e967cf7
MR
8348#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
8349int
8350main ()
8351{
8352int x = 5;
8353 ;
8354 return 0;
8355}
8356_ACEOF
8357rm -f conftest.$ac_objext
c0d27fcc 8358if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8e967cf7
MR
8359 (eval $ac_compile) 2>&5
8360 ac_status=$?
c0d27fcc 8361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8e967cf7
MR
8362 (exit $ac_status); } &&
8363 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8e967cf7
MR
8365 (eval $ac_try) 2>&5
8366 ac_status=$?
c0d27fcc 8367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8e967cf7
MR
8368 (exit $ac_status); }; }; then
8369 emacs_cv_lesstif=yes
8370else
8371 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8372sed 's/^/| /' conftest.$ac_ext >&5
8373
8e967cf7
MR
8374emacs_cv_lesstif=no
8375fi
8376rm -f conftest.$ac_objext conftest.$ac_ext
8377fi
c0d27fcc 8378echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
8e967cf7
MR
8379echo "${ECHO_T}$emacs_cv_lesstif" >&6
8380 if test $emacs_cv_lesstif = yes; then
ae1a998c
RS
8381 # Make sure this -I option remains in CPPFLAGS after it is set
8382 # back to REAL_CPPFLAGS.
8383 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
8384 # have those other -I options anyway. Ultimately, having this
8385 # directory ultimately in CPPFLAGS will be enough.
8386 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
8e967cf7 8387 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
ae1a998c
RS
8388 else
8389 CFLAGS=$OLD_CFLAGS
8390 CPPFLAGS=$OLD_CPPFLAGS
8e967cf7 8391 fi
c0d27fcc 8392 echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
98418dba
CW
8393echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6
8394if test "${emacs_cv_motif_version_2_1+set}" = set; then
8395 echo $ECHO_N "(cached) $ECHO_C" >&6
8396else
8397 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8398#line $LINENO "configure"
cd958eb3
MB
8399/* confdefs.h. */
8400_ACEOF
8401cat confdefs.h >>conftest.$ac_ext
8402cat >>conftest.$ac_ext <<_ACEOF
8403/* end confdefs.h. */
98418dba 8404#include <Xm/Xm.h>
98418dba
CW
8405int
8406main ()
8407{
8408#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
8409int x = 5;
8410#else
8411Motif version prior to 2.1.
8412#endif
8413 ;
8414 return 0;
8415}
8416_ACEOF
8417rm -f conftest.$ac_objext
c0d27fcc 8418if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
8419 (eval $ac_compile) 2>&5
8420 ac_status=$?
c0d27fcc 8421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8422 (exit $ac_status); } &&
8423 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8425 (eval $ac_try) 2>&5
8426 ac_status=$?
c0d27fcc 8427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8428 (exit $ac_status); }; }; then
8429 emacs_cv_motif_version_2_1=yes
8430else
8431 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8432sed 's/^/| /' conftest.$ac_ext >&5
8433
98418dba
CW
8434emacs_cv_motif_version_2_1=no
8435fi
8436rm -f conftest.$ac_objext conftest.$ac_ext
8437fi
c0d27fcc 8438echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
98418dba
CW
8439echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6
8440 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
8441 if test $emacs_cv_motif_version_2_1 = yes; then
8442 HAVE_LIBXP=no
b936fae4 8443
c0d27fcc 8444cat >>confdefs.h <<\_ACEOF
98418dba 8445#define HAVE_MOTIF_2_1 1
c0d27fcc 8446_ACEOF
98418dba 8447
c0d27fcc 8448 echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
98418dba
CW
8449echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6
8450if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
8451 echo $ECHO_N "(cached) $ECHO_C" >&6
8452else
8453 ac_check_lib_save_LIBS=$LIBS
8454LIBS="-lXp $LIBS"
8455cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8456#line $LINENO "configure"
cd958eb3
MB
8457/* confdefs.h. */
8458_ACEOF
8459cat confdefs.h >>conftest.$ac_ext
8460cat >>conftest.$ac_ext <<_ACEOF
8461/* end confdefs.h. */
98418dba
CW
8462
8463/* Override any gcc2 internal prototype to avoid an error. */
8464#ifdef __cplusplus
8465extern "C"
8466#endif
8467/* We use char because int might match the return type of a gcc2
8468 builtin and then its argument prototype would still apply. */
8469char XpCreateContext ();
98418dba
CW
8470int
8471main ()
8472{
8473XpCreateContext ();
8474 ;
8475 return 0;
8476}
8477_ACEOF
8478rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8479if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8480 (eval $ac_link) 2>&5
8481 ac_status=$?
c0d27fcc 8482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8483 (exit $ac_status); } &&
8484 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8486 (eval $ac_try) 2>&5
8487 ac_status=$?
c0d27fcc 8488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8489 (exit $ac_status); }; }; then
8490 ac_cv_lib_Xp_XpCreateContext=yes
8491else
8492 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8493sed 's/^/| /' conftest.$ac_ext >&5
8494
98418dba
CW
8495ac_cv_lib_Xp_XpCreateContext=no
8496fi
8497rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8498LIBS=$ac_check_lib_save_LIBS
8499fi
c0d27fcc 8500echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
98418dba
CW
8501echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6
8502if test $ac_cv_lib_Xp_XpCreateContext = yes; then
8503 HAVE_LIBXP=yes
8504fi
503d2be0 8505
98418dba 8506 if test ${HAVE_LIBXP} = yes; then
b936fae4 8507
c0d27fcc 8508cat >>confdefs.h <<\_ACEOF
98418dba 8509#define HAVE_LIBXP 1
c0d27fcc 8510_ACEOF
503d2be0 8511
98418dba
CW
8512 fi
8513 fi
8514fi
8515
8516### Is -lXaw3d available?
8517HAVE_XAW3D=no
8518if test "${HAVE_X11}" = "yes"; then
8519 if test "${USE_X_TOOLKIT}" != "none"; then
22044edf 8520 echo "$as_me:$LINENO: checking for X11/Xaw3d/Scrollbar.h" >&5
98418dba
CW
8521echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6
8522if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
8523 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 8524else
22044edf 8525 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8526#line $LINENO "configure"
cd958eb3
MB
8527/* confdefs.h. */
8528_ACEOF
8529cat confdefs.h >>conftest.$ac_ext
8530cat >>conftest.$ac_ext <<_ACEOF
8531/* end confdefs.h. */
98418dba 8532#include <X11/Xaw3d/Scrollbar.h>
503d2be0 8533_ACEOF
c0d27fcc 8534if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
8535 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8536 ac_status=$?
6bae0ccf 8537 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
8538 rm -f conftest.er1
8539 cat conftest.err >&5
c0d27fcc 8540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
8541 (exit $ac_status); } >/dev/null; then
8542 if test -s conftest.err; then
8543 ac_cpp_err=$ac_c_preproc_warn_flag
8544 else
8545 ac_cpp_err=
8546 fi
8547else
8548 ac_cpp_err=yes
8549fi
8550if test -z "$ac_cpp_err"; then
22044edf 8551 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 8552else
503d2be0 8553 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8554sed 's/^/| /' conftest.$ac_ext >&5
8555
22044edf 8556 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 8557fi
503d2be0 8558rm -f conftest.err conftest.$ac_ext
98418dba 8559fi
c0d27fcc 8560echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
98418dba 8561echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6
98418dba 8562if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
c0d27fcc 8563 echo "$as_me:$LINENO: checking for XawScrollbarSetThumb in -lXaw3d" >&5
98418dba
CW
8564echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6
8565if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
8566 echo $ECHO_N "(cached) $ECHO_C" >&6
8567else
8568 ac_check_lib_save_LIBS=$LIBS
8569LIBS="-lXaw3d $LIBS"
8570cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8571#line $LINENO "configure"
cd958eb3
MB
8572/* confdefs.h. */
8573_ACEOF
8574cat confdefs.h >>conftest.$ac_ext
8575cat >>conftest.$ac_ext <<_ACEOF
8576/* end confdefs.h. */
98418dba
CW
8577
8578/* Override any gcc2 internal prototype to avoid an error. */
8579#ifdef __cplusplus
8580extern "C"
8581#endif
8582/* We use char because int might match the return type of a gcc2
8583 builtin and then its argument prototype would still apply. */
8584char XawScrollbarSetThumb ();
503d2be0
AS
8585int
8586main ()
8587{
98418dba 8588XawScrollbarSetThumb ();
503d2be0
AS
8589 ;
8590 return 0;
8591}
8592_ACEOF
8593rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8594if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
8595 (eval $ac_link) 2>&5
8596 ac_status=$?
c0d27fcc 8597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
8598 (exit $ac_status); } &&
8599 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
8601 (eval $ac_try) 2>&5
8602 ac_status=$?
c0d27fcc 8603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 8604 (exit $ac_status); }; }; then
98418dba 8605 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
ba4481b5 8606else
503d2be0 8607 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8608sed 's/^/| /' conftest.$ac_ext >&5
8609
98418dba 8610ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
ba4481b5 8611fi
503d2be0 8612rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 8613LIBS=$ac_check_lib_save_LIBS
ba4481b5 8614fi
c0d27fcc 8615echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
98418dba
CW
8616echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6
8617if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
8618 HAVE_XAW3D=yes
ba4481b5 8619fi
503d2be0 8620
ba4481b5
DL
8621fi
8622
c0d27fcc 8623
98418dba 8624 if test "${HAVE_XAW3D}" = "yes"; then
b936fae4 8625
c0d27fcc 8626cat >>confdefs.h <<\_ACEOF
98418dba 8627#define HAVE_XAW3D 1
c0d27fcc 8628_ACEOF
98418dba 8629
ba4481b5 8630 fi
98418dba 8631 fi
ba4481b5
DL
8632fi
8633
c0d27fcc
MR
8634
8635
98418dba
CW
8636USE_TOOLKIT_SCROLL_BARS=no
8637if test "${with_toolkit_scroll_bars}" != "no"; then
8638 if test "${USE_X_TOOLKIT}" != "none"; then
8639 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 8640 cat >>confdefs.h <<\_ACEOF
98418dba 8641#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 8642_ACEOF
98418dba
CW
8643
8644 HAVE_XAW3D=no
8645 USE_TOOLKIT_SCROLL_BARS=yes
8646 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 8647 cat >>confdefs.h <<\_ACEOF
98418dba 8648#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 8649_ACEOF
98418dba
CW
8650
8651 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 8652 fi
ba4481b5
DL
8653 fi
8654fi
8655
c0d27fcc 8656
98418dba 8657if test "${with_xim}" != "no"; then
b936fae4 8658
c0d27fcc 8659cat >>confdefs.h <<\_ACEOF
98418dba 8660#define USE_XIM 1
c0d27fcc 8661_ACEOF
98418dba
CW
8662
8663fi
8664
8665### Use -lXpm if available, unless `--with-xpm=no'.
8666HAVE_XPM=no
8667if test "${HAVE_X11}" = "yes"; then
8668 if test "${with_xpm}" != "no"; then
c0d27fcc
MR
8669 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
8670 echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
98418dba
CW
8671echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
8672if test "${ac_cv_header_X11_xpm_h+set}" = set; then
8673 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
8674fi
8675echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
8676echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
98418dba 8677else
c0d27fcc
MR
8678 # Is the header compilable?
8679echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
8680echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6
8681cat >conftest.$ac_ext <<_ACEOF
8682#line $LINENO "configure"
cd958eb3
MB
8683/* confdefs.h. */
8684_ACEOF
8685cat confdefs.h >>conftest.$ac_ext
8686cat >>conftest.$ac_ext <<_ACEOF
8687/* end confdefs.h. */
c0d27fcc
MR
8688$ac_includes_default
8689#include <X11/xpm.h>
8690_ACEOF
8691rm -f conftest.$ac_objext
8692if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8693 (eval $ac_compile) 2>&5
8694 ac_status=$?
8695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8696 (exit $ac_status); } &&
8697 { ac_try='test -s conftest.$ac_objext'
8698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8699 (eval $ac_try) 2>&5
8700 ac_status=$?
8701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8702 (exit $ac_status); }; }; then
8703 ac_header_compiler=yes
8704else
8705 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8706sed 's/^/| /' conftest.$ac_ext >&5
8707
c0d27fcc
MR
8708ac_header_compiler=no
8709fi
8710rm -f conftest.$ac_objext conftest.$ac_ext
8711echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8712echo "${ECHO_T}$ac_header_compiler" >&6
8713
8714# Is the header present?
8715echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
8716echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6
8717cat >conftest.$ac_ext <<_ACEOF
8718#line $LINENO "configure"
cd958eb3
MB
8719/* confdefs.h. */
8720_ACEOF
8721cat confdefs.h >>conftest.$ac_ext
8722cat >>conftest.$ac_ext <<_ACEOF
8723/* end confdefs.h. */
98418dba
CW
8724#include <X11/xpm.h>
8725_ACEOF
c0d27fcc 8726if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
8727 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8728 ac_status=$?
6bae0ccf 8729 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
8730 rm -f conftest.er1
8731 cat conftest.err >&5
c0d27fcc 8732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8733 (exit $ac_status); } >/dev/null; then
8734 if test -s conftest.err; then
8735 ac_cpp_err=$ac_c_preproc_warn_flag
8736 else
8737 ac_cpp_err=
8738 fi
8739else
8740 ac_cpp_err=yes
8741fi
8742if test -z "$ac_cpp_err"; then
c0d27fcc 8743 ac_header_preproc=yes
98418dba
CW
8744else
8745 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8746sed 's/^/| /' conftest.$ac_ext >&5
8747
c0d27fcc 8748 ac_header_preproc=no
98418dba
CW
8749fi
8750rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
8751echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8752echo "${ECHO_T}$ac_header_preproc" >&6
8753
8754# So? What about this header?
8755case $ac_header_compiler:$ac_header_preproc in
8756 yes:no )
8757 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
8758echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8759 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
8760echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
8761 (
8762 cat <<\_ASBOX
8763## ------------------------------------ ##
8764## Report this to bug-autoconf@gnu.org. ##
8765## ------------------------------------ ##
8766_ASBOX
8767 ) |
8768 sed "s/^/$as_me: WARNING: /" >&2
8769 ;;
c0d27fcc
MR
8770 no:yes )
8771 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
8772echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
8773 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
8774echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
8775 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
8776echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
8777 (
8778 cat <<\_ASBOX
8779## ------------------------------------ ##
8780## Report this to bug-autoconf@gnu.org. ##
8781## ------------------------------------ ##
8782_ASBOX
8783 ) |
8784 sed "s/^/$as_me: WARNING: /" >&2
8785 ;;
c0d27fcc
MR
8786esac
8787echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
8788echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
8789if test "${ac_cv_header_X11_xpm_h+set}" = set; then
8790 echo $ECHO_N "(cached) $ECHO_C" >&6
8791else
8792 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 8793fi
c0d27fcc 8794echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
98418dba 8795echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
c0d27fcc
MR
8796
8797fi
98418dba 8798if test $ac_cv_header_X11_xpm_h = yes; then
c0d27fcc 8799 echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
98418dba
CW
8800echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6
8801if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 8802 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8803else
98418dba
CW
8804 ac_check_lib_save_LIBS=$LIBS
8805LIBS="-lXpm -lX11 $LIBS"
8806cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8807#line $LINENO "configure"
cd958eb3
MB
8808/* confdefs.h. */
8809_ACEOF
8810cat confdefs.h >>conftest.$ac_ext
8811cat >>conftest.$ac_ext <<_ACEOF
8812/* end confdefs.h. */
98418dba 8813
ba4481b5 8814/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8815#ifdef __cplusplus
8816extern "C"
8817#endif
ba4481b5 8818/* We use char because int might match the return type of a gcc2
503d2be0 8819 builtin and then its argument prototype would still apply. */
98418dba 8820char XpmReadFileToPixmap ();
503d2be0
AS
8821int
8822main ()
8823{
98418dba 8824XpmReadFileToPixmap ();
503d2be0
AS
8825 ;
8826 return 0;
8827}
8828_ACEOF
8829rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8830if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
8831 (eval $ac_link) 2>&5
8832 ac_status=$?
c0d27fcc 8833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
8834 (exit $ac_status); } &&
8835 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
8837 (eval $ac_try) 2>&5
8838 ac_status=$?
c0d27fcc 8839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 8840 (exit $ac_status); }; }; then
98418dba 8841 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
8842else
8843 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8844sed 's/^/| /' conftest.$ac_ext >&5
8845
98418dba 8846ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0
AS
8847fi
8848rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 8849LIBS=$ac_check_lib_save_LIBS
503d2be0 8850fi
c0d27fcc 8851echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
98418dba
CW
8852echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6
8853if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
8854 HAVE_XPM=yes
ba4481b5
DL
8855fi
8856
98418dba
CW
8857fi
8858
c0d27fcc 8859
98418dba 8860 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 8861 echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
98418dba
CW
8862echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6
8863 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8864#line $LINENO "configure"
cd958eb3
MB
8865/* confdefs.h. */
8866_ACEOF
8867cat confdefs.h >>conftest.$ac_ext
8868cat >>conftest.$ac_ext <<_ACEOF
8869/* end confdefs.h. */
98418dba
CW
8870#include "X11/xpm.h"
8871#ifndef XpmReturnAllocPixels
8872no_return_alloc_pixels
503d2be0 8873#endif
ba4481b5 8874
98418dba
CW
8875_ACEOF
8876if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 8877 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
8878 HAVE_XPM=no
8879else
8880 HAVE_XPM=yes
8881fi
8882rm -f conftest*
ba4481b5 8883
c0d27fcc 8884
98418dba 8885 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 8886 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
8887echo "${ECHO_T}yes" >&6
8888 else
c0d27fcc 8889 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
8890echo "${ECHO_T}no" >&6
8891 fi
8892 fi
8893 fi
8894
8895 if test "${HAVE_XPM}" = "yes"; then
b936fae4 8896
c0d27fcc 8897cat >>confdefs.h <<\_ACEOF
98418dba 8898#define HAVE_XPM 1
c0d27fcc 8899_ACEOF
98418dba
CW
8900
8901 fi
8902fi
8903
8904### Use -ljpeg if available, unless `--with-jpeg=no'.
8905HAVE_JPEG=no
8906if test "${HAVE_X11}" = "yes"; then
8907 if test "${with_jpeg}" != "no"; then
c0d27fcc
MR
8908 if test "${ac_cv_header_jerror_h+set}" = set; then
8909 echo "$as_me:$LINENO: checking for jerror.h" >&5
98418dba
CW
8910echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
8911if test "${ac_cv_header_jerror_h+set}" = set; then
8912 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
8913fi
8914echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
8915echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
503d2be0 8916else
c0d27fcc
MR
8917 # Is the header compilable?
8918echo "$as_me:$LINENO: checking jerror.h usability" >&5
8919echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6
8920cat >conftest.$ac_ext <<_ACEOF
8921#line $LINENO "configure"
cd958eb3
MB
8922/* confdefs.h. */
8923_ACEOF
8924cat confdefs.h >>conftest.$ac_ext
8925cat >>conftest.$ac_ext <<_ACEOF
8926/* end confdefs.h. */
c0d27fcc
MR
8927$ac_includes_default
8928#include <jerror.h>
8929_ACEOF
8930rm -f conftest.$ac_objext
8931if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8932 (eval $ac_compile) 2>&5
8933 ac_status=$?
8934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8935 (exit $ac_status); } &&
8936 { ac_try='test -s conftest.$ac_objext'
8937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8938 (eval $ac_try) 2>&5
8939 ac_status=$?
8940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8941 (exit $ac_status); }; }; then
8942 ac_header_compiler=yes
8943else
8944 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8945sed 's/^/| /' conftest.$ac_ext >&5
8946
c0d27fcc
MR
8947ac_header_compiler=no
8948fi
8949rm -f conftest.$ac_objext conftest.$ac_ext
8950echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8951echo "${ECHO_T}$ac_header_compiler" >&6
8952
8953# Is the header present?
8954echo "$as_me:$LINENO: checking jerror.h presence" >&5
8955echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6
8956cat >conftest.$ac_ext <<_ACEOF
8957#line $LINENO "configure"
cd958eb3
MB
8958/* confdefs.h. */
8959_ACEOF
8960cat confdefs.h >>conftest.$ac_ext
8961cat >>conftest.$ac_ext <<_ACEOF
8962/* end confdefs.h. */
98418dba
CW
8963#include <jerror.h>
8964_ACEOF
c0d27fcc 8965if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
8966 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8967 ac_status=$?
6bae0ccf 8968 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
8969 rm -f conftest.er1
8970 cat conftest.err >&5
c0d27fcc 8971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8972 (exit $ac_status); } >/dev/null; then
8973 if test -s conftest.err; then
8974 ac_cpp_err=$ac_c_preproc_warn_flag
8975 else
8976 ac_cpp_err=
8977 fi
8978else
8979 ac_cpp_err=yes
503d2be0 8980fi
98418dba 8981if test -z "$ac_cpp_err"; then
c0d27fcc 8982 ac_header_preproc=yes
ba4481b5 8983else
98418dba 8984 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8985sed 's/^/| /' conftest.$ac_ext >&5
8986
c0d27fcc 8987 ac_header_preproc=no
98418dba
CW
8988fi
8989rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
8990echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8991echo "${ECHO_T}$ac_header_preproc" >&6
8992
8993# So? What about this header?
8994case $ac_header_compiler:$ac_header_preproc in
8995 yes:no )
8996 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
8997echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8998 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
8999echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
9000 (
9001 cat <<\_ASBOX
9002## ------------------------------------ ##
9003## Report this to bug-autoconf@gnu.org. ##
9004## ------------------------------------ ##
9005_ASBOX
9006 ) |
9007 sed "s/^/$as_me: WARNING: /" >&2
9008 ;;
c0d27fcc
MR
9009 no:yes )
9010 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
9011echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
9012 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
9013echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
9014 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9015echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
9016 (
9017 cat <<\_ASBOX
9018## ------------------------------------ ##
9019## Report this to bug-autoconf@gnu.org. ##
9020## ------------------------------------ ##
9021_ASBOX
9022 ) |
9023 sed "s/^/$as_me: WARNING: /" >&2
9024 ;;
c0d27fcc
MR
9025esac
9026echo "$as_me:$LINENO: checking for jerror.h" >&5
9027echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
9028if test "${ac_cv_header_jerror_h+set}" = set; then
9029 echo $ECHO_N "(cached) $ECHO_C" >&6
9030else
9031 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 9032fi
c0d27fcc 9033echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
98418dba 9034echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
c0d27fcc
MR
9035
9036fi
98418dba 9037if test $ac_cv_header_jerror_h = yes; then
c0d27fcc 9038 echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
98418dba
CW
9039echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6
9040if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 9041 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9042else
98418dba
CW
9043 ac_check_lib_save_LIBS=$LIBS
9044LIBS="-ljpeg $LIBS"
9045cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 9046#line $LINENO "configure"
cd958eb3
MB
9047/* confdefs.h. */
9048_ACEOF
9049cat confdefs.h >>conftest.$ac_ext
9050cat >>conftest.$ac_ext <<_ACEOF
9051/* end confdefs.h. */
98418dba
CW
9052
9053/* Override any gcc2 internal prototype to avoid an error. */
9054#ifdef __cplusplus
9055extern "C"
9056#endif
9057/* We use char because int might match the return type of a gcc2
9058 builtin and then its argument prototype would still apply. */
9059char jpeg_destroy_compress ();
503d2be0
AS
9060int
9061main ()
9062{
98418dba 9063jpeg_destroy_compress ();
503d2be0
AS
9064 ;
9065 return 0;
9066}
9067_ACEOF
9068rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9069if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
9070 (eval $ac_link) 2>&5
9071 ac_status=$?
c0d27fcc 9072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
9073 (exit $ac_status); } &&
9074 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
9076 (eval $ac_try) 2>&5
9077 ac_status=$?
c0d27fcc 9078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 9079 (exit $ac_status); }; }; then
98418dba 9080 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 9081else
503d2be0 9082 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9083sed 's/^/| /' conftest.$ac_ext >&5
9084
98418dba 9085ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 9086fi
503d2be0 9087rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 9088LIBS=$ac_check_lib_save_LIBS
ba4481b5 9089fi
c0d27fcc 9090echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
98418dba
CW
9091echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6
9092if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
9093 HAVE_JPEG=yes
ba4481b5 9094fi
98418dba 9095
ba4481b5 9096fi
98418dba 9097
c0d27fcc 9098
ba4481b5 9099 fi
ba4481b5 9100
c0d27fcc 9101
98418dba 9102 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 9103 cat >>confdefs.h <<\_ACEOF
98418dba 9104#define HAVE_JPEG 1
c0d27fcc 9105_ACEOF
98418dba
CW
9106
9107 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 9108#line $LINENO "configure"
cd958eb3
MB
9109/* confdefs.h. */
9110_ACEOF
9111cat confdefs.h >>conftest.$ac_ext
9112cat >>conftest.$ac_ext <<_ACEOF
9113/* end confdefs.h. */
22044edf 9114#include <jpeglib.h>
98418dba
CW
9115 version=JPEG_LIB_VERSION
9116
9117_ACEOF
9118if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 9119 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 9120 cat >>confdefs.h <<\_ACEOF
98418dba 9121#define HAVE_JPEG 1
c0d27fcc 9122_ACEOF
ba4481b5 9123
98418dba 9124else
c0d27fcc 9125 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
9126echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
9127 HAVE_JPEG=no
ba4481b5 9128fi
98418dba 9129rm -f conftest*
ba4481b5 9130
98418dba
CW
9131 fi
9132fi
503d2be0 9133
98418dba
CW
9134### Use -lpng if available, unless `--with-png=no'.
9135HAVE_PNG=no
9136if test "${HAVE_X11}" = "yes"; then
9137 if test "${with_png}" != "no"; then
c0d27fcc
MR
9138 if test "${ac_cv_header_png_h+set}" = set; then
9139 echo "$as_me:$LINENO: checking for png.h" >&5
98418dba
CW
9140echo $ECHO_N "checking for png.h... $ECHO_C" >&6
9141if test "${ac_cv_header_png_h+set}" = set; then
503d2be0 9142 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
9143fi
9144echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5
9145echo "${ECHO_T}$ac_cv_header_png_h" >&6
503d2be0 9146else
c0d27fcc
MR
9147 # Is the header compilable?
9148echo "$as_me:$LINENO: checking png.h usability" >&5
9149echo $ECHO_N "checking png.h usability... $ECHO_C" >&6
9150cat >conftest.$ac_ext <<_ACEOF
9151#line $LINENO "configure"
cd958eb3
MB
9152/* confdefs.h. */
9153_ACEOF
9154cat confdefs.h >>conftest.$ac_ext
9155cat >>conftest.$ac_ext <<_ACEOF
9156/* end confdefs.h. */
c0d27fcc
MR
9157$ac_includes_default
9158#include <png.h>
9159_ACEOF
9160rm -f conftest.$ac_objext
9161if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9162 (eval $ac_compile) 2>&5
9163 ac_status=$?
9164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9165 (exit $ac_status); } &&
9166 { ac_try='test -s conftest.$ac_objext'
9167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9168 (eval $ac_try) 2>&5
9169 ac_status=$?
9170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9171 (exit $ac_status); }; }; then
9172 ac_header_compiler=yes
9173else
9174 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9175sed 's/^/| /' conftest.$ac_ext >&5
9176
c0d27fcc
MR
9177ac_header_compiler=no
9178fi
9179rm -f conftest.$ac_objext conftest.$ac_ext
9180echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9181echo "${ECHO_T}$ac_header_compiler" >&6
9182
9183# Is the header present?
9184echo "$as_me:$LINENO: checking png.h presence" >&5
9185echo $ECHO_N "checking png.h presence... $ECHO_C" >&6
9186cat >conftest.$ac_ext <<_ACEOF
9187#line $LINENO "configure"
cd958eb3
MB
9188/* confdefs.h. */
9189_ACEOF
9190cat confdefs.h >>conftest.$ac_ext
9191cat >>conftest.$ac_ext <<_ACEOF
9192/* end confdefs.h. */
98418dba 9193#include <png.h>
503d2be0 9194_ACEOF
c0d27fcc 9195if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9196 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9197 ac_status=$?
6bae0ccf 9198 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
9199 rm -f conftest.er1
9200 cat conftest.err >&5
c0d27fcc 9201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
9202 (exit $ac_status); } >/dev/null; then
9203 if test -s conftest.err; then
9204 ac_cpp_err=$ac_c_preproc_warn_flag
9205 else
9206 ac_cpp_err=
9207 fi
9208else
9209 ac_cpp_err=yes
9210fi
9211if test -z "$ac_cpp_err"; then
c0d27fcc 9212 ac_header_preproc=yes
503d2be0
AS
9213else
9214 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9215sed 's/^/| /' conftest.$ac_ext >&5
9216
c0d27fcc 9217 ac_header_preproc=no
ba4481b5 9218fi
503d2be0 9219rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
9220echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9221echo "${ECHO_T}$ac_header_preproc" >&6
9222
9223# So? What about this header?
9224case $ac_header_compiler:$ac_header_preproc in
9225 yes:no )
9226 { echo "$as_me:$LINENO: WARNING: png.h: accepted by the compiler, rejected by the preprocessor!" >&5
9227echo "$as_me: WARNING: png.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9228 { echo "$as_me:$LINENO: WARNING: png.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9229echo "$as_me: WARNING: png.h: proceeding with the preprocessor's result" >&2;}
9230 (
9231 cat <<\_ASBOX
9232## ------------------------------------ ##
9233## Report this to bug-autoconf@gnu.org. ##
9234## ------------------------------------ ##
9235_ASBOX
9236 ) |
9237 sed "s/^/$as_me: WARNING: /" >&2
9238 ;;
c0d27fcc
MR
9239 no:yes )
9240 { echo "$as_me:$LINENO: WARNING: png.h: present but cannot be compiled" >&5
9241echo "$as_me: WARNING: png.h: present but cannot be compiled" >&2;}
9242 { echo "$as_me:$LINENO: WARNING: png.h: check for missing prerequisite headers?" >&5
9243echo "$as_me: WARNING: png.h: check for missing prerequisite headers?" >&2;}
9244 { echo "$as_me:$LINENO: WARNING: png.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9245echo "$as_me: WARNING: png.h: proceeding with the preprocessor's result" >&2;}
9246 (
9247 cat <<\_ASBOX
9248## ------------------------------------ ##
9249## Report this to bug-autoconf@gnu.org. ##
9250## ------------------------------------ ##
9251_ASBOX
9252 ) |
9253 sed "s/^/$as_me: WARNING: /" >&2
9254 ;;
c0d27fcc
MR
9255esac
9256echo "$as_me:$LINENO: checking for png.h" >&5
9257echo $ECHO_N "checking for png.h... $ECHO_C" >&6
9258if test "${ac_cv_header_png_h+set}" = set; then
9259 echo $ECHO_N "(cached) $ECHO_C" >&6
9260else
9261 ac_cv_header_png_h=$ac_header_preproc
ba4481b5 9262fi
c0d27fcc 9263echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5
98418dba 9264echo "${ECHO_T}$ac_cv_header_png_h" >&6
c0d27fcc
MR
9265
9266fi
98418dba 9267if test $ac_cv_header_png_h = yes; then
c0d27fcc 9268 echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
98418dba
CW
9269echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6
9270if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 9271 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9272else
98418dba
CW
9273 ac_check_lib_save_LIBS=$LIBS
9274LIBS="-lpng -lz -lm $LIBS"
9275cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 9276#line $LINENO "configure"
cd958eb3
MB
9277/* confdefs.h. */
9278_ACEOF
9279cat confdefs.h >>conftest.$ac_ext
9280cat >>conftest.$ac_ext <<_ACEOF
9281/* end confdefs.h. */
98418dba 9282
ba4481b5 9283/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9284#ifdef __cplusplus
9285extern "C"
9286#endif
ba4481b5 9287/* We use char because int might match the return type of a gcc2
503d2be0 9288 builtin and then its argument prototype would still apply. */
98418dba 9289char png_get_channels ();
503d2be0
AS
9290int
9291main ()
9292{
98418dba 9293png_get_channels ();
503d2be0
AS
9294 ;
9295 return 0;
9296}
9297_ACEOF
9298rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9299if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
9300 (eval $ac_link) 2>&5
9301 ac_status=$?
c0d27fcc 9302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9303 (exit $ac_status); } &&
9304 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9305 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
9306 (eval $ac_try) 2>&5
9307 ac_status=$?
c0d27fcc 9308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 9309 (exit $ac_status); }; }; then
98418dba 9310 ac_cv_lib_png_png_get_channels=yes
73b77ee5 9311else
98418dba 9312 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9313sed 's/^/| /' conftest.$ac_ext >&5
9314
98418dba 9315ac_cv_lib_png_png_get_channels=no
73b77ee5 9316fi
98418dba
CW
9317rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9318LIBS=$ac_check_lib_save_LIBS
73b77ee5 9319fi
c0d27fcc 9320echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
98418dba
CW
9321echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6
9322if test $ac_cv_lib_png_png_get_channels = yes; then
9323 HAVE_PNG=yes
73b77ee5 9324fi
503d2be0 9325
98418dba
CW
9326fi
9327
c0d27fcc 9328
98418dba
CW
9329 fi
9330
9331 if test "${HAVE_PNG}" = "yes"; then
b936fae4 9332
c0d27fcc 9333cat >>confdefs.h <<\_ACEOF
98418dba 9334#define HAVE_PNG 1
c0d27fcc 9335_ACEOF
73b77ee5 9336
98418dba 9337 fi
73b77ee5
GM
9338fi
9339
98418dba
CW
9340### Use -ltiff if available, unless `--with-tiff=no'.
9341HAVE_TIFF=no
9342if test "${HAVE_X11}" = "yes"; then
9343 if test "${with_tiff}" != "no"; then
c0d27fcc
MR
9344 if test "${ac_cv_header_tiffio_h+set}" = set; then
9345 echo "$as_me:$LINENO: checking for tiffio.h" >&5
98418dba
CW
9346echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
9347if test "${ac_cv_header_tiffio_h+set}" = set; then
9348 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
9349fi
9350echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
9351echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
98418dba 9352else
c0d27fcc
MR
9353 # Is the header compilable?
9354echo "$as_me:$LINENO: checking tiffio.h usability" >&5
9355echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6
9356cat >conftest.$ac_ext <<_ACEOF
9357#line $LINENO "configure"
cd958eb3
MB
9358/* confdefs.h. */
9359_ACEOF
9360cat confdefs.h >>conftest.$ac_ext
9361cat >>conftest.$ac_ext <<_ACEOF
9362/* end confdefs.h. */
c0d27fcc
MR
9363$ac_includes_default
9364#include <tiffio.h>
9365_ACEOF
9366rm -f conftest.$ac_objext
9367if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9368 (eval $ac_compile) 2>&5
9369 ac_status=$?
9370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9371 (exit $ac_status); } &&
9372 { ac_try='test -s conftest.$ac_objext'
9373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9374 (eval $ac_try) 2>&5
9375 ac_status=$?
9376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9377 (exit $ac_status); }; }; then
9378 ac_header_compiler=yes
9379else
9380 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9381sed 's/^/| /' conftest.$ac_ext >&5
9382
c0d27fcc
MR
9383ac_header_compiler=no
9384fi
9385rm -f conftest.$ac_objext conftest.$ac_ext
9386echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9387echo "${ECHO_T}$ac_header_compiler" >&6
9388
9389# Is the header present?
9390echo "$as_me:$LINENO: checking tiffio.h presence" >&5
9391echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6
9392cat >conftest.$ac_ext <<_ACEOF
9393#line $LINENO "configure"
cd958eb3
MB
9394/* confdefs.h. */
9395_ACEOF
9396cat confdefs.h >>conftest.$ac_ext
9397cat >>conftest.$ac_ext <<_ACEOF
9398/* end confdefs.h. */
98418dba
CW
9399#include <tiffio.h>
9400_ACEOF
c0d27fcc 9401if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
9402 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9403 ac_status=$?
6bae0ccf 9404 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9405 rm -f conftest.er1
9406 cat conftest.err >&5
c0d27fcc 9407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9408 (exit $ac_status); } >/dev/null; then
9409 if test -s conftest.err; then
9410 ac_cpp_err=$ac_c_preproc_warn_flag
9411 else
9412 ac_cpp_err=
9413 fi
9414else
9415 ac_cpp_err=yes
9416fi
9417if test -z "$ac_cpp_err"; then
c0d27fcc 9418 ac_header_preproc=yes
98418dba
CW
9419else
9420 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9421sed 's/^/| /' conftest.$ac_ext >&5
9422
c0d27fcc 9423 ac_header_preproc=no
98418dba
CW
9424fi
9425rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
9426echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9427echo "${ECHO_T}$ac_header_preproc" >&6
9428
9429# So? What about this header?
9430case $ac_header_compiler:$ac_header_preproc in
9431 yes:no )
9432 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
9433echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9434 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9435echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
9436 (
9437 cat <<\_ASBOX
9438## ------------------------------------ ##
9439## Report this to bug-autoconf@gnu.org. ##
9440## ------------------------------------ ##
9441_ASBOX
9442 ) |
9443 sed "s/^/$as_me: WARNING: /" >&2
9444 ;;
c0d27fcc
MR
9445 no:yes )
9446 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
9447echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
9448 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
9449echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
9450 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9451echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
9452 (
9453 cat <<\_ASBOX
9454## ------------------------------------ ##
9455## Report this to bug-autoconf@gnu.org. ##
9456## ------------------------------------ ##
9457_ASBOX
9458 ) |
9459 sed "s/^/$as_me: WARNING: /" >&2
9460 ;;
c0d27fcc
MR
9461esac
9462echo "$as_me:$LINENO: checking for tiffio.h" >&5
9463echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
9464if test "${ac_cv_header_tiffio_h+set}" = set; then
9465 echo $ECHO_N "(cached) $ECHO_C" >&6
9466else
9467 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 9468fi
c0d27fcc 9469echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
98418dba 9470echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
c0d27fcc
MR
9471
9472fi
98418dba
CW
9473if test $ac_cv_header_tiffio_h = yes; then
9474 tifflibs="-lz -lm"
9475 # At least one tiff package requires the jpeg library.
9476 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
c0d27fcc 9477 echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
98418dba
CW
9478echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6
9479if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 9480 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 9481else
503d2be0 9482 ac_check_lib_save_LIBS=$LIBS
98418dba 9483LIBS="-ltiff $tifflibs $LIBS"
503d2be0 9484cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 9485#line $LINENO "configure"
cd958eb3
MB
9486/* confdefs.h. */
9487_ACEOF
9488cat confdefs.h >>conftest.$ac_ext
9489cat >>conftest.$ac_ext <<_ACEOF
9490/* end confdefs.h. */
503d2be0 9491
73b77ee5 9492/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9493#ifdef __cplusplus
9494extern "C"
9495#endif
73b77ee5 9496/* We use char because int might match the return type of a gcc2
503d2be0 9497 builtin and then its argument prototype would still apply. */
98418dba 9498char TIFFGetVersion ();
503d2be0
AS
9499int
9500main ()
9501{
98418dba 9502TIFFGetVersion ();
503d2be0
AS
9503 ;
9504 return 0;
9505}
9506_ACEOF
9507rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9508if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
9509 (eval $ac_link) 2>&5
9510 ac_status=$?
c0d27fcc 9511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
9512 (exit $ac_status); } &&
9513 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
9515 (eval $ac_try) 2>&5
9516 ac_status=$?
c0d27fcc 9517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 9518 (exit $ac_status); }; }; then
98418dba 9519 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
9520else
9521 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9522sed 's/^/| /' conftest.$ac_ext >&5
9523
98418dba 9524ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0
AS
9525fi
9526rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9527LIBS=$ac_check_lib_save_LIBS
9528fi
c0d27fcc 9529echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
98418dba
CW
9530echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6
9531if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
9532 HAVE_TIFF=yes
9533fi
9534
9535fi
73b77ee5 9536
c0d27fcc 9537
98418dba
CW
9538 fi
9539
9540 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 9541
c0d27fcc 9542cat >>confdefs.h <<\_ACEOF
98418dba 9543#define HAVE_TIFF 1
c0d27fcc 9544_ACEOF
98418dba
CW
9545
9546 fi
73b77ee5
GM
9547fi
9548
98418dba
CW
9549### Use -lgif if available, unless `--with-gif=no'.
9550HAVE_GIF=no
9551if test "${HAVE_X11}" = "yes"; then
9552 if test "${with_gif}" != "no"; then
c0d27fcc
MR
9553 if test "${ac_cv_header_gif_lib_h+set}" = set; then
9554 echo "$as_me:$LINENO: checking for gif_lib.h" >&5
98418dba
CW
9555echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
9556if test "${ac_cv_header_gif_lib_h+set}" = set; then
9557 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
9558fi
9559echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
9560echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
98418dba 9561else
c0d27fcc
MR
9562 # Is the header compilable?
9563echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
9564echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6
9565cat >conftest.$ac_ext <<_ACEOF
9566#line $LINENO "configure"
cd958eb3
MB
9567/* confdefs.h. */
9568_ACEOF
9569cat confdefs.h >>conftest.$ac_ext
9570cat >>conftest.$ac_ext <<_ACEOF
9571/* end confdefs.h. */
c0d27fcc
MR
9572$ac_includes_default
9573#include <gif_lib.h>
9574_ACEOF
9575rm -f conftest.$ac_objext
9576if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9577 (eval $ac_compile) 2>&5
9578 ac_status=$?
9579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9580 (exit $ac_status); } &&
9581 { ac_try='test -s conftest.$ac_objext'
9582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9583 (eval $ac_try) 2>&5
9584 ac_status=$?
9585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9586 (exit $ac_status); }; }; then
9587 ac_header_compiler=yes
9588else
9589 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9590sed 's/^/| /' conftest.$ac_ext >&5
9591
c0d27fcc
MR
9592ac_header_compiler=no
9593fi
9594rm -f conftest.$ac_objext conftest.$ac_ext
9595echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9596echo "${ECHO_T}$ac_header_compiler" >&6
9597
9598# Is the header present?
9599echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
9600echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6
9601cat >conftest.$ac_ext <<_ACEOF
9602#line $LINENO "configure"
cd958eb3
MB
9603/* confdefs.h. */
9604_ACEOF
9605cat confdefs.h >>conftest.$ac_ext
9606cat >>conftest.$ac_ext <<_ACEOF
9607/* end confdefs.h. */
98418dba
CW
9608#include <gif_lib.h>
9609_ACEOF
c0d27fcc 9610if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
9611 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9612 ac_status=$?
6bae0ccf 9613 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9614 rm -f conftest.er1
9615 cat conftest.err >&5
c0d27fcc 9616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9617 (exit $ac_status); } >/dev/null; then
9618 if test -s conftest.err; then
9619 ac_cpp_err=$ac_c_preproc_warn_flag
9620 else
9621 ac_cpp_err=
9622 fi
9623else
9624 ac_cpp_err=yes
9625fi
9626if test -z "$ac_cpp_err"; then
c0d27fcc 9627 ac_header_preproc=yes
98418dba
CW
9628else
9629 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9630sed 's/^/| /' conftest.$ac_ext >&5
9631
c0d27fcc 9632 ac_header_preproc=no
98418dba
CW
9633fi
9634rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
9635echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9636echo "${ECHO_T}$ac_header_preproc" >&6
9637
9638# So? What about this header?
9639case $ac_header_compiler:$ac_header_preproc in
9640 yes:no )
9641 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
9642echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9643 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9644echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
9645 (
9646 cat <<\_ASBOX
9647## ------------------------------------ ##
9648## Report this to bug-autoconf@gnu.org. ##
9649## ------------------------------------ ##
9650_ASBOX
9651 ) |
9652 sed "s/^/$as_me: WARNING: /" >&2
9653 ;;
c0d27fcc
MR
9654 no:yes )
9655 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
9656echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
9657 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
9658echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
9659 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9660echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
9661 (
9662 cat <<\_ASBOX
9663## ------------------------------------ ##
9664## Report this to bug-autoconf@gnu.org. ##
9665## ------------------------------------ ##
9666_ASBOX
9667 ) |
9668 sed "s/^/$as_me: WARNING: /" >&2
9669 ;;
c0d27fcc
MR
9670esac
9671echo "$as_me:$LINENO: checking for gif_lib.h" >&5
9672echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
9673if test "${ac_cv_header_gif_lib_h+set}" = set; then
9674 echo $ECHO_N "(cached) $ECHO_C" >&6
9675else
9676 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 9677fi
c0d27fcc 9678echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
98418dba 9679echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
c0d27fcc
MR
9680
9681fi
98418dba
CW
9682if test $ac_cv_header_gif_lib_h = yes; then
9683 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
9684# Earlier versions can crash Emacs.
c0d27fcc 9685 echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
98418dba
CW
9686echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6
9687if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
503d2be0 9688 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 9689else
503d2be0 9690 ac_check_lib_save_LIBS=$LIBS
98418dba 9691LIBS="-lungif $LIBS"
503d2be0 9692cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 9693#line $LINENO "configure"
cd958eb3
MB
9694/* confdefs.h. */
9695_ACEOF
9696cat confdefs.h >>conftest.$ac_ext
9697cat >>conftest.$ac_ext <<_ACEOF
9698/* end confdefs.h. */
73b77ee5 9699
98418dba
CW
9700/* Override any gcc2 internal prototype to avoid an error. */
9701#ifdef __cplusplus
9702extern "C"
9703#endif
9704/* We use char because int might match the return type of a gcc2
9705 builtin and then its argument prototype would still apply. */
9706char EGifPutExtensionLast ();
503d2be0
AS
9707int
9708main ()
9709{
98418dba 9710EGifPutExtensionLast ();
503d2be0
AS
9711 ;
9712 return 0;
9713}
9714_ACEOF
9715rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9716if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
9717 (eval $ac_link) 2>&5
9718 ac_status=$?
c0d27fcc 9719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9720 (exit $ac_status); } &&
9721 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9723 (eval $ac_try) 2>&5
9724 ac_status=$?
c0d27fcc 9725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9726 (exit $ac_status); }; }; then
9727 ac_cv_lib_ungif_EGifPutExtensionLast=yes
9728else
9729 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9730sed 's/^/| /' conftest.$ac_ext >&5
9731
98418dba
CW
9732ac_cv_lib_ungif_EGifPutExtensionLast=no
9733fi
9734rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9735LIBS=$ac_check_lib_save_LIBS
9736fi
c0d27fcc 9737echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
98418dba
CW
9738echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6
9739if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
9740 HAVE_GIF=yes
9741fi
9742
9743fi
9744
c0d27fcc 9745
98418dba
CW
9746 fi
9747
9748 if test "${HAVE_GIF}" = "yes"; then
b936fae4 9749
c0d27fcc 9750cat >>confdefs.h <<\_ACEOF
98418dba 9751#define HAVE_GIF 1
c0d27fcc 9752_ACEOF
98418dba
CW
9753
9754 fi
9755fi
9756
c0d27fcc
MR
9757### Use Mac OS X Carbon API to implement GUI.
9758HAVE_CARBON=no
9759if test "${with_carbon}" != "no"; then
9760 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9761 echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9762echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
9763if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9764 echo $ECHO_N "(cached) $ECHO_C" >&6
9765fi
9766echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9767echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
9768else
9769 # Is the header compilable?
9770echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
9771echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6
9772cat >conftest.$ac_ext <<_ACEOF
9773#line $LINENO "configure"
cd958eb3
MB
9774/* confdefs.h. */
9775_ACEOF
9776cat confdefs.h >>conftest.$ac_ext
9777cat >>conftest.$ac_ext <<_ACEOF
9778/* end confdefs.h. */
c0d27fcc
MR
9779$ac_includes_default
9780#include <Carbon/Carbon.h>
9781_ACEOF
9782rm -f conftest.$ac_objext
9783if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9784 (eval $ac_compile) 2>&5
9785 ac_status=$?
9786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9787 (exit $ac_status); } &&
9788 { ac_try='test -s conftest.$ac_objext'
9789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9790 (eval $ac_try) 2>&5
9791 ac_status=$?
9792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9793 (exit $ac_status); }; }; then
9794 ac_header_compiler=yes
9795else
9796 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9797sed 's/^/| /' conftest.$ac_ext >&5
9798
c0d27fcc
MR
9799ac_header_compiler=no
9800fi
9801rm -f conftest.$ac_objext conftest.$ac_ext
9802echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9803echo "${ECHO_T}$ac_header_compiler" >&6
9804
9805# Is the header present?
9806echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
9807echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6
9808cat >conftest.$ac_ext <<_ACEOF
9809#line $LINENO "configure"
cd958eb3
MB
9810/* confdefs.h. */
9811_ACEOF
9812cat confdefs.h >>conftest.$ac_ext
9813cat >>conftest.$ac_ext <<_ACEOF
9814/* end confdefs.h. */
e0f712ba
AC
9815#include <Carbon/Carbon.h>
9816_ACEOF
c0d27fcc 9817if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
e0f712ba
AC
9818 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9819 ac_status=$?
6bae0ccf 9820 grep -v '^ *+' conftest.er1 >conftest.err
e0f712ba
AC
9821 rm -f conftest.er1
9822 cat conftest.err >&5
c0d27fcc 9823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
e0f712ba
AC
9824 (exit $ac_status); } >/dev/null; then
9825 if test -s conftest.err; then
9826 ac_cpp_err=$ac_c_preproc_warn_flag
9827 else
9828 ac_cpp_err=
9829 fi
9830else
9831 ac_cpp_err=yes
9832fi
9833if test -z "$ac_cpp_err"; then
c0d27fcc 9834 ac_header_preproc=yes
e0f712ba
AC
9835else
9836 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9837sed 's/^/| /' conftest.$ac_ext >&5
9838
c0d27fcc 9839 ac_header_preproc=no
e0f712ba
AC
9840fi
9841rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
9842echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9843echo "${ECHO_T}$ac_header_preproc" >&6
9844
9845# So? What about this header?
9846case $ac_header_compiler:$ac_header_preproc in
9847 yes:no )
9848 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
9849echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9850 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9851echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
9852 (
9853 cat <<\_ASBOX
9854## ------------------------------------ ##
9855## Report this to bug-autoconf@gnu.org. ##
9856## ------------------------------------ ##
9857_ASBOX
9858 ) |
9859 sed "s/^/$as_me: WARNING: /" >&2
9860 ;;
c0d27fcc
MR
9861 no:yes )
9862 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
9863echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
9864 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
9865echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
9866 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9867echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
9868 (
9869 cat <<\_ASBOX
9870## ------------------------------------ ##
9871## Report this to bug-autoconf@gnu.org. ##
9872## ------------------------------------ ##
9873_ASBOX
9874 ) |
9875 sed "s/^/$as_me: WARNING: /" >&2
9876 ;;
c0d27fcc
MR
9877esac
9878echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9879echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
9880if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9881 echo $ECHO_N "(cached) $ECHO_C" >&6
9882else
9883 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
e0f712ba 9884fi
c0d27fcc 9885echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
e0f712ba 9886echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
c0d27fcc
MR
9887
9888fi
e0f712ba
AC
9889if test $ac_cv_header_Carbon_Carbon_h = yes; then
9890 HAVE_CARBON=yes
9891fi
9892
c0d27fcc 9893
e0f712ba
AC
9894fi
9895
9896if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 9897
c0d27fcc 9898cat >>confdefs.h <<\_ACEOF
e0f712ba 9899#define HAVE_CARBON 1
c0d27fcc 9900_ACEOF
e0f712ba 9901
6a3a24fa
JD
9902 window_system=mac
9903 ## Specify the install directory
9904 carbon_appdir=
9905 if test "${carbon_appdir_x}" != ""; then
9906 case ${carbon_appdir_x} in
9907 y | ye | yes) carbon_appdir=/Applications ;;
9908 * ) carbon_appdir=${carbon_appdir_x} ;;
9909 esac
9910 fi
e0f712ba
AC
9911fi
9912
98418dba
CW
9913### Use session management (-lSM -lICE) if available
9914HAVE_X_SM=no
9915if test "${HAVE_X11}" = "yes"; then
c0d27fcc
MR
9916 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
9917 echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
98418dba
CW
9918echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
9919if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
9920 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
9921fi
9922echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
9923echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
503d2be0 9924else
c0d27fcc
MR
9925 # Is the header compilable?
9926echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
9927echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6
9928cat >conftest.$ac_ext <<_ACEOF
9929#line $LINENO "configure"
cd958eb3
MB
9930/* confdefs.h. */
9931_ACEOF
9932cat confdefs.h >>conftest.$ac_ext
9933cat >>conftest.$ac_ext <<_ACEOF
9934/* end confdefs.h. */
c0d27fcc
MR
9935$ac_includes_default
9936#include <X11/SM/SMlib.h>
9937_ACEOF
9938rm -f conftest.$ac_objext
9939if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9940 (eval $ac_compile) 2>&5
9941 ac_status=$?
9942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9943 (exit $ac_status); } &&
9944 { ac_try='test -s conftest.$ac_objext'
9945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9946 (eval $ac_try) 2>&5
9947 ac_status=$?
9948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9949 (exit $ac_status); }; }; then
9950 ac_header_compiler=yes
9951else
9952 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9953sed 's/^/| /' conftest.$ac_ext >&5
9954
c0d27fcc
MR
9955ac_header_compiler=no
9956fi
9957rm -f conftest.$ac_objext conftest.$ac_ext
9958echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9959echo "${ECHO_T}$ac_header_compiler" >&6
9960
9961# Is the header present?
9962echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
9963echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6
9964cat >conftest.$ac_ext <<_ACEOF
9965#line $LINENO "configure"
cd958eb3
MB
9966/* confdefs.h. */
9967_ACEOF
9968cat confdefs.h >>conftest.$ac_ext
9969cat >>conftest.$ac_ext <<_ACEOF
9970/* end confdefs.h. */
98418dba
CW
9971#include <X11/SM/SMlib.h>
9972_ACEOF
c0d27fcc 9973if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
9974 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9975 ac_status=$?
6bae0ccf 9976 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9977 rm -f conftest.er1
9978 cat conftest.err >&5
c0d27fcc 9979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9980 (exit $ac_status); } >/dev/null; then
9981 if test -s conftest.err; then
9982 ac_cpp_err=$ac_c_preproc_warn_flag
9983 else
9984 ac_cpp_err=
9985 fi
9986else
9987 ac_cpp_err=yes
503d2be0 9988fi
98418dba 9989if test -z "$ac_cpp_err"; then
c0d27fcc 9990 ac_header_preproc=yes
98418dba
CW
9991else
9992 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9993sed 's/^/| /' conftest.$ac_ext >&5
9994
c0d27fcc 9995 ac_header_preproc=no
98418dba
CW
9996fi
9997rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
9998echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9999echo "${ECHO_T}$ac_header_preproc" >&6
10000
10001# So? What about this header?
10002case $ac_header_compiler:$ac_header_preproc in
10003 yes:no )
10004 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
10005echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10006 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
10007echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
10008 (
10009 cat <<\_ASBOX
10010## ------------------------------------ ##
10011## Report this to bug-autoconf@gnu.org. ##
10012## ------------------------------------ ##
10013_ASBOX
10014 ) |
10015 sed "s/^/$as_me: WARNING: /" >&2
10016 ;;
c0d27fcc
MR
10017 no:yes )
10018 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
10019echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
10020 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
10021echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
10022 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
10023echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
10024 (
10025 cat <<\_ASBOX
10026## ------------------------------------ ##
10027## Report this to bug-autoconf@gnu.org. ##
10028## ------------------------------------ ##
10029_ASBOX
10030 ) |
10031 sed "s/^/$as_me: WARNING: /" >&2
10032 ;;
c0d27fcc
MR
10033esac
10034echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
10035echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
10036if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
10037 echo $ECHO_N "(cached) $ECHO_C" >&6
10038else
10039 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 10040fi
c0d27fcc 10041echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
98418dba 10042echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
c0d27fcc
MR
10043
10044fi
98418dba 10045if test $ac_cv_header_X11_SM_SMlib_h = yes; then
c0d27fcc 10046 echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
98418dba
CW
10047echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6
10048if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 10049 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 10050else
503d2be0 10051 ac_check_lib_save_LIBS=$LIBS
98418dba 10052LIBS="-lSM $LIBS"
503d2be0 10053cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10054#line $LINENO "configure"
cd958eb3
MB
10055/* confdefs.h. */
10056_ACEOF
10057cat confdefs.h >>conftest.$ac_ext
10058cat >>conftest.$ac_ext <<_ACEOF
10059/* end confdefs.h. */
503d2be0 10060
73b77ee5 10061/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10062#ifdef __cplusplus
10063extern "C"
10064#endif
73b77ee5 10065/* We use char because int might match the return type of a gcc2
503d2be0 10066 builtin and then its argument prototype would still apply. */
98418dba 10067char SmcOpenConnection ();
503d2be0
AS
10068int
10069main ()
10070{
98418dba 10071SmcOpenConnection ();
503d2be0
AS
10072 ;
10073 return 0;
10074}
10075_ACEOF
10076rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10077if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10078 (eval $ac_link) 2>&5
10079 ac_status=$?
c0d27fcc 10080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10081 (exit $ac_status); } &&
10082 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10084 (eval $ac_try) 2>&5
10085 ac_status=$?
c0d27fcc 10086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10087 (exit $ac_status); }; }; then
98418dba 10088 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
10089else
10090 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10091sed 's/^/| /' conftest.$ac_ext >&5
10092
98418dba 10093ac_cv_lib_SM_SmcOpenConnection=no
503d2be0
AS
10094fi
10095rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10096LIBS=$ac_check_lib_save_LIBS
10097fi
c0d27fcc 10098echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
98418dba
CW
10099echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6
10100if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
10101 HAVE_X_SM=yes
10102else
10103 -lICE
73b77ee5
GM
10104fi
10105
73b77ee5 10106fi
73b77ee5 10107
c0d27fcc
MR
10108
10109
98418dba 10110 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 10111
c0d27fcc 10112cat >>confdefs.h <<\_ACEOF
98418dba 10113#define HAVE_X_SM 1
c0d27fcc 10114_ACEOF
73b77ee5 10115
98418dba
CW
10116 case "$LIBS" in
10117 *-lSM*) ;;
10118 *) LIBS="-lSM -lICE $LIBS" ;;
10119 esac
73b77ee5 10120 fi
98418dba 10121fi
73b77ee5 10122
98418dba 10123# If netdb.h doesn't declare h_errno, we must declare it by hand.
c0d27fcc 10124echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
98418dba
CW
10125echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6
10126if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
10127 echo $ECHO_N "(cached) $ECHO_C" >&6
10128else
10129 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10130#line $LINENO "configure"
cd958eb3
MB
10131/* confdefs.h. */
10132_ACEOF
10133cat confdefs.h >>conftest.$ac_ext
10134cat >>conftest.$ac_ext <<_ACEOF
10135/* end confdefs.h. */
98418dba 10136#include <netdb.h>
503d2be0
AS
10137int
10138main ()
10139{
98418dba 10140return h_errno;
503d2be0
AS
10141 ;
10142 return 0;
10143}
10144_ACEOF
10145rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10146if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10147 (eval $ac_link) 2>&5
10148 ac_status=$?
c0d27fcc 10149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10150 (exit $ac_status); } &&
10151 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10153 (eval $ac_try) 2>&5
10154 ac_status=$?
c0d27fcc 10155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10156 (exit $ac_status); }; }; then
98418dba 10157 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 10158else
503d2be0 10159 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10160sed 's/^/| /' conftest.$ac_ext >&5
10161
98418dba 10162emacs_cv_netdb_declares_h_errno=no
73b77ee5 10163fi
503d2be0 10164rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 10165fi
c0d27fcc 10166echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
98418dba
CW
10167echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6
10168if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 10169
c0d27fcc 10170cat >>confdefs.h <<\_ACEOF
98418dba 10171#define HAVE_H_ERRNO 1
c0d27fcc 10172_ACEOF
73b77ee5 10173
98418dba
CW
10174fi
10175
10176# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10177# for constant arguments. Useless!
c0d27fcc 10178echo "$as_me:$LINENO: checking for working alloca.h" >&5
98418dba
CW
10179echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
10180if test "${ac_cv_working_alloca_h+set}" = set; then
10181 echo $ECHO_N "(cached) $ECHO_C" >&6
10182else
10183 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10184#line $LINENO "configure"
cd958eb3
MB
10185/* confdefs.h. */
10186_ACEOF
10187cat confdefs.h >>conftest.$ac_ext
10188cat >>conftest.$ac_ext <<_ACEOF
10189/* end confdefs.h. */
98418dba 10190#include <alloca.h>
503d2be0
AS
10191int
10192main ()
10193{
98418dba 10194char *p = (char *) alloca (2 * sizeof (int));
503d2be0
AS
10195 ;
10196 return 0;
10197}
10198_ACEOF
10199rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10200if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10201 (eval $ac_link) 2>&5
10202 ac_status=$?
c0d27fcc 10203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10204 (exit $ac_status); } &&
10205 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10207 (eval $ac_try) 2>&5
10208 ac_status=$?
c0d27fcc 10209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10210 (exit $ac_status); }; }; then
98418dba 10211 ac_cv_working_alloca_h=yes
73b77ee5 10212else
503d2be0 10213 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10214sed 's/^/| /' conftest.$ac_ext >&5
10215
98418dba 10216ac_cv_working_alloca_h=no
73b77ee5 10217fi
503d2be0 10218rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 10219fi
c0d27fcc 10220echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
98418dba
CW
10221echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
10222if test $ac_cv_working_alloca_h = yes; then
73b77ee5 10223
c0d27fcc 10224cat >>confdefs.h <<\_ACEOF
98418dba 10225#define HAVE_ALLOCA_H 1
c0d27fcc 10226_ACEOF
98418dba
CW
10227
10228fi
10229
c0d27fcc 10230echo "$as_me:$LINENO: checking for alloca" >&5
98418dba
CW
10231echo $ECHO_N "checking for alloca... $ECHO_C" >&6
10232if test "${ac_cv_func_alloca_works+set}" = set; then
10233 echo $ECHO_N "(cached) $ECHO_C" >&6
10234else
503d2be0 10235 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10236#line $LINENO "configure"
cd958eb3
MB
10237/* confdefs.h. */
10238_ACEOF
10239cat confdefs.h >>conftest.$ac_ext
10240cat >>conftest.$ac_ext <<_ACEOF
10241/* end confdefs.h. */
98418dba
CW
10242#ifdef __GNUC__
10243# define alloca __builtin_alloca
10244#else
10245# ifdef _MSC_VER
10246# include <malloc.h>
10247# define alloca _alloca
10248# else
10249# if HAVE_ALLOCA_H
10250# include <alloca.h>
10251# else
10252# ifdef _AIX
10253 #pragma alloca
10254# else
10255# ifndef alloca /* predefined by HP cc +Olibcalls */
10256char *alloca ();
10257# endif
10258# endif
10259# endif
10260# endif
10261#endif
10262
503d2be0
AS
10263int
10264main ()
10265{
98418dba 10266char *p = (char *) alloca (1);
503d2be0
AS
10267 ;
10268 return 0;
10269}
10270_ACEOF
10271rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10272if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10273 (eval $ac_link) 2>&5
10274 ac_status=$?
c0d27fcc 10275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10276 (exit $ac_status); } &&
10277 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10279 (eval $ac_try) 2>&5
10280 ac_status=$?
c0d27fcc 10281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10282 (exit $ac_status); }; }; then
98418dba 10283 ac_cv_func_alloca_works=yes
ac95a621 10284else
503d2be0 10285 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10286sed 's/^/| /' conftest.$ac_ext >&5
10287
98418dba 10288ac_cv_func_alloca_works=no
ac95a621 10289fi
503d2be0 10290rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 10291fi
c0d27fcc 10292echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
98418dba 10293echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
ac95a621 10294
98418dba
CW
10295if test $ac_cv_func_alloca_works = yes; then
10296
c0d27fcc 10297cat >>confdefs.h <<\_ACEOF
98418dba 10298#define HAVE_ALLOCA 1
c0d27fcc 10299_ACEOF
98418dba
CW
10300
10301else
10302 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10303# that cause trouble. Some versions do not even contain alloca or
10304# contain a buggy version. If you still want to use their alloca,
10305# use ar to extract alloca.o from them instead of compiling alloca.c.
10306
10307ALLOCA=alloca.$ac_objext
10308
c0d27fcc 10309cat >>confdefs.h <<\_ACEOF
98418dba 10310#define C_ALLOCA 1
c0d27fcc 10311_ACEOF
98418dba 10312
c0d27fcc
MR
10313
10314echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
98418dba
CW
10315echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
10316if test "${ac_cv_os_cray+set}" = set; then
10317 echo $ECHO_N "(cached) $ECHO_C" >&6
10318else
10319 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10320#line $LINENO "configure"
cd958eb3
MB
10321/* confdefs.h. */
10322_ACEOF
10323cat confdefs.h >>conftest.$ac_ext
10324cat >>conftest.$ac_ext <<_ACEOF
10325/* end confdefs.h. */
98418dba
CW
10326#if defined(CRAY) && ! defined(CRAY2)
10327webecray
10328#else
10329wenotbecray
10330#endif
10331
10332_ACEOF
10333if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 10334 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
10335 ac_cv_os_cray=yes
10336else
10337 ac_cv_os_cray=no
10338fi
10339rm -f conftest*
ac95a621 10340
98418dba 10341fi
c0d27fcc 10342echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
98418dba
CW
10343echo "${ECHO_T}$ac_cv_os_cray" >&6
10344if test $ac_cv_os_cray = yes; then
10345 for ac_func in _getb67 GETB67 getb67; do
10346 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 10347echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
10348echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10349if eval "test \"\${$as_ac_var+set}\" = set"; then
10350 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 10351else
503d2be0 10352 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10353#line $LINENO "configure"
cd958eb3
MB
10354/* confdefs.h. */
10355_ACEOF
10356cat confdefs.h >>conftest.$ac_ext
10357cat >>conftest.$ac_ext <<_ACEOF
10358/* end confdefs.h. */
73b77ee5 10359/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
10360 which can conflict with char $ac_func (); below.
10361 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10362 <limits.h> exists even on freestanding compilers. */
10363#ifdef __STDC__
10364# include <limits.h>
10365#else
10366# include <assert.h>
10367#endif
73b77ee5 10368/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10369#ifdef __cplusplus
10370extern "C"
cd958eb3 10371{
503d2be0 10372#endif
73b77ee5 10373/* We use char because int might match the return type of a gcc2
503d2be0
AS
10374 builtin and then its argument prototype would still apply. */
10375char $ac_func ();
73b77ee5
GM
10376/* The GNU C library defines this for functions which it implements
10377 to always fail with ENOSYS. Some functions are actually named
10378 something starting with __ and the normal name is an alias. */
10379#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10380choke me
10381#else
cd958eb3
MB
10382char (*f) () = $ac_func;
10383#endif
10384#ifdef __cplusplus
10385}
73b77ee5
GM
10386#endif
10387
cd958eb3
MB
10388int
10389main ()
10390{
9e71690e 10391return f != $ac_func;
503d2be0
AS
10392 ;
10393 return 0;
10394}
10395_ACEOF
10396rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10397if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10398 (eval $ac_link) 2>&5
10399 ac_status=$?
c0d27fcc 10400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10401 (exit $ac_status); } &&
10402 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10404 (eval $ac_try) 2>&5
10405 ac_status=$?
c0d27fcc 10406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10407 (exit $ac_status); }; }; then
10408 eval "$as_ac_var=yes"
10409else
10410 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10411sed 's/^/| /' conftest.$ac_ext >&5
10412
503d2be0
AS
10413eval "$as_ac_var=no"
10414fi
10415rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10416fi
c0d27fcc 10417echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
10418echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10419if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 10420
c0d27fcc 10421cat >>confdefs.h <<_ACEOF
98418dba 10422#define CRAY_STACKSEG_END $ac_func
c0d27fcc 10423_ACEOF
98418dba
CW
10424
10425 break
73b77ee5 10426fi
73b77ee5 10427
98418dba 10428 done
73b77ee5
GM
10429fi
10430
c0d27fcc 10431echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
98418dba
CW
10432echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
10433if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 10434 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
10435else
10436 if test "$cross_compiling" = yes; then
10437 ac_cv_c_stack_direction=0
73b77ee5 10438else
503d2be0 10439 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10440#line $LINENO "configure"
cd958eb3
MB
10441/* confdefs.h. */
10442_ACEOF
10443cat confdefs.h >>conftest.$ac_ext
10444cat >>conftest.$ac_ext <<_ACEOF
10445/* end confdefs.h. */
503d2be0 10446int
98418dba 10447find_stack_direction ()
503d2be0 10448{
98418dba
CW
10449 static char *addr = 0;
10450 auto char dummy;
10451 if (addr == 0)
10452 {
10453 addr = &dummy;
10454 return find_stack_direction ();
10455 }
73b77ee5 10456 else
98418dba
CW
10457 return (&dummy > addr) ? 1 : -1;
10458}
ba4481b5 10459
503d2be0
AS
10460int
10461main ()
10462{
98418dba 10463 exit (find_stack_direction () < 0);
503d2be0
AS
10464}
10465_ACEOF
98418dba 10466rm -f conftest$ac_exeext
c0d27fcc 10467if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10468 (eval $ac_link) 2>&5
10469 ac_status=$?
c0d27fcc 10470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10471 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 10472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10473 (eval $ac_try) 2>&5
10474 ac_status=$?
c0d27fcc 10475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10476 (exit $ac_status); }; }; then
98418dba 10477 ac_cv_c_stack_direction=1
ba4481b5 10478else
98418dba
CW
10479 echo "$as_me: program exited with status $ac_status" >&5
10480echo "$as_me: failed program was:" >&5
cd958eb3
MB
10481sed 's/^/| /' conftest.$ac_ext >&5
10482
c0d27fcc 10483( exit $ac_status )
98418dba 10484ac_cv_c_stack_direction=-1
ba4481b5 10485fi
6bae0ccf 10486rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 10487fi
98418dba 10488fi
c0d27fcc 10489echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
98418dba
CW
10490echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
10491
c0d27fcc 10492cat >>confdefs.h <<_ACEOF
98418dba 10493#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
10494_ACEOF
10495
ba4481b5 10496
ba4481b5
DL
10497fi
10498
c0d27fcc 10499
98418dba
CW
10500# fmod, logb, and frexp are found in -lm on most systems.
10501# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
10502
c0d27fcc 10503echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
98418dba
CW
10504echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
10505if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 10506 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 10507else
98418dba
CW
10508 ac_check_lib_save_LIBS=$LIBS
10509LIBS="-lm $LIBS"
10510cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10511#line $LINENO "configure"
cd958eb3
MB
10512/* confdefs.h. */
10513_ACEOF
10514cat confdefs.h >>conftest.$ac_ext
10515cat >>conftest.$ac_ext <<_ACEOF
10516/* end confdefs.h. */
ba4481b5 10517
98418dba
CW
10518/* Override any gcc2 internal prototype to avoid an error. */
10519#ifdef __cplusplus
10520extern "C"
10521#endif
10522/* We use char because int might match the return type of a gcc2
10523 builtin and then its argument prototype would still apply. */
10524char sqrt ();
503d2be0
AS
10525int
10526main ()
10527{
98418dba 10528sqrt ();
503d2be0
AS
10529 ;
10530 return 0;
10531}
10532_ACEOF
10533rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10534if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10535 (eval $ac_link) 2>&5
10536 ac_status=$?
c0d27fcc 10537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10538 (exit $ac_status); } &&
10539 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10541 (eval $ac_try) 2>&5
10542 ac_status=$?
c0d27fcc 10543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10544 (exit $ac_status); }; }; then
98418dba 10545 ac_cv_lib_m_sqrt=yes
ba4481b5 10546else
503d2be0 10547 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10548sed 's/^/| /' conftest.$ac_ext >&5
10549
98418dba 10550ac_cv_lib_m_sqrt=no
ba4481b5 10551fi
503d2be0 10552rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 10553LIBS=$ac_check_lib_save_LIBS
ba4481b5 10554fi
c0d27fcc 10555echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
98418dba
CW
10556echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
10557if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 10558 cat >>confdefs.h <<_ACEOF
98418dba 10559#define HAVE_LIBM 1
c0d27fcc 10560_ACEOF
98418dba
CW
10561
10562 LIBS="-lm $LIBS"
ba4481b5 10563
ba4481b5
DL
10564fi
10565
c0d27fcc 10566
98418dba
CW
10567# Check for mail-locking functions in a "mail" library
10568
c0d27fcc 10569echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
98418dba
CW
10570echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6
10571if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 10572 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 10573else
98418dba
CW
10574 ac_check_lib_save_LIBS=$LIBS
10575LIBS="-lmail $LIBS"
10576cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10577#line $LINENO "configure"
cd958eb3
MB
10578/* confdefs.h. */
10579_ACEOF
10580cat confdefs.h >>conftest.$ac_ext
10581cat >>conftest.$ac_ext <<_ACEOF
10582/* end confdefs.h. */
98418dba
CW
10583
10584/* Override any gcc2 internal prototype to avoid an error. */
10585#ifdef __cplusplus
10586extern "C"
10587#endif
10588/* We use char because int might match the return type of a gcc2
10589 builtin and then its argument prototype would still apply. */
10590char maillock ();
503d2be0
AS
10591int
10592main ()
10593{
98418dba 10594maillock ();
503d2be0
AS
10595 ;
10596 return 0;
10597}
10598_ACEOF
10599rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10600if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10601 (eval $ac_link) 2>&5
10602 ac_status=$?
c0d27fcc 10603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10604 (exit $ac_status); } &&
10605 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10607 (eval $ac_try) 2>&5
10608 ac_status=$?
c0d27fcc 10609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10610 (exit $ac_status); }; }; then
98418dba 10611 ac_cv_lib_mail_maillock=yes
ba4481b5 10612else
503d2be0 10613 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10614sed 's/^/| /' conftest.$ac_ext >&5
10615
98418dba 10616ac_cv_lib_mail_maillock=no
ba4481b5 10617fi
503d2be0 10618rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 10619LIBS=$ac_check_lib_save_LIBS
ba4481b5 10620fi
c0d27fcc 10621echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
98418dba
CW
10622echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6
10623if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 10624 cat >>confdefs.h <<_ACEOF
98418dba 10625#define HAVE_LIBMAIL 1
c0d27fcc 10626_ACEOF
ba4481b5 10627
98418dba 10628 LIBS="-lmail $LIBS"
ba4481b5 10629
98418dba 10630fi
ba4481b5 10631
c0d27fcc
MR
10632
10633echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
98418dba
CW
10634echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6
10635if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 10636 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 10637else
503d2be0 10638 ac_check_lib_save_LIBS=$LIBS
98418dba 10639LIBS="-llockfile $LIBS"
503d2be0 10640cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10641#line $LINENO "configure"
cd958eb3
MB
10642/* confdefs.h. */
10643_ACEOF
10644cat confdefs.h >>conftest.$ac_ext
10645cat >>conftest.$ac_ext <<_ACEOF
10646/* end confdefs.h. */
503d2be0 10647
ba4481b5 10648/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10649#ifdef __cplusplus
10650extern "C"
10651#endif
ba4481b5 10652/* We use char because int might match the return type of a gcc2
503d2be0 10653 builtin and then its argument prototype would still apply. */
98418dba 10654char maillock ();
503d2be0
AS
10655int
10656main ()
10657{
98418dba 10658maillock ();
503d2be0
AS
10659 ;
10660 return 0;
10661}
10662_ACEOF
10663rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10664if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10665 (eval $ac_link) 2>&5
10666 ac_status=$?
c0d27fcc 10667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10668 (exit $ac_status); } &&
10669 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10671 (eval $ac_try) 2>&5
10672 ac_status=$?
c0d27fcc 10673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10674 (exit $ac_status); }; }; then
98418dba 10675 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
10676else
10677 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10678sed 's/^/| /' conftest.$ac_ext >&5
10679
98418dba
CW
10680ac_cv_lib_lockfile_maillock=no
10681fi
10682rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10683LIBS=$ac_check_lib_save_LIBS
10684fi
c0d27fcc 10685echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
98418dba
CW
10686echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6
10687if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 10688 cat >>confdefs.h <<_ACEOF
98418dba 10689#define HAVE_LIBLOCKFILE 1
c0d27fcc 10690_ACEOF
98418dba
CW
10691
10692 LIBS="-llockfile $LIBS"
10693
10694fi
10695
10696# If we have the shared liblockfile, assume we must use it for mail
10697# locking (e.g. Debian). If we couldn't link against liblockfile
10698# (no liblockfile.a installed), ensure that we don't need to.
10699if test "$ac_cv_lib_lockfile_maillock" = no; then
10700 # Extract the first word of "liblockfile.so", so it can be a program name with args.
10701set dummy liblockfile.so; ac_word=$2
c0d27fcc 10702echo "$as_me:$LINENO: checking for $ac_word" >&5
98418dba
CW
10703echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10704if test "${ac_cv_prog_liblockfile+set}" = set; then
10705 echo $ECHO_N "(cached) $ECHO_C" >&6
10706else
10707 if test -n "$liblockfile"; then
10708 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
10709else
c0d27fcc 10710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
10711as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
10712for as_dir in $as_dummy
c0d27fcc
MR
10713do
10714 IFS=$as_save_IFS
10715 test -z "$as_dir" && as_dir=.
10716 for ac_exec_ext in '' $ac_executable_extensions; do
10717 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10718 ac_cv_prog_liblockfile="yes"
10719 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10720 break 2
10721 fi
10722done
98418dba
CW
10723done
10724
10725 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 10726fi
503d2be0 10727fi
98418dba
CW
10728liblockfile=$ac_cv_prog_liblockfile
10729if test -n "$liblockfile"; then
c0d27fcc 10730 echo "$as_me:$LINENO: result: $liblockfile" >&5
98418dba
CW
10731echo "${ECHO_T}$liblockfile" >&6
10732else
c0d27fcc 10733 echo "$as_me:$LINENO: result: no" >&5
98418dba 10734echo "${ECHO_T}no" >&6
ba4481b5
DL
10735fi
10736
98418dba 10737 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 10738 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
10739This probably means that movemail could lose mail.
10740There may be a \`development' package to install containing liblockfile." >&5
10741echo "$as_me: error: Shared liblockfile found but can't link against it.
10742This probably means that movemail could lose mail.
10743There may be a \`development' package to install containing liblockfile." >&2;}
10744 { (exit 1); exit 1; }; }
b936fae4 10745 else
c0d27fcc 10746cat >>confdefs.h <<\_ACEOF
98418dba 10747#define LIBMAIL -llockfile
c0d27fcc 10748_ACEOF
457b792c 10749
98418dba
CW
10750 fi
10751 else :
10752fi
503d2be0 10753
98418dba
CW
10754for ac_func in touchlock
10755do
10756as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 10757echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
10758echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10759if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 10760 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 10761else
98418dba 10762 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10763#line $LINENO "configure"
cd958eb3
MB
10764/* confdefs.h. */
10765_ACEOF
10766cat confdefs.h >>conftest.$ac_ext
10767cat >>conftest.$ac_ext <<_ACEOF
10768/* end confdefs.h. */
98418dba 10769/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
10770 which can conflict with char $ac_func (); below.
10771 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10772 <limits.h> exists even on freestanding compilers. */
10773#ifdef __STDC__
10774# include <limits.h>
10775#else
10776# include <assert.h>
10777#endif
457b792c 10778/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10779#ifdef __cplusplus
10780extern "C"
cd958eb3 10781{
503d2be0 10782#endif
457b792c 10783/* We use char because int might match the return type of a gcc2
503d2be0 10784 builtin and then its argument prototype would still apply. */
98418dba 10785char $ac_func ();
98418dba
CW
10786/* The GNU C library defines this for functions which it implements
10787 to always fail with ENOSYS. Some functions are actually named
10788 something starting with __ and the normal name is an alias. */
10789#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10790choke me
10791#else
cd958eb3 10792char (*f) () = $ac_func;
98418dba 10793#endif
cd958eb3
MB
10794#ifdef __cplusplus
10795}
10796#endif
10797
10798int
10799main ()
10800{
9e71690e 10801return f != $ac_func;
503d2be0
AS
10802 ;
10803 return 0;
10804}
10805_ACEOF
10806rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10807if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10808 (eval $ac_link) 2>&5
10809 ac_status=$?
c0d27fcc 10810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10811 (exit $ac_status); } &&
10812 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10814 (eval $ac_try) 2>&5
10815 ac_status=$?
c0d27fcc 10816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10817 (exit $ac_status); }; }; then
98418dba 10818 eval "$as_ac_var=yes"
503d2be0
AS
10819else
10820 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10821sed 's/^/| /' conftest.$ac_ext >&5
10822
98418dba 10823eval "$as_ac_var=no"
503d2be0
AS
10824fi
10825rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
503d2be0 10826fi
c0d27fcc 10827echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
10828echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10829if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10830 cat >>confdefs.h <<_ACEOF
98418dba 10831#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10832_ACEOF
457b792c 10833
457b792c 10834fi
98418dba 10835done
457b792c 10836
c0d27fcc 10837
98418dba
CW
10838for ac_header in maillock.h
10839do
10840as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
10841if eval "test \"\${$as_ac_Header+set}\" = set"; then
10842 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
10843echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10844if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 10845 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
10846fi
10847echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10848echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba4481b5 10849else
c0d27fcc
MR
10850 # Is the header compilable?
10851echo "$as_me:$LINENO: checking $ac_header usability" >&5
10852echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10853cat >conftest.$ac_ext <<_ACEOF
10854#line $LINENO "configure"
cd958eb3
MB
10855/* confdefs.h. */
10856_ACEOF
10857cat confdefs.h >>conftest.$ac_ext
10858cat >>conftest.$ac_ext <<_ACEOF
10859/* end confdefs.h. */
c0d27fcc
MR
10860$ac_includes_default
10861#include <$ac_header>
10862_ACEOF
10863rm -f conftest.$ac_objext
10864if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10865 (eval $ac_compile) 2>&5
10866 ac_status=$?
10867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10868 (exit $ac_status); } &&
10869 { ac_try='test -s conftest.$ac_objext'
10870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10871 (eval $ac_try) 2>&5
10872 ac_status=$?
10873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10874 (exit $ac_status); }; }; then
10875 ac_header_compiler=yes
10876else
10877 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10878sed 's/^/| /' conftest.$ac_ext >&5
10879
c0d27fcc
MR
10880ac_header_compiler=no
10881fi
10882rm -f conftest.$ac_objext conftest.$ac_ext
10883echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10884echo "${ECHO_T}$ac_header_compiler" >&6
10885
10886# Is the header present?
10887echo "$as_me:$LINENO: checking $ac_header presence" >&5
10888echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10889cat >conftest.$ac_ext <<_ACEOF
10890#line $LINENO "configure"
cd958eb3
MB
10891/* confdefs.h. */
10892_ACEOF
10893cat confdefs.h >>conftest.$ac_ext
10894cat >>conftest.$ac_ext <<_ACEOF
10895/* end confdefs.h. */
98418dba 10896#include <$ac_header>
503d2be0 10897_ACEOF
c0d27fcc 10898if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 10899 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 10900 ac_status=$?
6bae0ccf 10901 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
10902 rm -f conftest.er1
10903 cat conftest.err >&5
c0d27fcc 10904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10905 (exit $ac_status); } >/dev/null; then
10906 if test -s conftest.err; then
10907 ac_cpp_err=$ac_c_preproc_warn_flag
10908 else
10909 ac_cpp_err=
10910 fi
503d2be0 10911else
98418dba 10912 ac_cpp_err=yes
503d2be0 10913fi
98418dba 10914if test -z "$ac_cpp_err"; then
c0d27fcc 10915 ac_header_preproc=yes
98418dba
CW
10916else
10917 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10918sed 's/^/| /' conftest.$ac_ext >&5
10919
c0d27fcc 10920 ac_header_preproc=no
503d2be0 10921fi
98418dba 10922rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
10923echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10924echo "${ECHO_T}$ac_header_preproc" >&6
10925
10926# So? What about this header?
10927case $ac_header_compiler:$ac_header_preproc in
10928 yes:no )
10929 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10930echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10931 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
10932echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10933 (
10934 cat <<\_ASBOX
10935## ------------------------------------ ##
10936## Report this to bug-autoconf@gnu.org. ##
10937## ------------------------------------ ##
10938_ASBOX
10939 ) |
10940 sed "s/^/$as_me: WARNING: /" >&2
10941 ;;
c0d27fcc
MR
10942 no:yes )
10943 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10944echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10945 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10946echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10947 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
10948echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10949 (
10950 cat <<\_ASBOX
10951## ------------------------------------ ##
10952## Report this to bug-autoconf@gnu.org. ##
10953## ------------------------------------ ##
10954_ASBOX
10955 ) |
10956 sed "s/^/$as_me: WARNING: /" >&2
10957 ;;
c0d27fcc
MR
10958esac
10959echo "$as_me:$LINENO: checking for $ac_header" >&5
10960echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10961if eval "test \"\${$as_ac_Header+set}\" = set"; then
10962 echo $ECHO_N "(cached) $ECHO_C" >&6
10963else
10964 eval "$as_ac_Header=$ac_header_preproc"
ba4481b5 10965fi
c0d27fcc 10966echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 10967echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
10968
10969fi
98418dba 10970if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 10971 cat >>confdefs.h <<_ACEOF
98418dba 10972#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 10973_ACEOF
48d4b120 10974
ba4481b5 10975fi
c0d27fcc 10976
98418dba
CW
10977done
10978
c0d27fcc
MR
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
22044edf
DL
11034
11035
c0d27fcc 11036
cd958eb3 11037
c0d27fcc
MR
11038
11039
98418dba
CW
11040for ac_func in gethostname getdomainname dup2 \
11041rename closedir mkdir rmdir sysinfo \
11042random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
11043strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
11044utimes setrlimit setpgid getcwd getwd shutdown strftime getaddrinfo \
11045__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
11046sendto recvfrom getsockopt setsockopt getsockname getpeername \
cd958eb3 11047gai_strerror mkstemp getline getdelim mremap memmove fsync bzero memset
98418dba
CW
11048do
11049as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 11050echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
11051echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11052if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 11053 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11054else
503d2be0 11055 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 11056#line $LINENO "configure"
cd958eb3
MB
11057/* confdefs.h. */
11058_ACEOF
11059cat confdefs.h >>conftest.$ac_ext
11060cat >>conftest.$ac_ext <<_ACEOF
11061/* end confdefs.h. */
98418dba 11062/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
11063 which can conflict with char $ac_func (); below.
11064 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11065 <limits.h> exists even on freestanding compilers. */
11066#ifdef __STDC__
11067# include <limits.h>
11068#else
11069# include <assert.h>
11070#endif
ba4481b5 11071/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11072#ifdef __cplusplus
11073extern "C"
cd958eb3 11074{
503d2be0 11075#endif
ba4481b5 11076/* We use char because int might match the return type of a gcc2
503d2be0 11077 builtin and then its argument prototype would still apply. */
98418dba 11078char $ac_func ();
98418dba
CW
11079/* The GNU C library defines this for functions which it implements
11080 to always fail with ENOSYS. Some functions are actually named
11081 something starting with __ and the normal name is an alias. */
11082#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11083choke me
11084#else
cd958eb3
MB
11085char (*f) () = $ac_func;
11086#endif
11087#ifdef __cplusplus
11088}
98418dba
CW
11089#endif
11090
cd958eb3
MB
11091int
11092main ()
11093{
9e71690e 11094return f != $ac_func;
503d2be0
AS
11095 ;
11096 return 0;
11097}
11098_ACEOF
11099rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11100if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
11101 (eval $ac_link) 2>&5
11102 ac_status=$?
c0d27fcc 11103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11104 (exit $ac_status); } &&
11105 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11107 (eval $ac_try) 2>&5
11108 ac_status=$?
c0d27fcc 11109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11110 (exit $ac_status); }; }; then
98418dba 11111 eval "$as_ac_var=yes"
503d2be0
AS
11112else
11113 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11114sed 's/^/| /' conftest.$ac_ext >&5
11115
98418dba 11116eval "$as_ac_var=no"
503d2be0
AS
11117fi
11118rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 11119fi
c0d27fcc 11120echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
11121echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11122if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 11123 cat >>confdefs.h <<_ACEOF
98418dba 11124#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 11125_ACEOF
ba4481b5 11126
ba4481b5 11127fi
98418dba 11128done
ba4481b5 11129
c0d27fcc
MR
11130
11131
98418dba
CW
11132for ac_header in sys/un.h
11133do
11134as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
11135if eval "test \"\${$as_ac_Header+set}\" = set"; then
11136 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
11137echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11138if eval "test \"\${$as_ac_Header+set}\" = set"; then
11139 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11140fi
11141echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11142echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 11143else
c0d27fcc
MR
11144 # Is the header compilable?
11145echo "$as_me:$LINENO: checking $ac_header usability" >&5
11146echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
11147cat >conftest.$ac_ext <<_ACEOF
11148#line $LINENO "configure"
cd958eb3
MB
11149/* confdefs.h. */
11150_ACEOF
11151cat confdefs.h >>conftest.$ac_ext
11152cat >>conftest.$ac_ext <<_ACEOF
11153/* end confdefs.h. */
c0d27fcc
MR
11154$ac_includes_default
11155#include <$ac_header>
11156_ACEOF
11157rm -f conftest.$ac_objext
11158if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11159 (eval $ac_compile) 2>&5
11160 ac_status=$?
11161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11162 (exit $ac_status); } &&
11163 { ac_try='test -s conftest.$ac_objext'
11164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11165 (eval $ac_try) 2>&5
11166 ac_status=$?
11167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11168 (exit $ac_status); }; }; then
11169 ac_header_compiler=yes
11170else
11171 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11172sed 's/^/| /' conftest.$ac_ext >&5
11173
c0d27fcc
MR
11174ac_header_compiler=no
11175fi
11176rm -f conftest.$ac_objext conftest.$ac_ext
11177echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11178echo "${ECHO_T}$ac_header_compiler" >&6
11179
11180# Is the header present?
11181echo "$as_me:$LINENO: checking $ac_header presence" >&5
11182echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
11183cat >conftest.$ac_ext <<_ACEOF
11184#line $LINENO "configure"
cd958eb3
MB
11185/* confdefs.h. */
11186_ACEOF
11187cat confdefs.h >>conftest.$ac_ext
11188cat >>conftest.$ac_ext <<_ACEOF
11189/* end confdefs.h. */
98418dba 11190#include <$ac_header>
503d2be0 11191_ACEOF
c0d27fcc 11192if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11193 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11194 ac_status=$?
6bae0ccf 11195 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
11196 rm -f conftest.er1
11197 cat conftest.err >&5
c0d27fcc 11198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11199 (exit $ac_status); } >/dev/null; then
11200 if test -s conftest.err; then
11201 ac_cpp_err=$ac_c_preproc_warn_flag
11202 else
11203 ac_cpp_err=
11204 fi
11205else
11206 ac_cpp_err=yes
11207fi
11208if test -z "$ac_cpp_err"; then
c0d27fcc 11209 ac_header_preproc=yes
ba4481b5 11210else
503d2be0 11211 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11212sed 's/^/| /' conftest.$ac_ext >&5
11213
c0d27fcc 11214 ac_header_preproc=no
ba4481b5 11215fi
503d2be0 11216rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11217echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11218echo "${ECHO_T}$ac_header_preproc" >&6
11219
11220# So? What about this header?
11221case $ac_header_compiler:$ac_header_preproc in
11222 yes:no )
11223 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11224echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11225 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
11226echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11227 (
11228 cat <<\_ASBOX
11229## ------------------------------------ ##
11230## Report this to bug-autoconf@gnu.org. ##
11231## ------------------------------------ ##
11232_ASBOX
11233 ) |
11234 sed "s/^/$as_me: WARNING: /" >&2
11235 ;;
c0d27fcc
MR
11236 no:yes )
11237 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11238echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11239 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11240echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11241 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
11242echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11243 (
11244 cat <<\_ASBOX
11245## ------------------------------------ ##
11246## Report this to bug-autoconf@gnu.org. ##
11247## ------------------------------------ ##
11248_ASBOX
11249 ) |
11250 sed "s/^/$as_me: WARNING: /" >&2
11251 ;;
c0d27fcc
MR
11252esac
11253echo "$as_me:$LINENO: checking for $ac_header" >&5
11254echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11255if eval "test \"\${$as_ac_Header+set}\" = set"; then
11256 echo $ECHO_N "(cached) $ECHO_C" >&6
11257else
11258 eval "$as_ac_Header=$ac_header_preproc"
ba4481b5 11259fi
c0d27fcc 11260echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
925c2f3f 11261echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
11262
11263fi
925c2f3f 11264if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 11265 cat >>confdefs.h <<_ACEOF
925c2f3f 11266#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 11267_ACEOF
503d2be0 11268
925c2f3f 11269fi
c0d27fcc 11270
925c2f3f
EZ
11271done
11272
c0d27fcc
MR
11273
11274
11275
925c2f3f
EZ
11276for ac_header in sys/time.h unistd.h
11277do
11278as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
11279if eval "test \"\${$as_ac_Header+set}\" = set"; then
11280 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
11281echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11282if eval "test \"\${$as_ac_Header+set}\" = set"; then
11283 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11284fi
11285echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11286echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
925c2f3f 11287else
c0d27fcc
MR
11288 # Is the header compilable?
11289echo "$as_me:$LINENO: checking $ac_header usability" >&5
11290echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
11291cat >conftest.$ac_ext <<_ACEOF
11292#line $LINENO "configure"
cd958eb3
MB
11293/* confdefs.h. */
11294_ACEOF
11295cat confdefs.h >>conftest.$ac_ext
11296cat >>conftest.$ac_ext <<_ACEOF
11297/* end confdefs.h. */
c0d27fcc
MR
11298$ac_includes_default
11299#include <$ac_header>
11300_ACEOF
11301rm -f conftest.$ac_objext
11302if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11303 (eval $ac_compile) 2>&5
11304 ac_status=$?
11305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11306 (exit $ac_status); } &&
11307 { ac_try='test -s conftest.$ac_objext'
11308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11309 (eval $ac_try) 2>&5
11310 ac_status=$?
11311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11312 (exit $ac_status); }; }; then
11313 ac_header_compiler=yes
11314else
11315 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11316sed 's/^/| /' conftest.$ac_ext >&5
11317
c0d27fcc
MR
11318ac_header_compiler=no
11319fi
11320rm -f conftest.$ac_objext conftest.$ac_ext
11321echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11322echo "${ECHO_T}$ac_header_compiler" >&6
11323
11324# Is the header present?
11325echo "$as_me:$LINENO: checking $ac_header presence" >&5
11326echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
11327cat >conftest.$ac_ext <<_ACEOF
11328#line $LINENO "configure"
cd958eb3
MB
11329/* confdefs.h. */
11330_ACEOF
11331cat confdefs.h >>conftest.$ac_ext
11332cat >>conftest.$ac_ext <<_ACEOF
11333/* end confdefs.h. */
98418dba 11334#include <$ac_header>
503d2be0 11335_ACEOF
c0d27fcc 11336if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11337 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11338 ac_status=$?
6bae0ccf 11339 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
11340 rm -f conftest.er1
11341 cat conftest.err >&5
c0d27fcc 11342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11343 (exit $ac_status); } >/dev/null; then
11344 if test -s conftest.err; then
11345 ac_cpp_err=$ac_c_preproc_warn_flag
11346 else
11347 ac_cpp_err=
11348 fi
11349else
11350 ac_cpp_err=yes
11351fi
11352if test -z "$ac_cpp_err"; then
c0d27fcc 11353 ac_header_preproc=yes
98418dba
CW
11354else
11355 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11356sed 's/^/| /' conftest.$ac_ext >&5
11357
c0d27fcc 11358 ac_header_preproc=no
98418dba
CW
11359fi
11360rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11361echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11362echo "${ECHO_T}$ac_header_preproc" >&6
11363
11364# So? What about this header?
11365case $ac_header_compiler:$ac_header_preproc in
11366 yes:no )
11367 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11368echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11369 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
11370echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11371 (
11372 cat <<\_ASBOX
11373## ------------------------------------ ##
11374## Report this to bug-autoconf@gnu.org. ##
11375## ------------------------------------ ##
11376_ASBOX
11377 ) |
11378 sed "s/^/$as_me: WARNING: /" >&2
11379 ;;
c0d27fcc
MR
11380 no:yes )
11381 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11382echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11383 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11384echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11385 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
11386echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11387 (
11388 cat <<\_ASBOX
11389## ------------------------------------ ##
11390## Report this to bug-autoconf@gnu.org. ##
11391## ------------------------------------ ##
11392_ASBOX
11393 ) |
11394 sed "s/^/$as_me: WARNING: /" >&2
11395 ;;
c0d27fcc
MR
11396esac
11397echo "$as_me:$LINENO: checking for $ac_header" >&5
11398echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11399if eval "test \"\${$as_ac_Header+set}\" = set"; then
11400 echo $ECHO_N "(cached) $ECHO_C" >&6
11401else
11402 eval "$as_ac_Header=$ac_header_preproc"
ffe36136 11403fi
c0d27fcc 11404echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 11405echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
11406
11407fi
98418dba 11408if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 11409 cat >>confdefs.h <<_ACEOF
98418dba 11410#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 11411_ACEOF
98418dba
CW
11412
11413fi
c0d27fcc 11414
98418dba
CW
11415done
11416
c0d27fcc 11417
98418dba
CW
11418for ac_func in alarm
11419do
11420as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 11421echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
11422echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11423if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 11424 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11425else
98418dba 11426 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 11427#line $LINENO "configure"
cd958eb3
MB
11428/* confdefs.h. */
11429_ACEOF
11430cat confdefs.h >>conftest.$ac_ext
11431cat >>conftest.$ac_ext <<_ACEOF
11432/* end confdefs.h. */
98418dba 11433/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
11434 which can conflict with char $ac_func (); below.
11435 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11436 <limits.h> exists even on freestanding compilers. */
11437#ifdef __STDC__
11438# include <limits.h>
11439#else
11440# include <assert.h>
11441#endif
ba4481b5 11442/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11443#ifdef __cplusplus
11444extern "C"
cd958eb3 11445{
503d2be0 11446#endif
ba4481b5 11447/* We use char because int might match the return type of a gcc2
503d2be0 11448 builtin and then its argument prototype would still apply. */
98418dba 11449char $ac_func ();
98418dba
CW
11450/* The GNU C library defines this for functions which it implements
11451 to always fail with ENOSYS. Some functions are actually named
11452 something starting with __ and the normal name is an alias. */
11453#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11454choke me
11455#else
cd958eb3
MB
11456char (*f) () = $ac_func;
11457#endif
11458#ifdef __cplusplus
11459}
98418dba
CW
11460#endif
11461
cd958eb3
MB
11462int
11463main ()
11464{
9e71690e 11465return f != $ac_func;
503d2be0
AS
11466 ;
11467 return 0;
11468}
11469_ACEOF
11470rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11471if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
11472 (eval $ac_link) 2>&5
11473 ac_status=$?
c0d27fcc 11474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11475 (exit $ac_status); } &&
11476 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11478 (eval $ac_try) 2>&5
11479 ac_status=$?
c0d27fcc 11480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11481 (exit $ac_status); }; }; then
98418dba 11482 eval "$as_ac_var=yes"
503d2be0
AS
11483else
11484 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11485sed 's/^/| /' conftest.$ac_ext >&5
11486
98418dba 11487eval "$as_ac_var=no"
503d2be0
AS
11488fi
11489rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ffe36136 11490fi
c0d27fcc 11491echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
11492echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11493if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 11494 cat >>confdefs.h <<_ACEOF
98418dba 11495#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 11496_ACEOF
ffe36136 11497
ba4481b5 11498fi
98418dba 11499done
ba4481b5 11500
c0d27fcc 11501echo "$as_me:$LINENO: checking for working mktime" >&5
98418dba
CW
11502echo $ECHO_N "checking for working mktime... $ECHO_C" >&6
11503if test "${ac_cv_func_working_mktime+set}" = set; then
11504 echo $ECHO_N "(cached) $ECHO_C" >&6
11505else
11506 if test "$cross_compiling" = yes; then
11507 ac_cv_func_working_mktime=no
11508else
11509 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 11510#line $LINENO "configure"
cd958eb3
MB
11511/* confdefs.h. */
11512_ACEOF
11513cat confdefs.h >>conftest.$ac_ext
11514cat >>conftest.$ac_ext <<_ACEOF
11515/* end confdefs.h. */
98418dba
CW
11516/* Test program from Paul Eggert and Tony Leneis. */
11517#if TIME_WITH_SYS_TIME
11518# include <sys/time.h>
11519# include <time.h>
11520#else
11521# if HAVE_SYS_TIME_H
11522# include <sys/time.h>
11523# else
11524# include <time.h>
11525# endif
11526#endif
ba4481b5 11527
98418dba
CW
11528#if HAVE_UNISTD_H
11529# include <unistd.h>
11530#endif
ba4481b5 11531
98418dba
CW
11532#if !HAVE_ALARM
11533# define alarm(X) /* empty */
11534#endif
df645f7c 11535
98418dba
CW
11536/* Work around redefinition to rpl_putenv by other config tests. */
11537#undef putenv
df645f7c 11538
98418dba 11539static time_t time_t_max;
df645f7c 11540
98418dba
CW
11541/* Values we'll use to set the TZ environment variable. */
11542static const char *const tz_strings[] = {
11543 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
11544 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
11545};
11546#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 11547
98418dba
CW
11548/* Fail if mktime fails to convert a date in the spring-forward gap.
11549 Based on a problem report from Andreas Jaeger. */
11550static void
11551spring_forward_gap ()
11552{
11553 /* glibc (up to about 1998-10-07) failed this test. */
11554 struct tm tm;
11555
11556 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
11557 instead of "TZ=America/Vancouver" in order to detect the bug even
11558 on systems that don't support the Olson extension, or don't have the
11559 full zoneinfo tables installed. */
11560 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
11561
11562 tm.tm_year = 98;
11563 tm.tm_mon = 3;
11564 tm.tm_mday = 5;
11565 tm.tm_hour = 2;
11566 tm.tm_min = 0;
11567 tm.tm_sec = 0;
11568 tm.tm_isdst = -1;
11569 if (mktime (&tm) == (time_t)-1)
11570 exit (1);
11571}
11572
11573static void
11574mktime_test (now)
11575 time_t now;
11576{
11577 struct tm *lt;
11578 if ((lt = localtime (&now)) && mktime (lt) != now)
11579 exit (1);
11580 now = time_t_max - now;
11581 if ((lt = localtime (&now)) && mktime (lt) != now)
11582 exit (1);
11583}
11584
11585static void
11586irix_6_4_bug ()
11587{
11588 /* Based on code from Ariel Faigon. */
11589 struct tm tm;
11590 tm.tm_year = 96;
11591 tm.tm_mon = 3;
11592 tm.tm_mday = 0;
11593 tm.tm_hour = 0;
11594 tm.tm_min = 0;
11595 tm.tm_sec = 0;
11596 tm.tm_isdst = -1;
11597 mktime (&tm);
11598 if (tm.tm_mon != 2 || tm.tm_mday != 31)
11599 exit (1);
11600}
11601
11602static void
11603bigtime_test (j)
11604 int j;
11605{
11606 struct tm tm;
11607 time_t now;
11608 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
11609 now = mktime (&tm);
11610 if (now != (time_t) -1)
11611 {
11612 struct tm *lt = localtime (&now);
11613 if (! (lt
11614 && lt->tm_year == tm.tm_year
11615 && lt->tm_mon == tm.tm_mon
11616 && lt->tm_mday == tm.tm_mday
11617 && lt->tm_hour == tm.tm_hour
11618 && lt->tm_min == tm.tm_min
11619 && lt->tm_sec == tm.tm_sec
11620 && lt->tm_yday == tm.tm_yday
11621 && lt->tm_wday == tm.tm_wday
11622 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
11623 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
11624 exit (1);
11625 }
11626}
11627
11628int
11629main ()
11630{
11631 time_t t, delta;
11632 int i, j;
11633
11634 /* This test makes some buggy mktime implementations loop.
11635 Give up after 60 seconds; a mktime slower than that
11636 isn't worth using anyway. */
11637 alarm (60);
11638
11639 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
11640 continue;
11641 time_t_max--;
11642 delta = time_t_max / 997; /* a suitable prime number */
11643 for (i = 0; i < N_STRINGS; i++)
11644 {
11645 if (tz_strings[i])
11646 putenv (tz_strings[i]);
503d2be0 11647
98418dba
CW
11648 for (t = 0; t <= time_t_max - delta; t += delta)
11649 mktime_test (t);
11650 mktime_test ((time_t) 60 * 60);
11651 mktime_test ((time_t) 60 * 60 * 24);
11652
11653 for (j = 1; 0 < j; j *= 2)
11654 bigtime_test (j);
11655 bigtime_test (j - 1);
11656 }
11657 irix_6_4_bug ();
11658 spring_forward_gap ();
11659 exit (0);
503d2be0
AS
11660}
11661_ACEOF
98418dba 11662rm -f conftest$ac_exeext
c0d27fcc 11663if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
11664 (eval $ac_link) 2>&5
11665 ac_status=$?
c0d27fcc 11666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11667 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 11668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11669 (eval $ac_try) 2>&5
11670 ac_status=$?
c0d27fcc 11671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11672 (exit $ac_status); }; }; then
98418dba 11673 ac_cv_func_working_mktime=yes
503d2be0 11674else
98418dba
CW
11675 echo "$as_me: program exited with status $ac_status" >&5
11676echo "$as_me: failed program was:" >&5
cd958eb3
MB
11677sed 's/^/| /' conftest.$ac_ext >&5
11678
c0d27fcc 11679( exit $ac_status )
98418dba 11680ac_cv_func_working_mktime=no
503d2be0 11681fi
6bae0ccf 11682rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 11683fi
ba4481b5 11684fi
c0d27fcc 11685echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
98418dba
CW
11686echo "${ECHO_T}$ac_cv_func_working_mktime" >&6
11687if test $ac_cv_func_working_mktime = no; then
11688 LIBOBJS="$LIBOBJS mktime.$ac_objext"
ba4481b5
DL
11689fi
11690
98418dba 11691if test "$ac_cv_func_working_mktime" = no; then
b936fae4 11692
c0d27fcc 11693cat >>confdefs.h <<\_ACEOF
98418dba 11694#define BROKEN_MKTIME 1
c0d27fcc 11695_ACEOF
ba4481b5 11696
ba4481b5 11697fi
503d2be0 11698
98418dba
CW
11699ac_have_func=no # yes means we've found a way to get the load average.
11700
6bae0ccf
DL
11701# Make sure getloadavg.c is where it belongs, at configure-time.
11702test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
11703 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
11704echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
11705 { (exit 1); exit 1; }; }
11706
98418dba
CW
11707ac_save_LIBS=$LIBS
11708
11709# Check for getloadavg, but be sure not to touch the cache variable.
c0d27fcc 11710(echo "$as_me:$LINENO: checking for getloadavg" >&5
98418dba
CW
11711echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6
11712if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 11713 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11714else
503d2be0 11715 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 11716#line $LINENO "configure"
cd958eb3
MB
11717/* confdefs.h. */
11718_ACEOF
11719cat confdefs.h >>conftest.$ac_ext
11720cat >>conftest.$ac_ext <<_ACEOF
11721/* end confdefs.h. */
98418dba 11722/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
11723 which can conflict with char getloadavg (); below.
11724 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11725 <limits.h> exists even on freestanding compilers. */
11726#ifdef __STDC__
11727# include <limits.h>
11728#else
11729# include <assert.h>
11730#endif
ba4481b5 11731/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11732#ifdef __cplusplus
11733extern "C"
cd958eb3 11734{
503d2be0 11735#endif
ba4481b5 11736/* We use char because int might match the return type of a gcc2
503d2be0 11737 builtin and then its argument prototype would still apply. */
98418dba 11738char getloadavg ();
98418dba
CW
11739/* The GNU C library defines this for functions which it implements
11740 to always fail with ENOSYS. Some functions are actually named
11741 something starting with __ and the normal name is an alias. */
11742#if defined (__stub_getloadavg) || defined (__stub___getloadavg)
11743choke me
11744#else
cd958eb3 11745char (*f) () = getloadavg;
98418dba 11746#endif
cd958eb3
MB
11747#ifdef __cplusplus
11748}
11749#endif
11750
11751int
11752main ()
11753{
9e71690e 11754return f != getloadavg;
503d2be0
AS
11755 ;
11756 return 0;
11757}
11758_ACEOF
11759rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11760if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
11761 (eval $ac_link) 2>&5
11762 ac_status=$?
c0d27fcc 11763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11764 (exit $ac_status); } &&
11765 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11767 (eval $ac_try) 2>&5
11768 ac_status=$?
c0d27fcc 11769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11770 (exit $ac_status); }; }; then
98418dba 11771 ac_cv_func_getloadavg=yes
503d2be0
AS
11772else
11773 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11774sed 's/^/| /' conftest.$ac_ext >&5
11775
98418dba 11776ac_cv_func_getloadavg=no
503d2be0
AS
11777fi
11778rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 11779fi
c0d27fcc 11780echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
98418dba
CW
11781echo "${ECHO_T}$ac_cv_func_getloadavg" >&6
11782if test $ac_cv_func_getloadavg = yes; then
11783 exit 0
11784else
11785 exit 1
ba4481b5 11786fi
98418dba 11787) && ac_have_func=yes
ba4481b5 11788
98418dba 11789# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 11790
98418dba
CW
11791for ac_func in pstat_getdynamic
11792do
11793as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 11794echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
11795echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11796if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 11797 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11798else
503d2be0 11799 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 11800#line $LINENO "configure"
cd958eb3
MB
11801/* confdefs.h. */
11802_ACEOF
11803cat confdefs.h >>conftest.$ac_ext
11804cat >>conftest.$ac_ext <<_ACEOF
11805/* end confdefs.h. */
98418dba 11806/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
11807 which can conflict with char $ac_func (); below.
11808 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11809 <limits.h> exists even on freestanding compilers. */
11810#ifdef __STDC__
11811# include <limits.h>
11812#else
11813# include <assert.h>
11814#endif
ba4481b5 11815/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11816#ifdef __cplusplus
11817extern "C"
cd958eb3 11818{
503d2be0 11819#endif
ba4481b5 11820/* We use char because int might match the return type of a gcc2
503d2be0 11821 builtin and then its argument prototype would still apply. */
98418dba 11822char $ac_func ();
98418dba
CW
11823/* The GNU C library defines this for functions which it implements
11824 to always fail with ENOSYS. Some functions are actually named
11825 something starting with __ and the normal name is an alias. */
11826#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11827choke me
11828#else
cd958eb3
MB
11829char (*f) () = $ac_func;
11830#endif
11831#ifdef __cplusplus
11832}
98418dba
CW
11833#endif
11834
cd958eb3
MB
11835int
11836main ()
11837{
9e71690e 11838return f != $ac_func;
98418dba
CW
11839 ;
11840 return 0;
11841}
f21fadcc 11842_ACEOF
98418dba 11843rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11844if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba 11845 (eval $ac_link) 2>&5
f21fadcc 11846 ac_status=$?
c0d27fcc 11847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11848 (exit $ac_status); } &&
11849 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11851 (eval $ac_try) 2>&5
11852 ac_status=$?
c0d27fcc 11853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11854 (exit $ac_status); }; }; then
11855 eval "$as_ac_var=yes"
f21fadcc
JD
11856else
11857 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11858sed 's/^/| /' conftest.$ac_ext >&5
11859
98418dba 11860eval "$as_ac_var=no"
f21fadcc 11861fi
98418dba 11862rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
f21fadcc 11863fi
c0d27fcc 11864echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
11865echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11866if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 11867 cat >>confdefs.h <<_ACEOF
98418dba 11868#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 11869_ACEOF
98418dba
CW
11870
11871fi
11872done
11873
c0d27fcc 11874
98418dba
CW
11875# Solaris has libkstat which does not require root.
11876
c0d27fcc 11877echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
98418dba
CW
11878echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
11879if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
11880 echo $ECHO_N "(cached) $ECHO_C" >&6
11881else
11882 ac_check_lib_save_LIBS=$LIBS
98418dba 11883LIBS="-lkstat $LIBS"
f21fadcc 11884cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 11885#line $LINENO "configure"
cd958eb3
MB
11886/* confdefs.h. */
11887_ACEOF
11888cat confdefs.h >>conftest.$ac_ext
11889cat >>conftest.$ac_ext <<_ACEOF
11890/* end confdefs.h. */
f21fadcc
JD
11891
11892/* Override any gcc2 internal prototype to avoid an error. */
11893#ifdef __cplusplus
11894extern "C"
11895#endif
11896/* We use char because int might match the return type of a gcc2
11897 builtin and then its argument prototype would still apply. */
98418dba 11898char kstat_open ();
f21fadcc
JD
11899int
11900main ()
11901{
98418dba 11902kstat_open ();
f21fadcc
JD
11903 ;
11904 return 0;
11905}
11906_ACEOF
11907rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11908if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
f21fadcc
JD
11909 (eval $ac_link) 2>&5
11910 ac_status=$?
c0d27fcc 11911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc
JD
11912 (exit $ac_status); } &&
11913 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
f21fadcc
JD
11915 (eval $ac_try) 2>&5
11916 ac_status=$?
c0d27fcc 11917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 11918 (exit $ac_status); }; }; then
98418dba 11919 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
11920else
11921 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11922sed 's/^/| /' conftest.$ac_ext >&5
11923
98418dba 11924ac_cv_lib_kstat_kstat_open=no
f21fadcc
JD
11925fi
11926rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11927LIBS=$ac_check_lib_save_LIBS
11928fi
c0d27fcc 11929echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
98418dba
CW
11930echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6
11931if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 11932 cat >>confdefs.h <<_ACEOF
98418dba 11933#define HAVE_LIBKSTAT 1
c0d27fcc 11934_ACEOF
f21fadcc 11935
98418dba 11936 LIBS="-lkstat $LIBS"
f21fadcc 11937
f21fadcc
JD
11938fi
11939
98418dba
CW
11940test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
11941
11942# Some systems with -lutil have (and need) -lkvm as well, some do not.
11943# On Solaris, -lkvm requires nlist from -lelf, so check that first
11944# to get the right answer into the cache.
11945# For kstat on solaris, we need libelf to force the definition of SVR4 below.
11946if test $ac_have_func = no; then
c0d27fcc 11947 echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
98418dba
CW
11948echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
11949if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 11950 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11951else
98418dba
CW
11952 ac_check_lib_save_LIBS=$LIBS
11953LIBS="-lelf $LIBS"
11954cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 11955#line $LINENO "configure"
cd958eb3
MB
11956/* confdefs.h. */
11957_ACEOF
11958cat confdefs.h >>conftest.$ac_ext
11959cat >>conftest.$ac_ext <<_ACEOF
11960/* end confdefs.h. */
98418dba
CW
11961
11962/* Override any gcc2 internal prototype to avoid an error. */
11963#ifdef __cplusplus
11964extern "C"
11965#endif
11966/* We use char because int might match the return type of a gcc2
11967 builtin and then its argument prototype would still apply. */
11968char elf_begin ();
503d2be0
AS
11969int
11970main ()
11971{
98418dba 11972elf_begin ();
503d2be0
AS
11973 ;
11974 return 0;
11975}
11976_ACEOF
11977rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11978if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
11979 (eval $ac_link) 2>&5
11980 ac_status=$?
c0d27fcc 11981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11982 (exit $ac_status); } &&
11983 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11985 (eval $ac_try) 2>&5
11986 ac_status=$?
c0d27fcc 11987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11988 (exit $ac_status); }; }; then
98418dba 11989 ac_cv_lib_elf_elf_begin=yes
ba4481b5 11990else
503d2be0 11991 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11992sed 's/^/| /' conftest.$ac_ext >&5
11993
98418dba 11994ac_cv_lib_elf_elf_begin=no
ba4481b5 11995fi
503d2be0 11996rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 11997LIBS=$ac_check_lib_save_LIBS
ba4481b5 11998fi
c0d27fcc 11999echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
98418dba
CW
12000echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
12001if test $ac_cv_lib_elf_elf_begin = yes; then
12002 LIBS="-lelf $LIBS"
ba4481b5
DL
12003fi
12004
98418dba
CW
12005fi
12006if test $ac_have_func = no; then
c0d27fcc 12007 echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
98418dba
CW
12008echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6
12009if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 12010 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12011else
98418dba
CW
12012 ac_check_lib_save_LIBS=$LIBS
12013LIBS="-lkvm $LIBS"
12014cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 12015#line $LINENO "configure"
cd958eb3
MB
12016/* confdefs.h. */
12017_ACEOF
12018cat confdefs.h >>conftest.$ac_ext
12019cat >>conftest.$ac_ext <<_ACEOF
12020/* end confdefs.h. */
98418dba
CW
12021
12022/* Override any gcc2 internal prototype to avoid an error. */
12023#ifdef __cplusplus
12024extern "C"
12025#endif
12026/* We use char because int might match the return type of a gcc2
12027 builtin and then its argument prototype would still apply. */
12028char kvm_open ();
503d2be0
AS
12029int
12030main ()
12031{
98418dba 12032kvm_open ();
503d2be0
AS
12033 ;
12034 return 0;
12035}
12036_ACEOF
12037rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12038if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
12039 (eval $ac_link) 2>&5
12040 ac_status=$?
c0d27fcc 12041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12042 (exit $ac_status); } &&
12043 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12045 (eval $ac_try) 2>&5
12046 ac_status=$?
c0d27fcc 12047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12048 (exit $ac_status); }; }; then
98418dba 12049 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
12050else
12051 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12052sed 's/^/| /' conftest.$ac_ext >&5
12053
98418dba 12054ac_cv_lib_kvm_kvm_open=no
503d2be0
AS
12055fi
12056rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 12057LIBS=$ac_check_lib_save_LIBS
503d2be0 12058fi
c0d27fcc 12059echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
98418dba
CW
12060echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6
12061if test $ac_cv_lib_kvm_kvm_open = yes; then
12062 LIBS="-lkvm $LIBS"
ba4481b5
DL
12063fi
12064
98418dba 12065 # Check for the 4.4BSD definition of getloadavg.
c0d27fcc 12066 echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
98418dba
CW
12067echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6
12068if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 12069 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12070else
98418dba
CW
12071 ac_check_lib_save_LIBS=$LIBS
12072LIBS="-lutil $LIBS"
12073cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 12074#line $LINENO "configure"
cd958eb3
MB
12075/* confdefs.h. */
12076_ACEOF
12077cat confdefs.h >>conftest.$ac_ext
12078cat >>conftest.$ac_ext <<_ACEOF
12079/* end confdefs.h. */
98418dba
CW
12080
12081/* Override any gcc2 internal prototype to avoid an error. */
12082#ifdef __cplusplus
12083extern "C"
12084#endif
12085/* We use char because int might match the return type of a gcc2
12086 builtin and then its argument prototype would still apply. */
12087char getloadavg ();
503d2be0
AS
12088int
12089main ()
12090{
98418dba 12091getloadavg ();
503d2be0
AS
12092 ;
12093 return 0;
12094}
12095_ACEOF
12096rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12097if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
12098 (eval $ac_link) 2>&5
12099 ac_status=$?
c0d27fcc 12100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12101 (exit $ac_status); } &&
12102 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12104 (eval $ac_try) 2>&5
12105 ac_status=$?
c0d27fcc 12106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12107 (exit $ac_status); }; }; then
98418dba 12108 ac_cv_lib_util_getloadavg=yes
ba4481b5 12109else
503d2be0 12110 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12111sed 's/^/| /' conftest.$ac_ext >&5
12112
98418dba 12113ac_cv_lib_util_getloadavg=no
ba4481b5 12114fi
503d2be0 12115rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12116LIBS=$ac_check_lib_save_LIBS
12117fi
c0d27fcc 12118echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
98418dba
CW
12119echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6
12120if test $ac_cv_lib_util_getloadavg = yes; then
12121 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 12122fi
503d2be0 12123
98418dba 12124fi
ba4481b5 12125
98418dba
CW
12126if test $ac_have_func = no; then
12127 # There is a commonly available library for RS/6000 AIX.
12128 # Since it is not a standard part of AIX, it might be installed locally.
12129 ac_getloadavg_LIBS=$LIBS
12130 LIBS="-L/usr/local/lib $LIBS"
c0d27fcc 12131 echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
98418dba
CW
12132echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6
12133if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 12134 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12135else
98418dba
CW
12136 ac_check_lib_save_LIBS=$LIBS
12137LIBS="-lgetloadavg $LIBS"
12138cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 12139#line $LINENO "configure"
cd958eb3
MB
12140/* confdefs.h. */
12141_ACEOF
12142cat confdefs.h >>conftest.$ac_ext
12143cat >>conftest.$ac_ext <<_ACEOF
12144/* end confdefs.h. */
ba4481b5 12145
98418dba
CW
12146/* Override any gcc2 internal prototype to avoid an error. */
12147#ifdef __cplusplus
12148extern "C"
12149#endif
12150/* We use char because int might match the return type of a gcc2
12151 builtin and then its argument prototype would still apply. */
12152char getloadavg ();
98418dba
CW
12153int
12154main ()
12155{
12156getloadavg ();
12157 ;
12158 return 0;
12159}
503d2be0 12160_ACEOF
98418dba 12161rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12162if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
12163 (eval $ac_link) 2>&5
12164 ac_status=$?
c0d27fcc 12165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12166 (exit $ac_status); } &&
12167 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
12169 (eval $ac_try) 2>&5
12170 ac_status=$?
c0d27fcc 12171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12172 (exit $ac_status); }; }; then
12173 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 12174else
98418dba 12175 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12176sed 's/^/| /' conftest.$ac_ext >&5
12177
98418dba
CW
12178ac_cv_lib_getloadavg_getloadavg=no
12179fi
12180rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12181LIBS=$ac_check_lib_save_LIBS
12182fi
c0d27fcc 12183echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
98418dba
CW
12184echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6
12185if test $ac_cv_lib_getloadavg_getloadavg = yes; then
12186 LIBS="-lgetloadavg $LIBS"
12187else
12188 LIBS=$ac_getloadavg_LIBS
ba4481b5 12189fi
ba4481b5
DL
12190
12191fi
98418dba
CW
12192
12193# Make sure it is really in the library, if we think we found it,
12194# otherwise set up the replacement function.
12195
12196for ac_func in getloadavg
12197do
12198as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 12199echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
12200echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12201if eval "test \"\${$as_ac_var+set}\" = set"; then
12202 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12203else
503d2be0 12204 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 12205#line $LINENO "configure"
cd958eb3
MB
12206/* confdefs.h. */
12207_ACEOF
12208cat confdefs.h >>conftest.$ac_ext
12209cat >>conftest.$ac_ext <<_ACEOF
12210/* end confdefs.h. */
ba4481b5 12211/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
12212 which can conflict with char $ac_func (); below.
12213 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12214 <limits.h> exists even on freestanding compilers. */
12215#ifdef __STDC__
12216# include <limits.h>
12217#else
12218# include <assert.h>
12219#endif
ba4481b5 12220/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12221#ifdef __cplusplus
12222extern "C"
cd958eb3 12223{
503d2be0 12224#endif
ba4481b5 12225/* We use char because int might match the return type of a gcc2
503d2be0
AS
12226 builtin and then its argument prototype would still apply. */
12227char $ac_func ();
ba4481b5
DL
12228/* The GNU C library defines this for functions which it implements
12229 to always fail with ENOSYS. Some functions are actually named
12230 something starting with __ and the normal name is an alias. */
12231#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12232choke me
12233#else
cd958eb3 12234char (*f) () = $ac_func;
ba4481b5 12235#endif
cd958eb3
MB
12236#ifdef __cplusplus
12237}
12238#endif
12239
12240int
12241main ()
12242{
9e71690e 12243return f != $ac_func;
503d2be0
AS
12244 ;
12245 return 0;
12246}
12247_ACEOF
12248rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12249if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
12250 (eval $ac_link) 2>&5
12251 ac_status=$?
c0d27fcc 12252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12253 (exit $ac_status); } &&
12254 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12256 (eval $ac_try) 2>&5
12257 ac_status=$?
c0d27fcc 12258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12259 (exit $ac_status); }; }; then
12260 eval "$as_ac_var=yes"
12261else
12262 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12263sed 's/^/| /' conftest.$ac_ext >&5
12264
503d2be0
AS
12265eval "$as_ac_var=no"
12266fi
12267rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12268fi
c0d27fcc 12269echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
12270echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12271if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 12272 cat >>confdefs.h <<_ACEOF
98418dba 12273#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 12274_ACEOF
503d2be0 12275
98418dba
CW
12276else
12277 LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
ba4481b5 12278
c0d27fcc 12279cat >>confdefs.h <<\_ACEOF
98418dba 12280#define C_GETLOADAVG 1
c0d27fcc 12281_ACEOF
ba4481b5 12282
98418dba
CW
12283# Figure out what our getloadavg.c needs.
12284ac_have_func=no
c0d27fcc
MR
12285if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
12286 echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
98418dba
CW
12287echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
12288if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 12289 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12290fi
12291echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
12292echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
ba4481b5 12293else
c0d27fcc
MR
12294 # Is the header compilable?
12295echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
12296echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6
12297cat >conftest.$ac_ext <<_ACEOF
12298#line $LINENO "configure"
cd958eb3
MB
12299/* confdefs.h. */
12300_ACEOF
12301cat confdefs.h >>conftest.$ac_ext
12302cat >>conftest.$ac_ext <<_ACEOF
12303/* end confdefs.h. */
c0d27fcc
MR
12304$ac_includes_default
12305#include <sys/dg_sys_info.h>
12306_ACEOF
12307rm -f conftest.$ac_objext
12308if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12309 (eval $ac_compile) 2>&5
12310 ac_status=$?
12311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12312 (exit $ac_status); } &&
12313 { ac_try='test -s conftest.$ac_objext'
12314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12315 (eval $ac_try) 2>&5
12316 ac_status=$?
12317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12318 (exit $ac_status); }; }; then
12319 ac_header_compiler=yes
12320else
12321 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12322sed 's/^/| /' conftest.$ac_ext >&5
12323
c0d27fcc
MR
12324ac_header_compiler=no
12325fi
12326rm -f conftest.$ac_objext conftest.$ac_ext
12327echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12328echo "${ECHO_T}$ac_header_compiler" >&6
12329
12330# Is the header present?
12331echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
12332echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6
12333cat >conftest.$ac_ext <<_ACEOF
12334#line $LINENO "configure"
cd958eb3
MB
12335/* confdefs.h. */
12336_ACEOF
12337cat confdefs.h >>conftest.$ac_ext
12338cat >>conftest.$ac_ext <<_ACEOF
12339/* end confdefs.h. */
98418dba
CW
12340#include <sys/dg_sys_info.h>
12341_ACEOF
c0d27fcc 12342if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12343 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12344 ac_status=$?
6bae0ccf 12345 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12346 rm -f conftest.er1
12347 cat conftest.err >&5
c0d27fcc 12348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12349 (exit $ac_status); } >/dev/null; then
12350 if test -s conftest.err; then
12351 ac_cpp_err=$ac_c_preproc_warn_flag
12352 else
12353 ac_cpp_err=
12354 fi
12355else
12356 ac_cpp_err=yes
ba4481b5 12357fi
98418dba 12358if test -z "$ac_cpp_err"; then
c0d27fcc 12359 ac_header_preproc=yes
98418dba
CW
12360else
12361 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12362sed 's/^/| /' conftest.$ac_ext >&5
12363
c0d27fcc 12364 ac_header_preproc=no
ba4481b5 12365fi
98418dba 12366rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12367echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12368echo "${ECHO_T}$ac_header_preproc" >&6
12369
12370# So? What about this header?
12371case $ac_header_compiler:$ac_header_preproc in
12372 yes:no )
12373 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
12374echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12375 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
12376echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
12377 (
12378 cat <<\_ASBOX
12379## ------------------------------------ ##
12380## Report this to bug-autoconf@gnu.org. ##
12381## ------------------------------------ ##
12382_ASBOX
12383 ) |
12384 sed "s/^/$as_me: WARNING: /" >&2
12385 ;;
c0d27fcc
MR
12386 no:yes )
12387 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
12388echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
12389 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
12390echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
12391 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
12392echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
12393 (
12394 cat <<\_ASBOX
12395## ------------------------------------ ##
12396## Report this to bug-autoconf@gnu.org. ##
12397## ------------------------------------ ##
12398_ASBOX
12399 ) |
12400 sed "s/^/$as_me: WARNING: /" >&2
12401 ;;
c0d27fcc
MR
12402esac
12403echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
12404echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
12405if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
12406 echo $ECHO_N "(cached) $ECHO_C" >&6
12407else
12408 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 12409fi
c0d27fcc 12410echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
98418dba 12411echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
c0d27fcc
MR
12412
12413fi
98418dba
CW
12414if test $ac_cv_header_sys_dg_sys_info_h = yes; then
12415 ac_have_func=yes
ba4481b5 12416
c0d27fcc 12417cat >>confdefs.h <<\_ACEOF
98418dba 12418#define DGUX 1
c0d27fcc
MR
12419_ACEOF
12420
503d2be0 12421
c0d27fcc 12422echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
98418dba
CW
12423echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6
12424if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 12425 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12426else
503d2be0 12427 ac_check_lib_save_LIBS=$LIBS
98418dba 12428LIBS="-ldgc $LIBS"
503d2be0 12429cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 12430#line $LINENO "configure"
cd958eb3
MB
12431/* confdefs.h. */
12432_ACEOF
12433cat confdefs.h >>conftest.$ac_ext
12434cat >>conftest.$ac_ext <<_ACEOF
12435/* end confdefs.h. */
503d2be0 12436
ba4481b5 12437/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12438#ifdef __cplusplus
12439extern "C"
12440#endif
ba4481b5 12441/* We use char because int might match the return type of a gcc2
503d2be0 12442 builtin and then its argument prototype would still apply. */
98418dba 12443char dg_sys_info ();
503d2be0
AS
12444int
12445main ()
12446{
98418dba 12447dg_sys_info ();
503d2be0
AS
12448 ;
12449 return 0;
12450}
12451_ACEOF
12452rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12453if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
12454 (eval $ac_link) 2>&5
12455 ac_status=$?
c0d27fcc 12456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12457 (exit $ac_status); } &&
12458 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12460 (eval $ac_try) 2>&5
12461 ac_status=$?
c0d27fcc 12462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12463 (exit $ac_status); }; }; then
98418dba 12464 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
12465else
12466 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12467sed 's/^/| /' conftest.$ac_ext >&5
12468
98418dba 12469ac_cv_lib_dgc_dg_sys_info=no
503d2be0
AS
12470fi
12471rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12472LIBS=$ac_check_lib_save_LIBS
12473fi
c0d27fcc 12474echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
98418dba
CW
12475echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6
12476if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 12477 cat >>confdefs.h <<_ACEOF
98418dba 12478#define HAVE_LIBDGC 1
c0d27fcc 12479_ACEOF
ba4481b5 12480
98418dba 12481 LIBS="-ldgc $LIBS"
ba4481b5 12482
ba4481b5
DL
12483fi
12484
98418dba 12485fi
503d2be0 12486
c0d27fcc
MR
12487
12488
12489if test "${ac_cv_header_locale_h+set}" = set; then
12490 echo "$as_me:$LINENO: checking for locale.h" >&5
98418dba
CW
12491echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
12492if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 12493 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12494fi
12495echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
12496echo "${ECHO_T}$ac_cv_header_locale_h" >&6
503d2be0 12497else
c0d27fcc
MR
12498 # Is the header compilable?
12499echo "$as_me:$LINENO: checking locale.h usability" >&5
12500echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6
12501cat >conftest.$ac_ext <<_ACEOF
12502#line $LINENO "configure"
cd958eb3
MB
12503/* confdefs.h. */
12504_ACEOF
12505cat confdefs.h >>conftest.$ac_ext
12506cat >>conftest.$ac_ext <<_ACEOF
12507/* end confdefs.h. */
c0d27fcc
MR
12508$ac_includes_default
12509#include <locale.h>
12510_ACEOF
12511rm -f conftest.$ac_objext
12512if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12513 (eval $ac_compile) 2>&5
12514 ac_status=$?
12515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12516 (exit $ac_status); } &&
12517 { ac_try='test -s conftest.$ac_objext'
12518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12519 (eval $ac_try) 2>&5
12520 ac_status=$?
12521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12522 (exit $ac_status); }; }; then
12523 ac_header_compiler=yes
12524else
12525 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12526sed 's/^/| /' conftest.$ac_ext >&5
12527
c0d27fcc
MR
12528ac_header_compiler=no
12529fi
12530rm -f conftest.$ac_objext conftest.$ac_ext
12531echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12532echo "${ECHO_T}$ac_header_compiler" >&6
12533
12534# Is the header present?
12535echo "$as_me:$LINENO: checking locale.h presence" >&5
12536echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6
12537cat >conftest.$ac_ext <<_ACEOF
12538#line $LINENO "configure"
cd958eb3
MB
12539/* confdefs.h. */
12540_ACEOF
12541cat confdefs.h >>conftest.$ac_ext
12542cat >>conftest.$ac_ext <<_ACEOF
12543/* end confdefs.h. */
98418dba 12544#include <locale.h>
503d2be0 12545_ACEOF
c0d27fcc 12546if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 12547 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 12548 ac_status=$?
6bae0ccf 12549 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12550 rm -f conftest.er1
12551 cat conftest.err >&5
c0d27fcc 12552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12553 (exit $ac_status); } >/dev/null; then
12554 if test -s conftest.err; then
12555 ac_cpp_err=$ac_c_preproc_warn_flag
12556 else
12557 ac_cpp_err=
12558 fi
503d2be0 12559else
98418dba 12560 ac_cpp_err=yes
503d2be0 12561fi
98418dba 12562if test -z "$ac_cpp_err"; then
c0d27fcc 12563 ac_header_preproc=yes
98418dba
CW
12564else
12565 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12566sed 's/^/| /' conftest.$ac_ext >&5
12567
c0d27fcc 12568 ac_header_preproc=no
ba4481b5 12569fi
98418dba 12570rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12571echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12572echo "${ECHO_T}$ac_header_preproc" >&6
12573
12574# So? What about this header?
12575case $ac_header_compiler:$ac_header_preproc in
12576 yes:no )
12577 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
12578echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12579 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
12580echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
12581 (
12582 cat <<\_ASBOX
12583## ------------------------------------ ##
12584## Report this to bug-autoconf@gnu.org. ##
12585## ------------------------------------ ##
12586_ASBOX
12587 ) |
12588 sed "s/^/$as_me: WARNING: /" >&2
12589 ;;
c0d27fcc
MR
12590 no:yes )
12591 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
12592echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
12593 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
12594echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
12595 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
12596echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
12597 (
12598 cat <<\_ASBOX
12599## ------------------------------------ ##
12600## Report this to bug-autoconf@gnu.org. ##
12601## ------------------------------------ ##
12602_ASBOX
12603 ) |
12604 sed "s/^/$as_me: WARNING: /" >&2
12605 ;;
c0d27fcc
MR
12606esac
12607echo "$as_me:$LINENO: checking for locale.h" >&5
12608echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
12609if test "${ac_cv_header_locale_h+set}" = set; then
12610 echo $ECHO_N "(cached) $ECHO_C" >&6
12611else
12612 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 12613fi
c0d27fcc 12614echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
98418dba
CW
12615echo "${ECHO_T}$ac_cv_header_locale_h" >&6
12616
c0d27fcc
MR
12617fi
12618
12619
12620
98418dba 12621for ac_func in setlocale
ba4481b5 12622do
503d2be0 12623as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 12624echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
12625echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12626if eval "test \"\${$as_ac_var+set}\" = set"; then
12627 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12628else
503d2be0 12629 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 12630#line $LINENO "configure"
cd958eb3
MB
12631/* confdefs.h. */
12632_ACEOF
12633cat confdefs.h >>conftest.$ac_ext
12634cat >>conftest.$ac_ext <<_ACEOF
12635/* end confdefs.h. */
ba4481b5 12636/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
12637 which can conflict with char $ac_func (); below.
12638 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12639 <limits.h> exists even on freestanding compilers. */
12640#ifdef __STDC__
12641# include <limits.h>
12642#else
12643# include <assert.h>
12644#endif
ba4481b5 12645/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12646#ifdef __cplusplus
12647extern "C"
cd958eb3 12648{
503d2be0 12649#endif
ba4481b5 12650/* We use char because int might match the return type of a gcc2
503d2be0
AS
12651 builtin and then its argument prototype would still apply. */
12652char $ac_func ();
ba4481b5
DL
12653/* The GNU C library defines this for functions which it implements
12654 to always fail with ENOSYS. Some functions are actually named
12655 something starting with __ and the normal name is an alias. */
12656#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12657choke me
12658#else
cd958eb3
MB
12659char (*f) () = $ac_func;
12660#endif
12661#ifdef __cplusplus
12662}
ba4481b5
DL
12663#endif
12664
cd958eb3
MB
12665int
12666main ()
12667{
9e71690e 12668return f != $ac_func;
503d2be0
AS
12669 ;
12670 return 0;
12671}
12672_ACEOF
12673rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12674if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
12675 (eval $ac_link) 2>&5
12676 ac_status=$?
c0d27fcc 12677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12678 (exit $ac_status); } &&
12679 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12681 (eval $ac_try) 2>&5
12682 ac_status=$?
c0d27fcc 12683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12684 (exit $ac_status); }; }; then
12685 eval "$as_ac_var=yes"
12686else
12687 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12688sed 's/^/| /' conftest.$ac_ext >&5
12689
503d2be0
AS
12690eval "$as_ac_var=no"
12691fi
12692rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12693fi
c0d27fcc 12694echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
12695echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12696if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 12697 cat >>confdefs.h <<_ACEOF
503d2be0 12698#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 12699_ACEOF
ba4481b5 12700
ba4481b5
DL
12701fi
12702done
12703
c0d27fcc 12704
98418dba
CW
12705# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
12706# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
12707# Irix 4.0.5F has the header but not the library.
12708if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
12709 ac_have_func=yes
12710
c0d27fcc 12711cat >>confdefs.h <<\_ACEOF
98418dba 12712#define SVR4 1
c0d27fcc 12713_ACEOF
98418dba
CW
12714
12715fi
12716
12717if test $ac_have_func = no; then
c0d27fcc
MR
12718 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
12719 echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
98418dba
CW
12720echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
12721if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 12722 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12723fi
12724echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
12725echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
98418dba 12726else
c0d27fcc
MR
12727 # Is the header compilable?
12728echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
12729echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6
12730cat >conftest.$ac_ext <<_ACEOF
12731#line $LINENO "configure"
cd958eb3
MB
12732/* confdefs.h. */
12733_ACEOF
12734cat confdefs.h >>conftest.$ac_ext
12735cat >>conftest.$ac_ext <<_ACEOF
12736/* end confdefs.h. */
c0d27fcc
MR
12737$ac_includes_default
12738#include <inq_stats/cpustats.h>
12739_ACEOF
12740rm -f conftest.$ac_objext
12741if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12742 (eval $ac_compile) 2>&5
12743 ac_status=$?
12744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12745 (exit $ac_status); } &&
12746 { ac_try='test -s conftest.$ac_objext'
12747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12748 (eval $ac_try) 2>&5
12749 ac_status=$?
12750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12751 (exit $ac_status); }; }; then
12752 ac_header_compiler=yes
12753else
12754 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12755sed 's/^/| /' conftest.$ac_ext >&5
12756
c0d27fcc
MR
12757ac_header_compiler=no
12758fi
12759rm -f conftest.$ac_objext conftest.$ac_ext
12760echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12761echo "${ECHO_T}$ac_header_compiler" >&6
12762
12763# Is the header present?
12764echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
12765echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6
12766cat >conftest.$ac_ext <<_ACEOF
12767#line $LINENO "configure"
cd958eb3
MB
12768/* confdefs.h. */
12769_ACEOF
12770cat confdefs.h >>conftest.$ac_ext
12771cat >>conftest.$ac_ext <<_ACEOF
12772/* end confdefs.h. */
98418dba 12773#include <inq_stats/cpustats.h>
503d2be0 12774_ACEOF
c0d27fcc 12775if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
12776 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12777 ac_status=$?
6bae0ccf 12778 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
12779 rm -f conftest.er1
12780 cat conftest.err >&5
c0d27fcc 12781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12782 (exit $ac_status); } >/dev/null; then
12783 if test -s conftest.err; then
12784 ac_cpp_err=$ac_c_preproc_warn_flag
12785 else
12786 ac_cpp_err=
12787 fi
12788else
12789 ac_cpp_err=yes
12790fi
12791if test -z "$ac_cpp_err"; then
c0d27fcc 12792 ac_header_preproc=yes
503d2be0
AS
12793else
12794 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12795sed 's/^/| /' conftest.$ac_ext >&5
12796
c0d27fcc 12797 ac_header_preproc=no
ba4481b5 12798fi
503d2be0 12799rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12800echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12801echo "${ECHO_T}$ac_header_preproc" >&6
12802
12803# So? What about this header?
12804case $ac_header_compiler:$ac_header_preproc in
12805 yes:no )
12806 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
12807echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12808 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
12809echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
12810 (
12811 cat <<\_ASBOX
12812## ------------------------------------ ##
12813## Report this to bug-autoconf@gnu.org. ##
12814## ------------------------------------ ##
12815_ASBOX
12816 ) |
12817 sed "s/^/$as_me: WARNING: /" >&2
12818 ;;
c0d27fcc
MR
12819 no:yes )
12820 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
12821echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
12822 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
12823echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
12824 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
12825echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
12826 (
12827 cat <<\_ASBOX
12828## ------------------------------------ ##
12829## Report this to bug-autoconf@gnu.org. ##
12830## ------------------------------------ ##
12831_ASBOX
12832 ) |
12833 sed "s/^/$as_me: WARNING: /" >&2
12834 ;;
c0d27fcc
MR
12835esac
12836echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
12837echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
12838if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
12839 echo $ECHO_N "(cached) $ECHO_C" >&6
12840else
12841 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 12842fi
c0d27fcc 12843echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
98418dba 12844echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
c0d27fcc
MR
12845
12846fi
98418dba
CW
12847if test $ac_cv_header_inq_stats_cpustats_h = yes; then
12848 ac_have_func=yes
ba4481b5 12849
c0d27fcc 12850cat >>confdefs.h <<\_ACEOF
98418dba 12851#define UMAX 1
c0d27fcc 12852_ACEOF
98418dba 12853
c0d27fcc
MR
12854
12855cat >>confdefs.h <<\_ACEOF
98418dba 12856#define UMAX4_3 1
c0d27fcc 12857_ACEOF
98418dba
CW
12858
12859fi
12860
c0d27fcc 12861
98418dba
CW
12862fi
12863
12864if test $ac_have_func = no; then
c0d27fcc
MR
12865 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
12866 echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
98418dba
CW
12867echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
12868if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 12869 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12870fi
12871echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
12872echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
503d2be0 12873else
c0d27fcc
MR
12874 # Is the header compilable?
12875echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
12876echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6
12877cat >conftest.$ac_ext <<_ACEOF
12878#line $LINENO "configure"
cd958eb3
MB
12879/* confdefs.h. */
12880_ACEOF
12881cat confdefs.h >>conftest.$ac_ext
12882cat >>conftest.$ac_ext <<_ACEOF
12883/* end confdefs.h. */
c0d27fcc
MR
12884$ac_includes_default
12885#include <sys/cpustats.h>
12886_ACEOF
12887rm -f conftest.$ac_objext
12888if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12889 (eval $ac_compile) 2>&5
12890 ac_status=$?
12891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12892 (exit $ac_status); } &&
12893 { ac_try='test -s conftest.$ac_objext'
12894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12895 (eval $ac_try) 2>&5
12896 ac_status=$?
12897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12898 (exit $ac_status); }; }; then
12899 ac_header_compiler=yes
12900else
12901 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12902sed 's/^/| /' conftest.$ac_ext >&5
12903
c0d27fcc
MR
12904ac_header_compiler=no
12905fi
12906rm -f conftest.$ac_objext conftest.$ac_ext
12907echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12908echo "${ECHO_T}$ac_header_compiler" >&6
12909
12910# Is the header present?
12911echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
12912echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6
12913cat >conftest.$ac_ext <<_ACEOF
12914#line $LINENO "configure"
cd958eb3
MB
12915/* confdefs.h. */
12916_ACEOF
12917cat confdefs.h >>conftest.$ac_ext
12918cat >>conftest.$ac_ext <<_ACEOF
12919/* end confdefs.h. */
98418dba
CW
12920#include <sys/cpustats.h>
12921_ACEOF
c0d27fcc 12922if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12923 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12924 ac_status=$?
6bae0ccf 12925 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12926 rm -f conftest.er1
12927 cat conftest.err >&5
c0d27fcc 12928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12929 (exit $ac_status); } >/dev/null; then
12930 if test -s conftest.err; then
12931 ac_cpp_err=$ac_c_preproc_warn_flag
12932 else
12933 ac_cpp_err=
12934 fi
12935else
12936 ac_cpp_err=yes
503d2be0 12937fi
98418dba 12938if test -z "$ac_cpp_err"; then
c0d27fcc 12939 ac_header_preproc=yes
98418dba
CW
12940else
12941 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12942sed 's/^/| /' conftest.$ac_ext >&5
12943
c0d27fcc 12944 ac_header_preproc=no
98418dba
CW
12945fi
12946rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12947echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12948echo "${ECHO_T}$ac_header_preproc" >&6
12949
12950# So? What about this header?
12951case $ac_header_compiler:$ac_header_preproc in
12952 yes:no )
12953 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
12954echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12955 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
12956echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
12957 (
12958 cat <<\_ASBOX
12959## ------------------------------------ ##
12960## Report this to bug-autoconf@gnu.org. ##
12961## ------------------------------------ ##
12962_ASBOX
12963 ) |
12964 sed "s/^/$as_me: WARNING: /" >&2
12965 ;;
c0d27fcc
MR
12966 no:yes )
12967 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
12968echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
12969 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
12970echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
12971 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
12972echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
12973 (
12974 cat <<\_ASBOX
12975## ------------------------------------ ##
12976## Report this to bug-autoconf@gnu.org. ##
12977## ------------------------------------ ##
12978_ASBOX
12979 ) |
12980 sed "s/^/$as_me: WARNING: /" >&2
12981 ;;
c0d27fcc
MR
12982esac
12983echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
12984echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
12985if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
12986 echo $ECHO_N "(cached) $ECHO_C" >&6
12987else
12988 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 12989fi
c0d27fcc 12990echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
98418dba 12991echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
c0d27fcc
MR
12992
12993fi
98418dba 12994if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 12995 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 12996#define UMAX 1
c0d27fcc 12997_ACEOF
ba4481b5 12998
98418dba
CW
12999fi
13000
c0d27fcc 13001
98418dba
CW
13002fi
13003
13004if test $ac_have_func = no; then
13005
13006for ac_header in mach/mach.h
2c9dccc9
PJ
13007do
13008as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
13009if eval "test \"\${$as_ac_Header+set}\" = set"; then
13010 echo "$as_me:$LINENO: checking for $ac_header" >&5
2c9dccc9
PJ
13011echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13012if eval "test \"\${$as_ac_Header+set}\" = set"; then
13013 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13014fi
13015echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13016echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 13017else
c0d27fcc
MR
13018 # Is the header compilable?
13019echo "$as_me:$LINENO: checking $ac_header usability" >&5
13020echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13021cat >conftest.$ac_ext <<_ACEOF
13022#line $LINENO "configure"
cd958eb3
MB
13023/* confdefs.h. */
13024_ACEOF
13025cat confdefs.h >>conftest.$ac_ext
13026cat >>conftest.$ac_ext <<_ACEOF
13027/* end confdefs.h. */
c0d27fcc
MR
13028$ac_includes_default
13029#include <$ac_header>
13030_ACEOF
13031rm -f conftest.$ac_objext
13032if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13033 (eval $ac_compile) 2>&5
13034 ac_status=$?
13035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13036 (exit $ac_status); } &&
13037 { ac_try='test -s conftest.$ac_objext'
13038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13039 (eval $ac_try) 2>&5
13040 ac_status=$?
13041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13042 (exit $ac_status); }; }; then
13043 ac_header_compiler=yes
13044else
13045 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13046sed 's/^/| /' conftest.$ac_ext >&5
13047
c0d27fcc
MR
13048ac_header_compiler=no
13049fi
13050rm -f conftest.$ac_objext conftest.$ac_ext
13051echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13052echo "${ECHO_T}$ac_header_compiler" >&6
13053
13054# Is the header present?
13055echo "$as_me:$LINENO: checking $ac_header presence" >&5
13056echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13057cat >conftest.$ac_ext <<_ACEOF
13058#line $LINENO "configure"
cd958eb3
MB
13059/* confdefs.h. */
13060_ACEOF
13061cat confdefs.h >>conftest.$ac_ext
13062cat >>conftest.$ac_ext <<_ACEOF
13063/* end confdefs.h. */
2c9dccc9
PJ
13064#include <$ac_header>
13065_ACEOF
c0d27fcc 13066if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2c9dccc9
PJ
13067 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13068 ac_status=$?
6bae0ccf 13069 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
13070 rm -f conftest.er1
13071 cat conftest.err >&5
c0d27fcc 13072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2c9dccc9
PJ
13073 (exit $ac_status); } >/dev/null; then
13074 if test -s conftest.err; then
13075 ac_cpp_err=$ac_c_preproc_warn_flag
13076 else
13077 ac_cpp_err=
13078 fi
13079else
13080 ac_cpp_err=yes
13081fi
13082if test -z "$ac_cpp_err"; then
c0d27fcc
MR
13083 ac_header_preproc=yes
13084else
13085 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13086sed 's/^/| /' conftest.$ac_ext >&5
13087
c0d27fcc
MR
13088 ac_header_preproc=no
13089fi
13090rm -f conftest.err conftest.$ac_ext
13091echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13092echo "${ECHO_T}$ac_header_preproc" >&6
13093
13094# So? What about this header?
13095case $ac_header_compiler:$ac_header_preproc in
13096 yes:no )
13097 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13098echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13099 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
13100echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13101 (
13102 cat <<\_ASBOX
13103## ------------------------------------ ##
13104## Report this to bug-autoconf@gnu.org. ##
13105## ------------------------------------ ##
13106_ASBOX
13107 ) |
13108 sed "s/^/$as_me: WARNING: /" >&2
13109 ;;
c0d27fcc
MR
13110 no:yes )
13111 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13112echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13113 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13114echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13115 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
13116echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13117 (
13118 cat <<\_ASBOX
13119## ------------------------------------ ##
13120## Report this to bug-autoconf@gnu.org. ##
13121## ------------------------------------ ##
13122_ASBOX
13123 ) |
13124 sed "s/^/$as_me: WARNING: /" >&2
13125 ;;
c0d27fcc
MR
13126esac
13127echo "$as_me:$LINENO: checking for $ac_header" >&5
13128echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13129if eval "test \"\${$as_ac_Header+set}\" = set"; then
13130 echo $ECHO_N "(cached) $ECHO_C" >&6
13131else
13132 eval "$as_ac_Header=$ac_header_preproc"
13133fi
13134echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13135echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13136
13137fi
13138if test `eval echo '${'$as_ac_Header'}'` = yes; then
13139 cat >>confdefs.h <<_ACEOF
13140#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13141_ACEOF
13142
13143fi
13144
13145done
13146
13147fi
13148
13149
13150for ac_header in nlist.h
13151do
13152as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13153if eval "test \"\${$as_ac_Header+set}\" = set"; then
13154 echo "$as_me:$LINENO: checking for $ac_header" >&5
13155echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13156if eval "test \"\${$as_ac_Header+set}\" = set"; then
13157 echo $ECHO_N "(cached) $ECHO_C" >&6
13158fi
13159echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13160echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13161else
13162 # Is the header compilable?
13163echo "$as_me:$LINENO: checking $ac_header usability" >&5
13164echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13165cat >conftest.$ac_ext <<_ACEOF
13166#line $LINENO "configure"
cd958eb3
MB
13167/* confdefs.h. */
13168_ACEOF
13169cat confdefs.h >>conftest.$ac_ext
13170cat >>conftest.$ac_ext <<_ACEOF
13171/* end confdefs.h. */
c0d27fcc
MR
13172$ac_includes_default
13173#include <$ac_header>
13174_ACEOF
13175rm -f conftest.$ac_objext
13176if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13177 (eval $ac_compile) 2>&5
13178 ac_status=$?
13179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13180 (exit $ac_status); } &&
13181 { ac_try='test -s conftest.$ac_objext'
13182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13183 (eval $ac_try) 2>&5
13184 ac_status=$?
13185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13186 (exit $ac_status); }; }; then
13187 ac_header_compiler=yes
2c9dccc9
PJ
13188else
13189 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13190sed 's/^/| /' conftest.$ac_ext >&5
13191
c0d27fcc 13192ac_header_compiler=no
98418dba 13193fi
c0d27fcc
MR
13194rm -f conftest.$ac_objext conftest.$ac_ext
13195echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13196echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 13197
c0d27fcc
MR
13198# Is the header present?
13199echo "$as_me:$LINENO: checking $ac_header presence" >&5
13200echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13201cat >conftest.$ac_ext <<_ACEOF
13202#line $LINENO "configure"
cd958eb3
MB
13203/* confdefs.h. */
13204_ACEOF
13205cat confdefs.h >>conftest.$ac_ext
13206cat >>conftest.$ac_ext <<_ACEOF
13207/* end confdefs.h. */
503d2be0
AS
13208#include <$ac_header>
13209_ACEOF
c0d27fcc 13210if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
13211 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13212 ac_status=$?
6bae0ccf 13213 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13214 rm -f conftest.er1
13215 cat conftest.err >&5
c0d27fcc 13216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13217 (exit $ac_status); } >/dev/null; then
13218 if test -s conftest.err; then
13219 ac_cpp_err=$ac_c_preproc_warn_flag
13220 else
13221 ac_cpp_err=
13222 fi
13223else
13224 ac_cpp_err=yes
13225fi
13226if test -z "$ac_cpp_err"; then
c0d27fcc 13227 ac_header_preproc=yes
503d2be0
AS
13228else
13229 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13230sed 's/^/| /' conftest.$ac_ext >&5
13231
c0d27fcc 13232 ac_header_preproc=no
b5de8dc0 13233fi
503d2be0 13234rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
13235echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13236echo "${ECHO_T}$ac_header_preproc" >&6
13237
13238# So? What about this header?
13239case $ac_header_compiler:$ac_header_preproc in
13240 yes:no )
13241 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13242echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13243 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
13244echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13245 (
13246 cat <<\_ASBOX
13247## ------------------------------------ ##
13248## Report this to bug-autoconf@gnu.org. ##
13249## ------------------------------------ ##
13250_ASBOX
13251 ) |
13252 sed "s/^/$as_me: WARNING: /" >&2
13253 ;;
c0d27fcc
MR
13254 no:yes )
13255 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13256echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13257 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13258echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13259 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
13260echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13261 (
13262 cat <<\_ASBOX
13263## ------------------------------------ ##
13264## Report this to bug-autoconf@gnu.org. ##
13265## ------------------------------------ ##
13266_ASBOX
13267 ) |
13268 sed "s/^/$as_me: WARNING: /" >&2
13269 ;;
c0d27fcc
MR
13270esac
13271echo "$as_me:$LINENO: checking for $ac_header" >&5
13272echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13273if eval "test \"\${$as_ac_Header+set}\" = set"; then
13274 echo $ECHO_N "(cached) $ECHO_C" >&6
13275else
13276 eval "$as_ac_Header=$ac_header_preproc"
b5de8dc0 13277fi
c0d27fcc 13278echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 13279echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
13280
13281fi
98418dba 13282if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 13283 cat >>confdefs.h <<_ACEOF
98418dba 13284#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc
MR
13285_ACEOF
13286 echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
98418dba
CW
13287echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6
13288if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 13289 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 13290else
503d2be0 13291 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 13292#line $LINENO "configure"
cd958eb3
MB
13293/* confdefs.h. */
13294_ACEOF
13295cat confdefs.h >>conftest.$ac_ext
13296cat >>conftest.$ac_ext <<_ACEOF
13297/* end confdefs.h. */
98418dba 13298#include <nlist.h>
b5de8dc0 13299
503d2be0
AS
13300int
13301main ()
13302{
98418dba
CW
13303static struct nlist ac_aggr;
13304if (ac_aggr.n_un.n_name)
13305return 0;
503d2be0
AS
13306 ;
13307 return 0;
13308}
13309_ACEOF
98418dba 13310rm -f conftest.$ac_objext
c0d27fcc 13311if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba 13312 (eval $ac_compile) 2>&5
503d2be0 13313 ac_status=$?
c0d27fcc 13314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13315 (exit $ac_status); } &&
98418dba 13316 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 13317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13318 (eval $ac_try) 2>&5
13319 ac_status=$?
c0d27fcc 13320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13321 (exit $ac_status); }; }; then
98418dba 13322 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
13323else
13324 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13325sed 's/^/| /' conftest.$ac_ext >&5
13326
6bae0ccf
DL
13327cat >conftest.$ac_ext <<_ACEOF
13328#line $LINENO "configure"
cd958eb3
MB
13329/* confdefs.h. */
13330_ACEOF
13331cat confdefs.h >>conftest.$ac_ext
13332cat >>conftest.$ac_ext <<_ACEOF
13333/* end confdefs.h. */
6bae0ccf
DL
13334#include <nlist.h>
13335
13336int
13337main ()
13338{
13339static struct nlist ac_aggr;
13340if (sizeof ac_aggr.n_un.n_name)
13341return 0;
13342 ;
13343 return 0;
13344}
13345_ACEOF
13346rm -f conftest.$ac_objext
13347if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13348 (eval $ac_compile) 2>&5
13349 ac_status=$?
13350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13351 (exit $ac_status); } &&
13352 { ac_try='test -s conftest.$ac_objext'
13353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13354 (eval $ac_try) 2>&5
13355 ac_status=$?
13356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13357 (exit $ac_status); }; }; then
13358 ac_cv_member_struct_nlist_n_un_n_name=yes
13359else
13360 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13361sed 's/^/| /' conftest.$ac_ext >&5
13362
98418dba 13363ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 13364fi
98418dba 13365rm -f conftest.$ac_objext conftest.$ac_ext
b5de8dc0 13366fi
6bae0ccf
DL
13367rm -f conftest.$ac_objext conftest.$ac_ext
13368fi
c0d27fcc 13369echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
98418dba
CW
13370echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6
13371if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 13372
c0d27fcc 13373cat >>confdefs.h <<_ACEOF
98418dba 13374#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 13375_ACEOF
b5de8dc0 13376
c0d27fcc
MR
13377
13378cat >>confdefs.h <<\_ACEOF
98418dba 13379#define NLIST_NAME_UNION 1
c0d27fcc 13380_ACEOF
b5de8dc0 13381
98418dba 13382fi
b5de8dc0 13383
c0d27fcc 13384
98418dba 13385fi
c0d27fcc 13386
98418dba 13387done
b5de8dc0 13388
98418dba
CW
13389fi
13390done
b5de8dc0 13391
c0d27fcc 13392
98418dba 13393# Some definitions of getloadavg require that the program be installed setgid.
c0d27fcc 13394echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
98418dba
CW
13395echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6
13396if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
13397 echo $ECHO_N "(cached) $ECHO_C" >&6
13398else
13399 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 13400#line $LINENO "configure"
cd958eb3
MB
13401/* confdefs.h. */
13402_ACEOF
13403cat confdefs.h >>conftest.$ac_ext
13404cat >>conftest.$ac_ext <<_ACEOF
13405/* end confdefs.h. */
6bae0ccf 13406#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
13407#ifdef LDAV_PRIVILEGED
13408Yowza Am I SETGID yet
13409#endif
13410_ACEOF
13411if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13412 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
13413 ac_cv_func_getloadavg_setgid=yes
13414else
13415 ac_cv_func_getloadavg_setgid=no
13416fi
13417rm -f conftest*
b5de8dc0 13418
98418dba 13419fi
c0d27fcc 13420echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
98418dba
CW
13421echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6
13422if test $ac_cv_func_getloadavg_setgid = yes; then
13423 NEED_SETGID=true
b5de8dc0 13424
c0d27fcc 13425cat >>confdefs.h <<\_ACEOF
98418dba 13426#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 13427_ACEOF
98418dba 13428
b5de8dc0 13429else
98418dba 13430 NEED_SETGID=false
b5de8dc0 13431fi
98418dba
CW
13432
13433if test $ac_cv_func_getloadavg_setgid = yes; then
c0d27fcc 13434 echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
98418dba
CW
13435echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6
13436if test "${ac_cv_group_kmem+set}" = set; then
13437 echo $ECHO_N "(cached) $ECHO_C" >&6
13438else
13439 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
13440 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
13441 # If we got an error (system does not support symlinks), try without -L.
13442 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
13443 ac_cv_group_kmem=`echo $ac_ls_output \
13444 | sed -ne 's/[ ][ ]*/ /g;
13445 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
13446 / /s/.* //;p;'`
13447
b5de8dc0 13448fi
c0d27fcc 13449echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
98418dba
CW
13450echo "${ECHO_T}$ac_cv_group_kmem" >&6
13451 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 13452fi
98418dba
CW
13453if test "x$ac_save_LIBS" = x; then
13454 GETLOADAVG_LIBS=$LIBS
13455else
13456 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 13457fi
98418dba 13458LIBS=$ac_save_LIBS
b5de8dc0 13459
c0d27fcc
MR
13460
13461
13462echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
b936fae4
AS
13463echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13464if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 13465 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 13466else
b936fae4
AS
13467 while :; do
13468 ac_cv_sys_largefile_source=no
503d2be0 13469 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 13470#line $LINENO "configure"
cd958eb3
MB
13471/* confdefs.h. */
13472_ACEOF
13473cat confdefs.h >>conftest.$ac_ext
13474cat >>conftest.$ac_ext <<_ACEOF
13475/* end confdefs.h. */
b936fae4 13476#include <stdio.h>
503d2be0
AS
13477int
13478main ()
13479{
b936fae4
AS
13480return !fseeko;
13481 ;
13482 return 0;
13483}
13484_ACEOF
13485rm -f conftest.$ac_objext
c0d27fcc 13486if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
b936fae4
AS
13487 (eval $ac_compile) 2>&5
13488 ac_status=$?
c0d27fcc 13489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
13490 (exit $ac_status); } &&
13491 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 13492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
13493 (eval $ac_try) 2>&5
13494 ac_status=$?
c0d27fcc 13495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
13496 (exit $ac_status); }; }; then
13497 break
13498else
13499 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13500sed 's/^/| /' conftest.$ac_ext >&5
13501
b936fae4
AS
13502fi
13503rm -f conftest.$ac_objext conftest.$ac_ext
13504 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 13505#line $LINENO "configure"
cd958eb3
MB
13506/* confdefs.h. */
13507_ACEOF
13508cat confdefs.h >>conftest.$ac_ext
13509cat >>conftest.$ac_ext <<_ACEOF
13510/* end confdefs.h. */
b936fae4
AS
13511#define _LARGEFILE_SOURCE 1
13512#include <stdio.h>
b936fae4
AS
13513int
13514main ()
13515{
13516return !fseeko;
13517 ;
13518 return 0;
13519}
13520_ACEOF
13521rm -f conftest.$ac_objext
c0d27fcc 13522if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
b936fae4
AS
13523 (eval $ac_compile) 2>&5
13524 ac_status=$?
c0d27fcc 13525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
13526 (exit $ac_status); } &&
13527 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 13528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
13529 (eval $ac_try) 2>&5
13530 ac_status=$?
c0d27fcc 13531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
13532 (exit $ac_status); }; }; then
13533 ac_cv_sys_largefile_source=1; break
13534else
13535 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13536sed 's/^/| /' conftest.$ac_ext >&5
13537
b936fae4
AS
13538fi
13539rm -f conftest.$ac_objext conftest.$ac_ext
13540 break
13541done
13542fi
c0d27fcc 13543echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
b936fae4
AS
13544echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13545if test "$ac_cv_sys_largefile_source" != no; then
13546
c0d27fcc 13547cat >>confdefs.h <<_ACEOF
b936fae4 13548#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 13549_ACEOF
b936fae4
AS
13550
13551fi
13552rm -f conftest*
4c343001 13553
b936fae4
AS
13554# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13555# in glibc 2.1.3, but that breaks too many other things.
13556# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c0d27fcc 13557echo "$as_me:$LINENO: checking for fseeko" >&5
b936fae4
AS
13558echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13559if test "${ac_cv_func_fseeko+set}" = set; then
13560 echo $ECHO_N "(cached) $ECHO_C" >&6
13561else
13562 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 13563#line $LINENO "configure"
cd958eb3
MB
13564/* confdefs.h. */
13565_ACEOF
13566cat confdefs.h >>conftest.$ac_ext
13567cat >>conftest.$ac_ext <<_ACEOF
13568/* end confdefs.h. */
b936fae4 13569#include <stdio.h>
b936fae4
AS
13570int
13571main ()
13572{
13573return fseeko && fseeko (stdin, 0, 0);
503d2be0
AS
13574 ;
13575 return 0;
13576}
13577_ACEOF
13578rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13579if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
13580 (eval $ac_link) 2>&5
13581 ac_status=$?
c0d27fcc 13582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13583 (exit $ac_status); } &&
13584 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13586 (eval $ac_try) 2>&5
13587 ac_status=$?
c0d27fcc 13588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13589 (exit $ac_status); }; }; then
b936fae4 13590 ac_cv_func_fseeko=yes
503d2be0
AS
13591else
13592 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13593sed 's/^/| /' conftest.$ac_ext >&5
13594
b936fae4 13595ac_cv_func_fseeko=no
503d2be0
AS
13596fi
13597rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13598fi
c0d27fcc 13599echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
b936fae4
AS
13600echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13601if test $ac_cv_func_fseeko = yes; then
13602
c0d27fcc 13603cat >>confdefs.h <<\_ACEOF
b936fae4 13604#define HAVE_FSEEKO 1
c0d27fcc 13605_ACEOF
b936fae4 13606
4c343001
DL
13607fi
13608
c0d27fcc 13609
cd958eb3
MB
13610echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
13611echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6
13612if test "${ac_cv_func_getpgrp_void+set}" = set; then
13613 echo $ECHO_N "(cached) $ECHO_C" >&6
13614else
13615 # Use it with a single arg.
13616cat >conftest.$ac_ext <<_ACEOF
13617#line $LINENO "configure"
13618/* confdefs.h. */
13619_ACEOF
13620cat confdefs.h >>conftest.$ac_ext
13621cat >>conftest.$ac_ext <<_ACEOF
13622/* end confdefs.h. */
13623$ac_includes_default
13624int
13625main ()
13626{
13627getpgrp (0);
13628 ;
13629 return 0;
13630}
13631_ACEOF
13632rm -f conftest.$ac_objext
13633if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13634 (eval $ac_compile) 2>&5
13635 ac_status=$?
13636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13637 (exit $ac_status); } &&
13638 { ac_try='test -s conftest.$ac_objext'
13639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13640 (eval $ac_try) 2>&5
13641 ac_status=$?
13642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13643 (exit $ac_status); }; }; then
13644 ac_cv_func_getpgrp_void=no
13645else
13646 echo "$as_me: failed program was:" >&5
13647sed 's/^/| /' conftest.$ac_ext >&5
13648
13649ac_cv_func_getpgrp_void=yes
13650fi
13651rm -f conftest.$ac_objext conftest.$ac_ext
13652
13653fi
13654echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
13655echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6
13656if test $ac_cv_func_getpgrp_void = yes; then
13657
13658cat >>confdefs.h <<\_ACEOF
13659#define GETPGRP_VOID 1
13660_ACEOF
13661
13662fi
13663
13664
b936fae4
AS
13665# UNIX98 PTYs.
13666
13667for ac_func in grantpt
503d2be0
AS
13668do
13669as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13670echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
13671echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13672if eval "test \"\${$as_ac_var+set}\" = set"; then
13673 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 13674else
503d2be0 13675 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 13676#line $LINENO "configure"
cd958eb3
MB
13677/* confdefs.h. */
13678_ACEOF
13679cat confdefs.h >>conftest.$ac_ext
13680cat >>conftest.$ac_ext <<_ACEOF
13681/* end confdefs.h. */
503d2be0 13682/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
13683 which can conflict with char $ac_func (); below.
13684 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13685 <limits.h> exists even on freestanding compilers. */
13686#ifdef __STDC__
13687# include <limits.h>
13688#else
13689# include <assert.h>
13690#endif
4c343001 13691/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13692#ifdef __cplusplus
13693extern "C"
cd958eb3 13694{
503d2be0 13695#endif
4c343001 13696/* We use char because int might match the return type of a gcc2
503d2be0
AS
13697 builtin and then its argument prototype would still apply. */
13698char $ac_func ();
503d2be0
AS
13699/* The GNU C library defines this for functions which it implements
13700 to always fail with ENOSYS. Some functions are actually named
13701 something starting with __ and the normal name is an alias. */
13702#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13703choke me
13704#else
cd958eb3
MB
13705char (*f) () = $ac_func;
13706#endif
13707#ifdef __cplusplus
13708}
503d2be0 13709#endif
4c343001 13710
cd958eb3
MB
13711int
13712main ()
13713{
9e71690e 13714return f != $ac_func;
503d2be0
AS
13715 ;
13716 return 0;
13717}
13718_ACEOF
13719rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13720if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
13721 (eval $ac_link) 2>&5
13722 ac_status=$?
c0d27fcc 13723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13724 (exit $ac_status); } &&
13725 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13727 (eval $ac_try) 2>&5
13728 ac_status=$?
c0d27fcc 13729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13730 (exit $ac_status); }; }; then
13731 eval "$as_ac_var=yes"
13732else
13733 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13734sed 's/^/| /' conftest.$ac_ext >&5
13735
503d2be0
AS
13736eval "$as_ac_var=no"
13737fi
13738rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13739fi
c0d27fcc 13740echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
13741echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13742if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 13743 cat >>confdefs.h <<_ACEOF
503d2be0 13744#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 13745_ACEOF
4c343001
DL
13746
13747fi
503d2be0
AS
13748done
13749
c0d27fcc 13750
b936fae4 13751# PTY-related GNU extensions.
4c343001 13752
b936fae4
AS
13753for ac_func in getpt
13754do
13755as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13756echo "$as_me:$LINENO: checking for $ac_func" >&5
b936fae4
AS
13757echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13758if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 13759 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 13760else
b936fae4 13761 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 13762#line $LINENO "configure"
cd958eb3
MB
13763/* confdefs.h. */
13764_ACEOF
13765cat confdefs.h >>conftest.$ac_ext
13766cat >>conftest.$ac_ext <<_ACEOF
13767/* end confdefs.h. */
087121cc 13768/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
13769 which can conflict with char $ac_func (); below.
13770 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13771 <limits.h> exists even on freestanding compilers. */
13772#ifdef __STDC__
13773# include <limits.h>
13774#else
13775# include <assert.h>
13776#endif
087121cc 13777/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13778#ifdef __cplusplus
13779extern "C"
cd958eb3 13780{
503d2be0 13781#endif
087121cc 13782/* We use char because int might match the return type of a gcc2
503d2be0
AS
13783 builtin and then its argument prototype would still apply. */
13784char $ac_func ();
087121cc
GM
13785/* The GNU C library defines this for functions which it implements
13786 to always fail with ENOSYS. Some functions are actually named
13787 something starting with __ and the normal name is an alias. */
13788#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13789choke me
13790#else
cd958eb3
MB
13791char (*f) () = $ac_func;
13792#endif
13793#ifdef __cplusplus
13794}
087121cc
GM
13795#endif
13796
cd958eb3
MB
13797int
13798main ()
13799{
9e71690e 13800return f != $ac_func;
503d2be0
AS
13801 ;
13802 return 0;
13803}
13804_ACEOF
13805rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13806if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
13807 (eval $ac_link) 2>&5
13808 ac_status=$?
c0d27fcc 13809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13810 (exit $ac_status); } &&
13811 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13813 (eval $ac_try) 2>&5
13814 ac_status=$?
c0d27fcc 13815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13816 (exit $ac_status); }; }; then
13817 eval "$as_ac_var=yes"
13818else
13819 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13820sed 's/^/| /' conftest.$ac_ext >&5
13821
503d2be0
AS
13822eval "$as_ac_var=no"
13823fi
13824rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13825fi
c0d27fcc 13826echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
13827echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13828if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 13829 cat >>confdefs.h <<_ACEOF
503d2be0 13830#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 13831_ACEOF
087121cc 13832
087121cc
GM
13833fi
13834done
13835
c0d27fcc 13836
ba4481b5
DL
13837# Check this now, so that we will NOT find the above functions in ncurses.
13838# That is because we have not set up to link ncurses in lib-src.
13839# It's better to believe a function is not available
13840# than to expect to find it in ncurses.
503d2be0 13841
c0d27fcc 13842echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
503d2be0
AS
13843echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6
13844if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
13845 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13846else
503d2be0 13847 ac_check_lib_save_LIBS=$LIBS
ba4481b5 13848LIBS="-lncurses $LIBS"
503d2be0 13849cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 13850#line $LINENO "configure"
cd958eb3
MB
13851/* confdefs.h. */
13852_ACEOF
13853cat confdefs.h >>conftest.$ac_ext
13854cat >>conftest.$ac_ext <<_ACEOF
13855/* end confdefs.h. */
503d2be0 13856
ba4481b5 13857/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13858#ifdef __cplusplus
13859extern "C"
13860#endif
ba4481b5 13861/* We use char because int might match the return type of a gcc2
503d2be0
AS
13862 builtin and then its argument prototype would still apply. */
13863char tparm ();
13864int
13865main ()
13866{
13867tparm ();
13868 ;
13869 return 0;
13870}
13871_ACEOF
13872rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13873if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
13874 (eval $ac_link) 2>&5
13875 ac_status=$?
c0d27fcc 13876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13877 (exit $ac_status); } &&
13878 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13880 (eval $ac_try) 2>&5
13881 ac_status=$?
c0d27fcc 13882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13883 (exit $ac_status); }; }; then
13884 ac_cv_lib_ncurses_tparm=yes
13885else
13886 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13887sed 's/^/| /' conftest.$ac_ext >&5
13888
503d2be0
AS
13889ac_cv_lib_ncurses_tparm=no
13890fi
13891rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13892LIBS=$ac_check_lib_save_LIBS
13893fi
c0d27fcc 13894echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
503d2be0
AS
13895echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6
13896if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 13897 cat >>confdefs.h <<_ACEOF
503d2be0 13898#define HAVE_LIBNCURSES 1
c0d27fcc 13899_ACEOF
ba4481b5
DL
13900
13901 LIBS="-lncurses $LIBS"
13902
ba4481b5
DL
13903fi
13904
c0d27fcc 13905
84e70f78
KR
13906# Do we need the Hesiod library to provide the support routines?
13907if test "$with_hesiod" = yes ; then
13908 # Don't set $LIBS here -- see comments above.
13909 resolv=no
c0d27fcc 13910 echo "$as_me:$LINENO: checking for res_send" >&5
84e70f78
KR
13911echo $ECHO_N "checking for res_send... $ECHO_C" >&6
13912if test "${ac_cv_func_res_send+set}" = set; then
13913 echo $ECHO_N "(cached) $ECHO_C" >&6
13914else
13915 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 13916#line $LINENO "configure"
cd958eb3
MB
13917/* confdefs.h. */
13918_ACEOF
13919cat confdefs.h >>conftest.$ac_ext
13920cat >>conftest.$ac_ext <<_ACEOF
13921/* end confdefs.h. */
84e70f78 13922/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
13923 which can conflict with char res_send (); below.
13924 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13925 <limits.h> exists even on freestanding compilers. */
13926#ifdef __STDC__
13927# include <limits.h>
13928#else
13929# include <assert.h>
13930#endif
84e70f78
KR
13931/* Override any gcc2 internal prototype to avoid an error. */
13932#ifdef __cplusplus
13933extern "C"
cd958eb3 13934{
84e70f78
KR
13935#endif
13936/* We use char because int might match the return type of a gcc2
13937 builtin and then its argument prototype would still apply. */
13938char res_send ();
84e70f78
KR
13939/* The GNU C library defines this for functions which it implements
13940 to always fail with ENOSYS. Some functions are actually named
13941 something starting with __ and the normal name is an alias. */
13942#if defined (__stub_res_send) || defined (__stub___res_send)
13943choke me
13944#else
cd958eb3 13945char (*f) () = res_send;
84e70f78 13946#endif
cd958eb3
MB
13947#ifdef __cplusplus
13948}
13949#endif
13950
13951int
13952main ()
13953{
9e71690e 13954return f != res_send;
84e70f78
KR
13955 ;
13956 return 0;
13957}
13958_ACEOF
13959rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13960if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
84e70f78
KR
13961 (eval $ac_link) 2>&5
13962 ac_status=$?
c0d27fcc 13963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
13964 (exit $ac_status); } &&
13965 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
13967 (eval $ac_try) 2>&5
13968 ac_status=$?
c0d27fcc 13969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
13970 (exit $ac_status); }; }; then
13971 ac_cv_func_res_send=yes
13972else
13973 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13974sed 's/^/| /' conftest.$ac_ext >&5
13975
84e70f78
KR
13976ac_cv_func_res_send=no
13977fi
13978rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13979fi
c0d27fcc 13980echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
84e70f78
KR
13981echo "${ECHO_T}$ac_cv_func_res_send" >&6
13982if test $ac_cv_func_res_send = yes; then
13983 :
13984else
c0d27fcc 13985 echo "$as_me:$LINENO: checking for __res_send" >&5
84e70f78
KR
13986echo $ECHO_N "checking for __res_send... $ECHO_C" >&6
13987if test "${ac_cv_func___res_send+set}" = set; then
13988 echo $ECHO_N "(cached) $ECHO_C" >&6
13989else
13990 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 13991#line $LINENO "configure"
cd958eb3
MB
13992/* confdefs.h. */
13993_ACEOF
13994cat confdefs.h >>conftest.$ac_ext
13995cat >>conftest.$ac_ext <<_ACEOF
13996/* end confdefs.h. */
84e70f78 13997/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
13998 which can conflict with char __res_send (); below.
13999 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14000 <limits.h> exists even on freestanding compilers. */
14001#ifdef __STDC__
14002# include <limits.h>
14003#else
14004# include <assert.h>
14005#endif
84e70f78
KR
14006/* Override any gcc2 internal prototype to avoid an error. */
14007#ifdef __cplusplus
14008extern "C"
cd958eb3 14009{
84e70f78
KR
14010#endif
14011/* We use char because int might match the return type of a gcc2
14012 builtin and then its argument prototype would still apply. */
14013char __res_send ();
84e70f78
KR
14014/* The GNU C library defines this for functions which it implements
14015 to always fail with ENOSYS. Some functions are actually named
14016 something starting with __ and the normal name is an alias. */
14017#if defined (__stub___res_send) || defined (__stub_____res_send)
14018choke me
14019#else
cd958eb3
MB
14020char (*f) () = __res_send;
14021#endif
14022#ifdef __cplusplus
14023}
84e70f78
KR
14024#endif
14025
cd958eb3
MB
14026int
14027main ()
14028{
9e71690e 14029return f != __res_send;
84e70f78
KR
14030 ;
14031 return 0;
14032}
14033_ACEOF
14034rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14035if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
84e70f78
KR
14036 (eval $ac_link) 2>&5
14037 ac_status=$?
c0d27fcc 14038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14039 (exit $ac_status); } &&
14040 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
14042 (eval $ac_try) 2>&5
14043 ac_status=$?
c0d27fcc 14044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14045 (exit $ac_status); }; }; then
14046 ac_cv_func___res_send=yes
14047else
14048 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14049sed 's/^/| /' conftest.$ac_ext >&5
14050
84e70f78
KR
14051ac_cv_func___res_send=no
14052fi
14053rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14054fi
c0d27fcc 14055echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
84e70f78
KR
14056echo "${ECHO_T}$ac_cv_func___res_send" >&6
14057if test $ac_cv_func___res_send = yes; then
14058 :
14059else
c0d27fcc 14060 echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
84e70f78
KR
14061echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6
14062if test "${ac_cv_lib_resolv_res_send+set}" = set; then
14063 echo $ECHO_N "(cached) $ECHO_C" >&6
14064else
14065 ac_check_lib_save_LIBS=$LIBS
14066LIBS="-lresolv $LIBS"
14067cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14068#line $LINENO "configure"
cd958eb3
MB
14069/* confdefs.h. */
14070_ACEOF
14071cat confdefs.h >>conftest.$ac_ext
14072cat >>conftest.$ac_ext <<_ACEOF
14073/* end confdefs.h. */
84e70f78
KR
14074
14075/* Override any gcc2 internal prototype to avoid an error. */
14076#ifdef __cplusplus
14077extern "C"
14078#endif
14079/* We use char because int might match the return type of a gcc2
14080 builtin and then its argument prototype would still apply. */
14081char res_send ();
14082int
14083main ()
14084{
14085res_send ();
14086 ;
14087 return 0;
14088}
14089_ACEOF
14090rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14091if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
84e70f78
KR
14092 (eval $ac_link) 2>&5
14093 ac_status=$?
c0d27fcc 14094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14095 (exit $ac_status); } &&
14096 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
14098 (eval $ac_try) 2>&5
14099 ac_status=$?
c0d27fcc 14100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14101 (exit $ac_status); }; }; then
14102 ac_cv_lib_resolv_res_send=yes
14103else
14104 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14105sed 's/^/| /' conftest.$ac_ext >&5
14106
84e70f78
KR
14107ac_cv_lib_resolv_res_send=no
14108fi
14109rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14110LIBS=$ac_check_lib_save_LIBS
14111fi
c0d27fcc 14112echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
84e70f78
KR
14113echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6
14114if test $ac_cv_lib_resolv_res_send = yes; then
14115 resolv=yes
14116else
c0d27fcc 14117 echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
84e70f78
KR
14118echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6
14119if test "${ac_cv_lib_resolv___res_send+set}" = set; then
14120 echo $ECHO_N "(cached) $ECHO_C" >&6
14121else
14122 ac_check_lib_save_LIBS=$LIBS
14123LIBS="-lresolv $LIBS"
14124cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14125#line $LINENO "configure"
cd958eb3
MB
14126/* confdefs.h. */
14127_ACEOF
14128cat confdefs.h >>conftest.$ac_ext
14129cat >>conftest.$ac_ext <<_ACEOF
14130/* end confdefs.h. */
84e70f78
KR
14131
14132/* Override any gcc2 internal prototype to avoid an error. */
14133#ifdef __cplusplus
14134extern "C"
14135#endif
14136/* We use char because int might match the return type of a gcc2
14137 builtin and then its argument prototype would still apply. */
14138char __res_send ();
14139int
14140main ()
14141{
14142__res_send ();
14143 ;
14144 return 0;
14145}
14146_ACEOF
14147rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14148if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
84e70f78
KR
14149 (eval $ac_link) 2>&5
14150 ac_status=$?
c0d27fcc 14151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14152 (exit $ac_status); } &&
14153 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
14155 (eval $ac_try) 2>&5
14156 ac_status=$?
c0d27fcc 14157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14158 (exit $ac_status); }; }; then
14159 ac_cv_lib_resolv___res_send=yes
14160else
14161 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14162sed 's/^/| /' conftest.$ac_ext >&5
14163
84e70f78
KR
14164ac_cv_lib_resolv___res_send=no
14165fi
14166rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14167LIBS=$ac_check_lib_save_LIBS
14168fi
c0d27fcc 14169echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
84e70f78
KR
14170echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6
14171if test $ac_cv_lib_resolv___res_send = yes; then
14172 resolv=yes
14173fi
14174
14175fi
14176
14177fi
14178
14179fi
14180
14181 if test "$resolv" = yes ; then
14182 RESOLVLIB=-lresolv
b936fae4 14183
c0d27fcc 14184cat >>confdefs.h <<\_ACEOF
84e70f78 14185#define HAVE_LIBRESOLV 1
c0d27fcc 14186_ACEOF
84e70f78
KR
14187
14188 else
14189 RESOLVLIB=
14190 fi
c0d27fcc 14191 echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
84e70f78
KR
14192echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6
14193if test "${ac_cv_func_hes_getmailhost+set}" = set; then
14194 echo $ECHO_N "(cached) $ECHO_C" >&6
14195else
14196 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14197#line $LINENO "configure"
cd958eb3
MB
14198/* confdefs.h. */
14199_ACEOF
14200cat confdefs.h >>conftest.$ac_ext
14201cat >>conftest.$ac_ext <<_ACEOF
14202/* end confdefs.h. */
84e70f78 14203/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
14204 which can conflict with char hes_getmailhost (); below.
14205 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14206 <limits.h> exists even on freestanding compilers. */
14207#ifdef __STDC__
14208# include <limits.h>
14209#else
14210# include <assert.h>
14211#endif
84e70f78
KR
14212/* Override any gcc2 internal prototype to avoid an error. */
14213#ifdef __cplusplus
14214extern "C"
cd958eb3 14215{
84e70f78
KR
14216#endif
14217/* We use char because int might match the return type of a gcc2
14218 builtin and then its argument prototype would still apply. */
14219char hes_getmailhost ();
84e70f78
KR
14220/* The GNU C library defines this for functions which it implements
14221 to always fail with ENOSYS. Some functions are actually named
14222 something starting with __ and the normal name is an alias. */
14223#if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
14224choke me
14225#else
cd958eb3 14226char (*f) () = hes_getmailhost;
84e70f78 14227#endif
cd958eb3
MB
14228#ifdef __cplusplus
14229}
14230#endif
14231
14232int
14233main ()
14234{
9e71690e 14235return f != hes_getmailhost;
84e70f78
KR
14236 ;
14237 return 0;
14238}
14239_ACEOF
14240rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14241if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
84e70f78
KR
14242 (eval $ac_link) 2>&5
14243 ac_status=$?
c0d27fcc 14244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14245 (exit $ac_status); } &&
14246 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
14248 (eval $ac_try) 2>&5
14249 ac_status=$?
c0d27fcc 14250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14251 (exit $ac_status); }; }; then
14252 ac_cv_func_hes_getmailhost=yes
14253else
14254 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14255sed 's/^/| /' conftest.$ac_ext >&5
14256
84e70f78
KR
14257ac_cv_func_hes_getmailhost=no
14258fi
14259rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14260fi
c0d27fcc 14261echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
84e70f78
KR
14262echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6
14263if test $ac_cv_func_hes_getmailhost = yes; then
14264 :
14265else
c0d27fcc 14266 echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
84e70f78
KR
14267echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6
14268if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
14269 echo $ECHO_N "(cached) $ECHO_C" >&6
14270else
14271 ac_check_lib_save_LIBS=$LIBS
14272LIBS="-lhesiod $RESOLVLIB $LIBS"
14273cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14274#line $LINENO "configure"
cd958eb3
MB
14275/* confdefs.h. */
14276_ACEOF
14277cat confdefs.h >>conftest.$ac_ext
14278cat >>conftest.$ac_ext <<_ACEOF
14279/* end confdefs.h. */
84e70f78
KR
14280
14281/* Override any gcc2 internal prototype to avoid an error. */
14282#ifdef __cplusplus
14283extern "C"
14284#endif
14285/* We use char because int might match the return type of a gcc2
14286 builtin and then its argument prototype would still apply. */
14287char hes_getmailhost ();
14288int
14289main ()
14290{
14291hes_getmailhost ();
14292 ;
14293 return 0;
14294}
14295_ACEOF
14296rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14297if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
84e70f78
KR
14298 (eval $ac_link) 2>&5
14299 ac_status=$?
c0d27fcc 14300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14301 (exit $ac_status); } &&
14302 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
14304 (eval $ac_try) 2>&5
14305 ac_status=$?
c0d27fcc 14306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14307 (exit $ac_status); }; }; then
14308 ac_cv_lib_hesiod_hes_getmailhost=yes
14309else
14310 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14311sed 's/^/| /' conftest.$ac_ext >&5
14312
84e70f78
KR
14313ac_cv_lib_hesiod_hes_getmailhost=no
14314fi
14315rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14316LIBS=$ac_check_lib_save_LIBS
14317fi
c0d27fcc 14318echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
84e70f78
KR
14319echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6
14320if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 14321
c0d27fcc 14322cat >>confdefs.h <<\_ACEOF
84e70f78 14323#define HAVE_LIBHESIOD 1
c0d27fcc 14324_ACEOF
84e70f78
KR
14325
14326else
14327 :
14328fi
14329
14330fi
14331
14332fi
14333
a21616bd
KR
14334# These tell us which Kerberos-related libraries to use.
14335if test "${with_kerberos+set}" = set; then
503d2be0 14336
c0d27fcc 14337echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
503d2be0
AS
14338echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
14339if test "${ac_cv_lib_com_err_com_err+set}" = set; then
14340 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 14341else
503d2be0 14342 ac_check_lib_save_LIBS=$LIBS
a21616bd 14343LIBS="-lcom_err $LIBS"
503d2be0 14344cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14345#line $LINENO "configure"
cd958eb3
MB
14346/* confdefs.h. */
14347_ACEOF
14348cat confdefs.h >>conftest.$ac_ext
14349cat >>conftest.$ac_ext <<_ACEOF
14350/* end confdefs.h. */
503d2be0 14351
a21616bd 14352/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14353#ifdef __cplusplus
14354extern "C"
14355#endif
a21616bd 14356/* We use char because int might match the return type of a gcc2
503d2be0
AS
14357 builtin and then its argument prototype would still apply. */
14358char com_err ();
14359int
14360main ()
14361{
14362com_err ();
14363 ;
14364 return 0;
14365}
14366_ACEOF
14367rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14368if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14369 (eval $ac_link) 2>&5
14370 ac_status=$?
c0d27fcc 14371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14372 (exit $ac_status); } &&
14373 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14375 (eval $ac_try) 2>&5
14376 ac_status=$?
c0d27fcc 14377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14378 (exit $ac_status); }; }; then
14379 ac_cv_lib_com_err_com_err=yes
14380else
14381 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14382sed 's/^/| /' conftest.$ac_ext >&5
14383
503d2be0
AS
14384ac_cv_lib_com_err_com_err=no
14385fi
14386rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14387LIBS=$ac_check_lib_save_LIBS
14388fi
c0d27fcc 14389echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
503d2be0
AS
14390echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
14391if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 14392 cat >>confdefs.h <<_ACEOF
503d2be0 14393#define HAVE_LIBCOM_ERR 1
c0d27fcc 14394_ACEOF
a21616bd
KR
14395
14396 LIBS="-lcom_err $LIBS"
14397
a21616bd
KR
14398fi
14399
c0d27fcc
MR
14400
14401echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
503d2be0
AS
14402echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6
14403if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
14404 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 14405else
503d2be0 14406 ac_check_lib_save_LIBS=$LIBS
a21616bd 14407LIBS="-lk5crypto $LIBS"
503d2be0 14408cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14409#line $LINENO "configure"
cd958eb3
MB
14410/* confdefs.h. */
14411_ACEOF
14412cat confdefs.h >>conftest.$ac_ext
14413cat >>conftest.$ac_ext <<_ACEOF
14414/* end confdefs.h. */
503d2be0 14415
a21616bd 14416/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14417#ifdef __cplusplus
14418extern "C"
14419#endif
a21616bd 14420/* We use char because int might match the return type of a gcc2
503d2be0
AS
14421 builtin and then its argument prototype would still apply. */
14422char mit_des_cbc_encrypt ();
14423int
14424main ()
14425{
14426mit_des_cbc_encrypt ();
14427 ;
14428 return 0;
14429}
14430_ACEOF
14431rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14432if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14433 (eval $ac_link) 2>&5
14434 ac_status=$?
c0d27fcc 14435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14436 (exit $ac_status); } &&
14437 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14439 (eval $ac_try) 2>&5
14440 ac_status=$?
c0d27fcc 14441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14442 (exit $ac_status); }; }; then
14443 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
14444else
14445 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14446sed 's/^/| /' conftest.$ac_ext >&5
14447
503d2be0
AS
14448ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
14449fi
14450rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14451LIBS=$ac_check_lib_save_LIBS
14452fi
c0d27fcc 14453echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
14454echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6
14455if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 14456 cat >>confdefs.h <<_ACEOF
503d2be0 14457#define HAVE_LIBK5CRYPTO 1
c0d27fcc 14458_ACEOF
a21616bd
KR
14459
14460 LIBS="-lk5crypto $LIBS"
14461
a21616bd
KR
14462fi
14463
c0d27fcc
MR
14464
14465echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
503d2be0
AS
14466echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6
14467if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
14468 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 14469else
503d2be0 14470 ac_check_lib_save_LIBS=$LIBS
a21616bd 14471LIBS="-lcrypto $LIBS"
503d2be0 14472cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14473#line $LINENO "configure"
cd958eb3
MB
14474/* confdefs.h. */
14475_ACEOF
14476cat confdefs.h >>conftest.$ac_ext
14477cat >>conftest.$ac_ext <<_ACEOF
14478/* end confdefs.h. */
503d2be0 14479
a21616bd 14480/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14481#ifdef __cplusplus
14482extern "C"
14483#endif
a21616bd 14484/* We use char because int might match the return type of a gcc2
503d2be0
AS
14485 builtin and then its argument prototype would still apply. */
14486char mit_des_cbc_encrypt ();
14487int
14488main ()
14489{
14490mit_des_cbc_encrypt ();
14491 ;
14492 return 0;
14493}
14494_ACEOF
14495rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14496if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14497 (eval $ac_link) 2>&5
14498 ac_status=$?
c0d27fcc 14499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14500 (exit $ac_status); } &&
14501 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14503 (eval $ac_try) 2>&5
14504 ac_status=$?
c0d27fcc 14505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14506 (exit $ac_status); }; }; then
14507 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
14508else
14509 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14510sed 's/^/| /' conftest.$ac_ext >&5
14511
503d2be0
AS
14512ac_cv_lib_crypto_mit_des_cbc_encrypt=no
14513fi
14514rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14515LIBS=$ac_check_lib_save_LIBS
14516fi
c0d27fcc 14517echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
14518echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6
14519if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 14520 cat >>confdefs.h <<_ACEOF
503d2be0 14521#define HAVE_LIBCRYPTO 1
c0d27fcc 14522_ACEOF
a21616bd
KR
14523
14524 LIBS="-lcrypto $LIBS"
14525
a21616bd
KR
14526fi
14527
c0d27fcc
MR
14528
14529echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
503d2be0
AS
14530echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6
14531if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
14532 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 14533else
503d2be0 14534 ac_check_lib_save_LIBS=$LIBS
a21616bd 14535LIBS="-lkrb5 $LIBS"
503d2be0 14536cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14537#line $LINENO "configure"
cd958eb3
MB
14538/* confdefs.h. */
14539_ACEOF
14540cat confdefs.h >>conftest.$ac_ext
14541cat >>conftest.$ac_ext <<_ACEOF
14542/* end confdefs.h. */
a21616bd 14543
503d2be0
AS
14544/* Override any gcc2 internal prototype to avoid an error. */
14545#ifdef __cplusplus
14546extern "C"
14547#endif
14548/* We use char because int might match the return type of a gcc2
14549 builtin and then its argument prototype would still apply. */
14550char krb5_init_context ();
14551int
14552main ()
14553{
14554krb5_init_context ();
14555 ;
14556 return 0;
14557}
14558_ACEOF
14559rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14560if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14561 (eval $ac_link) 2>&5
14562 ac_status=$?
c0d27fcc 14563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14564 (exit $ac_status); } &&
14565 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14567 (eval $ac_try) 2>&5
14568 ac_status=$?
c0d27fcc 14569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14570 (exit $ac_status); }; }; then
14571 ac_cv_lib_krb5_krb5_init_context=yes
14572else
14573 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14574sed 's/^/| /' conftest.$ac_ext >&5
14575
503d2be0
AS
14576ac_cv_lib_krb5_krb5_init_context=no
14577fi
14578rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14579LIBS=$ac_check_lib_save_LIBS
14580fi
c0d27fcc 14581echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
503d2be0
AS
14582echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6
14583if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 14584 cat >>confdefs.h <<_ACEOF
503d2be0 14585#define HAVE_LIBKRB5 1
c0d27fcc 14586_ACEOF
a21616bd
KR
14587
14588 LIBS="-lkrb5 $LIBS"
14589
a21616bd
KR
14590fi
14591
14592 if test "${with_kerberos5+set}" != set; then
503d2be0 14593
c0d27fcc 14594echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
503d2be0
AS
14595echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
14596if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
14597 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 14598else
503d2be0 14599 ac_check_lib_save_LIBS=$LIBS
a21616bd 14600LIBS="-ldes425 $LIBS"
503d2be0 14601cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14602#line $LINENO "configure"
cd958eb3
MB
14603/* confdefs.h. */
14604_ACEOF
14605cat confdefs.h >>conftest.$ac_ext
14606cat >>conftest.$ac_ext <<_ACEOF
14607/* end confdefs.h. */
503d2be0 14608
a21616bd 14609/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14610#ifdef __cplusplus
14611extern "C"
14612#endif
a21616bd 14613/* We use char because int might match the return type of a gcc2
503d2be0
AS
14614 builtin and then its argument prototype would still apply. */
14615char des_cbc_encrypt ();
14616int
14617main ()
14618{
14619des_cbc_encrypt ();
14620 ;
14621 return 0;
14622}
14623_ACEOF
14624rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14625if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14626 (eval $ac_link) 2>&5
14627 ac_status=$?
c0d27fcc 14628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14629 (exit $ac_status); } &&
14630 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14632 (eval $ac_try) 2>&5
14633 ac_status=$?
c0d27fcc 14634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14635 (exit $ac_status); }; }; then
14636 ac_cv_lib_des425_des_cbc_encrypt=yes
14637else
14638 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14639sed 's/^/| /' conftest.$ac_ext >&5
14640
503d2be0
AS
14641ac_cv_lib_des425_des_cbc_encrypt=no
14642fi
14643rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14644LIBS=$ac_check_lib_save_LIBS
14645fi
c0d27fcc 14646echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
503d2be0
AS
14647echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
14648if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 14649 cat >>confdefs.h <<_ACEOF
503d2be0 14650#define HAVE_LIBDES425 1
c0d27fcc 14651_ACEOF
a21616bd
KR
14652
14653 LIBS="-ldes425 $LIBS"
14654
14655else
503d2be0 14656
c0d27fcc 14657echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
503d2be0
AS
14658echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
14659if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
14660 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 14661else
503d2be0 14662 ac_check_lib_save_LIBS=$LIBS
a21616bd 14663LIBS="-ldes $LIBS"
503d2be0 14664cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14665#line $LINENO "configure"
cd958eb3
MB
14666/* confdefs.h. */
14667_ACEOF
14668cat confdefs.h >>conftest.$ac_ext
14669cat >>conftest.$ac_ext <<_ACEOF
14670/* end confdefs.h. */
503d2be0 14671
a21616bd 14672/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14673#ifdef __cplusplus
14674extern "C"
14675#endif
a21616bd 14676/* We use char because int might match the return type of a gcc2
503d2be0
AS
14677 builtin and then its argument prototype would still apply. */
14678char des_cbc_encrypt ();
14679int
14680main ()
14681{
14682des_cbc_encrypt ();
14683 ;
14684 return 0;
14685}
14686_ACEOF
14687rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14688if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14689 (eval $ac_link) 2>&5
14690 ac_status=$?
c0d27fcc 14691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14692 (exit $ac_status); } &&
14693 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14695 (eval $ac_try) 2>&5
14696 ac_status=$?
c0d27fcc 14697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14698 (exit $ac_status); }; }; then
14699 ac_cv_lib_des_des_cbc_encrypt=yes
14700else
14701 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14702sed 's/^/| /' conftest.$ac_ext >&5
14703
503d2be0
AS
14704ac_cv_lib_des_des_cbc_encrypt=no
14705fi
14706rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14707LIBS=$ac_check_lib_save_LIBS
14708fi
c0d27fcc 14709echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
503d2be0
AS
14710echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
14711if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 14712 cat >>confdefs.h <<_ACEOF
503d2be0 14713#define HAVE_LIBDES 1
c0d27fcc 14714_ACEOF
a21616bd
KR
14715
14716 LIBS="-ldes $LIBS"
14717
a21616bd
KR
14718fi
14719
14720fi
14721
c0d27fcc
MR
14722
14723echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
503d2be0
AS
14724echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6
14725if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
14726 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 14727else
503d2be0 14728 ac_check_lib_save_LIBS=$LIBS
a21616bd 14729LIBS="-lkrb4 $LIBS"
503d2be0 14730cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14731#line $LINENO "configure"
cd958eb3
MB
14732/* confdefs.h. */
14733_ACEOF
14734cat confdefs.h >>conftest.$ac_ext
14735cat >>conftest.$ac_ext <<_ACEOF
14736/* end confdefs.h. */
503d2be0 14737
a21616bd 14738/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14739#ifdef __cplusplus
14740extern "C"
14741#endif
a21616bd 14742/* We use char because int might match the return type of a gcc2
503d2be0
AS
14743 builtin and then its argument prototype would still apply. */
14744char krb_get_cred ();
14745int
14746main ()
14747{
14748krb_get_cred ();
14749 ;
14750 return 0;
14751}
14752_ACEOF
14753rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14754if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14755 (eval $ac_link) 2>&5
14756 ac_status=$?
c0d27fcc 14757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14758 (exit $ac_status); } &&
14759 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14761 (eval $ac_try) 2>&5
14762 ac_status=$?
c0d27fcc 14763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14764 (exit $ac_status); }; }; then
14765 ac_cv_lib_krb4_krb_get_cred=yes
14766else
14767 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14768sed 's/^/| /' conftest.$ac_ext >&5
14769
503d2be0
AS
14770ac_cv_lib_krb4_krb_get_cred=no
14771fi
14772rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14773LIBS=$ac_check_lib_save_LIBS
14774fi
c0d27fcc 14775echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
503d2be0
AS
14776echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6
14777if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 14778 cat >>confdefs.h <<_ACEOF
503d2be0 14779#define HAVE_LIBKRB4 1
c0d27fcc 14780_ACEOF
a21616bd
KR
14781
14782 LIBS="-lkrb4 $LIBS"
14783
14784else
503d2be0 14785
c0d27fcc 14786echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
503d2be0
AS
14787echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6
14788if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
14789 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 14790else
503d2be0 14791 ac_check_lib_save_LIBS=$LIBS
a21616bd 14792LIBS="-lkrb $LIBS"
503d2be0 14793cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14794#line $LINENO "configure"
cd958eb3
MB
14795/* confdefs.h. */
14796_ACEOF
14797cat confdefs.h >>conftest.$ac_ext
14798cat >>conftest.$ac_ext <<_ACEOF
14799/* end confdefs.h. */
503d2be0 14800
a21616bd 14801/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14802#ifdef __cplusplus
14803extern "C"
14804#endif
a21616bd 14805/* We use char because int might match the return type of a gcc2
503d2be0
AS
14806 builtin and then its argument prototype would still apply. */
14807char krb_get_cred ();
14808int
14809main ()
14810{
14811krb_get_cred ();
14812 ;
14813 return 0;
14814}
14815_ACEOF
14816rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14817if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14818 (eval $ac_link) 2>&5
14819 ac_status=$?
c0d27fcc 14820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14821 (exit $ac_status); } &&
14822 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14824 (eval $ac_try) 2>&5
14825 ac_status=$?
c0d27fcc 14826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14827 (exit $ac_status); }; }; then
14828 ac_cv_lib_krb_krb_get_cred=yes
14829else
14830 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14831sed 's/^/| /' conftest.$ac_ext >&5
14832
503d2be0
AS
14833ac_cv_lib_krb_krb_get_cred=no
14834fi
14835rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14836LIBS=$ac_check_lib_save_LIBS
14837fi
c0d27fcc 14838echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
503d2be0
AS
14839echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6
14840if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 14841 cat >>confdefs.h <<_ACEOF
503d2be0 14842#define HAVE_LIBKRB 1
c0d27fcc 14843_ACEOF
a21616bd
KR
14844
14845 LIBS="-lkrb $LIBS"
14846
a21616bd
KR
14847fi
14848
14849fi
14850
14851 fi
14852
14853 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
14854
14855for ac_header in krb5.h
a21616bd 14856do
503d2be0 14857as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
14858if eval "test \"\${$as_ac_Header+set}\" = set"; then
14859 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
14860echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14861if eval "test \"\${$as_ac_Header+set}\" = set"; then
14862 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14863fi
14864echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14865echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 14866else
c0d27fcc
MR
14867 # Is the header compilable?
14868echo "$as_me:$LINENO: checking $ac_header usability" >&5
14869echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14870cat >conftest.$ac_ext <<_ACEOF
14871#line $LINENO "configure"
cd958eb3
MB
14872/* confdefs.h. */
14873_ACEOF
14874cat confdefs.h >>conftest.$ac_ext
14875cat >>conftest.$ac_ext <<_ACEOF
14876/* end confdefs.h. */
c0d27fcc
MR
14877$ac_includes_default
14878#include <$ac_header>
14879_ACEOF
14880rm -f conftest.$ac_objext
14881if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14882 (eval $ac_compile) 2>&5
14883 ac_status=$?
14884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14885 (exit $ac_status); } &&
14886 { ac_try='test -s conftest.$ac_objext'
14887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14888 (eval $ac_try) 2>&5
14889 ac_status=$?
14890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14891 (exit $ac_status); }; }; then
14892 ac_header_compiler=yes
14893else
14894 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14895sed 's/^/| /' conftest.$ac_ext >&5
14896
c0d27fcc
MR
14897ac_header_compiler=no
14898fi
14899rm -f conftest.$ac_objext conftest.$ac_ext
14900echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14901echo "${ECHO_T}$ac_header_compiler" >&6
14902
14903# Is the header present?
14904echo "$as_me:$LINENO: checking $ac_header presence" >&5
14905echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14906cat >conftest.$ac_ext <<_ACEOF
14907#line $LINENO "configure"
cd958eb3
MB
14908/* confdefs.h. */
14909_ACEOF
14910cat confdefs.h >>conftest.$ac_ext
14911cat >>conftest.$ac_ext <<_ACEOF
14912/* end confdefs.h. */
503d2be0
AS
14913#include <$ac_header>
14914_ACEOF
c0d27fcc 14915if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
14916 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14917 ac_status=$?
6bae0ccf 14918 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
14919 rm -f conftest.er1
14920 cat conftest.err >&5
c0d27fcc 14921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14922 (exit $ac_status); } >/dev/null; then
14923 if test -s conftest.err; then
14924 ac_cpp_err=$ac_c_preproc_warn_flag
14925 else
14926 ac_cpp_err=
14927 fi
14928else
14929 ac_cpp_err=yes
14930fi
14931if test -z "$ac_cpp_err"; then
c0d27fcc 14932 ac_header_preproc=yes
503d2be0
AS
14933else
14934 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14935sed 's/^/| /' conftest.$ac_ext >&5
14936
c0d27fcc 14937 ac_header_preproc=no
a21616bd 14938fi
503d2be0 14939rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14940echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14941echo "${ECHO_T}$ac_header_preproc" >&6
14942
14943# So? What about this header?
14944case $ac_header_compiler:$ac_header_preproc in
14945 yes:no )
14946 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14947echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14948 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
14949echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14950 (
14951 cat <<\_ASBOX
14952## ------------------------------------ ##
14953## Report this to bug-autoconf@gnu.org. ##
14954## ------------------------------------ ##
14955_ASBOX
14956 ) |
14957 sed "s/^/$as_me: WARNING: /" >&2
14958 ;;
c0d27fcc
MR
14959 no:yes )
14960 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14961echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14962 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14963echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14964 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
14965echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14966 (
14967 cat <<\_ASBOX
14968## ------------------------------------ ##
14969## Report this to bug-autoconf@gnu.org. ##
14970## ------------------------------------ ##
14971_ASBOX
14972 ) |
14973 sed "s/^/$as_me: WARNING: /" >&2
14974 ;;
c0d27fcc
MR
14975esac
14976echo "$as_me:$LINENO: checking for $ac_header" >&5
14977echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14978if eval "test \"\${$as_ac_Header+set}\" = set"; then
14979 echo $ECHO_N "(cached) $ECHO_C" >&6
14980else
14981 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 14982fi
c0d27fcc 14983echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 14984echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14985
14986fi
503d2be0 14987if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14988 cat >>confdefs.h <<_ACEOF
503d2be0 14989#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14990_ACEOF
503d2be0 14991
a21616bd 14992fi
c0d27fcc 14993
a21616bd
KR
14994done
14995
14996 else
503d2be0
AS
14997
14998for ac_header in des.h
a21616bd 14999do
503d2be0 15000as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
15001if eval "test \"\${$as_ac_Header+set}\" = set"; then
15002 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
15003echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15004if eval "test \"\${$as_ac_Header+set}\" = set"; then
15005 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15006fi
15007echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15008echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 15009else
c0d27fcc
MR
15010 # Is the header compilable?
15011echo "$as_me:$LINENO: checking $ac_header usability" >&5
15012echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15013cat >conftest.$ac_ext <<_ACEOF
15014#line $LINENO "configure"
cd958eb3
MB
15015/* confdefs.h. */
15016_ACEOF
15017cat confdefs.h >>conftest.$ac_ext
15018cat >>conftest.$ac_ext <<_ACEOF
15019/* end confdefs.h. */
c0d27fcc
MR
15020$ac_includes_default
15021#include <$ac_header>
15022_ACEOF
15023rm -f conftest.$ac_objext
15024if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15025 (eval $ac_compile) 2>&5
15026 ac_status=$?
15027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15028 (exit $ac_status); } &&
15029 { ac_try='test -s conftest.$ac_objext'
15030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15031 (eval $ac_try) 2>&5
15032 ac_status=$?
15033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15034 (exit $ac_status); }; }; then
15035 ac_header_compiler=yes
15036else
15037 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15038sed 's/^/| /' conftest.$ac_ext >&5
15039
c0d27fcc
MR
15040ac_header_compiler=no
15041fi
15042rm -f conftest.$ac_objext conftest.$ac_ext
15043echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15044echo "${ECHO_T}$ac_header_compiler" >&6
15045
15046# Is the header present?
15047echo "$as_me:$LINENO: checking $ac_header presence" >&5
15048echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15049cat >conftest.$ac_ext <<_ACEOF
15050#line $LINENO "configure"
cd958eb3
MB
15051/* confdefs.h. */
15052_ACEOF
15053cat confdefs.h >>conftest.$ac_ext
15054cat >>conftest.$ac_ext <<_ACEOF
15055/* end confdefs.h. */
503d2be0
AS
15056#include <$ac_header>
15057_ACEOF
c0d27fcc 15058if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15059 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15060 ac_status=$?
6bae0ccf 15061 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15062 rm -f conftest.er1
15063 cat conftest.err >&5
c0d27fcc 15064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15065 (exit $ac_status); } >/dev/null; then
15066 if test -s conftest.err; then
15067 ac_cpp_err=$ac_c_preproc_warn_flag
15068 else
15069 ac_cpp_err=
15070 fi
15071else
15072 ac_cpp_err=yes
15073fi
15074if test -z "$ac_cpp_err"; then
c0d27fcc 15075 ac_header_preproc=yes
503d2be0
AS
15076else
15077 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15078sed 's/^/| /' conftest.$ac_ext >&5
15079
c0d27fcc 15080 ac_header_preproc=no
a21616bd 15081fi
503d2be0 15082rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15083echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15084echo "${ECHO_T}$ac_header_preproc" >&6
15085
15086# So? What about this header?
15087case $ac_header_compiler:$ac_header_preproc in
15088 yes:no )
15089 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15090echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15091 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15092echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15093 (
15094 cat <<\_ASBOX
15095## ------------------------------------ ##
15096## Report this to bug-autoconf@gnu.org. ##
15097## ------------------------------------ ##
15098_ASBOX
15099 ) |
15100 sed "s/^/$as_me: WARNING: /" >&2
15101 ;;
c0d27fcc
MR
15102 no:yes )
15103 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15104echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15105 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15106echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15107 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15108echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15109 (
15110 cat <<\_ASBOX
15111## ------------------------------------ ##
15112## Report this to bug-autoconf@gnu.org. ##
15113## ------------------------------------ ##
15114_ASBOX
15115 ) |
15116 sed "s/^/$as_me: WARNING: /" >&2
15117 ;;
c0d27fcc
MR
15118esac
15119echo "$as_me:$LINENO: checking for $ac_header" >&5
15120echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15121if eval "test \"\${$as_ac_Header+set}\" = set"; then
15122 echo $ECHO_N "(cached) $ECHO_C" >&6
15123else
15124 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 15125fi
c0d27fcc 15126echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 15127echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
15128
15129fi
503d2be0 15130if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15131 cat >>confdefs.h <<_ACEOF
503d2be0 15132#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15133_ACEOF
503d2be0 15134
a21616bd 15135else
503d2be0
AS
15136
15137for ac_header in kerberosIV/des.h
a21616bd 15138do
503d2be0 15139as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
15140if eval "test \"\${$as_ac_Header+set}\" = set"; then
15141 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
15142echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15143if eval "test \"\${$as_ac_Header+set}\" = set"; then
15144 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15145fi
15146echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15147echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 15148else
c0d27fcc
MR
15149 # Is the header compilable?
15150echo "$as_me:$LINENO: checking $ac_header usability" >&5
15151echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15152cat >conftest.$ac_ext <<_ACEOF
15153#line $LINENO "configure"
cd958eb3
MB
15154/* confdefs.h. */
15155_ACEOF
15156cat confdefs.h >>conftest.$ac_ext
15157cat >>conftest.$ac_ext <<_ACEOF
15158/* end confdefs.h. */
c0d27fcc
MR
15159$ac_includes_default
15160#include <$ac_header>
15161_ACEOF
15162rm -f conftest.$ac_objext
15163if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15164 (eval $ac_compile) 2>&5
15165 ac_status=$?
15166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15167 (exit $ac_status); } &&
15168 { ac_try='test -s conftest.$ac_objext'
15169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15170 (eval $ac_try) 2>&5
15171 ac_status=$?
15172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15173 (exit $ac_status); }; }; then
15174 ac_header_compiler=yes
15175else
15176 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15177sed 's/^/| /' conftest.$ac_ext >&5
15178
c0d27fcc
MR
15179ac_header_compiler=no
15180fi
15181rm -f conftest.$ac_objext conftest.$ac_ext
15182echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15183echo "${ECHO_T}$ac_header_compiler" >&6
15184
15185# Is the header present?
15186echo "$as_me:$LINENO: checking $ac_header presence" >&5
15187echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15188cat >conftest.$ac_ext <<_ACEOF
15189#line $LINENO "configure"
cd958eb3
MB
15190/* confdefs.h. */
15191_ACEOF
15192cat confdefs.h >>conftest.$ac_ext
15193cat >>conftest.$ac_ext <<_ACEOF
15194/* end confdefs.h. */
503d2be0
AS
15195#include <$ac_header>
15196_ACEOF
c0d27fcc 15197if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15198 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15199 ac_status=$?
6bae0ccf 15200 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15201 rm -f conftest.er1
15202 cat conftest.err >&5
c0d27fcc 15203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15204 (exit $ac_status); } >/dev/null; then
15205 if test -s conftest.err; then
15206 ac_cpp_err=$ac_c_preproc_warn_flag
15207 else
15208 ac_cpp_err=
15209 fi
15210else
15211 ac_cpp_err=yes
15212fi
15213if test -z "$ac_cpp_err"; then
c0d27fcc 15214 ac_header_preproc=yes
503d2be0
AS
15215else
15216 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15217sed 's/^/| /' conftest.$ac_ext >&5
15218
c0d27fcc 15219 ac_header_preproc=no
a21616bd 15220fi
503d2be0 15221rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15222echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15223echo "${ECHO_T}$ac_header_preproc" >&6
15224
15225# So? What about this header?
15226case $ac_header_compiler:$ac_header_preproc in
15227 yes:no )
15228 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15229echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15230 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15231echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15232 (
15233 cat <<\_ASBOX
15234## ------------------------------------ ##
15235## Report this to bug-autoconf@gnu.org. ##
15236## ------------------------------------ ##
15237_ASBOX
15238 ) |
15239 sed "s/^/$as_me: WARNING: /" >&2
15240 ;;
c0d27fcc
MR
15241 no:yes )
15242 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15243echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15244 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15245echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15246 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15247echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15248 (
15249 cat <<\_ASBOX
15250## ------------------------------------ ##
15251## Report this to bug-autoconf@gnu.org. ##
15252## ------------------------------------ ##
15253_ASBOX
15254 ) |
15255 sed "s/^/$as_me: WARNING: /" >&2
15256 ;;
c0d27fcc
MR
15257esac
15258echo "$as_me:$LINENO: checking for $ac_header" >&5
15259echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15260if eval "test \"\${$as_ac_Header+set}\" = set"; then
15261 echo $ECHO_N "(cached) $ECHO_C" >&6
15262else
15263 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 15264fi
c0d27fcc 15265echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 15266echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
15267
15268fi
503d2be0 15269if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15270 cat >>confdefs.h <<_ACEOF
503d2be0 15271#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15272_ACEOF
503d2be0 15273
a21616bd 15274else
503d2be0
AS
15275
15276for ac_header in kerberos/des.h
a21616bd 15277do
503d2be0 15278as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
15279if eval "test \"\${$as_ac_Header+set}\" = set"; then
15280 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
15281echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15282if eval "test \"\${$as_ac_Header+set}\" = set"; then
15283 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15284fi
15285echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15286echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 15287else
c0d27fcc
MR
15288 # Is the header compilable?
15289echo "$as_me:$LINENO: checking $ac_header usability" >&5
15290echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15291cat >conftest.$ac_ext <<_ACEOF
15292#line $LINENO "configure"
cd958eb3
MB
15293/* confdefs.h. */
15294_ACEOF
15295cat confdefs.h >>conftest.$ac_ext
15296cat >>conftest.$ac_ext <<_ACEOF
15297/* end confdefs.h. */
c0d27fcc
MR
15298$ac_includes_default
15299#include <$ac_header>
15300_ACEOF
15301rm -f conftest.$ac_objext
15302if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15303 (eval $ac_compile) 2>&5
15304 ac_status=$?
15305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15306 (exit $ac_status); } &&
15307 { ac_try='test -s conftest.$ac_objext'
15308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15309 (eval $ac_try) 2>&5
15310 ac_status=$?
15311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15312 (exit $ac_status); }; }; then
15313 ac_header_compiler=yes
15314else
15315 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15316sed 's/^/| /' conftest.$ac_ext >&5
15317
c0d27fcc
MR
15318ac_header_compiler=no
15319fi
15320rm -f conftest.$ac_objext conftest.$ac_ext
15321echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15322echo "${ECHO_T}$ac_header_compiler" >&6
15323
15324# Is the header present?
15325echo "$as_me:$LINENO: checking $ac_header presence" >&5
15326echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15327cat >conftest.$ac_ext <<_ACEOF
15328#line $LINENO "configure"
cd958eb3
MB
15329/* confdefs.h. */
15330_ACEOF
15331cat confdefs.h >>conftest.$ac_ext
15332cat >>conftest.$ac_ext <<_ACEOF
15333/* end confdefs.h. */
503d2be0
AS
15334#include <$ac_header>
15335_ACEOF
c0d27fcc 15336if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15337 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15338 ac_status=$?
6bae0ccf 15339 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15340 rm -f conftest.er1
15341 cat conftest.err >&5
c0d27fcc 15342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15343 (exit $ac_status); } >/dev/null; then
15344 if test -s conftest.err; then
15345 ac_cpp_err=$ac_c_preproc_warn_flag
15346 else
15347 ac_cpp_err=
15348 fi
15349else
15350 ac_cpp_err=yes
15351fi
15352if test -z "$ac_cpp_err"; then
c0d27fcc 15353 ac_header_preproc=yes
503d2be0
AS
15354else
15355 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15356sed 's/^/| /' conftest.$ac_ext >&5
15357
c0d27fcc 15358 ac_header_preproc=no
a21616bd 15359fi
503d2be0 15360rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15361echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15362echo "${ECHO_T}$ac_header_preproc" >&6
15363
15364# So? What about this header?
15365case $ac_header_compiler:$ac_header_preproc in
15366 yes:no )
15367 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15368echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15369 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15370echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15371 (
15372 cat <<\_ASBOX
15373## ------------------------------------ ##
15374## Report this to bug-autoconf@gnu.org. ##
15375## ------------------------------------ ##
15376_ASBOX
15377 ) |
15378 sed "s/^/$as_me: WARNING: /" >&2
15379 ;;
c0d27fcc
MR
15380 no:yes )
15381 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15382echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15383 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15384echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15385 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15386echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15387 (
15388 cat <<\_ASBOX
15389## ------------------------------------ ##
15390## Report this to bug-autoconf@gnu.org. ##
15391## ------------------------------------ ##
15392_ASBOX
15393 ) |
15394 sed "s/^/$as_me: WARNING: /" >&2
15395 ;;
c0d27fcc
MR
15396esac
15397echo "$as_me:$LINENO: checking for $ac_header" >&5
15398echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15399if eval "test \"\${$as_ac_Header+set}\" = set"; then
15400 echo $ECHO_N "(cached) $ECHO_C" >&6
15401else
15402 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 15403fi
c0d27fcc 15404echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 15405echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
15406
15407fi
503d2be0 15408if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15409 cat >>confdefs.h <<_ACEOF
503d2be0 15410#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15411_ACEOF
a21616bd
KR
15412
15413fi
c0d27fcc 15414
a21616bd
KR
15415done
15416
98418dba 15417fi
c0d27fcc 15418
925c2f3f
EZ
15419done
15420
98418dba 15421fi
c0d27fcc 15422
925c2f3f 15423done
98418dba 15424
c0d27fcc 15425
925c2f3f
EZ
15426for ac_header in krb.h
15427do
15428as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
15429if eval "test \"\${$as_ac_Header+set}\" = set"; then
15430 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
15431echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15432if eval "test \"\${$as_ac_Header+set}\" = set"; then
15433 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15434fi
15435echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15436echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15437else
15438 # Is the header compilable?
15439echo "$as_me:$LINENO: checking $ac_header usability" >&5
15440echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15441cat >conftest.$ac_ext <<_ACEOF
15442#line $LINENO "configure"
cd958eb3
MB
15443/* confdefs.h. */
15444_ACEOF
15445cat confdefs.h >>conftest.$ac_ext
15446cat >>conftest.$ac_ext <<_ACEOF
15447/* end confdefs.h. */
c0d27fcc
MR
15448$ac_includes_default
15449#include <$ac_header>
15450_ACEOF
15451rm -f conftest.$ac_objext
15452if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15453 (eval $ac_compile) 2>&5
15454 ac_status=$?
15455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15456 (exit $ac_status); } &&
15457 { ac_try='test -s conftest.$ac_objext'
15458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15459 (eval $ac_try) 2>&5
15460 ac_status=$?
15461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15462 (exit $ac_status); }; }; then
15463 ac_header_compiler=yes
925c2f3f 15464else
c0d27fcc 15465 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15466sed 's/^/| /' conftest.$ac_ext >&5
15467
c0d27fcc
MR
15468ac_header_compiler=no
15469fi
15470rm -f conftest.$ac_objext conftest.$ac_ext
15471echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15472echo "${ECHO_T}$ac_header_compiler" >&6
15473
15474# Is the header present?
15475echo "$as_me:$LINENO: checking $ac_header presence" >&5
15476echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15477cat >conftest.$ac_ext <<_ACEOF
15478#line $LINENO "configure"
cd958eb3
MB
15479/* confdefs.h. */
15480_ACEOF
15481cat confdefs.h >>conftest.$ac_ext
15482cat >>conftest.$ac_ext <<_ACEOF
15483/* end confdefs.h. */
503d2be0
AS
15484#include <$ac_header>
15485_ACEOF
c0d27fcc 15486if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15487 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15488 ac_status=$?
6bae0ccf 15489 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15490 rm -f conftest.er1
15491 cat conftest.err >&5
c0d27fcc 15492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15493 (exit $ac_status); } >/dev/null; then
15494 if test -s conftest.err; then
15495 ac_cpp_err=$ac_c_preproc_warn_flag
15496 else
15497 ac_cpp_err=
15498 fi
15499else
15500 ac_cpp_err=yes
15501fi
15502if test -z "$ac_cpp_err"; then
c0d27fcc 15503 ac_header_preproc=yes
503d2be0
AS
15504else
15505 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15506sed 's/^/| /' conftest.$ac_ext >&5
15507
c0d27fcc 15508 ac_header_preproc=no
a21616bd 15509fi
503d2be0 15510rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15511echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15512echo "${ECHO_T}$ac_header_preproc" >&6
15513
15514# So? What about this header?
15515case $ac_header_compiler:$ac_header_preproc in
15516 yes:no )
15517 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15518echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15519 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15520echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15521 (
15522 cat <<\_ASBOX
15523## ------------------------------------ ##
15524## Report this to bug-autoconf@gnu.org. ##
15525## ------------------------------------ ##
15526_ASBOX
15527 ) |
15528 sed "s/^/$as_me: WARNING: /" >&2
15529 ;;
c0d27fcc
MR
15530 no:yes )
15531 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15532echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15533 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15534echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15535 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15536echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15537 (
15538 cat <<\_ASBOX
15539## ------------------------------------ ##
15540## Report this to bug-autoconf@gnu.org. ##
15541## ------------------------------------ ##
15542_ASBOX
15543 ) |
15544 sed "s/^/$as_me: WARNING: /" >&2
15545 ;;
c0d27fcc
MR
15546esac
15547echo "$as_me:$LINENO: checking for $ac_header" >&5
15548echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15549if eval "test \"\${$as_ac_Header+set}\" = set"; then
15550 echo $ECHO_N "(cached) $ECHO_C" >&6
15551else
15552 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 15553fi
c0d27fcc 15554echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 15555echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
15556
15557fi
503d2be0 15558if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15559 cat >>confdefs.h <<_ACEOF
503d2be0 15560#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15561_ACEOF
503d2be0 15562
a21616bd 15563else
503d2be0
AS
15564
15565for ac_header in kerberosIV/krb.h
a21616bd 15566do
503d2be0 15567as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
15568if eval "test \"\${$as_ac_Header+set}\" = set"; then
15569 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
15570echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15571if eval "test \"\${$as_ac_Header+set}\" = set"; then
15572 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15573fi
15574echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15575echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 15576else
c0d27fcc
MR
15577 # Is the header compilable?
15578echo "$as_me:$LINENO: checking $ac_header usability" >&5
15579echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15580cat >conftest.$ac_ext <<_ACEOF
15581#line $LINENO "configure"
cd958eb3
MB
15582/* confdefs.h. */
15583_ACEOF
15584cat confdefs.h >>conftest.$ac_ext
15585cat >>conftest.$ac_ext <<_ACEOF
15586/* end confdefs.h. */
c0d27fcc
MR
15587$ac_includes_default
15588#include <$ac_header>
15589_ACEOF
15590rm -f conftest.$ac_objext
15591if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15592 (eval $ac_compile) 2>&5
15593 ac_status=$?
15594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15595 (exit $ac_status); } &&
15596 { ac_try='test -s conftest.$ac_objext'
15597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15598 (eval $ac_try) 2>&5
15599 ac_status=$?
15600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15601 (exit $ac_status); }; }; then
15602 ac_header_compiler=yes
15603else
15604 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15605sed 's/^/| /' conftest.$ac_ext >&5
15606
c0d27fcc
MR
15607ac_header_compiler=no
15608fi
15609rm -f conftest.$ac_objext conftest.$ac_ext
15610echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15611echo "${ECHO_T}$ac_header_compiler" >&6
15612
15613# Is the header present?
15614echo "$as_me:$LINENO: checking $ac_header presence" >&5
15615echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15616cat >conftest.$ac_ext <<_ACEOF
15617#line $LINENO "configure"
cd958eb3
MB
15618/* confdefs.h. */
15619_ACEOF
15620cat confdefs.h >>conftest.$ac_ext
15621cat >>conftest.$ac_ext <<_ACEOF
15622/* end confdefs.h. */
503d2be0
AS
15623#include <$ac_header>
15624_ACEOF
c0d27fcc 15625if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15626 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15627 ac_status=$?
6bae0ccf 15628 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15629 rm -f conftest.er1
15630 cat conftest.err >&5
c0d27fcc 15631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15632 (exit $ac_status); } >/dev/null; then
15633 if test -s conftest.err; then
15634 ac_cpp_err=$ac_c_preproc_warn_flag
15635 else
15636 ac_cpp_err=
15637 fi
15638else
15639 ac_cpp_err=yes
15640fi
15641if test -z "$ac_cpp_err"; then
c0d27fcc 15642 ac_header_preproc=yes
503d2be0
AS
15643else
15644 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15645sed 's/^/| /' conftest.$ac_ext >&5
15646
c0d27fcc 15647 ac_header_preproc=no
a21616bd 15648fi
503d2be0 15649rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15650echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15651echo "${ECHO_T}$ac_header_preproc" >&6
15652
15653# So? What about this header?
15654case $ac_header_compiler:$ac_header_preproc in
15655 yes:no )
15656 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15657echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15658 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15659echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15660 (
15661 cat <<\_ASBOX
15662## ------------------------------------ ##
15663## Report this to bug-autoconf@gnu.org. ##
15664## ------------------------------------ ##
15665_ASBOX
15666 ) |
15667 sed "s/^/$as_me: WARNING: /" >&2
15668 ;;
c0d27fcc
MR
15669 no:yes )
15670 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15671echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15672 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15673echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15674 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15675echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15676 (
15677 cat <<\_ASBOX
15678## ------------------------------------ ##
15679## Report this to bug-autoconf@gnu.org. ##
15680## ------------------------------------ ##
15681_ASBOX
15682 ) |
15683 sed "s/^/$as_me: WARNING: /" >&2
15684 ;;
c0d27fcc
MR
15685esac
15686echo "$as_me:$LINENO: checking for $ac_header" >&5
15687echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15688if eval "test \"\${$as_ac_Header+set}\" = set"; then
15689 echo $ECHO_N "(cached) $ECHO_C" >&6
15690else
15691 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 15692fi
c0d27fcc 15693echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 15694echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
15695
15696fi
503d2be0 15697if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15698 cat >>confdefs.h <<_ACEOF
503d2be0 15699#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15700_ACEOF
503d2be0 15701
a21616bd 15702else
503d2be0
AS
15703
15704for ac_header in kerberos/krb.h
a21616bd 15705do
503d2be0 15706as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
15707if eval "test \"\${$as_ac_Header+set}\" = set"; then
15708 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
15709echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15710if eval "test \"\${$as_ac_Header+set}\" = set"; then
15711 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15712fi
15713echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15714echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 15715else
c0d27fcc
MR
15716 # Is the header compilable?
15717echo "$as_me:$LINENO: checking $ac_header usability" >&5
15718echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15719cat >conftest.$ac_ext <<_ACEOF
15720#line $LINENO "configure"
cd958eb3
MB
15721/* confdefs.h. */
15722_ACEOF
15723cat confdefs.h >>conftest.$ac_ext
15724cat >>conftest.$ac_ext <<_ACEOF
15725/* end confdefs.h. */
c0d27fcc
MR
15726$ac_includes_default
15727#include <$ac_header>
15728_ACEOF
15729rm -f conftest.$ac_objext
15730if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15731 (eval $ac_compile) 2>&5
15732 ac_status=$?
15733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15734 (exit $ac_status); } &&
15735 { ac_try='test -s conftest.$ac_objext'
15736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15737 (eval $ac_try) 2>&5
15738 ac_status=$?
15739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15740 (exit $ac_status); }; }; then
15741 ac_header_compiler=yes
15742else
15743 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15744sed 's/^/| /' conftest.$ac_ext >&5
15745
c0d27fcc
MR
15746ac_header_compiler=no
15747fi
15748rm -f conftest.$ac_objext conftest.$ac_ext
15749echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15750echo "${ECHO_T}$ac_header_compiler" >&6
15751
15752# Is the header present?
15753echo "$as_me:$LINENO: checking $ac_header presence" >&5
15754echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15755cat >conftest.$ac_ext <<_ACEOF
15756#line $LINENO "configure"
cd958eb3
MB
15757/* confdefs.h. */
15758_ACEOF
15759cat confdefs.h >>conftest.$ac_ext
15760cat >>conftest.$ac_ext <<_ACEOF
15761/* end confdefs.h. */
503d2be0
AS
15762#include <$ac_header>
15763_ACEOF
c0d27fcc 15764if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15765 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15766 ac_status=$?
6bae0ccf 15767 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15768 rm -f conftest.er1
15769 cat conftest.err >&5
c0d27fcc 15770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15771 (exit $ac_status); } >/dev/null; then
15772 if test -s conftest.err; then
15773 ac_cpp_err=$ac_c_preproc_warn_flag
15774 else
15775 ac_cpp_err=
15776 fi
15777else
15778 ac_cpp_err=yes
15779fi
15780if test -z "$ac_cpp_err"; then
c0d27fcc 15781 ac_header_preproc=yes
503d2be0
AS
15782else
15783 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15784sed 's/^/| /' conftest.$ac_ext >&5
15785
c0d27fcc 15786 ac_header_preproc=no
a21616bd 15787fi
503d2be0 15788rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15789echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15790echo "${ECHO_T}$ac_header_preproc" >&6
15791
15792# So? What about this header?
15793case $ac_header_compiler:$ac_header_preproc in
15794 yes:no )
15795 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15796echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15797 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15798echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15799 (
15800 cat <<\_ASBOX
15801## ------------------------------------ ##
15802## Report this to bug-autoconf@gnu.org. ##
15803## ------------------------------------ ##
15804_ASBOX
15805 ) |
15806 sed "s/^/$as_me: WARNING: /" >&2
15807 ;;
c0d27fcc
MR
15808 no:yes )
15809 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15810echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15811 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15812echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15813 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15814echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15815 (
15816 cat <<\_ASBOX
15817## ------------------------------------ ##
15818## Report this to bug-autoconf@gnu.org. ##
15819## ------------------------------------ ##
15820_ASBOX
15821 ) |
15822 sed "s/^/$as_me: WARNING: /" >&2
15823 ;;
c0d27fcc
MR
15824esac
15825echo "$as_me:$LINENO: checking for $ac_header" >&5
15826echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15827if eval "test \"\${$as_ac_Header+set}\" = set"; then
15828 echo $ECHO_N "(cached) $ECHO_C" >&6
15829else
15830 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 15831fi
c0d27fcc 15832echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 15833echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
15834
15835fi
503d2be0 15836if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15837 cat >>confdefs.h <<_ACEOF
503d2be0 15838#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15839_ACEOF
503d2be0 15840
a21616bd 15841fi
c0d27fcc 15842
a21616bd
KR
15843done
15844
15845fi
c0d27fcc 15846
a21616bd
KR
15847done
15848
15849fi
c0d27fcc 15850
a21616bd
KR
15851done
15852
15853 fi
503d2be0
AS
15854
15855for ac_header in com_err.h
a21616bd 15856do
503d2be0 15857as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
15858if eval "test \"\${$as_ac_Header+set}\" = set"; then
15859 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
15860echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15861if eval "test \"\${$as_ac_Header+set}\" = set"; then
15862 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15863fi
15864echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15865echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 15866else
c0d27fcc
MR
15867 # Is the header compilable?
15868echo "$as_me:$LINENO: checking $ac_header usability" >&5
15869echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15870cat >conftest.$ac_ext <<_ACEOF
15871#line $LINENO "configure"
cd958eb3
MB
15872/* confdefs.h. */
15873_ACEOF
15874cat confdefs.h >>conftest.$ac_ext
15875cat >>conftest.$ac_ext <<_ACEOF
15876/* end confdefs.h. */
c0d27fcc
MR
15877$ac_includes_default
15878#include <$ac_header>
15879_ACEOF
15880rm -f conftest.$ac_objext
15881if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15882 (eval $ac_compile) 2>&5
15883 ac_status=$?
15884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15885 (exit $ac_status); } &&
15886 { ac_try='test -s conftest.$ac_objext'
15887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15888 (eval $ac_try) 2>&5
15889 ac_status=$?
15890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15891 (exit $ac_status); }; }; then
15892 ac_header_compiler=yes
15893else
15894 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15895sed 's/^/| /' conftest.$ac_ext >&5
15896
c0d27fcc
MR
15897ac_header_compiler=no
15898fi
15899rm -f conftest.$ac_objext conftest.$ac_ext
15900echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15901echo "${ECHO_T}$ac_header_compiler" >&6
15902
15903# Is the header present?
15904echo "$as_me:$LINENO: checking $ac_header presence" >&5
15905echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15906cat >conftest.$ac_ext <<_ACEOF
15907#line $LINENO "configure"
cd958eb3
MB
15908/* confdefs.h. */
15909_ACEOF
15910cat confdefs.h >>conftest.$ac_ext
15911cat >>conftest.$ac_ext <<_ACEOF
15912/* end confdefs.h. */
503d2be0
AS
15913#include <$ac_header>
15914_ACEOF
c0d27fcc 15915if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15916 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15917 ac_status=$?
6bae0ccf 15918 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15919 rm -f conftest.er1
15920 cat conftest.err >&5
c0d27fcc 15921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15922 (exit $ac_status); } >/dev/null; then
15923 if test -s conftest.err; then
15924 ac_cpp_err=$ac_c_preproc_warn_flag
15925 else
15926 ac_cpp_err=
15927 fi
15928else
15929 ac_cpp_err=yes
15930fi
15931if test -z "$ac_cpp_err"; then
c0d27fcc 15932 ac_header_preproc=yes
503d2be0
AS
15933else
15934 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15935sed 's/^/| /' conftest.$ac_ext >&5
15936
c0d27fcc 15937 ac_header_preproc=no
a21616bd 15938fi
503d2be0 15939rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15940echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15941echo "${ECHO_T}$ac_header_preproc" >&6
15942
15943# So? What about this header?
15944case $ac_header_compiler:$ac_header_preproc in
15945 yes:no )
15946 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15947echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15948 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15949echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15950 (
15951 cat <<\_ASBOX
15952## ------------------------------------ ##
15953## Report this to bug-autoconf@gnu.org. ##
15954## ------------------------------------ ##
15955_ASBOX
15956 ) |
15957 sed "s/^/$as_me: WARNING: /" >&2
15958 ;;
c0d27fcc
MR
15959 no:yes )
15960 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15961echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15962 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15963echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15964 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15965echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15966 (
15967 cat <<\_ASBOX
15968## ------------------------------------ ##
15969## Report this to bug-autoconf@gnu.org. ##
15970## ------------------------------------ ##
15971_ASBOX
15972 ) |
15973 sed "s/^/$as_me: WARNING: /" >&2
15974 ;;
c0d27fcc
MR
15975esac
15976echo "$as_me:$LINENO: checking for $ac_header" >&5
15977echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15978if eval "test \"\${$as_ac_Header+set}\" = set"; then
15979 echo $ECHO_N "(cached) $ECHO_C" >&6
15980else
15981 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 15982fi
c0d27fcc 15983echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 15984echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
15985
15986fi
503d2be0 15987if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15988 cat >>confdefs.h <<_ACEOF
503d2be0 15989#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15990_ACEOF
503d2be0 15991
a21616bd 15992fi
c0d27fcc 15993
a21616bd
KR
15994done
15995
15996fi
15997
ba4481b5
DL
15998# Solaris requires -lintl if you want strerror (which calls dgettext)
15999# to return localized messages.
503d2be0 16000
c0d27fcc 16001echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
503d2be0
AS
16002echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
16003if test "${ac_cv_lib_intl_dgettext+set}" = set; then
16004 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16005else
503d2be0 16006 ac_check_lib_save_LIBS=$LIBS
ba4481b5 16007LIBS="-lintl $LIBS"
503d2be0 16008cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 16009#line $LINENO "configure"
cd958eb3
MB
16010/* confdefs.h. */
16011_ACEOF
16012cat confdefs.h >>conftest.$ac_ext
16013cat >>conftest.$ac_ext <<_ACEOF
16014/* end confdefs.h. */
503d2be0 16015
ba4481b5 16016/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
16017#ifdef __cplusplus
16018extern "C"
16019#endif
ba4481b5 16020/* We use char because int might match the return type of a gcc2
503d2be0
AS
16021 builtin and then its argument prototype would still apply. */
16022char dgettext ();
16023int
16024main ()
16025{
16026dgettext ();
16027 ;
16028 return 0;
16029}
16030_ACEOF
16031rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16032if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
16033 (eval $ac_link) 2>&5
16034 ac_status=$?
c0d27fcc 16035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16036 (exit $ac_status); } &&
16037 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16039 (eval $ac_try) 2>&5
16040 ac_status=$?
c0d27fcc 16041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16042 (exit $ac_status); }; }; then
16043 ac_cv_lib_intl_dgettext=yes
16044else
16045 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16046sed 's/^/| /' conftest.$ac_ext >&5
16047
503d2be0
AS
16048ac_cv_lib_intl_dgettext=no
16049fi
16050rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16051LIBS=$ac_check_lib_save_LIBS
16052fi
c0d27fcc 16053echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
503d2be0
AS
16054echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
16055if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 16056 cat >>confdefs.h <<_ACEOF
503d2be0 16057#define HAVE_LIBINTL 1
c0d27fcc 16058_ACEOF
ba4481b5
DL
16059
16060 LIBS="-lintl $LIBS"
16061
ba4481b5
DL
16062fi
16063
c0d27fcc
MR
16064
16065echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
503d2be0
AS
16066echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6
16067if test "${emacs_cv_localtime_cache+set}" = set; then
16068 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
16069else
16070 if test x$ac_cv_func_tzset = xyes; then
16071if test "$cross_compiling" = yes; then
16072 # If we have tzset, assume the worst when cross-compiling.
16073emacs_cv_localtime_cache=yes
16074else
503d2be0 16075 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 16076#line $LINENO "configure"
cd958eb3
MB
16077/* confdefs.h. */
16078_ACEOF
16079cat confdefs.h >>conftest.$ac_ext
16080cat >>conftest.$ac_ext <<_ACEOF
16081/* end confdefs.h. */
ba4481b5 16082#include <time.h>
ba4481b5
DL
16083extern char **environ;
16084unset_TZ ()
16085{
16086 char **from, **to;
16087 for (to = from = environ; (*to = *from); from++)
16088 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
16089 to++;
16090}
16091char TZ_GMT0[] = "TZ=GMT0";
16092char TZ_PST8[] = "TZ=PST8";
16093main()
16094{
16095 time_t now = time ((time_t *) 0);
16096 int hour_GMT0, hour_unset;
16097 if (putenv (TZ_GMT0) != 0)
16098 exit (1);
16099 hour_GMT0 = localtime (&now)->tm_hour;
16100 unset_TZ ();
16101 hour_unset = localtime (&now)->tm_hour;
16102 if (putenv (TZ_PST8) != 0)
16103 exit (1);
16104 if (localtime (&now)->tm_hour == hour_GMT0)
16105 exit (1);
16106 unset_TZ ();
16107 if (localtime (&now)->tm_hour != hour_unset)
16108 exit (1);
16109 exit (0);
16110}
503d2be0
AS
16111_ACEOF
16112rm -f conftest$ac_exeext
c0d27fcc 16113if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
16114 (eval $ac_link) 2>&5
16115 ac_status=$?
c0d27fcc 16116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16117 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 16118 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16119 (eval $ac_try) 2>&5
16120 ac_status=$?
c0d27fcc 16121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16122 (exit $ac_status); }; }; then
ba4481b5
DL
16123 emacs_cv_localtime_cache=no
16124else
503d2be0
AS
16125 echo "$as_me: program exited with status $ac_status" >&5
16126echo "$as_me: failed program was:" >&5
cd958eb3
MB
16127sed 's/^/| /' conftest.$ac_ext >&5
16128
c0d27fcc 16129( exit $ac_status )
503d2be0 16130emacs_cv_localtime_cache=yes
ba4481b5 16131fi
6bae0ccf 16132rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 16133fi
ba4481b5
DL
16134else
16135 # If we lack tzset, report that localtime does not cache TZ,
16136 # since we can't invalidate the cache if we don't have tzset.
16137 emacs_cv_localtime_cache=no
16138fi
16139fi
c0d27fcc 16140echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
503d2be0 16141echo "${ECHO_T}$emacs_cv_localtime_cache" >&6
ba4481b5 16142if test $emacs_cv_localtime_cache = yes; then
b936fae4 16143
c0d27fcc 16144cat >>confdefs.h <<\_ACEOF
ba4481b5 16145#define LOCALTIME_CACHE 1
c0d27fcc 16146_ACEOF
ba4481b5
DL
16147
16148fi
16149
16150if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
16151
16152for ac_func in gettimeofday
48d4b120 16153do
503d2be0 16154as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 16155echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
16156echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16157if eval "test \"\${$as_ac_var+set}\" = set"; then
16158 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 16159else
503d2be0 16160 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 16161#line $LINENO "configure"
cd958eb3
MB
16162/* confdefs.h. */
16163_ACEOF
16164cat confdefs.h >>conftest.$ac_ext
16165cat >>conftest.$ac_ext <<_ACEOF
16166/* end confdefs.h. */
48d4b120 16167/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
16168 which can conflict with char $ac_func (); below.
16169 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16170 <limits.h> exists even on freestanding compilers. */
16171#ifdef __STDC__
16172# include <limits.h>
16173#else
16174# include <assert.h>
16175#endif
48d4b120 16176/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
16177#ifdef __cplusplus
16178extern "C"
cd958eb3 16179{
503d2be0 16180#endif
48d4b120 16181/* We use char because int might match the return type of a gcc2
503d2be0
AS
16182 builtin and then its argument prototype would still apply. */
16183char $ac_func ();
48d4b120
DL
16184/* The GNU C library defines this for functions which it implements
16185 to always fail with ENOSYS. Some functions are actually named
16186 something starting with __ and the normal name is an alias. */
16187#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16188choke me
16189#else
cd958eb3 16190char (*f) () = $ac_func;
48d4b120 16191#endif
cd958eb3
MB
16192#ifdef __cplusplus
16193}
16194#endif
16195
16196int
16197main ()
16198{
9e71690e 16199return f != $ac_func;
503d2be0
AS
16200 ;
16201 return 0;
16202}
16203_ACEOF
16204rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16205if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
16206 (eval $ac_link) 2>&5
16207 ac_status=$?
c0d27fcc 16208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16209 (exit $ac_status); } &&
16210 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16212 (eval $ac_try) 2>&5
16213 ac_status=$?
c0d27fcc 16214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16215 (exit $ac_status); }; }; then
16216 eval "$as_ac_var=yes"
16217else
16218 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16219sed 's/^/| /' conftest.$ac_ext >&5
16220
503d2be0
AS
16221eval "$as_ac_var=no"
16222fi
16223rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16224fi
c0d27fcc 16225echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
16226echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16227if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16228 cat >>confdefs.h <<_ACEOF
503d2be0 16229#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16230_ACEOF
48d4b120 16231
48d4b120
DL
16232fi
16233done
16234
b936fae4 16235 if test $ac_cv_func_gettimeofday = yes; then
c0d27fcc 16236 echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
503d2be0
AS
16237echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6
16238if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
16239 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16240else
503d2be0 16241 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 16242#line $LINENO "configure"
cd958eb3
MB
16243/* confdefs.h. */
16244_ACEOF
16245cat confdefs.h >>conftest.$ac_ext
16246cat >>conftest.$ac_ext <<_ACEOF
16247/* end confdefs.h. */
ba4481b5 16248
a3f08d9e
DL
16249#ifdef TIME_WITH_SYS_TIME
16250#include <sys/time.h>
16251#include <time.h>
16252#else
16253#ifdef HAVE_SYS_TIME_H
16254#include <sys/time.h>
16255#else
16256#include <time.h>
16257#endif
16258#endif
503d2be0
AS
16259int
16260main ()
16261{
a3f08d9e 16262struct timeval time;
b936fae4 16263 gettimeofday (&time, 0);
503d2be0
AS
16264 ;
16265 return 0;
16266}
16267_ACEOF
16268rm -f conftest.$ac_objext
c0d27fcc 16269if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
16270 (eval $ac_compile) 2>&5
16271 ac_status=$?
c0d27fcc 16272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16273 (exit $ac_status); } &&
16274 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16276 (eval $ac_try) 2>&5
16277 ac_status=$?
c0d27fcc 16278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16279 (exit $ac_status); }; }; then
ba4481b5
DL
16280 emacs_cv_gettimeofday_two_arguments=yes
16281else
503d2be0 16282 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16283sed 's/^/| /' conftest.$ac_ext >&5
16284
503d2be0 16285emacs_cv_gettimeofday_two_arguments=no
ba4481b5 16286fi
503d2be0 16287rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 16288fi
c0d27fcc 16289echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
503d2be0 16290echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6
b936fae4
AS
16291 if test $emacs_cv_gettimeofday_two_arguments = no; then
16292
c0d27fcc 16293cat >>confdefs.h <<\_ACEOF
ba4481b5 16294#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 16295_ACEOF
ba4481b5 16296
b936fae4 16297 fi
ba4481b5
DL
16298 fi
16299fi
16300
48d4b120 16301if test "$ac_cv_func_gettimeofday" = yes; then
c0d27fcc 16302 echo "$as_me:$LINENO: checking for struct timezone" >&5
503d2be0
AS
16303echo $ECHO_N "checking for struct timezone... $ECHO_C" >&6
16304if test "${emacs_cv_struct_timezone+set}" = set; then
16305 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 16306else
503d2be0 16307 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 16308#line $LINENO "configure"
cd958eb3
MB
16309/* confdefs.h. */
16310_ACEOF
16311cat confdefs.h >>conftest.$ac_ext
16312cat >>conftest.$ac_ext <<_ACEOF
16313/* end confdefs.h. */
48d4b120 16314#include <sys/time.h>
503d2be0
AS
16315int
16316main ()
16317{
48d4b120 16318struct timezone tz;
503d2be0
AS
16319 ;
16320 return 0;
16321}
16322_ACEOF
16323rm -f conftest.$ac_objext
c0d27fcc 16324if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
16325 (eval $ac_compile) 2>&5
16326 ac_status=$?
c0d27fcc 16327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16328 (exit $ac_status); } &&
16329 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16331 (eval $ac_try) 2>&5
16332 ac_status=$?
c0d27fcc 16333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16334 (exit $ac_status); }; }; then
48d4b120
DL
16335 if test "$cross_compiling" = yes; then
16336 emacs_cv_struct_timezone=yes
16337else
503d2be0 16338 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 16339#line $LINENO "configure"
cd958eb3
MB
16340/* confdefs.h. */
16341_ACEOF
16342cat confdefs.h >>conftest.$ac_ext
16343cat >>conftest.$ac_ext <<_ACEOF
16344/* end confdefs.h. */
48d4b120
DL
16345
16346#ifdef TIME_WITH_SYS_TIME
16347#include <sys/time.h>
16348#include <time.h>
16349#else
16350#ifdef HAVE_SYS_TIME_H
16351#include <sys/time.h>
16352#else
16353#include <time.h>
16354#endif
16355#endif
16356main () {
16357 struct timeval time;
16358 struct timezone dummy;
16359 exit (gettimeofday (&time, &dummy));
16360}
503d2be0
AS
16361_ACEOF
16362rm -f conftest$ac_exeext
c0d27fcc 16363if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
16364 (eval $ac_link) 2>&5
16365 ac_status=$?
c0d27fcc 16366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16367 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 16368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16369 (eval $ac_try) 2>&5
16370 ac_status=$?
c0d27fcc 16371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16372 (exit $ac_status); }; }; then
48d4b120
DL
16373 emacs_cv_struct_timezone=yes
16374else
503d2be0
AS
16375 echo "$as_me: program exited with status $ac_status" >&5
16376echo "$as_me: failed program was:" >&5
cd958eb3
MB
16377sed 's/^/| /' conftest.$ac_ext >&5
16378
c0d27fcc 16379( exit $ac_status )
503d2be0 16380emacs_cv_struct_timezone=no
48d4b120 16381fi
6bae0ccf 16382rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
48d4b120 16383fi
48d4b120 16384else
503d2be0 16385 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16386sed 's/^/| /' conftest.$ac_ext >&5
16387
503d2be0 16388emacs_cv_struct_timezone=no
48d4b120 16389fi
503d2be0 16390rm -f conftest.$ac_objext conftest.$ac_ext
48d4b120 16391fi
c0d27fcc 16392echo "$as_me:$LINENO: result: $emacs_cv_struct_timezone" >&5
503d2be0 16393echo "${ECHO_T}$emacs_cv_struct_timezone" >&6
48d4b120
DL
16394fi
16395
ba4481b5 16396ok_so_far=yes
c0d27fcc 16397echo "$as_me:$LINENO: checking for socket" >&5
503d2be0
AS
16398echo $ECHO_N "checking for socket... $ECHO_C" >&6
16399if test "${ac_cv_func_socket+set}" = set; then
16400 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16401else
503d2be0 16402 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 16403#line $LINENO "configure"
cd958eb3
MB
16404/* confdefs.h. */
16405_ACEOF
16406cat confdefs.h >>conftest.$ac_ext
16407cat >>conftest.$ac_ext <<_ACEOF
16408/* end confdefs.h. */
ba4481b5 16409/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
16410 which can conflict with char socket (); below.
16411 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16412 <limits.h> exists even on freestanding compilers. */
16413#ifdef __STDC__
16414# include <limits.h>
16415#else
16416# include <assert.h>
16417#endif
ba4481b5 16418/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
16419#ifdef __cplusplus
16420extern "C"
cd958eb3 16421{
503d2be0 16422#endif
ba4481b5 16423/* We use char because int might match the return type of a gcc2
503d2be0
AS
16424 builtin and then its argument prototype would still apply. */
16425char socket ();
ba4481b5
DL
16426/* The GNU C library defines this for functions which it implements
16427 to always fail with ENOSYS. Some functions are actually named
16428 something starting with __ and the normal name is an alias. */
16429#if defined (__stub_socket) || defined (__stub___socket)
16430choke me
16431#else
cd958eb3 16432char (*f) () = socket;
ba4481b5 16433#endif
cd958eb3
MB
16434#ifdef __cplusplus
16435}
16436#endif
16437
16438int
16439main ()
16440{
9e71690e 16441return f != socket;
503d2be0
AS
16442 ;
16443 return 0;
16444}
16445_ACEOF
16446rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16447if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
16448 (eval $ac_link) 2>&5
16449 ac_status=$?
c0d27fcc 16450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16451 (exit $ac_status); } &&
16452 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16454 (eval $ac_try) 2>&5
16455 ac_status=$?
c0d27fcc 16456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16457 (exit $ac_status); }; }; then
16458 ac_cv_func_socket=yes
16459else
16460 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16461sed 's/^/| /' conftest.$ac_ext >&5
16462
503d2be0
AS
16463ac_cv_func_socket=no
16464fi
16465rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16466fi
c0d27fcc 16467echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
503d2be0
AS
16468echo "${ECHO_T}$ac_cv_func_socket" >&6
16469if test $ac_cv_func_socket = yes; then
ba4481b5
DL
16470 :
16471else
503d2be0 16472 ok_so_far=no
ba4481b5
DL
16473fi
16474
16475if test $ok_so_far = yes; then
c0d27fcc
MR
16476 if test "${ac_cv_header_netinet_in_h+set}" = set; then
16477 echo "$as_me:$LINENO: checking for netinet/in.h" >&5
503d2be0
AS
16478echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
16479if test "${ac_cv_header_netinet_in_h+set}" = set; then
16480 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16481fi
16482echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
16483echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
98418dba 16484else
c0d27fcc
MR
16485 # Is the header compilable?
16486echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
16487echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6
16488cat >conftest.$ac_ext <<_ACEOF
16489#line $LINENO "configure"
cd958eb3
MB
16490/* confdefs.h. */
16491_ACEOF
16492cat confdefs.h >>conftest.$ac_ext
16493cat >>conftest.$ac_ext <<_ACEOF
16494/* end confdefs.h. */
c0d27fcc
MR
16495$ac_includes_default
16496#include <netinet/in.h>
16497_ACEOF
16498rm -f conftest.$ac_objext
16499if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16500 (eval $ac_compile) 2>&5
16501 ac_status=$?
16502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16503 (exit $ac_status); } &&
16504 { ac_try='test -s conftest.$ac_objext'
16505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16506 (eval $ac_try) 2>&5
16507 ac_status=$?
16508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16509 (exit $ac_status); }; }; then
16510 ac_header_compiler=yes
16511else
16512 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16513sed 's/^/| /' conftest.$ac_ext >&5
16514
c0d27fcc
MR
16515ac_header_compiler=no
16516fi
16517rm -f conftest.$ac_objext conftest.$ac_ext
16518echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16519echo "${ECHO_T}$ac_header_compiler" >&6
16520
16521# Is the header present?
16522echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
16523echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6
16524cat >conftest.$ac_ext <<_ACEOF
16525#line $LINENO "configure"
cd958eb3
MB
16526/* confdefs.h. */
16527_ACEOF
16528cat confdefs.h >>conftest.$ac_ext
16529cat >>conftest.$ac_ext <<_ACEOF
16530/* end confdefs.h. */
ba4481b5 16531#include <netinet/in.h>
503d2be0 16532_ACEOF
c0d27fcc 16533if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16534 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16535 ac_status=$?
6bae0ccf 16536 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16537 rm -f conftest.er1
16538 cat conftest.err >&5
c0d27fcc 16539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16540 (exit $ac_status); } >/dev/null; then
16541 if test -s conftest.err; then
16542 ac_cpp_err=$ac_c_preproc_warn_flag
16543 else
16544 ac_cpp_err=
16545 fi
16546else
16547 ac_cpp_err=yes
16548fi
16549if test -z "$ac_cpp_err"; then
c0d27fcc 16550 ac_header_preproc=yes
ba4481b5 16551else
503d2be0 16552 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16553sed 's/^/| /' conftest.$ac_ext >&5
16554
c0d27fcc 16555 ac_header_preproc=no
ba4481b5 16556fi
503d2be0 16557rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16558echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16559echo "${ECHO_T}$ac_header_preproc" >&6
16560
16561# So? What about this header?
16562case $ac_header_compiler:$ac_header_preproc in
16563 yes:no )
16564 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
16565echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16566 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
16567echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
16568 (
16569 cat <<\_ASBOX
16570## ------------------------------------ ##
16571## Report this to bug-autoconf@gnu.org. ##
16572## ------------------------------------ ##
16573_ASBOX
16574 ) |
16575 sed "s/^/$as_me: WARNING: /" >&2
16576 ;;
c0d27fcc
MR
16577 no:yes )
16578 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
16579echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
16580 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
16581echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
16582 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
16583echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
16584 (
16585 cat <<\_ASBOX
16586## ------------------------------------ ##
16587## Report this to bug-autoconf@gnu.org. ##
16588## ------------------------------------ ##
16589_ASBOX
16590 ) |
16591 sed "s/^/$as_me: WARNING: /" >&2
16592 ;;
c0d27fcc
MR
16593esac
16594echo "$as_me:$LINENO: checking for netinet/in.h" >&5
16595echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
16596if test "${ac_cv_header_netinet_in_h+set}" = set; then
16597 echo $ECHO_N "(cached) $ECHO_C" >&6
16598else
16599 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 16600fi
c0d27fcc 16601echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
503d2be0 16602echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
c0d27fcc
MR
16603
16604fi
503d2be0 16605if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
16606 :
16607else
503d2be0 16608 ok_so_far=no
ba4481b5
DL
16609fi
16610
c0d27fcc 16611
ba4481b5
DL
16612fi
16613if test $ok_so_far = yes; then
c0d27fcc
MR
16614 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
16615 echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
503d2be0
AS
16616echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
16617if test "${ac_cv_header_arpa_inet_h+set}" = set; then
16618 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16619fi
16620echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
16621echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
98418dba 16622else
c0d27fcc
MR
16623 # Is the header compilable?
16624echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
16625echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6
16626cat >conftest.$ac_ext <<_ACEOF
16627#line $LINENO "configure"
cd958eb3
MB
16628/* confdefs.h. */
16629_ACEOF
16630cat confdefs.h >>conftest.$ac_ext
16631cat >>conftest.$ac_ext <<_ACEOF
16632/* end confdefs.h. */
c0d27fcc
MR
16633$ac_includes_default
16634#include <arpa/inet.h>
16635_ACEOF
16636rm -f conftest.$ac_objext
16637if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16638 (eval $ac_compile) 2>&5
16639 ac_status=$?
16640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16641 (exit $ac_status); } &&
16642 { ac_try='test -s conftest.$ac_objext'
16643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16644 (eval $ac_try) 2>&5
16645 ac_status=$?
16646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16647 (exit $ac_status); }; }; then
16648 ac_header_compiler=yes
16649else
16650 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16651sed 's/^/| /' conftest.$ac_ext >&5
16652
c0d27fcc
MR
16653ac_header_compiler=no
16654fi
16655rm -f conftest.$ac_objext conftest.$ac_ext
16656echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16657echo "${ECHO_T}$ac_header_compiler" >&6
16658
16659# Is the header present?
16660echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
16661echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6
16662cat >conftest.$ac_ext <<_ACEOF
16663#line $LINENO "configure"
cd958eb3
MB
16664/* confdefs.h. */
16665_ACEOF
16666cat confdefs.h >>conftest.$ac_ext
16667cat >>conftest.$ac_ext <<_ACEOF
16668/* end confdefs.h. */
ba4481b5 16669#include <arpa/inet.h>
503d2be0 16670_ACEOF
c0d27fcc 16671if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16672 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16673 ac_status=$?
6bae0ccf 16674 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16675 rm -f conftest.er1
16676 cat conftest.err >&5
c0d27fcc 16677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16678 (exit $ac_status); } >/dev/null; then
16679 if test -s conftest.err; then
16680 ac_cpp_err=$ac_c_preproc_warn_flag
16681 else
16682 ac_cpp_err=
16683 fi
16684else
16685 ac_cpp_err=yes
16686fi
16687if test -z "$ac_cpp_err"; then
c0d27fcc 16688 ac_header_preproc=yes
ba4481b5 16689else
503d2be0 16690 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16691sed 's/^/| /' conftest.$ac_ext >&5
16692
c0d27fcc 16693 ac_header_preproc=no
ba4481b5 16694fi
503d2be0 16695rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16696echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16697echo "${ECHO_T}$ac_header_preproc" >&6
16698
16699# So? What about this header?
16700case $ac_header_compiler:$ac_header_preproc in
16701 yes:no )
16702 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
16703echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16704 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
16705echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
16706 (
16707 cat <<\_ASBOX
16708## ------------------------------------ ##
16709## Report this to bug-autoconf@gnu.org. ##
16710## ------------------------------------ ##
16711_ASBOX
16712 ) |
16713 sed "s/^/$as_me: WARNING: /" >&2
16714 ;;
c0d27fcc
MR
16715 no:yes )
16716 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
16717echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
16718 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
16719echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
16720 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
16721echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
16722 (
16723 cat <<\_ASBOX
16724## ------------------------------------ ##
16725## Report this to bug-autoconf@gnu.org. ##
16726## ------------------------------------ ##
16727_ASBOX
16728 ) |
16729 sed "s/^/$as_me: WARNING: /" >&2
16730 ;;
c0d27fcc
MR
16731esac
16732echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
16733echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
16734if test "${ac_cv_header_arpa_inet_h+set}" = set; then
16735 echo $ECHO_N "(cached) $ECHO_C" >&6
16736else
16737 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 16738fi
c0d27fcc 16739echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
503d2be0 16740echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
c0d27fcc
MR
16741
16742fi
503d2be0 16743if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
16744 :
16745else
503d2be0 16746 ok_so_far=no
ba4481b5
DL
16747fi
16748
c0d27fcc 16749
ba4481b5
DL
16750fi
16751if test $ok_so_far = yes; then
b936fae4 16752
c0d27fcc 16753cat >>confdefs.h <<\_ACEOF
ba4481b5 16754#define HAVE_INET_SOCKETS 1
c0d27fcc 16755_ACEOF
ba4481b5
DL
16756
16757fi
16758
16759if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 16760
c0d27fcc 16761cat >>confdefs.h <<\_ACEOF
ba4481b5 16762#define HAVE_AIX_SMT_EXP 1
c0d27fcc 16763_ACEOF
ba4481b5
DL
16764
16765fi
16766
c0d27fcc 16767echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
503d2be0 16768echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6
3d9fec71 16769if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
c0d27fcc 16770 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 16771echo "${ECHO_T}yes" >&6
b936fae4 16772
c0d27fcc 16773cat >>confdefs.h <<\_ACEOF
3d9fec71 16774#define HAVE_DEV_PTMX 1
c0d27fcc 16775_ACEOF
3d9fec71
DL
16776
16777else
c0d27fcc 16778 echo "$as_me:$LINENO: result: no" >&5
503d2be0 16779echo "${ECHO_T}no" >&6
3d9fec71
DL
16780fi
16781
c0d27fcc 16782echo "$as_me:$LINENO: checking for pid_t" >&5
503d2be0
AS
16783echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
16784if test "${ac_cv_type_pid_t+set}" = set; then
16785 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 16786else
503d2be0 16787 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 16788#line $LINENO "configure"
cd958eb3
MB
16789/* confdefs.h. */
16790_ACEOF
16791cat confdefs.h >>conftest.$ac_ext
16792cat >>conftest.$ac_ext <<_ACEOF
16793/* end confdefs.h. */
503d2be0
AS
16794$ac_includes_default
16795int
16796main ()
16797{
16798if ((pid_t *) 0)
16799 return 0;
16800if (sizeof (pid_t))
16801 return 0;
16802 ;
16803 return 0;
16804}
16805_ACEOF
16806rm -f conftest.$ac_objext
c0d27fcc 16807if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
16808 (eval $ac_compile) 2>&5
16809 ac_status=$?
c0d27fcc 16810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16811 (exit $ac_status); } &&
16812 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16814 (eval $ac_try) 2>&5
16815 ac_status=$?
c0d27fcc 16816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16817 (exit $ac_status); }; }; then
647847ea
DL
16818 ac_cv_type_pid_t=yes
16819else
503d2be0 16820 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16821sed 's/^/| /' conftest.$ac_ext >&5
16822
503d2be0 16823ac_cv_type_pid_t=no
647847ea 16824fi
503d2be0 16825rm -f conftest.$ac_objext conftest.$ac_ext
647847ea 16826fi
c0d27fcc 16827echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
503d2be0
AS
16828echo "${ECHO_T}$ac_cv_type_pid_t" >&6
16829if test $ac_cv_type_pid_t = yes; then
16830 :
16831else
16832
c0d27fcc 16833cat >>confdefs.h <<_ACEOF
647847ea 16834#define pid_t int
c0d27fcc 16835_ACEOF
647847ea
DL
16836
16837fi
16838
c0d27fcc
MR
16839
16840
503d2be0
AS
16841for ac_header in unistd.h vfork.h
16842do
16843as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
16844if eval "test \"\${$as_ac_Header+set}\" = set"; then
16845 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
16846echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16847if eval "test \"\${$as_ac_Header+set}\" = set"; then
16848 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16849fi
16850echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16851echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 16852else
c0d27fcc
MR
16853 # Is the header compilable?
16854echo "$as_me:$LINENO: checking $ac_header usability" >&5
16855echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16856cat >conftest.$ac_ext <<_ACEOF
16857#line $LINENO "configure"
cd958eb3
MB
16858/* confdefs.h. */
16859_ACEOF
16860cat confdefs.h >>conftest.$ac_ext
16861cat >>conftest.$ac_ext <<_ACEOF
16862/* end confdefs.h. */
c0d27fcc
MR
16863$ac_includes_default
16864#include <$ac_header>
16865_ACEOF
16866rm -f conftest.$ac_objext
16867if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16868 (eval $ac_compile) 2>&5
16869 ac_status=$?
16870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16871 (exit $ac_status); } &&
16872 { ac_try='test -s conftest.$ac_objext'
16873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16874 (eval $ac_try) 2>&5
16875 ac_status=$?
16876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16877 (exit $ac_status); }; }; then
16878 ac_header_compiler=yes
16879else
16880 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16881sed 's/^/| /' conftest.$ac_ext >&5
16882
c0d27fcc
MR
16883ac_header_compiler=no
16884fi
16885rm -f conftest.$ac_objext conftest.$ac_ext
16886echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16887echo "${ECHO_T}$ac_header_compiler" >&6
16888
16889# Is the header present?
16890echo "$as_me:$LINENO: checking $ac_header presence" >&5
16891echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16892cat >conftest.$ac_ext <<_ACEOF
16893#line $LINENO "configure"
cd958eb3
MB
16894/* confdefs.h. */
16895_ACEOF
16896cat confdefs.h >>conftest.$ac_ext
16897cat >>conftest.$ac_ext <<_ACEOF
16898/* end confdefs.h. */
503d2be0
AS
16899#include <$ac_header>
16900_ACEOF
c0d27fcc 16901if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16902 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16903 ac_status=$?
6bae0ccf 16904 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16905 rm -f conftest.er1
16906 cat conftest.err >&5
c0d27fcc 16907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16908 (exit $ac_status); } >/dev/null; then
16909 if test -s conftest.err; then
16910 ac_cpp_err=$ac_c_preproc_warn_flag
16911 else
16912 ac_cpp_err=
16913 fi
647847ea 16914else
503d2be0
AS
16915 ac_cpp_err=yes
16916fi
16917if test -z "$ac_cpp_err"; then
c0d27fcc 16918 ac_header_preproc=yes
647847ea 16919else
503d2be0 16920 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16921sed 's/^/| /' conftest.$ac_ext >&5
16922
c0d27fcc 16923 ac_header_preproc=no
647847ea 16924fi
503d2be0 16925rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16926echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16927echo "${ECHO_T}$ac_header_preproc" >&6
16928
16929# So? What about this header?
16930case $ac_header_compiler:$ac_header_preproc in
16931 yes:no )
16932 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16933echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16934 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
16935echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16936 (
16937 cat <<\_ASBOX
16938## ------------------------------------ ##
16939## Report this to bug-autoconf@gnu.org. ##
16940## ------------------------------------ ##
16941_ASBOX
16942 ) |
16943 sed "s/^/$as_me: WARNING: /" >&2
16944 ;;
c0d27fcc
MR
16945 no:yes )
16946 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16947echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16948 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16949echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16950 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
16951echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16952 (
16953 cat <<\_ASBOX
16954## ------------------------------------ ##
16955## Report this to bug-autoconf@gnu.org. ##
16956## ------------------------------------ ##
16957_ASBOX
16958 ) |
16959 sed "s/^/$as_me: WARNING: /" >&2
16960 ;;
c0d27fcc
MR
16961esac
16962echo "$as_me:$LINENO: checking for $ac_header" >&5
16963echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16964if eval "test \"\${$as_ac_Header+set}\" = set"; then
16965 echo $ECHO_N "(cached) $ECHO_C" >&6
16966else
16967 eval "$as_ac_Header=$ac_header_preproc"
647847ea 16968fi
c0d27fcc 16969echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 16970echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
16971
16972fi
503d2be0 16973if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16974 cat >>confdefs.h <<_ACEOF
503d2be0 16975#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16976_ACEOF
647847ea 16977
73b77ee5 16978fi
c0d27fcc 16979
503d2be0 16980done
73b77ee5 16981
c0d27fcc
MR
16982
16983
503d2be0
AS
16984for ac_func in fork vfork
16985do
16986as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 16987echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
16988echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16989if eval "test \"\${$as_ac_var+set}\" = set"; then
16990 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 16991else
503d2be0 16992 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 16993#line $LINENO "configure"
cd958eb3
MB
16994/* confdefs.h. */
16995_ACEOF
16996cat confdefs.h >>conftest.$ac_ext
16997cat >>conftest.$ac_ext <<_ACEOF
16998/* end confdefs.h. */
fa0b693c 16999/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
17000 which can conflict with char $ac_func (); below.
17001 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17002 <limits.h> exists even on freestanding compilers. */
17003#ifdef __STDC__
17004# include <limits.h>
17005#else
17006# include <assert.h>
17007#endif
fa0b693c 17008/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17009#ifdef __cplusplus
17010extern "C"
cd958eb3 17011{
503d2be0 17012#endif
fa0b693c 17013/* We use char because int might match the return type of a gcc2
503d2be0
AS
17014 builtin and then its argument prototype would still apply. */
17015char $ac_func ();
fa0b693c
GM
17016/* The GNU C library defines this for functions which it implements
17017 to always fail with ENOSYS. Some functions are actually named
17018 something starting with __ and the normal name is an alias. */
503d2be0 17019#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
fa0b693c
GM
17020choke me
17021#else
cd958eb3
MB
17022char (*f) () = $ac_func;
17023#endif
17024#ifdef __cplusplus
17025}
fa0b693c
GM
17026#endif
17027
cd958eb3
MB
17028int
17029main ()
17030{
9e71690e 17031return f != $ac_func;
503d2be0
AS
17032 ;
17033 return 0;
17034}
17035_ACEOF
17036rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17037if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
17038 (eval $ac_link) 2>&5
17039 ac_status=$?
c0d27fcc 17040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17041 (exit $ac_status); } &&
17042 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17044 (eval $ac_try) 2>&5
17045 ac_status=$?
c0d27fcc 17046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17047 (exit $ac_status); }; }; then
17048 eval "$as_ac_var=yes"
17049else
17050 echo "$as_me: failed program was:" >&5
cd958eb3
MB
17051sed 's/^/| /' conftest.$ac_ext >&5
17052
503d2be0
AS
17053eval "$as_ac_var=no"
17054fi
17055rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17056fi
c0d27fcc 17057echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
17058echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17059if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17060 cat >>confdefs.h <<_ACEOF
503d2be0 17061#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17062_ACEOF
503d2be0 17063
fa0b693c 17064fi
503d2be0 17065done
fa0b693c 17066
503d2be0 17067if test "x$ac_cv_func_fork" = xyes; then
c0d27fcc 17068 echo "$as_me:$LINENO: checking for working fork" >&5
503d2be0
AS
17069echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17070if test "${ac_cv_func_fork_works+set}" = set; then
17071 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 17072else
503d2be0
AS
17073 if test "$cross_compiling" = yes; then
17074 ac_cv_func_fork_works=cross
17075else
17076 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 17077/* By Ruediger Kuhlmann. */
503d2be0
AS
17078 #include <sys/types.h>
17079 #if HAVE_UNISTD_H
17080 # include <unistd.h>
17081 #endif
17082 /* Some systems only have a dummy stub for fork() */
17083 int main ()
17084 {
17085 if (fork() < 0)
17086 exit (1);
17087 exit (0);
17088 }
17089_ACEOF
17090rm -f conftest$ac_exeext
c0d27fcc 17091if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
17092 (eval $ac_link) 2>&5
17093 ac_status=$?
c0d27fcc 17094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17095 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 17096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17097 (eval $ac_try) 2>&5
17098 ac_status=$?
c0d27fcc 17099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17100 (exit $ac_status); }; }; then
17101 ac_cv_func_fork_works=yes
17102else
17103 echo "$as_me: program exited with status $ac_status" >&5
17104echo "$as_me: failed program was:" >&5
cd958eb3
MB
17105sed 's/^/| /' conftest.$ac_ext >&5
17106
c0d27fcc 17107( exit $ac_status )
503d2be0
AS
17108ac_cv_func_fork_works=no
17109fi
6bae0ccf 17110rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
17111fi
17112fi
c0d27fcc 17113echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
503d2be0
AS
17114echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17115
6bae0ccf
DL
17116else
17117 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
17118fi
17119if test "x$ac_cv_func_fork_works" = xcross; then
17120 case $host in
17121 *-*-amigaos* | *-*-msdosdjgpp*)
17122 # Override, as these systems have only a dummy fork() stub
17123 ac_cv_func_fork_works=no
17124 ;;
17125 *)
17126 ac_cv_func_fork_works=yes
17127 ;;
17128 esac
c0d27fcc
MR
17129 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
17130echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 17131fi
73b77ee5 17132ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 17133if test "x$ac_cv_func_vfork" = xyes; then
c0d27fcc 17134 echo "$as_me:$LINENO: checking for working vfork" >&5
503d2be0
AS
17135echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17136if test "${ac_cv_func_vfork_works+set}" = set; then
17137 echo $ECHO_N "(cached) $ECHO_C" >&6
17138else
17139 if test "$cross_compiling" = yes; then
17140 ac_cv_func_vfork_works=cross
fa0b693c 17141else
503d2be0 17142 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 17143#line $LINENO "configure"
cd958eb3
MB
17144/* confdefs.h. */
17145_ACEOF
17146cat confdefs.h >>conftest.$ac_ext
17147cat >>conftest.$ac_ext <<_ACEOF
17148/* end confdefs.h. */
73b77ee5
GM
17149/* Thanks to Paul Eggert for this test. */
17150#include <stdio.h>
cd958eb3 17151#include <stdlib.h>
fa0b693c 17152#include <sys/types.h>
73b77ee5 17153#include <sys/stat.h>
cd958eb3 17154#include <sys/wait.h>
503d2be0
AS
17155#if HAVE_UNISTD_H
17156# include <unistd.h>
73b77ee5 17157#endif
503d2be0
AS
17158#if HAVE_VFORK_H
17159# include <vfork.h>
73b77ee5
GM
17160#endif
17161/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
17162 argument registers are propagated back to the parent. The compiler
17163 is told about this with #include <vfork.h>, but some compilers
17164 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
17165 static variable whose address is put into a register that is
17166 clobbered by the vfork. */
cd958eb3 17167static void
fa0b693c 17168#ifdef __cplusplus
73b77ee5 17169sparc_address_test (int arg)
503d2be0 17170# else
73b77ee5 17171sparc_address_test (arg) int arg;
fa0b693c 17172#endif
fa0b693c 17173{
73b77ee5
GM
17174 static pid_t child;
17175 if (!child) {
17176 child = vfork ();
17177 if (child < 0) {
17178 perror ("vfork");
17179 _exit(2);
17180 }
17181 if (!child) {
17182 arg = getpid();
17183 write(-1, "", 0);
17184 _exit (arg);
17185 }
17186 }
17187}
503d2be0
AS
17188
17189int
17190main ()
17191{
73b77ee5
GM
17192 pid_t parent = getpid ();
17193 pid_t child;
fa0b693c 17194
cd958eb3 17195 sparc_address_test (0);
fa0b693c 17196
73b77ee5 17197 child = vfork ();
fa0b693c 17198
73b77ee5 17199 if (child == 0) {
503d2be0
AS
17200 /* Here is another test for sparc vfork register problems. This
17201 test uses lots of local variables, at least as many local
17202 variables as main has allocated so far including compiler
17203 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
17204 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
17205 reuse the register of parent for one of the local variables,
17206 since it will think that parent can't possibly be used any more
17207 in this routine. Assigning to the local variable will thus
17208 munge parent in the parent process. */
73b77ee5
GM
17209 pid_t
17210 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17211 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17212 /* Convince the compiler that p..p7 are live; otherwise, it might
17213 use the same hardware register for all 8 local variables. */
17214 if (p != p1 || p != p2 || p != p3 || p != p4
17215 || p != p5 || p != p6 || p != p7)
17216 _exit(1);
fa0b693c 17217
503d2be0
AS
17218 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17219 from child file descriptors. If the child closes a descriptor
17220 before it execs or exits, this munges the parent's descriptor
17221 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
17222 _exit(close(fileno(stdout)) != 0);
17223 } else {
17224 int status;
17225 struct stat st;
17226
17227 while (wait(&status) != child)
17228 ;
17229 exit(
17230 /* Was there some problem with vforking? */
17231 child < 0
17232
17233 /* Did the child fail? (This shouldn't happen.) */
17234 || status
17235
17236 /* Did the vfork/compiler bug occur? */
17237 || parent != getpid()
fa0b693c 17238
73b77ee5
GM
17239 /* Did the file descriptor bug occur? */
17240 || fstat(fileno(stdout), &st) != 0
17241 );
17242 }
17243}
503d2be0
AS
17244_ACEOF
17245rm -f conftest$ac_exeext
c0d27fcc 17246if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
17247 (eval $ac_link) 2>&5
17248 ac_status=$?
c0d27fcc 17249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17250 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 17251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17252 (eval $ac_try) 2>&5
17253 ac_status=$?
c0d27fcc 17254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17255 (exit $ac_status); }; }; then
73b77ee5 17256 ac_cv_func_vfork_works=yes
fa0b693c 17257else
503d2be0
AS
17258 echo "$as_me: program exited with status $ac_status" >&5
17259echo "$as_me: failed program was:" >&5
cd958eb3
MB
17260sed 's/^/| /' conftest.$ac_ext >&5
17261
c0d27fcc 17262( exit $ac_status )
503d2be0
AS
17263ac_cv_func_vfork_works=no
17264fi
6bae0ccf 17265rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 17266fi
fa0b693c 17267fi
c0d27fcc 17268echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
503d2be0 17269echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
fa0b693c 17270
503d2be0
AS
17271fi;
17272if test "x$ac_cv_func_fork_works" = xcross; then
17273 ac_cv_func_vfork_works=ac_cv_func_vfork
c0d27fcc
MR
17274 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
17275echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
17276fi
17277
503d2be0
AS
17278if test "x$ac_cv_func_vfork_works" = xyes; then
17279
c0d27fcc 17280cat >>confdefs.h <<\_ACEOF
503d2be0 17281#define HAVE_WORKING_VFORK 1
c0d27fcc 17282_ACEOF
503d2be0
AS
17283
17284else
17285
c0d27fcc 17286cat >>confdefs.h <<\_ACEOF
73b77ee5 17287#define vfork fork
c0d27fcc 17288_ACEOF
fa0b693c
GM
17289
17290fi
503d2be0
AS
17291if test "x$ac_cv_func_fork_works" = xyes; then
17292
c0d27fcc 17293cat >>confdefs.h <<\_ACEOF
503d2be0 17294#define HAVE_WORKING_FORK 1
c0d27fcc 17295_ACEOF
fa0b693c 17296
503d2be0 17297fi
647847ea 17298
c0d27fcc 17299
6a3a24fa
JD
17300echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
17301echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
17302if test "${emacs_cv_langinfo_codeset+set}" = set; then
17303 echo $ECHO_N "(cached) $ECHO_C" >&6
17304else
17305 cat >conftest.$ac_ext <<_ACEOF
17306#line $LINENO "configure"
17307/* confdefs.h. */
17308_ACEOF
17309cat confdefs.h >>conftest.$ac_ext
17310cat >>conftest.$ac_ext <<_ACEOF
17311/* end confdefs.h. */
17312#include <langinfo.h>
17313int
17314main ()
17315{
17316char* cs = nl_langinfo(CODESET);
17317 ;
17318 return 0;
17319}
17320_ACEOF
17321rm -f conftest.$ac_objext conftest$ac_exeext
17322if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17323 (eval $ac_link) 2>&5
17324 ac_status=$?
17325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17326 (exit $ac_status); } &&
17327 { ac_try='test -s conftest$ac_exeext'
17328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17329 (eval $ac_try) 2>&5
17330 ac_status=$?
17331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17332 (exit $ac_status); }; }; then
17333 emacs_cv_langinfo_codeset=yes
17334else
17335 echo "$as_me: failed program was:" >&5
17336sed 's/^/| /' conftest.$ac_ext >&5
17337
17338emacs_cv_langinfo_codeset=no
17339fi
17340rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17341
17342fi
17343echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
17344echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6
17345if test $emacs_cv_langinfo_codeset = yes; then
17346
17347cat >>confdefs.h <<\_ACEOF
17348#define HAVE_LANGINFO_CODESET 1
17349_ACEOF
17350
17351fi
17352
c0d27fcc 17353echo "$as_me:$LINENO: checking for size_t" >&5
503d2be0
AS
17354echo $ECHO_N "checking for size_t... $ECHO_C" >&6
17355if test "${ac_cv_type_size_t+set}" = set; then
17356 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 17357else
503d2be0 17358 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 17359#line $LINENO "configure"
cd958eb3
MB
17360/* confdefs.h. */
17361_ACEOF
17362cat confdefs.h >>conftest.$ac_ext
17363cat >>conftest.$ac_ext <<_ACEOF
17364/* end confdefs.h. */
503d2be0
AS
17365$ac_includes_default
17366int
17367main ()
17368{
17369if ((size_t *) 0)
17370 return 0;
17371if (sizeof (size_t))
17372 return 0;
17373 ;
17374 return 0;
17375}
17376_ACEOF
17377rm -f conftest.$ac_objext
c0d27fcc 17378if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
17379 (eval $ac_compile) 2>&5
17380 ac_status=$?
c0d27fcc 17381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17382 (exit $ac_status); } &&
17383 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 17384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17385 (eval $ac_try) 2>&5
17386 ac_status=$?
c0d27fcc 17387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17388 (exit $ac_status); }; }; then
8730a8da
DL
17389 ac_cv_type_size_t=yes
17390else
503d2be0 17391 echo "$as_me: failed program was:" >&5
cd958eb3
MB
17392sed 's/^/| /' conftest.$ac_ext >&5
17393
503d2be0 17394ac_cv_type_size_t=no
8730a8da 17395fi
503d2be0 17396rm -f conftest.$ac_objext conftest.$ac_ext
8730a8da 17397fi
c0d27fcc 17398echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
503d2be0
AS
17399echo "${ECHO_T}$ac_cv_type_size_t" >&6
17400if test $ac_cv_type_size_t = yes; then
503d2be0 17401
c0d27fcc
MR
17402cat >>confdefs.h <<_ACEOF
17403#define HAVE_SIZE_T 1
17404_ACEOF
17405
8730a8da
DL
17406
17407fi
17408
c0d27fcc 17409
22044edf
DL
17410echo "$as_me:$LINENO: checking for C restrict keyword" >&5
17411echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6
17412if test "${emacs_cv_c_restrict+set}" = set; then
17413 echo $ECHO_N "(cached) $ECHO_C" >&6
17414else
17415 cat >conftest.$ac_ext <<_ACEOF
17416#line $LINENO "configure"
cd958eb3
MB
17417/* confdefs.h. */
17418_ACEOF
17419cat confdefs.h >>conftest.$ac_ext
17420cat >>conftest.$ac_ext <<_ACEOF
17421/* end confdefs.h. */
22044edf
DL
17422void fred (int *restrict x);
17423int
17424main ()
17425{
b936fae4 17426
22044edf
DL
17427 ;
17428 return 0;
17429}
c0d27fcc 17430_ACEOF
22044edf
DL
17431rm -f conftest.$ac_objext
17432if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17433 (eval $ac_compile) 2>&5
17434 ac_status=$?
17435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17436 (exit $ac_status); } &&
17437 { ac_try='test -s conftest.$ac_objext'
17438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17439 (eval $ac_try) 2>&5
17440 ac_status=$?
17441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17442 (exit $ac_status); }; }; then
17443 emacs_cv_c_restrict=yes
17444else
17445 echo "$as_me: failed program was:" >&5
cd958eb3
MB
17446sed 's/^/| /' conftest.$ac_ext >&5
17447
22044edf
DL
17448cat >conftest.$ac_ext <<_ACEOF
17449#line $LINENO "configure"
cd958eb3
MB
17450/* confdefs.h. */
17451_ACEOF
17452cat confdefs.h >>conftest.$ac_ext
17453cat >>conftest.$ac_ext <<_ACEOF
17454/* end confdefs.h. */
22044edf
DL
17455void fred (int *__restrict x);
17456int
17457main ()
17458{
c0d27fcc 17459
22044edf
DL
17460 ;
17461 return 0;
17462}
c0d27fcc 17463_ACEOF
22044edf
DL
17464rm -f conftest.$ac_objext
17465if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17466 (eval $ac_compile) 2>&5
17467 ac_status=$?
17468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17469 (exit $ac_status); } &&
17470 { ac_try='test -s conftest.$ac_objext'
17471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17472 (eval $ac_try) 2>&5
17473 ac_status=$?
17474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17475 (exit $ac_status); }; }; then
17476 emacs_cv_c_restrict=__restrict
17477else
17478 echo "$as_me: failed program was:" >&5
cd958eb3
MB
17479sed 's/^/| /' conftest.$ac_ext >&5
17480
22044edf 17481emacs_cv_c_restrict=no
ba4481b5 17482fi
22044edf 17483rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 17484fi
22044edf 17485rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 17486fi
22044edf
DL
17487echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
17488echo "${ECHO_T}$emacs_cv_c_restrict" >&6
17489case "$emacs_cv_c_restrict" in
17490 yes) emacs_restrict=restrict;;
17491 no) emacs_restrict="";;
17492 *) emacs_restrict="$emacs_cv_c_restrict";;
17493esac
17494if test "$emacs_restrict" != __restrict; then
b936fae4 17495
22044edf
DL
17496cat >>confdefs.h <<_ACEOF
17497#define __restrict $emacs_restrict
c0d27fcc 17498_ACEOF
ba4481b5
DL
17499
17500fi
ba4481b5 17501
22044edf
DL
17502echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
17503echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6
17504if test "${emacs_cv_c_restrict_arr+set}" = set; then
17505 echo $ECHO_N "(cached) $ECHO_C" >&6
17506else
17507 cat >conftest.$ac_ext <<_ACEOF
17508#line $LINENO "configure"
cd958eb3
MB
17509/* confdefs.h. */
17510_ACEOF
17511cat confdefs.h >>conftest.$ac_ext
17512cat >>conftest.$ac_ext <<_ACEOF
17513/* end confdefs.h. */
22044edf
DL
17514void fred (int x[__restrict]);
17515int
17516main ()
17517{
b936fae4 17518
22044edf
DL
17519 ;
17520 return 0;
17521}
c0d27fcc 17522_ACEOF
22044edf
DL
17523rm -f conftest.$ac_objext
17524if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17525 (eval $ac_compile) 2>&5
17526 ac_status=$?
17527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17528 (exit $ac_status); } &&
17529 { ac_try='test -s conftest.$ac_objext'
17530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17531 (eval $ac_try) 2>&5
17532 ac_status=$?
17533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17534 (exit $ac_status); }; }; then
17535 emacs_cv_c_restrict_arr=yes
17536else
17537 echo "$as_me: failed program was:" >&5
cd958eb3
MB
17538sed 's/^/| /' conftest.$ac_ext >&5
17539
22044edf 17540emacs_cv_c_restrict_arr=no
ba4481b5 17541fi
22044edf
DL
17542rm -f conftest.$ac_objext conftest.$ac_ext
17543fi
17544echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
17545echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6
17546if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 17547
c0d27fcc 17548cat >>confdefs.h <<\_ACEOF
22044edf 17549#define __restrict_arr __restrict
c0d27fcc 17550_ACEOF
ba4481b5 17551
ba4481b5
DL
17552fi
17553
c0d27fcc 17554
f0f2756d
SS
17555for ac_header in nlist.h
17556do
17557as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
17558if eval "test \"\${$as_ac_Header+set}\" = set"; then
17559 echo "$as_me:$LINENO: checking for $ac_header" >&5
f0f2756d
SS
17560echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17561if eval "test \"\${$as_ac_Header+set}\" = set"; then
17562 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
17563fi
17564echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17565echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 17566else
c0d27fcc
MR
17567 # Is the header compilable?
17568echo "$as_me:$LINENO: checking $ac_header usability" >&5
17569echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17570cat >conftest.$ac_ext <<_ACEOF
17571#line $LINENO "configure"
cd958eb3
MB
17572/* confdefs.h. */
17573_ACEOF
17574cat confdefs.h >>conftest.$ac_ext
17575cat >>conftest.$ac_ext <<_ACEOF
17576/* end confdefs.h. */
c0d27fcc
MR
17577$ac_includes_default
17578#include <$ac_header>
17579_ACEOF
17580rm -f conftest.$ac_objext
17581if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17582 (eval $ac_compile) 2>&5
17583 ac_status=$?
17584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17585 (exit $ac_status); } &&
17586 { ac_try='test -s conftest.$ac_objext'
17587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17588 (eval $ac_try) 2>&5
17589 ac_status=$?
17590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17591 (exit $ac_status); }; }; then
17592 ac_header_compiler=yes
17593else
17594 echo "$as_me: failed program was:" >&5
cd958eb3
MB
17595sed 's/^/| /' conftest.$ac_ext >&5
17596
c0d27fcc
MR
17597ac_header_compiler=no
17598fi
17599rm -f conftest.$ac_objext conftest.$ac_ext
17600echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17601echo "${ECHO_T}$ac_header_compiler" >&6
17602
17603# Is the header present?
17604echo "$as_me:$LINENO: checking $ac_header presence" >&5
17605echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17606cat >conftest.$ac_ext <<_ACEOF
17607#line $LINENO "configure"
cd958eb3
MB
17608/* confdefs.h. */
17609_ACEOF
17610cat confdefs.h >>conftest.$ac_ext
17611cat >>conftest.$ac_ext <<_ACEOF
17612/* end confdefs.h. */
f0f2756d
SS
17613#include <$ac_header>
17614_ACEOF
c0d27fcc 17615if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
f0f2756d
SS
17616 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17617 ac_status=$?
6bae0ccf 17618 grep -v '^ *+' conftest.er1 >conftest.err
f0f2756d
SS
17619 rm -f conftest.er1
17620 cat conftest.err >&5
c0d27fcc 17621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f0f2756d
SS
17622 (exit $ac_status); } >/dev/null; then
17623 if test -s conftest.err; then
17624 ac_cpp_err=$ac_c_preproc_warn_flag
17625 else
17626 ac_cpp_err=
17627 fi
17628else
17629 ac_cpp_err=yes
17630fi
17631if test -z "$ac_cpp_err"; then
c0d27fcc 17632 ac_header_preproc=yes
f0f2756d
SS
17633else
17634 echo "$as_me: failed program was:" >&5
cd958eb3
MB
17635sed 's/^/| /' conftest.$ac_ext >&5
17636
c0d27fcc 17637 ac_header_preproc=no
f0f2756d
SS
17638fi
17639rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
17640echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17641echo "${ECHO_T}$ac_header_preproc" >&6
17642
17643# So? What about this header?
17644case $ac_header_compiler:$ac_header_preproc in
17645 yes:no )
17646 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17647echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17648 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
17649echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17650 (
17651 cat <<\_ASBOX
17652## ------------------------------------ ##
17653## Report this to bug-autoconf@gnu.org. ##
17654## ------------------------------------ ##
17655_ASBOX
17656 ) |
17657 sed "s/^/$as_me: WARNING: /" >&2
17658 ;;
c0d27fcc
MR
17659 no:yes )
17660 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17661echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17662 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17663echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17664 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
17665echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17666 (
17667 cat <<\_ASBOX
17668## ------------------------------------ ##
17669## Report this to bug-autoconf@gnu.org. ##
17670## ------------------------------------ ##
17671_ASBOX
17672 ) |
17673 sed "s/^/$as_me: WARNING: /" >&2
17674 ;;
c0d27fcc
MR
17675esac
17676echo "$as_me:$LINENO: checking for $ac_header" >&5
17677echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17678if eval "test \"\${$as_ac_Header+set}\" = set"; then
17679 echo $ECHO_N "(cached) $ECHO_C" >&6
17680else
17681 eval "$as_ac_Header=$ac_header_preproc"
f0f2756d 17682fi
c0d27fcc 17683echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
f0f2756d 17684echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
17685
17686fi
f0f2756d 17687if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 17688 cat >>confdefs.h <<_ACEOF
f0f2756d 17689#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 17690_ACEOF
f0f2756d 17691
c0d27fcc 17692cat >>confdefs.h <<\_ACEOF
f0f2756d 17693#define NLIST_STRUCT 1
c0d27fcc 17694_ACEOF
f0f2756d
SS
17695
17696fi
c0d27fcc 17697
f0f2756d
SS
17698done
17699
c0d27fcc
MR
17700
17701
17702
22044edf
DL
17703# Set up the CFLAGS for real compilation, so we can substitute it.
17704CFLAGS="$REAL_CFLAGS"
17705CPPFLAGS="$REAL_CPPFLAGS"
17706
17707#### Find out which version of Emacs this is.
17708version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
17709 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
17710if test x"${version}" = x; then
17711 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
17712echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
17713 { (exit 1); exit 1; }; }
17714fi
17715
17716### Specify what sort of things we'll be editing into Makefile and config.h.
17717### Use configuration here uncanonicalized to avoid exceeding size limits.
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
6a3a24fa 17750
22044edf
DL
17751
17752
17753cat >>confdefs.h <<_ACEOF
17754#define EMACS_CONFIGURATION "${canonical}"
17755_ACEOF
17756
17757
17758cat >>confdefs.h <<_ACEOF
17759#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
17760_ACEOF
17761
17762
17763cat >>confdefs.h <<_ACEOF
17764#define config_machfile "${machfile}"
17765_ACEOF
17766
17767
17768cat >>confdefs.h <<_ACEOF
17769#define config_opsysfile "${opsysfile}"
17770_ACEOF
17771
17772
17773cat >>confdefs.h <<_ACEOF
17774#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
17775_ACEOF
17776
17777
17778cat >>confdefs.h <<_ACEOF
17779#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
17780_ACEOF
17781
17782
17783cat >>confdefs.h <<_ACEOF
17784#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
17785_ACEOF
17786
17787
17788cat >>confdefs.h <<_ACEOF
17789#define UNEXEC_SRC ${UNEXEC_SRC}
17790_ACEOF
17791
17792
17793if test "${HAVE_X_WINDOWS}" = "yes" ; then
17794
17795cat >>confdefs.h <<\_ACEOF
17796#define HAVE_X_WINDOWS 1
17797_ACEOF
17798
17799fi
17800if test "${USE_X_TOOLKIT}" != "none" ; then
17801
17802cat >>confdefs.h <<\_ACEOF
17803#define USE_X_TOOLKIT 1
17804_ACEOF
17805
17806fi
17807if test "${HAVE_X11}" = "yes" ; then
17808
17809cat >>confdefs.h <<\_ACEOF
17810#define HAVE_X11 1
17811_ACEOF
17812
17813fi
17814if test "${HAVE_XFREE386}" = "yes" ; then
17815
17816cat >>confdefs.h <<\_ACEOF
17817#define HAVE_XFREE386 1
17818_ACEOF
17819
17820fi
17821if test "${HAVE_MENUS}" = "yes" ; then
17822
17823cat >>confdefs.h <<\_ACEOF
17824#define HAVE_MENUS 1
17825_ACEOF
17826
17827fi
17828if test "${GNU_MALLOC}" = "yes" ; then
17829
17830cat >>confdefs.h <<\_ACEOF
17831#define GNU_MALLOC 1
17832_ACEOF
17833
17834fi
17835if test "${REL_ALLOC}" = "yes" ; then
17836
17837cat >>confdefs.h <<\_ACEOF
17838#define REL_ALLOC 1
17839_ACEOF
17840
17841fi
17842
17843
17844
c0d27fcc
MR
17845
17846
ba4481b5
DL
17847#### Report on what we decided to do.
17848echo "
17849Configured for \`${canonical}'.
17850
17851 Where should the build process find the source code? ${srcdir}
17852 What operating system and machine description files should Emacs use?
17853 \`${opsysfile}' and \`${machfile}'
17854 What compiler should emacs be built with? ${CC} ${CFLAGS}
17855 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 17856 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 17857 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 17858 What window system should Emacs use? ${window_system}
8e967cf7 17859 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
17860
17861if test -n "${x_includes}"; then
17862echo " Where do we find X Windows header files? ${x_includes}"
17863else
17864echo " Where do we find X Windows header files? Standard dirs"
17865fi
17866if test -n "${x_libraries}"; then
17867echo " Where do we find X Windows libraries? ${x_libraries}"
17868else
17869echo " Where do we find X Windows libraries? Standard dirs"
17870fi
17871
17872echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
17873echo " Does Emacs use -lXpm? ${HAVE_XPM}"
17874echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
17875echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
17876echo " Does Emacs use -lungif? ${HAVE_GIF}"
17877echo " Does Emacs use -lpng? ${HAVE_PNG}"
17878echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
17879echo
17880
17881# Remove any trailing slashes in these variables.
17882test "${prefix}" != NONE &&
17883 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
17884test "${exec_prefix}" != NONE &&
17885 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
17886
d0e9bfd2
GM
17887## Check if the C preprocessor will convert `..' to `. .'. If so, set
17888## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
17889## from Makefile.c can correctly provide the arg `-traditional' to the
17890## C preprocessor.
17891
503d2be0 17892cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 17893#line $LINENO "configure"
cd958eb3
MB
17894/* confdefs.h. */
17895_ACEOF
17896cat confdefs.h >>conftest.$ac_ext
17897cat >>conftest.$ac_ext <<_ACEOF
17898/* end confdefs.h. */
d0e9bfd2 17899yes..yes
503d2be0 17900_ACEOF
d0e9bfd2 17901if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 17902 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
17903 CPP_NEED_TRADITIONAL=no
17904else
d0e9bfd2
GM
17905 CPP_NEED_TRADITIONAL=yes
17906fi
17907rm -f conftest*
17908
c0d27fcc 17909
6bae0ccf
DL
17910 ac_config_files="$ac_config_files Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in lisp/Makefile lispref/Makefile lispintro/Makefile leim/Makefile"
17911 ac_config_commands="$ac_config_commands default"
503d2be0 17912cat >confcache <<\_ACEOF
ba4481b5
DL
17913# This file is a shell script that caches the results of configure
17914# tests run on this system so they can be shared between configure
503d2be0
AS
17915# scripts and configure runs, see configure's option --config-cache.
17916# It is not useful on other systems. If it contains results you don't
17917# want to keep, you may remove or edit it.
ba4481b5 17918#
503d2be0
AS
17919# config.status only pays attention to the cache file if you give it
17920# the --recheck option to rerun configure.
ba4481b5 17921#
6bae0ccf 17922# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
17923# loading this file, other *unset* `ac_cv_foo' will be assigned the
17924# following values.
17925
17926_ACEOF
17927
ba4481b5
DL
17928# The following way of writing the cache mishandles newlines in values,
17929# but we know of no workaround that is simple, portable, and efficient.
17930# So, don't put newlines in cache variables' values.
17931# Ultrix sh set writes to stderr and can't be redirected directly,
17932# and sets the high bit in the cache file unless we assign to the vars.
503d2be0
AS
17933{
17934 (set) 2>&1 |
17935 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17936 *ac_space=\ *)
17937 # `set' does not quote correctly, so add quotes (double-quote
17938 # substitution turns \\\\ into \\, and sed turns \\ into \).
17939 sed -n \
17940 "s/'/'\\\\''/g;
17941 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17942 ;;
17943 *)
17944 # `set' quotes correctly as required by POSIX, so do not add quotes.
17945 sed -n \
17946 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17947 ;;
17948 esac;
17949} |
17950 sed '
17951 t clear
17952 : clear
17953 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17954 t end
17955 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17956 : end' >>confcache
cd958eb3 17957if diff $cache_file confcache >/dev/null 2>&1; then :; else
ba4481b5 17958 if test -w $cache_file; then
503d2be0
AS
17959 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17960 cat confcache >$cache_file
ba4481b5
DL
17961 else
17962 echo "not updating unwritable cache $cache_file"
17963 fi
17964fi
17965rm -f confcache
17966
ba4481b5
DL
17967test "x$prefix" = xNONE && prefix=$ac_default_prefix
17968# Let make expand exec_prefix.
17969test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17970
503d2be0
AS
17971# VPATH may cause trouble with some makes, so we remove $(srcdir),
17972# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17973# trailing colons and then remove the whole line if VPATH becomes empty
17974# (actually we leave an empty line to preserve line numbers).
ba4481b5 17975if test "x$srcdir" = x.; then
503d2be0
AS
17976 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17977s/:*\$(srcdir):*/:/;
17978s/:*\${srcdir}:*/:/;
17979s/:*@srcdir@:*/:/;
17980s/^\([^=]*=[ ]*\):*/\1/;
17981s/:*$//;
17982s/^[^=]*=[ ]*$//;
17983}'
ba4481b5
DL
17984fi
17985
ba4481b5
DL
17986DEFS=-DHAVE_CONFIG_H
17987
6bae0ccf
DL
17988ac_libobjs=
17989ac_ltlibobjs=
17990for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17991 # 1. Remove the extension, and $U if already installed.
17992 ac_i=`echo "$ac_i" |
17993 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
17994 # 2. Add them.
17995 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
17996 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
17997done
17998LIBOBJS=$ac_libobjs
17999
18000LTLIBOBJS=$ac_ltlibobjs
18001
18002
c0d27fcc 18003
ba4481b5 18004: ${CONFIG_STATUS=./config.status}
503d2be0
AS
18005ac_clean_files_save=$ac_clean_files
18006ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 18007{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
18008echo "$as_me: creating $CONFIG_STATUS" >&6;}
18009cat >$CONFIG_STATUS <<_ACEOF
18010#! $SHELL
c0d27fcc 18011# Generated by $as_me.
ba4481b5 18012# Run this file to recreate the current configuration.
ba4481b5 18013# Compiler output produced by configure, useful for debugging
503d2be0 18014# configure, is in config.log if it exists.
ba4481b5 18015
503d2be0 18016debug=false
cd958eb3
MB
18017ac_cs_recheck=false
18018ac_cs_silent=false
503d2be0 18019SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
18020_ACEOF
18021
18022cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
18023## --------------------- ##
18024## M4sh Initialization. ##
18025## --------------------- ##
18026
503d2be0
AS
18027# Be Bourne compatible
18028if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18029 emulate sh
18030 NULLCMD=:
6bae0ccf
DL
18031 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18032 # is contrary to our usage. Disable this feature.
18033 alias -g '${1+"$@"}'='"$@"'
503d2be0
AS
18034elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18035 set -o posix
18036fi
18037
c0d27fcc
MR
18038# Support unset when possible.
18039if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18040 as_unset=unset
18041else
18042 as_unset=false
18043fi
18044
6bae0ccf
DL
18045
18046# Work around bugs in pre-3.0 UWIN ksh.
18047$as_unset ENV MAIL MAILPATH
18048PS1='$ '
18049PS2='> '
18050PS4='+ '
18051
18052# NLS nuisances.
cd958eb3
MB
18053for as_var in \
18054 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
18055 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18056 LC_TELEPHONE LC_TIME
6bae0ccf
DL
18057do
18058 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
18059 eval $as_var=C; export $as_var
18060 else
18061 $as_unset $as_var
18062 fi
18063done
18064
18065# Required to use basename.
18066if expr a : '\(a\)' >/dev/null 2>&1; then
18067 as_expr=expr
18068else
18069 as_expr=false
18070fi
18071
18072if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18073 as_basename=basename
18074else
18075 as_basename=false
18076fi
c0d27fcc
MR
18077
18078
503d2be0 18079# Name of the executable.
6bae0ccf 18080as_me=`$as_basename "$0" ||
c0d27fcc
MR
18081$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18082 X"$0" : 'X\(//\)$' \| \
18083 X"$0" : 'X\(/\)$' \| \
18084 . : '\(.\)' 2>/dev/null ||
18085echo X/"$0" |
18086 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18087 /^X\/\(\/\/\)$/{ s//\1/; q; }
18088 /^X\/\(\/\).*/{ s//\1/; q; }
18089 s/.*/./; q'`
18090
6bae0ccf 18091
c0d27fcc
MR
18092# PATH needs CR, and LINENO needs CR and PATH.
18093# Avoid depending upon Character Ranges.
18094as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18095as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18096as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18097as_cr_digits='0123456789'
18098as_cr_alnum=$as_cr_Letters$as_cr_digits
18099
18100# The user is always right.
18101if test "${PATH_SEPARATOR+set}" != set; then
cd958eb3
MB
18102 echo "#! /bin/sh" >conf$$.sh
18103 echo "exit 0" >>conf$$.sh
18104 chmod +x conf$$.sh
18105 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
c0d27fcc
MR
18106 PATH_SEPARATOR=';'
18107 else
18108 PATH_SEPARATOR=:
18109 fi
cd958eb3 18110 rm -f conf$$.sh
c0d27fcc
MR
18111fi
18112
18113
18114 as_lineno_1=$LINENO
18115 as_lineno_2=$LINENO
18116 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18117 test "x$as_lineno_1" != "x$as_lineno_2" &&
18118 test "x$as_lineno_3" = "x$as_lineno_2" || {
18119 # Find who we are. Look in the path if we contain no path at all
18120 # relative or not.
18121 case $0 in
18122 *[\\/]* ) as_myself=$0 ;;
18123 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18124for as_dir in $PATH
18125do
18126 IFS=$as_save_IFS
18127 test -z "$as_dir" && as_dir=.
18128 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18129done
18130
18131 ;;
18132 esac
18133 # We did not find ourselves, most probably we were run as `sh COMMAND'
18134 # in which case we are not to be found in the path.
18135 if test "x$as_myself" = x; then
18136 as_myself=$0
18137 fi
18138 if test ! -f "$as_myself"; then
18139 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18140echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18141 { (exit 1); exit 1; }; }
18142 fi
18143 case $CONFIG_SHELL in
18144 '')
18145 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18146for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18147do
18148 IFS=$as_save_IFS
18149 test -z "$as_dir" && as_dir=.
18150 for as_base in sh bash ksh sh5; do
18151 case $as_dir in
18152 /*)
18153 if ("$as_dir/$as_base" -c '
18154 as_lineno_1=$LINENO
18155 as_lineno_2=$LINENO
18156 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18157 test "x$as_lineno_1" != "x$as_lineno_2" &&
18158 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
6bae0ccf
DL
18159 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
18160 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
c0d27fcc
MR
18161 CONFIG_SHELL=$as_dir/$as_base
18162 export CONFIG_SHELL
18163 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18164 fi;;
18165 esac
18166 done
18167done
18168;;
18169 esac
18170
18171 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18172 # uniformly replaced by the line number. The first 'sed' inserts a
18173 # line-number line before each line; the second 'sed' does the real
18174 # work. The second script uses 'N' to pair each line-number line
18175 # with the numbered line, and appends trailing '-' during
18176 # substitution so that $LINENO is not a special case at line end.
18177 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18178 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
18179 sed '=' <$as_myself |
18180 sed '
18181 N
18182 s,$,-,
18183 : loop
18184 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18185 t loop
18186 s,-$,,
18187 s,^['$as_cr_digits']*\n,,
18188 ' >$as_me.lineno &&
18189 chmod +x $as_me.lineno ||
18190 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18191echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18192 { (exit 1); exit 1; }; }
18193
18194 # Don't try to exec as it changes $[0], causing all sort of problems
18195 # (the dirname of $[0] is not the place where we might find the
18196 # original and so on. Autoconf is especially sensible to this).
18197 . ./$as_me.lineno
18198 # Exit status is that of the last command.
18199 exit
18200}
18201
18202
18203case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18204 *c*,-n*) ECHO_N= ECHO_C='
18205' ECHO_T=' ' ;;
18206 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18207 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
18208esac
503d2be0
AS
18209
18210if expr a : '\(a\)' >/dev/null 2>&1; then
18211 as_expr=expr
18212else
18213 as_expr=false
18214fi
18215
18216rm -f conf$$ conf$$.exe conf$$.file
18217echo >conf$$.file
18218if ln -s conf$$.file conf$$ 2>/dev/null; then
18219 # We could just check for DJGPP; but this test a) works b) is more generic
18220 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18221 if test -f conf$$.exe; then
18222 # Don't use ln at all; we don't have any links
18223 as_ln_s='cp -p'
18224 else
18225 as_ln_s='ln -s'
18226 fi
18227elif ln conf$$.file conf$$ 2>/dev/null; then
18228 as_ln_s=ln
18229else
18230 as_ln_s='cp -p'
18231fi
18232rm -f conf$$ conf$$.exe conf$$.file
18233
6bae0ccf
DL
18234if mkdir -p . 2>/dev/null; then
18235 as_mkdir_p=:
18236else
18237 as_mkdir_p=false
18238fi
18239
503d2be0
AS
18240as_executable_p="test -f"
18241
c0d27fcc
MR
18242# Sed expression to map a string onto a valid CPP name.
18243as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18244
18245# Sed expression to map a string onto a valid variable name.
18246as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
503d2be0 18247
503d2be0
AS
18248
18249# IFS
18250# We need space, tab and new line, in precisely that order.
18251as_nl='
18252'
18253IFS=" $as_nl"
18254
18255# CDPATH.
6bae0ccf 18256$as_unset CDPATH
503d2be0
AS
18257
18258exec 6>&1
18259
c0d27fcc
MR
18260# Open the log real soon, to keep \$[0] and so on meaningful, and to
18261# report actual input values of CONFIG_FILES etc. instead of their
18262# values after options handling. Logging --version etc. is OK.
18263exec 5>>config.log
18264{
18265 echo
18266 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18267## Running $as_me. ##
18268_ASBOX
18269} >&5
18270cat >&5 <<_CSEOF
18271
18272This file was extended by $as_me, which was
9e71690e 18273generated by GNU Autoconf 2.57. Invocation command line was
c0d27fcc
MR
18274
18275 CONFIG_FILES = $CONFIG_FILES
18276 CONFIG_HEADERS = $CONFIG_HEADERS
18277 CONFIG_LINKS = $CONFIG_LINKS
18278 CONFIG_COMMANDS = $CONFIG_COMMANDS
18279 $ $0 $@
18280
18281_CSEOF
18282echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18283echo >&5
503d2be0
AS
18284_ACEOF
18285
18286# Files that config.status was made for.
18287if test -n "$ac_config_files"; then
18288 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18289fi
18290
18291if test -n "$ac_config_headers"; then
18292 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18293fi
18294
18295if test -n "$ac_config_links"; then
18296 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18297fi
18298
18299if test -n "$ac_config_commands"; then
18300 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18301fi
18302
c0d27fcc 18303cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
18304
18305ac_cs_usage="\
18306\`$as_me' instantiates files from templates according to the
18307current configuration.
18308
18309Usage: $0 [OPTIONS] [FILE]...
18310
18311 -h, --help print this help, then exit
18312 -V, --version print version number, then exit
cd958eb3 18313 -q, --quiet do not print progress messages
503d2be0
AS
18314 -d, --debug don't remove temporary files
18315 --recheck update $as_me by reconfiguring in the same conditions
18316 --file=FILE[:TEMPLATE]
18317 instantiate the configuration file FILE
18318 --header=FILE[:TEMPLATE]
18319 instantiate the configuration header FILE
18320
18321Configuration files:
18322$config_files
18323
18324Configuration headers:
18325$config_headers
18326
18327Configuration commands:
18328$config_commands
18329
18330Report bugs to <bug-autoconf@gnu.org>."
c0d27fcc 18331_ACEOF
503d2be0 18332
c0d27fcc 18333cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
18334ac_cs_version="\\
18335config.status
9e71690e 18336configured by $0, generated by GNU Autoconf 2.57,
503d2be0
AS
18337 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18338
18339Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18340Free Software Foundation, Inc.
18341This config.status script is free software; the Free Software Foundation
18342gives unlimited permission to copy, distribute and modify it."
18343srcdir=$srcdir
18344INSTALL="$INSTALL"
c0d27fcc 18345_ACEOF
503d2be0 18346
c0d27fcc 18347cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
18348# If no file are specified by the user, then we need to provide default
18349# value. By we need to know if files were specified by the user.
18350ac_need_defaults=:
18351while test $# != 0
ba4481b5 18352do
503d2be0
AS
18353 case $1 in
18354 --*=*)
18355 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18356 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
6bae0ccf
DL
18357 ac_shift=:
18358 ;;
18359 -*)
18360 ac_option=$1
18361 ac_optarg=$2
18362 ac_shift=shift
503d2be0 18363 ;;
503d2be0
AS
18364 *) # This is not an option, so the user has probably given explicit
18365 # arguments.
6bae0ccf 18366 ac_option=$1
503d2be0
AS
18367 ac_need_defaults=false;;
18368 esac
18369
6bae0ccf 18370 case $ac_option in
503d2be0 18371 # Handling of the options.
c0d27fcc 18372_ACEOF
c0d27fcc 18373cat >>$CONFIG_STATUS <<\_ACEOF
cd958eb3
MB
18374 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18375 ac_cs_recheck=: ;;
503d2be0
AS
18376 --version | --vers* | -V )
18377 echo "$ac_cs_version"; exit 0 ;;
18378 --he | --h)
18379 # Conflict between --help and --header
c0d27fcc 18380 { { echo "$as_me:$LINENO: error: ambiguous option: $1
503d2be0
AS
18381Try \`$0 --help' for more information." >&5
18382echo "$as_me: error: ambiguous option: $1
18383Try \`$0 --help' for more information." >&2;}
18384 { (exit 1); exit 1; }; };;
18385 --help | --hel | -h )
18386 echo "$ac_cs_usage"; exit 0 ;;
18387 --debug | --d* | -d )
18388 debug=: ;;
18389 --file | --fil | --fi | --f )
6bae0ccf
DL
18390 $ac_shift
18391 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
18392 ac_need_defaults=false;;
18393 --header | --heade | --head | --hea )
6bae0ccf
DL
18394 $ac_shift
18395 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 18396 ac_need_defaults=false;;
cd958eb3
MB
18397 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18398 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18399 ac_cs_silent=: ;;
503d2be0
AS
18400
18401 # This is an error.
c0d27fcc 18402 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
503d2be0
AS
18403Try \`$0 --help' for more information." >&5
18404echo "$as_me: error: unrecognized option: $1
18405Try \`$0 --help' for more information." >&2;}
18406 { (exit 1); exit 1; }; } ;;
18407
18408 *) ac_config_targets="$ac_config_targets $1" ;;
18409
ba4481b5 18410 esac
503d2be0 18411 shift
ba4481b5
DL
18412done
18413
cd958eb3
MB
18414ac_configure_extra_args=
18415
18416if $ac_cs_silent; then
18417 exec 6>/dev/null
18418 ac_configure_extra_args="$ac_configure_extra_args --silent"
18419fi
18420
18421_ACEOF
18422cat >>$CONFIG_STATUS <<_ACEOF
18423if \$ac_cs_recheck; then
18424 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
18425 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18426fi
18427
503d2be0 18428_ACEOF
ba4481b5 18429
c0d27fcc 18430cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
18431#
18432# INIT-COMMANDS section.
18433#
ba4481b5 18434
503d2be0
AS
18435GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
18436
c0d27fcc
MR
18437_ACEOF
18438
503d2be0 18439
c0d27fcc
MR
18440
18441cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
18442for ac_config_target in $ac_config_targets
18443do
18444 case "$ac_config_target" in
18445 # Handling of arguments.
18446 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18447 "lib-src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
18448 "oldXMenu/Makefile" ) CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
18449 "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
18450 "lwlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
18451 "src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
18452 "lisp/Makefile" ) CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
23b24859 18453 "lispref/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispref/Makefile" ;;
981626b7 18454 "lispintro/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispintro/Makefile" ;;
503d2be0
AS
18455 "leim/Makefile" ) CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
18456 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18457 "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
c0d27fcc 18458 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
18459echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18460 { (exit 1); exit 1; }; };;
18461 esac
ba4481b5 18462done
503d2be0
AS
18463
18464# If the user did not use the arguments to specify the items to instantiate,
18465# then the envvar interface is used. Set only those that are not.
18466# We use the long form for the default assignment because of an extremely
18467# bizarre bug on SunOS 4.1.3.
18468if $ac_need_defaults; then
18469 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18470 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18471 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 18472fi
503d2be0 18473
cd958eb3
MB
18474# Have a temporary directory for convenience. Make it in the build tree
18475# simply because there is no reason to put it here, and in addition,
18476# creating and moving files from /tmp can sometimes cause problems.
503d2be0
AS
18477# Create a temporary directory, and hook for its removal unless debugging.
18478$debug ||
18479{
18480 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18481 trap '{ (exit 1); exit 1; }' 1 2 13 15
18482}
18483
18484# Create a (secure) tmp directory for tmp files.
cd958eb3 18485
503d2be0 18486{
cd958eb3 18487 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
503d2be0
AS
18488 test -n "$tmp" && test -d "$tmp"
18489} ||
18490{
cd958eb3 18491 tmp=./confstat$$-$RANDOM
503d2be0
AS
18492 (umask 077 && mkdir $tmp)
18493} ||
18494{
cd958eb3 18495 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
18496 { (exit 1); exit 1; }
18497}
18498
c0d27fcc 18499_ACEOF
503d2be0 18500
c0d27fcc 18501cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
18502
18503#
18504# CONFIG_FILES section.
18505#
18506
18507# No need to generate the scripts if there are no CONFIG_FILES.
18508# This happens for instance when ./config.status config.h
18509if test -n "\$CONFIG_FILES"; then
18510 # Protect against being on the right side of a sed subst in config.status.
18511 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18512 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18513s,@SHELL@,$SHELL,;t t
c0d27fcc
MR
18514s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18515s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18516s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18517s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18518s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18519s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
503d2be0
AS
18520s,@exec_prefix@,$exec_prefix,;t t
18521s,@prefix@,$prefix,;t t
18522s,@program_transform_name@,$program_transform_name,;t t
18523s,@bindir@,$bindir,;t t
18524s,@sbindir@,$sbindir,;t t
18525s,@libexecdir@,$libexecdir,;t t
18526s,@datadir@,$datadir,;t t
18527s,@sysconfdir@,$sysconfdir,;t t
18528s,@sharedstatedir@,$sharedstatedir,;t t
18529s,@localstatedir@,$localstatedir,;t t
18530s,@libdir@,$libdir,;t t
18531s,@includedir@,$includedir,;t t
18532s,@oldincludedir@,$oldincludedir,;t t
18533s,@infodir@,$infodir,;t t
18534s,@mandir@,$mandir,;t t
503d2be0
AS
18535s,@build_alias@,$build_alias,;t t
18536s,@host_alias@,$host_alias,;t t
18537s,@target_alias@,$target_alias,;t t
c0d27fcc 18538s,@DEFS@,$DEFS,;t t
503d2be0
AS
18539s,@ECHO_C@,$ECHO_C,;t t
18540s,@ECHO_N@,$ECHO_N,;t t
18541s,@ECHO_T@,$ECHO_T,;t t
503d2be0
AS
18542s,@LIBS@,$LIBS,;t t
18543s,@build@,$build,;t t
18544s,@build_cpu@,$build_cpu,;t t
18545s,@build_vendor@,$build_vendor,;t t
18546s,@build_os@,$build_os,;t t
18547s,@host@,$host,;t t
18548s,@host_cpu@,$host_cpu,;t t
18549s,@host_vendor@,$host_vendor,;t t
18550s,@host_os@,$host_os,;t t
18551s,@CC@,$CC,;t t
18552s,@CFLAGS@,$CFLAGS,;t t
18553s,@LDFLAGS@,$LDFLAGS,;t t
18554s,@CPPFLAGS@,$CPPFLAGS,;t t
18555s,@ac_ct_CC@,$ac_ct_CC,;t t
18556s,@EXEEXT@,$EXEEXT,;t t
18557s,@OBJEXT@,$OBJEXT,;t t
18558s,@LN_S@,$LN_S,;t t
18559s,@CPP@,$CPP,;t t
18560s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18561s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18562s,@INSTALL_DATA@,$INSTALL_DATA,;t t
503d2be0
AS
18563s,@RANLIB@,$RANLIB,;t t
18564s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
9e71690e 18565s,@INSTALL_INFO@,$INSTALL_INFO,;t t
6bae0ccf 18566s,@EGREP@,$EGREP,;t t
503d2be0
AS
18567s,@LIBSOUND@,$LIBSOUND,;t t
18568s,@SET_MAKE@,$SET_MAKE,;t t
18569s,@ALLOCA@,$ALLOCA,;t t
18570s,@liblockfile@,$liblockfile,;t t
18571s,@LIBOBJS@,$LIBOBJS,;t t
18572s,@NEED_SETGID@,$NEED_SETGID,;t t
18573s,@KMEM_GROUP@,$KMEM_GROUP,;t t
18574s,@GETLOADAVG_LIBS@,$GETLOADAVG_LIBS,;t t
18575s,@version@,$version,;t t
18576s,@configuration@,$configuration,;t t
18577s,@canonical@,$canonical,;t t
18578s,@srcdir@,$srcdir,;t t
18579s,@lispdir@,$lispdir,;t t
18580s,@locallisppath@,$locallisppath,;t t
18581s,@lisppath@,$lisppath,;t t
18582s,@x_default_search_path@,$x_default_search_path,;t t
18583s,@etcdir@,$etcdir,;t t
18584s,@archlibdir@,$archlibdir,;t t
18585s,@docdir@,$docdir,;t t
18586s,@bitmapdir@,$bitmapdir,;t t
98418dba
CW
18587s,@gamedir@,$gamedir,;t t
18588s,@gameuser@,$gameuser,;t t
503d2be0
AS
18589s,@c_switch_system@,$c_switch_system,;t t
18590s,@c_switch_machine@,$c_switch_machine,;t t
18591s,@LD_SWITCH_X_SITE@,$LD_SWITCH_X_SITE,;t t
18592s,@LD_SWITCH_X_SITE_AUX@,$LD_SWITCH_X_SITE_AUX,;t t
18593s,@C_SWITCH_X_SITE@,$C_SWITCH_X_SITE,;t t
18594s,@X_TOOLKIT_TYPE@,$X_TOOLKIT_TYPE,;t t
18595s,@machfile@,$machfile,;t t
18596s,@opsysfile@,$opsysfile,;t t
6a3a24fa 18597s,@carbon_appdir@,$carbon_appdir,;t t
6bae0ccf 18598s,@LTLIBOBJS@,$LTLIBOBJS,;t t
503d2be0
AS
18599CEOF
18600
c0d27fcc 18601_ACEOF
ba4481b5 18602
c0d27fcc 18603 cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
18604 # Split the substitutions into bite-sized pieces for seds with
18605 # small command number limits, like on Digital OSF/1 and HP-UX.
18606 ac_max_sed_lines=48
18607 ac_sed_frag=1 # Number of current file.
18608 ac_beg=1 # First line for current file.
18609 ac_end=$ac_max_sed_lines # Line after last line for current file.
18610 ac_more_lines=:
18611 ac_sed_cmds=
18612 while $ac_more_lines; do
18613 if test $ac_beg -gt 1; then
18614 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18615 else
18616 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18617 fi
18618 if test ! -s $tmp/subs.frag; then
18619 ac_more_lines=false
18620 else
18621 # The purpose of the label and of the branching condition is to
18622 # speed up the sed processing (if there are no `@' at all, there
18623 # is no need to browse any of the substitutions).
18624 # These are the two extra sed commands mentioned above.
18625 (echo ':t
18626 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18627 if test -z "$ac_sed_cmds"; then
18628 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18629 else
18630 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18631 fi
18632 ac_sed_frag=`expr $ac_sed_frag + 1`
18633 ac_beg=$ac_end
18634 ac_end=`expr $ac_end + $ac_max_sed_lines`
18635 fi
18636 done
18637 if test -z "$ac_sed_cmds"; then
18638 ac_sed_cmds=cat
18639 fi
18640fi # test -n "$CONFIG_FILES"
ba4481b5 18641
c0d27fcc
MR
18642_ACEOF
18643cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 18644for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
ba4481b5 18645 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
18646 case $ac_file in
18647 - | *:- | *:-:* ) # input from stdin
18648 cat >$tmp/stdin
18649 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18650 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18651 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18652 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18653 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
18654 esac
18655
503d2be0 18656 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
c0d27fcc
MR
18657 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18658$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
503d2be0
AS
18659 X"$ac_file" : 'X\(//\)[^/]' \| \
18660 X"$ac_file" : 'X\(//\)$' \| \
18661 X"$ac_file" : 'X\(/\)' \| \
18662 . : '\(.\)' 2>/dev/null ||
18663echo X"$ac_file" |
18664 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18665 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18666 /^X\(\/\/\)$/{ s//\1/; q; }
18667 /^X\(\/\).*/{ s//\1/; q; }
18668 s/.*/./; q'`
6bae0ccf
DL
18669 { if $as_mkdir_p; then
18670 mkdir -p "$ac_dir"
18671 else
18672 as_dir="$ac_dir"
18673 as_dirs=
18674 while test ! -d "$as_dir"; do
18675 as_dirs="$as_dir $as_dirs"
18676 as_dir=`(dirname "$as_dir") 2>/dev/null ||
18677$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18678 X"$as_dir" : 'X\(//\)[^/]' \| \
18679 X"$as_dir" : 'X\(//\)$' \| \
18680 X"$as_dir" : 'X\(/\)' \| \
18681 . : '\(.\)' 2>/dev/null ||
18682echo X"$as_dir" |
18683 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18684 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18685 /^X\(\/\/\)$/{ s//\1/; q; }
18686 /^X\(\/\).*/{ s//\1/; q; }
18687 s/.*/./; q'`
18688 done
18689 test ! -n "$as_dirs" || mkdir $as_dirs
18690 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
18691echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
18692 { (exit 1); exit 1; }; }; }
503d2be0 18693
c0d27fcc 18694 ac_builddir=.
98418dba 18695
c0d27fcc
MR
18696if test "$ac_dir" != .; then
18697 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18698 # A "../" for each directory in $ac_dir_suffix.
18699 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18700else
18701 ac_dir_suffix= ac_top_builddir=
18702fi
18703
18704case $srcdir in
18705 .) # No --srcdir option. We are building in place.
18706 ac_srcdir=.
18707 if test -z "$ac_top_builddir"; then
18708 ac_top_srcdir=.
18709 else
18710 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18711 fi ;;
18712 [\\/]* | ?:[\\/]* ) # Absolute path.
18713 ac_srcdir=$srcdir$ac_dir_suffix;
18714 ac_top_srcdir=$srcdir ;;
ba4481b5 18715 *) # Relative path.
c0d27fcc
MR
18716 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18717 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18718esac
18719# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18720# absolute.
18721ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
6bae0ccf 18722ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
c0d27fcc
MR
18723ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18724ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18725
ba4481b5 18726
503d2be0
AS
18727 case $INSTALL in
18728 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
c0d27fcc 18729 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
ba4481b5
DL
18730 esac
18731
503d2be0 18732 if test x"$ac_file" != x-; then
c0d27fcc 18733 { echo "$as_me:$LINENO: creating $ac_file" >&5
503d2be0
AS
18734echo "$as_me: creating $ac_file" >&6;}
18735 rm -f "$ac_file"
18736 fi
18737 # Let's still pretend it is `configure' which instantiates (i.e., don't
18738 # use $as_me), people would be surprised to read:
c0d27fcc
MR
18739 # /* config.h. Generated by config.status. */
18740 if test x"$ac_file" = x-; then
18741 configure_input=
18742 else
18743 configure_input="$ac_file. "
18744 fi
18745 configure_input=$configure_input"Generated from `echo $ac_file_in |
18746 sed 's,.*/,,'` by configure."
503d2be0
AS
18747
18748 # First look for the input files in the build tree, otherwise in the
18749 # src tree.
18750 ac_file_inputs=`IFS=:
18751 for f in $ac_file_in; do
18752 case $f in
18753 -) echo $tmp/stdin ;;
18754 [\\/$]*)
18755 # Absolute (can't be DOS-style, as IFS=:)
c0d27fcc 18756 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
18757echo "$as_me: error: cannot find input file: $f" >&2;}
18758 { (exit 1); exit 1; }; }
18759 echo $f;;
18760 *) # Relative
18761 if test -f "$f"; then
18762 # Build tree
18763 echo $f
18764 elif test -f "$srcdir/$f"; then
18765 # Source tree
18766 echo $srcdir/$f
18767 else
18768 # /dev/null tree
c0d27fcc 18769 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
18770echo "$as_me: error: cannot find input file: $f" >&2;}
18771 { (exit 1); exit 1; }; }
18772 fi;;
18773 esac
18774 done` || { (exit 1); exit 1; }
c0d27fcc
MR
18775_ACEOF
18776cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
18777 sed "$ac_vpsub
18778$extrasub
c0d27fcc
MR
18779_ACEOF
18780cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
18781:t
18782/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18783s,@configure_input@,$configure_input,;t t
18784s,@srcdir@,$ac_srcdir,;t t
c0d27fcc 18785s,@abs_srcdir@,$ac_abs_srcdir,;t t
503d2be0 18786s,@top_srcdir@,$ac_top_srcdir,;t t
c0d27fcc
MR
18787s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18788s,@builddir@,$ac_builddir,;t t
18789s,@abs_builddir@,$ac_abs_builddir,;t t
18790s,@top_builddir@,$ac_top_builddir,;t t
18791s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
503d2be0
AS
18792s,@INSTALL@,$ac_INSTALL,;t t
18793" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18794 rm -f $tmp/stdin
18795 if test x"$ac_file" != x-; then
18796 mv $tmp/out $ac_file
18797 else
18798 cat $tmp/out
18799 rm -f $tmp/out
18800 fi
18801
18802done
c0d27fcc
MR
18803_ACEOF
18804cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 18805
503d2be0
AS
18806#
18807# CONFIG_HEADER section.
18808#
ba4481b5
DL
18809
18810# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18811# NAME is the cpp macro being defined and VALUE is the value it is being given.
18812#
18813# ac_d sets the value in "#define NAME VALUE" lines.
503d2be0
AS
18814ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18815ac_dB='[ ].*$,\1#\2'
18816ac_dC=' '
18817ac_dD=',;t'
18818# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18819ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18820ac_uB='$,\1#\2define\3'
ba4481b5 18821ac_uC=' '
503d2be0 18822ac_uD=',;t'
ba4481b5 18823
503d2be0 18824for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
ba4481b5 18825 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
18826 case $ac_file in
18827 - | *:- | *:-:* ) # input from stdin
18828 cat >$tmp/stdin
18829 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18830 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18831 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18832 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18833 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
18834 esac
18835
c0d27fcc 18836 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
503d2be0
AS
18837echo "$as_me: creating $ac_file" >&6;}
18838
18839 # First look for the input files in the build tree, otherwise in the
18840 # src tree.
18841 ac_file_inputs=`IFS=:
18842 for f in $ac_file_in; do
18843 case $f in
18844 -) echo $tmp/stdin ;;
18845 [\\/$]*)
18846 # Absolute (can't be DOS-style, as IFS=:)
c0d27fcc 18847 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
18848echo "$as_me: error: cannot find input file: $f" >&2;}
18849 { (exit 1); exit 1; }; }
18850 echo $f;;
18851 *) # Relative
18852 if test -f "$f"; then
18853 # Build tree
18854 echo $f
18855 elif test -f "$srcdir/$f"; then
18856 # Source tree
18857 echo $srcdir/$f
18858 else
18859 # /dev/null tree
c0d27fcc 18860 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
18861echo "$as_me: error: cannot find input file: $f" >&2;}
18862 { (exit 1); exit 1; }; }
18863 fi;;
18864 esac
18865 done` || { (exit 1); exit 1; }
18866 # Remove the trailing spaces.
18867 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
18868
c0d27fcc 18869_ACEOF
503d2be0
AS
18870
18871# Transform confdefs.h into two sed scripts, `conftest.defines' and
18872# `conftest.undefs', that substitutes the proper values into
18873# config.h.in to produce config.h. The first handles `#define'
18874# templates, and the second `#undef' templates.
18875# And first: Protect against being on the right side of a sed subst in
18876# config.status. Protect against being in an unquoted here document
18877# in config.status.
18878rm -f conftest.defines conftest.undefs
18879# Using a here document instead of a string reduces the quoting nightmare.
18880# Putting comments in sed scripts is not portable.
18881#
18882# `end' is used to avoid that the second main sed command (meant for
18883# 0-ary CPP macros) applies to n-ary macro definitions.
18884# See the Autoconf documentation for `clear'.
c0d27fcc 18885cat >confdef2sed.sed <<\_ACEOF
503d2be0
AS
18886s/[\\&,]/\\&/g
18887s,[\\$`],\\&,g
18888t clear
18889: clear
c0d27fcc 18890s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
503d2be0
AS
18891t end
18892s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18893: end
c0d27fcc 18894_ACEOF
503d2be0
AS
18895# If some macros were called several times there might be several times
18896# the same #defines, which is useless. Nevertheless, we may not want to
18897# sort them, since we want the *last* AC-DEFINE to be honored.
18898uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18899sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18900rm -f confdef2sed.sed
ba4481b5
DL
18901
18902# This sed command replaces #undef with comments. This is necessary, for
18903# example, in the case of _POSIX_SOURCE, which is predefined and required
18904# on some systems where configure will not decide to define it.
c0d27fcc 18905cat >>conftest.undefs <<\_ACEOF
503d2be0 18906s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
c0d27fcc 18907_ACEOF
ba4481b5 18908
503d2be0
AS
18909# Break up conftest.defines because some shells have a limit on the size
18910# of here documents, and old seds have small limits too (100 cmds).
18911echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
6bae0ccf 18912echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
503d2be0
AS
18913echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18914echo ' :' >>$CONFIG_STATUS
18915rm -f conftest.tail
18916while grep . conftest.defines >/dev/null
18917do
18918 # Write a limited-size here document to $tmp/defines.sed.
18919 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18920 # Speed up: don't consider the non `#define' lines.
18921 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
18922 # Work around the forget-to-reset-the-flag bug.
18923 echo 't clr' >>$CONFIG_STATUS
18924 echo ': clr' >>$CONFIG_STATUS
18925 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
18926 echo 'CEOF
18927 sed -f $tmp/defines.sed $tmp/in >$tmp/out
18928 rm -f $tmp/in
18929 mv $tmp/out $tmp/in
18930' >>$CONFIG_STATUS
18931 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
18932 rm -f conftest.defines
18933 mv conftest.tail conftest.defines
18934done
18935rm -f conftest.defines
6bae0ccf 18936echo ' fi # grep' >>$CONFIG_STATUS
503d2be0 18937echo >>$CONFIG_STATUS
ba4481b5 18938
503d2be0
AS
18939# Break up conftest.undefs because some shells have a limit on the size
18940# of here documents, and old seds have small limits too (100 cmds).
18941echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
ba4481b5 18942rm -f conftest.tail
503d2be0 18943while grep . conftest.undefs >/dev/null
ba4481b5 18944do
503d2be0
AS
18945 # Write a limited-size here document to $tmp/undefs.sed.
18946 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18947 # Speed up: don't consider the non `#undef'
18948 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
18949 # Work around the forget-to-reset-the-flag bug.
18950 echo 't clr' >>$CONFIG_STATUS
18951 echo ': clr' >>$CONFIG_STATUS
18952 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
ba4481b5 18953 echo 'CEOF
503d2be0
AS
18954 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
18955 rm -f $tmp/in
18956 mv $tmp/out $tmp/in
18957' >>$CONFIG_STATUS
18958 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
18959 rm -f conftest.undefs
18960 mv conftest.tail conftest.undefs
ba4481b5 18961done
503d2be0
AS
18962rm -f conftest.undefs
18963
c0d27fcc 18964cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
18965 # Let's still pretend it is `configure' which instantiates (i.e., don't
18966 # use $as_me), people would be surprised to read:
c0d27fcc 18967 # /* config.h. Generated by config.status. */
503d2be0 18968 if test x"$ac_file" = x-; then
c0d27fcc 18969 echo "/* Generated by configure. */" >$tmp/config.h
ba4481b5 18970 else
c0d27fcc 18971 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
503d2be0
AS
18972 fi
18973 cat $tmp/in >>$tmp/config.h
18974 rm -f $tmp/in
18975 if test x"$ac_file" != x-; then
cd958eb3 18976 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
c0d27fcc 18977 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
18978echo "$as_me: $ac_file is unchanged" >&6;}
18979 else
c0d27fcc
MR
18980 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18981$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
503d2be0
AS
18982 X"$ac_file" : 'X\(//\)[^/]' \| \
18983 X"$ac_file" : 'X\(//\)$' \| \
18984 X"$ac_file" : 'X\(/\)' \| \
18985 . : '\(.\)' 2>/dev/null ||
18986echo X"$ac_file" |
18987 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18988 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18989 /^X\(\/\/\)$/{ s//\1/; q; }
18990 /^X\(\/\).*/{ s//\1/; q; }
18991 s/.*/./; q'`
6bae0ccf
DL
18992 { if $as_mkdir_p; then
18993 mkdir -p "$ac_dir"
18994 else
18995 as_dir="$ac_dir"
18996 as_dirs=
18997 while test ! -d "$as_dir"; do
18998 as_dirs="$as_dir $as_dirs"
18999 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19000$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19001 X"$as_dir" : 'X\(//\)[^/]' \| \
19002 X"$as_dir" : 'X\(//\)$' \| \
19003 X"$as_dir" : 'X\(/\)' \| \
19004 . : '\(.\)' 2>/dev/null ||
19005echo X"$as_dir" |
19006 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19007 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19008 /^X\(\/\/\)$/{ s//\1/; q; }
19009 /^X\(\/\).*/{ s//\1/; q; }
19010 s/.*/./; q'`
19011 done
19012 test ! -n "$as_dirs" || mkdir $as_dirs
19013 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19014echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19015 { (exit 1); exit 1; }; }; }
503d2be0 19016
503d2be0
AS
19017 rm -f $ac_file
19018 mv $tmp/config.h $ac_file
ba4481b5 19019 fi
503d2be0
AS
19020 else
19021 cat $tmp/config.h
19022 rm -f $tmp/config.h
ba4481b5 19023 fi
503d2be0 19024done
c0d27fcc
MR
19025_ACEOF
19026cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
19027
19028#
19029# CONFIG_COMMANDS section.
19030#
19031for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19032 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19033 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
c0d27fcc
MR
19034 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
19035$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19036 X"$ac_dest" : 'X\(//\)[^/]' \| \
19037 X"$ac_dest" : 'X\(//\)$' \| \
19038 X"$ac_dest" : 'X\(/\)' \| \
19039 . : '\(.\)' 2>/dev/null ||
19040echo X"$ac_dest" |
19041 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19042 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19043 /^X\(\/\/\)$/{ s//\1/; q; }
19044 /^X\(\/\).*/{ s//\1/; q; }
19045 s/.*/./; q'`
19046 ac_builddir=.
19047
19048if test "$ac_dir" != .; then
19049 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19050 # A "../" for each directory in $ac_dir_suffix.
19051 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19052else
19053 ac_dir_suffix= ac_top_builddir=
19054fi
19055
19056case $srcdir in
19057 .) # No --srcdir option. We are building in place.
19058 ac_srcdir=.
19059 if test -z "$ac_top_builddir"; then
19060 ac_top_srcdir=.
19061 else
19062 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19063 fi ;;
19064 [\\/]* | ?:[\\/]* ) # Absolute path.
19065 ac_srcdir=$srcdir$ac_dir_suffix;
19066 ac_top_srcdir=$srcdir ;;
19067 *) # Relative path.
19068 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19069 ac_top_srcdir=$ac_top_builddir$srcdir ;;
19070esac
19071# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
19072# absolute.
19073ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
6bae0ccf 19074ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
c0d27fcc
MR
19075ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
19076ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
ba4481b5 19077
c0d27fcc
MR
19078
19079 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
19080echo "$as_me: executing $ac_dest commands" >&6;}
503d2be0
AS
19081 case $ac_dest in
19082 default )
ba4481b5
DL
19083
19084### Make the necessary directories, if they don't exist.
19085for dir in etc lisp ; do
19086 test -d ${dir} || mkdir ${dir}
19087done
19088
19089# Build src/Makefile from ${srcdir}/src/Makefile.c
19090# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
19091# This must be done after src/config.h is built, since we rely on that file.
19092
19093# Now get this: Some word that is part of the ${srcdir} directory name
19094# or the ${configuration} value might, just might, happen to be an
19095# identifier like `sun4' or `i386' or something, and be predefined by
19096# the C preprocessor to some helpful value like 1, or maybe the empty
19097# string. Needless to say consequent macro substitutions are less
19098# than conducive to the makefile finding the correct directory.
19099undefs="`echo $top_srcdir $configuration $canonical |
19100sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
19101 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
19102`"
19103
19104echo creating src/epaths.h
4aa6b955 19105${MAKE-make} epaths-force
ba4481b5 19106
1c203d4c
DL
19107# As of 2000-11-19, newest development versions of GNU cpp preprocess
19108# `..' to `. .' unless invoked with -traditional
19109
d0e9bfd2 19110if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
19111 CPPFLAGS="$CPPFLAGS -traditional"
19112fi
19113
ba4481b5
DL
19114echo creating lib-src/Makefile
19115( cd lib-src
19116 rm -f junk.c junk1.c junk2.c
19117 sed -e '/start of cpp stuff/q' \
19118 < Makefile.c > junk1.c
19119 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 19120 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 19121 < Makefile.c > junk.c
503d2be0 19122 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
19123 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
19124 cat junk1.c junk2.c > Makefile.new
19125 rm -f junk.c junk1.c junk2.c
19126 chmod 444 Makefile.new
19127 mv -f Makefile.new Makefile
19128)
19129
19130echo creating src/Makefile
19131( cd src
19132 rm -f junk.c junk1.c junk2.c
19133 sed -e '/start of cpp stuff/q' \
19134 < Makefile.c > junk1.c
19135 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 19136 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 19137 < Makefile.c > junk.c
503d2be0 19138 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
19139 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
19140 cat junk1.c junk2.c > Makefile.new
19141 rm -f junk.c junk1.c junk2.c
19142 chmod 444 Makefile.new
19143 mv -f Makefile.new Makefile
19144)
19145
503d2be0 19146if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 19147 echo creating src/.gdbinit
503d2be0 19148 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
19149fi
19150
19151# This is how we know whether to re-run configure in certain cases.
19152touch src/config.stamp
19153
503d2be0
AS
19154 ;;
19155 esac
19156done
c0d27fcc 19157_ACEOF
503d2be0 19158
c0d27fcc 19159cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 19160
503d2be0 19161{ (exit 0); exit 0; }
c0d27fcc 19162_ACEOF
ba4481b5 19163chmod +x $CONFIG_STATUS
503d2be0
AS
19164ac_clean_files=$ac_clean_files_save
19165
c0d27fcc 19166
503d2be0
AS
19167# configure is writing to config.log, and then calls config.status.
19168# config.status does its own redirection, appending to config.log.
19169# Unfortunately, on DOS this fails, as config.log is still kept open
19170# by configure, so config.status won't be able to write to it; its
19171# output is simply discarded. So we exec the FD to /dev/null,
19172# effectively closing config.log, so it can be properly (re)opened and
19173# appended to by config.status. When coming back to configure, we
19174# need to make the FD available again.
19175if test "$no_create" != yes; then
19176 ac_cs_success=:
cd958eb3
MB
19177 ac_config_status_args=
19178 test "$silent" = yes &&
19179 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 19180 exec 5>/dev/null
cd958eb3 19181 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
19182 exec 5>>config.log
19183 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19184 # would make configure fail if this is the last instruction.
19185 $ac_cs_success || { (exit 1); exit 1; }
19186fi
f5f47add 19187
c0d27fcc 19188