(Fkeymap_prompt): Accept symbol keymaps.
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
35996d22 3# Generated by GNU Autoconf 2.59.
ba4481b5 4#
35996d22 5# Copyright (C) 2003 Free Software Foundation, Inc.
ba4481b5
DL
6# This configure script is free software; the Free Software Foundation
7# gives unlimited permission to copy, distribute and modify it.
c0d27fcc
MR
8## --------------------- ##
9## M4sh Initialization. ##
10## --------------------- ##
503d2be0
AS
11
12# Be Bourne compatible
13if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14 emulate sh
15 NULLCMD=:
6bae0ccf
DL
16 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17 # is contrary to our usage. Disable this feature.
18 alias -g '${1+"$@"}'='"$@"'
503d2be0
AS
19elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20 set -o posix
21fi
35996d22 22DUALCASE=1; export DUALCASE # for MKS sh
503d2be0 23
c0d27fcc 24# Support unset when possible.
35996d22 25if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
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.
19650fd6
AS
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 43do
35996d22 44 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
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
19650fd6
AS
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
19650fd6 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
35996d22 221 test -d ./-p && rmdir ./-p
6bae0ccf
DL
222 as_mkdir_p=false
223fi
224
503d2be0
AS
225as_executable_p="test -f"
226
c0d27fcc 227# Sed expression to map a string onto a valid CPP name.
35996d22 228as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
229
230# Sed expression to map a string onto a valid variable name.
35996d22 231as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 232
503d2be0
AS
233
234# IFS
235# We need space, tab and new line, in precisely that order.
236as_nl='
237'
238IFS=" $as_nl"
239
240# CDPATH.
6bae0ccf 241$as_unset CDPATH
c0d27fcc 242
503d2be0
AS
243
244# Name of the host.
245# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246# so uname gets run too.
247ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
249exec 6>&1
250
251#
252# Initializations.
253#
ba4481b5 254ac_default_prefix=/usr/local
6bae0ccf 255ac_config_libobj_dir=.
503d2be0
AS
256cross_compiling=no
257subdirs=
c0d27fcc
MR
258MFLAGS=
259MAKEFLAGS=
503d2be0
AS
260SHELL=${CONFIG_SHELL-/bin/sh}
261
262# Maximum number of lines to put in a shell here document.
263# This variable seems obsolete. It should probably be removed, and
264# only ac_max_sed_lines should be used.
265: ${ac_max_here_lines=38}
266
c0d27fcc
MR
267# Identity of this package.
268PACKAGE_NAME=
269PACKAGE_TARNAME=
270PACKAGE_VERSION=
271PACKAGE_STRING=
272PACKAGE_BUGREPORT=
273
503d2be0 274ac_unique_file="src/lisp.h"
6bae0ccf 275ac_config_libobj_dir=src
503d2be0
AS
276# Factoring default headers for most tests.
277ac_includes_default="\
278#include <stdio.h>
279#if HAVE_SYS_TYPES_H
280# include <sys/types.h>
281#endif
282#if HAVE_SYS_STAT_H
283# include <sys/stat.h>
284#endif
285#if STDC_HEADERS
286# include <stdlib.h>
287# include <stddef.h>
288#else
289# if HAVE_STDLIB_H
290# include <stdlib.h>
291# endif
292#endif
293#if HAVE_STRING_H
294# if !STDC_HEADERS && HAVE_MEMORY_H
295# include <memory.h>
296# endif
297# include <string.h>
298#endif
299#if HAVE_STRINGS_H
300# include <strings.h>
301#endif
302#if HAVE_INTTYPES_H
303# include <inttypes.h>
304#else
305# if HAVE_STDINT_H
306# include <stdint.h>
307# endif
308#endif
309#if HAVE_UNISTD_H
310# include <unistd.h>
311#endif"
ba4481b5 312
f17e308a 313ac_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 MAINT 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 PKG_CONFIG GTK_CFLAGS GTK_LIBS 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 314ac_subst_files=''
c0d27fcc 315
ba4481b5 316# Initialize some variables set by options.
503d2be0
AS
317ac_init_help=
318ac_init_version=false
ba4481b5
DL
319# The variables have the same names as the options, with
320# dashes changed to underlines.
503d2be0 321cache_file=/dev/null
ba4481b5 322exec_prefix=NONE
ba4481b5 323no_create=
ba4481b5
DL
324no_recursion=
325prefix=NONE
326program_prefix=NONE
327program_suffix=NONE
328program_transform_name=s,x,x,
329silent=
330site=
331srcdir=
ba4481b5
DL
332verbose=
333x_includes=NONE
334x_libraries=NONE
503d2be0
AS
335
336# Installation directory options.
337# These are left unexpanded so users can "make install exec_prefix=/foo"
338# and all the variables that are supposed to be based on exec_prefix
339# by default will actually change.
340# Use braces instead of parens because sh, perl, etc. also accept them.
ba4481b5
DL
341bindir='${exec_prefix}/bin'
342sbindir='${exec_prefix}/sbin'
343libexecdir='${exec_prefix}/libexec'
344datadir='${prefix}/share'
345sysconfdir='${prefix}/etc'
346sharedstatedir='${prefix}/com'
347localstatedir='${prefix}/var'
348libdir='${exec_prefix}/lib'
349includedir='${prefix}/include'
350oldincludedir='/usr/include'
351infodir='${prefix}/info'
352mandir='${prefix}/man'
353
ba4481b5
DL
354ac_prev=
355for ac_option
356do
ba4481b5
DL
357 # If the previous option needs an argument, assign it.
358 if test -n "$ac_prev"; then
359 eval "$ac_prev=\$ac_option"
360 ac_prev=
361 continue
362 fi
363
503d2be0 364 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
ba4481b5
DL
365
366 # Accept the important Cygnus configure options, so we can diagnose typos.
367
503d2be0 368 case $ac_option in
ba4481b5
DL
369
370 -bindir | --bindir | --bindi | --bind | --bin | --bi)
371 ac_prev=bindir ;;
372 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 373 bindir=$ac_optarg ;;
ba4481b5
DL
374
375 -build | --build | --buil | --bui | --bu)
503d2be0 376 ac_prev=build_alias ;;
ba4481b5 377 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 378 build_alias=$ac_optarg ;;
ba4481b5
DL
379
380 -cache-file | --cache-file | --cache-fil | --cache-fi \
381 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
382 ac_prev=cache_file ;;
383 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
384 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
385 cache_file=$ac_optarg ;;
386
387 --config-cache | -C)
388 cache_file=config.cache ;;
ba4481b5
DL
389
390 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
391 ac_prev=datadir ;;
392 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
393 | --da=*)
503d2be0 394 datadir=$ac_optarg ;;
ba4481b5
DL
395
396 -disable-* | --disable-*)
503d2be0 397 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 398 # Reject names that are not valid shell variable names.
503d2be0
AS
399 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
400 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
401 { (exit 1); exit 1; }; }
402 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
403 eval "enable_$ac_feature=no" ;;
ba4481b5
DL
404
405 -enable-* | --enable-*)
503d2be0 406 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 407 # Reject names that are not valid shell variable names.
503d2be0
AS
408 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
409 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
410 { (exit 1); exit 1; }; }
411 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
412 case $ac_option in
413 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
ba4481b5
DL
414 *) ac_optarg=yes ;;
415 esac
503d2be0 416 eval "enable_$ac_feature='$ac_optarg'" ;;
ba4481b5
DL
417
418 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
419 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
420 | --exec | --exe | --ex)
421 ac_prev=exec_prefix ;;
422 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
423 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
424 | --exec=* | --exe=* | --ex=*)
503d2be0 425 exec_prefix=$ac_optarg ;;
ba4481b5
DL
426
427 -gas | --gas | --ga | --g)
428 # Obsolete; use --with-gas.
429 with_gas=yes ;;
430
503d2be0
AS
431 -help | --help | --hel | --he | -h)
432 ac_init_help=long ;;
433 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
434 ac_init_help=recursive ;;
435 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
436 ac_init_help=short ;;
ba4481b5
DL
437
438 -host | --host | --hos | --ho)
503d2be0 439 ac_prev=host_alias ;;
ba4481b5 440 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 441 host_alias=$ac_optarg ;;
ba4481b5
DL
442
443 -includedir | --includedir | --includedi | --included | --include \
444 | --includ | --inclu | --incl | --inc)
445 ac_prev=includedir ;;
446 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
447 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 448 includedir=$ac_optarg ;;
ba4481b5
DL
449
450 -infodir | --infodir | --infodi | --infod | --info | --inf)
451 ac_prev=infodir ;;
452 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 453 infodir=$ac_optarg ;;
ba4481b5
DL
454
455 -libdir | --libdir | --libdi | --libd)
456 ac_prev=libdir ;;
457 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 458 libdir=$ac_optarg ;;
ba4481b5
DL
459
460 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
461 | --libexe | --libex | --libe)
462 ac_prev=libexecdir ;;
463 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
464 | --libexe=* | --libex=* | --libe=*)
503d2be0 465 libexecdir=$ac_optarg ;;
ba4481b5
DL
466
467 -localstatedir | --localstatedir | --localstatedi | --localstated \
468 | --localstate | --localstat | --localsta | --localst \
469 | --locals | --local | --loca | --loc | --lo)
470 ac_prev=localstatedir ;;
471 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
472 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
473 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
503d2be0 474 localstatedir=$ac_optarg ;;
ba4481b5
DL
475
476 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
477 ac_prev=mandir ;;
478 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 479 mandir=$ac_optarg ;;
ba4481b5
DL
480
481 -nfp | --nfp | --nf)
482 # Obsolete; use --without-fp.
483 with_fp=no ;;
484
485 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 486 | --no-cr | --no-c | -n)
ba4481b5
DL
487 no_create=yes ;;
488
489 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
490 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
491 no_recursion=yes ;;
492
493 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
494 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
495 | --oldin | --oldi | --old | --ol | --o)
496 ac_prev=oldincludedir ;;
497 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
498 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
499 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 500 oldincludedir=$ac_optarg ;;
ba4481b5
DL
501
502 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
503 ac_prev=prefix ;;
504 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 505 prefix=$ac_optarg ;;
ba4481b5
DL
506
507 -program-prefix | --program-prefix | --program-prefi | --program-pref \
508 | --program-pre | --program-pr | --program-p)
509 ac_prev=program_prefix ;;
510 -program-prefix=* | --program-prefix=* | --program-prefi=* \
511 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 512 program_prefix=$ac_optarg ;;
ba4481b5
DL
513
514 -program-suffix | --program-suffix | --program-suffi | --program-suff \
515 | --program-suf | --program-su | --program-s)
516 ac_prev=program_suffix ;;
517 -program-suffix=* | --program-suffix=* | --program-suffi=* \
518 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 519 program_suffix=$ac_optarg ;;
ba4481b5
DL
520
521 -program-transform-name | --program-transform-name \
522 | --program-transform-nam | --program-transform-na \
523 | --program-transform-n | --program-transform- \
524 | --program-transform | --program-transfor \
525 | --program-transfo | --program-transf \
526 | --program-trans | --program-tran \
527 | --progr-tra | --program-tr | --program-t)
528 ac_prev=program_transform_name ;;
529 -program-transform-name=* | --program-transform-name=* \
530 | --program-transform-nam=* | --program-transform-na=* \
531 | --program-transform-n=* | --program-transform-=* \
532 | --program-transform=* | --program-transfor=* \
533 | --program-transfo=* | --program-transf=* \
534 | --program-trans=* | --program-tran=* \
535 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 536 program_transform_name=$ac_optarg ;;
ba4481b5
DL
537
538 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
539 | -silent | --silent | --silen | --sile | --sil)
540 silent=yes ;;
541
542 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
543 ac_prev=sbindir ;;
544 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
545 | --sbi=* | --sb=*)
503d2be0 546 sbindir=$ac_optarg ;;
ba4481b5
DL
547
548 -sharedstatedir | --sharedstatedir | --sharedstatedi \
549 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
550 | --sharedst | --shareds | --shared | --share | --shar \
551 | --sha | --sh)
552 ac_prev=sharedstatedir ;;
553 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
554 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
555 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
556 | --sha=* | --sh=*)
503d2be0 557 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
558
559 -site | --site | --sit)
560 ac_prev=site ;;
561 -site=* | --site=* | --sit=*)
503d2be0 562 site=$ac_optarg ;;
ba4481b5
DL
563
564 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
565 ac_prev=srcdir ;;
566 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 567 srcdir=$ac_optarg ;;
ba4481b5
DL
568
569 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
570 | --syscon | --sysco | --sysc | --sys | --sy)
571 ac_prev=sysconfdir ;;
572 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
573 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 574 sysconfdir=$ac_optarg ;;
ba4481b5
DL
575
576 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 577 ac_prev=target_alias ;;
ba4481b5 578 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 579 target_alias=$ac_optarg ;;
ba4481b5
DL
580
581 -v | -verbose | --verbose | --verbos | --verbo | --verb)
582 verbose=yes ;;
583
503d2be0
AS
584 -version | --version | --versio | --versi | --vers | -V)
585 ac_init_version=: ;;
ba4481b5
DL
586
587 -with-* | --with-*)
503d2be0 588 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 589 # Reject names that are not valid shell variable names.
503d2be0
AS
590 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
591 { echo "$as_me: error: invalid package name: $ac_package" >&2
592 { (exit 1); exit 1; }; }
ba4481b5 593 ac_package=`echo $ac_package| sed 's/-/_/g'`
503d2be0
AS
594 case $ac_option in
595 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
ba4481b5
DL
596 *) ac_optarg=yes ;;
597 esac
503d2be0 598 eval "with_$ac_package='$ac_optarg'" ;;
ba4481b5
DL
599
600 -without-* | --without-*)
503d2be0 601 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 602 # Reject names that are not valid shell variable names.
503d2be0
AS
603 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
604 { echo "$as_me: error: invalid package name: $ac_package" >&2
605 { (exit 1); exit 1; }; }
606 ac_package=`echo $ac_package | sed 's/-/_/g'`
607 eval "with_$ac_package=no" ;;
ba4481b5
DL
608
609 --x)
610 # Obsolete; use --with-x.
611 with_x=yes ;;
612
613 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
614 | --x-incl | --x-inc | --x-in | --x-i)
615 ac_prev=x_includes ;;
616 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
617 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 618 x_includes=$ac_optarg ;;
ba4481b5
DL
619
620 -x-libraries | --x-libraries | --x-librarie | --x-librari \
621 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
622 ac_prev=x_libraries ;;
623 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
624 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 625 x_libraries=$ac_optarg ;;
ba4481b5 626
503d2be0
AS
627 -*) { echo "$as_me: error: unrecognized option: $ac_option
628Try \`$0 --help' for more information." >&2
629 { (exit 1); exit 1; }; }
ba4481b5
DL
630 ;;
631
503d2be0
AS
632 *=*)
633 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
634 # Reject names that are not valid shell variable names.
635 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
636 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
637 { (exit 1); exit 1; }; }
638 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
639 eval "$ac_envvar='$ac_optarg'"
640 export $ac_envvar ;;
641
ba4481b5 642 *)
503d2be0
AS
643 # FIXME: should be removed in autoconf 3.0.
644 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
645 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
646 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
647 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
648 ;;
649
650 esac
651done
652
653if test -n "$ac_prev"; then
503d2be0
AS
654 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
655 { echo "$as_me: error: missing argument to $ac_option" >&2
656 { (exit 1); exit 1; }; }
ba4481b5 657fi
ba4481b5 658
503d2be0
AS
659# Be sure to have absolute paths.
660for ac_var in exec_prefix prefix
661do
662 eval ac_val=$`echo $ac_var`
663 case $ac_val in
664 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
c0d27fcc 665 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
503d2be0
AS
666 { (exit 1); exit 1; }; };;
667 esac
668done
ba4481b5 669
503d2be0
AS
670# Be sure to have absolute paths.
671for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
35996d22 672 localstatedir libdir includedir oldincludedir infodir mandir
ba4481b5 673do
503d2be0
AS
674 eval ac_val=$`echo $ac_var`
675 case $ac_val in
676 [\\/$]* | ?:[\\/]* ) ;;
c0d27fcc 677 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
503d2be0 678 { (exit 1); exit 1; }; };;
ba4481b5
DL
679 esac
680done
681
503d2be0
AS
682# There might be people who depend on the old broken behavior: `$host'
683# used to hold the argument of --host etc.
c0d27fcc 684# FIXME: To remove some day.
503d2be0
AS
685build=$build_alias
686host=$host_alias
687target=$target_alias
688
c0d27fcc 689# FIXME: To remove some day.
503d2be0
AS
690if test "x$host_alias" != x; then
691 if test "x$build_alias" = x; then
692 cross_compiling=maybe
693 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
694 If a cross compiler is detected then cross compile mode will be used." >&2
695 elif test "x$build_alias" != "x$host_alias"; then
696 cross_compiling=yes
697 fi
698fi
ba4481b5 699
503d2be0
AS
700ac_tool_prefix=
701test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 702
503d2be0 703test "$silent" = yes && exec 6>/dev/null
ba4481b5 704
c0d27fcc 705
ba4481b5
DL
706# Find the source files, if location was not specified.
707if test -z "$srcdir"; then
708 ac_srcdir_defaulted=yes
709 # Try the directory containing this script, then its parent.
c0d27fcc
MR
710 ac_confdir=`(dirname "$0") 2>/dev/null ||
711$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
712 X"$0" : 'X\(//\)[^/]' \| \
713 X"$0" : 'X\(//\)$' \| \
714 X"$0" : 'X\(/\)' \| \
715 . : '\(.\)' 2>/dev/null ||
c0d27fcc
MR
716echo X"$0" |
717 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
718 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
719 /^X\(\/\/\)$/{ s//\1/; q; }
720 /^X\(\/\).*/{ s//\1/; q; }
721 s/.*/./; q'`
ba4481b5
DL
722 srcdir=$ac_confdir
723 if test ! -r $srcdir/$ac_unique_file; then
724 srcdir=..
725 fi
726else
727 ac_srcdir_defaulted=no
728fi
729if test ! -r $srcdir/$ac_unique_file; then
730 if test "$ac_srcdir_defaulted" = yes; then
c0d27fcc 731 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
503d2be0 732 { (exit 1); exit 1; }; }
ba4481b5 733 else
c0d27fcc 734 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
503d2be0 735 { (exit 1); exit 1; }; }
ba4481b5
DL
736 fi
737fi
6bae0ccf
DL
738(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
739 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
740 { (exit 1); exit 1; }; }
503d2be0
AS
741srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
742ac_env_build_alias_set=${build_alias+set}
743ac_env_build_alias_value=$build_alias
744ac_cv_env_build_alias_set=${build_alias+set}
745ac_cv_env_build_alias_value=$build_alias
746ac_env_host_alias_set=${host_alias+set}
747ac_env_host_alias_value=$host_alias
748ac_cv_env_host_alias_set=${host_alias+set}
749ac_cv_env_host_alias_value=$host_alias
750ac_env_target_alias_set=${target_alias+set}
751ac_env_target_alias_value=$target_alias
752ac_cv_env_target_alias_set=${target_alias+set}
753ac_cv_env_target_alias_value=$target_alias
754ac_env_CC_set=${CC+set}
755ac_env_CC_value=$CC
756ac_cv_env_CC_set=${CC+set}
757ac_cv_env_CC_value=$CC
758ac_env_CFLAGS_set=${CFLAGS+set}
759ac_env_CFLAGS_value=$CFLAGS
760ac_cv_env_CFLAGS_set=${CFLAGS+set}
761ac_cv_env_CFLAGS_value=$CFLAGS
762ac_env_LDFLAGS_set=${LDFLAGS+set}
763ac_env_LDFLAGS_value=$LDFLAGS
764ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
765ac_cv_env_LDFLAGS_value=$LDFLAGS
766ac_env_CPPFLAGS_set=${CPPFLAGS+set}
767ac_env_CPPFLAGS_value=$CPPFLAGS
768ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
769ac_cv_env_CPPFLAGS_value=$CPPFLAGS
770ac_env_CPP_set=${CPP+set}
771ac_env_CPP_value=$CPP
772ac_cv_env_CPP_set=${CPP+set}
773ac_cv_env_CPP_value=$CPP
774
775#
776# Report the --help message.
777#
778if test "$ac_init_help" = "long"; then
779 # Omit some internal or obsolete options to make the list less imposing.
780 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 781 cat <<_ACEOF
503d2be0
AS
782\`configure' configures this package to adapt to many kinds of systems.
783
784Usage: $0 [OPTION]... [VAR=VALUE]...
785
786To assign environment variables (e.g., CC, CFLAGS...), specify them as
787VAR=VALUE. See below for descriptions of some of the useful variables.
788
789Defaults for the options are specified in brackets.
790
791Configuration:
792 -h, --help display this help and exit
793 --help=short display options specific to this package
794 --help=recursive display the short help of all the included packages
795 -V, --version display version information and exit
796 -q, --quiet, --silent do not print \`checking...' messages
797 --cache-file=FILE cache test results in FILE [disabled]
798 -C, --config-cache alias for \`--cache-file=config.cache'
799 -n, --no-create do not create output files
800 --srcdir=DIR find the sources in DIR [configure dir or \`..']
801
c0d27fcc 802_ACEOF
503d2be0 803
c0d27fcc 804 cat <<_ACEOF
503d2be0
AS
805Installation directories:
806 --prefix=PREFIX install architecture-independent files in PREFIX
35996d22 807 [$ac_default_prefix]
503d2be0 808 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
35996d22 809 [PREFIX]
503d2be0
AS
810
811By default, \`make install' will install all the files in
812\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
813an installation prefix other than \`$ac_default_prefix' using \`--prefix',
814for instance \`--prefix=\$HOME'.
815
816For better control, use the options below.
817
818Fine tuning of the installation directories:
819 --bindir=DIR user executables [EPREFIX/bin]
820 --sbindir=DIR system admin executables [EPREFIX/sbin]
821 --libexecdir=DIR program executables [EPREFIX/libexec]
822 --datadir=DIR read-only architecture-independent data [PREFIX/share]
823 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
824 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
825 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
826 --libdir=DIR object code libraries [EPREFIX/lib]
827 --includedir=DIR C header files [PREFIX/include]
828 --oldincludedir=DIR C header files for non-gcc [/usr/include]
829 --infodir=DIR info documentation [PREFIX/info]
830 --mandir=DIR man documentation [PREFIX/man]
c0d27fcc 831_ACEOF
503d2be0 832
c0d27fcc 833 cat <<\_ACEOF
503d2be0 834
ba5da88a
PJ
835Program names:
836 --program-prefix=PREFIX prepend PREFIX to installed program names
837 --program-suffix=SUFFIX append SUFFIX to installed program names
838 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
839
503d2be0
AS
840X features:
841 --x-includes=DIR X include files are in DIR
842 --x-libraries=DIR X library files are in DIR
843
844System types:
845 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
846 --host=HOST cross-compile to build programs to run on HOST [BUILD]
847_ACEOF
503d2be0
AS
848fi
849
850if test -n "$ac_init_help"; then
851
c0d27fcc 852 cat <<\_ACEOF
503d2be0
AS
853
854Optional Features:
855 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
856 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
6a3a24fa
JD
857 --enable-carbon-app[=DIR] [DIR=/Application]
858 specify install directory for Emacs.app on Mac OS X
19650fd6
AS
859 --enable-maintainer-mode enable make rules and dependencies not useful
860 (and sometimes confusing) to the casual installer
503d2be0
AS
861 --disable-largefile omit support for large files
862
863Optional Packages:
864 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
865 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
866 --without-gcc don't use GCC to compile Emacs if GCC is found
867 --without-pop don't support POP mail retrieval with movemail
868 --with-kerberos support Kerberos-authenticated POP
869 --with-kerberos5 support Kerberos version 5 authenticated POP
870 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 871 --without-sound don't compile with sound support
488dd4c4
JD
872 --with-x-toolkit=KIT use an X toolkit
873 (KIT = yes/lucid/athena/motif/gtk/no)
503d2be0
AS
874 --with-xpm use -lXpm for displaying XPM images
875 --with-jpeg use -ljpeg for displaying JPEG images
876 --with-tiff use -ltiff for displaying TIFF images
877 --with-gif use -lungif for displaying GIF images
878 --with-png use -lpng for displaying PNG images
488dd4c4
JD
879 --with-gtk use GTK (same as --with-x-toolkit=gtk)
880 --with-pkg-config-prog Path to pkg-config to use for finding GTK
503d2be0 881 --without-toolkit-scroll-bars
cc227489
MB
882 don't use Motif or Xaw3d scroll bars
883 --without-xim don't use X11 XIM
e0f712ba 884 --without-carbon don't use Carbon GUI on Mac OS X
503d2be0
AS
885 --with-x use the X Window System
886
887Some influential environment variables:
888 CC C compiler command
889 CFLAGS C compiler flags
890 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
891 nonstandard directory <lib dir>
892 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
893 headers in a nonstandard directory <include dir>
894 CPP C preprocessor
895
896Use these variables to override the choices made by `configure' or to help
897it to find libraries and programs with nonstandard names/locations.
898
c0d27fcc 899_ACEOF
503d2be0
AS
900fi
901
902if test "$ac_init_help" = "recursive"; then
903 # If there are subdirs, report their specific --help.
904 ac_popdir=`pwd`
c0d27fcc
MR
905 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
906 test -d $ac_dir || continue
907 ac_builddir=.
908
909if test "$ac_dir" != .; then
910 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
911 # A "../" for each directory in $ac_dir_suffix.
912 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
913else
914 ac_dir_suffix= ac_top_builddir=
915fi
503d2be0 916
c0d27fcc
MR
917case $srcdir in
918 .) # No --srcdir option. We are building in place.
919 ac_srcdir=.
920 if test -z "$ac_top_builddir"; then
921 ac_top_srcdir=.
922 else
923 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
924 fi ;;
925 [\\/]* | ?:[\\/]* ) # Absolute path.
926 ac_srcdir=$srcdir$ac_dir_suffix;
927 ac_top_srcdir=$srcdir ;;
928 *) # Relative path.
929 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
930 ac_top_srcdir=$ac_top_builddir$srcdir ;;
931esac
35996d22
AS
932
933# Do not use `cd foo && pwd` to compute absolute paths, because
934# the directories may not exist.
935case `pwd` in
936.) ac_abs_builddir="$ac_dir";;
937*)
938 case "$ac_dir" in
939 .) ac_abs_builddir=`pwd`;;
940 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
941 *) ac_abs_builddir=`pwd`/"$ac_dir";;
942 esac;;
943esac
944case $ac_abs_builddir in
945.) ac_abs_top_builddir=${ac_top_builddir}.;;
946*)
947 case ${ac_top_builddir}. in
948 .) ac_abs_top_builddir=$ac_abs_builddir;;
949 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
950 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
951 esac;;
952esac
953case $ac_abs_builddir in
954.) ac_abs_srcdir=$ac_srcdir;;
955*)
956 case $ac_srcdir in
957 .) ac_abs_srcdir=$ac_abs_builddir;;
958 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
959 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
960 esac;;
961esac
962case $ac_abs_builddir in
963.) ac_abs_top_srcdir=$ac_top_srcdir;;
964*)
965 case $ac_top_srcdir in
966 .) ac_abs_top_srcdir=$ac_abs_builddir;;
967 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
968 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
969 esac;;
970esac
c0d27fcc
MR
971
972 cd $ac_dir
503d2be0 973 # Check for guested configure; otherwise get Cygnus style configure.
c0d27fcc 974 if test -f $ac_srcdir/configure.gnu; then
503d2be0 975 echo
c0d27fcc
MR
976 $SHELL $ac_srcdir/configure.gnu --help=recursive
977 elif test -f $ac_srcdir/configure; then
503d2be0 978 echo
c0d27fcc
MR
979 $SHELL $ac_srcdir/configure --help=recursive
980 elif test -f $ac_srcdir/configure.ac ||
35996d22 981 test -f $ac_srcdir/configure.in; then
503d2be0
AS
982 echo
983 $ac_configure --help
984 else
c0d27fcc 985 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
503d2be0 986 fi
4494a266 987 cd $ac_popdir
503d2be0
AS
988 done
989fi
990
991test -n "$ac_init_help" && exit 0
992if $ac_init_version; then
c0d27fcc 993 cat <<\_ACEOF
503d2be0 994
35996d22 995Copyright (C) 2003 Free Software Foundation, Inc.
503d2be0
AS
996This configure script is free software; the Free Software Foundation
997gives unlimited permission to copy, distribute and modify it.
c0d27fcc 998_ACEOF
503d2be0
AS
999 exit 0
1000fi
1001exec 5>config.log
c0d27fcc 1002cat >&5 <<_ACEOF
503d2be0
AS
1003This file contains any messages produced by compilers while
1004running configure, to aid debugging if configure makes a mistake.
1005
1006It was created by $as_me, which was
35996d22 1007generated by GNU Autoconf 2.59. Invocation command line was
503d2be0
AS
1008
1009 $ $0 $@
1010
c0d27fcc 1011_ACEOF
503d2be0
AS
1012{
1013cat <<_ASUNAME
c0d27fcc
MR
1014## --------- ##
1015## Platform. ##
1016## --------- ##
503d2be0
AS
1017
1018hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1019uname -m = `(uname -m) 2>/dev/null || echo unknown`
1020uname -r = `(uname -r) 2>/dev/null || echo unknown`
1021uname -s = `(uname -s) 2>/dev/null || echo unknown`
1022uname -v = `(uname -v) 2>/dev/null || echo unknown`
1023
1024/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1025/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1026
1027/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1028/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1029/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1030hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1031/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1032/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1033/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1034
925c2f3f 1035_ASUNAME
c0d27fcc
MR
1036
1037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1038for as_dir in $PATH
1039do
1040 IFS=$as_save_IFS
1041 test -z "$as_dir" && as_dir=.
1042 echo "PATH: $as_dir"
1043done
1044
503d2be0
AS
1045} >&5
1046
c0d27fcc
MR
1047cat >&5 <<_ACEOF
1048
1049
1050## ----------- ##
1051## Core tests. ##
1052## ----------- ##
1053
1054_ACEOF
503d2be0 1055
503d2be0
AS
1056
1057# Keep a trace of the command line.
1058# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1059# Strip out --silent because we don't want to record it for future runs.
503d2be0 1060# Also quote any args containing shell meta-characters.
19650fd6 1061# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1062ac_configure_args=
19650fd6
AS
1063ac_configure_args0=
1064ac_configure_args1=
503d2be0 1065ac_sep=
19650fd6
AS
1066ac_must_keep_next=false
1067for ac_pass in 1 2
503d2be0 1068do
19650fd6
AS
1069 for ac_arg
1070 do
1071 case $ac_arg in
1072 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1073 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1074 | -silent | --silent | --silen | --sile | --sil)
1075 continue ;;
1076 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1077 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1078 esac
1079 case $ac_pass in
1080 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1081 2)
1082 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1083 if test $ac_must_keep_next = true; then
35996d22 1084 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1085 else
35996d22
AS
1086 case $ac_arg in
1087 *=* | --config-cache | -C | -disable-* | --disable-* \
1088 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1089 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1090 | -with-* | --with-* | -without-* | --without-* | --x)
1091 case "$ac_configure_args0 " in
1092 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1093 esac
1094 ;;
1095 -* ) ac_must_keep_next=true ;;
1096 esac
19650fd6
AS
1097 fi
1098 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1099 # Get rid of the leading space.
1100 ac_sep=" "
1101 ;;
1102 esac
1103 done
503d2be0 1104done
19650fd6
AS
1105$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1106$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1107
1108# When interrupted or exit'd, cleanup temporary files, and complete
1109# config.log. We remove comments because anyway the quotes in there
1110# would cause problems or look ugly.
c0d27fcc
MR
1111# WARNING: Be sure not to use single quotes in there, as some shells,
1112# such as our DU 5.0 friend, will then `close' the trap.
503d2be0
AS
1113trap 'exit_status=$?
1114 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1115 {
1116 echo
6bae0ccf 1117
c0d27fcc
MR
1118 cat <<\_ASBOX
1119## ---------------- ##
1120## Cache variables. ##
1121## ---------------- ##
1122_ASBOX
1123 echo
1124 # The following way of writing the cache mishandles newlines in values,
503d2be0
AS
1125{
1126 (set) 2>&1 |
1127 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1128 *ac_space=\ *)
1129 sed -n \
35996d22
AS
1130 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1131 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
503d2be0
AS
1132 ;;
1133 *)
1134 sed -n \
35996d22 1135 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
503d2be0
AS
1136 ;;
1137 esac;
c0d27fcc
MR
1138}
1139 echo
6bae0ccf
DL
1140
1141 cat <<\_ASBOX
1142## ----------------- ##
1143## Output variables. ##
1144## ----------------- ##
1145_ASBOX
1146 echo
1147 for ac_var in $ac_subst_vars
1148 do
1149 eval ac_val=$`echo $ac_var`
1150 echo "$ac_var='"'"'$ac_val'"'"'"
1151 done | sort
1152 echo
1153
1154 if test -n "$ac_subst_files"; then
1155 cat <<\_ASBOX
1156## ------------- ##
1157## Output files. ##
1158## ------------- ##
1159_ASBOX
1160 echo
1161 for ac_var in $ac_subst_files
1162 do
1163 eval ac_val=$`echo $ac_var`
35996d22 1164 echo "$ac_var='"'"'$ac_val'"'"'"
6bae0ccf
DL
1165 done | sort
1166 echo
1167 fi
1168
c0d27fcc
MR
1169 if test -s confdefs.h; then
1170 cat <<\_ASBOX
1171## ----------- ##
1172## confdefs.h. ##
1173## ----------- ##
1174_ASBOX
1175 echo
6bae0ccf 1176 sed "/^$/d" confdefs.h | sort
c0d27fcc
MR
1177 echo
1178 fi
1179 test "$ac_signal" != 0 &&
1180 echo "$as_me: caught signal $ac_signal"
1181 echo "$as_me: exit $exit_status"
1182 } >&5
35996d22 1183 rm -f core *.core &&
c0d27fcc 1184 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0
AS
1185 exit $exit_status
1186 ' 0
1187for ac_signal in 1 2 13 15; do
1188 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1189done
1190ac_signal=0
1191
1192# confdefs.h avoids OS command line length limits that DEFS can exceed.
1193rm -rf conftest* confdefs.h
1194# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1195echo >confdefs.h
ba4481b5 1196
c0d27fcc
MR
1197# Predefined preprocessor variables.
1198
1199cat >>confdefs.h <<_ACEOF
1200#define PACKAGE_NAME "$PACKAGE_NAME"
1201_ACEOF
1202
1203
1204cat >>confdefs.h <<_ACEOF
1205#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1206_ACEOF
1207
1208
1209cat >>confdefs.h <<_ACEOF
1210#define PACKAGE_VERSION "$PACKAGE_VERSION"
1211_ACEOF
1212
1213
1214cat >>confdefs.h <<_ACEOF
1215#define PACKAGE_STRING "$PACKAGE_STRING"
1216_ACEOF
1217
1218
1219cat >>confdefs.h <<_ACEOF
1220#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1221_ACEOF
1222
1223
503d2be0 1224# Let the site file select an alternate cache file if it wants to.
ba4481b5
DL
1225# Prefer explicitly selected file to automatically selected ones.
1226if test -z "$CONFIG_SITE"; then
1227 if test "x$prefix" != xNONE; then
1228 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1229 else
1230 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1231 fi
1232fi
1233for ac_site_file in $CONFIG_SITE; do
1234 if test -r "$ac_site_file"; then
c0d27fcc 1235 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1236echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1237 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1238 . "$ac_site_file"
1239 fi
1240done
1241
1242if test -r "$cache_file"; then
503d2be0
AS
1243 # Some versions of bash will fail to source /dev/null (special
1244 # files actually), so we avoid doing that.
1245 if test -f "$cache_file"; then
c0d27fcc 1246 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1247echo "$as_me: loading cache $cache_file" >&6;}
1248 case $cache_file in
1249 [\\/]* | ?:[\\/]* ) . $cache_file;;
1250 *) . ./$cache_file;;
1251 esac
1252 fi
ba4481b5 1253else
c0d27fcc 1254 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1255echo "$as_me: creating cache $cache_file" >&6;}
1256 >$cache_file
1257fi
1258
1259# Check that the precious variables saved in the cache have kept the same
1260# value.
1261ac_cache_corrupted=false
1262for ac_var in `(set) 2>&1 |
35996d22 1263 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
503d2be0
AS
1264 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1265 eval ac_new_set=\$ac_env_${ac_var}_set
1266 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1267 eval ac_new_val="\$ac_env_${ac_var}_value"
1268 case $ac_old_set,$ac_new_set in
1269 set,)
c0d27fcc 1270 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1271echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1272 ac_cache_corrupted=: ;;
1273 ,set)
c0d27fcc 1274 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1275echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1276 ac_cache_corrupted=: ;;
1277 ,);;
1278 *)
1279 if test "x$ac_old_val" != "x$ac_new_val"; then
35996d22 1280 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1281echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
35996d22 1282 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1283echo "$as_me: former value: $ac_old_val" >&2;}
35996d22 1284 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1285echo "$as_me: current value: $ac_new_val" >&2;}
35996d22 1286 ac_cache_corrupted=:
503d2be0
AS
1287 fi;;
1288 esac
c0d27fcc 1289 # Pass precious variables to config.status.
503d2be0
AS
1290 if test "$ac_new_set" = set; then
1291 case $ac_new_val in
1292 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
c0d27fcc
MR
1293 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1294 *) ac_arg=$ac_var=$ac_new_val ;;
1295 esac
1296 case " $ac_configure_args " in
1297 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1298 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1299 esac
1300 fi
1301done
1302if $ac_cache_corrupted; then
c0d27fcc 1303 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1304echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1305 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1306echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1307 { (exit 1); exit 1; }; }
ba4481b5
DL
1308fi
1309
1310ac_ext=c
ba4481b5 1311ac_cpp='$CPP $CPPFLAGS'
503d2be0
AS
1312ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1313ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1314ac_compiler_gnu=$ac_cv_c_compiler_gnu
1315
c0d27fcc
MR
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
ba4481b5 1332
6bae0ccf
DL
1333
1334 ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1335
c0d27fcc 1336
ba5da88a
PJ
1337test "$program_prefix" != NONE &&
1338 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1339# Use a double $ so make ignores it.
1340test "$program_suffix" != NONE &&
1341 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1342# Double any \ or $. echo might interpret backslashes.
1343# By default was `s,x,x', remove it if useless.
1344cat <<\_ACEOF >conftest.sed
1345s/[\\$]/&&/g;s/;s,x,x,$//
1346_ACEOF
1347program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1348rm conftest.sed
1349
c0d27fcc 1350
ba4481b5
DL
1351lispdir='${datadir}/emacs/${version}/lisp'
1352locallisppath='${datadir}/emacs/${version}/site-lisp:'\
1353'${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
1354lisppath='${locallisppath}:${lispdir}'
1355etcdir='${datadir}/emacs/${version}/etc'
1356archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1357docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1358gamedir='${localstatedir}/games/emacs'
98418dba
CW
1359
1360gameuser=games
1361
c0d27fcc 1362
ba4481b5
DL
1363# Check whether --with-gcc or --without-gcc was given.
1364if test "${with_gcc+set}" = set; then
1365 withval="$with_gcc"
503d2be0
AS
1366
1367fi;
ba4481b5
DL
1368
1369# Check whether --with-pop or --without-pop was given.
1370if test "${with_pop+set}" = set; then
1371 withval="$with_pop"
243cf185 1372 if test "$withval" = yes; then
c0d27fcc 1373 cat >>confdefs.h <<\_ACEOF
ba4481b5 1374#define MAIL_USE_POP 1
c0d27fcc 1375_ACEOF
ba4481b5 1376
243cf185
DL
1377else :
1378fi
3d9fec71 1379else
c0d27fcc 1380 cat >>confdefs.h <<\_ACEOF
3d9fec71 1381#define MAIL_USE_POP 1
c0d27fcc 1382_ACEOF
3d9fec71 1383
503d2be0 1384fi;
ba4481b5 1385
c0d27fcc 1386
a21616bd
KR
1387# Check whether --with-kerberos or --without-kerberos was given.
1388if test "${with_kerberos+set}" = set; then
1389 withval="$with_kerberos"
c0d27fcc 1390 cat >>confdefs.h <<\_ACEOF
a21616bd 1391#define KERBEROS 1
c0d27fcc 1392_ACEOF
a21616bd 1393
503d2be0 1394fi;
a21616bd 1395
c0d27fcc 1396
a21616bd
KR
1397# Check whether --with-kerberos5 or --without-kerberos5 was given.
1398if test "${with_kerberos5+set}" = set; then
1399 withval="$with_kerberos5"
1400 if test "${with_kerberos5+set}" = set; then
1401 if test "${with_kerberos+set}" != set; then
1402 with_kerberos=yes
c0d27fcc 1403 cat >>confdefs.h <<\_ACEOF
a21616bd 1404#define KERBEROS 1
c0d27fcc 1405_ACEOF
a21616bd
KR
1406
1407 fi
1408fi
b936fae4 1409
c0d27fcc 1410cat >>confdefs.h <<\_ACEOF
a21616bd 1411#define KERBEROS5 1
c0d27fcc 1412_ACEOF
a21616bd 1413
503d2be0 1414fi;
a21616bd 1415
ba4481b5
DL
1416# Check whether --with-hesiod or --without-hesiod was given.
1417if test "${with_hesiod+set}" = set; then
1418 withval="$with_hesiod"
b936fae4 1419
c0d27fcc 1420cat >>confdefs.h <<\_ACEOF
ba4481b5 1421#define HESIOD 1
c0d27fcc 1422_ACEOF
ba4481b5 1423
503d2be0 1424fi;
ba4481b5 1425
c0d27fcc 1426
2c9dccc9
PJ
1427# Check whether --with-sound or --without-sound was given.
1428if test "${with_sound+set}" = set; then
1429 withval="$with_sound"
1430
1431fi;
1432
c0d27fcc 1433
ba4481b5
DL
1434# Check whether --with-x-toolkit or --without-x-toolkit was given.
1435if test "${with_x_toolkit+set}" = set; then
1436 withval="$with_x_toolkit"
1437 case "${withval}" in
1438 y | ye | yes ) val=athena ;;
1439 n | no ) val=no ;;
1440 l | lu | luc | luci | lucid ) val=lucid ;;
1441 a | at | ath | athe | athen | athena ) val=athena ;;
1442 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1443 g | gt | gtk ) val=gtk ;;
ba4481b5 1444 * )
c0d27fcc 1445{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1446this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1447Currently, \`yes', \`athena' and \`lucid' are synonyms." >&5
1448echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1449this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1450Currently, \`yes', \`athena' and \`lucid' are synonyms." >&2;}
1451 { (exit 1); exit 1; }; }
ba4481b5
DL
1452 ;;
1453 esac
1454 with_x_toolkit=$val
1455
503d2be0 1456fi;
ba4481b5
DL
1457
1458# Check whether --with-xpm or --without-xpm was given.
1459if test "${with_xpm+set}" = set; then
1460 withval="$with_xpm"
503d2be0
AS
1461
1462fi;
ba4481b5
DL
1463
1464# Check whether --with-jpeg or --without-jpeg was given.
1465if test "${with_jpeg+set}" = set; then
1466 withval="$with_jpeg"
503d2be0
AS
1467
1468fi;
ba4481b5
DL
1469
1470# Check whether --with-tiff or --without-tiff was given.
1471if test "${with_tiff+set}" = set; then
1472 withval="$with_tiff"
503d2be0
AS
1473
1474fi;
ba4481b5
DL
1475
1476# Check whether --with-gif or --without-gif was given.
1477if test "${with_gif+set}" = set; then
1478 withval="$with_gif"
503d2be0
AS
1479
1480fi;
ba4481b5
DL
1481
1482# Check whether --with-png or --without-png was given.
1483if test "${with_png+set}" = set; then
1484 withval="$with_png"
503d2be0
AS
1485
1486fi;
ba4481b5 1487
488dd4c4
JD
1488# Check whether --with-gtk or --without-gtk was given.
1489if test "${with_gtk+set}" = set; then
1490 withval="$with_gtk"
1491
1492fi;
1493
1494# Check whether --with-pkg-config-prog or --without-pkg-config-prog was given.
1495if test "${with_pkg_config_prog+set}" = set; then
1496 withval="$with_pkg_config_prog"
1497
1498fi;
1499
ba4481b5
DL
1500# Check whether --with-toolkit-scroll-bars or --without-toolkit-scroll-bars was given.
1501if test "${with_toolkit_scroll_bars+set}" = set; then
1502 withval="$with_toolkit_scroll_bars"
503d2be0
AS
1503
1504fi;
ba4481b5 1505
1d36487c
GM
1506# Check whether --with-xim or --without-xim was given.
1507if test "${with_xim+set}" = set; then
1508 withval="$with_xim"
1d36487c 1509
503d2be0 1510fi;
ba4481b5 1511
e0f712ba
AC
1512# Check whether --with-carbon or --without-carbon was given.
1513if test "${with_carbon+set}" = set; then
1514 withval="$with_carbon"
1515
1516fi;
6a3a24fa
JD
1517# Check whether --enable-carbon-app or --disable-carbon-app was given.
1518if test "${enable_carbon_app+set}" = set; then
1519 enableval="$enable_carbon_app"
1520 carbon_appdir_x=${enableval}
1521fi;
e0f712ba 1522
19650fd6
AS
1523# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1524if test "${enable_maintainer_mode+set}" = set; then
1525 enableval="$enable_maintainer_mode"
1526 USE_MAINTAINER_MODE=$enableval
1527else
1528 USE_MAINTAINER_MODE=no
1529fi;
1530if test $USE_MAINTAINER_MODE = yes; then
1531 MAINT=
1532else
1533 MAINT=#
1534fi
1535
1536
ba4481b5 1537#### Make srcdir absolute, if it isn't already. It's important to
17494071 1538#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
1539#### give you automounter prefixes, which can go away. We do all this
1540#### so Emacs can find its files when run uninstalled.
17494071
GM
1541## Make sure CDPATH doesn't affect cd (in case PWD is relative).
1542unset CDPATH
ba4481b5
DL
1543case "${srcdir}" in
1544 /* ) ;;
1545 . )
1546 ## We may be able to use the $PWD environment variable to make this
1547 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
1548 ## Note: we used to use ${PWD} at the end instead of `pwd`,
1549 ## but that tested only for a well-formed and valid PWD,
1550 ## it did not object when PWD was well-formed and valid but just wrong.
1551 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
1552 then
1553 srcdir="$PWD"
1554 else
1555 srcdir="`(cd ${srcdir}; pwd)`"
1556 fi
1557 ;;
1558 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
1559esac
1560
1561#### Check if the source directory already has a configured system in it.
1562if test `pwd` != `(cd ${srcdir} && pwd)` \
1563 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 1564 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
1565 as a build directory right now; it has been configured in its own
1566 right. To configure in another directory as well, you MUST
1567 use GNU make. If you do not have GNU make, then you must
1568 now do \`make distclean' in ${srcdir},
1569 and then run $0 again." >&5
1570echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
1571 as a build directory right now; it has been configured in its own
1572 right. To configure in another directory as well, you MUST
1573 use GNU make. If you do not have GNU make, then you must
1574 now do \`make distclean' in ${srcdir},
503d2be0 1575 and then run $0 again." >&2;}
ba4481b5
DL
1576fi
1577
1578#### Given the configuration name, set machfile and opsysfile to the
1579#### names of the m/*.h and s/*.h files we should use.
1580
1581### Canonicalize the configuration name.
1582
1583ac_aux_dir=
1584for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1585 if test -f $ac_dir/install-sh; then
1586 ac_aux_dir=$ac_dir
1587 ac_install_sh="$ac_aux_dir/install-sh -c"
1588 break
1589 elif test -f $ac_dir/install.sh; then
1590 ac_aux_dir=$ac_dir
1591 ac_install_sh="$ac_aux_dir/install.sh -c"
1592 break
503d2be0
AS
1593 elif test -f $ac_dir/shtool; then
1594 ac_aux_dir=$ac_dir
1595 ac_install_sh="$ac_aux_dir/shtool install -c"
1596 break
ba4481b5
DL
1597 fi
1598done
1599if test -z "$ac_aux_dir"; then
c0d27fcc 1600 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
503d2be0
AS
1601echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1602 { (exit 1); exit 1; }; }
ba4481b5 1603fi
503d2be0
AS
1604ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1605ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1606ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ba4481b5
DL
1607
1608# Make sure we can run config.sub.
503d2be0 1609$ac_config_sub sun4 >/dev/null 2>&1 ||
c0d27fcc 1610 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
503d2be0
AS
1611echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1612 { (exit 1); exit 1; }; }
1613
c0d27fcc 1614echo "$as_me:$LINENO: checking build system type" >&5
503d2be0
AS
1615echo $ECHO_N "checking build system type... $ECHO_C" >&6
1616if test "${ac_cv_build+set}" = set; then
1617 echo $ECHO_N "(cached) $ECHO_C" >&6
1618else
1619 ac_cv_build_alias=$build_alias
1620test -z "$ac_cv_build_alias" &&
1621 ac_cv_build_alias=`$ac_config_guess`
1622test -z "$ac_cv_build_alias" &&
c0d27fcc 1623 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
1624echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1625 { (exit 1); exit 1; }; }
1626ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
c0d27fcc
MR
1627 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1628echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
503d2be0
AS
1629 { (exit 1); exit 1; }; }
1630
1631fi
c0d27fcc 1632echo "$as_me:$LINENO: result: $ac_cv_build" >&5
503d2be0
AS
1633echo "${ECHO_T}$ac_cv_build" >&6
1634build=$ac_cv_build
1635build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1636build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1637build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1638
c0d27fcc
MR
1639
1640echo "$as_me:$LINENO: checking host system type" >&5
503d2be0
AS
1641echo $ECHO_N "checking host system type... $ECHO_C" >&6
1642if test "${ac_cv_host+set}" = set; then
1643 echo $ECHO_N "(cached) $ECHO_C" >&6
1644else
1645 ac_cv_host_alias=$host_alias
1646test -z "$ac_cv_host_alias" &&
1647 ac_cv_host_alias=$ac_cv_build_alias
1648ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
c0d27fcc 1649 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
503d2be0
AS
1650echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1651 { (exit 1); exit 1; }; }
1652
1653fi
c0d27fcc 1654echo "$as_me:$LINENO: result: $ac_cv_host" >&5
503d2be0
AS
1655echo "${ECHO_T}$ac_cv_host" >&6
1656host=$ac_cv_host
1657host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1658host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1659host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ba4481b5 1660
c0d27fcc 1661
ba4481b5 1662canonical=$host
531a3336 1663configuration=${host_alias-$host}
ba4481b5 1664
c0d27fcc 1665
22044edf 1666
ba4481b5
DL
1667### If you add support for a new configuration, add code to this
1668### switch statement to recognize your configuration name and select
1669### the appropriate operating system and machine description files.
1670
1671### You would hope that you could choose an m/*.h file pretty much
1672### based on the machine portion of the configuration name, and an s-
1673### file based on the operating system portion. However, it turns out
1674### that each m/*.h file is pretty manufacturer-specific - for
1675### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
1676### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
1677### machines. So we basically have to have a special case for each
1678### configuration name.
1679###
1680### As far as handling version numbers on operating systems is
1681### concerned, make sure things will fail in a fixable way. If
1682### /etc/MACHINES doesn't say anything about version numbers, be
1683### prepared to handle anything reasonably. If version numbers
1684### matter, be sure /etc/MACHINES says something about it.
1685###
1686### Eric Raymond says we should accept strings like "sysvr4" to mean
1687### "System V Release 4"; he writes, "The old convention encouraged
1688### confusion between `system' and `release' levels'."
1689
1690machine='' opsys='' unported=no
1691case "${canonical}" in
1692
1096bcc0
GM
1693 ## FreeBSD ports
1694 *-*-freebsd* )
1695 opsys=freebsd
1696 case "${canonical}" in
1697 alpha*-*-freebsd*) machine=alpha ;;
1698 i[3456]86-*-freebsd*) machine=intel386 ;;
1699 esac
1700 ;;
1701
ba4481b5
DL
1702 ## NetBSD ports
1703 *-*-netbsd* )
1704 opsys=netbsd
dd038e26 1705 if test -f /usr/lib/crti.o; then
f57bd967
DL
1706
1707cat >>confdefs.h <<\_ACEOF
1708#define HAVE_CRTIN
dd038e26
AS
1709_ACEOF
1710
1711 fi
1712
ba4481b5
DL
1713 case "${canonical}" in
1714 alpha*-*-netbsd*) machine=alpha ;;
1715 i[3456]86-*-netbsd*) machine=intel386 ;;
1716 m68k-*-netbsd*)
1717 # This is somewhat bogus.
1718 machine=hp9000s300 ;;
1719 powerpc-apple-netbsd*) machine=macppc ;;
1720 mips-*-netbsd*) machine=pmax ;;
2df636f4 1721 mipsel-*-netbsd*) machine=pmax ;;
97836269 1722 mipseb-*-netbsd*) machine=pmax ;;
ba4481b5 1723 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 1724 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 1725 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 1726 vax-*-netbsd*) machine=vax ;;
2df636f4 1727 arm-*-netbsd*) machine=arm ;;
ba4481b5
DL
1728 esac
1729 ;;
1730
1731 ## OpenBSD ports
1732 *-*-openbsd* )
1733 opsys=openbsd
1734 case "${canonical}" in
1735 alpha*-*-openbsd*) machine=alpha ;;
1736 i386-*-openbsd*) machine=intel386 ;;
1737 m68k-*-openbsd*) machine=hp9000s300 ;;
1738 mipsel-*-openbsd*) machine=pmax ;;
1739 ns32k-*-openbsd*) machine=ns32000 ;;
1740 sparc-*-openbsd*) machine=sparc ;;
1741 vax-*-openbsd*) machine=vax ;;
1742 esac
1743 ;;
1744
1745 ## Acorn RISCiX:
1746 arm-acorn-riscix1.1* )
1747 machine=acorn opsys=riscix1-1
1748 ;;
1749 arm-acorn-riscix1.2* | arm-acorn-riscix )
1750 ## This name is riscix12 instead of riscix1.2
1751 ## to avoid a file name conflict on MSDOS.
1752 machine=acorn opsys=riscix12
1753 ;;
1754
1755 ## BSDI ports
1756 *-*-bsdi* )
1757 opsys=bsdi
1758 case "${canonical}" in
1759 i[345]86-*-bsdi*) machine=intel386 ;;
1760 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 1761 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
1762 esac
1763 case "${canonical}" in
1764 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
1765 *-*-bsdi2.0* ) opsys=bsdos2 ;;
1766 *-*-bsdi2* ) opsys=bsdos2-1 ;;
1767 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 1768 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
1769 esac
1770 ;;
1771
1772 ## Alliant machines
1773 ## Strictly speaking, we need the version of the alliant operating
1774 ## system to choose the right machine file, but currently the
1775 ## configuration name doesn't tell us enough to choose the right
1776 ## one; we need to give alliants their own operating system name to
1777 ## do this right. When someone cares, they can help us.
1778 fx80-alliant-* )
1779 machine=alliant4 opsys=bsd4-2
1780 ;;
1781 i860-alliant-* )
1782 machine=alliant-2800 opsys=bsd4-3
1783 ;;
1784
1785 ## Alpha (DEC) machines.
1786 alpha*-dec-osf* )
1787 machine=alpha opsys=osf1
1788 # This is needed to find X11R6.1 libraries for certain tests.
1789 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
1790 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
1791 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
1792 # due to non-traditional preprocessing with the current compiler
1793 # defaults. OSF 4 can also have that compiler version, and there
1794 # seems always to have been a usable /usr/bin/cpp.
1795 NON_GNU_CPP=/usr/bin/cpp
ca512671 1796 case "${canonical}" in
a55b799a 1797 alpha*-dec-osf[5-9]*)
bb17930d 1798 opsys=osf5-0 ;;
ca512671 1799 esac
ba4481b5
DL
1800 ;;
1801
1802 alpha*-*-linux-gnu* )
1803 machine=alpha opsys=gnu-linux
1804 ;;
1805
c4bb2108
DL
1806 arm*-*-linux-gnu* )
1807 machine=arm opsys=gnu-linux
1808 ;;
1809
1810 ppc-*-linux | \
1811 powerpc-*-linux* )
3aeecf97 1812 machine=macppc opsys=gnu-linux
c4bb2108
DL
1813 ;;
1814
ba4481b5
DL
1815 ## Altos 3068
1816 m68*-altos-sysv* )
1817 machine=altos opsys=usg5-2
1818 ;;
1819
1820 ## Amdahl UTS
1821 580-amdahl-sysv* )
1822 machine=amdahl opsys=usg5-2-2
1823 ;;
1824
1825 ## Apollo, Domain/OS
1826 m68*-apollo-* )
1827 machine=apollo opsys=bsd4-3
1828 ;;
1829
1830 ## AT&T 3b2, 3b5, 3b15, 3b20
1831 we32k-att-sysv* )
1832 machine=att3b opsys=usg5-2-2
1833 ;;
1834
1835 ## AT&T 3b1 - The Mighty Unix PC!
1836 m68*-att-sysv* )
1837 machine=7300 opsys=usg5-2-2
1838 ;;
1839
1840 ## Bull dpx20
1841 rs6000-bull-bosx* )
1842 machine=ibmrs6000 opsys=aix3-2
1843 ;;
1844
1845 ## Bull dpx2
1846 m68*-bull-sysv3* )
1847 machine=dpx2 opsys=usg5-3
1848 ;;
1849
1850 ## Bull sps7
1851 m68*-bull-sysv2* )
1852 machine=sps7 opsys=usg5-2
1853 ;;
1854
1855 ## CCI 5/32, 6/32 -- see "Tahoe".
1856
1857 ## Celerity
1858 ## I don't know what configuration name to use for this; config.sub
1859 ## doesn't seem to know anything about it. Hey, Celerity users, get
1860 ## in touch with us!
1861 celerity-celerity-bsd* )
1862 machine=celerity opsys=bsd4-2
1863 ;;
1864
1865 ## Clipper
1866 ## What operating systems does this chip run that Emacs has been
1867 ## tested on?
1868 clipper-* )
1869 machine=clipper
1870 ## We'll use the catch-all code at the bottom to guess the
1871 ## operating system.
1872 ;;
1873
df645f7c
AS
1874 ## Compaq Nonstop
1875 mips-compaq-nonstopux* )
1876 machine=nonstopux opsys=nonstopux
1877 ;;
1878
ba4481b5
DL
1879 ## Convex
1880 *-convex-bsd* | *-convex-convexos* )
1881 machine=convex opsys=bsd4-3
1882 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
1883 NON_GNU_CPP="cc -E -P"
1884 ;;
1885
1886 ## Cubix QBx/386
1887 i[3456]86-cubix-sysv* )
1888 machine=intel386 opsys=usg5-3
1889 ;;
1890
1891 ## Cydra 5
1892 cydra*-cydrome-sysv* )
1893 machine=cydra5 opsys=usg5-3
1894 ;;
1895
1896 ## Data General AViiON Machines
1897 ## DG changed naming conventions with the release of 5.4.4.10, they
1898 ## dropped the initial 5.4 but left the intervening R. Because of the
1899 ## R this shouldn't conflict with older versions of the OS (which I
1900 ## think were named like dgux4.*). In addition, DG new AViiONs series
1901 ## uses either Motorola M88k or Intel Pentium CPUs.
1902 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
1903 machine=aviion opsys=dgux4
1904 ;;
1905 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
1906 ## This name is dgux5-4-3 instead of dgux5-4r3
1907 ## to avoid a file name conflict on MSDOS.
1908 machine=aviion opsys=dgux5-4-3
1909 ;;
1910 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
1911 machine=aviion opsys=dgux5-4r2
1912 ;;
1913 m88k-dg-dgux* )
1914 machine=aviion opsys=dgux
1915 ;;
1916
1917 ## Data General AViiON Intel (x86) Machines
1918 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
1919 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
1920 i[345]86-dg-dguxR4* )
1921 machine=aviion-intel opsys=dgux4
1922 ;;
1923
1924 ## DECstations
1925 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1926 machine=pmax opsys=bsd4-2
1927 ;;
1928 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1929 machine=pmax opsys=bsd4-3
1930 ;;
1931 mips-dec-ultrix* )
1932 machine=pmax opsys=ultrix4-3
1933 ;;
1934 mips-dec-osf* )
1935 machine=pmax opsys=osf1
1936 ;;
1937 mips-dec-mach_bsd4.3* )
1938 machine=pmax opsys=mach-bsd4-3
1939 ;;
1940
cd890796
JD
1941 ## Motorola Delta machines
1942 m68k-motorola-sysv* | m68000-motorola-sysv* )
1943 machine=delta opsys=usg5-3
1944 if test -z "`type gnucc | grep 'not found'`"
1945 then
1946 if test -s /etc/167config
1947 then CC="gnucc -m68040"
1948 else CC="gnucc -m68881"
1949 fi
1950 else
1951 if test -z "`type gcc | grep 'not found'`"
1952 then CC=gcc
1953 else CC=cc
1954 fi
1955 fi
1956 ;;
ba4481b5
DL
1957 m88k-motorola-sysv4* )
1958 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1959 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1960 # I hope there are not other 4.0 versions for this machine
1961 # which really need usg5-4 instead.
1962 machine=delta88k opsys=usg5-4-2
1963 ;;
1964 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1965 machine=delta88k opsys=usg5-3
1966 ;;
1967
1968 ## Dual machines
1969 m68*-dual-sysv* )
1970 machine=dual opsys=usg5-2
1971 ;;
1972 m68*-dual-uniplus* )
1973 machine=dual opsys=unipl5-2
1974 ;;
1975
1976 ## Elxsi 6400
1977 elxsi-elxsi-sysv* )
1978 machine=elxsi opsys=usg5-2
1979 ;;
1980
1981 ## Encore machines
1982 ns16k-encore-bsd* )
1983 machine=ns16000 opsys=umax
1984 ;;
1985
65171e3a
DL
1986 ## The GEC 63 - apparently, this port isn't really finished yet.
1987 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
1988
1989 ## Gould Power Node and NP1
1990 pn-gould-bsd4.2* )
1991 machine=gould opsys=bsd4-2
1992 ;;
1993 pn-gould-bsd4.3* )
1994 machine=gould opsys=bsd4-3
1995 ;;
1996 np1-gould-bsd* )
1997 machine=gould-np1 opsys=bsd4-3
1998 ;;
1999
2000 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
2001 ## as far as Emacs is concerned).
2002 m88k-harris-cxux* )
2003 # Build needs to be different on 7.0 and later releases
2004 case "`uname -r`" in
2005 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
2006 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
2007 esac
2008 NON_GNU_CPP="/lib/cpp"
2009 ;;
2010 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
2011 m68k-harris-cxux* )
2012 machine=nh3000 opsys=cxux
2013 ;;
2014 ## Harris power pc NightHawk running Power UNIX (Series 6000)
2015 powerpc-harris-powerunix )
2016 machine=nh6000 opsys=powerunix
2017 NON_GNU_CPP="cc -Xo -E -P"
2018 ;;
2019 ## SR2001/SR2201 running HI-UX/MPP
2020 hppa1.1-hitachi-hiuxmpp* )
2021 machine=sr2k opsys=hiuxmpp
2022 ;;
89a336fa
GM
2023 hppa1.1-hitachi-hiuxwe2* )
2024 machine=sr2k opsys=hiuxwe2
2025 ;;
ba4481b5
DL
2026 ## Honeywell XPS100
2027 xps*-honeywell-sysv* )
2028 machine=xps100 opsys=usg5-2
2029 ;;
2030
2031 ## HP 9000 series 200 or 300
2032 m68*-hp-bsd* )
2033 machine=hp9000s300 opsys=bsd4-3
2034 ;;
2035 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
2036 m68*-hp-hpux* )
2037 case "`uname -r`" in
2038 ## Someone's system reports A.B8.05 for this.
2039 ## I wonder what other possibilities there are.
2040 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
2041 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
2042 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
2043 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
2044 *) machine=hp9000s300 opsys=hpux ;;
2045 esac
2046 ;;
2047
2048 ## HP 9000 series 700 and 800, running HP/UX
2049 hppa*-hp-hpux7* )
2050 machine=hp800 opsys=hpux
2051 ;;
2052 hppa*-hp-hpux8* )
2053 machine=hp800 opsys=hpux8
2054 ;;
2055 hppa*-hp-hpux9shr* )
2056 machine=hp800 opsys=hpux9shr
2057 ;;
2058 hppa*-hp-hpux9* )
2059 machine=hp800 opsys=hpux9
2060 ;;
b0e44248
RB
2061 hppa*-hp-hpux10.2* )
2062 machine=hp800 opsys=hpux10-20
2063 ;;
cc227489 2064 hppa*-hp-hpux10* )
ba4481b5
DL
2065 machine=hp800 opsys=hpux10
2066 ;;
cc227489
MB
2067 hppa*-hp-hpux1[1-9]* )
2068 machine=hp800 opsys=hpux11
2069 ;;
ba4481b5 2070
409d9577
GM
2071 hppa*-*-linux-gnu* )
2072 machine=hp800 opsys=gnu-linux
2073 ;;
2074
ba4481b5
DL
2075 ## HP 9000 series 700 and 800, running HP/UX
2076 hppa*-hp-hpux* )
2077 ## Cross-compilation? Nah!
2078 case "`uname -r`" in
2079 ## Someone's system reports A.B8.05 for this.
2080 ## I wonder what other possibilities there are.
2081 *.B8.* ) machine=hp800 opsys=hpux8 ;;
2082 *.08.* ) machine=hp800 opsys=hpux8 ;;
2083 *.09.* ) machine=hp800 opsys=hpux9 ;;
2084 *) machine=hp800 opsys=hpux10 ;;
2085 esac
2086 ;;
2087 hppa*-*-nextstep* )
2088 machine=hp800 opsys=nextstep
2089 ;;
2090
2091 ## Orion machines
2092 orion-orion-bsd* )
2093 machine=orion opsys=bsd4-2
2094 ;;
2095 clipper-orion-bsd* )
2096 machine=orion105 opsys=bsd4-2
2097 ;;
2098
2099 ## IBM machines
2100 i[3456]86-ibm-aix1.1* )
2101 machine=ibmps2-aix opsys=usg5-2-2
2102 ;;
2103 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
2104 machine=ibmps2-aix opsys=usg5-3
2105 ;;
2106 i370-ibm-aix*)
2107 machine=ibm370aix opsys=usg5-3
2108 ;;
55597d70 2109 s390-*-linux-gnu* )
138f0859
GM
2110 machine=ibms390 opsys=gnu-linux
2111 ;;
ba4481b5
DL
2112 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2113 machine=ibmrs6000 opsys=aix3-1
2114 ;;
2115 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2116 machine=ibmrs6000 opsys=aix3-2-5
2117 ;;
2118 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2119 machine=ibmrs6000 opsys=aix4-1
2120 ;;
2121 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2122 machine=ibmrs6000 opsys=aix4-2
2123 ;;
55597d70 2124 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2125 machine=ibmrs6000 opsys=aix4-2
2126 ;;
ba4481b5
DL
2127 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2128 machine=ibmrs6000 opsys=aix4
2129 ;;
2130 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2131 machine=ibmrs6000 opsys=aix4-1
2132 ;;
2133 rs6000-ibm-aix* | powerpc-ibm-aix* )
2134 machine=ibmrs6000 opsys=aix3-2
2135 ;;
2136 romp-ibm-bsd4.3* )
2137 machine=ibmrt opsys=bsd4-3
2138 ;;
2139 romp-ibm-bsd4.2* )
2140 machine=ibmrt opsys=bsd4-2
2141 ;;
2142 romp-ibm-aos4.3* )
2143 machine=ibmrt opsys=bsd4-3
2144 ;;
2145 romp-ibm-aos4.2* )
2146 machine=ibmrt opsys=bsd4-2
2147 ;;
2148 romp-ibm-aos* )
2149 machine=ibmrt opsys=bsd4-3
2150 ;;
2151 romp-ibm-bsd* )
2152 machine=ibmrt opsys=bsd4-3
2153 ;;
2154 romp-ibm-aix* )
2155 machine=ibmrt-aix opsys=usg5-2-2
2156 ;;
2157
2158 ## Integrated Solutions `Optimum V'
2159 m68*-isi-bsd4.2* )
2160 machine=isi-ov opsys=bsd4-2
2161 ;;
2162 m68*-isi-bsd4.3* )
2163 machine=isi-ov opsys=bsd4-3
2164 ;;
2165
2166 ## Intel 386 machines where we do care about the manufacturer
2167 i[3456]86-intsys-sysv* )
2168 machine=is386 opsys=usg5-2-2
2169 ;;
2170
2171 ## Prime EXL
2172 i[3456]86-prime-sysv* )
2173 machine=i386 opsys=usg5-3
2174 ;;
2175
2176 ## Sequent Symmetry running Dynix
2177 i[3456]86-sequent-bsd* )
2178 machine=symmetry opsys=bsd4-3
2179 ;;
2180
2181 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
2182 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
2183 machine=sequent-ptx opsys=ptx4
2184 NON_GNU_CPP=/lib/cpp
2185 ;;
2186
2187 ## Sequent Symmetry running DYNIX/ptx
2188 ## Use the old cpp rather than the newer ANSI one.
2189 i[3456]86-sequent-ptx* )
2190 machine=sequent-ptx opsys=ptx
2191 NON_GNU_CPP="/lib/cpp"
2192 ;;
2193
2194 ## ncr machine running svr4.3.
2195 i[3456]86-ncr-sysv4.3 )
2196 machine=ncr386 opsys=usg5-4-3
2197 ;;
2198
2199 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2200 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2201 i[3456]86-ncr-sysv* )
2202 machine=ncr386 opsys=usg5-4-2
2203 ;;
2204
2205 ## Intel Paragon OSF/1
2206 i860-intel-osf1* )
2207 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
2208 ;;
2209
2210 ## Intel 860
2211 i860-*-sysv4* )
2212 machine=i860 opsys=usg5-4
2213 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
2214 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
2215 ;;
2216
c76e04a8
GM
2217 ## Macintosh PowerPC
2218 powerpc*-*-linux-gnu* )
2219 machine=macppc opsys=gnu-linux
2220 ;;
2221
ba4481b5
DL
2222 ## Masscomp machines
2223 m68*-masscomp-rtu* )
2224 machine=masscomp opsys=rtu
2225 ;;
2226
2227 ## Megatest machines
2228 m68*-megatest-bsd* )
2229 machine=mega68 opsys=bsd4-2
2230 ;;
2231
2232 ## Workstations sold by MIPS
2233 ## This is not necessarily all workstations using the MIPS processor -
2234 ## Irises are produced by SGI, and DECstations by DEC.
2235
2236 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
2237 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
2238 ## it gives for choosing between the alternatives seems to be "Use
2239 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
2240 ## the BSD world." I'll assume that these are instructions for
2241 ## handling two odd situations, and that every other situation
2242 ## should use mips.h and usg5-2-2, they being listed first.
2243 mips-mips-usg* )
2244 machine=mips4
2245 ## Fall through to the general code at the bottom to decide on the OS.
2246 ;;
2247 mips-mips-riscos4* )
2248 machine=mips4 opsys=bsd4-3
2249 NON_GNU_CC="cc -systype bsd43"
2250 NON_GNU_CPP="cc -systype bsd43 -E"
2251 ;;
2252 mips-mips-riscos5* )
2253 machine=mips4 opsys=riscos5
2254 NON_GNU_CC="cc -systype bsd43"
2255 NON_GNU_CPP="cc -systype bsd43 -E"
2256 ;;
2257 mips-mips-bsd* )
2258 machine=mips opsys=bsd4-3
2259 ;;
2260 mips-mips-* )
2261 machine=mips opsys=usg5-2-2
2262 ;;
2263
2264 ## NeXT
2265 m68*-next-* | m68k-*-nextstep* )
2266 machine=m68k opsys=nextstep
2267 ;;
2268
2269 ## The complete machine from National Semiconductor
2270 ns32k-ns-genix* )
2271 machine=ns32000 opsys=usg5-2
2272 ;;
2273
2274 ## NCR machines
2275 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
2276 machine=tower32 opsys=usg5-2-2
2277 ;;
2278 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
2279 machine=tower32v3 opsys=usg5-3
2280 ;;
2281
2282 ## NEC EWS4800
2283 mips-nec-sysv4*)
2284 machine=ews4800 opsys=ux4800
2285 ;;
2286
2287 ## Nixdorf Targon 31
2288 m68*-nixdorf-sysv* )
2289 machine=targon31 opsys=usg5-2-2
2290 ;;
2291
2292 ## Nu (TI or LMI)
2293 m68*-nu-sysv* )
2294 machine=nu opsys=usg5-2
2295 ;;
2296
2297 ## Plexus
2298 m68*-plexus-sysv* )
2299 machine=plexus opsys=usg5-2
2300 ;;
2301
ba4481b5
DL
2302 ## Pyramid machines
2303 ## I don't really have any idea what sort of processor the Pyramid has,
2304 ## so I'm assuming it is its own architecture.
2305 pyramid-pyramid-bsd* )
2306 machine=pyramid opsys=bsd4-2
2307 ;;
2308
2309 ## Sequent Balance
2310 ns32k-sequent-bsd4.2* )
2311 machine=sequent opsys=bsd4-2
2312 ;;
2313 ns32k-sequent-bsd4.3* )
2314 machine=sequent opsys=bsd4-3
2315 ;;
2316
2317 ## Siemens Nixdorf
2318 mips-siemens-sysv* | mips-sni-sysv*)
2319 machine=mips-siemens opsys=usg5-4
2320 NON_GNU_CC=/usr/ccs/bin/cc
2321 NON_GNU_CPP=/usr/ccs/lib/cpp
2322 ;;
2323
2324 ## Silicon Graphics machines
2325 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
2326 m68*-sgi-iris3.5* )
2327 machine=irist opsys=iris3-5
2328 ;;
2329 m68*-sgi-iris3.6* | m68*-sgi-iris*)
2330 machine=irist opsys=iris3-6
2331 ;;
2332 ## Iris 4D
2333 mips-sgi-irix3* )
2334 machine=iris4d opsys=irix3-3
2335 ;;
2336 mips-sgi-irix4* )
2337 machine=iris4d opsys=irix4-0
2338 ;;
2339 mips-sgi-irix6.5 )
2340 machine=iris4d opsys=irix6-5
946173ad
DL
2341 # Without defining _LANGUAGE_C, things get masked out in the headers
2342 # so that, for instance, grepping for `free' in stdlib.h fails and
2343 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2344 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2345 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
2346 ;;
2347 mips-sgi-irix6* )
2348 machine=iris4d opsys=irix6-0
c4bb2108 2349 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2350 # but presumably it does no harm.
2351 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2352 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2353 NON_GCC_TEST_OPTIONS=-32
2354 ;;
2355 mips-sgi-irix5.[01]* )
2356 machine=iris4d opsys=irix5-0
2357 ;;
2358 mips-sgi-irix5* | mips-sgi-irix* )
2359 machine=iris4d opsys=irix5-2
2360 ;;
2361
2362 ## SONY machines
2363 m68*-sony-bsd4.2* )
2364 machine=news opsys=bsd4-2
2365 ;;
2366 m68*-sony-bsd4.3* )
2367 machine=news opsys=bsd4-3
2368 ;;
2369 m68*-sony-newsos3* | m68*-sony-news3*)
2370 machine=news opsys=bsd4-3
2371 ;;
2372 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2373 machine=news-risc opsys=bsd4-3
2374 ;;
2375 mips-sony-newsos6* )
2376 machine=news-r6 opsys=newsos6
2377 ;;
2378 mips-sony-news* )
2379 machine=news-risc opsys=newsos5
2380 ;;
2381
2382 ## Stride
2383 m68*-stride-sysv* )
2384 machine=stride opsys=usg5-2
2385 ;;
2386
2387 ## Suns
2388 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2389 machine=sparc opsys=gnu-linux
2390 ;;
2391
d054101f 2392 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2393 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2394 | rs6000-*-solaris2*)
2395 case "${canonical}" in
2396 m68*-sunos1* ) machine=sun1 ;;
2397 m68*-sunos2* ) machine=sun2 ;;
2398 m68* ) machine=sun3 ;;
2399 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
2400 i[3456]86-*-* ) machine=intel386 ;;
2401 powerpcle* ) machine=powerpcle ;;
2402 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2403 sparc* ) machine=sparc ;;
2404 * ) unported=yes ;;
2405 esac
2406 case "${canonical}" in
2407 ## The Sun386 didn't get past 4.0.
2408 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2409 *-sunos4.0* ) opsys=sunos4-0 ;;
2410 *-sunos4.1.[3-9]*noshare )
2411 ## This name is sunos413 instead of sunos4-1-3
2412 ## to avoid a file name conflict on MSDOS.
2413 opsys=sunos413
2414 NON_GNU_CPP=/usr/lib/cpp
2415 NON_GCC_TEST_OPTIONS=-Bstatic
2416 GCC_TEST_OPTIONS=-static
2417 ;;
2418 *-sunos4.1.[3-9]* | *-sunos4shr*)
2419 opsys=sunos4shr
2420 NON_GNU_CPP=/usr/lib/cpp
2421 ;;
2422 *-sunos4* | *-sunos )
2423 opsys=sunos4-1
2424 NON_GCC_TEST_OPTIONS=-Bstatic
2425 GCC_TEST_OPTIONS=-static
2426 ;;
2427 *-sunos5.3* | *-solaris2.3* )
2428 opsys=sol2-3
2429 NON_GNU_CPP=/usr/ccs/lib/cpp
2430 ;;
2431 *-sunos5.4* | *-solaris2.4* )
2432 opsys=sol2-4
2433 NON_GNU_CPP=/usr/ccs/lib/cpp
2434 RANLIB="ar -ts"
2435 ;;
2436 *-sunos5.5* | *-solaris2.5* )
2437 opsys=sol2-5
2438 NON_GNU_CPP=/usr/ccs/lib/cpp
2439 RANLIB="ar -ts"
2440 ;;
8e967cf7
MR
2441 *-sunos5.6* | *-solaris2.6* )
2442 opsys=sol2-6
2443 NON_GNU_CPP=/usr/ccs/lib/cpp
2444 RANLIB="ar -ts"
2445 ;;
ba4481b5 2446 *-sunos5* | *-solaris* )
9e71690e 2447 opsys=sol2-6
ba4481b5
DL
2448 NON_GNU_CPP=/usr/ccs/lib/cpp
2449 ;;
2450 * ) opsys=bsd4-2 ;;
2451 esac
2452 ## Watch out for a compiler that we know will not work.
2453 case "${canonical}" in
2454 *-solaris* | *-sunos5* )
2455 if [ "x$CC" = x/usr/ucb/cc ]; then
2456 ## /usr/ucb/cc doesn't work;
2457 ## we should find some other compiler that does work.
2458 unset CC
2459 fi
2460 ;;
2461 *) ;;
2462 esac
2463 ;;
2464 sparc-*-nextstep* )
2465 machine=sparc opsys=nextstep
2466 ;;
2467
2468 ## Tadpole 68k
2469 m68*-tadpole-sysv* )
2470 machine=tad68k opsys=usg5-3
2471 ;;
2472
2473 ## Tahoe machines
2474 tahoe-tahoe-bsd4.2* )
2475 machine=tahoe opsys=bsd4-2
2476 ;;
2477 tahoe-tahoe-bsd4.3* )
2478 machine=tahoe opsys=bsd4-3
2479 ;;
2480
2481 ## Tandem Integrity S2
2482 mips-tandem-sysv* )
2483 machine=tandem-s2 opsys=usg5-3
2484 ;;
2485
2486 ## Tektronix XD88
2487 m88k-tektronix-sysv3* )
2488 machine=tekxd88 opsys=usg5-3
2489 ;;
2490
2491 ## Tektronix 16000 box (6130?)
2492 ns16k-tektronix-bsd* )
2493 machine=ns16000 opsys=bsd4-2
2494 ;;
2495 ## Tektronix 4300
2496 ## src/m/tek4300.h hints that this is a m68k machine.
2497 m68*-tektronix-bsd* )
2498 machine=tek4300 opsys=bsd4-3
2499 ;;
2500
2501 ## Titan P2 or P3
2502 ## We seem to have lost the machine-description file titan.h!
2503 titan-titan-sysv* )
2504 machine=titan opsys=usg5-3
2505 ;;
2506
2507 ## Ustation E30 (SS5E)
2508 m68*-unisys-uniplus* )
2509 machine=ustation opsystem=unipl5-2
2510 ;;
2511
2512 ## Vaxen.
2513 vax-dec-* )
2514 machine=vax
2515 case "${canonical}" in
2516 *-bsd4.1* ) opsys=bsd4-1 ;;
2517 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
2518 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
2519 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
2520 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
2521 *-vms* ) opsys=vms ;;
2522 * ) unported=yes
2523 esac
2524 ;;
2525
2526 ## Whitechapel MG1
2527 ns16k-whitechapel-* )
2528 machine=mg1
2529 ## We don't know what sort of OS runs on these; we'll let the
2530 ## operating system guessing code below try.
2531 ;;
2532
2533 ## Wicat
2534 m68*-wicat-sysv* )
2535 machine=wicat opsys=usg5-2
2536 ;;
2537
f4988be7
GM
2538 ## IA-64
2539 ia64*-*-linux* )
2540 machine=ia64 opsys=gnu-linux
2541 ;;
2542
ba4481b5
DL
2543 ## Intel 386 machines where we don't care about the manufacturer
2544 i[3456]86-*-* )
2545 machine=intel386
2546 case "${canonical}" in
c60ee5e7 2547 *-cygwin ) opsys=cygwin ;;
9f817ea4 2548 *-lynxos* ) opsys=lynxos ;;
ba4481b5
DL
2549 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
2550 *-isc2.2* ) opsys=isc2-2 ;;
2551 *-isc4.0* ) opsys=isc4-0 ;;
2552 *-isc4.* ) opsys=isc4-1
2553 GCC_TEST_OPTIONS=-posix
2554 NON_GCC_TEST_OPTIONS=-Xp
2555 ;;
2556 *-isc* ) opsys=isc3-0 ;;
2557 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
2558 *-esix* ) opsys=esix ;;
2559 *-xenix* ) opsys=xenix ;;
2560 *-linux-gnu* ) opsys=gnu-linux ;;
2561 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 2562 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
2563 NON_GNU_CPP=/lib/cpp
2564 # Prevent -belf from being passed to $CPP.
2565 # /lib/cpp does not accept it.
2566 OVERRIDE_CPPFLAGS=" "
2567 ;;
2568 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
2569 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2570 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5 2571 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
2572 *-nextstep* ) opsys=nextstep ;;
2573 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2574 esac
2575 ;;
2576
2577 ## m68k Linux-based GNU system
2578 m68k-*-linux-gnu* )
2579 machine=m68k opsys=gnu-linux
2580 ;;
2581
2582 ## Mips Linux-based GNU system
cd958eb3 2583 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
2584 machine=mips opsys=gnu-linux
2585 ;;
2586
2587 ## UXP/DS
2588 sparc-fujitsu-sysv4* )
2589 machine=sparc opsys=uxpds
2590 NON_GNU_CPP=/usr/ccs/lib/cpp
2591 RANLIB="ar -ts"
2592 ;;
2593
2594 ## UXP/V
2595 f301-fujitsu-uxpv4.1)
2596 machine=f301 opsys=uxpv
2597 ;;
2598
e0f712ba
AC
2599 ## Darwin / Mac OS X
2600 powerpc-apple-darwin* )
2601 machine=powermac opsys=darwin
2602 # Define CPP as follows to make autoconf work correctly.
2a75d75d 2603 CPP="${CC-cc} -E -no-cpp-precomp"
c14dc0ed
AS
2604 # Use fink packages if available.
2605 if test -d /sw/include && test -d /sw/lib; then
2606 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2607 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2608 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2609 fi
e0f712ba
AC
2610 ;;
2611
598a2813
AS
2612 ## AMD x86-64 Linux-based GNU system
2613 x86_64-*-linux-gnu* )
24b01ec4 2614 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2615 ;;
2616
ba4481b5
DL
2617 * )
2618 unported=yes
2619 ;;
2620esac
2621
2622### If the code above didn't choose an operating system, just choose
2623### an operating system based on the configuration name. You really
2624### only want to use this when you have no idea what the right
2625### operating system is; if you know what operating systems a machine
2626### runs, it's cleaner to make it explicit in the case statement
2627### above.
2628if test x"${opsys}" = x; then
2629 case "${canonical}" in
2630 *-gnu* ) opsys=gnu ;;
2631 *-bsd4.[01] ) opsys=bsd4-1 ;;
2632 *-bsd4.2 ) opsys=bsd4-2 ;;
2633 *-bsd4.3 ) opsys=bsd4-3 ;;
2634 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
2635 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
2636 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
2637 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
2638 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
2639 *-sysv5uw* ) opsys=unixware ;;
2640 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
2641 *-sysv4.1* | *-sysvr4.1* )
2642 NON_GNU_CPP=/usr/lib/cpp
2643 opsys=usg5-4 ;;
2644 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2645 if [ x$NON_GNU_CPP = x ]; then
2646 if [ -f /usr/ccs/lib/cpp ]; then
2647 NON_GNU_CPP=/usr/ccs/lib/cpp
2648 else
2649 NON_GNU_CPP=/lib/cpp
2650 fi
2651 fi
2652 opsys=usg5-4-2 ;;
2653 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2654 * )
2655 unported=yes
2656 ;;
2657 esac
2658fi
2659
c0d27fcc 2660
22044edf 2661
ba4481b5 2662if test $unported = yes; then
c0d27fcc 2663 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2664Check \`etc/MACHINES' for recognized configuration names." >&5
2665echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2666Check \`etc/MACHINES' for recognized configuration names." >&2;}
2667 { (exit 1); exit 1; }; }
ba4481b5
DL
2668fi
2669
2670machfile="m/${machine}.h"
2671opsysfile="s/${opsys}.h"
2672
c0d27fcc 2673
ba4481b5
DL
2674#### Choose a compiler.
2675test -n "$CC" && cc_specified=yes
2676
2677# Save the value of CFLAGS that the user specified.
2678SPECIFIED_CFLAGS="$CFLAGS"
2679
2680case ${with_gcc} in
2681 "yes" ) CC="gcc" GCC=yes ;;
2682 "no" ) : ${CC=cc} ;;
503d2be0
AS
2683 * )
2684esac
2685ac_ext=c
2686ac_cpp='$CPP $CPPFLAGS'
2687ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2688ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2689ac_compiler_gnu=$ac_cv_c_compiler_gnu
2690if test -n "$ac_tool_prefix"; then
2691 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2692set dummy ${ac_tool_prefix}gcc; ac_word=$2
c0d27fcc 2693echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2694echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2695if test "${ac_cv_prog_CC+set}" = set; then
2696 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2697else
2698 if test -n "$CC"; then
2699 ac_cv_prog_CC="$CC" # Let the user override the test.
2700else
c0d27fcc
MR
2701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2702for as_dir in $PATH
2703do
2704 IFS=$as_save_IFS
2705 test -z "$as_dir" && as_dir=.
2706 for ac_exec_ext in '' $ac_executable_extensions; do
2707 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2708 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2709 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2710 break 2
2711 fi
2712done
503d2be0
AS
2713done
2714
ba4481b5
DL
2715fi
2716fi
503d2be0 2717CC=$ac_cv_prog_CC
ba4481b5 2718if test -n "$CC"; then
c0d27fcc 2719 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2720echo "${ECHO_T}$CC" >&6
2721else
c0d27fcc 2722 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2723echo "${ECHO_T}no" >&6
2724fi
2725
2726fi
2727if test -z "$ac_cv_prog_CC"; then
2728 ac_ct_CC=$CC
2729 # Extract the first word of "gcc", so it can be a program name with args.
2730set dummy gcc; ac_word=$2
c0d27fcc 2731echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2732echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2733if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2734 echo $ECHO_N "(cached) $ECHO_C" >&6
2735else
2736 if test -n "$ac_ct_CC"; then
2737 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2738else
c0d27fcc
MR
2739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2740for as_dir in $PATH
2741do
2742 IFS=$as_save_IFS
2743 test -z "$as_dir" && as_dir=.
2744 for ac_exec_ext in '' $ac_executable_extensions; do
2745 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2746 ac_cv_prog_ac_ct_CC="gcc"
2747 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2748 break 2
2749 fi
2750done
503d2be0
AS
2751done
2752
2753fi
2754fi
2755ac_ct_CC=$ac_cv_prog_ac_ct_CC
2756if test -n "$ac_ct_CC"; then
c0d27fcc 2757 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0 2758echo "${ECHO_T}$ac_ct_CC" >&6
ba4481b5 2759else
c0d27fcc 2760 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2761echo "${ECHO_T}no" >&6
2762fi
2763
2764 CC=$ac_ct_CC
2765else
2766 CC="$ac_cv_prog_CC"
ba4481b5
DL
2767fi
2768
2769if test -z "$CC"; then
503d2be0
AS
2770 if test -n "$ac_tool_prefix"; then
2771 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2772set dummy ${ac_tool_prefix}cc; ac_word=$2
c0d27fcc 2773echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2774echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2775if test "${ac_cv_prog_CC+set}" = set; then
2776 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2777else
2778 if test -n "$CC"; then
2779 ac_cv_prog_CC="$CC" # Let the user override the test.
2780else
c0d27fcc
MR
2781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2782for as_dir in $PATH
2783do
2784 IFS=$as_save_IFS
2785 test -z "$as_dir" && as_dir=.
2786 for ac_exec_ext in '' $ac_executable_extensions; do
2787 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2788 ac_cv_prog_CC="${ac_tool_prefix}cc"
2789 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2790 break 2
2791 fi
2792done
503d2be0
AS
2793done
2794
2795fi
2796fi
2797CC=$ac_cv_prog_CC
2798if test -n "$CC"; then
c0d27fcc 2799 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2800echo "${ECHO_T}$CC" >&6
2801else
c0d27fcc 2802 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2803echo "${ECHO_T}no" >&6
2804fi
2805
2806fi
2807if test -z "$ac_cv_prog_CC"; then
2808 ac_ct_CC=$CC
2809 # Extract the first word of "cc", so it can be a program name with args.
2810set dummy cc; ac_word=$2
c0d27fcc 2811echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2812echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2813if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2814 echo $ECHO_N "(cached) $ECHO_C" >&6
2815else
2816 if test -n "$ac_ct_CC"; then
2817 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2818else
c0d27fcc
MR
2819as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2820for as_dir in $PATH
2821do
2822 IFS=$as_save_IFS
2823 test -z "$as_dir" && as_dir=.
2824 for ac_exec_ext in '' $ac_executable_extensions; do
2825 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2826 ac_cv_prog_ac_ct_CC="cc"
2827 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2828 break 2
2829 fi
2830done
503d2be0
AS
2831done
2832
2833fi
2834fi
2835ac_ct_CC=$ac_cv_prog_ac_ct_CC
2836if test -n "$ac_ct_CC"; then
c0d27fcc 2837 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
2838echo "${ECHO_T}$ac_ct_CC" >&6
2839else
c0d27fcc 2840 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2841echo "${ECHO_T}no" >&6
2842fi
2843
2844 CC=$ac_ct_CC
2845else
2846 CC="$ac_cv_prog_CC"
2847fi
2848
2849fi
2850if test -z "$CC"; then
2851 # Extract the first word of "cc", so it can be a program name with args.
2852set dummy cc; ac_word=$2
c0d27fcc 2853echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2854echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2855if test "${ac_cv_prog_CC+set}" = set; then
2856 echo $ECHO_N "(cached) $ECHO_C" >&6
2857else
2858 if test -n "$CC"; then
2859 ac_cv_prog_CC="$CC" # Let the user override the test.
2860else
2861 ac_prog_rejected=no
c0d27fcc
MR
2862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2863for as_dir in $PATH
2864do
2865 IFS=$as_save_IFS
2866 test -z "$as_dir" && as_dir=.
2867 for ac_exec_ext in '' $ac_executable_extensions; do
2868 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2869 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2870 ac_prog_rejected=yes
2871 continue
2872 fi
2873 ac_cv_prog_CC="cc"
2874 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2875 break 2
2876 fi
2877done
503d2be0
AS
2878done
2879
ba4481b5
DL
2880if test $ac_prog_rejected = yes; then
2881 # We found a bogon in the path, so make sure we never use it.
2882 set dummy $ac_cv_prog_CC
2883 shift
503d2be0 2884 if test $# != 0; then
ba4481b5
DL
2885 # We chose a different compiler from the bogus one.
2886 # However, it has the same basename, so the bogon will be chosen
2887 # first if we set CC to just the basename; use the full file name.
2888 shift
6bae0ccf 2889 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
2890 fi
2891fi
2892fi
2893fi
503d2be0 2894CC=$ac_cv_prog_CC
ba4481b5 2895if test -n "$CC"; then
c0d27fcc 2896 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2897echo "${ECHO_T}$CC" >&6
ba4481b5 2898else
c0d27fcc 2899 echo "$as_me:$LINENO: result: no" >&5
503d2be0 2900echo "${ECHO_T}no" >&6
ba4481b5
DL
2901fi
2902
503d2be0
AS
2903fi
2904if test -z "$CC"; then
2905 if test -n "$ac_tool_prefix"; then
2906 for ac_prog in cl
2907 do
2908 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2909set dummy $ac_tool_prefix$ac_prog; ac_word=$2
c0d27fcc 2910echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2911echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2912if test "${ac_cv_prog_CC+set}" = set; then
2913 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2914else
2915 if test -n "$CC"; then
2916 ac_cv_prog_CC="$CC" # Let the user override the test.
2917else
c0d27fcc
MR
2918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2919for as_dir in $PATH
2920do
2921 IFS=$as_save_IFS
2922 test -z "$as_dir" && as_dir=.
2923 for ac_exec_ext in '' $ac_executable_extensions; do
2924 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2925 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2926 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2927 break 2
2928 fi
2929done
503d2be0
AS
2930done
2931
c4bb2108
DL
2932fi
2933fi
503d2be0 2934CC=$ac_cv_prog_CC
c4bb2108 2935if test -n "$CC"; then
c0d27fcc 2936 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2937echo "${ECHO_T}$CC" >&6
c4bb2108 2938else
c0d27fcc 2939 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2940echo "${ECHO_T}no" >&6
2941fi
2942
2943 test -n "$CC" && break
2944 done
2945fi
2946if test -z "$CC"; then
2947 ac_ct_CC=$CC
2948 for ac_prog in cl
2949do
2950 # Extract the first word of "$ac_prog", so it can be a program name with args.
2951set dummy $ac_prog; ac_word=$2
c0d27fcc 2952echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2953echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2954if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2955 echo $ECHO_N "(cached) $ECHO_C" >&6
2956else
2957 if test -n "$ac_ct_CC"; then
2958 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2959else
c0d27fcc
MR
2960as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2961for as_dir in $PATH
2962do
2963 IFS=$as_save_IFS
2964 test -z "$as_dir" && as_dir=.
2965 for ac_exec_ext in '' $ac_executable_extensions; do
2966 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2967 ac_cv_prog_ac_ct_CC="$ac_prog"
2968 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2969 break 2
2970 fi
2971done
503d2be0
AS
2972done
2973
c4bb2108 2974fi
503d2be0
AS
2975fi
2976ac_ct_CC=$ac_cv_prog_ac_ct_CC
2977if test -n "$ac_ct_CC"; then
c0d27fcc 2978 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
2979echo "${ECHO_T}$ac_ct_CC" >&6
2980else
c0d27fcc 2981 echo "$as_me:$LINENO: result: no" >&5
503d2be0 2982echo "${ECHO_T}no" >&6
ba4481b5
DL
2983fi
2984
503d2be0
AS
2985 test -n "$ac_ct_CC" && break
2986done
ba4481b5 2987
503d2be0
AS
2988 CC=$ac_ct_CC
2989fi
2990
2991fi
ba4481b5 2992
c0d27fcc 2993
19650fd6
AS
2994test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2995See \`config.log' for more details." >&5
2996echo "$as_me: error: no acceptable C compiler found in \$PATH
2997See \`config.log' for more details." >&2;}
503d2be0 2998 { (exit 1); exit 1; }; }
c4bb2108 2999
503d2be0 3000# Provide some information about the compiler.
c0d27fcc 3001echo "$as_me:$LINENO:" \
503d2be0
AS
3002 "checking for C compiler version" >&5
3003ac_compiler=`set X $ac_compile; echo $2`
c0d27fcc 3004{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
503d2be0
AS
3005 (eval $ac_compiler --version </dev/null >&5) 2>&5
3006 ac_status=$?
c0d27fcc 3007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3008 (exit $ac_status); }
c0d27fcc 3009{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
503d2be0
AS
3010 (eval $ac_compiler -v </dev/null >&5) 2>&5
3011 ac_status=$?
c0d27fcc 3012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3013 (exit $ac_status); }
c0d27fcc 3014{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
503d2be0
AS
3015 (eval $ac_compiler -V </dev/null >&5) 2>&5
3016 ac_status=$?
c0d27fcc 3017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3018 (exit $ac_status); }
3019
3020cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3021/* confdefs.h. */
3022_ACEOF
3023cat confdefs.h >>conftest.$ac_ext
3024cat >>conftest.$ac_ext <<_ACEOF
3025/* end confdefs.h. */
c4bb2108 3026
503d2be0
AS
3027int
3028main ()
3029{
3030
3031 ;
3032 return 0;
3033}
3034_ACEOF
3035ac_clean_files_save=$ac_clean_files
19650fd6 3036ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3037# Try to create an executable without -o first, disregard a.out.
3038# It will help us diagnose broken compilers, and finding out an intuition
3039# of exeext.
35996d22
AS
3040echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3041echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
503d2be0 3042ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
c0d27fcc 3043if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
503d2be0
AS
3044 (eval $ac_link_default) 2>&5
3045 ac_status=$?
c0d27fcc 3046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3047 (exit $ac_status); }; then
3048 # Find the output, starting from the most likely. This scheme is
3049# not robust to junk in `.', hence go to wildcards (a.*) only as a last
3050# resort.
c0d27fcc
MR
3051
3052# Be careful to initialize this variable, since it used to be cached.
3053# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
3054ac_cv_exeext=
19650fd6
AS
3055# b.out is created by i960 compilers.
3056for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
3057do
6bae0ccf 3058 test -f "$ac_file" || continue
503d2be0 3059 case $ac_file in
19650fd6 3060 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
35996d22 3061 ;;
19650fd6 3062 conftest.$ac_ext )
35996d22
AS
3063 # This is the source file.
3064 ;;
19650fd6 3065 [ab].out )
35996d22
AS
3066 # We found the default executable, but exeext='' is most
3067 # certainly right.
3068 break;;
19650fd6 3069 *.* )
35996d22
AS
3070 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3071 # FIXME: I believe we export ac_cv_exeext for Libtool,
3072 # but it would be cool to find out if it's true. Does anybody
3073 # maintain Libtool? --akim.
3074 export ac_cv_exeext
3075 break;;
19650fd6 3076 * )
35996d22 3077 break;;
503d2be0
AS
3078 esac
3079done
3080else
3081 echo "$as_me: failed program was:" >&5
19650fd6
AS
3082sed 's/^/| /' conftest.$ac_ext >&5
3083
6bae0ccf 3084{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3085See \`config.log' for more details." >&5
6bae0ccf 3086echo "$as_me: error: C compiler cannot create executables
19650fd6 3087See \`config.log' for more details." >&2;}
503d2be0
AS
3088 { (exit 77); exit 77; }; }
3089fi
3090
3091ac_exeext=$ac_cv_exeext
c0d27fcc 3092echo "$as_me:$LINENO: result: $ac_file" >&5
503d2be0
AS
3093echo "${ECHO_T}$ac_file" >&6
3094
3095# Check the compiler produces executables we can run. If not, either
3096# the compiler is broken, or we cross compile.
c0d27fcc 3097echo "$as_me:$LINENO: checking whether the C compiler works" >&5
503d2be0
AS
3098echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
3099# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3100# If not cross compiling, check that we can run a simple program.
3101if test "$cross_compiling" != yes; then
3102 if { ac_try='./$ac_file'
c0d27fcc 3103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3104 (eval $ac_try) 2>&5
3105 ac_status=$?
c0d27fcc 3106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3107 (exit $ac_status); }; }; then
3108 cross_compiling=no
ba4481b5 3109 else
503d2be0
AS
3110 if test "$cross_compiling" = maybe; then
3111 cross_compiling=yes
3112 else
c0d27fcc 3113 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3114If you meant to cross compile, use \`--host'.
3115See \`config.log' for more details." >&5
503d2be0 3116echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3117If you meant to cross compile, use \`--host'.
3118See \`config.log' for more details." >&2;}
503d2be0
AS
3119 { (exit 1); exit 1; }; }
3120 fi
ba4481b5 3121 fi
503d2be0 3122fi
c0d27fcc 3123echo "$as_me:$LINENO: result: yes" >&5
503d2be0
AS
3124echo "${ECHO_T}yes" >&6
3125
19650fd6 3126rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0
AS
3127ac_clean_files=$ac_clean_files_save
3128# Check the compiler produces executables we can run. If not, either
3129# the compiler is broken, or we cross compile.
c0d27fcc 3130echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
503d2be0 3131echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
c0d27fcc 3132echo "$as_me:$LINENO: result: $cross_compiling" >&5
503d2be0
AS
3133echo "${ECHO_T}$cross_compiling" >&6
3134
c0d27fcc
MR
3135echo "$as_me:$LINENO: checking for suffix of executables" >&5
3136echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
3137if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
3138 (eval $ac_link) 2>&5
3139 ac_status=$?
c0d27fcc 3140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3141 (exit $ac_status); }; then
3142 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3143# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3144# work properly (i.e., refer to `conftest.exe'), while it won't with
3145# `rm'.
6bae0ccf
DL
3146for ac_file in conftest.exe conftest conftest.*; do
3147 test -f "$ac_file" || continue
503d2be0 3148 case $ac_file in
6bae0ccf 3149 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
503d2be0 3150 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
35996d22
AS
3151 export ac_cv_exeext
3152 break;;
503d2be0
AS
3153 * ) break;;
3154 esac
3155done
ba4481b5 3156else
19650fd6
AS
3157 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3158See \`config.log' for more details." >&5
3159echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3160See \`config.log' for more details." >&2;}
503d2be0 3161 { (exit 1); exit 1; }; }
ba4481b5 3162fi
ba4481b5 3163
503d2be0 3164rm -f conftest$ac_cv_exeext
c0d27fcc 3165echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
503d2be0 3166echo "${ECHO_T}$ac_cv_exeext" >&6
ba4481b5 3167
503d2be0
AS
3168rm -f conftest.$ac_ext
3169EXEEXT=$ac_cv_exeext
3170ac_exeext=$EXEEXT
c0d27fcc
MR
3171echo "$as_me:$LINENO: checking for suffix of object files" >&5
3172echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
503d2be0
AS
3173if test "${ac_cv_objext+set}" = set; then
3174 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3175else
503d2be0 3176 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3177/* confdefs.h. */
3178_ACEOF
3179cat confdefs.h >>conftest.$ac_ext
3180cat >>conftest.$ac_ext <<_ACEOF
3181/* end confdefs.h. */
ba4481b5 3182
503d2be0
AS
3183int
3184main ()
3185{
ba4481b5 3186
503d2be0
AS
3187 ;
3188 return 0;
3189}
3190_ACEOF
3191rm -f conftest.o conftest.obj
c0d27fcc 3192if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3193 (eval $ac_compile) 2>&5
3194 ac_status=$?
c0d27fcc 3195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3196 (exit $ac_status); }; then
3197 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
3198 case $ac_file in
6bae0ccf 3199 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
503d2be0
AS
3200 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3201 break;;
3202 esac
3203done
c4bb2108 3204else
503d2be0 3205 echo "$as_me: failed program was:" >&5
19650fd6
AS
3206sed 's/^/| /' conftest.$ac_ext >&5
3207
3208{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3209See \`config.log' for more details." >&5
3210echo "$as_me: error: cannot compute suffix of object files: cannot compile
3211See \`config.log' for more details." >&2;}
503d2be0 3212 { (exit 1); exit 1; }; }
c4bb2108
DL
3213fi
3214
503d2be0
AS
3215rm -f conftest.$ac_cv_objext conftest.$ac_ext
3216fi
c0d27fcc 3217echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
503d2be0
AS
3218echo "${ECHO_T}$ac_cv_objext" >&6
3219OBJEXT=$ac_cv_objext
3220ac_objext=$OBJEXT
c0d27fcc 3221echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
503d2be0
AS
3222echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
3223if test "${ac_cv_c_compiler_gnu+set}" = set; then
3224 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3225else
503d2be0 3226 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3227/* confdefs.h. */
3228_ACEOF
3229cat confdefs.h >>conftest.$ac_ext
3230cat >>conftest.$ac_ext <<_ACEOF
3231/* end confdefs.h. */
503d2be0
AS
3232
3233int
3234main ()
3235{
3236#ifndef __GNUC__
3237 choke me
3238#endif
3239
3240 ;
3241 return 0;
3242}
3243_ACEOF
3244rm -f conftest.$ac_objext
c0d27fcc 3245if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3246 (eval $ac_compile) 2>conftest.er1
503d2be0 3247 ac_status=$?
35996d22
AS
3248 grep -v '^ *+' conftest.er1 >conftest.err
3249 rm -f conftest.er1
3250 cat conftest.err >&5
c0d27fcc 3251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3252 (exit $ac_status); } &&
4494a266
JD
3253 { ac_try='test -z "$ac_c_werror_flag"
3254 || test ! -s conftest.err'
35996d22
AS
3255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3256 (eval $ac_try) 2>&5
3257 ac_status=$?
3258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3259 (exit $ac_status); }; } &&
3260 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3262 (eval $ac_try) 2>&5
3263 ac_status=$?
c0d27fcc 3264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3265 (exit $ac_status); }; }; then
3266 ac_compiler_gnu=yes
3267else
3268 echo "$as_me: failed program was:" >&5
19650fd6
AS
3269sed 's/^/| /' conftest.$ac_ext >&5
3270
503d2be0
AS
3271ac_compiler_gnu=no
3272fi
35996d22 3273rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3274ac_cv_c_compiler_gnu=$ac_compiler_gnu
3275
3276fi
c0d27fcc 3277echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
503d2be0
AS
3278echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
3279GCC=`test $ac_compiler_gnu = yes && echo yes`
3280ac_test_CFLAGS=${CFLAGS+set}
3281ac_save_CFLAGS=$CFLAGS
3282CFLAGS="-g"
c0d27fcc 3283echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
503d2be0
AS
3284echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
3285if test "${ac_cv_prog_cc_g+set}" = set; then
3286 echo $ECHO_N "(cached) $ECHO_C" >&6
3287else
3288 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3289/* confdefs.h. */
3290_ACEOF
3291cat confdefs.h >>conftest.$ac_ext
3292cat >>conftest.$ac_ext <<_ACEOF
3293/* end confdefs.h. */
503d2be0
AS
3294
3295int
3296main ()
3297{
3298
3299 ;
3300 return 0;
3301}
3302_ACEOF
3303rm -f conftest.$ac_objext
c0d27fcc 3304if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3305 (eval $ac_compile) 2>conftest.er1
503d2be0 3306 ac_status=$?
35996d22
AS
3307 grep -v '^ *+' conftest.er1 >conftest.err
3308 rm -f conftest.er1
3309 cat conftest.err >&5
c0d27fcc 3310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3311 (exit $ac_status); } &&
4494a266
JD
3312 { ac_try='test -z "$ac_c_werror_flag"
3313 || test ! -s conftest.err'
35996d22
AS
3314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3315 (eval $ac_try) 2>&5
3316 ac_status=$?
3317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3318 (exit $ac_status); }; } &&
3319 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3321 (eval $ac_try) 2>&5
3322 ac_status=$?
c0d27fcc 3323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3324 (exit $ac_status); }; }; then
ba4481b5
DL
3325 ac_cv_prog_cc_g=yes
3326else
503d2be0 3327 echo "$as_me: failed program was:" >&5
19650fd6
AS
3328sed 's/^/| /' conftest.$ac_ext >&5
3329
503d2be0 3330ac_cv_prog_cc_g=no
ba4481b5 3331fi
35996d22 3332rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 3333fi
c0d27fcc 3334echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
503d2be0 3335echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c4bb2108 3336if test "$ac_test_CFLAGS" = set; then
503d2be0 3337 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
3338elif test $ac_cv_prog_cc_g = yes; then
3339 if test "$GCC" = yes; then
ba4481b5
DL
3340 CFLAGS="-g -O2"
3341 else
c4bb2108 3342 CFLAGS="-g"
ba4481b5 3343 fi
22afa6e8 3344else
c4bb2108
DL
3345 if test "$GCC" = yes; then
3346 CFLAGS="-O2"
3347 else
3348 CFLAGS=
3349 fi
ba4481b5 3350fi
6bae0ccf
DL
3351echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
3352echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3353if test "${ac_cv_prog_cc_stdc+set}" = set; then
3354 echo $ECHO_N "(cached) $ECHO_C" >&6
3355else
3356 ac_cv_prog_cc_stdc=no
3357ac_save_CC=$CC
3358cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3359/* confdefs.h. */
3360_ACEOF
3361cat confdefs.h >>conftest.$ac_ext
3362cat >>conftest.$ac_ext <<_ACEOF
3363/* end confdefs.h. */
6bae0ccf
DL
3364#include <stdarg.h>
3365#include <stdio.h>
3366#include <sys/types.h>
3367#include <sys/stat.h>
3368/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3369struct buf { int x; };
3370FILE * (*rcsopen) (struct buf *, struct stat *, int);
3371static char *e (p, i)
3372 char **p;
3373 int i;
3374{
3375 return p[i];
3376}
3377static char *f (char * (*g) (char **, int), char **p, ...)
3378{
3379 char *s;
3380 va_list v;
3381 va_start (v,p);
3382 s = g (p, va_arg (v,int));
3383 va_end (v);
3384 return s;
3385}
35996d22
AS
3386
3387/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3388 function prototypes and stuff, but not '\xHH' hex character constants.
3389 These don't provoke an error unfortunately, instead are silently treated
3390 as 'x'. The following induces an error, until -std1 is added to get
3391 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3392 array size at least. It's necessary to write '\x00'==0 to get something
3393 that's true only with -std1. */
3394int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3395
6bae0ccf
DL
3396int test (int i, double x);
3397struct s1 {int (*f) (int a);};
3398struct s2 {int (*f) (double a);};
3399int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3400int argc;
3401char **argv;
3402int
3403main ()
3404{
3405return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3406 ;
3407 return 0;
3408}
3409_ACEOF
3410# Don't try gcc -ansi; that turns off useful extensions and
3411# breaks some systems' header files.
3412# AIX -qlanglvl=ansi
3413# Ultrix and OSF/1 -std1
3414# HP-UX 10.20 and later -Ae
3415# HP-UX older versions -Aa -D_HPUX_SOURCE
3416# SVR4 -Xc -D__EXTENSIONS__
3417for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3418do
3419 CC="$ac_save_CC $ac_arg"
3420 rm -f conftest.$ac_objext
3421if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3422 (eval $ac_compile) 2>conftest.er1
6bae0ccf 3423 ac_status=$?
35996d22
AS
3424 grep -v '^ *+' conftest.er1 >conftest.err
3425 rm -f conftest.er1
3426 cat conftest.err >&5
6bae0ccf
DL
3427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3428 (exit $ac_status); } &&
4494a266
JD
3429 { ac_try='test -z "$ac_c_werror_flag"
3430 || test ! -s conftest.err'
35996d22
AS
3431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3432 (eval $ac_try) 2>&5
3433 ac_status=$?
3434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3435 (exit $ac_status); }; } &&
3436 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
3437 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3438 (eval $ac_try) 2>&5
3439 ac_status=$?
3440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3441 (exit $ac_status); }; }; then
3442 ac_cv_prog_cc_stdc=$ac_arg
3443break
3444else
3445 echo "$as_me: failed program was:" >&5
19650fd6
AS
3446sed 's/^/| /' conftest.$ac_ext >&5
3447
6bae0ccf 3448fi
35996d22 3449rm -f conftest.err conftest.$ac_objext
6bae0ccf
DL
3450done
3451rm -f conftest.$ac_ext conftest.$ac_objext
3452CC=$ac_save_CC
3453
3454fi
3455
3456case "x$ac_cv_prog_cc_stdc" in
3457 x|xno)
3458 echo "$as_me:$LINENO: result: none needed" >&5
3459echo "${ECHO_T}none needed" >&6 ;;
3460 *)
3461 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
3462echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3463 CC="$CC $ac_cv_prog_cc_stdc" ;;
3464esac
3465
503d2be0
AS
3466# Some people use a C++ compiler to compile C. Since we use `exit',
3467# in C++ we need to declare it. In case someone uses the same compiler
3468# for both compiling C and C++ we need to have the C++ compiler decide
3469# the declaration of exit, since it's the most demanding environment.
3470cat >conftest.$ac_ext <<_ACEOF
3471#ifndef __cplusplus
3472 choke me
3473#endif
3474_ACEOF
3475rm -f conftest.$ac_objext
c0d27fcc 3476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3477 (eval $ac_compile) 2>conftest.er1
503d2be0 3478 ac_status=$?
35996d22
AS
3479 grep -v '^ *+' conftest.er1 >conftest.err
3480 rm -f conftest.er1
3481 cat conftest.err >&5
c0d27fcc 3482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3483 (exit $ac_status); } &&
4494a266
JD
3484 { ac_try='test -z "$ac_c_werror_flag"
3485 || test ! -s conftest.err'
35996d22
AS
3486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3487 (eval $ac_try) 2>&5
3488 ac_status=$?
3489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3490 (exit $ac_status); }; } &&
3491 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3493 (eval $ac_try) 2>&5
3494 ac_status=$?
c0d27fcc 3495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3496 (exit $ac_status); }; }; then
3497 for ac_declaration in \
35996d22 3498 '' \
503d2be0
AS
3499 'extern "C" void std::exit (int) throw (); using std::exit;' \
3500 'extern "C" void std::exit (int); using std::exit;' \
3501 'extern "C" void exit (int) throw ();' \
3502 'extern "C" void exit (int);' \
cffcede7 3503 'void exit (int);'
503d2be0
AS
3504do
3505 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3506/* confdefs.h. */
3507_ACEOF
3508cat confdefs.h >>conftest.$ac_ext
3509cat >>conftest.$ac_ext <<_ACEOF
3510/* end confdefs.h. */
57669b57 3511$ac_declaration
35996d22 3512#include <stdlib.h>
503d2be0
AS
3513int
3514main ()
3515{
3516exit (42);
3517 ;
3518 return 0;
3519}
3520_ACEOF
3521rm -f conftest.$ac_objext
c0d27fcc 3522if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3523 (eval $ac_compile) 2>conftest.er1
503d2be0 3524 ac_status=$?
35996d22
AS
3525 grep -v '^ *+' conftest.er1 >conftest.err
3526 rm -f conftest.er1
3527 cat conftest.err >&5
c0d27fcc 3528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3529 (exit $ac_status); } &&
4494a266
JD
3530 { ac_try='test -z "$ac_c_werror_flag"
3531 || test ! -s conftest.err'
35996d22
AS
3532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3533 (eval $ac_try) 2>&5
3534 ac_status=$?
3535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3536 (exit $ac_status); }; } &&
3537 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3539 (eval $ac_try) 2>&5
3540 ac_status=$?
c0d27fcc 3541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3542 (exit $ac_status); }; }; then
3543 :
3544else
3545 echo "$as_me: failed program was:" >&5
19650fd6
AS
3546sed 's/^/| /' conftest.$ac_ext >&5
3547
503d2be0
AS
3548continue
3549fi
35996d22 3550rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 3551 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3552/* confdefs.h. */
3553_ACEOF
3554cat confdefs.h >>conftest.$ac_ext
3555cat >>conftest.$ac_ext <<_ACEOF
3556/* end confdefs.h. */
503d2be0
AS
3557$ac_declaration
3558int
3559main ()
3560{
3561exit (42);
3562 ;
3563 return 0;
3564}
3565_ACEOF
3566rm -f conftest.$ac_objext
c0d27fcc 3567if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3568 (eval $ac_compile) 2>conftest.er1
503d2be0 3569 ac_status=$?
35996d22
AS
3570 grep -v '^ *+' conftest.er1 >conftest.err
3571 rm -f conftest.er1
3572 cat conftest.err >&5
c0d27fcc 3573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3574 (exit $ac_status); } &&
4494a266
JD
3575 { ac_try='test -z "$ac_c_werror_flag"
3576 || test ! -s conftest.err'
35996d22
AS
3577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3578 (eval $ac_try) 2>&5
3579 ac_status=$?
3580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3581 (exit $ac_status); }; } &&
3582 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3584 (eval $ac_try) 2>&5
3585 ac_status=$?
c0d27fcc 3586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3587 (exit $ac_status); }; }; then
3588 break
3589else
3590 echo "$as_me: failed program was:" >&5
19650fd6
AS
3591sed 's/^/| /' conftest.$ac_ext >&5
3592
503d2be0 3593fi
35996d22 3594rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3595done
3596rm -f conftest*
3597if test -n "$ac_declaration"; then
3598 echo '#ifdef __cplusplus' >>confdefs.h
3599 echo $ac_declaration >>confdefs.h
3600 echo '#endif' >>confdefs.h
3601fi
ba4481b5 3602
503d2be0
AS
3603else
3604 echo "$as_me: failed program was:" >&5
19650fd6
AS
3605sed 's/^/| /' conftest.$ac_ext >&5
3606
503d2be0 3607fi
35996d22 3608rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3609ac_ext=c
3610ac_cpp='$CPP $CPPFLAGS'
3611ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3612ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3613ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3614
c0d27fcc 3615
ba4481b5
DL
3616# On Suns, sometimes $CPP names a directory.
3617if test -n "$CPP" && test -d "$CPP"; then
3618 CPP=
3619fi
3620
3621#### Some systems specify a CPP to use unless we are using GCC.
3622#### Now that we know whether we are using GCC, we can decide whether
3623#### to use that one.
3624if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3625then
3626 CPP="$NON_GNU_CPP"
3627fi
3628
3629#### Some systems specify a CC to use unless we are using GCC.
3630#### Now that we know whether we are using GCC, we can decide whether
3631#### to use that one.
3632if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3633 test x$cc_specified != xyes
3634then
3635 CC="$NON_GNU_CC"
3636fi
3637
3638if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3639then
3640 CC="$CC $GCC_TEST_OPTIONS"
3641fi
3642
3643if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3644then
3645 CC="$CC $NON_GCC_TEST_OPTIONS"
3646fi
3647
6a3a24fa 3648#### Some other nice autoconf tests.
ba4481b5 3649
c0d27fcc 3650echo "$as_me:$LINENO: checking whether ln -s works" >&5
503d2be0
AS
3651echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3652LN_S=$as_ln_s
3653if test "$LN_S" = "ln -s"; then
c0d27fcc 3654 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 3655echo "${ECHO_T}yes" >&6
ba4481b5 3656else
c0d27fcc 3657 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
503d2be0 3658echo "${ECHO_T}no, using $LN_S" >&6
ba4481b5
DL
3659fi
3660
503d2be0
AS
3661ac_ext=c
3662ac_cpp='$CPP $CPPFLAGS'
3663ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3664ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3665ac_compiler_gnu=$ac_cv_c_compiler_gnu
c0d27fcc 3666echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
503d2be0 3667echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
ba4481b5
DL
3668# On Suns, sometimes $CPP names a directory.
3669if test -n "$CPP" && test -d "$CPP"; then
3670 CPP=
3671fi
3672if test -z "$CPP"; then
503d2be0
AS
3673 if test "${ac_cv_prog_CPP+set}" = set; then
3674 echo $ECHO_N "(cached) $ECHO_C" >&6
3675else
3676 # Double quotes because CPP needs to be expanded
3677 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3678 do
3679 ac_preproc_ok=false
3680for ac_c_preproc_warn_flag in '' yes
3681do
3682 # Use a header file that comes with gcc, so configuring glibc
3683 # with a fresh cross-compiler works.
19650fd6
AS
3684 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3685 # <limits.h> exists even on freestanding compilers.
ba4481b5 3686 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
3687 # not just through cpp. "Syntax error" is here to catch this case.
3688 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3689/* confdefs.h. */
3690_ACEOF
3691cat confdefs.h >>conftest.$ac_ext
3692cat >>conftest.$ac_ext <<_ACEOF
3693/* end confdefs.h. */
3694#ifdef __STDC__
3695# include <limits.h>
3696#else
3697# include <assert.h>
3698#endif
35996d22 3699 Syntax error
503d2be0 3700_ACEOF
c0d27fcc 3701if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3702 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3703 ac_status=$?
6bae0ccf 3704 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3705 rm -f conftest.er1
3706 cat conftest.err >&5
c0d27fcc 3707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3708 (exit $ac_status); } >/dev/null; then
3709 if test -s conftest.err; then
3710 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 3711 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
3712 else
3713 ac_cpp_err=
3714 fi
3715else
3716 ac_cpp_err=yes
3717fi
3718if test -z "$ac_cpp_err"; then
ba4481b5
DL
3719 :
3720else
503d2be0 3721 echo "$as_me: failed program was:" >&5
19650fd6
AS
3722sed 's/^/| /' conftest.$ac_ext >&5
3723
503d2be0
AS
3724 # Broken: fails on valid input.
3725continue
3726fi
3727rm -f conftest.err conftest.$ac_ext
3728
3729 # OK, works on sane cases. Now check whether non-existent headers
3730 # can be detected and how.
3731 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3732/* confdefs.h. */
3733_ACEOF
3734cat confdefs.h >>conftest.$ac_ext
3735cat >>conftest.$ac_ext <<_ACEOF
3736/* end confdefs.h. */
503d2be0
AS
3737#include <ac_nonexistent.h>
3738_ACEOF
c0d27fcc 3739if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3740 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3741 ac_status=$?
6bae0ccf 3742 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3743 rm -f conftest.er1
3744 cat conftest.err >&5
c0d27fcc 3745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3746 (exit $ac_status); } >/dev/null; then
3747 if test -s conftest.err; then
3748 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 3749 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
3750 else
3751 ac_cpp_err=
3752 fi
3753else
3754 ac_cpp_err=yes
3755fi
3756if test -z "$ac_cpp_err"; then
3757 # Broken: success on invalid input.
3758continue
c4bb2108 3759else
503d2be0 3760 echo "$as_me: failed program was:" >&5
19650fd6
AS
3761sed 's/^/| /' conftest.$ac_ext >&5
3762
503d2be0
AS
3763 # Passes both tests.
3764ac_preproc_ok=:
3765break
3766fi
3767rm -f conftest.err conftest.$ac_ext
3768
3769done
3770# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3771rm -f conftest.err conftest.$ac_ext
3772if $ac_preproc_ok; then
3773 break
3774fi
3775
3776 done
3777 ac_cv_prog_CPP=$CPP
3778
3779fi
3780 CPP=$ac_cv_prog_CPP
3781else
3782 ac_cv_prog_CPP=$CPP
3783fi
c0d27fcc 3784echo "$as_me:$LINENO: result: $CPP" >&5
503d2be0
AS
3785echo "${ECHO_T}$CPP" >&6
3786ac_preproc_ok=false
3787for ac_c_preproc_warn_flag in '' yes
3788do
3789 # Use a header file that comes with gcc, so configuring glibc
3790 # with a fresh cross-compiler works.
19650fd6
AS
3791 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3792 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
3793 # On the NeXT, cc -E runs the code through the compiler's parser,
3794 # not just through cpp. "Syntax error" is here to catch this case.
3795 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3796/* confdefs.h. */
3797_ACEOF
3798cat confdefs.h >>conftest.$ac_ext
3799cat >>conftest.$ac_ext <<_ACEOF
3800/* end confdefs.h. */
3801#ifdef __STDC__
3802# include <limits.h>
3803#else
3804# include <assert.h>
3805#endif
35996d22 3806 Syntax error
503d2be0 3807_ACEOF
c0d27fcc 3808if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3809 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3810 ac_status=$?
6bae0ccf 3811 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3812 rm -f conftest.er1
3813 cat conftest.err >&5
c0d27fcc 3814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3815 (exit $ac_status); } >/dev/null; then
3816 if test -s conftest.err; then
3817 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 3818 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
3819 else
3820 ac_cpp_err=
3821 fi
3822else
3823 ac_cpp_err=yes
3824fi
3825if test -z "$ac_cpp_err"; then
ba4481b5
DL
3826 :
3827else
503d2be0 3828 echo "$as_me: failed program was:" >&5
19650fd6
AS
3829sed 's/^/| /' conftest.$ac_ext >&5
3830
503d2be0
AS
3831 # Broken: fails on valid input.
3832continue
3833fi
3834rm -f conftest.err conftest.$ac_ext
3835
3836 # OK, works on sane cases. Now check whether non-existent headers
3837 # can be detected and how.
3838 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3839/* confdefs.h. */
3840_ACEOF
3841cat confdefs.h >>conftest.$ac_ext
3842cat >>conftest.$ac_ext <<_ACEOF
3843/* end confdefs.h. */
503d2be0
AS
3844#include <ac_nonexistent.h>
3845_ACEOF
c0d27fcc 3846if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3847 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3848 ac_status=$?
6bae0ccf 3849 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3850 rm -f conftest.er1
3851 cat conftest.err >&5
c0d27fcc 3852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3853 (exit $ac_status); } >/dev/null; then
3854 if test -s conftest.err; then
3855 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 3856 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
3857 else
3858 ac_cpp_err=
3859 fi
3860else
3861 ac_cpp_err=yes
c4bb2108 3862fi
503d2be0
AS
3863if test -z "$ac_cpp_err"; then
3864 # Broken: success on invalid input.
3865continue
3866else
3867 echo "$as_me: failed program was:" >&5
19650fd6
AS
3868sed 's/^/| /' conftest.$ac_ext >&5
3869
503d2be0
AS
3870 # Passes both tests.
3871ac_preproc_ok=:
3872break
ba4481b5 3873fi
503d2be0
AS
3874rm -f conftest.err conftest.$ac_ext
3875
3876done
3877# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3878rm -f conftest.err conftest.$ac_ext
3879if $ac_preproc_ok; then
3880 :
ba4481b5 3881else
19650fd6
AS
3882 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3883See \`config.log' for more details." >&5
3884echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3885See \`config.log' for more details." >&2;}
503d2be0 3886 { (exit 1); exit 1; }; }
ba4481b5 3887fi
503d2be0
AS
3888
3889ac_ext=c
3890ac_cpp='$CPP $CPPFLAGS'
3891ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3892ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3893ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
3894
3895# Find a good install program. We prefer a C program (faster),
3896# so one script is as good as another. But avoid the broken or
3897# incompatible versions:
3898# SysV /etc/install, /usr/sbin/install
3899# SunOS /usr/etc/install
3900# IRIX /sbin/install
3901# AIX /bin/install
503d2be0 3902# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 3903# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
3904# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3905# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
35996d22 3906# OS/2's system install, which has a completely different semantic
ba4481b5 3907# ./install, which can be erroneously created by make from ./install.sh.
c0d27fcc
MR
3908echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3909echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
ba4481b5 3910if test -z "$INSTALL"; then
503d2be0
AS
3911if test "${ac_cv_path_install+set}" = set; then
3912 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3913else
c0d27fcc
MR
3914 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3915for as_dir in $PATH
3916do
3917 IFS=$as_save_IFS
3918 test -z "$as_dir" && as_dir=.
3919 # Account for people who put trailing slashes in PATH elements.
3920case $as_dir/ in
3921 ./ | .// | /cC/* | \
3922 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
35996d22 3923 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
3924 /usr/ucb/* ) ;;
3925 *)
3926 # OSF1 and SCO ODT 3.0 have their own names for install.
3927 # Don't use installbsd from OSF since it installs stuff as root
3928 # by default.
3929 for ac_prog in ginstall scoinst install; do
3930 for ac_exec_ext in '' $ac_executable_extensions; do
35996d22
AS
3931 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3932 if test $ac_prog = install &&
3933 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3934 # AIX install. It has an incompatible calling convention.
3935 :
3936 elif test $ac_prog = install &&
3937 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3938 # program-specific install script used by HP pwplus--don't use.
3939 :
3940 else
3941 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3942 break 3
3943 fi
3944 fi
ba4481b5 3945 done
c0d27fcc
MR
3946 done
3947 ;;
3948esac
3949done
3950
ba4481b5
DL
3951
3952fi
3953 if test "${ac_cv_path_install+set}" = set; then
503d2be0 3954 INSTALL=$ac_cv_path_install
ba4481b5
DL
3955 else
3956 # As a last resort, use the slow shell script. We don't cache a
3957 # path for INSTALL within a source directory, because that will
3958 # break other packages using the cache if that directory is
3959 # removed, or if the path is relative.
503d2be0 3960 INSTALL=$ac_install_sh
ba4481b5
DL
3961 fi
3962fi
c0d27fcc 3963echo "$as_me:$LINENO: result: $INSTALL" >&5
503d2be0 3964echo "${ECHO_T}$INSTALL" >&6
ba4481b5
DL
3965
3966# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3967# It thinks the first close brace ends the variable substitution.
3968test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3969
503d2be0 3970test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 3971
ba4481b5
DL
3972test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3973
c0d27fcc
MR
3974if test "x$RANLIB" = x; then
3975 if test -n "$ac_tool_prefix"; then
3976 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3977set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3978echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0 3979echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
c0d27fcc 3980if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 3981 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
3982else
3983 if test -n "$RANLIB"; then
3984 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3985else
c0d27fcc
MR
3986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3987for as_dir in $PATH
3988do
3989 IFS=$as_save_IFS
3990 test -z "$as_dir" && as_dir=.
3991 for ac_exec_ext in '' $ac_executable_extensions; do
3992 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3993 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3994 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3995 break 2
3996 fi
3997done
503d2be0
AS
3998done
3999
7397acc4
DL
4000fi
4001fi
503d2be0 4002RANLIB=$ac_cv_prog_RANLIB
7397acc4 4003if test -n "$RANLIB"; then
c0d27fcc 4004 echo "$as_me:$LINENO: result: $RANLIB" >&5
503d2be0
AS
4005echo "${ECHO_T}$RANLIB" >&6
4006else
c0d27fcc 4007 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
4008echo "${ECHO_T}no" >&6
4009fi
4010
4011fi
4012if test -z "$ac_cv_prog_RANLIB"; then
4013 ac_ct_RANLIB=$RANLIB
4014 # Extract the first word of "ranlib", so it can be a program name with args.
4015set dummy ranlib; ac_word=$2
c0d27fcc 4016echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
4017echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4018if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4019 echo $ECHO_N "(cached) $ECHO_C" >&6
4020else
4021 if test -n "$ac_ct_RANLIB"; then
4022 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4023else
c0d27fcc
MR
4024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4025for as_dir in $PATH
4026do
4027 IFS=$as_save_IFS
4028 test -z "$as_dir" && as_dir=.
4029 for ac_exec_ext in '' $ac_executable_extensions; do
4030 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4031 ac_cv_prog_ac_ct_RANLIB="ranlib"
4032 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4033 break 2
4034 fi
4035done
503d2be0
AS
4036done
4037
4038 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4039fi
4040fi
4041ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4042if test -n "$ac_ct_RANLIB"; then
c0d27fcc 4043 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
503d2be0
AS
4044echo "${ECHO_T}$ac_ct_RANLIB" >&6
4045else
c0d27fcc 4046 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
4047echo "${ECHO_T}no" >&6
4048fi
4049
4050 RANLIB=$ac_ct_RANLIB
7397acc4 4051else
503d2be0 4052 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
4053fi
4054
4055fi
9e71690e
DK
4056# Extract the first word of "install-info", so it can be a program name with args.
4057set dummy install-info; ac_word=$2
4058echo "$as_me:$LINENO: checking for $ac_word" >&5
4059echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4060if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4061 echo $ECHO_N "(cached) $ECHO_C" >&6
4062else
4063 case $INSTALL_INFO in
4064 [\\/]* | ?:[\\/]*)
4065 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4066 ;;
4067 *)
4068 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4069for as_dir in $PATH
4070do
4071 IFS=$as_save_IFS
4072 test -z "$as_dir" && as_dir=.
4073 for ac_exec_ext in '' $ac_executable_extensions; do
4074 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4075 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4076 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4077 break 2
4078 fi
4079done
4080done
4081
4082 ;;
4083esac
4084fi
4085INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4086
4087if test -n "$INSTALL_INFO"; then
4088 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4089echo "${ECHO_T}$INSTALL_INFO" >&6
4090else
4091 echo "$as_me:$LINENO: result: no" >&5
4092echo "${ECHO_T}no" >&6
4093fi
4094
4095# Extract the first word of "install-info", so it can be a program name with args.
4096set dummy install-info; ac_word=$2
4097echo "$as_me:$LINENO: checking for $ac_word" >&5
4098echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4099if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4100 echo $ECHO_N "(cached) $ECHO_C" >&6
4101else
4102 case $INSTALL_INFO in
4103 [\\/]* | ?:[\\/]*)
4104 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4105 ;;
4106 *)
4107 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4108for as_dir in /usr/sbin
4109do
4110 IFS=$as_save_IFS
4111 test -z "$as_dir" && as_dir=.
4112 for ac_exec_ext in '' $ac_executable_extensions; do
4113 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4114 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4115 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4116 break 2
4117 fi
4118done
4119done
4120
4121 ;;
4122esac
4123fi
4124INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4125
4126if test -n "$INSTALL_INFO"; then
4127 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4128echo "${ECHO_T}$INSTALL_INFO" >&6
4129else
4130 echo "$as_me:$LINENO: result: no" >&5
4131echo "${ECHO_T}no" >&6
4132fi
4133
4134# Extract the first word of "install-info", so it can be a program name with args.
4135set dummy install-info; ac_word=$2
4136echo "$as_me:$LINENO: checking for $ac_word" >&5
4137echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4138if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4139 echo $ECHO_N "(cached) $ECHO_C" >&6
4140else
4141 case $INSTALL_INFO in
4142 [\\/]* | ?:[\\/]*)
4143 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4144 ;;
4145 *)
4146 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4147for as_dir in /sbin
4148do
4149 IFS=$as_save_IFS
4150 test -z "$as_dir" && as_dir=.
4151 for ac_exec_ext in '' $ac_executable_extensions; do
4152 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4153 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4154 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4155 break 2
4156 fi
4157done
4158done
4159
4160 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
4161 ;;
4162esac
4163fi
4164INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4165
4166if test -n "$INSTALL_INFO"; then
4167 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4168echo "${ECHO_T}$INSTALL_INFO" >&6
4169else
4170 echo "$as_me:$LINENO: result: no" >&5
4171echo "${ECHO_T}no" >&6
4172fi
4173
ba4481b5 4174
c0d27fcc 4175
8e967cf7
MR
4176if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
4177then
4178 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
4179fi
4180
4181if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
4182then
4183 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
4184fi
4185
c0d27fcc 4186
fe239f0f 4187late_LDFLAGS=$LDFLAGS
4af002d6 4188if test "$GCC" = yes; then
fe239f0f
AS
4189 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
4190else
4191 LDFLAGS="$LDFLAGS -znocombreloc"
4192fi
4193
4194echo "$as_me:$LINENO: checking For -znocombreloc" >&5
4195echo $ECHO_N "checking For -znocombreloc... $ECHO_C" >&6
4196
4197cat >conftest.$ac_ext <<_ACEOF
4198main(){return 0;}
4199_ACEOF
4200rm -f conftest.$ac_objext conftest$ac_exeext
4201if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4202 (eval $ac_link) 2>conftest.er1
4203 ac_status=$?
4204 grep -v '^ *+' conftest.er1 >conftest.err
4205 rm -f conftest.er1
4206 cat conftest.err >&5
4207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4208 (exit $ac_status); } &&
4494a266
JD
4209 { ac_try='test -z "$ac_c_werror_flag"
4210 || test ! -s conftest.err'
fe239f0f
AS
4211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4212 (eval $ac_try) 2>&5
4213 ac_status=$?
4214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4215 (exit $ac_status); }; } &&
4216 { ac_try='test -s conftest$ac_exeext'
4217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4218 (eval $ac_try) 2>&5
4219 ac_status=$?
4220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4221 (exit $ac_status); }; }; then
4222 echo "$as_me:$LINENO: result: yes" >&5
4223echo "${ECHO_T}yes" >&6
4224else
4225 echo "$as_me: failed program was:" >&5
4226sed 's/^/| /' conftest.$ac_ext >&5
4227
4228LDFLAGS=$late_LDFLAGS
4229 echo "$as_me:$LINENO: result: no" >&5
4230echo "${ECHO_T}no" >&6
4231fi
4232rm -f conftest.err conftest.$ac_objext \
4233 conftest$ac_exeext conftest.$ac_ext
4234
c0d27fcc 4235
6bae0ccf
DL
4236echo "$as_me:$LINENO: checking for egrep" >&5
4237echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4238if test "${ac_cv_prog_egrep+set}" = set; then
4239 echo $ECHO_N "(cached) $ECHO_C" >&6
4240else
4241 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4242 then ac_cv_prog_egrep='grep -E'
4243 else ac_cv_prog_egrep='egrep'
4244 fi
4245fi
4246echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4247echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4248 EGREP=$ac_cv_prog_egrep
4249
4250
c0d27fcc
MR
4251
4252echo "$as_me:$LINENO: checking for AIX" >&5
503d2be0
AS
4253echo $ECHO_N "checking for AIX... $ECHO_C" >&6
4254cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4255/* confdefs.h. */
4256_ACEOF
4257cat confdefs.h >>conftest.$ac_ext
4258cat >>conftest.$ac_ext <<_ACEOF
4259/* end confdefs.h. */
ba4481b5
DL
4260#ifdef _AIX
4261 yes
4262#endif
4263
503d2be0 4264_ACEOF
ba4481b5 4265if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4266 $EGREP "yes" >/dev/null 2>&1; then
c0d27fcc 4267 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 4268echo "${ECHO_T}yes" >&6
c0d27fcc 4269cat >>confdefs.h <<\_ACEOF
ba4481b5 4270#define _ALL_SOURCE 1
c0d27fcc 4271_ACEOF
ba4481b5
DL
4272
4273else
c0d27fcc 4274 echo "$as_me:$LINENO: result: no" >&5
503d2be0 4275echo "${ECHO_T}no" >&6
ba4481b5
DL
4276fi
4277rm -f conftest*
4278
c0d27fcc
MR
4279
4280
4489ece2 4281
3b33a005
DL
4282#### Extract some information from the operating system and machine files.
4283
c0d27fcc 4284{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 4285 - which libraries the lib-src programs will want, and
503d2be0
AS
4286 - whether the GNU malloc routines are usable..." >&5
4287echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 4288 - which libraries the lib-src programs will want, and
503d2be0 4289 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
4290
4291### First figure out CFLAGS (which we use for running the compiler here)
4292### and REAL_CFLAGS (which we use for real compilation).
4293### The two are the same except on a few systems, where they are made
4294### different to work around various lossages. For example,
4295### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
4296### as implying static linking.
4297
4298### If the CFLAGS env var is specified, we use that value
4299### instead of the default.
4300
4301### It's not important that this name contain the PID; you can't run
4302### two configures in the same directory and have anything work
4303### anyway.
4304tempcname="conftest.c"
4305
4306echo '
4307#include "'${srcdir}'/src/'${opsysfile}'"
4308#include "'${srcdir}'/src/'${machfile}'"
4309#ifndef LIBS_MACHINE
4310#define LIBS_MACHINE
4311#endif
4312#ifndef LIBS_SYSTEM
4313#define LIBS_SYSTEM
4314#endif
4315#ifndef C_SWITCH_SYSTEM
4316#define C_SWITCH_SYSTEM
4317#endif
4318#ifndef C_SWITCH_MACHINE
4319#define C_SWITCH_MACHINE
4320#endif
4321configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
4322configure___ c_switch_system=C_SWITCH_SYSTEM
4323configure___ c_switch_machine=C_SWITCH_MACHINE
4324
4325#ifndef LIB_X11_LIB
4326#define LIB_X11_LIB -lX11
4327#endif
4328
4329#ifndef LIBX11_MACHINE
4330#define LIBX11_MACHINE
4331#endif
4332
4333#ifndef LIBX11_SYSTEM
4334#define LIBX11_SYSTEM
4335#endif
4336configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
4337
4338#ifdef UNEXEC
4339configure___ unexec=UNEXEC
4340#else
4341configure___ unexec=unexec.o
4342#endif
4343
4344#ifdef SYSTEM_MALLOC
4345configure___ system_malloc=yes
4346#else
4347configure___ system_malloc=no
4348#endif
4349
ef9e4345
GM
4350#ifdef USE_MMAP_FOR_BUFFERS
4351configure___ use_mmap_for_buffers=yes
73b77ee5 4352#else
ef9e4345 4353configure___ use_mmap_for_buffers=no
73b77ee5
GM
4354#endif
4355
3b33a005
DL
4356#ifndef C_DEBUG_SWITCH
4357#define C_DEBUG_SWITCH -g
4358#endif
4359
4360#ifndef C_OPTIMIZE_SWITCH
4361#ifdef __GNUC__
4362#define C_OPTIMIZE_SWITCH -O2
4363#else
4364#define C_OPTIMIZE_SWITCH -O
4365#endif
4366#endif
4367
4368#ifndef LD_SWITCH_MACHINE
4369#define LD_SWITCH_MACHINE
4370#endif
4371
4372#ifndef LD_SWITCH_SYSTEM
4373#define LD_SWITCH_SYSTEM
4374#endif
4375
4376#ifndef LD_SWITCH_X_SITE_AUX
4377#define LD_SWITCH_X_SITE_AUX
503d2be0 4378#endif
3b33a005
DL
4379
4380configure___ ld_switch_system=LD_SWITCH_SYSTEM
4381configure___ ld_switch_machine=LD_SWITCH_MACHINE
4382
4383#ifdef THIS_IS_CONFIGURE
4384
4385/* Get the CFLAGS for tests in configure. */
4386#ifdef __GNUC__
4387configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
4388#else
4389configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4390#endif
4391
4392#else /* not THIS_IS_CONFIGURE */
4393
4394/* Get the CFLAGS for real compilation. */
4395#ifdef __GNUC__
4396configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
4397#else
4398configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4399#endif
4400
4401#endif /* not THIS_IS_CONFIGURE */
4402' > ${tempcname}
4403
4404# The value of CPP is a quoted variable reference, so we need to do this
4405# to get its actual value...
4406CPP=`eval "echo $CPP"`
4407eval `${CPP} -Isrc ${tempcname} \
4408 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4409if test "x$SPECIFIED_CFLAGS" = x; then
4410 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
4411 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4412else
4413 REAL_CFLAGS="$CFLAGS"
4414fi
4415rm ${tempcname}
4416
4417ac_link="$ac_link $ld_switch_machine $ld_switch_system"
4418
4419### Make sure subsequent tests use flags consistent with the build flags.
4420
4421if test x"${OVERRIDE_CPPFLAGS}" != x; then
4422 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
4423else
4424 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
4425fi
4426
6bae0ccf
DL
4427
4428
22044edf
DL
4429
4430cat >>confdefs.h <<\_ACEOF
4431#define _GNU_SOURCE 1
4432_ACEOF
4433
4434
4435
503d2be0 4436# Check whether --enable-largefile or --disable-largefile was given.
f4988be7
GM
4437if test "${enable_largefile+set}" = set; then
4438 enableval="$enable_largefile"
f4988be7 4439
503d2be0
AS
4440fi;
4441if test "$enable_largefile" != no; then
f4988be7 4442
c0d27fcc 4443 echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
503d2be0
AS
4444echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
4445if test "${ac_cv_sys_largefile_CC+set}" = set; then
4446 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4447else
f4988be7 4448 ac_cv_sys_largefile_CC=no
503d2be0
AS
4449 if test "$GCC" != yes; then
4450 ac_save_CC=$CC
4451 while :; do
4452 # IRIX 6.2 and later do not support large files by default,
4453 # so use the C compiler's -n32 option if that helps.
35996d22 4454 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4455/* confdefs.h. */
4456_ACEOF
4457cat confdefs.h >>conftest.$ac_ext
4458cat >>conftest.$ac_ext <<_ACEOF
4459/* end confdefs.h. */
f4988be7 4460#include <sys/types.h>
503d2be0
AS
4461 /* Check that off_t can represent 2**63 - 1 correctly.
4462 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4463 since some C++ compilers masquerading as C compilers
4464 incorrectly reject 9223372036854775807. */
4465#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4466 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4467 && LARGE_OFF_T % 2147483647 == 1)
4468 ? 1 : -1];
4469int
4470main ()
4471{
f4988be7 4472
503d2be0
AS
4473 ;
4474 return 0;
4475}
4476_ACEOF
4477 rm -f conftest.$ac_objext
c0d27fcc 4478if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4479 (eval $ac_compile) 2>conftest.er1
503d2be0 4480 ac_status=$?
35996d22
AS
4481 grep -v '^ *+' conftest.er1 >conftest.err
4482 rm -f conftest.er1
4483 cat conftest.err >&5
c0d27fcc 4484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4485 (exit $ac_status); } &&
4494a266
JD
4486 { ac_try='test -z "$ac_c_werror_flag"
4487 || test ! -s conftest.err'
35996d22
AS
4488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4489 (eval $ac_try) 2>&5
4490 ac_status=$?
4491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4492 (exit $ac_status); }; } &&
4493 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4495 (eval $ac_try) 2>&5
4496 ac_status=$?
c0d27fcc 4497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4498 (exit $ac_status); }; }; then
4499 break
b192d653 4500else
503d2be0 4501 echo "$as_me: failed program was:" >&5
19650fd6
AS
4502sed 's/^/| /' conftest.$ac_ext >&5
4503
503d2be0 4504fi
35996d22 4505rm -f conftest.err conftest.$ac_objext
503d2be0
AS
4506 CC="$CC -n32"
4507 rm -f conftest.$ac_objext
c0d27fcc 4508if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4509 (eval $ac_compile) 2>conftest.er1
503d2be0 4510 ac_status=$?
35996d22
AS
4511 grep -v '^ *+' conftest.er1 >conftest.err
4512 rm -f conftest.er1
4513 cat conftest.err >&5
c0d27fcc 4514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4515 (exit $ac_status); } &&
4494a266
JD
4516 { ac_try='test -z "$ac_c_werror_flag"
4517 || test ! -s conftest.err'
35996d22
AS
4518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4519 (eval $ac_try) 2>&5
4520 ac_status=$?
4521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4522 (exit $ac_status); }; } &&
4523 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4525 (eval $ac_try) 2>&5
4526 ac_status=$?
c0d27fcc 4527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4528 (exit $ac_status); }; }; then
4529 ac_cv_sys_largefile_CC=' -n32'; break
4530else
4531 echo "$as_me: failed program was:" >&5
19650fd6
AS
4532sed 's/^/| /' conftest.$ac_ext >&5
4533
503d2be0 4534fi
35996d22
AS
4535rm -f conftest.err conftest.$ac_objext
4536 break
503d2be0
AS
4537 done
4538 CC=$ac_save_CC
4539 rm -f conftest.$ac_ext
4540 fi
b192d653 4541fi
c0d27fcc 4542echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
503d2be0
AS
4543echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
4544 if test "$ac_cv_sys_largefile_CC" != no; then
4545 CC=$CC$ac_cv_sys_largefile_CC
4546 fi
b192d653 4547
c0d27fcc 4548 echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
503d2be0
AS
4549echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
4550if test "${ac_cv_sys_file_offset_bits+set}" = set; then
4551 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4552else
503d2be0 4553 while :; do
f4988be7 4554 ac_cv_sys_file_offset_bits=no
503d2be0 4555 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4556/* confdefs.h. */
4557_ACEOF
4558cat confdefs.h >>conftest.$ac_ext
4559cat >>conftest.$ac_ext <<_ACEOF
4560/* end confdefs.h. */
f4988be7 4561#include <sys/types.h>
503d2be0
AS
4562 /* Check that off_t can represent 2**63 - 1 correctly.
4563 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4564 since some C++ compilers masquerading as C compilers
4565 incorrectly reject 9223372036854775807. */
4566#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4567 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4568 && LARGE_OFF_T % 2147483647 == 1)
4569 ? 1 : -1];
4570int
4571main ()
4572{
f4988be7 4573
503d2be0
AS
4574 ;
4575 return 0;
4576}
4577_ACEOF
4578rm -f conftest.$ac_objext
c0d27fcc 4579if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4580 (eval $ac_compile) 2>conftest.er1
503d2be0 4581 ac_status=$?
35996d22
AS
4582 grep -v '^ *+' conftest.er1 >conftest.err
4583 rm -f conftest.er1
4584 cat conftest.err >&5
c0d27fcc 4585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4586 (exit $ac_status); } &&
4494a266
JD
4587 { ac_try='test -z "$ac_c_werror_flag"
4588 || test ! -s conftest.err'
35996d22
AS
4589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4590 (eval $ac_try) 2>&5
4591 ac_status=$?
4592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4593 (exit $ac_status); }; } &&
4594 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4596 (eval $ac_try) 2>&5
4597 ac_status=$?
c0d27fcc 4598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4599 (exit $ac_status); }; }; then
4600 break
f4988be7 4601else
503d2be0 4602 echo "$as_me: failed program was:" >&5
19650fd6
AS
4603sed 's/^/| /' conftest.$ac_ext >&5
4604
503d2be0 4605fi
35996d22 4606rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 4607 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4608/* confdefs.h. */
4609_ACEOF
4610cat confdefs.h >>conftest.$ac_ext
4611cat >>conftest.$ac_ext <<_ACEOF
4612/* end confdefs.h. */
f4988be7
GM
4613#define _FILE_OFFSET_BITS 64
4614#include <sys/types.h>
503d2be0
AS
4615 /* Check that off_t can represent 2**63 - 1 correctly.
4616 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4617 since some C++ compilers masquerading as C compilers
4618 incorrectly reject 9223372036854775807. */
4619#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4620 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4621 && LARGE_OFF_T % 2147483647 == 1)
4622 ? 1 : -1];
4623int
4624main ()
4625{
4626
4627 ;
4628 return 0;
4629}
4630_ACEOF
4631rm -f conftest.$ac_objext
c0d27fcc 4632if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4633 (eval $ac_compile) 2>conftest.er1
503d2be0 4634 ac_status=$?
35996d22
AS
4635 grep -v '^ *+' conftest.er1 >conftest.err
4636 rm -f conftest.er1
4637 cat conftest.err >&5
c0d27fcc 4638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4639 (exit $ac_status); } &&
4494a266
JD
4640 { ac_try='test -z "$ac_c_werror_flag"
4641 || test ! -s conftest.err'
35996d22
AS
4642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4643 (eval $ac_try) 2>&5
4644 ac_status=$?
4645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4646 (exit $ac_status); }; } &&
4647 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4649 (eval $ac_try) 2>&5
4650 ac_status=$?
c0d27fcc 4651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4652 (exit $ac_status); }; }; then
4653 ac_cv_sys_file_offset_bits=64; break
4654else
4655 echo "$as_me: failed program was:" >&5
19650fd6
AS
4656sed 's/^/| /' conftest.$ac_ext >&5
4657
503d2be0 4658fi
35996d22 4659rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
4660 break
4661done
ba4481b5 4662fi
c0d27fcc 4663echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
503d2be0
AS
4664echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
4665if test "$ac_cv_sys_file_offset_bits" != no; then
ba4481b5 4666
c0d27fcc 4667cat >>confdefs.h <<_ACEOF
f4988be7 4668#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 4669_ACEOF
f4988be7 4670
503d2be0
AS
4671fi
4672rm -f conftest*
c0d27fcc 4673 echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
503d2be0
AS
4674echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
4675if test "${ac_cv_sys_large_files+set}" = set; then
4676 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4677else
503d2be0 4678 while :; do
f4988be7 4679 ac_cv_sys_large_files=no
503d2be0 4680 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4681/* confdefs.h. */
4682_ACEOF
4683cat confdefs.h >>conftest.$ac_ext
4684cat >>conftest.$ac_ext <<_ACEOF
4685/* end confdefs.h. */
503d2be0
AS
4686#include <sys/types.h>
4687 /* Check that off_t can represent 2**63 - 1 correctly.
4688 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4689 since some C++ compilers masquerading as C compilers
4690 incorrectly reject 9223372036854775807. */
4691#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4692 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4693 && LARGE_OFF_T % 2147483647 == 1)
4694 ? 1 : -1];
4695int
4696main ()
4697{
ba4481b5 4698
503d2be0
AS
4699 ;
4700 return 0;
4701}
4702_ACEOF
4703rm -f conftest.$ac_objext
c0d27fcc 4704if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4705 (eval $ac_compile) 2>conftest.er1
503d2be0 4706 ac_status=$?
35996d22
AS
4707 grep -v '^ *+' conftest.er1 >conftest.err
4708 rm -f conftest.er1
4709 cat conftest.err >&5
c0d27fcc 4710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4711 (exit $ac_status); } &&
4494a266
JD
4712 { ac_try='test -z "$ac_c_werror_flag"
4713 || test ! -s conftest.err'
35996d22
AS
4714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4715 (eval $ac_try) 2>&5
4716 ac_status=$?
4717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4718 (exit $ac_status); }; } &&
4719 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4721 (eval $ac_try) 2>&5
4722 ac_status=$?
c0d27fcc 4723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4724 (exit $ac_status); }; }; then
4725 break
ba4481b5 4726else
503d2be0 4727 echo "$as_me: failed program was:" >&5
19650fd6
AS
4728sed 's/^/| /' conftest.$ac_ext >&5
4729
503d2be0 4730fi
35996d22 4731rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 4732 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4733/* confdefs.h. */
4734_ACEOF
4735cat confdefs.h >>conftest.$ac_ext
4736cat >>conftest.$ac_ext <<_ACEOF
4737/* end confdefs.h. */
f4988be7 4738#define _LARGE_FILES 1
503d2be0
AS
4739#include <sys/types.h>
4740 /* Check that off_t can represent 2**63 - 1 correctly.
4741 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4742 since some C++ compilers masquerading as C compilers
4743 incorrectly reject 9223372036854775807. */
4744#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4745 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4746 && LARGE_OFF_T % 2147483647 == 1)
4747 ? 1 : -1];
4748int
4749main ()
4750{
f4988be7 4751
503d2be0
AS
4752 ;
4753 return 0;
4754}
4755_ACEOF
4756rm -f conftest.$ac_objext
c0d27fcc 4757if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4758 (eval $ac_compile) 2>conftest.er1
503d2be0 4759 ac_status=$?
35996d22
AS
4760 grep -v '^ *+' conftest.er1 >conftest.err
4761 rm -f conftest.er1
4762 cat conftest.err >&5
c0d27fcc 4763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4764 (exit $ac_status); } &&
4494a266
JD
4765 { ac_try='test -z "$ac_c_werror_flag"
4766 || test ! -s conftest.err'
35996d22
AS
4767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4768 (eval $ac_try) 2>&5
4769 ac_status=$?
4770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4771 (exit $ac_status); }; } &&
4772 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4774 (eval $ac_try) 2>&5
4775 ac_status=$?
c0d27fcc 4776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4777 (exit $ac_status); }; }; then
4778 ac_cv_sys_large_files=1; break
4779else
4780 echo "$as_me: failed program was:" >&5
19650fd6
AS
4781sed 's/^/| /' conftest.$ac_ext >&5
4782
503d2be0 4783fi
35996d22 4784rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
4785 break
4786done
ba4481b5 4787fi
c0d27fcc 4788echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
503d2be0
AS
4789echo "${ECHO_T}$ac_cv_sys_large_files" >&6
4790if test "$ac_cv_sys_large_files" != no; then
ba4481b5 4791
c0d27fcc 4792cat >>confdefs.h <<_ACEOF
f4988be7 4793#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 4794_ACEOF
ba4481b5 4795
503d2be0
AS
4796fi
4797rm -f conftest*
4798fi
ba4481b5 4799
c0d27fcc 4800
2c9dccc9
PJ
4801if test "${with_sound}" != "no"; then
4802 # Sound support for GNU/Linux and the free BSDs.
c0d27fcc
MR
4803 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4804echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4805if test "${ac_cv_header_stdc+set}" = set; then
4806 echo $ECHO_N "(cached) $ECHO_C" >&6
4807else
4808 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4809/* confdefs.h. */
4810_ACEOF
4811cat confdefs.h >>conftest.$ac_ext
4812cat >>conftest.$ac_ext <<_ACEOF
4813/* end confdefs.h. */
c0d27fcc
MR
4814#include <stdlib.h>
4815#include <stdarg.h>
4816#include <string.h>
4817#include <float.h>
98418dba 4818
19650fd6
AS
4819int
4820main ()
4821{
4822
4823 ;
4824 return 0;
4825}
c0d27fcc 4826_ACEOF
19650fd6
AS
4827rm -f conftest.$ac_objext
4828if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4829 (eval $ac_compile) 2>conftest.er1
cd958eb3 4830 ac_status=$?
35996d22
AS
4831 grep -v '^ *+' conftest.er1 >conftest.err
4832 rm -f conftest.er1
4833 cat conftest.err >&5
cd958eb3 4834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 4835 (exit $ac_status); } &&
4494a266
JD
4836 { ac_try='test -z "$ac_c_werror_flag"
4837 || test ! -s conftest.err'
35996d22
AS
4838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4839 (eval $ac_try) 2>&5
4840 ac_status=$?
4841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4842 (exit $ac_status); }; } &&
4843 { ac_try='test -s conftest.$ac_objext'
19650fd6
AS
4844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4845 (eval $ac_try) 2>&5
4846 ac_status=$?
4847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4848 (exit $ac_status); }; }; then
c0d27fcc
MR
4849 ac_cv_header_stdc=yes
4850else
4851 echo "$as_me: failed program was:" >&5
19650fd6
AS
4852sed 's/^/| /' conftest.$ac_ext >&5
4853
4854ac_cv_header_stdc=no
c0d27fcc 4855fi
35996d22 4856rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
4857
4858if test $ac_cv_header_stdc = yes; then
4859 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4860 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4861/* confdefs.h. */
4862_ACEOF
4863cat confdefs.h >>conftest.$ac_ext
4864cat >>conftest.$ac_ext <<_ACEOF
4865/* end confdefs.h. */
c0d27fcc
MR
4866#include <string.h>
4867
4868_ACEOF
4869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4870 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
4871 :
4872else
4873 ac_cv_header_stdc=no
4874fi
4875rm -f conftest*
4876
4877fi
4878
4879if test $ac_cv_header_stdc = yes; then
4880 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4881 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4882/* confdefs.h. */
4883_ACEOF
4884cat confdefs.h >>conftest.$ac_ext
4885cat >>conftest.$ac_ext <<_ACEOF
4886/* end confdefs.h. */
c0d27fcc
MR
4887#include <stdlib.h>
4888
4889_ACEOF
4890if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4891 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
4892 :
4893else
4894 ac_cv_header_stdc=no
4895fi
4896rm -f conftest*
4897
4898fi
4899
4900if test $ac_cv_header_stdc = yes; then
4901 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4902 if test "$cross_compiling" = yes; then
4903 :
4904else
4905 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4906/* confdefs.h. */
4907_ACEOF
4908cat confdefs.h >>conftest.$ac_ext
4909cat >>conftest.$ac_ext <<_ACEOF
4910/* end confdefs.h. */
c0d27fcc
MR
4911#include <ctype.h>
4912#if ((' ' & 0x0FF) == 0x020)
4913# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4914# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4915#else
19650fd6 4916# define ISLOWER(c) \
35996d22
AS
4917 (('a' <= (c) && (c) <= 'i') \
4918 || ('j' <= (c) && (c) <= 'r') \
4919 || ('s' <= (c) && (c) <= 'z'))
c0d27fcc
MR
4920# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4921#endif
4922
4923#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4924int
4925main ()
4926{
4927 int i;
4928 for (i = 0; i < 256; i++)
4929 if (XOR (islower (i), ISLOWER (i))
35996d22 4930 || toupper (i) != TOUPPER (i))
c0d27fcc
MR
4931 exit(2);
4932 exit (0);
4933}
4934_ACEOF
4935rm -f conftest$ac_exeext
4936if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4937 (eval $ac_link) 2>&5
4938 ac_status=$?
4939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4940 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4942 (eval $ac_try) 2>&5
4943 ac_status=$?
4944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4945 (exit $ac_status); }; }; then
4946 :
4947else
4948 echo "$as_me: program exited with status $ac_status" >&5
4949echo "$as_me: failed program was:" >&5
19650fd6
AS
4950sed 's/^/| /' conftest.$ac_ext >&5
4951
c0d27fcc
MR
4952( exit $ac_status )
4953ac_cv_header_stdc=no
4954fi
35996d22 4955rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
4956fi
4957fi
4958fi
4959echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4960echo "${ECHO_T}$ac_cv_header_stdc" >&6
4961if test $ac_cv_header_stdc = yes; then
4962
4963cat >>confdefs.h <<\_ACEOF
4964#define STDC_HEADERS 1
4965_ACEOF
4966
4967fi
4968
4969# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
35996d22 4980 inttypes.h stdint.h unistd.h
98418dba
CW
4981do
4982as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc 4983echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
4984echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4985if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 4986 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4987else
925c2f3f 4988 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4989/* confdefs.h. */
4990_ACEOF
4991cat confdefs.h >>conftest.$ac_ext
4992cat >>conftest.$ac_ext <<_ACEOF
4993/* end confdefs.h. */
c0d27fcc
MR
4994$ac_includes_default
4995
4996#include <$ac_header>
4997_ACEOF
4998rm -f conftest.$ac_objext
4999if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5000 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5001 ac_status=$?
35996d22
AS
5002 grep -v '^ *+' conftest.er1 >conftest.err
5003 rm -f conftest.er1
5004 cat conftest.err >&5
c0d27fcc
MR
5005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5006 (exit $ac_status); } &&
4494a266
JD
5007 { ac_try='test -z "$ac_c_werror_flag"
5008 || test ! -s conftest.err'
35996d22
AS
5009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5010 (eval $ac_try) 2>&5
5011 ac_status=$?
5012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5013 (exit $ac_status); }; } &&
5014 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5016 (eval $ac_try) 2>&5
5017 ac_status=$?
5018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5019 (exit $ac_status); }; }; then
5020 eval "$as_ac_Header=yes"
5021else
5022 echo "$as_me: failed program was:" >&5
19650fd6
AS
5023sed 's/^/| /' conftest.$ac_ext >&5
5024
c0d27fcc
MR
5025eval "$as_ac_Header=no"
5026fi
35996d22 5027rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5028fi
5029echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5030echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5031if test `eval echo '${'$as_ac_Header'}'` = yes; then
5032 cat >>confdefs.h <<_ACEOF
5033#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5034_ACEOF
5035
5036fi
5037
5038done
5039
5040
5041
5042
5043
5044for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5045do
5046as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5047if eval "test \"\${$as_ac_Header+set}\" = set"; then
5048 echo "$as_me:$LINENO: checking for $ac_header" >&5
5049echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5050if eval "test \"\${$as_ac_Header+set}\" = set"; then
5051 echo $ECHO_N "(cached) $ECHO_C" >&6
5052fi
5053echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5054echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5055else
5056 # Is the header compilable?
5057echo "$as_me:$LINENO: checking $ac_header usability" >&5
5058echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5059cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5060/* confdefs.h. */
5061_ACEOF
5062cat confdefs.h >>conftest.$ac_ext
5063cat >>conftest.$ac_ext <<_ACEOF
5064/* end confdefs.h. */
c0d27fcc 5065$ac_includes_default
98418dba 5066#include <$ac_header>
503d2be0 5067_ACEOF
c0d27fcc
MR
5068rm -f conftest.$ac_objext
5069if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5070 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5071 ac_status=$?
35996d22
AS
5072 grep -v '^ *+' conftest.er1 >conftest.err
5073 rm -f conftest.er1
5074 cat conftest.err >&5
c0d27fcc
MR
5075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5076 (exit $ac_status); } &&
4494a266
JD
5077 { ac_try='test -z "$ac_c_werror_flag"
5078 || test ! -s conftest.err'
35996d22
AS
5079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5080 (eval $ac_try) 2>&5
5081 ac_status=$?
5082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5083 (exit $ac_status); }; } &&
5084 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5086 (eval $ac_try) 2>&5
5087 ac_status=$?
5088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5089 (exit $ac_status); }; }; then
5090 ac_header_compiler=yes
5091else
5092 echo "$as_me: failed program was:" >&5
19650fd6
AS
5093sed 's/^/| /' conftest.$ac_ext >&5
5094
c0d27fcc
MR
5095ac_header_compiler=no
5096fi
35996d22 5097rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5098echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5099echo "${ECHO_T}$ac_header_compiler" >&6
5100
5101# Is the header present?
5102echo "$as_me:$LINENO: checking $ac_header presence" >&5
5103echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5104cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5105/* confdefs.h. */
5106_ACEOF
5107cat confdefs.h >>conftest.$ac_ext
5108cat >>conftest.$ac_ext <<_ACEOF
5109/* end confdefs.h. */
c0d27fcc
MR
5110#include <$ac_header>
5111_ACEOF
5112if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5113 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5114 ac_status=$?
6bae0ccf 5115 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5116 rm -f conftest.er1
5117 cat conftest.err >&5
c0d27fcc 5118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5119 (exit $ac_status); } >/dev/null; then
5120 if test -s conftest.err; then
5121 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 5122 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
5123 else
5124 ac_cpp_err=
5125 fi
5126else
5127 ac_cpp_err=yes
5128fi
5129if test -z "$ac_cpp_err"; then
c0d27fcc 5130 ac_header_preproc=yes
f4988be7 5131else
503d2be0 5132 echo "$as_me: failed program was:" >&5
19650fd6
AS
5133sed 's/^/| /' conftest.$ac_ext >&5
5134
c0d27fcc 5135 ac_header_preproc=no
f4988be7 5136fi
98418dba 5137rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5138echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5139echo "${ECHO_T}$ac_header_preproc" >&6
5140
5141# So? What about this header?
35996d22
AS
5142case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5143 yes:no: )
c0d27fcc
MR
5144 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5145echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
5146 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5147echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5148 ac_header_preproc=yes
19650fd6 5149 ;;
35996d22 5150 no:yes:* )
c0d27fcc
MR
5151 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5152echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
5153 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5154echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5155 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5156echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5157 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5158echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 5159 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 5160echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
5161 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5162echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
5163 (
5164 cat <<\_ASBOX
35996d22
AS
5165## ------------------------------------------ ##
5166## Report this to the AC_PACKAGE_NAME lists. ##
5167## ------------------------------------------ ##
19650fd6
AS
5168_ASBOX
5169 ) |
5170 sed "s/^/$as_me: WARNING: /" >&2
5171 ;;
c0d27fcc
MR
5172esac
5173echo "$as_me:$LINENO: checking for $ac_header" >&5
5174echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5175if eval "test \"\${$as_ac_Header+set}\" = set"; then
5176 echo $ECHO_N "(cached) $ECHO_C" >&6
5177else
35996d22 5178 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 5179fi
c0d27fcc 5180echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5181echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5182
5183fi
98418dba 5184if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5185 cat >>confdefs.h <<_ACEOF
98418dba 5186#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5187_ACEOF
f4988be7
GM
5188
5189fi
c0d27fcc 5190
98418dba
CW
5191done
5192
5193 # Emulation library used on NetBSD.
c0d27fcc 5194 echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
98418dba
CW
5195echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6
5196if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 5197 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 5198else
98418dba
CW
5199 ac_check_lib_save_LIBS=$LIBS
5200LIBS="-lossaudio $LIBS"
5201cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5202/* confdefs.h. */
5203_ACEOF
5204cat confdefs.h >>conftest.$ac_ext
5205cat >>conftest.$ac_ext <<_ACEOF
5206/* end confdefs.h. */
98418dba
CW
5207
5208/* Override any gcc2 internal prototype to avoid an error. */
5209#ifdef __cplusplus
5210extern "C"
f4988be7 5211#endif
98418dba
CW
5212/* We use char because int might match the return type of a gcc2
5213 builtin and then its argument prototype would still apply. */
5214char _oss_ioctl ();
503d2be0
AS
5215int
5216main ()
5217{
98418dba 5218_oss_ioctl ();
503d2be0
AS
5219 ;
5220 return 0;
5221}
5222_ACEOF
98418dba 5223rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 5224if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 5225 (eval $ac_link) 2>conftest.er1
503d2be0 5226 ac_status=$?
35996d22
AS
5227 grep -v '^ *+' conftest.er1 >conftest.err
5228 rm -f conftest.er1
5229 cat conftest.err >&5
c0d27fcc 5230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5231 (exit $ac_status); } &&
4494a266
JD
5232 { ac_try='test -z "$ac_c_werror_flag"
5233 || test ! -s conftest.err'
35996d22
AS
5234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5235 (eval $ac_try) 2>&5
5236 ac_status=$?
5237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5238 (exit $ac_status); }; } &&
5239 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 5240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5241 (eval $ac_try) 2>&5
5242 ac_status=$?
c0d27fcc 5243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5244 (exit $ac_status); }; }; then
98418dba 5245 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 5246else
503d2be0 5247 echo "$as_me: failed program was:" >&5
19650fd6
AS
5248sed 's/^/| /' conftest.$ac_ext >&5
5249
98418dba 5250ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 5251fi
35996d22
AS
5252rm -f conftest.err conftest.$ac_objext \
5253 conftest$ac_exeext conftest.$ac_ext
98418dba 5254LIBS=$ac_check_lib_save_LIBS
f4988be7 5255fi
c0d27fcc 5256echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
98418dba
CW
5257echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6
5258if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
5259 LIBSOUND=-lossaudio
5260else
5261 LIBSOUND=
5262fi
5263
c0d27fcc 5264
f4988be7 5265fi
c0d27fcc
MR
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
22044edf
DL
5284
5285
973a76b1 5286
cffcede7 5287
c0d27fcc 5288
f4988be7 5289
98418dba
CW
5290for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
5291 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 5292 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
cffcede7 5293 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h
98418dba
CW
5294do
5295as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
5296if eval "test \"\${$as_ac_Header+set}\" = set"; then
5297 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
5298echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5299if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 5300 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
5301fi
5302echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5303echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
f4988be7 5304else
c0d27fcc
MR
5305 # Is the header compilable?
5306echo "$as_me:$LINENO: checking $ac_header usability" >&5
5307echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5308cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5309/* confdefs.h. */
5310_ACEOF
5311cat confdefs.h >>conftest.$ac_ext
5312cat >>conftest.$ac_ext <<_ACEOF
5313/* end confdefs.h. */
c0d27fcc
MR
5314$ac_includes_default
5315#include <$ac_header>
5316_ACEOF
5317rm -f conftest.$ac_objext
5318if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5319 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5320 ac_status=$?
35996d22
AS
5321 grep -v '^ *+' conftest.er1 >conftest.err
5322 rm -f conftest.er1
5323 cat conftest.err >&5
c0d27fcc
MR
5324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5325 (exit $ac_status); } &&
4494a266
JD
5326 { ac_try='test -z "$ac_c_werror_flag"
5327 || test ! -s conftest.err'
35996d22
AS
5328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5329 (eval $ac_try) 2>&5
5330 ac_status=$?
5331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5332 (exit $ac_status); }; } &&
5333 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5335 (eval $ac_try) 2>&5
5336 ac_status=$?
5337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5338 (exit $ac_status); }; }; then
5339 ac_header_compiler=yes
5340else
5341 echo "$as_me: failed program was:" >&5
19650fd6
AS
5342sed 's/^/| /' conftest.$ac_ext >&5
5343
c0d27fcc
MR
5344ac_header_compiler=no
5345fi
35996d22 5346rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5347echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5348echo "${ECHO_T}$ac_header_compiler" >&6
5349
5350# Is the header present?
5351echo "$as_me:$LINENO: checking $ac_header presence" >&5
5352echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5353cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5354/* confdefs.h. */
5355_ACEOF
5356cat confdefs.h >>conftest.$ac_ext
5357cat >>conftest.$ac_ext <<_ACEOF
5358/* end confdefs.h. */
98418dba 5359#include <$ac_header>
503d2be0 5360_ACEOF
c0d27fcc 5361if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5362 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5363 ac_status=$?
6bae0ccf 5364 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5365 rm -f conftest.er1
5366 cat conftest.err >&5
c0d27fcc 5367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5368 (exit $ac_status); } >/dev/null; then
5369 if test -s conftest.err; then
5370 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 5371 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
5372 else
5373 ac_cpp_err=
5374 fi
5375else
5376 ac_cpp_err=yes
5377fi
5378if test -z "$ac_cpp_err"; then
c0d27fcc 5379 ac_header_preproc=yes
34ec9ebe 5380else
503d2be0 5381 echo "$as_me: failed program was:" >&5
19650fd6
AS
5382sed 's/^/| /' conftest.$ac_ext >&5
5383
c0d27fcc 5384 ac_header_preproc=no
34ec9ebe 5385fi
98418dba 5386rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5387echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5388echo "${ECHO_T}$ac_header_preproc" >&6
5389
5390# So? What about this header?
35996d22
AS
5391case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5392 yes:no: )
c0d27fcc
MR
5393 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5394echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
5395 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5396echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5397 ac_header_preproc=yes
19650fd6 5398 ;;
35996d22 5399 no:yes:* )
c0d27fcc
MR
5400 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5401echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
5402 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5403echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5404 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5405echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5406 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5407echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 5408 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 5409echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
5410 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5411echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
5412 (
5413 cat <<\_ASBOX
35996d22
AS
5414## ------------------------------------------ ##
5415## Report this to the AC_PACKAGE_NAME lists. ##
5416## ------------------------------------------ ##
19650fd6
AS
5417_ASBOX
5418 ) |
5419 sed "s/^/$as_me: WARNING: /" >&2
5420 ;;
c0d27fcc
MR
5421esac
5422echo "$as_me:$LINENO: checking for $ac_header" >&5
5423echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5424if eval "test \"\${$as_ac_Header+set}\" = set"; then
5425 echo $ECHO_N "(cached) $ECHO_C" >&6
5426else
35996d22 5427 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 5428fi
c0d27fcc 5429echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5430echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5431
5432fi
98418dba 5433if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5434 cat >>confdefs.h <<_ACEOF
98418dba 5435#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5436_ACEOF
34ec9ebe 5437
98418dba 5438fi
c0d27fcc 5439
98418dba
CW
5440done
5441
22044edf 5442
f17e308a
JD
5443echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
5444echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6
5445cat >conftest.$ac_ext <<_ACEOF
5446/* confdefs.h. */
5447_ACEOF
5448cat confdefs.h >>conftest.$ac_ext
5449cat >>conftest.$ac_ext <<_ACEOF
5450/* end confdefs.h. */
5451#include <sys/personality.h>
5452int
5453main ()
5454{
5455personality (PER_LINUX32)
5456 ;
5457 return 0;
5458}
5459_ACEOF
5460rm -f conftest.$ac_objext
5461if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5462 (eval $ac_compile) 2>conftest.er1
5463 ac_status=$?
5464 grep -v '^ *+' conftest.er1 >conftest.err
5465 rm -f conftest.er1
5466 cat conftest.err >&5
5467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5468 (exit $ac_status); } &&
5469 { ac_try='test -z "$ac_c_werror_flag"
5470 || test ! -s conftest.err'
5471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5472 (eval $ac_try) 2>&5
5473 ac_status=$?
5474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5475 (exit $ac_status); }; } &&
5476 { ac_try='test -s conftest.$ac_objext'
5477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5478 (eval $ac_try) 2>&5
5479 ac_status=$?
5480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5481 (exit $ac_status); }; }; then
5482 emacs_cv_personality_linux32=yes
5483else
5484 echo "$as_me: failed program was:" >&5
5485sed 's/^/| /' conftest.$ac_ext >&5
5486
5487emacs_cv_personality_linux32=no
5488fi
5489rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5490echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
5491echo "${ECHO_T}$emacs_cv_personality_linux32" >&6
5492
5493if test $emacs_cv_personality_linux32 = yes; then
5494
5495cat >>confdefs.h <<\_ACEOF
5496#define HAVE_PERSONALITY_LINUX32 1
5497_ACEOF
5498
5499fi
5500
5501
22044edf
DL
5502for ac_header in term.h
5503do
5504as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5505echo "$as_me:$LINENO: checking for $ac_header" >&5
5506echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5507if eval "test \"\${$as_ac_Header+set}\" = set"; then
5508 echo $ECHO_N "(cached) $ECHO_C" >&6
5509else
5510 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5511/* confdefs.h. */
5512_ACEOF
5513cat confdefs.h >>conftest.$ac_ext
5514cat >>conftest.$ac_ext <<_ACEOF
5515/* end confdefs.h. */
22044edf
DL
5516#include <$ac_header>
5517_ACEOF
5518if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5519 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5520 ac_status=$?
5521 grep -v '^ *+' conftest.er1 >conftest.err
5522 rm -f conftest.er1
5523 cat conftest.err >&5
5524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5525 (exit $ac_status); } >/dev/null; then
5526 if test -s conftest.err; then
5527 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 5528 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22044edf
DL
5529 else
5530 ac_cpp_err=
5531 fi
5532else
5533 ac_cpp_err=yes
5534fi
5535if test -z "$ac_cpp_err"; then
5536 eval "$as_ac_Header=yes"
5537else
5538 echo "$as_me: failed program was:" >&5
19650fd6
AS
5539sed 's/^/| /' conftest.$ac_ext >&5
5540
22044edf
DL
5541 eval "$as_ac_Header=no"
5542fi
5543rm -f conftest.err conftest.$ac_ext
5544fi
5545echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5546echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5547if test `eval echo '${'$as_ac_Header'}'` = yes; then
5548 cat >>confdefs.h <<_ACEOF
5549#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5550_ACEOF
5551
5552fi
5553
5554done
5555
c0d27fcc 5556echo "$as_me:$LINENO: checking for ANSI C header files" >&5
98418dba
CW
5557echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5558if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 5559 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5560else
503d2be0 5561 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5562/* confdefs.h. */
5563_ACEOF
5564cat confdefs.h >>conftest.$ac_ext
5565cat >>conftest.$ac_ext <<_ACEOF
5566/* end confdefs.h. */
98418dba
CW
5567#include <stdlib.h>
5568#include <stdarg.h>
5569#include <string.h>
5570#include <float.h>
5571
19650fd6
AS
5572int
5573main ()
5574{
5575
5576 ;
5577 return 0;
5578}
98418dba 5579_ACEOF
19650fd6
AS
5580rm -f conftest.$ac_objext
5581if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5582 (eval $ac_compile) 2>conftest.er1
cd958eb3 5583 ac_status=$?
35996d22
AS
5584 grep -v '^ *+' conftest.er1 >conftest.err
5585 rm -f conftest.er1
5586 cat conftest.err >&5
cd958eb3 5587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 5588 (exit $ac_status); } &&
4494a266
JD
5589 { ac_try='test -z "$ac_c_werror_flag"
5590 || test ! -s conftest.err'
35996d22
AS
5591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5592 (eval $ac_try) 2>&5
5593 ac_status=$?
5594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5595 (exit $ac_status); }; } &&
5596 { ac_try='test -s conftest.$ac_objext'
19650fd6
AS
5597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5598 (eval $ac_try) 2>&5
5599 ac_status=$?
5600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5601 (exit $ac_status); }; }; then
98418dba 5602 ac_cv_header_stdc=yes
ba4481b5 5603else
503d2be0 5604 echo "$as_me: failed program was:" >&5
19650fd6
AS
5605sed 's/^/| /' conftest.$ac_ext >&5
5606
5607ac_cv_header_stdc=no
ba4481b5 5608fi
35996d22 5609rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
5610
5611if test $ac_cv_header_stdc = yes; then
5612 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5613 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5614/* confdefs.h. */
5615_ACEOF
5616cat confdefs.h >>conftest.$ac_ext
5617cat >>conftest.$ac_ext <<_ACEOF
5618/* end confdefs.h. */
98418dba
CW
5619#include <string.h>
5620
5621_ACEOF
5622if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5623 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
5624 :
5625else
5626 ac_cv_header_stdc=no
ba4481b5 5627fi
98418dba 5628rm -f conftest*
ba4481b5
DL
5629
5630fi
5631
98418dba
CW
5632if test $ac_cv_header_stdc = yes; then
5633 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5634 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5635/* confdefs.h. */
5636_ACEOF
5637cat confdefs.h >>conftest.$ac_ext
5638cat >>conftest.$ac_ext <<_ACEOF
5639/* end confdefs.h. */
98418dba
CW
5640#include <stdlib.h>
5641
5642_ACEOF
5643if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5644 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
5645 :
5646else
5647 ac_cv_header_stdc=no
5648fi
5649rm -f conftest*
5650
5651fi
5652
5653if test $ac_cv_header_stdc = yes; then
5654 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5655 if test "$cross_compiling" = yes; then
5656 :
d42122a3 5657else
503d2be0 5658 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5659/* confdefs.h. */
5660_ACEOF
5661cat confdefs.h >>conftest.$ac_ext
5662cat >>conftest.$ac_ext <<_ACEOF
5663/* end confdefs.h. */
98418dba
CW
5664#include <ctype.h>
5665#if ((' ' & 0x0FF) == 0x020)
5666# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5667# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5668#else
19650fd6 5669# define ISLOWER(c) \
35996d22
AS
5670 (('a' <= (c) && (c) <= 'i') \
5671 || ('j' <= (c) && (c) <= 'r') \
5672 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
5673# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5674#endif
5675
5676#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
5677int
5678main ()
5679{
98418dba
CW
5680 int i;
5681 for (i = 0; i < 256; i++)
5682 if (XOR (islower (i), ISLOWER (i))
35996d22 5683 || toupper (i) != TOUPPER (i))
98418dba
CW
5684 exit(2);
5685 exit (0);
503d2be0
AS
5686}
5687_ACEOF
98418dba 5688rm -f conftest$ac_exeext
c0d27fcc 5689if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba 5690 (eval $ac_link) 2>&5
503d2be0 5691 ac_status=$?
c0d27fcc 5692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 5693 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 5694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5695 (eval $ac_try) 2>&5
5696 ac_status=$?
c0d27fcc 5697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5698 (exit $ac_status); }; }; then
98418dba 5699 :
d42122a3 5700else
98418dba
CW
5701 echo "$as_me: program exited with status $ac_status" >&5
5702echo "$as_me: failed program was:" >&5
19650fd6
AS
5703sed 's/^/| /' conftest.$ac_ext >&5
5704
c0d27fcc 5705( exit $ac_status )
98418dba 5706ac_cv_header_stdc=no
d42122a3 5707fi
35996d22 5708rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 5709fi
98418dba
CW
5710fi
5711fi
c0d27fcc 5712echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
98418dba
CW
5713echo "${ECHO_T}$ac_cv_header_stdc" >&6
5714if test $ac_cv_header_stdc = yes; then
5715
c0d27fcc 5716cat >>confdefs.h <<\_ACEOF
98418dba 5717#define STDC_HEADERS 1
c0d27fcc 5718_ACEOF
d42122a3
DL
5719
5720fi
5721
c0d27fcc 5722echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
98418dba
CW
5723echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
5724if test "${ac_cv_header_time+set}" = set; then
503d2be0 5725 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5726else
503d2be0 5727 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5728/* confdefs.h. */
5729_ACEOF
5730cat confdefs.h >>conftest.$ac_ext
5731cat >>conftest.$ac_ext <<_ACEOF
5732/* end confdefs.h. */
ba4481b5 5733#include <sys/types.h>
98418dba 5734#include <sys/time.h>
ba4481b5 5735#include <time.h>
503d2be0
AS
5736
5737int
5738main ()
5739{
98418dba
CW
5740if ((struct tm *) 0)
5741return 0;
503d2be0
AS
5742 ;
5743 return 0;
5744}
5745_ACEOF
5746rm -f conftest.$ac_objext
c0d27fcc 5747if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5748 (eval $ac_compile) 2>conftest.er1
503d2be0 5749 ac_status=$?
35996d22
AS
5750 grep -v '^ *+' conftest.er1 >conftest.err
5751 rm -f conftest.er1
5752 cat conftest.err >&5
c0d27fcc 5753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5754 (exit $ac_status); } &&
4494a266
JD
5755 { ac_try='test -z "$ac_c_werror_flag"
5756 || test ! -s conftest.err'
35996d22
AS
5757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5758 (eval $ac_try) 2>&5
5759 ac_status=$?
5760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5761 (exit $ac_status); }; } &&
5762 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5764 (eval $ac_try) 2>&5
5765 ac_status=$?
c0d27fcc 5766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5767 (exit $ac_status); }; }; then
98418dba 5768 ac_cv_header_time=yes
ba4481b5 5769else
503d2be0 5770 echo "$as_me: failed program was:" >&5
19650fd6
AS
5771sed 's/^/| /' conftest.$ac_ext >&5
5772
98418dba 5773ac_cv_header_time=no
ba4481b5 5774fi
35996d22 5775rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 5776fi
c0d27fcc 5777echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
98418dba
CW
5778echo "${ECHO_T}$ac_cv_header_time" >&6
5779if test $ac_cv_header_time = yes; then
503d2be0 5780
c0d27fcc 5781cat >>confdefs.h <<\_ACEOF
98418dba 5782#define TIME_WITH_SYS_TIME 1
c0d27fcc 5783_ACEOF
ba4481b5
DL
5784
5785fi
5786
cd958eb3
MB
5787echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
5788echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6
5789if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 5790 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5791else
503d2be0 5792 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5793/* confdefs.h. */
5794_ACEOF
5795cat confdefs.h >>conftest.$ac_ext
5796cat >>conftest.$ac_ext <<_ACEOF
5797/* end confdefs.h. */
cd958eb3
MB
5798$ac_includes_default
5799int
5800main ()
5801{
5802#ifndef sys_siglist
5803 char *p = (char *) sys_siglist;
98418dba 5804#endif
503d2be0 5805
cd958eb3
MB
5806 ;
5807 return 0;
5808}
5809_ACEOF
5810rm -f conftest.$ac_objext
5811if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5812 (eval $ac_compile) 2>conftest.er1
cd958eb3 5813 ac_status=$?
35996d22
AS
5814 grep -v '^ *+' conftest.er1 >conftest.err
5815 rm -f conftest.er1
5816 cat conftest.err >&5
cd958eb3
MB
5817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5818 (exit $ac_status); } &&
4494a266
JD
5819 { ac_try='test -z "$ac_c_werror_flag"
5820 || test ! -s conftest.err'
35996d22
AS
5821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5822 (eval $ac_try) 2>&5
5823 ac_status=$?
5824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5825 (exit $ac_status); }; } &&
5826 { ac_try='test -s conftest.$ac_objext'
cd958eb3
MB
5827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5828 (eval $ac_try) 2>&5
5829 ac_status=$?
5830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5831 (exit $ac_status); }; }; then
5832 ac_cv_have_decl_sys_siglist=yes
5833else
5834 echo "$as_me: failed program was:" >&5
19650fd6
AS
5835sed 's/^/| /' conftest.$ac_ext >&5
5836
cd958eb3
MB
5837ac_cv_have_decl_sys_siglist=no
5838fi
35996d22 5839rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
5840fi
5841echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
5842echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6
5843if test $ac_cv_have_decl_sys_siglist = yes; then
5844
5845cat >>confdefs.h <<_ACEOF
5846#define HAVE_DECL_SYS_SIGLIST 1
5847_ACEOF
5848
5849
5850else
5851 cat >>confdefs.h <<_ACEOF
5852#define HAVE_DECL_SYS_SIGLIST 0
5853_ACEOF
5854
5855
5856fi
5857
5858
5859if test $ac_cv_have_decl_sys_siglist != yes; then
5860 # For Tru64, at least:
5861 echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
5862echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6
5863if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
5864 echo $ECHO_N "(cached) $ECHO_C" >&6
5865else
5866 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5867/* confdefs.h. */
5868_ACEOF
5869cat confdefs.h >>conftest.$ac_ext
5870cat >>conftest.$ac_ext <<_ACEOF
5871/* end confdefs.h. */
cd958eb3 5872$ac_includes_default
503d2be0
AS
5873int
5874main ()
5875{
cd958eb3
MB
5876#ifndef __sys_siglist
5877 char *p = (char *) __sys_siglist;
5878#endif
5879
503d2be0
AS
5880 ;
5881 return 0;
5882}
5883_ACEOF
5884rm -f conftest.$ac_objext
c0d27fcc 5885if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5886 (eval $ac_compile) 2>conftest.er1
503d2be0 5887 ac_status=$?
35996d22
AS
5888 grep -v '^ *+' conftest.er1 >conftest.err
5889 rm -f conftest.er1
5890 cat conftest.err >&5
c0d27fcc 5891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5892 (exit $ac_status); } &&
4494a266
JD
5893 { ac_try='test -z "$ac_c_werror_flag"
5894 || test ! -s conftest.err'
35996d22
AS
5895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5896 (eval $ac_try) 2>&5
5897 ac_status=$?
5898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5899 (exit $ac_status); }; } &&
5900 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5902 (eval $ac_try) 2>&5
5903 ac_status=$?
c0d27fcc 5904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5905 (exit $ac_status); }; }; then
cd958eb3 5906 ac_cv_have_decl___sys_siglist=yes
ba4481b5 5907else
503d2be0 5908 echo "$as_me: failed program was:" >&5
19650fd6
AS
5909sed 's/^/| /' conftest.$ac_ext >&5
5910
cd958eb3 5911ac_cv_have_decl___sys_siglist=no
ba4481b5 5912fi
35996d22 5913rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5914fi
cd958eb3
MB
5915echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
5916echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6
5917if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 5918
cd958eb3
MB
5919cat >>confdefs.h <<_ACEOF
5920#define HAVE_DECL___SYS_SIGLIST 1
5921_ACEOF
5922
5923
5924else
5925 cat >>confdefs.h <<_ACEOF
5926#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 5927_ACEOF
503d2be0 5928
cd958eb3 5929
ba4481b5
DL
5930fi
5931
cd958eb3
MB
5932
5933 if test $ac_cv_have_decl___sys_siglist = yes; then
5934
5935cat >>confdefs.h <<\_ACEOF
5936#define sys_siglist __sys_siglist
5937_ACEOF
5938
5939 fi
5940fi
c0d27fcc 5941echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
98418dba
CW
5942echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
5943if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 5944 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5945else
503d2be0 5946 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5947/* confdefs.h. */
5948_ACEOF
5949cat confdefs.h >>conftest.$ac_ext
5950cat >>conftest.$ac_ext <<_ACEOF
5951/* end confdefs.h. */
98418dba
CW
5952#include <sys/types.h>
5953#include <sys/wait.h>
5954#ifndef WEXITSTATUS
5955# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
5956#endif
5957#ifndef WIFEXITED
5958# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 5959#endif
503d2be0
AS
5960
5961int
5962main ()
5963{
98418dba
CW
5964 int s;
5965 wait (&s);
5966 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
5967 ;
5968 return 0;
5969}
5970_ACEOF
98418dba 5971rm -f conftest.$ac_objext
c0d27fcc 5972if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5973 (eval $ac_compile) 2>conftest.er1
503d2be0 5974 ac_status=$?
35996d22
AS
5975 grep -v '^ *+' conftest.er1 >conftest.err
5976 rm -f conftest.er1
5977 cat conftest.err >&5
c0d27fcc 5978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5979 (exit $ac_status); } &&
4494a266
JD
5980 { ac_try='test -z "$ac_c_werror_flag"
5981 || test ! -s conftest.err'
35996d22
AS
5982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5983 (eval $ac_try) 2>&5
5984 ac_status=$?
5985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5986 (exit $ac_status); }; } &&
5987 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5989 (eval $ac_try) 2>&5
5990 ac_status=$?
c0d27fcc 5991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5992 (exit $ac_status); }; }; then
98418dba 5993 ac_cv_header_sys_wait_h=yes
ba4481b5 5994else
503d2be0 5995 echo "$as_me: failed program was:" >&5
19650fd6
AS
5996sed 's/^/| /' conftest.$ac_ext >&5
5997
98418dba 5998ac_cv_header_sys_wait_h=no
ba4481b5 5999fi
35996d22 6000rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6001fi
c0d27fcc 6002echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
98418dba
CW
6003echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
6004if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 6005
c0d27fcc 6006cat >>confdefs.h <<\_ACEOF
98418dba 6007#define HAVE_SYS_WAIT_H 1
c0d27fcc 6008_ACEOF
ba4481b5 6009
ba4481b5
DL
6010fi
6011
c0d27fcc
MR
6012
6013echo "$as_me:$LINENO: checking for struct utimbuf" >&5
98418dba
CW
6014echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
6015if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 6016 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 6017else
503d2be0 6018 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6019/* confdefs.h. */
6020_ACEOF
6021cat confdefs.h >>conftest.$ac_ext
6022cat >>conftest.$ac_ext <<_ACEOF
6023/* end confdefs.h. */
98418dba
CW
6024#ifdef TIME_WITH_SYS_TIME
6025#include <sys/time.h>
6026#include <time.h>
6027#else
6028#ifdef HAVE_SYS_TIME_H
6029#include <sys/time.h>
6030#else
1113b624 6031#include <time.h>
98418dba
CW
6032#endif
6033#endif
6034#ifdef HAVE_UTIME_H
6035#include <utime.h>
6036#endif
503d2be0
AS
6037int
6038main ()
6039{
98418dba 6040static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
6041 ;
6042 return 0;
6043}
6044_ACEOF
98418dba 6045rm -f conftest.$ac_objext
c0d27fcc 6046if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6047 (eval $ac_compile) 2>conftest.er1
503d2be0 6048 ac_status=$?
35996d22
AS
6049 grep -v '^ *+' conftest.er1 >conftest.err
6050 rm -f conftest.er1
6051 cat conftest.err >&5
c0d27fcc 6052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6053 (exit $ac_status); } &&
4494a266
JD
6054 { ac_try='test -z "$ac_c_werror_flag"
6055 || test ! -s conftest.err'
35996d22
AS
6056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6057 (eval $ac_try) 2>&5
6058 ac_status=$?
6059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6060 (exit $ac_status); }; } &&
6061 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6063 (eval $ac_try) 2>&5
6064 ac_status=$?
c0d27fcc 6065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6066 (exit $ac_status); }; }; then
98418dba 6067 emacs_cv_struct_utimbuf=yes
1113b624 6068else
503d2be0 6069 echo "$as_me: failed program was:" >&5
19650fd6
AS
6070sed 's/^/| /' conftest.$ac_ext >&5
6071
98418dba 6072emacs_cv_struct_utimbuf=no
1113b624 6073fi
35996d22 6074rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 6075fi
c0d27fcc 6076echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
98418dba
CW
6077echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6
6078if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 6079
c0d27fcc 6080cat >>confdefs.h <<\_ACEOF
98418dba 6081#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 6082_ACEOF
1113b624
PE
6083
6084fi
ba4481b5 6085
c0d27fcc 6086echo "$as_me:$LINENO: checking return type of signal handlers" >&5
98418dba
CW
6087echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
6088if test "${ac_cv_type_signal+set}" = set; then
503d2be0 6089 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6090else
98418dba 6091 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6092/* confdefs.h. */
6093_ACEOF
6094cat confdefs.h >>conftest.$ac_ext
6095cat >>conftest.$ac_ext <<_ACEOF
6096/* end confdefs.h. */
7397acc4 6097#include <sys/types.h>
98418dba
CW
6098#include <signal.h>
6099#ifdef signal
6100# undef signal
6101#endif
6102#ifdef __cplusplus
6103extern "C" void (*signal (int, void (*)(int)))(int);
6104#else
6105void (*signal ()) ();
6106#endif
6107
503d2be0
AS
6108int
6109main ()
6110{
98418dba 6111int i;
503d2be0
AS
6112 ;
6113 return 0;
6114}
6115_ACEOF
98418dba 6116rm -f conftest.$ac_objext
c0d27fcc 6117if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6118 (eval $ac_compile) 2>conftest.er1
503d2be0 6119 ac_status=$?
35996d22
AS
6120 grep -v '^ *+' conftest.er1 >conftest.err
6121 rm -f conftest.er1
6122 cat conftest.err >&5
c0d27fcc 6123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6124 (exit $ac_status); } &&
4494a266
JD
6125 { ac_try='test -z "$ac_c_werror_flag"
6126 || test ! -s conftest.err'
35996d22
AS
6127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6128 (eval $ac_try) 2>&5
6129 ac_status=$?
6130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6131 (exit $ac_status); }; } &&
6132 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6134 (eval $ac_try) 2>&5
6135 ac_status=$?
c0d27fcc 6136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6137 (exit $ac_status); }; }; then
98418dba 6138 ac_cv_type_signal=void
503d2be0
AS
6139else
6140 echo "$as_me: failed program was:" >&5
19650fd6
AS
6141sed 's/^/| /' conftest.$ac_ext >&5
6142
98418dba 6143ac_cv_type_signal=int
503d2be0 6144fi
35996d22 6145rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6146fi
c0d27fcc 6147echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
98418dba 6148echo "${ECHO_T}$ac_cv_type_signal" >&6
7397acc4 6149
c0d27fcc 6150cat >>confdefs.h <<_ACEOF
98418dba 6151#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
6152_ACEOF
6153
503d2be0 6154
c0d27fcc
MR
6155
6156echo "$as_me:$LINENO: checking for speed_t" >&5
98418dba
CW
6157echo $ECHO_N "checking for speed_t... $ECHO_C" >&6
6158if test "${emacs_cv_speed_t+set}" = set; then
6159 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6160else
98418dba 6161 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6162/* confdefs.h. */
6163_ACEOF
6164cat confdefs.h >>conftest.$ac_ext
6165cat >>conftest.$ac_ext <<_ACEOF
6166/* end confdefs.h. */
98418dba 6167#include <termios.h>
98418dba
CW
6168int
6169main ()
6170{
6171speed_t x = 1;
6172 ;
6173 return 0;
6174}
6175_ACEOF
6176rm -f conftest.$ac_objext
c0d27fcc 6177if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6178 (eval $ac_compile) 2>conftest.er1
98418dba 6179 ac_status=$?
35996d22
AS
6180 grep -v '^ *+' conftest.er1 >conftest.err
6181 rm -f conftest.er1
6182 cat conftest.err >&5
c0d27fcc 6183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6184 (exit $ac_status); } &&
4494a266
JD
6185 { ac_try='test -z "$ac_c_werror_flag"
6186 || test ! -s conftest.err'
35996d22
AS
6187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6188 (eval $ac_try) 2>&5
6189 ac_status=$?
6190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6191 (exit $ac_status); }; } &&
6192 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6194 (eval $ac_try) 2>&5
6195 ac_status=$?
c0d27fcc 6196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6197 (exit $ac_status); }; }; then
6198 emacs_cv_speed_t=yes
6199else
6200 echo "$as_me: failed program was:" >&5
19650fd6
AS
6201sed 's/^/| /' conftest.$ac_ext >&5
6202
98418dba
CW
6203emacs_cv_speed_t=no
6204fi
35996d22 6205rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 6206fi
c0d27fcc 6207echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
98418dba
CW
6208echo "${ECHO_T}$emacs_cv_speed_t" >&6
6209if test $emacs_cv_speed_t = yes; then
b936fae4 6210
c0d27fcc 6211cat >>confdefs.h <<\_ACEOF
98418dba 6212#define HAVE_SPEED_T 1
c0d27fcc 6213_ACEOF
98418dba 6214
7397acc4
DL
6215fi
6216
c0d27fcc 6217echo "$as_me:$LINENO: checking for struct timeval" >&5
98418dba
CW
6218echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
6219if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 6220 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6221else
503d2be0 6222 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6223/* confdefs.h. */
6224_ACEOF
6225cat confdefs.h >>conftest.$ac_ext
6226cat >>conftest.$ac_ext <<_ACEOF
6227/* end confdefs.h. */
98418dba
CW
6228#ifdef TIME_WITH_SYS_TIME
6229#include <sys/time.h>
6230#include <time.h>
6231#else
6232#ifdef HAVE_SYS_TIME_H
6233#include <sys/time.h>
6234#else
6235#include <time.h>
6236#endif
6237#endif
503d2be0
AS
6238int
6239main ()
6240{
98418dba 6241static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
6242 ;
6243 return 0;
6244}
6245_ACEOF
6246rm -f conftest.$ac_objext
c0d27fcc 6247if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6248 (eval $ac_compile) 2>conftest.er1
503d2be0 6249 ac_status=$?
35996d22
AS
6250 grep -v '^ *+' conftest.er1 >conftest.err
6251 rm -f conftest.er1
6252 cat conftest.err >&5
c0d27fcc 6253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6254 (exit $ac_status); } &&
4494a266
JD
6255 { ac_try='test -z "$ac_c_werror_flag"
6256 || test ! -s conftest.err'
35996d22
AS
6257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6258 (eval $ac_try) 2>&5
6259 ac_status=$?
6260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6261 (exit $ac_status); }; } &&
6262 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6264 (eval $ac_try) 2>&5
6265 ac_status=$?
c0d27fcc 6266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6267 (exit $ac_status); }; }; then
98418dba 6268 emacs_cv_struct_timeval=yes
7397acc4 6269else
503d2be0 6270 echo "$as_me: failed program was:" >&5
19650fd6
AS
6271sed 's/^/| /' conftest.$ac_ext >&5
6272
98418dba 6273emacs_cv_struct_timeval=no
7397acc4 6274fi
35996d22 6275rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6276fi
c0d27fcc 6277echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
98418dba
CW
6278echo "${ECHO_T}$emacs_cv_struct_timeval" >&6
6279HAVE_TIMEVAL=$emacs_cv_struct_timeval
6280if test $emacs_cv_struct_timeval = yes; then
b936fae4 6281
c0d27fcc 6282cat >>confdefs.h <<\_ACEOF
98418dba 6283#define HAVE_TIMEVAL 1
c0d27fcc 6284_ACEOF
7397acc4
DL
6285
6286fi
6287
c0d27fcc 6288echo "$as_me:$LINENO: checking for struct exception" >&5
98418dba
CW
6289echo $ECHO_N "checking for struct exception... $ECHO_C" >&6
6290if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 6291 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6292else
503d2be0 6293 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6294/* confdefs.h. */
6295_ACEOF
6296cat confdefs.h >>conftest.$ac_ext
6297cat >>conftest.$ac_ext <<_ACEOF
6298/* end confdefs.h. */
98418dba 6299#include <math.h>
503d2be0
AS
6300int
6301main ()
6302{
98418dba 6303static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
6304 ;
6305 return 0;
ba4481b5 6306}
503d2be0
AS
6307_ACEOF
6308rm -f conftest.$ac_objext
c0d27fcc 6309if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6310 (eval $ac_compile) 2>conftest.er1
503d2be0 6311 ac_status=$?
35996d22
AS
6312 grep -v '^ *+' conftest.er1 >conftest.err
6313 rm -f conftest.er1
6314 cat conftest.err >&5
c0d27fcc 6315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6316 (exit $ac_status); } &&
4494a266
JD
6317 { ac_try='test -z "$ac_c_werror_flag"
6318 || test ! -s conftest.err'
35996d22
AS
6319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6320 (eval $ac_try) 2>&5
6321 ac_status=$?
6322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6323 (exit $ac_status); }; } &&
6324 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6326 (eval $ac_try) 2>&5
6327 ac_status=$?
c0d27fcc 6328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6329 (exit $ac_status); }; }; then
98418dba 6330 emacs_cv_struct_exception=yes
ba4481b5 6331else
503d2be0 6332 echo "$as_me: failed program was:" >&5
19650fd6
AS
6333sed 's/^/| /' conftest.$ac_ext >&5
6334
98418dba 6335emacs_cv_struct_exception=no
ba4481b5 6336fi
35996d22 6337rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6338fi
c0d27fcc 6339echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
98418dba
CW
6340echo "${ECHO_T}$emacs_cv_struct_exception" >&6
6341HAVE_EXCEPTION=$emacs_cv_struct_exception
6342if test $emacs_cv_struct_exception != yes; then
b936fae4 6343
c0d27fcc 6344cat >>confdefs.h <<\_ACEOF
98418dba 6345#define NO_MATHERR 1
c0d27fcc 6346_ACEOF
ba4481b5
DL
6347
6348fi
6349
7862d3a8
AS
6350
6351for ac_header in sys/socket.h
6352do
6353as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6354if eval "test \"\${$as_ac_Header+set}\" = set"; then
6355 echo "$as_me:$LINENO: checking for $ac_header" >&5
6356echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6357if eval "test \"\${$as_ac_Header+set}\" = set"; then
6358 echo $ECHO_N "(cached) $ECHO_C" >&6
6359fi
6360echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6361echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6362else
6363 # Is the header compilable?
6364echo "$as_me:$LINENO: checking $ac_header usability" >&5
6365echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6366cat >conftest.$ac_ext <<_ACEOF
6367/* confdefs.h. */
6368_ACEOF
6369cat confdefs.h >>conftest.$ac_ext
6370cat >>conftest.$ac_ext <<_ACEOF
6371/* end confdefs.h. */
6372$ac_includes_default
6373#include <$ac_header>
6374_ACEOF
6375rm -f conftest.$ac_objext
6376if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6377 (eval $ac_compile) 2>conftest.er1
6378 ac_status=$?
6379 grep -v '^ *+' conftest.er1 >conftest.err
6380 rm -f conftest.er1
6381 cat conftest.err >&5
6382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6383 (exit $ac_status); } &&
4494a266
JD
6384 { ac_try='test -z "$ac_c_werror_flag"
6385 || test ! -s conftest.err'
7862d3a8
AS
6386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6387 (eval $ac_try) 2>&5
6388 ac_status=$?
6389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6390 (exit $ac_status); }; } &&
6391 { ac_try='test -s conftest.$ac_objext'
6392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6393 (eval $ac_try) 2>&5
6394 ac_status=$?
6395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6396 (exit $ac_status); }; }; then
6397 ac_header_compiler=yes
6398else
6399 echo "$as_me: failed program was:" >&5
6400sed 's/^/| /' conftest.$ac_ext >&5
6401
6402ac_header_compiler=no
6403fi
6404rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6405echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6406echo "${ECHO_T}$ac_header_compiler" >&6
6407
6408# Is the header present?
6409echo "$as_me:$LINENO: checking $ac_header presence" >&5
6410echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6411cat >conftest.$ac_ext <<_ACEOF
6412/* confdefs.h. */
6413_ACEOF
6414cat confdefs.h >>conftest.$ac_ext
6415cat >>conftest.$ac_ext <<_ACEOF
6416/* end confdefs.h. */
6417#include <$ac_header>
6418_ACEOF
6419if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6420 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6421 ac_status=$?
6422 grep -v '^ *+' conftest.er1 >conftest.err
6423 rm -f conftest.er1
6424 cat conftest.err >&5
6425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6426 (exit $ac_status); } >/dev/null; then
6427 if test -s conftest.err; then
6428 ac_cpp_err=$ac_c_preproc_warn_flag
6429 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6430 else
6431 ac_cpp_err=
6432 fi
6433else
6434 ac_cpp_err=yes
6435fi
6436if test -z "$ac_cpp_err"; then
6437 ac_header_preproc=yes
6438else
6439 echo "$as_me: failed program was:" >&5
6440sed 's/^/| /' conftest.$ac_ext >&5
6441
6442 ac_header_preproc=no
6443fi
6444rm -f conftest.err conftest.$ac_ext
6445echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6446echo "${ECHO_T}$ac_header_preproc" >&6
6447
6448# So? What about this header?
6449case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6450 yes:no: )
6451 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6452echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6453 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6454echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6455 ac_header_preproc=yes
6456 ;;
6457 no:yes:* )
6458 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6459echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6460 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6461echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6462 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6463echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6464 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6465echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6466 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6467echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6468 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6469echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6470 (
6471 cat <<\_ASBOX
6472## ------------------------------------------ ##
6473## Report this to the AC_PACKAGE_NAME lists. ##
6474## ------------------------------------------ ##
6475_ASBOX
6476 ) |
6477 sed "s/^/$as_me: WARNING: /" >&2
6478 ;;
6479esac
6480echo "$as_me:$LINENO: checking for $ac_header" >&5
6481echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6482if eval "test \"\${$as_ac_Header+set}\" = set"; then
6483 echo $ECHO_N "(cached) $ECHO_C" >&6
6484else
6485 eval "$as_ac_Header=\$ac_header_preproc"
6486fi
6487echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6488echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6489
6490fi
6491if test `eval echo '${'$as_ac_Header'}'` = yes; then
6492 cat >>confdefs.h <<_ACEOF
6493#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6494_ACEOF
6495
6496fi
6497
6498done
6499
6500
6501for ac_header in net/if.h
6502do
6503as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6504echo "$as_me:$LINENO: checking for $ac_header" >&5
6505echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6506if eval "test \"\${$as_ac_Header+set}\" = set"; then
6507 echo $ECHO_N "(cached) $ECHO_C" >&6
6508else
6509 cat >conftest.$ac_ext <<_ACEOF
6510/* confdefs.h. */
6511_ACEOF
6512cat confdefs.h >>conftest.$ac_ext
6513cat >>conftest.$ac_ext <<_ACEOF
6514/* end confdefs.h. */
6515$ac_includes_default
6516#if HAVE_SYS_SOCKET_H
6517#include <sys/socket.h>
6518#endif
6519
6520#include <$ac_header>
6521_ACEOF
6522rm -f conftest.$ac_objext
6523if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6524 (eval $ac_compile) 2>conftest.er1
6525 ac_status=$?
6526 grep -v '^ *+' conftest.er1 >conftest.err
6527 rm -f conftest.er1
6528 cat conftest.err >&5
6529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6530 (exit $ac_status); } &&
4494a266
JD
6531 { ac_try='test -z "$ac_c_werror_flag"
6532 || test ! -s conftest.err'
7862d3a8
AS
6533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6534 (eval $ac_try) 2>&5
6535 ac_status=$?
6536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6537 (exit $ac_status); }; } &&
6538 { ac_try='test -s conftest.$ac_objext'
6539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6540 (eval $ac_try) 2>&5
6541 ac_status=$?
6542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6543 (exit $ac_status); }; }; then
6544 eval "$as_ac_Header=yes"
6545else
6546 echo "$as_me: failed program was:" >&5
6547sed 's/^/| /' conftest.$ac_ext >&5
6548
6549eval "$as_ac_Header=no"
6550fi
6551rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6552fi
6553echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6554echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6555if test `eval echo '${'$as_ac_Header'}'` = yes; then
6556 cat >>confdefs.h <<_ACEOF
6557#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6558_ACEOF
6559
6560fi
6561
6562done
6563
6564
c0d27fcc 6565echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
98418dba
CW
6566echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
6567if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 6568 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6569else
503d2be0 6570 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6571/* confdefs.h. */
6572_ACEOF
6573cat confdefs.h >>conftest.$ac_ext
6574cat >>conftest.$ac_ext <<_ACEOF
6575/* end confdefs.h. */
98418dba
CW
6576#include <sys/types.h>
6577#include <time.h>
7397acc4 6578
503d2be0
AS
6579int
6580main ()
6581{
98418dba 6582struct tm *tp; tp->tm_sec;
503d2be0
AS
6583 ;
6584 return 0;
6585}
6586_ACEOF
6587rm -f conftest.$ac_objext
c0d27fcc 6588if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6589 (eval $ac_compile) 2>conftest.er1
503d2be0 6590 ac_status=$?
35996d22
AS
6591 grep -v '^ *+' conftest.er1 >conftest.err
6592 rm -f conftest.er1
6593 cat conftest.err >&5
c0d27fcc 6594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6595 (exit $ac_status); } &&
4494a266
JD
6596 { ac_try='test -z "$ac_c_werror_flag"
6597 || test ! -s conftest.err'
c0d27fcc 6598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6599 (eval $ac_try) 2>&5
6600 ac_status=$?
c0d27fcc 6601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
35996d22
AS
6602 (exit $ac_status); }; } &&
6603 { ac_try='test -s conftest.$ac_objext'
6604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6605 (eval $ac_try) 2>&5
6606 ac_status=$?
6607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6608 (exit $ac_status); }; }; then
6609 ac_cv_struct_tm=time.h
6610else
503d2be0 6611 echo "$as_me: failed program was:" >&5
19650fd6
AS
6612sed 's/^/| /' conftest.$ac_ext >&5
6613
98418dba 6614ac_cv_struct_tm=sys/time.h
7397acc4 6615fi
35996d22 6616rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6617fi
c0d27fcc 6618echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
98418dba
CW
6619echo "${ECHO_T}$ac_cv_struct_tm" >&6
6620if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 6621
c0d27fcc 6622cat >>confdefs.h <<\_ACEOF
98418dba 6623#define TM_IN_SYS_TIME 1
c0d27fcc 6624_ACEOF
7397acc4
DL
6625
6626fi
ba4481b5 6627
c0d27fcc 6628echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
98418dba
CW
6629echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
6630if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 6631 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6632else
98418dba 6633 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6634/* confdefs.h. */
6635_ACEOF
6636cat confdefs.h >>conftest.$ac_ext
6637cat >>conftest.$ac_ext <<_ACEOF
6638/* end confdefs.h. */
98418dba
CW
6639#include <sys/types.h>
6640#include <$ac_cv_struct_tm>
ba4481b5 6641
c0d27fcc 6642
98418dba
CW
6643int
6644main ()
6645{
6646static struct tm ac_aggr;
6647if (ac_aggr.tm_zone)
6648return 0;
6649 ;
6650 return 0;
6651}
6652_ACEOF
6653rm -f conftest.$ac_objext
c0d27fcc 6654if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6655 (eval $ac_compile) 2>conftest.er1
98418dba 6656 ac_status=$?
35996d22
AS
6657 grep -v '^ *+' conftest.er1 >conftest.err
6658 rm -f conftest.er1
6659 cat conftest.err >&5
c0d27fcc 6660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6661 (exit $ac_status); } &&
4494a266
JD
6662 { ac_try='test -z "$ac_c_werror_flag"
6663 || test ! -s conftest.err'
35996d22
AS
6664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6665 (eval $ac_try) 2>&5
6666 ac_status=$?
6667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6668 (exit $ac_status); }; } &&
6669 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6671 (eval $ac_try) 2>&5
6672 ac_status=$?
c0d27fcc 6673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6674 (exit $ac_status); }; }; then
6675 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 6676else
98418dba 6677 echo "$as_me: failed program was:" >&5
19650fd6
AS
6678sed 's/^/| /' conftest.$ac_ext >&5
6679
6bae0ccf 6680cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6681/* confdefs.h. */
6682_ACEOF
6683cat confdefs.h >>conftest.$ac_ext
6684cat >>conftest.$ac_ext <<_ACEOF
6685/* end confdefs.h. */
6bae0ccf
DL
6686#include <sys/types.h>
6687#include <$ac_cv_struct_tm>
6688
6689
6690int
6691main ()
6692{
6693static struct tm ac_aggr;
6694if (sizeof ac_aggr.tm_zone)
6695return 0;
6696 ;
6697 return 0;
6698}
6699_ACEOF
6700rm -f conftest.$ac_objext
6701if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6702 (eval $ac_compile) 2>conftest.er1
6bae0ccf 6703 ac_status=$?
35996d22
AS
6704 grep -v '^ *+' conftest.er1 >conftest.err
6705 rm -f conftest.er1
6706 cat conftest.err >&5
6bae0ccf
DL
6707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6708 (exit $ac_status); } &&
4494a266
JD
6709 { ac_try='test -z "$ac_c_werror_flag"
6710 || test ! -s conftest.err'
35996d22
AS
6711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6712 (eval $ac_try) 2>&5
6713 ac_status=$?
6714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6715 (exit $ac_status); }; } &&
6716 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
6717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6718 (eval $ac_try) 2>&5
6719 ac_status=$?
6720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6721 (exit $ac_status); }; }; then
6722 ac_cv_member_struct_tm_tm_zone=yes
6723else
6724 echo "$as_me: failed program was:" >&5
19650fd6
AS
6725sed 's/^/| /' conftest.$ac_ext >&5
6726
98418dba 6727ac_cv_member_struct_tm_tm_zone=no
ba4481b5 6728fi
35996d22 6729rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6730fi
35996d22 6731rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 6732fi
c0d27fcc 6733echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
98418dba
CW
6734echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
6735if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 6736
c0d27fcc 6737cat >>confdefs.h <<_ACEOF
98418dba 6738#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
6739_ACEOF
6740
ba4481b5 6741
98418dba 6742fi
ba4481b5 6743
98418dba 6744if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 6745
c0d27fcc 6746cat >>confdefs.h <<\_ACEOF
98418dba 6747#define HAVE_TM_ZONE 1
c0d27fcc 6748_ACEOF
ba4481b5 6749
ba4481b5 6750else
c0d27fcc 6751 echo "$as_me:$LINENO: checking for tzname" >&5
98418dba
CW
6752echo $ECHO_N "checking for tzname... $ECHO_C" >&6
6753if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 6754 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6755else
98418dba 6756 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6757/* confdefs.h. */
6758_ACEOF
6759cat confdefs.h >>conftest.$ac_ext
6760cat >>conftest.$ac_ext <<_ACEOF
6761/* end confdefs.h. */
98418dba
CW
6762#include <time.h>
6763#ifndef tzname /* For SGI. */
6764extern char *tzname[]; /* RS6000 and others reject char **tzname. */
6765#endif
6766
98418dba
CW
6767int
6768main ()
6769{
6770atoi(*tzname);
6771 ;
6772 return 0;
6773}
6774_ACEOF
6775rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 6776if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 6777 (eval $ac_link) 2>conftest.er1
98418dba 6778 ac_status=$?
35996d22
AS
6779 grep -v '^ *+' conftest.er1 >conftest.err
6780 rm -f conftest.er1
6781 cat conftest.err >&5
c0d27fcc 6782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6783 (exit $ac_status); } &&
4494a266
JD
6784 { ac_try='test -z "$ac_c_werror_flag"
6785 || test ! -s conftest.err'
35996d22
AS
6786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6787 (eval $ac_try) 2>&5
6788 ac_status=$?
6789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6790 (exit $ac_status); }; } &&
6791 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 6792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6793 (eval $ac_try) 2>&5
6794 ac_status=$?
c0d27fcc 6795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6796 (exit $ac_status); }; }; then
6797 ac_cv_var_tzname=yes
6798else
6799 echo "$as_me: failed program was:" >&5
19650fd6
AS
6800sed 's/^/| /' conftest.$ac_ext >&5
6801
98418dba 6802ac_cv_var_tzname=no
ba4481b5 6803fi
35996d22
AS
6804rm -f conftest.err conftest.$ac_objext \
6805 conftest$ac_exeext conftest.$ac_ext
98418dba 6806fi
c0d27fcc 6807echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
98418dba
CW
6808echo "${ECHO_T}$ac_cv_var_tzname" >&6
6809 if test $ac_cv_var_tzname = yes; then
ba4481b5 6810
c0d27fcc 6811cat >>confdefs.h <<\_ACEOF
98418dba 6812#define HAVE_TZNAME 1
c0d27fcc 6813_ACEOF
503d2be0 6814
98418dba
CW
6815 fi
6816fi
503d2be0 6817
c0d27fcc 6818echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
b936fae4
AS
6819echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6
6820if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
6821 echo $ECHO_N "(cached) $ECHO_C" >&6
6822else
6823 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6824/* confdefs.h. */
6825_ACEOF
6826cat confdefs.h >>conftest.$ac_ext
6827cat >>conftest.$ac_ext <<_ACEOF
6828/* end confdefs.h. */
98418dba 6829#include <time.h>
b936fae4 6830
98418dba
CW
6831int
6832main ()
6833{
b936fae4
AS
6834static struct tm ac_aggr;
6835if (ac_aggr.tm_gmtoff)
6836return 0;
98418dba
CW
6837 ;
6838 return 0;
6839}
6840_ACEOF
b936fae4 6841rm -f conftest.$ac_objext
c0d27fcc 6842if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6843 (eval $ac_compile) 2>conftest.er1
98418dba 6844 ac_status=$?
35996d22
AS
6845 grep -v '^ *+' conftest.er1 >conftest.err
6846 rm -f conftest.er1
6847 cat conftest.err >&5
c0d27fcc 6848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6849 (exit $ac_status); } &&
4494a266
JD
6850 { ac_try='test -z "$ac_c_werror_flag"
6851 || test ! -s conftest.err'
35996d22
AS
6852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6853 (eval $ac_try) 2>&5
6854 ac_status=$?
6855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6856 (exit $ac_status); }; } &&
6857 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6859 (eval $ac_try) 2>&5
6860 ac_status=$?
c0d27fcc 6861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6862 (exit $ac_status); }; }; then
b936fae4 6863 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
6864else
6865 echo "$as_me: failed program was:" >&5
19650fd6
AS
6866sed 's/^/| /' conftest.$ac_ext >&5
6867
8799b3e4 6868cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6869/* confdefs.h. */
6870_ACEOF
6871cat confdefs.h >>conftest.$ac_ext
6872cat >>conftest.$ac_ext <<_ACEOF
6873/* end confdefs.h. */
6bae0ccf
DL
6874#include <time.h>
6875
8799b3e4
CW
6876int
6877main ()
6878{
6bae0ccf
DL
6879static struct tm ac_aggr;
6880if (sizeof ac_aggr.tm_gmtoff)
6881return 0;
8799b3e4
CW
6882 ;
6883 return 0;
6884}
6885_ACEOF
6bae0ccf 6886rm -f conftest.$ac_objext
c0d27fcc 6887if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6888 (eval $ac_compile) 2>conftest.er1
8799b3e4 6889 ac_status=$?
35996d22
AS
6890 grep -v '^ *+' conftest.er1 >conftest.err
6891 rm -f conftest.er1
6892 cat conftest.err >&5
c0d27fcc 6893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 6894 (exit $ac_status); } &&
4494a266
JD
6895 { ac_try='test -z "$ac_c_werror_flag"
6896 || test ! -s conftest.err'
35996d22
AS
6897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6898 (eval $ac_try) 2>&5
6899 ac_status=$?
6900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6901 (exit $ac_status); }; } &&
6902 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8799b3e4
CW
6904 (eval $ac_try) 2>&5
6905 ac_status=$?
c0d27fcc 6906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 6907 (exit $ac_status); }; }; then
6bae0ccf 6908 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
6909else
6910 echo "$as_me: failed program was:" >&5
19650fd6
AS
6911sed 's/^/| /' conftest.$ac_ext >&5
6912
6bae0ccf 6913ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 6914fi
35996d22 6915rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 6916fi
35996d22 6917rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 6918fi
6bae0ccf
DL
6919echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
6920echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6
6921if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
6922
6923cat >>confdefs.h <<\_ACEOF
6924#define HAVE_TM_GMTOFF 1
6925_ACEOF
6926
6927fi
6928
96f3a036
DL
6929echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
6930echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6
6931if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
6932 echo $ECHO_N "(cached) $ECHO_C" >&6
6933else
6934 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
6935/* confdefs.h. */
6936_ACEOF
6937cat confdefs.h >>conftest.$ac_ext
6938cat >>conftest.$ac_ext <<_ACEOF
6939/* end confdefs.h. */
7862d3a8
AS
6940$ac_includes_default
6941#if HAVE_SYS_SOCKET_H
6942#include <sys/socket.h>
6943#endif
6944#if HAVE_NET_IF_H
96f3a036 6945#include <net/if.h>
7862d3a8 6946#endif
96f3a036
DL
6947
6948int
6949main ()
6950{
6951static struct ifreq ac_aggr;
6952if (ac_aggr.ifr_flags)
6953return 0;
6954 ;
6955 return 0;
6956}
6957_ACEOF
6958rm -f conftest.$ac_objext
6959if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6960 (eval $ac_compile) 2>conftest.er1
96f3a036 6961 ac_status=$?
35996d22
AS
6962 grep -v '^ *+' conftest.er1 >conftest.err
6963 rm -f conftest.er1
6964 cat conftest.err >&5
96f3a036
DL
6965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6966 (exit $ac_status); } &&
4494a266
JD
6967 { ac_try='test -z "$ac_c_werror_flag"
6968 || test ! -s conftest.err'
35996d22
AS
6969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6970 (eval $ac_try) 2>&5
6971 ac_status=$?
6972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6973 (exit $ac_status); }; } &&
6974 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
6975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6976 (eval $ac_try) 2>&5
6977 ac_status=$?
6978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6979 (exit $ac_status); }; }; then
6980 ac_cv_member_struct_ifreq_ifr_flags=yes
6981else
6982 echo "$as_me: failed program was:" >&5
6983sed 's/^/| /' conftest.$ac_ext >&5
6984
6985cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
6986/* confdefs.h. */
6987_ACEOF
6988cat confdefs.h >>conftest.$ac_ext
6989cat >>conftest.$ac_ext <<_ACEOF
6990/* end confdefs.h. */
7862d3a8
AS
6991$ac_includes_default
6992#if HAVE_SYS_SOCKET_H
6993#include <sys/socket.h>
6994#endif
6995#if HAVE_NET_IF_H
96f3a036 6996#include <net/if.h>
7862d3a8 6997#endif
96f3a036
DL
6998
6999int
7000main ()
7001{
7002static struct ifreq ac_aggr;
7003if (sizeof ac_aggr.ifr_flags)
7004return 0;
7005 ;
7006 return 0;
7007}
7008_ACEOF
7009rm -f conftest.$ac_objext
7010if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7011 (eval $ac_compile) 2>conftest.er1
96f3a036 7012 ac_status=$?
35996d22
AS
7013 grep -v '^ *+' conftest.er1 >conftest.err
7014 rm -f conftest.er1
7015 cat conftest.err >&5
96f3a036
DL
7016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7017 (exit $ac_status); } &&
4494a266
JD
7018 { ac_try='test -z "$ac_c_werror_flag"
7019 || test ! -s conftest.err'
35996d22
AS
7020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7021 (eval $ac_try) 2>&5
7022 ac_status=$?
7023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7024 (exit $ac_status); }; } &&
7025 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7027 (eval $ac_try) 2>&5
7028 ac_status=$?
7029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7030 (exit $ac_status); }; }; then
7031 ac_cv_member_struct_ifreq_ifr_flags=yes
7032else
7033 echo "$as_me: failed program was:" >&5
7034sed 's/^/| /' conftest.$ac_ext >&5
7035
7036ac_cv_member_struct_ifreq_ifr_flags=no
7037fi
35996d22 7038rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7039fi
35996d22 7040rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7041fi
7042echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
7043echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6
7044if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
7045
7046cat >>confdefs.h <<_ACEOF
7047#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
7048_ACEOF
7049
7050
7051fi
7052echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
7053echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6
7054if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
7055 echo $ECHO_N "(cached) $ECHO_C" >&6
7056else
7057 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7058/* confdefs.h. */
7059_ACEOF
7060cat confdefs.h >>conftest.$ac_ext
7061cat >>conftest.$ac_ext <<_ACEOF
7062/* end confdefs.h. */
7862d3a8
AS
7063$ac_includes_default
7064#if HAVE_SYS_SOCKET_H
7065#include <sys/socket.h>
7066#endif
7067#if HAVE_NET_IF_H
96f3a036 7068#include <net/if.h>
7862d3a8 7069#endif
96f3a036
DL
7070
7071int
7072main ()
7073{
7074static struct ifreq ac_aggr;
7075if (ac_aggr.ifr_hwaddr)
7076return 0;
7077 ;
7078 return 0;
7079}
7080_ACEOF
7081rm -f conftest.$ac_objext
7082if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7083 (eval $ac_compile) 2>conftest.er1
96f3a036 7084 ac_status=$?
35996d22
AS
7085 grep -v '^ *+' conftest.er1 >conftest.err
7086 rm -f conftest.er1
7087 cat conftest.err >&5
96f3a036
DL
7088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7089 (exit $ac_status); } &&
4494a266
JD
7090 { ac_try='test -z "$ac_c_werror_flag"
7091 || test ! -s conftest.err'
35996d22
AS
7092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7093 (eval $ac_try) 2>&5
7094 ac_status=$?
7095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7096 (exit $ac_status); }; } &&
7097 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7099 (eval $ac_try) 2>&5
7100 ac_status=$?
7101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7102 (exit $ac_status); }; }; then
7103 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
7104else
7105 echo "$as_me: failed program was:" >&5
7106sed 's/^/| /' conftest.$ac_ext >&5
7107
7108cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7109/* confdefs.h. */
7110_ACEOF
7111cat confdefs.h >>conftest.$ac_ext
7112cat >>conftest.$ac_ext <<_ACEOF
7113/* end confdefs.h. */
7862d3a8
AS
7114$ac_includes_default
7115#if HAVE_SYS_SOCKET_H
7116#include <sys/socket.h>
7117#endif
7118#if HAVE_NET_IF_H
96f3a036 7119#include <net/if.h>
7862d3a8 7120#endif
96f3a036
DL
7121
7122int
7123main ()
7124{
7125static struct ifreq ac_aggr;
7126if (sizeof ac_aggr.ifr_hwaddr)
7127return 0;
7128 ;
7129 return 0;
7130}
7131_ACEOF
7132rm -f conftest.$ac_objext
7133if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7134 (eval $ac_compile) 2>conftest.er1
96f3a036 7135 ac_status=$?
35996d22
AS
7136 grep -v '^ *+' conftest.er1 >conftest.err
7137 rm -f conftest.er1
7138 cat conftest.err >&5
96f3a036
DL
7139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7140 (exit $ac_status); } &&
4494a266
JD
7141 { ac_try='test -z "$ac_c_werror_flag"
7142 || test ! -s conftest.err'
35996d22
AS
7143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7144 (eval $ac_try) 2>&5
7145 ac_status=$?
7146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7147 (exit $ac_status); }; } &&
7148 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7150 (eval $ac_try) 2>&5
7151 ac_status=$?
7152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7153 (exit $ac_status); }; }; then
7154 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
7155else
7156 echo "$as_me: failed program was:" >&5
7157sed 's/^/| /' conftest.$ac_ext >&5
7158
7159ac_cv_member_struct_ifreq_ifr_hwaddr=no
7160fi
35996d22 7161rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7162fi
35996d22 7163rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7164fi
7165echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
7166echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6
7167if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
7168
7169cat >>confdefs.h <<_ACEOF
7170#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
7171_ACEOF
7172
7173
7174fi
7175echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
7176echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6
7177if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
7178 echo $ECHO_N "(cached) $ECHO_C" >&6
7179else
7180 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7181/* confdefs.h. */
7182_ACEOF
7183cat confdefs.h >>conftest.$ac_ext
7184cat >>conftest.$ac_ext <<_ACEOF
7185/* end confdefs.h. */
7862d3a8
AS
7186$ac_includes_default
7187#if HAVE_SYS_SOCKET_H
7188#include <sys/socket.h>
7189#endif
7190#if HAVE_NET_IF_H
96f3a036 7191#include <net/if.h>
7862d3a8 7192#endif
96f3a036
DL
7193
7194int
7195main ()
7196{
7197static struct ifreq ac_aggr;
7198if (ac_aggr.ifr_netmask)
7199return 0;
7200 ;
7201 return 0;
7202}
7203_ACEOF
7204rm -f conftest.$ac_objext
7205if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7206 (eval $ac_compile) 2>conftest.er1
96f3a036 7207 ac_status=$?
35996d22
AS
7208 grep -v '^ *+' conftest.er1 >conftest.err
7209 rm -f conftest.er1
7210 cat conftest.err >&5
96f3a036
DL
7211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7212 (exit $ac_status); } &&
4494a266
JD
7213 { ac_try='test -z "$ac_c_werror_flag"
7214 || test ! -s conftest.err'
35996d22
AS
7215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7216 (eval $ac_try) 2>&5
7217 ac_status=$?
7218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7219 (exit $ac_status); }; } &&
7220 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7222 (eval $ac_try) 2>&5
7223 ac_status=$?
7224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7225 (exit $ac_status); }; }; then
7226 ac_cv_member_struct_ifreq_ifr_netmask=yes
7227else
7228 echo "$as_me: failed program was:" >&5
7229sed 's/^/| /' conftest.$ac_ext >&5
7230
7231cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7232/* confdefs.h. */
7233_ACEOF
7234cat confdefs.h >>conftest.$ac_ext
7235cat >>conftest.$ac_ext <<_ACEOF
7236/* end confdefs.h. */
7862d3a8
AS
7237$ac_includes_default
7238#if HAVE_SYS_SOCKET_H
7239#include <sys/socket.h>
7240#endif
7241#if HAVE_NET_IF_H
96f3a036 7242#include <net/if.h>
7862d3a8 7243#endif
96f3a036
DL
7244
7245int
7246main ()
7247{
7248static struct ifreq ac_aggr;
7249if (sizeof ac_aggr.ifr_netmask)
7250return 0;
7251 ;
7252 return 0;
7253}
7254_ACEOF
7255rm -f conftest.$ac_objext
7256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7257 (eval $ac_compile) 2>conftest.er1
96f3a036 7258 ac_status=$?
35996d22
AS
7259 grep -v '^ *+' conftest.er1 >conftest.err
7260 rm -f conftest.er1
7261 cat conftest.err >&5
96f3a036
DL
7262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7263 (exit $ac_status); } &&
4494a266
JD
7264 { ac_try='test -z "$ac_c_werror_flag"
7265 || test ! -s conftest.err'
35996d22
AS
7266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7267 (eval $ac_try) 2>&5
7268 ac_status=$?
7269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7270 (exit $ac_status); }; } &&
7271 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7273 (eval $ac_try) 2>&5
7274 ac_status=$?
7275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7276 (exit $ac_status); }; }; then
7277 ac_cv_member_struct_ifreq_ifr_netmask=yes
7278else
7279 echo "$as_me: failed program was:" >&5
7280sed 's/^/| /' conftest.$ac_ext >&5
7281
7282ac_cv_member_struct_ifreq_ifr_netmask=no
7283fi
35996d22 7284rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7285fi
35996d22 7286rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7287fi
7288echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
7289echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6
7290if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
7291
7292cat >>confdefs.h <<_ACEOF
7293#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
7294_ACEOF
7295
7296
7297fi
7298echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
7299echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6
7300if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
7301 echo $ECHO_N "(cached) $ECHO_C" >&6
7302else
7303 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7304/* confdefs.h. */
7305_ACEOF
7306cat confdefs.h >>conftest.$ac_ext
7307cat >>conftest.$ac_ext <<_ACEOF
7308/* end confdefs.h. */
7862d3a8
AS
7309$ac_includes_default
7310#if HAVE_SYS_SOCKET_H
7311#include <sys/socket.h>
7312#endif
7313#if HAVE_NET_IF_H
96f3a036 7314#include <net/if.h>
7862d3a8 7315#endif
96f3a036
DL
7316
7317int
7318main ()
7319{
7320static struct ifreq ac_aggr;
7321if (ac_aggr.ifr_broadaddr)
7322return 0;
7323 ;
7324 return 0;
7325}
7326_ACEOF
7327rm -f conftest.$ac_objext
7328if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7329 (eval $ac_compile) 2>conftest.er1
96f3a036 7330 ac_status=$?
35996d22
AS
7331 grep -v '^ *+' conftest.er1 >conftest.err
7332 rm -f conftest.er1
7333 cat conftest.err >&5
96f3a036
DL
7334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7335 (exit $ac_status); } &&
4494a266
JD
7336 { ac_try='test -z "$ac_c_werror_flag"
7337 || test ! -s conftest.err'
35996d22
AS
7338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7339 (eval $ac_try) 2>&5
7340 ac_status=$?
7341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7342 (exit $ac_status); }; } &&
7343 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7345 (eval $ac_try) 2>&5
7346 ac_status=$?
7347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7348 (exit $ac_status); }; }; then
7349 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
7350else
7351 echo "$as_me: failed program was:" >&5
7352sed 's/^/| /' conftest.$ac_ext >&5
7353
7354cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7355/* confdefs.h. */
7356_ACEOF
7357cat confdefs.h >>conftest.$ac_ext
7358cat >>conftest.$ac_ext <<_ACEOF
7359/* end confdefs.h. */
7862d3a8
AS
7360$ac_includes_default
7361#if HAVE_SYS_SOCKET_H
7362#include <sys/socket.h>
7363#endif
7364#if HAVE_NET_IF_H
96f3a036 7365#include <net/if.h>
7862d3a8 7366#endif
96f3a036
DL
7367
7368int
7369main ()
7370{
7371static struct ifreq ac_aggr;
7372if (sizeof ac_aggr.ifr_broadaddr)
7373return 0;
7374 ;
7375 return 0;
7376}
7377_ACEOF
7378rm -f conftest.$ac_objext
7379if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7380 (eval $ac_compile) 2>conftest.er1
96f3a036 7381 ac_status=$?
35996d22
AS
7382 grep -v '^ *+' conftest.er1 >conftest.err
7383 rm -f conftest.er1
7384 cat conftest.err >&5
96f3a036
DL
7385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7386 (exit $ac_status); } &&
4494a266
JD
7387 { ac_try='test -z "$ac_c_werror_flag"
7388 || test ! -s conftest.err'
35996d22
AS
7389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7390 (eval $ac_try) 2>&5
7391 ac_status=$?
7392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7393 (exit $ac_status); }; } &&
7394 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7396 (eval $ac_try) 2>&5
7397 ac_status=$?
7398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7399 (exit $ac_status); }; }; then
7400 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
7401else
7402 echo "$as_me: failed program was:" >&5
7403sed 's/^/| /' conftest.$ac_ext >&5
7404
7405ac_cv_member_struct_ifreq_ifr_broadaddr=no
7406fi
35996d22 7407rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7408fi
35996d22 7409rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7410fi
7411echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
7412echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6
7413if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
7414
7415cat >>confdefs.h <<_ACEOF
7416#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
7417_ACEOF
7418
7419
7420fi
7421echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
7422echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6
7423if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
7424 echo $ECHO_N "(cached) $ECHO_C" >&6
7425else
7426 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7427/* confdefs.h. */
7428_ACEOF
7429cat confdefs.h >>conftest.$ac_ext
7430cat >>conftest.$ac_ext <<_ACEOF
7431/* end confdefs.h. */
7862d3a8
AS
7432$ac_includes_default
7433#if HAVE_SYS_SOCKET_H
7434#include <sys/socket.h>
7435#endif
7436#if HAVE_NET_IF_H
96f3a036 7437#include <net/if.h>
7862d3a8 7438#endif
96f3a036
DL
7439
7440int
7441main ()
7442{
7443static struct ifreq ac_aggr;
7444if (ac_aggr.ifr_addr)
7445return 0;
7446 ;
7447 return 0;
7448}
7449_ACEOF
7450rm -f conftest.$ac_objext
7451if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7452 (eval $ac_compile) 2>conftest.er1
96f3a036 7453 ac_status=$?
35996d22
AS
7454 grep -v '^ *+' conftest.er1 >conftest.err
7455 rm -f conftest.er1
7456 cat conftest.err >&5
96f3a036
DL
7457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7458 (exit $ac_status); } &&
4494a266
JD
7459 { ac_try='test -z "$ac_c_werror_flag"
7460 || test ! -s conftest.err'
35996d22
AS
7461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7462 (eval $ac_try) 2>&5
7463 ac_status=$?
7464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7465 (exit $ac_status); }; } &&
7466 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7468 (eval $ac_try) 2>&5
7469 ac_status=$?
7470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7471 (exit $ac_status); }; }; then
7472 ac_cv_member_struct_ifreq_ifr_addr=yes
7473else
7474 echo "$as_me: failed program was:" >&5
7475sed 's/^/| /' conftest.$ac_ext >&5
7476
7477cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7478/* confdefs.h. */
7479_ACEOF
7480cat confdefs.h >>conftest.$ac_ext
7481cat >>conftest.$ac_ext <<_ACEOF
7482/* end confdefs.h. */
7862d3a8
AS
7483$ac_includes_default
7484#if HAVE_SYS_SOCKET_H
7485#include <sys/socket.h>
7486#endif
7487#if HAVE_NET_IF_H
96f3a036 7488#include <net/if.h>
7862d3a8 7489#endif
96f3a036
DL
7490
7491int
7492main ()
7493{
7494static struct ifreq ac_aggr;
7495if (sizeof ac_aggr.ifr_addr)
7496return 0;
7497 ;
7498 return 0;
7499}
7500_ACEOF
7501rm -f conftest.$ac_objext
7502if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7503 (eval $ac_compile) 2>conftest.er1
96f3a036 7504 ac_status=$?
35996d22
AS
7505 grep -v '^ *+' conftest.er1 >conftest.err
7506 rm -f conftest.er1
7507 cat conftest.err >&5
96f3a036
DL
7508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7509 (exit $ac_status); } &&
4494a266
JD
7510 { ac_try='test -z "$ac_c_werror_flag"
7511 || test ! -s conftest.err'
35996d22
AS
7512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7513 (eval $ac_try) 2>&5
7514 ac_status=$?
7515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7516 (exit $ac_status); }; } &&
7517 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7519 (eval $ac_try) 2>&5
7520 ac_status=$?
7521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7522 (exit $ac_status); }; }; then
7523 ac_cv_member_struct_ifreq_ifr_addr=yes
7524else
7525 echo "$as_me: failed program was:" >&5
7526sed 's/^/| /' conftest.$ac_ext >&5
7527
7528ac_cv_member_struct_ifreq_ifr_addr=no
7529fi
35996d22 7530rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7531fi
35996d22 7532rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7533fi
7534echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
7535echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6
7536if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
7537
7538cat >>confdefs.h <<_ACEOF
7539#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
7540_ACEOF
7541
7542
7543fi
7544
8799b3e4 7545
8799b3e4 7546
c0d27fcc 7547echo "$as_me:$LINENO: checking for function prototypes" >&5
98418dba
CW
7548echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
7549if test "$ac_cv_prog_cc_stdc" != no; then
c0d27fcc 7550 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
7551echo "${ECHO_T}yes" >&6
7552
c0d27fcc 7553cat >>confdefs.h <<\_ACEOF
98418dba 7554#define PROTOTYPES 1
c0d27fcc
MR
7555_ACEOF
7556
7557
7558cat >>confdefs.h <<\_ACEOF
7559#define __PROTOTYPES 1
7560_ACEOF
98418dba
CW
7561
7562else
c0d27fcc 7563 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
7564echo "${ECHO_T}no" >&6
7565fi
7566
c0d27fcc 7567echo "$as_me:$LINENO: checking for working volatile" >&5
98418dba
CW
7568echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
7569if test "${ac_cv_c_volatile+set}" = set; then
7570 echo $ECHO_N "(cached) $ECHO_C" >&6
7571else
7572 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7573/* confdefs.h. */
7574_ACEOF
7575cat confdefs.h >>conftest.$ac_ext
7576cat >>conftest.$ac_ext <<_ACEOF
7577/* end confdefs.h. */
98418dba 7578
98418dba
CW
7579int
7580main ()
7581{
7582
7583volatile int x;
7584int * volatile y;
7585 ;
7586 return 0;
7587}
7588_ACEOF
7589rm -f conftest.$ac_objext
c0d27fcc 7590if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7591 (eval $ac_compile) 2>conftest.er1
98418dba 7592 ac_status=$?
35996d22
AS
7593 grep -v '^ *+' conftest.er1 >conftest.err
7594 rm -f conftest.er1
7595 cat conftest.err >&5
c0d27fcc 7596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7597 (exit $ac_status); } &&
4494a266
JD
7598 { ac_try='test -z "$ac_c_werror_flag"
7599 || test ! -s conftest.err'
35996d22
AS
7600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7601 (eval $ac_try) 2>&5
7602 ac_status=$?
7603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7604 (exit $ac_status); }; } &&
7605 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7607 (eval $ac_try) 2>&5
7608 ac_status=$?
c0d27fcc 7609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7610 (exit $ac_status); }; }; then
7611 ac_cv_c_volatile=yes
7612else
7613 echo "$as_me: failed program was:" >&5
19650fd6
AS
7614sed 's/^/| /' conftest.$ac_ext >&5
7615
98418dba
CW
7616ac_cv_c_volatile=no
7617fi
35996d22 7618rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7619fi
c0d27fcc 7620echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
98418dba
CW
7621echo "${ECHO_T}$ac_cv_c_volatile" >&6
7622if test $ac_cv_c_volatile = no; then
7623
c0d27fcc 7624cat >>confdefs.h <<\_ACEOF
98418dba 7625#define volatile
c0d27fcc 7626_ACEOF
98418dba
CW
7627
7628fi
7629
c0d27fcc 7630echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
98418dba
CW
7631echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
7632if test "${ac_cv_c_const+set}" = set; then
7633 echo $ECHO_N "(cached) $ECHO_C" >&6
7634else
7635 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7636/* confdefs.h. */
7637_ACEOF
7638cat confdefs.h >>conftest.$ac_ext
7639cat >>conftest.$ac_ext <<_ACEOF
7640/* end confdefs.h. */
98418dba 7641
98418dba
CW
7642int
7643main ()
7644{
7645/* FIXME: Include the comments suggested by Paul. */
7646#ifndef __cplusplus
7647 /* Ultrix mips cc rejects this. */
7648 typedef int charset[2];
7649 const charset x;
7650 /* SunOS 4.1.1 cc rejects this. */
7651 char const *const *ccp;
7652 char **p;
7653 /* NEC SVR4.0.2 mips cc rejects this. */
7654 struct point {int x, y;};
7655 static struct point const zero = {0,0};
7656 /* AIX XL C 1.02.0.0 rejects this.
7657 It does not let you subtract one const X* pointer from another in
7658 an arm of an if-expression whose if-part is not a constant
7659 expression */
7660 const char *g = "string";
7661 ccp = &g + (g ? g-g : 0);
7662 /* HPUX 7.0 cc rejects these. */
7663 ++ccp;
7664 p = (char**) ccp;
7665 ccp = (char const *const *) p;
7666 { /* SCO 3.2v4 cc rejects this. */
7667 char *t;
7668 char const *s = 0 ? (char *) 0 : (char const *) 0;
7669
7670 *t++ = 0;
7671 }
7672 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
7673 int x[] = {25, 17};
7674 const int *foo = &x[0];
7675 ++foo;
7676 }
7677 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
7678 typedef const int *iptr;
7679 iptr p = 0;
7680 ++p;
7681 }
7682 { /* AIX XL C 1.02.0.0 rejects this saying
7683 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
7684 struct s { int j; const int *ap[3]; };
7685 struct s *b; b->j = 5;
7686 }
7687 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
7688 const int foo = 10;
7689 }
7690#endif
7691
7692 ;
7693 return 0;
7694}
7695_ACEOF
7696rm -f conftest.$ac_objext
c0d27fcc 7697if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7698 (eval $ac_compile) 2>conftest.er1
98418dba 7699 ac_status=$?
35996d22
AS
7700 grep -v '^ *+' conftest.er1 >conftest.err
7701 rm -f conftest.er1
7702 cat conftest.err >&5
c0d27fcc 7703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7704 (exit $ac_status); } &&
4494a266
JD
7705 { ac_try='test -z "$ac_c_werror_flag"
7706 || test ! -s conftest.err'
35996d22
AS
7707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7708 (eval $ac_try) 2>&5
7709 ac_status=$?
7710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7711 (exit $ac_status); }; } &&
7712 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7714 (eval $ac_try) 2>&5
7715 ac_status=$?
c0d27fcc 7716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7717 (exit $ac_status); }; }; then
7718 ac_cv_c_const=yes
7719else
7720 echo "$as_me: failed program was:" >&5
19650fd6
AS
7721sed 's/^/| /' conftest.$ac_ext >&5
7722
98418dba
CW
7723ac_cv_c_const=no
7724fi
35996d22 7725rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7726fi
c0d27fcc 7727echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
98418dba
CW
7728echo "${ECHO_T}$ac_cv_c_const" >&6
7729if test $ac_cv_c_const = no; then
7730
c0d27fcc 7731cat >>confdefs.h <<\_ACEOF
98418dba 7732#define const
c0d27fcc 7733_ACEOF
98418dba
CW
7734
7735fi
7736
c0d27fcc 7737echo "$as_me:$LINENO: checking for void * support" >&5
98418dba
CW
7738echo $ECHO_N "checking for void * support... $ECHO_C" >&6
7739if test "${emacs_cv_void_star+set}" = set; then
7740 echo $ECHO_N "(cached) $ECHO_C" >&6
7741else
7742 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
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{
7752void * foo;
7753 ;
7754 return 0;
7755}
7756_ACEOF
7757rm -f conftest.$ac_objext
c0d27fcc 7758if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7759 (eval $ac_compile) 2>conftest.er1
98418dba 7760 ac_status=$?
35996d22
AS
7761 grep -v '^ *+' conftest.er1 >conftest.err
7762 rm -f conftest.er1
7763 cat conftest.err >&5
c0d27fcc 7764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7765 (exit $ac_status); } &&
4494a266
JD
7766 { ac_try='test -z "$ac_c_werror_flag"
7767 || test ! -s conftest.err'
35996d22
AS
7768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7769 (eval $ac_try) 2>&5
7770 ac_status=$?
7771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7772 (exit $ac_status); }; } &&
7773 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7775 (eval $ac_try) 2>&5
7776 ac_status=$?
c0d27fcc 7777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7778 (exit $ac_status); }; }; then
7779 emacs_cv_void_star=yes
7780else
7781 echo "$as_me: failed program was:" >&5
19650fd6
AS
7782sed 's/^/| /' conftest.$ac_ext >&5
7783
98418dba
CW
7784emacs_cv_void_star=no
7785fi
35996d22 7786rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7787fi
c0d27fcc 7788echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
98418dba
CW
7789echo "${ECHO_T}$emacs_cv_void_star" >&6
7790if test $emacs_cv_void_star = yes; then
c0d27fcc 7791 cat >>confdefs.h <<\_ACEOF
98418dba 7792#define POINTER_TYPE void
c0d27fcc 7793_ACEOF
98418dba
CW
7794
7795else
c0d27fcc 7796 cat >>confdefs.h <<\_ACEOF
98418dba 7797#define POINTER_TYPE char
c0d27fcc 7798_ACEOF
98418dba
CW
7799
7800fi
7801
c0d27fcc 7802
4494a266
JD
7803
7804
cd958eb3 7805
19650fd6
AS
7806echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
7807echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
35996d22 7808set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
98418dba
CW
7809if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
7810 echo $ECHO_N "(cached) $ECHO_C" >&6
7811else
c0d27fcc 7812 cat >conftest.make <<\_ACEOF
98418dba 7813all:
19650fd6 7814 @echo 'ac_maketemp="$(MAKE)"'
c0d27fcc 7815_ACEOF
98418dba
CW
7816# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7817eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
7818if test -n "$ac_maketemp"; then
7819 eval ac_cv_prog_make_${ac_make}_set=yes
7820else
7821 eval ac_cv_prog_make_${ac_make}_set=no
7822fi
7823rm -f conftest.make
7824fi
7825if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
c0d27fcc 7826 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
7827echo "${ECHO_T}yes" >&6
7828 SET_MAKE=
7829else
c0d27fcc 7830 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
7831echo "${ECHO_T}no" >&6
7832 SET_MAKE="MAKE=${MAKE-make}"
7833fi
7834
c0d27fcc
MR
7835
7836echo "$as_me:$LINENO: checking for long file names" >&5
98418dba
CW
7837echo $ECHO_N "checking for long file names... $ECHO_C" >&6
7838if test "${ac_cv_sys_long_file_names+set}" = set; then
7839 echo $ECHO_N "(cached) $ECHO_C" >&6
7840else
7841 ac_cv_sys_long_file_names=yes
7842# Test for long file names in all the places we know might matter:
7843# . the current directory, where building will happen
7844# $prefix/lib where we will be installing things
7845# $exec_prefix/lib likewise
7846# eval it to expand exec_prefix.
7847# $TMPDIR if set, where it might want to write temporary files
7848# if $TMPDIR is not set:
7849# /tmp where it might want to write temporary files
7850# /var/tmp likewise
7851# /usr/tmp likewise
7852if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
7853 ac_tmpdirs=$TMPDIR
7854else
7855 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
7856fi
7857for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
7858 test -d $ac_dir || continue
7859 test -w $ac_dir || continue # It is less confusing to not echo anything here.
7860 ac_xdir=$ac_dir/cf$$
7861 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
7862 ac_tf1=$ac_xdir/conftest9012345
7863 ac_tf2=$ac_xdir/conftest9012346
7864 (echo 1 >$ac_tf1) 2>/dev/null
7865 (echo 2 >$ac_tf2) 2>/dev/null
7866 ac_val=`cat $ac_tf1 2>/dev/null`
7867 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
7868 ac_cv_sys_long_file_names=no
7869 rm -rf $ac_xdir 2>/dev/null
7870 break
7871 fi
7872 rm -rf $ac_xdir 2>/dev/null
7873done
7874fi
c0d27fcc 7875echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
98418dba
CW
7876echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
7877if test $ac_cv_sys_long_file_names = yes; then
7878
c0d27fcc 7879cat >>confdefs.h <<\_ACEOF
98418dba 7880#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 7881_ACEOF
98418dba
CW
7882
7883fi
7884
c0d27fcc 7885
98418dba
CW
7886#### Choose a window system.
7887
c0d27fcc 7888echo "$as_me:$LINENO: checking for X" >&5
98418dba
CW
7889echo $ECHO_N "checking for X... $ECHO_C" >&6
7890
c0d27fcc 7891
98418dba
CW
7892# Check whether --with-x or --without-x was given.
7893if test "${with_x+set}" = set; then
7894 withval="$with_x"
7895
7896fi;
7897# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
7898if test "x$with_x" = xno; then
7899 # The user explicitly disabled X.
7900 have_x=disabled
7901else
7902 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
7903 # Both variables are already set.
7904 have_x=yes
7905 else
7906 if test "${ac_cv_have_x+set}" = set; then
7907 echo $ECHO_N "(cached) $ECHO_C" >&6
7908else
7909 # One or both of the vars are not set, and there is no cached value.
7910ac_x_includes=no ac_x_libraries=no
7911rm -fr conftest.dir
7912if mkdir conftest.dir; then
7913 cd conftest.dir
7914 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
c0d27fcc 7915 cat >Imakefile <<'_ACEOF'
98418dba
CW
7916acfindx:
7917 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
c0d27fcc 7918_ACEOF
98418dba
CW
7919 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
7920 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7921 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
7922 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
7923 for ac_extension in a so sl; do
7924 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
35996d22
AS
7925 test -f $ac_im_libdir/libX11.$ac_extension; then
7926 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
7927 fi
7928 done
7929 # Screen out bogus values from the imake configuration. They are
7930 # bogus both because they are the default anyway, and because
7931 # using them would break gcc on systems where it needs fixed includes.
7932 case $ac_im_incroot in
7933 /usr/include) ;;
7934 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
7935 esac
7936 case $ac_im_usrlibdir in
7937 /usr/lib | /lib) ;;
7938 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
7939 esac
7940 fi
7941 cd ..
7942 rm -fr conftest.dir
7943fi
7944
7945# Standard set of common directories for X headers.
7946# Check X11 before X11Rn because it is often a symlink to the current release.
7947ac_x_header_dirs='
7948/usr/X11/include
7949/usr/X11R6/include
7950/usr/X11R5/include
7951/usr/X11R4/include
7952
7953/usr/include/X11
7954/usr/include/X11R6
7955/usr/include/X11R5
7956/usr/include/X11R4
7957
7958/usr/local/X11/include
7959/usr/local/X11R6/include
7960/usr/local/X11R5/include
7961/usr/local/X11R4/include
7962
7963/usr/local/include/X11
7964/usr/local/include/X11R6
7965/usr/local/include/X11R5
7966/usr/local/include/X11R4
7967
7968/usr/X386/include
7969/usr/x386/include
7970/usr/XFree86/include/X11
7971
7972/usr/include
7973/usr/local/include
7974/usr/unsupported/include
7975/usr/athena/include
7976/usr/local/x11r5/include
7977/usr/lpp/Xamples/include
7978
7979/usr/openwin/include
7980/usr/openwin/share/include'
7981
7982if test "$ac_x_includes" = no; then
4494a266 7983 # Guess where to find include files, by looking for Intrinsic.h.
98418dba
CW
7984 # First, try using that file with no special directory specified.
7985 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7986/* confdefs.h. */
7987_ACEOF
7988cat confdefs.h >>conftest.$ac_ext
7989cat >>conftest.$ac_ext <<_ACEOF
7990/* end confdefs.h. */
98418dba
CW
7991#include <X11/Intrinsic.h>
7992_ACEOF
c0d27fcc 7993if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
7994 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7995 ac_status=$?
6bae0ccf 7996 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
7997 rm -f conftest.er1
7998 cat conftest.err >&5
c0d27fcc 7999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8000 (exit $ac_status); } >/dev/null; then
8001 if test -s conftest.err; then
8002 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 8003 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
8004 else
8005 ac_cpp_err=
8006 fi
8007else
8008 ac_cpp_err=yes
8009fi
8010if test -z "$ac_cpp_err"; then
8011 # We can compile using X headers with no special include directory.
8012ac_x_includes=
8013else
8014 echo "$as_me: failed program was:" >&5
19650fd6
AS
8015sed 's/^/| /' conftest.$ac_ext >&5
8016
98418dba
CW
8017 for ac_dir in $ac_x_header_dirs; do
8018 if test -r "$ac_dir/X11/Intrinsic.h"; then
8019 ac_x_includes=$ac_dir
8020 break
8021 fi
8022done
8023fi
8024rm -f conftest.err conftest.$ac_ext
8025fi # $ac_x_includes = no
8026
8027if test "$ac_x_libraries" = no; then
8028 # Check for the libraries.
8029 # See if we find them without any special options.
8030 # Don't add to $LIBS permanently.
8031 ac_save_LIBS=$LIBS
8032 LIBS="-lXt $LIBS"
8033 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8034/* confdefs.h. */
8035_ACEOF
8036cat confdefs.h >>conftest.$ac_ext
8037cat >>conftest.$ac_ext <<_ACEOF
8038/* end confdefs.h. */
98418dba 8039#include <X11/Intrinsic.h>
98418dba
CW
8040int
8041main ()
8042{
8043XtMalloc (0)
8044 ;
8045 return 0;
8046}
8047_ACEOF
8048rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8049if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8050 (eval $ac_link) 2>conftest.er1
98418dba 8051 ac_status=$?
35996d22
AS
8052 grep -v '^ *+' conftest.er1 >conftest.err
8053 rm -f conftest.er1
8054 cat conftest.err >&5
c0d27fcc 8055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8056 (exit $ac_status); } &&
4494a266
JD
8057 { ac_try='test -z "$ac_c_werror_flag"
8058 || test ! -s conftest.err'
35996d22
AS
8059 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8060 (eval $ac_try) 2>&5
8061 ac_status=$?
8062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8063 (exit $ac_status); }; } &&
8064 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8066 (eval $ac_try) 2>&5
8067 ac_status=$?
c0d27fcc 8068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8069 (exit $ac_status); }; }; then
8070 LIBS=$ac_save_LIBS
8071# We can link X programs with no special library path.
8072ac_x_libraries=
8073else
8074 echo "$as_me: failed program was:" >&5
19650fd6
AS
8075sed 's/^/| /' conftest.$ac_ext >&5
8076
98418dba
CW
8077LIBS=$ac_save_LIBS
8078for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8079do
8080 # Don't even attempt the hair of trying to link an X program!
8081 for ac_extension in a so sl; do
8082 if test -r $ac_dir/libXt.$ac_extension; then
8083 ac_x_libraries=$ac_dir
8084 break 2
8085 fi
8086 done
8087done
8088fi
35996d22
AS
8089rm -f conftest.err conftest.$ac_objext \
8090 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
8091fi # $ac_x_libraries = no
8092
8093if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
8094 # Didn't find X anywhere. Cache the known absence of X.
8095 ac_cv_have_x="have_x=no"
8096else
8097 # Record where we found X for the cache.
8098 ac_cv_have_x="have_x=yes \
35996d22 8099 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
98418dba
CW
8100fi
8101fi
8102
8103 fi
8104 eval "$ac_cv_have_x"
8105fi # $with_x != no
8106
8107if test "$have_x" != yes; then
c0d27fcc 8108 echo "$as_me:$LINENO: result: $have_x" >&5
98418dba
CW
8109echo "${ECHO_T}$have_x" >&6
8110 no_x=yes
8111else
8112 # If each of the values was on the command line, it overrides each guess.
8113 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8114 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8115 # Update the cache value to reflect the command line values.
8116 ac_cv_have_x="have_x=yes \
8117 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4494a266
JD
8118 echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
8119echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
98418dba
CW
8120fi
8121
8122if test "$no_x" = yes; then
8123 window_system=none
8124else
8125 window_system=x11
8126fi
8127
8128if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
8129 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
8130 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
8131 x_default_search_path=""
8132 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
8133 x_search_path="\
8134${x_library}/X11/%L/%T/%N%C%S:\
8135${x_library}/X11/%l/%T/%N%C%S:\
8136${x_library}/X11/%T/%N%C%S:\
8137${x_library}/X11/%L/%T/%N%S:\
8138${x_library}/X11/%l/%T/%N%S:\
8139${x_library}/X11/%T/%N%S"
8140 if test x"${x_default_search_path}" = x; then
8141 x_default_search_path=${x_search_path}
8142 else
8143 x_default_search_path="${x_search_path}:${x_default_search_path}"
8144 fi
8145 done
8146fi
8147if test "${x_includes}" != NONE && test -n "${x_includes}"; then
8148 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
8149fi
8150
8151if test x"${x_includes}" = x; then
8152 bitmapdir=/usr/include/X11/bitmaps
8153else
8154 # accumulate include directories that have X11 bitmap subdirectories
8155 bmd_acc="dummyval"
8156 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
8157 if test -d "${bmd}/X11/bitmaps"; then
8158 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
8159 fi
8160 if test -d "${bmd}/bitmaps"; then
8161 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
8162 fi
8163 done
8164 if test ${bmd_acc} != "dummyval"; then
8165 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
8166 fi
8167fi
8168
8169case "${window_system}" in
8170 x11 )
8171 HAVE_X_WINDOWS=yes
8172 HAVE_X11=yes
8173 case "${with_x_toolkit}" in
8174 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
8175 motif ) USE_X_TOOLKIT=MOTIF ;;
488dd4c4
JD
8176 gtk ) with_gtk=yes
8177 USE_X_TOOLKIT=none ;;
98418dba
CW
8178 no ) USE_X_TOOLKIT=none ;;
8179 * ) USE_X_TOOLKIT=maybe ;;
8180 esac
8181 ;;
8182 none )
8183 HAVE_X_WINDOWS=no
8184 HAVE_X11=no
8185 USE_X_TOOLKIT=none
8186 ;;
8187esac
8188
8189### If we're using X11, we should use the X menu package.
8190HAVE_MENUS=no
8191case ${HAVE_X11} in
8192 yes ) HAVE_MENUS=yes ;;
8193esac
8194
8195if test "${opsys}" = "hpux9"; then
8196 case "${x_libraries}" in
8197 *X11R4* )
8198 opsysfile="s/hpux9-x11r4.h"
8199 ;;
8200 esac
8201fi
8202
8203if test "${opsys}" = "hpux9shr"; then
8204 case "${x_libraries}" in
8205 *X11R4* )
8206 opsysfile="s/hpux9shxr4.h"
8207 ;;
8208 esac
8209fi
8210
8211### Compute the unexec source name from the object name.
8212UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
8213
8214# Do the opsystem or machine files prohibit the use of the GNU malloc?
8215# Assume not, until told otherwise.
8216GNU_MALLOC=yes
8217doug_lea_malloc=yes
c0d27fcc 8218echo "$as_me:$LINENO: checking for malloc_get_state" >&5
98418dba
CW
8219echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6
8220if test "${ac_cv_func_malloc_get_state+set}" = set; then
8221 echo $ECHO_N "(cached) $ECHO_C" >&6
8222else
8223 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8224/* confdefs.h. */
8225_ACEOF
8226cat confdefs.h >>conftest.$ac_ext
8227cat >>conftest.$ac_ext <<_ACEOF
8228/* end confdefs.h. */
35996d22
AS
8229/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
8230 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8231#define malloc_get_state innocuous_malloc_get_state
8232
98418dba 8233/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8234 which can conflict with char malloc_get_state (); below.
8235 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8236 <limits.h> exists even on freestanding compilers. */
35996d22 8237
19650fd6
AS
8238#ifdef __STDC__
8239# include <limits.h>
8240#else
8241# include <assert.h>
8242#endif
35996d22
AS
8243
8244#undef malloc_get_state
8245
98418dba
CW
8246/* Override any gcc2 internal prototype to avoid an error. */
8247#ifdef __cplusplus
8248extern "C"
19650fd6 8249{
98418dba
CW
8250#endif
8251/* We use char because int might match the return type of a gcc2
8252 builtin and then its argument prototype would still apply. */
8253char malloc_get_state ();
98418dba
CW
8254/* The GNU C library defines this for functions which it implements
8255 to always fail with ENOSYS. Some functions are actually named
8256 something starting with __ and the normal name is an alias. */
8257#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
8258choke me
8259#else
19650fd6
AS
8260char (*f) () = malloc_get_state;
8261#endif
8262#ifdef __cplusplus
8263}
98418dba
CW
8264#endif
8265
19650fd6
AS
8266int
8267main ()
8268{
8269return f != malloc_get_state;
98418dba
CW
8270 ;
8271 return 0;
8272}
8273_ACEOF
8274rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8275if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8276 (eval $ac_link) 2>conftest.er1
98418dba 8277 ac_status=$?
35996d22
AS
8278 grep -v '^ *+' conftest.er1 >conftest.err
8279 rm -f conftest.er1
8280 cat conftest.err >&5
c0d27fcc 8281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8282 (exit $ac_status); } &&
4494a266
JD
8283 { ac_try='test -z "$ac_c_werror_flag"
8284 || test ! -s conftest.err'
35996d22
AS
8285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8286 (eval $ac_try) 2>&5
8287 ac_status=$?
8288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8289 (exit $ac_status); }; } &&
8290 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8292 (eval $ac_try) 2>&5
8293 ac_status=$?
c0d27fcc 8294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8295 (exit $ac_status); }; }; then
8296 ac_cv_func_malloc_get_state=yes
8297else
8298 echo "$as_me: failed program was:" >&5
19650fd6
AS
8299sed 's/^/| /' conftest.$ac_ext >&5
8300
98418dba
CW
8301ac_cv_func_malloc_get_state=no
8302fi
35996d22
AS
8303rm -f conftest.err conftest.$ac_objext \
8304 conftest$ac_exeext conftest.$ac_ext
98418dba 8305fi
c0d27fcc 8306echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
98418dba
CW
8307echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6
8308if test $ac_cv_func_malloc_get_state = yes; then
8309 :
8310else
8311 doug_lea_malloc=no
8312fi
8313
c0d27fcc 8314echo "$as_me:$LINENO: checking for malloc_set_state" >&5
98418dba
CW
8315echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6
8316if test "${ac_cv_func_malloc_set_state+set}" = set; then
8317 echo $ECHO_N "(cached) $ECHO_C" >&6
8318else
8319 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8320/* confdefs.h. */
8321_ACEOF
8322cat confdefs.h >>conftest.$ac_ext
8323cat >>conftest.$ac_ext <<_ACEOF
8324/* end confdefs.h. */
35996d22
AS
8325/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
8326 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8327#define malloc_set_state innocuous_malloc_set_state
8328
98418dba 8329/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8330 which can conflict with char malloc_set_state (); below.
8331 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8332 <limits.h> exists even on freestanding compilers. */
35996d22 8333
19650fd6
AS
8334#ifdef __STDC__
8335# include <limits.h>
8336#else
8337# include <assert.h>
8338#endif
35996d22
AS
8339
8340#undef malloc_set_state
8341
98418dba
CW
8342/* Override any gcc2 internal prototype to avoid an error. */
8343#ifdef __cplusplus
8344extern "C"
19650fd6 8345{
98418dba
CW
8346#endif
8347/* We use char because int might match the return type of a gcc2
8348 builtin and then its argument prototype would still apply. */
8349char malloc_set_state ();
98418dba
CW
8350/* The GNU C library defines this for functions which it implements
8351 to always fail with ENOSYS. Some functions are actually named
8352 something starting with __ and the normal name is an alias. */
8353#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
8354choke me
8355#else
19650fd6
AS
8356char (*f) () = malloc_set_state;
8357#endif
8358#ifdef __cplusplus
8359}
98418dba
CW
8360#endif
8361
19650fd6
AS
8362int
8363main ()
8364{
8365return f != malloc_set_state;
98418dba
CW
8366 ;
8367 return 0;
8368}
8369_ACEOF
8370rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8371if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8372 (eval $ac_link) 2>conftest.er1
98418dba 8373 ac_status=$?
35996d22
AS
8374 grep -v '^ *+' conftest.er1 >conftest.err
8375 rm -f conftest.er1
8376 cat conftest.err >&5
c0d27fcc 8377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8378 (exit $ac_status); } &&
4494a266
JD
8379 { ac_try='test -z "$ac_c_werror_flag"
8380 || test ! -s conftest.err'
35996d22
AS
8381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8382 (eval $ac_try) 2>&5
8383 ac_status=$?
8384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8385 (exit $ac_status); }; } &&
8386 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8388 (eval $ac_try) 2>&5
8389 ac_status=$?
c0d27fcc 8390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8391 (exit $ac_status); }; }; then
8392 ac_cv_func_malloc_set_state=yes
8393else
8394 echo "$as_me: failed program was:" >&5
19650fd6
AS
8395sed 's/^/| /' conftest.$ac_ext >&5
8396
98418dba
CW
8397ac_cv_func_malloc_set_state=no
8398fi
35996d22
AS
8399rm -f conftest.err conftest.$ac_objext \
8400 conftest$ac_exeext conftest.$ac_ext
98418dba 8401fi
c0d27fcc 8402echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
98418dba
CW
8403echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6
8404if test $ac_cv_func_malloc_set_state = yes; then
8405 :
8406else
8407 doug_lea_malloc=no
8408fi
8409
c0d27fcc 8410echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
98418dba
CW
8411echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6
8412if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
8413 echo $ECHO_N "(cached) $ECHO_C" >&6
8414else
8415 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8416/* confdefs.h. */
8417_ACEOF
8418cat confdefs.h >>conftest.$ac_ext
8419cat >>conftest.$ac_ext <<_ACEOF
8420/* end confdefs.h. */
98418dba 8421extern void (* __after_morecore_hook)();
98418dba
CW
8422int
8423main ()
8424{
8425__after_morecore_hook = 0
8426 ;
8427 return 0;
8428}
8429_ACEOF
8430rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8431if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8432 (eval $ac_link) 2>conftest.er1
98418dba 8433 ac_status=$?
35996d22
AS
8434 grep -v '^ *+' conftest.er1 >conftest.err
8435 rm -f conftest.er1
8436 cat conftest.err >&5
c0d27fcc 8437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8438 (exit $ac_status); } &&
4494a266
JD
8439 { ac_try='test -z "$ac_c_werror_flag"
8440 || test ! -s conftest.err'
35996d22
AS
8441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8442 (eval $ac_try) 2>&5
8443 ac_status=$?
8444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8445 (exit $ac_status); }; } &&
8446 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8448 (eval $ac_try) 2>&5
8449 ac_status=$?
c0d27fcc 8450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8451 (exit $ac_status); }; }; then
8452 emacs_cv_var___after_morecore_hook=yes
8453else
8454 echo "$as_me: failed program was:" >&5
19650fd6
AS
8455sed 's/^/| /' conftest.$ac_ext >&5
8456
98418dba
CW
8457emacs_cv_var___after_morecore_hook=no
8458fi
35996d22
AS
8459rm -f conftest.err conftest.$ac_objext \
8460 conftest$ac_exeext conftest.$ac_ext
98418dba 8461fi
c0d27fcc 8462echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
98418dba
CW
8463echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6
8464if test $emacs_cv_var___after_morecore_hook = no; then
8465 doug_lea_malloc=no
8466fi
8467if test "${system_malloc}" = "yes"; then
8468 GNU_MALLOC=no
8469 GNU_MALLOC_reason="
8470 (The GNU allocators don't work with this system configuration.)"
8471fi
8472if test "$doug_lea_malloc" = "yes" ; then
8473 if test "$GNU_MALLOC" = yes ; then
8474 GNU_MALLOC_reason="
8475 (Using Doug Lea's new malloc from the GNU C Library.)"
8476 fi
b936fae4 8477
c0d27fcc 8478cat >>confdefs.h <<\_ACEOF
98418dba 8479#define DOUG_LEA_MALLOC 1
c0d27fcc 8480_ACEOF
98418dba
CW
8481
8482fi
8483
8484if test x"${REL_ALLOC}" = x; then
8485 REL_ALLOC=${GNU_MALLOC}
8486fi
8487
8488
c0d27fcc
MR
8489
8490
8491for ac_header in stdlib.h unistd.h
98418dba
CW
8492do
8493as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
8494if eval "test \"\${$as_ac_Header+set}\" = set"; then
8495 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
8496echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8497if eval "test \"\${$as_ac_Header+set}\" = set"; then
8498 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
8499fi
8500echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8501echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 8502else
c0d27fcc
MR
8503 # Is the header compilable?
8504echo "$as_me:$LINENO: checking $ac_header usability" >&5
8505echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8506cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8507/* confdefs.h. */
8508_ACEOF
8509cat confdefs.h >>conftest.$ac_ext
8510cat >>conftest.$ac_ext <<_ACEOF
8511/* end confdefs.h. */
98418dba
CW
8512$ac_includes_default
8513#include <$ac_header>
8514_ACEOF
8515rm -f conftest.$ac_objext
c0d27fcc 8516if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 8517 (eval $ac_compile) 2>conftest.er1
98418dba 8518 ac_status=$?
35996d22
AS
8519 grep -v '^ *+' conftest.er1 >conftest.err
8520 rm -f conftest.er1
8521 cat conftest.err >&5
c0d27fcc 8522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8523 (exit $ac_status); } &&
4494a266
JD
8524 { ac_try='test -z "$ac_c_werror_flag"
8525 || test ! -s conftest.err'
35996d22
AS
8526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8527 (eval $ac_try) 2>&5
8528 ac_status=$?
8529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8530 (exit $ac_status); }; } &&
8531 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8533 (eval $ac_try) 2>&5
8534 ac_status=$?
c0d27fcc 8535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8536 (exit $ac_status); }; }; then
c0d27fcc 8537 ac_header_compiler=yes
98418dba
CW
8538else
8539 echo "$as_me: failed program was:" >&5
19650fd6
AS
8540sed 's/^/| /' conftest.$ac_ext >&5
8541
c0d27fcc 8542ac_header_compiler=no
98418dba 8543fi
35996d22 8544rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
8545echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8546echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 8547
c0d27fcc
MR
8548# Is the header present?
8549echo "$as_me:$LINENO: checking $ac_header presence" >&5
8550echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8551cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8552/* confdefs.h. */
8553_ACEOF
8554cat confdefs.h >>conftest.$ac_ext
8555cat >>conftest.$ac_ext <<_ACEOF
8556/* end confdefs.h. */
98418dba
CW
8557#include <$ac_header>
8558_ACEOF
c0d27fcc 8559if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
8560 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8561 ac_status=$?
6bae0ccf 8562 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
8563 rm -f conftest.er1
8564 cat conftest.err >&5
c0d27fcc 8565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8566 (exit $ac_status); } >/dev/null; then
8567 if test -s conftest.err; then
8568 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 8569 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
8570 else
8571 ac_cpp_err=
8572 fi
8573else
8574 ac_cpp_err=yes
8575fi
8576if test -z "$ac_cpp_err"; then
c0d27fcc 8577 ac_header_preproc=yes
98418dba
CW
8578else
8579 echo "$as_me: failed program was:" >&5
19650fd6
AS
8580sed 's/^/| /' conftest.$ac_ext >&5
8581
c0d27fcc 8582 ac_header_preproc=no
98418dba
CW
8583fi
8584rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
8585echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8586echo "${ECHO_T}$ac_header_preproc" >&6
8587
8588# So? What about this header?
35996d22
AS
8589case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8590 yes:no: )
c0d27fcc
MR
8591 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8592echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
8593 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8594echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8595 ac_header_preproc=yes
19650fd6 8596 ;;
35996d22 8597 no:yes:* )
c0d27fcc
MR
8598 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8599echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
8600 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8601echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8602 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8603echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8604 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8605echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 8606 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 8607echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
8608 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8609echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
8610 (
8611 cat <<\_ASBOX
35996d22
AS
8612## ------------------------------------------ ##
8613## Report this to the AC_PACKAGE_NAME lists. ##
8614## ------------------------------------------ ##
19650fd6
AS
8615_ASBOX
8616 ) |
8617 sed "s/^/$as_me: WARNING: /" >&2
8618 ;;
c0d27fcc
MR
8619esac
8620echo "$as_me:$LINENO: checking for $ac_header" >&5
8621echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8622if eval "test \"\${$as_ac_Header+set}\" = set"; then
8623 echo $ECHO_N "(cached) $ECHO_C" >&6
8624else
35996d22 8625 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 8626fi
c0d27fcc 8627echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 8628echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
8629
8630fi
98418dba 8631if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 8632 cat >>confdefs.h <<_ACEOF
98418dba 8633#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 8634_ACEOF
98418dba
CW
8635
8636fi
c0d27fcc 8637
98418dba
CW
8638done
8639
c0d27fcc 8640
98418dba
CW
8641for ac_func in getpagesize
8642do
8643as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 8644echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
8645echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8646if eval "test \"\${$as_ac_var+set}\" = set"; then
8647 echo $ECHO_N "(cached) $ECHO_C" >&6
8648else
8649 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8650/* confdefs.h. */
8651_ACEOF
8652cat confdefs.h >>conftest.$ac_ext
8653cat >>conftest.$ac_ext <<_ACEOF
8654/* end confdefs.h. */
35996d22
AS
8655/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8656 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8657#define $ac_func innocuous_$ac_func
8658
98418dba 8659/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8660 which can conflict with char $ac_func (); below.
8661 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8662 <limits.h> exists even on freestanding compilers. */
35996d22 8663
19650fd6
AS
8664#ifdef __STDC__
8665# include <limits.h>
8666#else
8667# include <assert.h>
8668#endif
35996d22
AS
8669
8670#undef $ac_func
8671
98418dba
CW
8672/* Override any gcc2 internal prototype to avoid an error. */
8673#ifdef __cplusplus
8674extern "C"
19650fd6 8675{
98418dba
CW
8676#endif
8677/* We use char because int might match the return type of a gcc2
8678 builtin and then its argument prototype would still apply. */
8679char $ac_func ();
98418dba
CW
8680/* The GNU C library defines this for functions which it implements
8681 to always fail with ENOSYS. Some functions are actually named
8682 something starting with __ and the normal name is an alias. */
8683#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8684choke me
8685#else
19650fd6
AS
8686char (*f) () = $ac_func;
8687#endif
8688#ifdef __cplusplus
8689}
98418dba
CW
8690#endif
8691
19650fd6
AS
8692int
8693main ()
8694{
8695return f != $ac_func;
98418dba
CW
8696 ;
8697 return 0;
8698}
8699_ACEOF
8700rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8701if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8702 (eval $ac_link) 2>conftest.er1
98418dba 8703 ac_status=$?
35996d22
AS
8704 grep -v '^ *+' conftest.er1 >conftest.err
8705 rm -f conftest.er1
8706 cat conftest.err >&5
c0d27fcc 8707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8708 (exit $ac_status); } &&
4494a266
JD
8709 { ac_try='test -z "$ac_c_werror_flag"
8710 || test ! -s conftest.err'
35996d22
AS
8711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8712 (eval $ac_try) 2>&5
8713 ac_status=$?
8714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8715 (exit $ac_status); }; } &&
8716 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8718 (eval $ac_try) 2>&5
8719 ac_status=$?
c0d27fcc 8720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8721 (exit $ac_status); }; }; then
8722 eval "$as_ac_var=yes"
8723else
8724 echo "$as_me: failed program was:" >&5
19650fd6
AS
8725sed 's/^/| /' conftest.$ac_ext >&5
8726
98418dba
CW
8727eval "$as_ac_var=no"
8728fi
35996d22
AS
8729rm -f conftest.err conftest.$ac_objext \
8730 conftest$ac_exeext conftest.$ac_ext
98418dba 8731fi
c0d27fcc 8732echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
8733echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8734if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 8735 cat >>confdefs.h <<_ACEOF
98418dba 8736#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 8737_ACEOF
98418dba
CW
8738
8739fi
8740done
8741
c0d27fcc 8742echo "$as_me:$LINENO: checking for working mmap" >&5
98418dba
CW
8743echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
8744if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
8745 echo $ECHO_N "(cached) $ECHO_C" >&6
8746else
8747 if test "$cross_compiling" = yes; then
8748 ac_cv_func_mmap_fixed_mapped=no
8749else
8750 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8751/* confdefs.h. */
8752_ACEOF
8753cat confdefs.h >>conftest.$ac_ext
8754cat >>conftest.$ac_ext <<_ACEOF
8755/* end confdefs.h. */
98418dba 8756$ac_includes_default
c0d27fcc
MR
8757/* malloc might have been renamed as rpl_malloc. */
8758#undef malloc
8759
98418dba
CW
8760/* Thanks to Mike Haertel and Jim Avera for this test.
8761 Here is a matrix of mmap possibilities:
8762 mmap private not fixed
8763 mmap private fixed at somewhere currently unmapped
8764 mmap private fixed at somewhere already mapped
8765 mmap shared not fixed
8766 mmap shared fixed at somewhere currently unmapped
8767 mmap shared fixed at somewhere already mapped
8768 For private mappings, we should verify that changes cannot be read()
8769 back from the file, nor mmap's back from the file at a different
8770 address. (There have been systems where private was not correctly
8771 implemented like the infamous i386 svr4.0, and systems where the
8772 VM page cache was not coherent with the file system buffer cache
8773 like early versions of FreeBSD and possibly contemporary NetBSD.)
8774 For shared mappings, we should conversely verify that changes get
c0d27fcc 8775 propagated back to all the places they're supposed to be.
98418dba
CW
8776
8777 Grep wants private fixed already mapped.
8778 The main things grep needs to know about mmap are:
8779 * does it exist and is it safe to write into the mmap'd area
8780 * how to use it (BSD variants) */
8781
8782#include <fcntl.h>
8783#include <sys/mman.h>
8784
8785#if !STDC_HEADERS && !HAVE_STDLIB_H
8786char *malloc ();
8787#endif
8788
8789/* This mess was copied from the GNU getpagesize.h. */
8790#if !HAVE_GETPAGESIZE
8791/* Assume that all systems that can run configure have sys/param.h. */
8792# if !HAVE_SYS_PARAM_H
8793# define HAVE_SYS_PARAM_H 1
8794# endif
8795
8796# ifdef _SC_PAGESIZE
8797# define getpagesize() sysconf(_SC_PAGESIZE)
8798# else /* no _SC_PAGESIZE */
8799# if HAVE_SYS_PARAM_H
8800# include <sys/param.h>
8801# ifdef EXEC_PAGESIZE
8802# define getpagesize() EXEC_PAGESIZE
8803# else /* no EXEC_PAGESIZE */
8804# ifdef NBPG
8805# define getpagesize() NBPG * CLSIZE
8806# ifndef CLSIZE
8807# define CLSIZE 1
8808# endif /* no CLSIZE */
8809# else /* no NBPG */
8810# ifdef NBPC
8811# define getpagesize() NBPC
8812# else /* no NBPC */
8813# ifdef PAGESIZE
8814# define getpagesize() PAGESIZE
8815# endif /* PAGESIZE */
8816# endif /* no NBPC */
8817# endif /* no NBPG */
8818# endif /* no EXEC_PAGESIZE */
8819# else /* no HAVE_SYS_PARAM_H */
8820# define getpagesize() 8192 /* punt totally */
8821# endif /* no HAVE_SYS_PARAM_H */
8822# endif /* no _SC_PAGESIZE */
8823
8824#endif /* no HAVE_GETPAGESIZE */
8825
8826int
8827main ()
8828{
8829 char *data, *data2, *data3;
8830 int i, pagesize;
8831 int fd;
8832
8833 pagesize = getpagesize ();
8834
8835 /* First, make a file with some known garbage in it. */
8836 data = (char *) malloc (pagesize);
8837 if (!data)
8838 exit (1);
8839 for (i = 0; i < pagesize; ++i)
8840 *(data + i) = rand ();
8841 umask (0);
8842 fd = creat ("conftest.mmap", 0600);
8843 if (fd < 0)
8844 exit (1);
8845 if (write (fd, data, pagesize) != pagesize)
8846 exit (1);
8847 close (fd);
8848
8849 /* Next, try to mmap the file at a fixed address which already has
8850 something else allocated at it. If we can, also make sure that
8851 we see the same garbage. */
8852 fd = open ("conftest.mmap", O_RDWR);
8853 if (fd < 0)
8854 exit (1);
8855 data2 = (char *) malloc (2 * pagesize);
8856 if (!data2)
8857 exit (1);
35996d22 8858 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 8859 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
35996d22 8860 MAP_PRIVATE | MAP_FIXED, fd, 0L))
98418dba
CW
8861 exit (1);
8862 for (i = 0; i < pagesize; ++i)
8863 if (*(data + i) != *(data2 + i))
8864 exit (1);
8865
8866 /* Finally, make sure that changes to the mapped area do not
8867 percolate back to the file as seen by read(). (This is a bug on
8868 some variants of i386 svr4.0.) */
8869 for (i = 0; i < pagesize; ++i)
8870 *(data2 + i) = *(data2 + i) + 1;
8871 data3 = (char *) malloc (pagesize);
8872 if (!data3)
8873 exit (1);
8874 if (read (fd, data3, pagesize) != pagesize)
8875 exit (1);
8876 for (i = 0; i < pagesize; ++i)
8877 if (*(data + i) != *(data3 + i))
8878 exit (1);
8879 close (fd);
8880 exit (0);
8881}
8882_ACEOF
8883rm -f conftest$ac_exeext
c0d27fcc 8884if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8885 (eval $ac_link) 2>&5
8886 ac_status=$?
c0d27fcc 8887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8888 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 8889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8890 (eval $ac_try) 2>&5
8891 ac_status=$?
c0d27fcc 8892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8893 (exit $ac_status); }; }; then
8894 ac_cv_func_mmap_fixed_mapped=yes
8895else
8896 echo "$as_me: program exited with status $ac_status" >&5
8897echo "$as_me: failed program was:" >&5
19650fd6
AS
8898sed 's/^/| /' conftest.$ac_ext >&5
8899
c0d27fcc 8900( exit $ac_status )
98418dba
CW
8901ac_cv_func_mmap_fixed_mapped=no
8902fi
35996d22 8903rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba
CW
8904fi
8905fi
c0d27fcc 8906echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
98418dba
CW
8907echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
8908if test $ac_cv_func_mmap_fixed_mapped = yes; then
8909
c0d27fcc 8910cat >>confdefs.h <<\_ACEOF
98418dba 8911#define HAVE_MMAP 1
c0d27fcc 8912_ACEOF
98418dba
CW
8913
8914fi
8915rm -f conftest.mmap
8916
8917if test $use_mmap_for_buffers = yes; then
8918 REL_ALLOC=no
8919fi
8920
8921LIBS="$libsrc_libs $LIBS"
8922
c0d27fcc
MR
8923
8924echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
98418dba
CW
8925echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
8926if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
8927 echo $ECHO_N "(cached) $ECHO_C" >&6
8928else
8929 ac_check_lib_save_LIBS=$LIBS
8930LIBS="-ldnet $LIBS"
8931cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8932/* confdefs.h. */
8933_ACEOF
8934cat confdefs.h >>conftest.$ac_ext
8935cat >>conftest.$ac_ext <<_ACEOF
8936/* end confdefs.h. */
98418dba
CW
8937
8938/* Override any gcc2 internal prototype to avoid an error. */
8939#ifdef __cplusplus
8940extern "C"
8941#endif
8942/* We use char because int might match the return type of a gcc2
8943 builtin and then its argument prototype would still apply. */
8944char dnet_ntoa ();
98418dba
CW
8945int
8946main ()
8947{
8948dnet_ntoa ();
8949 ;
8950 return 0;
8951}
8952_ACEOF
8953rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8954if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8955 (eval $ac_link) 2>conftest.er1
98418dba 8956 ac_status=$?
35996d22
AS
8957 grep -v '^ *+' conftest.er1 >conftest.err
8958 rm -f conftest.er1
8959 cat conftest.err >&5
c0d27fcc 8960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8961 (exit $ac_status); } &&
4494a266
JD
8962 { ac_try='test -z "$ac_c_werror_flag"
8963 || test ! -s conftest.err'
35996d22
AS
8964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8965 (eval $ac_try) 2>&5
8966 ac_status=$?
8967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8968 (exit $ac_status); }; } &&
8969 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8971 (eval $ac_try) 2>&5
8972 ac_status=$?
c0d27fcc 8973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8974 (exit $ac_status); }; }; then
8975 ac_cv_lib_dnet_dnet_ntoa=yes
8976else
8977 echo "$as_me: failed program was:" >&5
19650fd6
AS
8978sed 's/^/| /' conftest.$ac_ext >&5
8979
98418dba
CW
8980ac_cv_lib_dnet_dnet_ntoa=no
8981fi
35996d22
AS
8982rm -f conftest.err conftest.$ac_objext \
8983 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
8984LIBS=$ac_check_lib_save_LIBS
8985fi
c0d27fcc 8986echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
98418dba
CW
8987echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
8988if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 8989 cat >>confdefs.h <<_ACEOF
98418dba 8990#define HAVE_LIBDNET 1
c0d27fcc 8991_ACEOF
98418dba
CW
8992
8993 LIBS="-ldnet $LIBS"
8994
8995fi
8996
c0d27fcc
MR
8997
8998echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
98418dba
CW
8999echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6
9000if test "${ac_cv_lib_Xbsd_main+set}" = set; then
9001 echo $ECHO_N "(cached) $ECHO_C" >&6
9002else
9003 ac_check_lib_save_LIBS=$LIBS
9004LIBS="-lXbsd $LIBS"
9005cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9006/* confdefs.h. */
9007_ACEOF
9008cat confdefs.h >>conftest.$ac_ext
9009cat >>conftest.$ac_ext <<_ACEOF
9010/* end confdefs.h. */
98418dba 9011
c0d27fcc 9012
98418dba
CW
9013int
9014main ()
9015{
9016main ();
9017 ;
9018 return 0;
9019}
9020_ACEOF
9021rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9022if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9023 (eval $ac_link) 2>conftest.er1
98418dba 9024 ac_status=$?
35996d22
AS
9025 grep -v '^ *+' conftest.er1 >conftest.err
9026 rm -f conftest.er1
9027 cat conftest.err >&5
c0d27fcc 9028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9029 (exit $ac_status); } &&
4494a266
JD
9030 { ac_try='test -z "$ac_c_werror_flag"
9031 || test ! -s conftest.err'
35996d22
AS
9032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9033 (eval $ac_try) 2>&5
9034 ac_status=$?
9035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9036 (exit $ac_status); }; } &&
9037 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9039 (eval $ac_try) 2>&5
9040 ac_status=$?
c0d27fcc 9041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9042 (exit $ac_status); }; }; then
9043 ac_cv_lib_Xbsd_main=yes
9044else
9045 echo "$as_me: failed program was:" >&5
19650fd6
AS
9046sed 's/^/| /' conftest.$ac_ext >&5
9047
98418dba
CW
9048ac_cv_lib_Xbsd_main=no
9049fi
35996d22
AS
9050rm -f conftest.err conftest.$ac_objext \
9051 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9052LIBS=$ac_check_lib_save_LIBS
9053fi
c0d27fcc 9054echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
98418dba
CW
9055echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6
9056if test $ac_cv_lib_Xbsd_main = yes; then
9057 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
9058fi
9059
c0d27fcc
MR
9060
9061
9062echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
98418dba
CW
9063echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6
9064if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
9065 echo $ECHO_N "(cached) $ECHO_C" >&6
9066else
9067 ac_check_lib_save_LIBS=$LIBS
9068LIBS="-lpthreads $LIBS"
9069cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9070/* confdefs.h. */
9071_ACEOF
9072cat confdefs.h >>conftest.$ac_ext
9073cat >>conftest.$ac_ext <<_ACEOF
9074/* end confdefs.h. */
98418dba
CW
9075
9076/* Override any gcc2 internal prototype to avoid an error. */
9077#ifdef __cplusplus
9078extern "C"
9079#endif
9080/* We use char because int might match the return type of a gcc2
9081 builtin and then its argument prototype would still apply. */
9082char cma_open ();
98418dba
CW
9083int
9084main ()
9085{
9086cma_open ();
9087 ;
9088 return 0;
9089}
9090_ACEOF
9091rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9092if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9093 (eval $ac_link) 2>conftest.er1
98418dba 9094 ac_status=$?
35996d22
AS
9095 grep -v '^ *+' conftest.er1 >conftest.err
9096 rm -f conftest.er1
9097 cat conftest.err >&5
c0d27fcc 9098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9099 (exit $ac_status); } &&
4494a266
JD
9100 { ac_try='test -z "$ac_c_werror_flag"
9101 || test ! -s conftest.err'
35996d22
AS
9102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9103 (eval $ac_try) 2>&5
9104 ac_status=$?
9105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9106 (exit $ac_status); }; } &&
9107 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9109 (eval $ac_try) 2>&5
9110 ac_status=$?
c0d27fcc 9111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9112 (exit $ac_status); }; }; then
9113 ac_cv_lib_pthreads_cma_open=yes
9114else
9115 echo "$as_me: failed program was:" >&5
19650fd6
AS
9116sed 's/^/| /' conftest.$ac_ext >&5
9117
98418dba
CW
9118ac_cv_lib_pthreads_cma_open=no
9119fi
35996d22
AS
9120rm -f conftest.err conftest.$ac_objext \
9121 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9122LIBS=$ac_check_lib_save_LIBS
9123fi
c0d27fcc 9124echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
98418dba
CW
9125echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6
9126if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 9127 cat >>confdefs.h <<_ACEOF
98418dba 9128#define HAVE_LIBPTHREADS 1
c0d27fcc 9129_ACEOF
98418dba
CW
9130
9131 LIBS="-lpthreads $LIBS"
9132
9133fi
9134
c0d27fcc
MR
9135
9136echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
98418dba
CW
9137echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6
9138if test -d /usr/X386/include; then
9139 HAVE_XFREE386=yes
9140 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
9141else
9142 HAVE_XFREE386=no
9143fi
c0d27fcc 9144echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
98418dba
CW
9145echo "${ECHO_T}$HAVE_XFREE386" >&6
9146
55597d70
DL
9147
9148case ${host_os} in
9149aix*)
9150 echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
9151echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6
9152if test "${gdb_cv_bigtoc+set}" = set; then
9153 echo $ECHO_N "(cached) $ECHO_C" >&6
9154else
9155
9156 case $GCC in
9157 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
9158 *) gdb_cv_bigtoc=-bbigtoc ;;
9159 esac
9160
9161 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
9162 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9163/* confdefs.h. */
9164_ACEOF
9165cat confdefs.h >>conftest.$ac_ext
9166cat >>conftest.$ac_ext <<_ACEOF
9167/* end confdefs.h. */
55597d70
DL
9168
9169int
9170main ()
9171{
9172int i;
9173 ;
9174 return 0;
9175}
9176_ACEOF
9177rm -f conftest.$ac_objext conftest$ac_exeext
9178if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9179 (eval $ac_link) 2>conftest.er1
55597d70 9180 ac_status=$?
35996d22
AS
9181 grep -v '^ *+' conftest.er1 >conftest.err
9182 rm -f conftest.er1
9183 cat conftest.err >&5
55597d70
DL
9184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9185 (exit $ac_status); } &&
4494a266
JD
9186 { ac_try='test -z "$ac_c_werror_flag"
9187 || test ! -s conftest.err'
35996d22
AS
9188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9189 (eval $ac_try) 2>&5
9190 ac_status=$?
9191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9192 (exit $ac_status); }; } &&
9193 { ac_try='test -s conftest$ac_exeext'
55597d70
DL
9194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9195 (eval $ac_try) 2>&5
9196 ac_status=$?
9197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9198 (exit $ac_status); }; }; then
9199 :
9200else
9201 echo "$as_me: failed program was:" >&5
19650fd6
AS
9202sed 's/^/| /' conftest.$ac_ext >&5
9203
55597d70
DL
9204gdb_cv_bigtoc=
9205fi
35996d22
AS
9206rm -f conftest.err conftest.$ac_objext \
9207 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
9208
9209fi
9210echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
9211echo "${ECHO_T}$gdb_cv_bigtoc" >&6
9212 ;;
9213esac
9214
ae1a998c
RS
9215# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
9216# used for the tests that follow. We set them back to REAL_CFLAGS and
9217# REAL_CPPFLAGS later on.
98418dba
CW
9218
9219REAL_CPPFLAGS="$CPPFLAGS"
9220
9221if test "${HAVE_X11}" = "yes"; then
9222 DEFS="$C_SWITCH_X_SITE $DEFS"
9223 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
9224 LIBS="$LIBX $LIBS"
9225 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
9226 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
9227
9228 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
9229 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
9230 # but it's more convenient here to set LD_RUN_PATH
9231 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
9232 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
9233 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
9234 export LD_RUN_PATH
9235 fi
9236
9237 if test "${opsys}" = "gnu-linux"; then
c0d27fcc 9238 echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
98418dba
CW
9239echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6
9240 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9241/* confdefs.h. */
9242_ACEOF
9243cat confdefs.h >>conftest.$ac_ext
9244cat >>conftest.$ac_ext <<_ACEOF
9245/* end confdefs.h. */
98418dba 9246
98418dba
CW
9247int
9248main ()
9249{
9250XOpenDisplay ("foo");
9251 ;
9252 return 0;
9253}
9254_ACEOF
9255rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9256if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9257 (eval $ac_link) 2>conftest.er1
98418dba 9258 ac_status=$?
35996d22
AS
9259 grep -v '^ *+' conftest.er1 >conftest.err
9260 rm -f conftest.er1
9261 cat conftest.err >&5
c0d27fcc 9262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9263 (exit $ac_status); } &&
4494a266
JD
9264 { ac_try='test -z "$ac_c_werror_flag"
9265 || test ! -s conftest.err'
c0d27fcc 9266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9267 (eval $ac_try) 2>&5
9268 ac_status=$?
c0d27fcc 9269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
35996d22
AS
9270 (exit $ac_status); }; } &&
9271 { ac_try='test -s conftest$ac_exeext'
9272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9273 (eval $ac_try) 2>&5
9274 ac_status=$?
9275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9276 (exit $ac_status); }; }; then
9277 xlinux_first_failure=no
98418dba
CW
9278else
9279 echo "$as_me: failed program was:" >&5
19650fd6
AS
9280sed 's/^/| /' conftest.$ac_ext >&5
9281
98418dba
CW
9282xlinux_first_failure=yes
9283fi
35996d22
AS
9284rm -f conftest.err conftest.$ac_objext \
9285 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9286 if test "${xlinux_first_failure}" = "yes"; then
9287 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
9288 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
9289 OLD_CPPFLAGS="$CPPFLAGS"
9290 OLD_LIBS="$LIBS"
9291 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
9292 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
9293 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
9294 LIBS="$LIBS -b i486-linuxaout"
9295 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9296/* confdefs.h. */
9297_ACEOF
9298cat confdefs.h >>conftest.$ac_ext
9299cat >>conftest.$ac_ext <<_ACEOF
9300/* end confdefs.h. */
98418dba 9301
98418dba
CW
9302int
9303main ()
9304{
9305XOpenDisplay ("foo");
9306 ;
9307 return 0;
9308}
9309_ACEOF
9310rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9311if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9312 (eval $ac_link) 2>conftest.er1
98418dba 9313 ac_status=$?
35996d22
AS
9314 grep -v '^ *+' conftest.er1 >conftest.err
9315 rm -f conftest.er1
9316 cat conftest.err >&5
c0d27fcc 9317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9318 (exit $ac_status); } &&
4494a266
JD
9319 { ac_try='test -z "$ac_c_werror_flag"
9320 || test ! -s conftest.err'
35996d22
AS
9321 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9322 (eval $ac_try) 2>&5
9323 ac_status=$?
9324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9325 (exit $ac_status); }; } &&
9326 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9328 (eval $ac_try) 2>&5
9329 ac_status=$?
c0d27fcc 9330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9331 (exit $ac_status); }; }; then
9332 xlinux_second_failure=no
9333else
9334 echo "$as_me: failed program was:" >&5
19650fd6
AS
9335sed 's/^/| /' conftest.$ac_ext >&5
9336
98418dba
CW
9337xlinux_second_failure=yes
9338fi
35996d22
AS
9339rm -f conftest.err conftest.$ac_objext \
9340 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9341 if test "${xlinux_second_failure}" = "yes"; then
9342 # If we get the same failure with -b, there is no use adding -b.
9343 # So take it out. This plays safe.
9344 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
9345 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
9346 CPPFLAGS="$OLD_CPPFLAGS"
9347 LIBS="$OLD_LIBS"
c0d27fcc 9348 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
9349echo "${ECHO_T}no" >&6
9350 else
c0d27fcc 9351 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
9352echo "${ECHO_T}yes" >&6
9353 fi
9354 else
c0d27fcc 9355 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
9356echo "${ECHO_T}no" >&6
9357 fi
9358 fi
9359
9360 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
9361 # header files included from there.
c0d27fcc 9362 echo "$as_me:$LINENO: checking for Xkb" >&5
98418dba
CW
9363echo $ECHO_N "checking for Xkb... $ECHO_C" >&6
9364 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9365/* confdefs.h. */
9366_ACEOF
9367cat confdefs.h >>conftest.$ac_ext
9368cat >>conftest.$ac_ext <<_ACEOF
9369/* end confdefs.h. */
98418dba
CW
9370#include <X11/Xlib.h>
9371#include <X11/XKBlib.h>
98418dba
CW
9372int
9373main ()
9374{
9375XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
9376 ;
9377 return 0;
9378}
9379_ACEOF
9380rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9381if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9382 (eval $ac_link) 2>conftest.er1
98418dba 9383 ac_status=$?
35996d22
AS
9384 grep -v '^ *+' conftest.er1 >conftest.err
9385 rm -f conftest.er1
9386 cat conftest.err >&5
c0d27fcc 9387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9388 (exit $ac_status); } &&
4494a266
JD
9389 { ac_try='test -z "$ac_c_werror_flag"
9390 || test ! -s conftest.err'
35996d22
AS
9391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9392 (eval $ac_try) 2>&5
9393 ac_status=$?
9394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9395 (exit $ac_status); }; } &&
9396 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9398 (eval $ac_try) 2>&5
9399 ac_status=$?
c0d27fcc 9400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9401 (exit $ac_status); }; }; then
9402 emacs_xkb=yes
9403else
9404 echo "$as_me: failed program was:" >&5
19650fd6
AS
9405sed 's/^/| /' conftest.$ac_ext >&5
9406
98418dba
CW
9407emacs_xkb=no
9408fi
35996d22
AS
9409rm -f conftest.err conftest.$ac_objext \
9410 conftest$ac_exeext conftest.$ac_ext
c0d27fcc 9411 echo "$as_me:$LINENO: result: $emacs_xkb" >&5
98418dba
CW
9412echo "${ECHO_T}$emacs_xkb" >&6
9413 if test $emacs_xkb = yes; then
b936fae4 9414
c0d27fcc 9415cat >>confdefs.h <<\_ACEOF
98418dba 9416#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 9417_ACEOF
98418dba
CW
9418
9419 fi
9420
c0d27fcc
MR
9421
9422
9423
9424
98418dba
CW
9425for ac_func in XrmSetDatabase XScreenResourceString \
9426XScreenNumberOfScreen XSetWMProtocols
9427do
9428as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 9429echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
9430echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9431if eval "test \"\${$as_ac_var+set}\" = set"; then
9432 echo $ECHO_N "(cached) $ECHO_C" >&6
9433else
9434 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9435/* confdefs.h. */
9436_ACEOF
9437cat confdefs.h >>conftest.$ac_ext
9438cat >>conftest.$ac_ext <<_ACEOF
9439/* end confdefs.h. */
35996d22
AS
9440/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9441 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9442#define $ac_func innocuous_$ac_func
9443
98418dba 9444/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9445 which can conflict with char $ac_func (); below.
9446 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9447 <limits.h> exists even on freestanding compilers. */
35996d22 9448
19650fd6
AS
9449#ifdef __STDC__
9450# include <limits.h>
9451#else
9452# include <assert.h>
9453#endif
35996d22
AS
9454
9455#undef $ac_func
9456
98418dba
CW
9457/* Override any gcc2 internal prototype to avoid an error. */
9458#ifdef __cplusplus
9459extern "C"
19650fd6 9460{
98418dba
CW
9461#endif
9462/* We use char because int might match the return type of a gcc2
9463 builtin and then its argument prototype would still apply. */
9464char $ac_func ();
98418dba
CW
9465/* The GNU C library defines this for functions which it implements
9466 to always fail with ENOSYS. Some functions are actually named
9467 something starting with __ and the normal name is an alias. */
9468#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9469choke me
9470#else
19650fd6
AS
9471char (*f) () = $ac_func;
9472#endif
9473#ifdef __cplusplus
9474}
98418dba
CW
9475#endif
9476
19650fd6
AS
9477int
9478main ()
9479{
9480return f != $ac_func;
98418dba
CW
9481 ;
9482 return 0;
9483}
9484_ACEOF
9485rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9486if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9487 (eval $ac_link) 2>conftest.er1
98418dba 9488 ac_status=$?
35996d22
AS
9489 grep -v '^ *+' conftest.er1 >conftest.err
9490 rm -f conftest.er1
9491 cat conftest.err >&5
c0d27fcc 9492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9493 (exit $ac_status); } &&
4494a266
JD
9494 { ac_try='test -z "$ac_c_werror_flag"
9495 || test ! -s conftest.err'
35996d22
AS
9496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9497 (eval $ac_try) 2>&5
9498 ac_status=$?
9499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9500 (exit $ac_status); }; } &&
9501 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9503 (eval $ac_try) 2>&5
9504 ac_status=$?
c0d27fcc 9505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9506 (exit $ac_status); }; }; then
9507 eval "$as_ac_var=yes"
9508else
9509 echo "$as_me: failed program was:" >&5
19650fd6
AS
9510sed 's/^/| /' conftest.$ac_ext >&5
9511
98418dba
CW
9512eval "$as_ac_var=no"
9513fi
35996d22
AS
9514rm -f conftest.err conftest.$ac_objext \
9515 conftest$ac_exeext conftest.$ac_ext
98418dba 9516fi
c0d27fcc 9517echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
9518echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9519if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 9520 cat >>confdefs.h <<_ACEOF
98418dba 9521#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 9522_ACEOF
98418dba
CW
9523
9524fi
9525done
9526
9527fi
9528
9529if test "${window_system}" = "x11"; then
c0d27fcc 9530 echo "$as_me:$LINENO: checking X11 version 6" >&5
98418dba
CW
9531echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6
9532 if test "${emacs_cv_x11_version_6+set}" = set; then
9533 echo $ECHO_N "(cached) $ECHO_C" >&6
9534else
9535 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9536/* confdefs.h. */
9537_ACEOF
9538cat confdefs.h >>conftest.$ac_ext
9539cat >>conftest.$ac_ext <<_ACEOF
9540/* end confdefs.h. */
98418dba 9541#include <X11/Xlib.h>
98418dba
CW
9542int
9543main ()
9544{
9545#if XlibSpecificationRelease < 6
9546fail;
9547#endif
9548
9549 ;
9550 return 0;
9551}
9552_ACEOF
9553rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9554if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9555 (eval $ac_link) 2>conftest.er1
98418dba 9556 ac_status=$?
35996d22
AS
9557 grep -v '^ *+' conftest.er1 >conftest.err
9558 rm -f conftest.er1
9559 cat conftest.err >&5
c0d27fcc 9560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9561 (exit $ac_status); } &&
4494a266
JD
9562 { ac_try='test -z "$ac_c_werror_flag"
9563 || test ! -s conftest.err'
35996d22
AS
9564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9565 (eval $ac_try) 2>&5
9566 ac_status=$?
9567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9568 (exit $ac_status); }; } &&
9569 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9571 (eval $ac_try) 2>&5
9572 ac_status=$?
c0d27fcc 9573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9574 (exit $ac_status); }; }; then
9575 emacs_cv_x11_version_6=yes
9576else
9577 echo "$as_me: failed program was:" >&5
19650fd6
AS
9578sed 's/^/| /' conftest.$ac_ext >&5
9579
98418dba
CW
9580emacs_cv_x11_version_6=no
9581fi
35996d22
AS
9582rm -f conftest.err conftest.$ac_objext \
9583 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9584fi
9585
9586 if test $emacs_cv_x11_version_6 = yes; then
c0d27fcc 9587 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 9588echo "${ECHO_T}6 or newer" >&6
b936fae4 9589
c0d27fcc 9590cat >>confdefs.h <<\_ACEOF
98418dba 9591#define HAVE_X11R6 1
c0d27fcc 9592_ACEOF
98418dba
CW
9593
9594 else
c0d27fcc 9595 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
9596echo "${ECHO_T}before 6" >&6
9597 fi
9598fi
9599
9600if test "${window_system}" = "x11"; then
c0d27fcc 9601 echo "$as_me:$LINENO: checking X11 version 5" >&5
98418dba
CW
9602echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6
9603 if test "${emacs_cv_x11_version_5+set}" = set; then
9604 echo $ECHO_N "(cached) $ECHO_C" >&6
9605else
9606 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9607/* confdefs.h. */
9608_ACEOF
9609cat confdefs.h >>conftest.$ac_ext
9610cat >>conftest.$ac_ext <<_ACEOF
9611/* end confdefs.h. */
98418dba 9612#include <X11/Xlib.h>
98418dba
CW
9613int
9614main ()
9615{
9616#if XlibSpecificationRelease < 5
9617fail;
9618#endif
9619
9620 ;
9621 return 0;
9622}
9623_ACEOF
9624rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9625if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9626 (eval $ac_link) 2>conftest.er1
98418dba 9627 ac_status=$?
35996d22
AS
9628 grep -v '^ *+' conftest.er1 >conftest.err
9629 rm -f conftest.er1
9630 cat conftest.err >&5
c0d27fcc 9631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9632 (exit $ac_status); } &&
4494a266
JD
9633 { ac_try='test -z "$ac_c_werror_flag"
9634 || test ! -s conftest.err'
35996d22
AS
9635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9636 (eval $ac_try) 2>&5
9637 ac_status=$?
9638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9639 (exit $ac_status); }; } &&
9640 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9642 (eval $ac_try) 2>&5
9643 ac_status=$?
c0d27fcc 9644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9645 (exit $ac_status); }; }; then
9646 emacs_cv_x11_version_5=yes
9647else
9648 echo "$as_me: failed program was:" >&5
19650fd6
AS
9649sed 's/^/| /' conftest.$ac_ext >&5
9650
98418dba
CW
9651emacs_cv_x11_version_5=no
9652fi
35996d22
AS
9653rm -f conftest.err conftest.$ac_objext \
9654 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9655fi
9656
9657 if test $emacs_cv_x11_version_5 = yes; then
c0d27fcc 9658 echo "$as_me:$LINENO: result: 5 or newer" >&5
98418dba
CW
9659echo "${ECHO_T}5 or newer" >&6
9660 HAVE_X11R5=yes
b936fae4 9661
c0d27fcc 9662cat >>confdefs.h <<\_ACEOF
98418dba 9663#define HAVE_X11R5 1
c0d27fcc 9664_ACEOF
98418dba
CW
9665
9666 else
9667 HAVE_X11R5=no
c0d27fcc 9668 echo "$as_me:$LINENO: result: before 5" >&5
98418dba
CW
9669echo "${ECHO_T}before 5" >&6
9670 fi
9671fi
9672
488dd4c4
JD
9673
9674
9675HAVE_GTK=no
9676if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
cd890796 9677 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
488dd4c4
JD
9678 { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
9679echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
9680 { (exit 1); exit 1; }; };
9681 fi
9682 GLIB_REQUIRED=2.0.1
e512ece1 9683 GTK_REQUIRED=2.0.1
488dd4c4
JD
9684 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
9685
9686 if test "X${with_pkg_config_prog}" != X; then
9687 PKG_CONFIG="${with_pkg_config_prog}"
9688 fi
9689
9690 succeeded=no
9691
9692 if test -z "$PKG_CONFIG"; then
9693 # Extract the first word of "pkg-config", so it can be a program name with args.
9694set dummy pkg-config; ac_word=$2
9695echo "$as_me:$LINENO: checking for $ac_word" >&5
9696echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9697if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
9698 echo $ECHO_N "(cached) $ECHO_C" >&6
9699else
9700 case $PKG_CONFIG in
9701 [\\/]* | ?:[\\/]*)
9702 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9703 ;;
9704 *)
9705 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9706for as_dir in $PATH
9707do
9708 IFS=$as_save_IFS
9709 test -z "$as_dir" && as_dir=.
9710 for ac_exec_ext in '' $ac_executable_extensions; do
9711 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9712 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9713 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9714 break 2
9715 fi
9716done
9717done
9718
9719 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9720 ;;
9721esac
9722fi
9723PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9724
9725if test -n "$PKG_CONFIG"; then
9726 echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
9727echo "${ECHO_T}$PKG_CONFIG" >&6
9728else
9729 echo "$as_me:$LINENO: result: no" >&5
9730echo "${ECHO_T}no" >&6
9731fi
9732
9733 fi
9734
9735 if test "$PKG_CONFIG" = "no" ; then
9736 echo "*** The pkg-config script could not be found. Make sure it is"
9737 echo "*** in your path, or give the full path to pkg-config with"
9738 echo "*** the PKG_CONFIG environment variable or --with-pkg-config-prog."
9739 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
9740 else
9741 PKG_CONFIG_MIN_VERSION=0.9.0
9742 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9743 echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
9744echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6
9745
9746 if $PKG_CONFIG --exists "$GTK_MODULES" ; then
9747 echo "$as_me:$LINENO: result: yes" >&5
9748echo "${ECHO_T}yes" >&6
9749 succeeded=yes
9750
9751 echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
9752echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6
9753 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"`
9754 echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
9755echo "${ECHO_T}$GTK_CFLAGS" >&6
9756
9757 echo "$as_me:$LINENO: checking GTK_LIBS" >&5
9758echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6
9759 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"`
9760 echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
9761echo "${ECHO_T}$GTK_LIBS" >&6
9762 else
9763 GTK_CFLAGS=""
9764 GTK_LIBS=""
9765 ## If we have a custom action on failure, don't print errors, but
9766 ## do set a variable so people can do so.
9767 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
9768 echo $GTK_PKG_ERRORS
9769 fi
9770
9771
9772
9773 else
9774 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9775 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9776 fi
9777 fi
9778
9779 if test $succeeded = yes; then
9780 :
9781 else
9782 { { echo "$as_me:$LINENO: error: Library requirements ($GTK_MODULES) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
9783echo "$as_me: error: Library requirements ($GTK_MODULES) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
9784 { (exit 1); exit 1; }; }
9785 fi
9786
9787
9788
9789 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
9790 CFLAGS="$CFLAGS $GTK_CFLAGS"
9791 LIBS="$GTK_LIBS $LIBS"
488dd4c4
JD
9792 HAVE_GTK=yes
9793
9794cat >>confdefs.h <<\_ACEOF
9795#define HAVE_GTK 1
9796_ACEOF
9797
9798 USE_X_TOOLKIT=none
9799
d0a80c21
JD
9800 if test "$with_toolkit_scroll_bars" != no; then
9801 with_toolkit_scroll_bars=yes
9802 fi
57669b57
JD
9803
9804 HAVE_GTK_MULTIDISPLAY=no
9805
9806for ac_func in gdk_display_open
9807do
9808as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9809echo "$as_me:$LINENO: checking for $ac_func" >&5
9810echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9811if eval "test \"\${$as_ac_var+set}\" = set"; then
9812 echo $ECHO_N "(cached) $ECHO_C" >&6
9813else
9814 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
9815/* confdefs.h. */
9816_ACEOF
9817cat confdefs.h >>conftest.$ac_ext
9818cat >>conftest.$ac_ext <<_ACEOF
9819/* end confdefs.h. */
35996d22
AS
9820/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9821 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9822#define $ac_func innocuous_$ac_func
9823
57669b57
JD
9824/* System header to define __stub macros and hopefully few prototypes,
9825 which can conflict with char $ac_func (); below.
9826 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9827 <limits.h> exists even on freestanding compilers. */
35996d22 9828
57669b57
JD
9829#ifdef __STDC__
9830# include <limits.h>
9831#else
9832# include <assert.h>
9833#endif
35996d22
AS
9834
9835#undef $ac_func
9836
57669b57
JD
9837/* Override any gcc2 internal prototype to avoid an error. */
9838#ifdef __cplusplus
9839extern "C"
9840{
9841#endif
9842/* We use char because int might match the return type of a gcc2
9843 builtin and then its argument prototype would still apply. */
9844char $ac_func ();
9845/* The GNU C library defines this for functions which it implements
9846 to always fail with ENOSYS. Some functions are actually named
9847 something starting with __ and the normal name is an alias. */
9848#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9849choke me
9850#else
9851char (*f) () = $ac_func;
9852#endif
9853#ifdef __cplusplus
9854}
9855#endif
9856
9857int
9858main ()
9859{
9860return f != $ac_func;
9861 ;
9862 return 0;
9863}
9864_ACEOF
9865rm -f conftest.$ac_objext conftest$ac_exeext
9866if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9867 (eval $ac_link) 2>conftest.er1
57669b57 9868 ac_status=$?
35996d22
AS
9869 grep -v '^ *+' conftest.er1 >conftest.err
9870 rm -f conftest.er1
9871 cat conftest.err >&5
57669b57
JD
9872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9873 (exit $ac_status); } &&
4494a266
JD
9874 { ac_try='test -z "$ac_c_werror_flag"
9875 || test ! -s conftest.err'
35996d22
AS
9876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9877 (eval $ac_try) 2>&5
9878 ac_status=$?
9879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9880 (exit $ac_status); }; } &&
9881 { ac_try='test -s conftest$ac_exeext'
57669b57
JD
9882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9883 (eval $ac_try) 2>&5
9884 ac_status=$?
9885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9886 (exit $ac_status); }; }; then
9887 eval "$as_ac_var=yes"
9888else
9889 echo "$as_me: failed program was:" >&5
9890sed 's/^/| /' conftest.$ac_ext >&5
9891
9892eval "$as_ac_var=no"
9893fi
35996d22
AS
9894rm -f conftest.err conftest.$ac_objext \
9895 conftest$ac_exeext conftest.$ac_ext
57669b57
JD
9896fi
9897echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9898echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9899if test `eval echo '${'$as_ac_var'}'` = yes; then
9900 cat >>confdefs.h <<_ACEOF
9901#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9902_ACEOF
9903 HAVE_GTK_MULTIDISPLAY=yes
9904fi
9905done
9906
9907 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
9908
9909cat >>confdefs.h <<\_ACEOF
9910#define HAVE_GTK_MULTIDISPLAY 1
572a3cc2
JD
9911_ACEOF
9912
9913 fi
9914 HAVE_GTK_FILE_SELECTION=no
9915
9916for ac_func in gtk_file_selection_new
9917do
9918as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9919echo "$as_me:$LINENO: checking for $ac_func" >&5
9920echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9921if eval "test \"\${$as_ac_var+set}\" = set"; then
9922 echo $ECHO_N "(cached) $ECHO_C" >&6
9923else
9924 cat >conftest.$ac_ext <<_ACEOF
9925/* confdefs.h. */
9926_ACEOF
9927cat confdefs.h >>conftest.$ac_ext
9928cat >>conftest.$ac_ext <<_ACEOF
9929/* end confdefs.h. */
9930/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9931 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9932#define $ac_func innocuous_$ac_func
9933
9934/* System header to define __stub macros and hopefully few prototypes,
9935 which can conflict with char $ac_func (); below.
9936 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9937 <limits.h> exists even on freestanding compilers. */
9938
9939#ifdef __STDC__
9940# include <limits.h>
9941#else
9942# include <assert.h>
9943#endif
9944
9945#undef $ac_func
9946
9947/* Override any gcc2 internal prototype to avoid an error. */
9948#ifdef __cplusplus
9949extern "C"
9950{
9951#endif
9952/* We use char because int might match the return type of a gcc2
9953 builtin and then its argument prototype would still apply. */
9954char $ac_func ();
9955/* The GNU C library defines this for functions which it implements
9956 to always fail with ENOSYS. Some functions are actually named
9957 something starting with __ and the normal name is an alias. */
9958#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9959choke me
9960#else
9961char (*f) () = $ac_func;
9962#endif
9963#ifdef __cplusplus
9964}
9965#endif
9966
9967int
9968main ()
9969{
9970return f != $ac_func;
9971 ;
9972 return 0;
9973}
9974_ACEOF
9975rm -f conftest.$ac_objext conftest$ac_exeext
9976if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9977 (eval $ac_link) 2>conftest.er1
9978 ac_status=$?
9979 grep -v '^ *+' conftest.er1 >conftest.err
9980 rm -f conftest.er1
9981 cat conftest.err >&5
9982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9983 (exit $ac_status); } &&
9984 { ac_try='test -z "$ac_c_werror_flag"
9985 || test ! -s conftest.err'
9986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9987 (eval $ac_try) 2>&5
9988 ac_status=$?
9989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9990 (exit $ac_status); }; } &&
9991 { ac_try='test -s conftest$ac_exeext'
9992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9993 (eval $ac_try) 2>&5
9994 ac_status=$?
9995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9996 (exit $ac_status); }; }; then
9997 eval "$as_ac_var=yes"
9998else
9999 echo "$as_me: failed program was:" >&5
10000sed 's/^/| /' conftest.$ac_ext >&5
10001
10002eval "$as_ac_var=no"
10003fi
10004rm -f conftest.err conftest.$ac_objext \
10005 conftest$ac_exeext conftest.$ac_ext
10006fi
10007echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10008echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10009if test `eval echo '${'$as_ac_var'}'` = yes; then
10010 cat >>confdefs.h <<_ACEOF
10011#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10012_ACEOF
10013 HAVE_GTK_FILE_SELECTION=yes
10014fi
10015done
10016
10017
10018 HAVE_GTK_FILE_CHOOSER=no
10019
10020for ac_func in gtk_file_chooser_dialog_new
10021do
10022as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10023echo "$as_me:$LINENO: checking for $ac_func" >&5
10024echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10025if eval "test \"\${$as_ac_var+set}\" = set"; then
10026 echo $ECHO_N "(cached) $ECHO_C" >&6
10027else
10028 cat >conftest.$ac_ext <<_ACEOF
10029/* confdefs.h. */
10030_ACEOF
10031cat confdefs.h >>conftest.$ac_ext
10032cat >>conftest.$ac_ext <<_ACEOF
10033/* end confdefs.h. */
10034/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10035 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10036#define $ac_func innocuous_$ac_func
10037
10038/* System header to define __stub macros and hopefully few prototypes,
10039 which can conflict with char $ac_func (); below.
10040 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10041 <limits.h> exists even on freestanding compilers. */
10042
10043#ifdef __STDC__
10044# include <limits.h>
10045#else
10046# include <assert.h>
10047#endif
10048
10049#undef $ac_func
10050
10051/* Override any gcc2 internal prototype to avoid an error. */
10052#ifdef __cplusplus
10053extern "C"
10054{
10055#endif
10056/* We use char because int might match the return type of a gcc2
10057 builtin and then its argument prototype would still apply. */
10058char $ac_func ();
10059/* The GNU C library defines this for functions which it implements
10060 to always fail with ENOSYS. Some functions are actually named
10061 something starting with __ and the normal name is an alias. */
10062#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10063choke me
10064#else
10065char (*f) () = $ac_func;
10066#endif
10067#ifdef __cplusplus
10068}
10069#endif
10070
10071int
10072main ()
10073{
10074return f != $ac_func;
10075 ;
10076 return 0;
10077}
10078_ACEOF
10079rm -f conftest.$ac_objext conftest$ac_exeext
10080if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10081 (eval $ac_link) 2>conftest.er1
10082 ac_status=$?
10083 grep -v '^ *+' conftest.er1 >conftest.err
10084 rm -f conftest.er1
10085 cat conftest.err >&5
10086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10087 (exit $ac_status); } &&
10088 { ac_try='test -z "$ac_c_werror_flag"
10089 || test ! -s conftest.err'
10090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10091 (eval $ac_try) 2>&5
10092 ac_status=$?
10093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10094 (exit $ac_status); }; } &&
10095 { ac_try='test -s conftest$ac_exeext'
10096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10097 (eval $ac_try) 2>&5
10098 ac_status=$?
10099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10100 (exit $ac_status); }; }; then
10101 eval "$as_ac_var=yes"
10102else
10103 echo "$as_me: failed program was:" >&5
10104sed 's/^/| /' conftest.$ac_ext >&5
10105
10106eval "$as_ac_var=no"
10107fi
10108rm -f conftest.err conftest.$ac_objext \
10109 conftest$ac_exeext conftest.$ac_ext
10110fi
10111echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10112echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10113if test `eval echo '${'$as_ac_var'}'` = yes; then
10114 cat >>confdefs.h <<_ACEOF
10115#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10116_ACEOF
10117 HAVE_GTK_FILE_CHOOSER=yes
10118fi
10119done
10120
10121
10122 if test "$HAVE_GTK_FILE_SELECTION" = yes \
10123 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
10124
10125cat >>confdefs.h <<\_ACEOF
10126#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
10127_ACEOF
10128
10129 fi
488dd4c4
JD
10130fi
10131
98418dba
CW
10132if test x"${USE_X_TOOLKIT}" = xmaybe; then
10133 if test x"${HAVE_X11R5}" = xyes; then
c0d27fcc 10134 echo "$as_me:$LINENO: checking X11 version 5 with Xaw" >&5
98418dba
CW
10135echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6
10136 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
10137 echo $ECHO_N "(cached) $ECHO_C" >&6
10138else
10139 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10140/* confdefs.h. */
10141_ACEOF
10142cat confdefs.h >>conftest.$ac_ext
10143cat >>conftest.$ac_ext <<_ACEOF
10144/* end confdefs.h. */
98418dba
CW
10145
10146#include <X11/Intrinsic.h>
10147#include <X11/Xaw/Simple.h>
98418dba
CW
10148int
10149main ()
10150{
10151
10152 ;
10153 return 0;
10154}
10155_ACEOF
10156rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10157if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10158 (eval $ac_link) 2>conftest.er1
98418dba 10159 ac_status=$?
35996d22
AS
10160 grep -v '^ *+' conftest.er1 >conftest.err
10161 rm -f conftest.er1
10162 cat conftest.err >&5
c0d27fcc 10163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10164 (exit $ac_status); } &&
4494a266
JD
10165 { ac_try='test -z "$ac_c_werror_flag"
10166 || test ! -s conftest.err'
35996d22
AS
10167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10168 (eval $ac_try) 2>&5
10169 ac_status=$?
10170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10171 (exit $ac_status); }; } &&
10172 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10174 (eval $ac_try) 2>&5
10175 ac_status=$?
c0d27fcc 10176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10177 (exit $ac_status); }; }; then
10178 emacs_cv_x11_version_5_with_xaw=yes
10179else
10180 echo "$as_me: failed program was:" >&5
19650fd6
AS
10181sed 's/^/| /' conftest.$ac_ext >&5
10182
98418dba
CW
10183emacs_cv_x11_version_5_with_xaw=no
10184fi
35996d22
AS
10185rm -f conftest.err conftest.$ac_objext \
10186 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10187fi
10188
10189 if test $emacs_cv_x11_version_5_with_xaw = yes; then
c0d27fcc 10190 echo "$as_me:$LINENO: result: 5 or newer, with Xaw; use toolkit by default" >&5
98418dba
CW
10191echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6
10192 USE_X_TOOLKIT=LUCID
10193 else
c0d27fcc 10194 echo "$as_me:$LINENO: result: before 5 or no Xaw; do not use toolkit by default" >&5
98418dba
CW
10195echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6
10196 USE_X_TOOLKIT=none
10197 fi
10198 else
10199 USE_X_TOOLKIT=none
10200 fi
10201fi
10202
10203X_TOOLKIT_TYPE=$USE_X_TOOLKIT
10204
10205if test "${USE_X_TOOLKIT}" != "none"; then
c0d27fcc 10206 echo "$as_me:$LINENO: checking X11 toolkit version" >&5
98418dba
CW
10207echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6
10208 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
10209 echo $ECHO_N "(cached) $ECHO_C" >&6
10210else
10211 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10212/* confdefs.h. */
10213_ACEOF
10214cat confdefs.h >>conftest.$ac_ext
10215cat >>conftest.$ac_ext <<_ACEOF
10216/* end confdefs.h. */
98418dba 10217#include <X11/Intrinsic.h>
98418dba
CW
10218int
10219main ()
10220{
10221#if XtSpecificationRelease < 6
10222fail;
10223#endif
10224
10225 ;
10226 return 0;
10227}
10228_ACEOF
10229rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10230if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10231 (eval $ac_link) 2>conftest.er1
98418dba 10232 ac_status=$?
35996d22
AS
10233 grep -v '^ *+' conftest.er1 >conftest.err
10234 rm -f conftest.er1
10235 cat conftest.err >&5
c0d27fcc 10236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10237 (exit $ac_status); } &&
4494a266
JD
10238 { ac_try='test -z "$ac_c_werror_flag"
10239 || test ! -s conftest.err'
35996d22
AS
10240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10241 (eval $ac_try) 2>&5
10242 ac_status=$?
10243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10244 (exit $ac_status); }; } &&
10245 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10247 (eval $ac_try) 2>&5
10248 ac_status=$?
c0d27fcc 10249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10250 (exit $ac_status); }; }; then
10251 emacs_cv_x11_toolkit_version_6=yes
10252else
10253 echo "$as_me: failed program was:" >&5
19650fd6
AS
10254sed 's/^/| /' conftest.$ac_ext >&5
10255
98418dba
CW
10256emacs_cv_x11_toolkit_version_6=no
10257fi
35996d22
AS
10258rm -f conftest.err conftest.$ac_objext \
10259 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10260fi
10261
10262 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
10263 if test $emacs_cv_x11_toolkit_version_6 = yes; then
c0d27fcc 10264 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 10265echo "${ECHO_T}6 or newer" >&6
b936fae4 10266
c0d27fcc 10267cat >>confdefs.h <<\_ACEOF
98418dba 10268#define HAVE_X11XTR6 1
c0d27fcc 10269_ACEOF
98418dba
CW
10270
10271 else
c0d27fcc 10272 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
10273echo "${ECHO_T}before 6" >&6
10274 fi
10275
10276 OLDLIBS="$LIBS"
10277 if test x$HAVE_X11XTR6 = xyes; then
10278 LIBS="-lXt -lSM -lICE $LIBS"
10279 else
10280 LIBS="-lXt $LIBS"
10281 fi
10282
c0d27fcc 10283echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
98418dba
CW
10284echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6
10285if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
10286 echo $ECHO_N "(cached) $ECHO_C" >&6
10287else
10288 ac_check_lib_save_LIBS=$LIBS
10289LIBS="-lXmu $LIBS"
10290cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10291/* confdefs.h. */
10292_ACEOF
10293cat confdefs.h >>conftest.$ac_ext
10294cat >>conftest.$ac_ext <<_ACEOF
10295/* end confdefs.h. */
98418dba
CW
10296
10297/* Override any gcc2 internal prototype to avoid an error. */
10298#ifdef __cplusplus
10299extern "C"
10300#endif
10301/* We use char because int might match the return type of a gcc2
10302 builtin and then its argument prototype would still apply. */
10303char XmuConvertStandardSelection ();
98418dba
CW
10304int
10305main ()
10306{
10307XmuConvertStandardSelection ();
10308 ;
10309 return 0;
10310}
10311_ACEOF
10312rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10313if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10314 (eval $ac_link) 2>conftest.er1
98418dba 10315 ac_status=$?
35996d22
AS
10316 grep -v '^ *+' conftest.er1 >conftest.err
10317 rm -f conftest.er1
10318 cat conftest.err >&5
c0d27fcc 10319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10320 (exit $ac_status); } &&
4494a266
JD
10321 { ac_try='test -z "$ac_c_werror_flag"
10322 || test ! -s conftest.err'
35996d22
AS
10323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10324 (eval $ac_try) 2>&5
10325 ac_status=$?
10326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10327 (exit $ac_status); }; } &&
10328 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10330 (eval $ac_try) 2>&5
10331 ac_status=$?
c0d27fcc 10332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10333 (exit $ac_status); }; }; then
10334 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
10335else
10336 echo "$as_me: failed program was:" >&5
19650fd6
AS
10337sed 's/^/| /' conftest.$ac_ext >&5
10338
98418dba
CW
10339ac_cv_lib_Xmu_XmuConvertStandardSelection=no
10340fi
35996d22
AS
10341rm -f conftest.err conftest.$ac_objext \
10342 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10343LIBS=$ac_check_lib_save_LIBS
10344fi
c0d27fcc 10345echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
98418dba
CW
10346echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6
10347if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 10348 cat >>confdefs.h <<_ACEOF
98418dba 10349#define HAVE_LIBXMU 1
c0d27fcc 10350_ACEOF
98418dba
CW
10351
10352 LIBS="-lXmu $LIBS"
10353
10354fi
10355
10356 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
10357fi
10358
10359# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
10360if test "${HAVE_X11}" = "yes"; then
10361 if test "${USE_X_TOOLKIT}" != "none"; then
10362
c0d27fcc 10363echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
98418dba
CW
10364echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6
10365if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
10366 echo $ECHO_N "(cached) $ECHO_C" >&6
10367else
10368 ac_check_lib_save_LIBS=$LIBS
10369LIBS="-lXext $LIBS"
10370cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10371/* confdefs.h. */
10372_ACEOF
10373cat confdefs.h >>conftest.$ac_ext
10374cat >>conftest.$ac_ext <<_ACEOF
10375/* end confdefs.h. */
98418dba
CW
10376
10377/* Override any gcc2 internal prototype to avoid an error. */
10378#ifdef __cplusplus
10379extern "C"
10380#endif
10381/* We use char because int might match the return type of a gcc2
10382 builtin and then its argument prototype would still apply. */
10383char XShapeQueryExtension ();
98418dba
CW
10384int
10385main ()
10386{
10387XShapeQueryExtension ();
10388 ;
10389 return 0;
10390}
10391_ACEOF
10392rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10393if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10394 (eval $ac_link) 2>conftest.er1
98418dba 10395 ac_status=$?
35996d22
AS
10396 grep -v '^ *+' conftest.er1 >conftest.err
10397 rm -f conftest.er1
10398 cat conftest.err >&5
c0d27fcc 10399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10400 (exit $ac_status); } &&
4494a266
JD
10401 { ac_try='test -z "$ac_c_werror_flag"
10402 || test ! -s conftest.err'
35996d22
AS
10403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10404 (eval $ac_try) 2>&5
10405 ac_status=$?
10406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10407 (exit $ac_status); }; } &&
10408 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10410 (eval $ac_try) 2>&5
10411 ac_status=$?
c0d27fcc 10412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10413 (exit $ac_status); }; }; then
10414 ac_cv_lib_Xext_XShapeQueryExtension=yes
10415else
10416 echo "$as_me: failed program was:" >&5
19650fd6
AS
10417sed 's/^/| /' conftest.$ac_ext >&5
10418
98418dba
CW
10419ac_cv_lib_Xext_XShapeQueryExtension=no
10420fi
35996d22
AS
10421rm -f conftest.err conftest.$ac_objext \
10422 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10423LIBS=$ac_check_lib_save_LIBS
10424fi
c0d27fcc 10425echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
98418dba
CW
10426echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6
10427if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 10428 cat >>confdefs.h <<_ACEOF
98418dba 10429#define HAVE_LIBXEXT 1
c0d27fcc 10430_ACEOF
98418dba
CW
10431
10432 LIBS="-lXext $LIBS"
10433
10434fi
10435
10436 fi
10437fi
10438
10439if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 10440 echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
8e967cf7
MR
10441echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6
10442if test "${emacs_cv_lesstif+set}" = set; then
10443 echo $ECHO_N "(cached) $ECHO_C" >&6
10444else
ae1a998c
RS
10445 # We put this in CFLAGS temporarily to precede other -I options
10446 # that might be in CFLAGS temporarily.
10447 # We put this in CPPFLAGS where it precedes the other -I options.
10448 OLD_CPPFLAGS=$CPPFLAGS
10449 OLD_CFLAGS=$CFLAGS
10450 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
10451 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
8e967cf7 10452 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10453/* confdefs.h. */
10454_ACEOF
10455cat confdefs.h >>conftest.$ac_ext
10456cat >>conftest.$ac_ext <<_ACEOF
10457/* end confdefs.h. */
8e967cf7
MR
10458#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
10459int
10460main ()
10461{
10462int x = 5;
10463 ;
10464 return 0;
10465}
10466_ACEOF
10467rm -f conftest.$ac_objext
c0d27fcc 10468if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 10469 (eval $ac_compile) 2>conftest.er1
8e967cf7 10470 ac_status=$?
35996d22
AS
10471 grep -v '^ *+' conftest.er1 >conftest.err
10472 rm -f conftest.er1
10473 cat conftest.err >&5
c0d27fcc 10474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8e967cf7 10475 (exit $ac_status); } &&
4494a266
JD
10476 { ac_try='test -z "$ac_c_werror_flag"
10477 || test ! -s conftest.err'
35996d22
AS
10478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10479 (eval $ac_try) 2>&5
10480 ac_status=$?
10481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10482 (exit $ac_status); }; } &&
10483 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 10484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8e967cf7
MR
10485 (eval $ac_try) 2>&5
10486 ac_status=$?
c0d27fcc 10487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8e967cf7
MR
10488 (exit $ac_status); }; }; then
10489 emacs_cv_lesstif=yes
10490else
10491 echo "$as_me: failed program was:" >&5
19650fd6
AS
10492sed 's/^/| /' conftest.$ac_ext >&5
10493
8e967cf7
MR
10494emacs_cv_lesstif=no
10495fi
35996d22 10496rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8e967cf7 10497fi
c0d27fcc 10498echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
8e967cf7
MR
10499echo "${ECHO_T}$emacs_cv_lesstif" >&6
10500 if test $emacs_cv_lesstif = yes; then
ae1a998c
RS
10501 # Make sure this -I option remains in CPPFLAGS after it is set
10502 # back to REAL_CPPFLAGS.
10503 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
10504 # have those other -I options anyway. Ultimately, having this
10505 # directory ultimately in CPPFLAGS will be enough.
10506 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
8e967cf7 10507 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
ae1a998c
RS
10508 else
10509 CFLAGS=$OLD_CFLAGS
10510 CPPFLAGS=$OLD_CPPFLAGS
8e967cf7 10511 fi
c0d27fcc 10512 echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
98418dba
CW
10513echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6
10514if test "${emacs_cv_motif_version_2_1+set}" = set; then
10515 echo $ECHO_N "(cached) $ECHO_C" >&6
10516else
10517 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10518/* confdefs.h. */
10519_ACEOF
10520cat confdefs.h >>conftest.$ac_ext
10521cat >>conftest.$ac_ext <<_ACEOF
10522/* end confdefs.h. */
98418dba 10523#include <Xm/Xm.h>
98418dba
CW
10524int
10525main ()
10526{
10527#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
10528int x = 5;
10529#else
10530Motif version prior to 2.1.
10531#endif
10532 ;
10533 return 0;
10534}
10535_ACEOF
10536rm -f conftest.$ac_objext
c0d27fcc 10537if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 10538 (eval $ac_compile) 2>conftest.er1
98418dba 10539 ac_status=$?
35996d22
AS
10540 grep -v '^ *+' conftest.er1 >conftest.err
10541 rm -f conftest.er1
10542 cat conftest.err >&5
c0d27fcc 10543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10544 (exit $ac_status); } &&
4494a266
JD
10545 { ac_try='test -z "$ac_c_werror_flag"
10546 || test ! -s conftest.err'
35996d22
AS
10547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10548 (eval $ac_try) 2>&5
10549 ac_status=$?
10550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10551 (exit $ac_status); }; } &&
10552 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 10553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10554 (eval $ac_try) 2>&5
10555 ac_status=$?
c0d27fcc 10556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10557 (exit $ac_status); }; }; then
10558 emacs_cv_motif_version_2_1=yes
10559else
10560 echo "$as_me: failed program was:" >&5
19650fd6
AS
10561sed 's/^/| /' conftest.$ac_ext >&5
10562
98418dba
CW
10563emacs_cv_motif_version_2_1=no
10564fi
35996d22 10565rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 10566fi
c0d27fcc 10567echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
98418dba
CW
10568echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6
10569 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
10570 if test $emacs_cv_motif_version_2_1 = yes; then
10571 HAVE_LIBXP=no
b936fae4 10572
c0d27fcc 10573cat >>confdefs.h <<\_ACEOF
98418dba 10574#define HAVE_MOTIF_2_1 1
c0d27fcc 10575_ACEOF
98418dba 10576
c0d27fcc 10577 echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
98418dba
CW
10578echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6
10579if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
10580 echo $ECHO_N "(cached) $ECHO_C" >&6
10581else
10582 ac_check_lib_save_LIBS=$LIBS
10583LIBS="-lXp $LIBS"
10584cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10585/* confdefs.h. */
10586_ACEOF
10587cat confdefs.h >>conftest.$ac_ext
10588cat >>conftest.$ac_ext <<_ACEOF
10589/* end confdefs.h. */
98418dba
CW
10590
10591/* Override any gcc2 internal prototype to avoid an error. */
10592#ifdef __cplusplus
10593extern "C"
10594#endif
10595/* We use char because int might match the return type of a gcc2
10596 builtin and then its argument prototype would still apply. */
10597char XpCreateContext ();
98418dba
CW
10598int
10599main ()
10600{
10601XpCreateContext ();
10602 ;
10603 return 0;
10604}
10605_ACEOF
10606rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10607if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10608 (eval $ac_link) 2>conftest.er1
98418dba 10609 ac_status=$?
35996d22
AS
10610 grep -v '^ *+' conftest.er1 >conftest.err
10611 rm -f conftest.er1
10612 cat conftest.err >&5
c0d27fcc 10613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10614 (exit $ac_status); } &&
4494a266
JD
10615 { ac_try='test -z "$ac_c_werror_flag"
10616 || test ! -s conftest.err'
35996d22
AS
10617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10618 (eval $ac_try) 2>&5
10619 ac_status=$?
10620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10621 (exit $ac_status); }; } &&
10622 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10624 (eval $ac_try) 2>&5
10625 ac_status=$?
c0d27fcc 10626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10627 (exit $ac_status); }; }; then
10628 ac_cv_lib_Xp_XpCreateContext=yes
10629else
10630 echo "$as_me: failed program was:" >&5
19650fd6
AS
10631sed 's/^/| /' conftest.$ac_ext >&5
10632
98418dba
CW
10633ac_cv_lib_Xp_XpCreateContext=no
10634fi
35996d22
AS
10635rm -f conftest.err conftest.$ac_objext \
10636 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10637LIBS=$ac_check_lib_save_LIBS
10638fi
c0d27fcc 10639echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
98418dba
CW
10640echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6
10641if test $ac_cv_lib_Xp_XpCreateContext = yes; then
10642 HAVE_LIBXP=yes
10643fi
503d2be0 10644
98418dba 10645 if test ${HAVE_LIBXP} = yes; then
b936fae4 10646
c0d27fcc 10647cat >>confdefs.h <<\_ACEOF
98418dba 10648#define HAVE_LIBXP 1
c0d27fcc 10649_ACEOF
503d2be0 10650
98418dba
CW
10651 fi
10652 fi
10653fi
10654
10655### Is -lXaw3d available?
10656HAVE_XAW3D=no
10657if test "${HAVE_X11}" = "yes"; then
10658 if test "${USE_X_TOOLKIT}" != "none"; then
22044edf 10659 echo "$as_me:$LINENO: checking for X11/Xaw3d/Scrollbar.h" >&5
98418dba
CW
10660echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6
10661if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
10662 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 10663else
22044edf 10664 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10665/* confdefs.h. */
10666_ACEOF
10667cat confdefs.h >>conftest.$ac_ext
10668cat >>conftest.$ac_ext <<_ACEOF
10669/* end confdefs.h. */
98418dba 10670#include <X11/Xaw3d/Scrollbar.h>
503d2be0 10671_ACEOF
c0d27fcc 10672if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
10673 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10674 ac_status=$?
6bae0ccf 10675 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
10676 rm -f conftest.er1
10677 cat conftest.err >&5
c0d27fcc 10678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10679 (exit $ac_status); } >/dev/null; then
10680 if test -s conftest.err; then
10681 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 10682 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
10683 else
10684 ac_cpp_err=
10685 fi
10686else
10687 ac_cpp_err=yes
10688fi
10689if test -z "$ac_cpp_err"; then
22044edf 10690 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 10691else
503d2be0 10692 echo "$as_me: failed program was:" >&5
19650fd6
AS
10693sed 's/^/| /' conftest.$ac_ext >&5
10694
22044edf 10695 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 10696fi
503d2be0 10697rm -f conftest.err conftest.$ac_ext
98418dba 10698fi
c0d27fcc 10699echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
98418dba 10700echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6
98418dba 10701if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
c0d27fcc 10702 echo "$as_me:$LINENO: checking for XawScrollbarSetThumb in -lXaw3d" >&5
98418dba
CW
10703echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6
10704if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
10705 echo $ECHO_N "(cached) $ECHO_C" >&6
10706else
10707 ac_check_lib_save_LIBS=$LIBS
10708LIBS="-lXaw3d $LIBS"
10709cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10710/* confdefs.h. */
10711_ACEOF
10712cat confdefs.h >>conftest.$ac_ext
10713cat >>conftest.$ac_ext <<_ACEOF
10714/* end confdefs.h. */
98418dba
CW
10715
10716/* Override any gcc2 internal prototype to avoid an error. */
10717#ifdef __cplusplus
10718extern "C"
10719#endif
10720/* We use char because int might match the return type of a gcc2
10721 builtin and then its argument prototype would still apply. */
10722char XawScrollbarSetThumb ();
503d2be0
AS
10723int
10724main ()
10725{
98418dba 10726XawScrollbarSetThumb ();
503d2be0
AS
10727 ;
10728 return 0;
10729}
10730_ACEOF
10731rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10732if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10733 (eval $ac_link) 2>conftest.er1
503d2be0 10734 ac_status=$?
35996d22
AS
10735 grep -v '^ *+' conftest.er1 >conftest.err
10736 rm -f conftest.er1
10737 cat conftest.err >&5
c0d27fcc 10738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10739 (exit $ac_status); } &&
4494a266
JD
10740 { ac_try='test -z "$ac_c_werror_flag"
10741 || test ! -s conftest.err'
35996d22
AS
10742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10743 (eval $ac_try) 2>&5
10744 ac_status=$?
10745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10746 (exit $ac_status); }; } &&
10747 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10749 (eval $ac_try) 2>&5
10750 ac_status=$?
c0d27fcc 10751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10752 (exit $ac_status); }; }; then
98418dba 10753 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
ba4481b5 10754else
503d2be0 10755 echo "$as_me: failed program was:" >&5
19650fd6
AS
10756sed 's/^/| /' conftest.$ac_ext >&5
10757
98418dba 10758ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
ba4481b5 10759fi
35996d22
AS
10760rm -f conftest.err conftest.$ac_objext \
10761 conftest$ac_exeext conftest.$ac_ext
98418dba 10762LIBS=$ac_check_lib_save_LIBS
ba4481b5 10763fi
c0d27fcc 10764echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
98418dba
CW
10765echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6
10766if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
10767 HAVE_XAW3D=yes
ba4481b5 10768fi
503d2be0 10769
ba4481b5
DL
10770fi
10771
c0d27fcc 10772
98418dba 10773 if test "${HAVE_XAW3D}" = "yes"; then
b936fae4 10774
c0d27fcc 10775cat >>confdefs.h <<\_ACEOF
98418dba 10776#define HAVE_XAW3D 1
c0d27fcc 10777_ACEOF
98418dba 10778
ba4481b5 10779 fi
98418dba 10780 fi
ba4481b5
DL
10781fi
10782
c0d27fcc
MR
10783
10784
98418dba
CW
10785USE_TOOLKIT_SCROLL_BARS=no
10786if test "${with_toolkit_scroll_bars}" != "no"; then
10787 if test "${USE_X_TOOLKIT}" != "none"; then
10788 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 10789 cat >>confdefs.h <<\_ACEOF
98418dba 10790#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 10791_ACEOF
98418dba
CW
10792
10793 HAVE_XAW3D=no
10794 USE_TOOLKIT_SCROLL_BARS=yes
10795 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 10796 cat >>confdefs.h <<\_ACEOF
98418dba 10797#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 10798_ACEOF
98418dba
CW
10799
10800 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 10801 fi
488dd4c4
JD
10802 elif test "${HAVE_GTK}" = "yes"; then
10803 cat >>confdefs.h <<\_ACEOF
10804#define USE_TOOLKIT_SCROLL_BARS 1
10805_ACEOF
10806
10807 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
10808 fi
10809fi
10810
abd39b57 10811cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
10812/* confdefs.h. */
10813_ACEOF
10814cat confdefs.h >>conftest.$ac_ext
10815cat >>conftest.$ac_ext <<_ACEOF
10816/* end confdefs.h. */
10817
10818 #include <X11/Xlib.h>
10819 #include <X11/Xresource.h>
10820int
10821main ()
10822{
10823XIMProc callback;
10824 ;
10825 return 0;
10826}
10827_ACEOF
10828rm -f conftest.$ac_objext
10829if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 10830 (eval $ac_compile) 2>conftest.er1
abd39b57 10831 ac_status=$?
35996d22
AS
10832 grep -v '^ *+' conftest.er1 >conftest.err
10833 rm -f conftest.er1
10834 cat conftest.err >&5
abd39b57
AC
10835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10836 (exit $ac_status); } &&
4494a266
JD
10837 { ac_try='test -z "$ac_c_werror_flag"
10838 || test ! -s conftest.err'
35996d22
AS
10839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10840 (eval $ac_try) 2>&5
10841 ac_status=$?
10842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10843 (exit $ac_status); }; } &&
10844 { ac_try='test -s conftest.$ac_objext'
abd39b57
AC
10845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10846 (eval $ac_try) 2>&5
10847 ac_status=$?
10848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10849 (exit $ac_status); }; }; then
10850 HAVE_XIM=yes
10851
10852cat >>confdefs.h <<\_ACEOF
10853#define HAVE_XIM 1
10854_ACEOF
10855
10856else
10857 echo "$as_me: failed program was:" >&5
10858sed 's/^/| /' conftest.$ac_ext >&5
10859
10860HAVE_XIM=no
10861fi
35996d22 10862rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 10863
c0d27fcc 10864
98418dba 10865if test "${with_xim}" != "no"; then
b936fae4 10866
c0d27fcc 10867cat >>confdefs.h <<\_ACEOF
98418dba 10868#define USE_XIM 1
c0d27fcc 10869_ACEOF
98418dba 10870
793fa0d7 10871fi
abd39b57
AC
10872
10873
10874if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
10875 late_CFLAGS=$CFLAGS
10876 if test "$GCC" = yes; then
10877 CFLAGS="$CFLAGS --pedantic-errors"
10878 fi
cffcede7 10879 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10880/* confdefs.h. */
10881_ACEOF
10882cat confdefs.h >>conftest.$ac_ext
10883cat >>conftest.$ac_ext <<_ACEOF
10884/* end confdefs.h. */
cffcede7
JD
10885
10886#include <X11/Xlib.h>
10887#include <X11/Xresource.h>
10888int
10889main ()
10890{
10891Display *display;
10892XrmDatabase db;
10893char *res_name;
10894char *res_class;
10895XIMProc callback;
10896XPointer *client_data;
849d80cf
DL
10897#ifndef __GNUC__
10898/* If we're not using GCC, it's probably not XFree86, and this is
10899 probably right, but we can't use something like --pedantic-errors. */
10900extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
10901 char*, XIMProc, XPointer*);
10902#endif
cffcede7
JD
10903(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
10904 client_data);
10905 ;
10906 return 0;
10907}
10908_ACEOF
10909rm -f conftest.$ac_objext
10910if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 10911 (eval $ac_compile) 2>conftest.er1
cffcede7 10912 ac_status=$?
35996d22
AS
10913 grep -v '^ *+' conftest.er1 >conftest.err
10914 rm -f conftest.er1
10915 cat conftest.err >&5
cffcede7
JD
10916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10917 (exit $ac_status); } &&
4494a266
JD
10918 { ac_try='test -z "$ac_c_werror_flag"
10919 || test ! -s conftest.err'
35996d22
AS
10920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10921 (eval $ac_try) 2>&5
10922 ac_status=$?
10923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10924 (exit $ac_status); }; } &&
10925 { ac_try='test -s conftest.$ac_objext'
cffcede7
JD
10926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10927 (eval $ac_try) 2>&5
10928 ac_status=$?
10929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10930 (exit $ac_status); }; }; then
10931 emacs_cv_arg6_star=yes
10932else
10933 echo "$as_me: failed program was:" >&5
19650fd6
AS
10934sed 's/^/| /' conftest.$ac_ext >&5
10935
cffcede7 10936fi
35996d22 10937rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
10938
10939 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 10940 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
10941#define XRegisterIMInstantiateCallback_arg6 XPointer*
10942_ACEOF
10943
10944 else
f57bd967 10945 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
10946#define XRegisterIMInstantiateCallback_arg6 XPointer
10947_ACEOF
10948
10949 fi
849d80cf 10950 CFLAGS=$late_CFLAGS
98418dba
CW
10951fi
10952
10953### Use -lXpm if available, unless `--with-xpm=no'.
10954HAVE_XPM=no
10955if test "${HAVE_X11}" = "yes"; then
10956 if test "${with_xpm}" != "no"; then
c0d27fcc
MR
10957 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
10958 echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
98418dba
CW
10959echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
10960if test "${ac_cv_header_X11_xpm_h+set}" = set; then
10961 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
10962fi
10963echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
10964echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
98418dba 10965else
c0d27fcc
MR
10966 # Is the header compilable?
10967echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
10968echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6
10969cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10970/* confdefs.h. */
10971_ACEOF
10972cat confdefs.h >>conftest.$ac_ext
10973cat >>conftest.$ac_ext <<_ACEOF
10974/* end confdefs.h. */
c0d27fcc
MR
10975$ac_includes_default
10976#include <X11/xpm.h>
10977_ACEOF
10978rm -f conftest.$ac_objext
10979if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 10980 (eval $ac_compile) 2>conftest.er1
c0d27fcc 10981 ac_status=$?
35996d22
AS
10982 grep -v '^ *+' conftest.er1 >conftest.err
10983 rm -f conftest.er1
10984 cat conftest.err >&5
c0d27fcc
MR
10985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10986 (exit $ac_status); } &&
4494a266
JD
10987 { ac_try='test -z "$ac_c_werror_flag"
10988 || test ! -s conftest.err'
35996d22
AS
10989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10990 (eval $ac_try) 2>&5
10991 ac_status=$?
10992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10993 (exit $ac_status); }; } &&
10994 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
10995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10996 (eval $ac_try) 2>&5
10997 ac_status=$?
10998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10999 (exit $ac_status); }; }; then
11000 ac_header_compiler=yes
11001else
11002 echo "$as_me: failed program was:" >&5
19650fd6
AS
11003sed 's/^/| /' conftest.$ac_ext >&5
11004
c0d27fcc
MR
11005ac_header_compiler=no
11006fi
35996d22 11007rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11008echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11009echo "${ECHO_T}$ac_header_compiler" >&6
11010
11011# Is the header present?
11012echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
11013echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6
11014cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11015/* confdefs.h. */
11016_ACEOF
11017cat confdefs.h >>conftest.$ac_ext
11018cat >>conftest.$ac_ext <<_ACEOF
11019/* end confdefs.h. */
98418dba
CW
11020#include <X11/xpm.h>
11021_ACEOF
c0d27fcc 11022if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
11023 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11024 ac_status=$?
6bae0ccf 11025 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11026 rm -f conftest.er1
11027 cat conftest.err >&5
c0d27fcc 11028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11029 (exit $ac_status); } >/dev/null; then
11030 if test -s conftest.err; then
11031 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 11032 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
11033 else
11034 ac_cpp_err=
11035 fi
11036else
11037 ac_cpp_err=yes
11038fi
11039if test -z "$ac_cpp_err"; then
c0d27fcc 11040 ac_header_preproc=yes
98418dba
CW
11041else
11042 echo "$as_me: failed program was:" >&5
19650fd6
AS
11043sed 's/^/| /' conftest.$ac_ext >&5
11044
c0d27fcc 11045 ac_header_preproc=no
98418dba
CW
11046fi
11047rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11048echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11049echo "${ECHO_T}$ac_header_preproc" >&6
11050
11051# So? What about this header?
35996d22
AS
11052case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11053 yes:no: )
c0d27fcc
MR
11054 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
11055echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
11056 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
11057echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
11058 ac_header_preproc=yes
19650fd6 11059 ;;
35996d22 11060 no:yes:* )
c0d27fcc
MR
11061 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
11062echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
35996d22
AS
11063 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
11064echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
11065 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
11066echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
11067 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
11068echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 11069 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
19650fd6 11070echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
11071 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
11072echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
11073 (
11074 cat <<\_ASBOX
35996d22
AS
11075## ------------------------------------------ ##
11076## Report this to the AC_PACKAGE_NAME lists. ##
11077## ------------------------------------------ ##
19650fd6
AS
11078_ASBOX
11079 ) |
11080 sed "s/^/$as_me: WARNING: /" >&2
11081 ;;
c0d27fcc
MR
11082esac
11083echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
11084echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
11085if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11086 echo $ECHO_N "(cached) $ECHO_C" >&6
11087else
11088 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 11089fi
c0d27fcc 11090echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
98418dba 11091echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
c0d27fcc
MR
11092
11093fi
98418dba 11094if test $ac_cv_header_X11_xpm_h = yes; then
c0d27fcc 11095 echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
98418dba
CW
11096echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6
11097if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 11098 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11099else
98418dba
CW
11100 ac_check_lib_save_LIBS=$LIBS
11101LIBS="-lXpm -lX11 $LIBS"
11102cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11103/* confdefs.h. */
11104_ACEOF
11105cat confdefs.h >>conftest.$ac_ext
11106cat >>conftest.$ac_ext <<_ACEOF
11107/* end confdefs.h. */
98418dba 11108
ba4481b5 11109/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11110#ifdef __cplusplus
11111extern "C"
11112#endif
ba4481b5 11113/* We use char because int might match the return type of a gcc2
503d2be0 11114 builtin and then its argument prototype would still apply. */
98418dba 11115char XpmReadFileToPixmap ();
503d2be0
AS
11116int
11117main ()
11118{
98418dba 11119XpmReadFileToPixmap ();
503d2be0
AS
11120 ;
11121 return 0;
11122}
11123_ACEOF
11124rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11125if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 11126 (eval $ac_link) 2>conftest.er1
503d2be0 11127 ac_status=$?
35996d22
AS
11128 grep -v '^ *+' conftest.er1 >conftest.err
11129 rm -f conftest.er1
11130 cat conftest.err >&5
c0d27fcc 11131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11132 (exit $ac_status); } &&
4494a266
JD
11133 { ac_try='test -z "$ac_c_werror_flag"
11134 || test ! -s conftest.err'
35996d22
AS
11135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11136 (eval $ac_try) 2>&5
11137 ac_status=$?
11138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11139 (exit $ac_status); }; } &&
11140 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11142 (eval $ac_try) 2>&5
11143 ac_status=$?
c0d27fcc 11144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11145 (exit $ac_status); }; }; then
98418dba 11146 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
11147else
11148 echo "$as_me: failed program was:" >&5
19650fd6
AS
11149sed 's/^/| /' conftest.$ac_ext >&5
11150
98418dba 11151ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 11152fi
35996d22
AS
11153rm -f conftest.err conftest.$ac_objext \
11154 conftest$ac_exeext conftest.$ac_ext
98418dba 11155LIBS=$ac_check_lib_save_LIBS
503d2be0 11156fi
c0d27fcc 11157echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
98418dba
CW
11158echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6
11159if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
11160 HAVE_XPM=yes
ba4481b5
DL
11161fi
11162
98418dba
CW
11163fi
11164
c0d27fcc 11165
98418dba 11166 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 11167 echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
98418dba
CW
11168echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6
11169 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11170/* confdefs.h. */
11171_ACEOF
11172cat confdefs.h >>conftest.$ac_ext
11173cat >>conftest.$ac_ext <<_ACEOF
11174/* end confdefs.h. */
98418dba
CW
11175#include "X11/xpm.h"
11176#ifndef XpmReturnAllocPixels
11177no_return_alloc_pixels
503d2be0 11178#endif
ba4481b5 11179
98418dba
CW
11180_ACEOF
11181if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 11182 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
11183 HAVE_XPM=no
11184else
11185 HAVE_XPM=yes
11186fi
11187rm -f conftest*
ba4481b5 11188
c0d27fcc 11189
98418dba 11190 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 11191 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
11192echo "${ECHO_T}yes" >&6
11193 else
c0d27fcc 11194 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
11195echo "${ECHO_T}no" >&6
11196 fi
11197 fi
11198 fi
11199
11200 if test "${HAVE_XPM}" = "yes"; then
b936fae4 11201
c0d27fcc 11202cat >>confdefs.h <<\_ACEOF
98418dba 11203#define HAVE_XPM 1
c0d27fcc 11204_ACEOF
98418dba
CW
11205
11206 fi
11207fi
11208
11209### Use -ljpeg if available, unless `--with-jpeg=no'.
11210HAVE_JPEG=no
11211if test "${HAVE_X11}" = "yes"; then
11212 if test "${with_jpeg}" != "no"; then
c0d27fcc
MR
11213 if test "${ac_cv_header_jerror_h+set}" = set; then
11214 echo "$as_me:$LINENO: checking for jerror.h" >&5
98418dba
CW
11215echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
11216if test "${ac_cv_header_jerror_h+set}" = set; then
11217 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11218fi
11219echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
11220echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
503d2be0 11221else
c0d27fcc
MR
11222 # Is the header compilable?
11223echo "$as_me:$LINENO: checking jerror.h usability" >&5
11224echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6
11225cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11226/* confdefs.h. */
11227_ACEOF
11228cat confdefs.h >>conftest.$ac_ext
11229cat >>conftest.$ac_ext <<_ACEOF
11230/* end confdefs.h. */
c0d27fcc
MR
11231$ac_includes_default
11232#include <jerror.h>
11233_ACEOF
11234rm -f conftest.$ac_objext
11235if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11236 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11237 ac_status=$?
35996d22
AS
11238 grep -v '^ *+' conftest.er1 >conftest.err
11239 rm -f conftest.er1
11240 cat conftest.err >&5
c0d27fcc
MR
11241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11242 (exit $ac_status); } &&
4494a266
JD
11243 { ac_try='test -z "$ac_c_werror_flag"
11244 || test ! -s conftest.err'
35996d22
AS
11245 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11246 (eval $ac_try) 2>&5
11247 ac_status=$?
11248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11249 (exit $ac_status); }; } &&
11250 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11252 (eval $ac_try) 2>&5
11253 ac_status=$?
11254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11255 (exit $ac_status); }; }; then
11256 ac_header_compiler=yes
11257else
11258 echo "$as_me: failed program was:" >&5
19650fd6
AS
11259sed 's/^/| /' conftest.$ac_ext >&5
11260
c0d27fcc
MR
11261ac_header_compiler=no
11262fi
35996d22 11263rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11264echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11265echo "${ECHO_T}$ac_header_compiler" >&6
11266
11267# Is the header present?
11268echo "$as_me:$LINENO: checking jerror.h presence" >&5
11269echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6
11270cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11271/* confdefs.h. */
11272_ACEOF
11273cat confdefs.h >>conftest.$ac_ext
11274cat >>conftest.$ac_ext <<_ACEOF
11275/* end confdefs.h. */
98418dba
CW
11276#include <jerror.h>
11277_ACEOF
c0d27fcc 11278if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
11279 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11280 ac_status=$?
6bae0ccf 11281 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11282 rm -f conftest.er1
11283 cat conftest.err >&5
c0d27fcc 11284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11285 (exit $ac_status); } >/dev/null; then
11286 if test -s conftest.err; then
11287 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 11288 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
11289 else
11290 ac_cpp_err=
11291 fi
11292else
11293 ac_cpp_err=yes
503d2be0 11294fi
98418dba 11295if test -z "$ac_cpp_err"; then
c0d27fcc 11296 ac_header_preproc=yes
ba4481b5 11297else
98418dba 11298 echo "$as_me: failed program was:" >&5
19650fd6
AS
11299sed 's/^/| /' conftest.$ac_ext >&5
11300
c0d27fcc 11301 ac_header_preproc=no
98418dba
CW
11302fi
11303rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11304echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11305echo "${ECHO_T}$ac_header_preproc" >&6
11306
11307# So? What about this header?
35996d22
AS
11308case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11309 yes:no: )
c0d27fcc
MR
11310 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
11311echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
11312 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
11313echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
11314 ac_header_preproc=yes
19650fd6 11315 ;;
35996d22 11316 no:yes:* )
c0d27fcc
MR
11317 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
11318echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
35996d22
AS
11319 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
11320echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
11321 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
11322echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
11323 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
11324echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 11325 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 11326echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
11327 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
11328echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
11329 (
11330 cat <<\_ASBOX
35996d22
AS
11331## ------------------------------------------ ##
11332## Report this to the AC_PACKAGE_NAME lists. ##
11333## ------------------------------------------ ##
19650fd6
AS
11334_ASBOX
11335 ) |
11336 sed "s/^/$as_me: WARNING: /" >&2
11337 ;;
c0d27fcc
MR
11338esac
11339echo "$as_me:$LINENO: checking for jerror.h" >&5
11340echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
11341if test "${ac_cv_header_jerror_h+set}" = set; then
11342 echo $ECHO_N "(cached) $ECHO_C" >&6
11343else
11344 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 11345fi
c0d27fcc 11346echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
98418dba 11347echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
c0d27fcc
MR
11348
11349fi
98418dba 11350if test $ac_cv_header_jerror_h = yes; then
c0d27fcc 11351 echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
98418dba
CW
11352echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6
11353if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 11354 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11355else
98418dba
CW
11356 ac_check_lib_save_LIBS=$LIBS
11357LIBS="-ljpeg $LIBS"
11358cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11359/* confdefs.h. */
11360_ACEOF
11361cat confdefs.h >>conftest.$ac_ext
11362cat >>conftest.$ac_ext <<_ACEOF
11363/* end confdefs.h. */
98418dba
CW
11364
11365/* Override any gcc2 internal prototype to avoid an error. */
11366#ifdef __cplusplus
11367extern "C"
11368#endif
11369/* We use char because int might match the return type of a gcc2
11370 builtin and then its argument prototype would still apply. */
11371char jpeg_destroy_compress ();
503d2be0
AS
11372int
11373main ()
11374{
98418dba 11375jpeg_destroy_compress ();
503d2be0
AS
11376 ;
11377 return 0;
11378}
11379_ACEOF
11380rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11381if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 11382 (eval $ac_link) 2>conftest.er1
503d2be0 11383 ac_status=$?
35996d22
AS
11384 grep -v '^ *+' conftest.er1 >conftest.err
11385 rm -f conftest.er1
11386 cat conftest.err >&5
c0d27fcc 11387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11388 (exit $ac_status); } &&
4494a266
JD
11389 { ac_try='test -z "$ac_c_werror_flag"
11390 || test ! -s conftest.err'
35996d22
AS
11391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11392 (eval $ac_try) 2>&5
11393 ac_status=$?
11394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11395 (exit $ac_status); }; } &&
11396 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11398 (eval $ac_try) 2>&5
11399 ac_status=$?
c0d27fcc 11400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11401 (exit $ac_status); }; }; then
98418dba 11402 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 11403else
503d2be0 11404 echo "$as_me: failed program was:" >&5
19650fd6
AS
11405sed 's/^/| /' conftest.$ac_ext >&5
11406
98418dba 11407ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 11408fi
35996d22
AS
11409rm -f conftest.err conftest.$ac_objext \
11410 conftest$ac_exeext conftest.$ac_ext
98418dba 11411LIBS=$ac_check_lib_save_LIBS
ba4481b5 11412fi
c0d27fcc 11413echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
98418dba
CW
11414echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6
11415if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
11416 HAVE_JPEG=yes
ba4481b5 11417fi
98418dba 11418
ba4481b5 11419fi
98418dba 11420
c0d27fcc 11421
ba4481b5 11422 fi
ba4481b5 11423
c0d27fcc 11424
98418dba 11425 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 11426 cat >>confdefs.h <<\_ACEOF
98418dba 11427#define HAVE_JPEG 1
c0d27fcc 11428_ACEOF
98418dba
CW
11429
11430 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11431/* confdefs.h. */
11432_ACEOF
11433cat confdefs.h >>conftest.$ac_ext
11434cat >>conftest.$ac_ext <<_ACEOF
11435/* end confdefs.h. */
22044edf 11436#include <jpeglib.h>
98418dba
CW
11437 version=JPEG_LIB_VERSION
11438
11439_ACEOF
11440if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 11441 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 11442 cat >>confdefs.h <<\_ACEOF
98418dba 11443#define HAVE_JPEG 1
c0d27fcc 11444_ACEOF
ba4481b5 11445
98418dba 11446else
c0d27fcc 11447 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
11448echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
11449 HAVE_JPEG=no
ba4481b5 11450fi
98418dba 11451rm -f conftest*
ba4481b5 11452
98418dba
CW
11453 fi
11454fi
503d2be0 11455
98418dba
CW
11456### Use -lpng if available, unless `--with-png=no'.
11457HAVE_PNG=no
11458if test "${HAVE_X11}" = "yes"; then
11459 if test "${with_png}" != "no"; then
f57bd967
DL
11460 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
11461 # in /usr/include/libpng.
11462
11463
11464for ac_header in png.h libpng/png.h
11465do
11466as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11467if eval "test \"\${$as_ac_Header+set}\" = set"; then
11468 echo "$as_me:$LINENO: checking for $ac_header" >&5
11469echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11470if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 11471 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 11472fi
f57bd967
DL
11473echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11474echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
503d2be0 11475else
c0d27fcc 11476 # Is the header compilable?
f57bd967
DL
11477echo "$as_me:$LINENO: checking $ac_header usability" >&5
11478echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
c0d27fcc 11479cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11480/* confdefs.h. */
11481_ACEOF
11482cat confdefs.h >>conftest.$ac_ext
11483cat >>conftest.$ac_ext <<_ACEOF
11484/* end confdefs.h. */
c0d27fcc 11485$ac_includes_default
f57bd967 11486#include <$ac_header>
c0d27fcc
MR
11487_ACEOF
11488rm -f conftest.$ac_objext
11489if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11490 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11491 ac_status=$?
35996d22
AS
11492 grep -v '^ *+' conftest.er1 >conftest.err
11493 rm -f conftest.er1
11494 cat conftest.err >&5
c0d27fcc
MR
11495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11496 (exit $ac_status); } &&
4494a266
JD
11497 { ac_try='test -z "$ac_c_werror_flag"
11498 || test ! -s conftest.err'
35996d22
AS
11499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11500 (eval $ac_try) 2>&5
11501 ac_status=$?
11502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11503 (exit $ac_status); }; } &&
11504 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11506 (eval $ac_try) 2>&5
11507 ac_status=$?
11508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11509 (exit $ac_status); }; }; then
11510 ac_header_compiler=yes
11511else
11512 echo "$as_me: failed program was:" >&5
19650fd6
AS
11513sed 's/^/| /' conftest.$ac_ext >&5
11514
c0d27fcc
MR
11515ac_header_compiler=no
11516fi
35996d22 11517rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11518echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11519echo "${ECHO_T}$ac_header_compiler" >&6
11520
11521# Is the header present?
f57bd967
DL
11522echo "$as_me:$LINENO: checking $ac_header presence" >&5
11523echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
c0d27fcc 11524cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11525/* confdefs.h. */
11526_ACEOF
11527cat confdefs.h >>conftest.$ac_ext
11528cat >>conftest.$ac_ext <<_ACEOF
11529/* end confdefs.h. */
f57bd967 11530#include <$ac_header>
503d2be0 11531_ACEOF
c0d27fcc 11532if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11533 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11534 ac_status=$?
6bae0ccf 11535 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
11536 rm -f conftest.er1
11537 cat conftest.err >&5
c0d27fcc 11538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11539 (exit $ac_status); } >/dev/null; then
11540 if test -s conftest.err; then
11541 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 11542 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
11543 else
11544 ac_cpp_err=
11545 fi
11546else
11547 ac_cpp_err=yes
11548fi
11549if test -z "$ac_cpp_err"; then
c0d27fcc 11550 ac_header_preproc=yes
503d2be0
AS
11551else
11552 echo "$as_me: failed program was:" >&5
19650fd6
AS
11553sed 's/^/| /' conftest.$ac_ext >&5
11554
c0d27fcc 11555 ac_header_preproc=no
ba4481b5 11556fi
503d2be0 11557rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11558echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11559echo "${ECHO_T}$ac_header_preproc" >&6
11560
11561# So? What about this header?
35996d22
AS
11562case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11563 yes:no: )
f57bd967
DL
11564 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11565echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
11566 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11567echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11568 ac_header_preproc=yes
19650fd6 11569 ;;
35996d22 11570 no:yes:* )
f57bd967
DL
11571 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11572echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
11573 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11574echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11575 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11576echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11577 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11578echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 11579 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 11580echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
11581 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11582echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
11583 (
11584 cat <<\_ASBOX
35996d22
AS
11585## ------------------------------------------ ##
11586## Report this to the AC_PACKAGE_NAME lists. ##
11587## ------------------------------------------ ##
19650fd6
AS
11588_ASBOX
11589 ) |
11590 sed "s/^/$as_me: WARNING: /" >&2
11591 ;;
c0d27fcc 11592esac
f57bd967
DL
11593echo "$as_me:$LINENO: checking for $ac_header" >&5
11594echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11595if eval "test \"\${$as_ac_Header+set}\" = set"; then
c0d27fcc
MR
11596 echo $ECHO_N "(cached) $ECHO_C" >&6
11597else
35996d22 11598 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967
DL
11599fi
11600echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11601echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11602
ba4481b5 11603fi
f57bd967
DL
11604if test `eval echo '${'$as_ac_Header'}'` = yes; then
11605 cat >>confdefs.h <<_ACEOF
11606#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11607_ACEOF
c0d27fcc
MR
11608
11609fi
f57bd967
DL
11610
11611done
11612
11613 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
11614 echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
98418dba
CW
11615echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6
11616if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 11617 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11618else
98418dba
CW
11619 ac_check_lib_save_LIBS=$LIBS
11620LIBS="-lpng -lz -lm $LIBS"
11621cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11622/* confdefs.h. */
11623_ACEOF
11624cat confdefs.h >>conftest.$ac_ext
11625cat >>conftest.$ac_ext <<_ACEOF
11626/* end confdefs.h. */
98418dba 11627
ba4481b5 11628/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11629#ifdef __cplusplus
11630extern "C"
11631#endif
ba4481b5 11632/* We use char because int might match the return type of a gcc2
503d2be0 11633 builtin and then its argument prototype would still apply. */
98418dba 11634char png_get_channels ();
503d2be0
AS
11635int
11636main ()
11637{
98418dba 11638png_get_channels ();
503d2be0
AS
11639 ;
11640 return 0;
11641}
11642_ACEOF
11643rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11644if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 11645 (eval $ac_link) 2>conftest.er1
503d2be0 11646 ac_status=$?
35996d22
AS
11647 grep -v '^ *+' conftest.er1 >conftest.err
11648 rm -f conftest.er1
11649 cat conftest.err >&5
c0d27fcc 11650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11651 (exit $ac_status); } &&
4494a266
JD
11652 { ac_try='test -z "$ac_c_werror_flag"
11653 || test ! -s conftest.err'
35996d22
AS
11654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11655 (eval $ac_try) 2>&5
11656 ac_status=$?
11657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11658 (exit $ac_status); }; } &&
11659 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11661 (eval $ac_try) 2>&5
11662 ac_status=$?
c0d27fcc 11663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11664 (exit $ac_status); }; }; then
98418dba 11665 ac_cv_lib_png_png_get_channels=yes
73b77ee5 11666else
98418dba 11667 echo "$as_me: failed program was:" >&5
19650fd6
AS
11668sed 's/^/| /' conftest.$ac_ext >&5
11669
98418dba 11670ac_cv_lib_png_png_get_channels=no
73b77ee5 11671fi
35996d22
AS
11672rm -f conftest.err conftest.$ac_objext \
11673 conftest$ac_exeext conftest.$ac_ext
98418dba 11674LIBS=$ac_check_lib_save_LIBS
73b77ee5 11675fi
c0d27fcc 11676echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
98418dba
CW
11677echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6
11678if test $ac_cv_lib_png_png_get_channels = yes; then
11679 HAVE_PNG=yes
73b77ee5 11680fi
503d2be0 11681
f57bd967 11682 fi
98418dba
CW
11683 fi
11684
11685 if test "${HAVE_PNG}" = "yes"; then
b936fae4 11686
c0d27fcc 11687cat >>confdefs.h <<\_ACEOF
98418dba 11688#define HAVE_PNG 1
c0d27fcc 11689_ACEOF
73b77ee5 11690
98418dba 11691 fi
73b77ee5
GM
11692fi
11693
98418dba
CW
11694### Use -ltiff if available, unless `--with-tiff=no'.
11695HAVE_TIFF=no
11696if test "${HAVE_X11}" = "yes"; then
11697 if test "${with_tiff}" != "no"; then
c0d27fcc
MR
11698 if test "${ac_cv_header_tiffio_h+set}" = set; then
11699 echo "$as_me:$LINENO: checking for tiffio.h" >&5
98418dba
CW
11700echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
11701if test "${ac_cv_header_tiffio_h+set}" = set; then
11702 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11703fi
11704echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
11705echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
98418dba 11706else
c0d27fcc
MR
11707 # Is the header compilable?
11708echo "$as_me:$LINENO: checking tiffio.h usability" >&5
11709echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6
11710cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11711/* confdefs.h. */
11712_ACEOF
11713cat confdefs.h >>conftest.$ac_ext
11714cat >>conftest.$ac_ext <<_ACEOF
11715/* end confdefs.h. */
c0d27fcc
MR
11716$ac_includes_default
11717#include <tiffio.h>
11718_ACEOF
11719rm -f conftest.$ac_objext
11720if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11721 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11722 ac_status=$?
35996d22
AS
11723 grep -v '^ *+' conftest.er1 >conftest.err
11724 rm -f conftest.er1
11725 cat conftest.err >&5
c0d27fcc
MR
11726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11727 (exit $ac_status); } &&
4494a266
JD
11728 { ac_try='test -z "$ac_c_werror_flag"
11729 || test ! -s conftest.err'
35996d22
AS
11730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11731 (eval $ac_try) 2>&5
11732 ac_status=$?
11733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11734 (exit $ac_status); }; } &&
11735 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11737 (eval $ac_try) 2>&5
11738 ac_status=$?
11739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11740 (exit $ac_status); }; }; then
11741 ac_header_compiler=yes
11742else
11743 echo "$as_me: failed program was:" >&5
19650fd6
AS
11744sed 's/^/| /' conftest.$ac_ext >&5
11745
c0d27fcc
MR
11746ac_header_compiler=no
11747fi
35996d22 11748rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11749echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11750echo "${ECHO_T}$ac_header_compiler" >&6
11751
11752# Is the header present?
11753echo "$as_me:$LINENO: checking tiffio.h presence" >&5
11754echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6
11755cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11756/* confdefs.h. */
11757_ACEOF
11758cat confdefs.h >>conftest.$ac_ext
11759cat >>conftest.$ac_ext <<_ACEOF
11760/* end confdefs.h. */
98418dba
CW
11761#include <tiffio.h>
11762_ACEOF
c0d27fcc 11763if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
11764 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11765 ac_status=$?
6bae0ccf 11766 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11767 rm -f conftest.er1
11768 cat conftest.err >&5
c0d27fcc 11769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11770 (exit $ac_status); } >/dev/null; then
11771 if test -s conftest.err; then
11772 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 11773 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
11774 else
11775 ac_cpp_err=
11776 fi
11777else
11778 ac_cpp_err=yes
11779fi
11780if test -z "$ac_cpp_err"; then
c0d27fcc 11781 ac_header_preproc=yes
98418dba
CW
11782else
11783 echo "$as_me: failed program was:" >&5
19650fd6
AS
11784sed 's/^/| /' conftest.$ac_ext >&5
11785
c0d27fcc 11786 ac_header_preproc=no
98418dba
CW
11787fi
11788rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11789echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11790echo "${ECHO_T}$ac_header_preproc" >&6
11791
11792# So? What about this header?
35996d22
AS
11793case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11794 yes:no: )
c0d27fcc
MR
11795 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
11796echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
11797 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
11798echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
11799 ac_header_preproc=yes
19650fd6 11800 ;;
35996d22 11801 no:yes:* )
c0d27fcc
MR
11802 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
11803echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
35996d22
AS
11804 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
11805echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
11806 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
11807echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
11808 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
11809echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 11810 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 11811echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
11812 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
11813echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
11814 (
11815 cat <<\_ASBOX
35996d22
AS
11816## ------------------------------------------ ##
11817## Report this to the AC_PACKAGE_NAME lists. ##
11818## ------------------------------------------ ##
19650fd6
AS
11819_ASBOX
11820 ) |
11821 sed "s/^/$as_me: WARNING: /" >&2
11822 ;;
c0d27fcc
MR
11823esac
11824echo "$as_me:$LINENO: checking for tiffio.h" >&5
11825echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
11826if test "${ac_cv_header_tiffio_h+set}" = set; then
11827 echo $ECHO_N "(cached) $ECHO_C" >&6
11828else
11829 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 11830fi
c0d27fcc 11831echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
98418dba 11832echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
c0d27fcc
MR
11833
11834fi
98418dba
CW
11835if test $ac_cv_header_tiffio_h = yes; then
11836 tifflibs="-lz -lm"
11837 # At least one tiff package requires the jpeg library.
11838 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
c0d27fcc 11839 echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
98418dba
CW
11840echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6
11841if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 11842 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 11843else
503d2be0 11844 ac_check_lib_save_LIBS=$LIBS
98418dba 11845LIBS="-ltiff $tifflibs $LIBS"
503d2be0 11846cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11847/* confdefs.h. */
11848_ACEOF
11849cat confdefs.h >>conftest.$ac_ext
11850cat >>conftest.$ac_ext <<_ACEOF
11851/* end confdefs.h. */
503d2be0 11852
73b77ee5 11853/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11854#ifdef __cplusplus
11855extern "C"
11856#endif
73b77ee5 11857/* We use char because int might match the return type of a gcc2
503d2be0 11858 builtin and then its argument prototype would still apply. */
98418dba 11859char TIFFGetVersion ();
503d2be0
AS
11860int
11861main ()
11862{
98418dba 11863TIFFGetVersion ();
503d2be0
AS
11864 ;
11865 return 0;
11866}
11867_ACEOF
11868rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11869if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 11870 (eval $ac_link) 2>conftest.er1
503d2be0 11871 ac_status=$?
35996d22
AS
11872 grep -v '^ *+' conftest.er1 >conftest.err
11873 rm -f conftest.er1
11874 cat conftest.err >&5
c0d27fcc 11875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11876 (exit $ac_status); } &&
4494a266
JD
11877 { ac_try='test -z "$ac_c_werror_flag"
11878 || test ! -s conftest.err'
35996d22
AS
11879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11880 (eval $ac_try) 2>&5
11881 ac_status=$?
11882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11883 (exit $ac_status); }; } &&
11884 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11886 (eval $ac_try) 2>&5
11887 ac_status=$?
c0d27fcc 11888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11889 (exit $ac_status); }; }; then
98418dba 11890 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
11891else
11892 echo "$as_me: failed program was:" >&5
19650fd6
AS
11893sed 's/^/| /' conftest.$ac_ext >&5
11894
98418dba 11895ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 11896fi
35996d22
AS
11897rm -f conftest.err conftest.$ac_objext \
11898 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
11899LIBS=$ac_check_lib_save_LIBS
11900fi
c0d27fcc 11901echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
98418dba
CW
11902echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6
11903if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
11904 HAVE_TIFF=yes
11905fi
11906
11907fi
73b77ee5 11908
c0d27fcc 11909
98418dba
CW
11910 fi
11911
11912 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 11913
c0d27fcc 11914cat >>confdefs.h <<\_ACEOF
98418dba 11915#define HAVE_TIFF 1
c0d27fcc 11916_ACEOF
98418dba
CW
11917
11918 fi
73b77ee5
GM
11919fi
11920
98418dba
CW
11921### Use -lgif if available, unless `--with-gif=no'.
11922HAVE_GIF=no
11923if test "${HAVE_X11}" = "yes"; then
11924 if test "${with_gif}" != "no"; then
c0d27fcc
MR
11925 if test "${ac_cv_header_gif_lib_h+set}" = set; then
11926 echo "$as_me:$LINENO: checking for gif_lib.h" >&5
98418dba
CW
11927echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
11928if test "${ac_cv_header_gif_lib_h+set}" = set; then
11929 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11930fi
11931echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
11932echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
98418dba 11933else
c0d27fcc
MR
11934 # Is the header compilable?
11935echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
11936echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6
11937cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11938/* confdefs.h. */
11939_ACEOF
11940cat confdefs.h >>conftest.$ac_ext
11941cat >>conftest.$ac_ext <<_ACEOF
11942/* end confdefs.h. */
c0d27fcc
MR
11943$ac_includes_default
11944#include <gif_lib.h>
11945_ACEOF
11946rm -f conftest.$ac_objext
11947if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11948 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11949 ac_status=$?
35996d22
AS
11950 grep -v '^ *+' conftest.er1 >conftest.err
11951 rm -f conftest.er1
11952 cat conftest.err >&5
c0d27fcc
MR
11953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11954 (exit $ac_status); } &&
4494a266
JD
11955 { ac_try='test -z "$ac_c_werror_flag"
11956 || test ! -s conftest.err'
35996d22
AS
11957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11958 (eval $ac_try) 2>&5
11959 ac_status=$?
11960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11961 (exit $ac_status); }; } &&
11962 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11964 (eval $ac_try) 2>&5
11965 ac_status=$?
11966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11967 (exit $ac_status); }; }; then
11968 ac_header_compiler=yes
11969else
11970 echo "$as_me: failed program was:" >&5
19650fd6
AS
11971sed 's/^/| /' conftest.$ac_ext >&5
11972
c0d27fcc
MR
11973ac_header_compiler=no
11974fi
35996d22 11975rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11976echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11977echo "${ECHO_T}$ac_header_compiler" >&6
11978
11979# Is the header present?
11980echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
11981echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6
11982cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11983/* confdefs.h. */
11984_ACEOF
11985cat confdefs.h >>conftest.$ac_ext
11986cat >>conftest.$ac_ext <<_ACEOF
11987/* end confdefs.h. */
98418dba
CW
11988#include <gif_lib.h>
11989_ACEOF
c0d27fcc 11990if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
11991 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11992 ac_status=$?
6bae0ccf 11993 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11994 rm -f conftest.er1
11995 cat conftest.err >&5
c0d27fcc 11996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11997 (exit $ac_status); } >/dev/null; then
11998 if test -s conftest.err; then
11999 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 12000 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12001 else
12002 ac_cpp_err=
12003 fi
12004else
12005 ac_cpp_err=yes
12006fi
12007if test -z "$ac_cpp_err"; then
c0d27fcc 12008 ac_header_preproc=yes
98418dba
CW
12009else
12010 echo "$as_me: failed program was:" >&5
19650fd6
AS
12011sed 's/^/| /' conftest.$ac_ext >&5
12012
c0d27fcc 12013 ac_header_preproc=no
98418dba
CW
12014fi
12015rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12016echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12017echo "${ECHO_T}$ac_header_preproc" >&6
12018
12019# So? What about this header?
35996d22
AS
12020case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12021 yes:no: )
c0d27fcc
MR
12022 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
12023echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
12024 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
12025echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
12026 ac_header_preproc=yes
19650fd6 12027 ;;
35996d22 12028 no:yes:* )
c0d27fcc
MR
12029 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
12030echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
35996d22
AS
12031 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
12032echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
12033 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
12034echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
12035 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
12036echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12037 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 12038echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
12039 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
12040echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12041 (
12042 cat <<\_ASBOX
35996d22
AS
12043## ------------------------------------------ ##
12044## Report this to the AC_PACKAGE_NAME lists. ##
12045## ------------------------------------------ ##
19650fd6
AS
12046_ASBOX
12047 ) |
12048 sed "s/^/$as_me: WARNING: /" >&2
12049 ;;
c0d27fcc
MR
12050esac
12051echo "$as_me:$LINENO: checking for gif_lib.h" >&5
12052echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
12053if test "${ac_cv_header_gif_lib_h+set}" = set; then
12054 echo $ECHO_N "(cached) $ECHO_C" >&6
12055else
12056 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 12057fi
c0d27fcc 12058echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
98418dba 12059echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
c0d27fcc
MR
12060
12061fi
98418dba
CW
12062if test $ac_cv_header_gif_lib_h = yes; then
12063 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
12064# Earlier versions can crash Emacs.
c0d27fcc 12065 echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
98418dba
CW
12066echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6
12067if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
503d2be0 12068 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12069else
503d2be0 12070 ac_check_lib_save_LIBS=$LIBS
98418dba 12071LIBS="-lungif $LIBS"
503d2be0 12072cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12073/* confdefs.h. */
12074_ACEOF
12075cat confdefs.h >>conftest.$ac_ext
12076cat >>conftest.$ac_ext <<_ACEOF
12077/* end confdefs.h. */
73b77ee5 12078
98418dba
CW
12079/* Override any gcc2 internal prototype to avoid an error. */
12080#ifdef __cplusplus
12081extern "C"
12082#endif
12083/* We use char because int might match the return type of a gcc2
12084 builtin and then its argument prototype would still apply. */
12085char EGifPutExtensionLast ();
503d2be0
AS
12086int
12087main ()
12088{
98418dba 12089EGifPutExtensionLast ();
503d2be0
AS
12090 ;
12091 return 0;
12092}
12093_ACEOF
12094rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12095if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12096 (eval $ac_link) 2>conftest.er1
503d2be0 12097 ac_status=$?
35996d22
AS
12098 grep -v '^ *+' conftest.er1 >conftest.err
12099 rm -f conftest.er1
12100 cat conftest.err >&5
c0d27fcc 12101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 12102 (exit $ac_status); } &&
4494a266
JD
12103 { ac_try='test -z "$ac_c_werror_flag"
12104 || test ! -s conftest.err'
c0d27fcc 12105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
12106 (eval $ac_try) 2>&5
12107 ac_status=$?
c0d27fcc 12108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
35996d22
AS
12109 (exit $ac_status); }; } &&
12110 { ac_try='test -s conftest$ac_exeext'
12111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12112 (eval $ac_try) 2>&5
12113 ac_status=$?
12114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12115 (exit $ac_status); }; }; then
12116 ac_cv_lib_ungif_EGifPutExtensionLast=yes
12117else
98418dba 12118 echo "$as_me: failed program was:" >&5
19650fd6
AS
12119sed 's/^/| /' conftest.$ac_ext >&5
12120
98418dba
CW
12121ac_cv_lib_ungif_EGifPutExtensionLast=no
12122fi
35996d22
AS
12123rm -f conftest.err conftest.$ac_objext \
12124 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12125LIBS=$ac_check_lib_save_LIBS
12126fi
c0d27fcc 12127echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
98418dba
CW
12128echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6
12129if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
12130 HAVE_GIF=yes
12131fi
12132
12133fi
12134
c0d27fcc 12135
98418dba
CW
12136 fi
12137
12138 if test "${HAVE_GIF}" = "yes"; then
b936fae4 12139
c0d27fcc 12140cat >>confdefs.h <<\_ACEOF
98418dba 12141#define HAVE_GIF 1
c0d27fcc 12142_ACEOF
98418dba
CW
12143
12144 fi
12145fi
12146
c0d27fcc
MR
12147### Use Mac OS X Carbon API to implement GUI.
12148HAVE_CARBON=no
12149if test "${with_carbon}" != "no"; then
12150 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
12151 echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
12152echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
12153if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
12154 echo $ECHO_N "(cached) $ECHO_C" >&6
12155fi
12156echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
12157echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
12158else
12159 # Is the header compilable?
12160echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
12161echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6
12162cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12163/* confdefs.h. */
12164_ACEOF
12165cat confdefs.h >>conftest.$ac_ext
12166cat >>conftest.$ac_ext <<_ACEOF
12167/* end confdefs.h. */
c0d27fcc
MR
12168$ac_includes_default
12169#include <Carbon/Carbon.h>
12170_ACEOF
12171rm -f conftest.$ac_objext
12172if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 12173 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12174 ac_status=$?
35996d22
AS
12175 grep -v '^ *+' conftest.er1 >conftest.err
12176 rm -f conftest.er1
12177 cat conftest.err >&5
c0d27fcc
MR
12178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12179 (exit $ac_status); } &&
4494a266
JD
12180 { ac_try='test -z "$ac_c_werror_flag"
12181 || test ! -s conftest.err'
35996d22
AS
12182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12183 (eval $ac_try) 2>&5
12184 ac_status=$?
12185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12186 (exit $ac_status); }; } &&
12187 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12189 (eval $ac_try) 2>&5
12190 ac_status=$?
12191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12192 (exit $ac_status); }; }; then
12193 ac_header_compiler=yes
12194else
12195 echo "$as_me: failed program was:" >&5
19650fd6
AS
12196sed 's/^/| /' conftest.$ac_ext >&5
12197
c0d27fcc
MR
12198ac_header_compiler=no
12199fi
35996d22 12200rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12201echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12202echo "${ECHO_T}$ac_header_compiler" >&6
12203
12204# Is the header present?
12205echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
12206echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6
12207cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12208/* confdefs.h. */
12209_ACEOF
12210cat confdefs.h >>conftest.$ac_ext
12211cat >>conftest.$ac_ext <<_ACEOF
12212/* end confdefs.h. */
e0f712ba
AC
12213#include <Carbon/Carbon.h>
12214_ACEOF
c0d27fcc 12215if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
e0f712ba
AC
12216 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12217 ac_status=$?
6bae0ccf 12218 grep -v '^ *+' conftest.er1 >conftest.err
e0f712ba
AC
12219 rm -f conftest.er1
12220 cat conftest.err >&5
c0d27fcc 12221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
e0f712ba
AC
12222 (exit $ac_status); } >/dev/null; then
12223 if test -s conftest.err; then
12224 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 12225 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
e0f712ba
AC
12226 else
12227 ac_cpp_err=
12228 fi
12229else
12230 ac_cpp_err=yes
12231fi
12232if test -z "$ac_cpp_err"; then
c0d27fcc 12233 ac_header_preproc=yes
e0f712ba
AC
12234else
12235 echo "$as_me: failed program was:" >&5
19650fd6
AS
12236sed 's/^/| /' conftest.$ac_ext >&5
12237
c0d27fcc 12238 ac_header_preproc=no
e0f712ba
AC
12239fi
12240rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12241echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12242echo "${ECHO_T}$ac_header_preproc" >&6
12243
12244# So? What about this header?
35996d22
AS
12245case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12246 yes:no: )
c0d27fcc
MR
12247 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
12248echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
12249 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
12250echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
12251 ac_header_preproc=yes
19650fd6 12252 ;;
35996d22 12253 no:yes:* )
c0d27fcc
MR
12254 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
12255echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
35996d22
AS
12256 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
12257echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
12258 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
12259echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
12260 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
12261echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12262 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
19650fd6 12263echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
12264 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
12265echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12266 (
12267 cat <<\_ASBOX
35996d22
AS
12268## ------------------------------------------ ##
12269## Report this to the AC_PACKAGE_NAME lists. ##
12270## ------------------------------------------ ##
19650fd6
AS
12271_ASBOX
12272 ) |
12273 sed "s/^/$as_me: WARNING: /" >&2
12274 ;;
c0d27fcc
MR
12275esac
12276echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
12277echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
12278if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
12279 echo $ECHO_N "(cached) $ECHO_C" >&6
12280else
12281 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
e0f712ba 12282fi
c0d27fcc 12283echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
e0f712ba 12284echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
c0d27fcc
MR
12285
12286fi
e0f712ba
AC
12287if test $ac_cv_header_Carbon_Carbon_h = yes; then
12288 HAVE_CARBON=yes
12289fi
12290
c0d27fcc 12291
e0f712ba
AC
12292fi
12293
cef11da2
ST
12294if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12295 echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
12296echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6
12297if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12298 echo $ECHO_N "(cached) $ECHO_C" >&6
12299fi
12300echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
12301echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6
12302else
12303 # Is the header compilable?
12304echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
12305echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6
12306cat >conftest.$ac_ext <<_ACEOF
12307/* confdefs.h. */
12308_ACEOF
12309cat confdefs.h >>conftest.$ac_ext
12310cat >>conftest.$ac_ext <<_ACEOF
12311/* end confdefs.h. */
12312$ac_includes_default
12313#include <malloc/malloc.h>
12314_ACEOF
12315rm -f conftest.$ac_objext
12316if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12317 (eval $ac_compile) 2>conftest.er1
12318 ac_status=$?
12319 grep -v '^ *+' conftest.er1 >conftest.err
12320 rm -f conftest.er1
12321 cat conftest.err >&5
12322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12323 (exit $ac_status); } &&
12324 { ac_try='test -z "$ac_c_werror_flag"
12325 || test ! -s conftest.err'
12326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12327 (eval $ac_try) 2>&5
12328 ac_status=$?
12329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12330 (exit $ac_status); }; } &&
12331 { ac_try='test -s conftest.$ac_objext'
12332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12333 (eval $ac_try) 2>&5
12334 ac_status=$?
12335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12336 (exit $ac_status); }; }; then
12337 ac_header_compiler=yes
12338else
12339 echo "$as_me: failed program was:" >&5
12340sed 's/^/| /' conftest.$ac_ext >&5
12341
12342ac_header_compiler=no
12343fi
12344rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12345echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12346echo "${ECHO_T}$ac_header_compiler" >&6
12347
12348# Is the header present?
12349echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
12350echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6
12351cat >conftest.$ac_ext <<_ACEOF
12352/* confdefs.h. */
12353_ACEOF
12354cat confdefs.h >>conftest.$ac_ext
12355cat >>conftest.$ac_ext <<_ACEOF
12356/* end confdefs.h. */
12357#include <malloc/malloc.h>
12358_ACEOF
12359if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12360 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12361 ac_status=$?
12362 grep -v '^ *+' conftest.er1 >conftest.err
12363 rm -f conftest.er1
12364 cat conftest.err >&5
12365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12366 (exit $ac_status); } >/dev/null; then
12367 if test -s conftest.err; then
12368 ac_cpp_err=$ac_c_preproc_warn_flag
12369 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12370 else
12371 ac_cpp_err=
12372 fi
12373else
12374 ac_cpp_err=yes
12375fi
12376if test -z "$ac_cpp_err"; then
12377 ac_header_preproc=yes
12378else
12379 echo "$as_me: failed program was:" >&5
12380sed 's/^/| /' conftest.$ac_ext >&5
12381
12382 ac_header_preproc=no
12383fi
12384rm -f conftest.err conftest.$ac_ext
12385echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12386echo "${ECHO_T}$ac_header_preproc" >&6
12387
12388# So? What about this header?
12389case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12390 yes:no: )
12391 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
12392echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12393 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
12394echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
12395 ac_header_preproc=yes
12396 ;;
12397 no:yes:* )
12398 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
12399echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
12400 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
12401echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
12402 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
12403echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
12404 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
12405echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
12406 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
12407echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
12408 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
12409echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
12410 (
12411 cat <<\_ASBOX
12412## ------------------------------------------ ##
12413## Report this to the AC_PACKAGE_NAME lists. ##
12414## ------------------------------------------ ##
12415_ASBOX
12416 ) |
12417 sed "s/^/$as_me: WARNING: /" >&2
12418 ;;
12419esac
12420echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
12421echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6
12422if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12423 echo $ECHO_N "(cached) $ECHO_C" >&6
12424else
12425 ac_cv_header_malloc_malloc_h=$ac_header_preproc
12426fi
12427echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
12428echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6
12429
12430fi
12431if test $ac_cv_header_malloc_malloc_h = yes; then
12432
12433cat >>confdefs.h <<\_ACEOF
12434#define HAVE_MALLOC_MALLOC_H 1
12435_ACEOF
12436
12437fi
12438
12439
12440
e0f712ba 12441if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 12442
c0d27fcc 12443cat >>confdefs.h <<\_ACEOF
e0f712ba 12444#define HAVE_CARBON 1
c0d27fcc 12445_ACEOF
e0f712ba 12446
6a3a24fa
JD
12447 window_system=mac
12448 ## Specify the install directory
12449 carbon_appdir=
12450 if test "${carbon_appdir_x}" != ""; then
12451 case ${carbon_appdir_x} in
12452 y | ye | yes) carbon_appdir=/Applications ;;
12453 * ) carbon_appdir=${carbon_appdir_x} ;;
12454 esac
12455 fi
8f417b3b
AS
12456 # We also have mouse menus.
12457 HAVE_MENUS=yes
e0f712ba
AC
12458fi
12459
98418dba
CW
12460### Use session management (-lSM -lICE) if available
12461HAVE_X_SM=no
12462if test "${HAVE_X11}" = "yes"; then
c0d27fcc
MR
12463 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
12464 echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
98418dba
CW
12465echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
12466if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
12467 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12468fi
12469echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
12470echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
503d2be0 12471else
c0d27fcc
MR
12472 # Is the header compilable?
12473echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
12474echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6
12475cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12476/* confdefs.h. */
12477_ACEOF
12478cat confdefs.h >>conftest.$ac_ext
12479cat >>conftest.$ac_ext <<_ACEOF
12480/* end confdefs.h. */
c0d27fcc
MR
12481$ac_includes_default
12482#include <X11/SM/SMlib.h>
12483_ACEOF
12484rm -f conftest.$ac_objext
12485if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 12486 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12487 ac_status=$?
35996d22
AS
12488 grep -v '^ *+' conftest.er1 >conftest.err
12489 rm -f conftest.er1
12490 cat conftest.err >&5
c0d27fcc
MR
12491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12492 (exit $ac_status); } &&
4494a266
JD
12493 { ac_try='test -z "$ac_c_werror_flag"
12494 || test ! -s conftest.err'
35996d22
AS
12495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12496 (eval $ac_try) 2>&5
12497 ac_status=$?
12498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12499 (exit $ac_status); }; } &&
12500 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12501 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12502 (eval $ac_try) 2>&5
12503 ac_status=$?
12504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12505 (exit $ac_status); }; }; then
12506 ac_header_compiler=yes
12507else
12508 echo "$as_me: failed program was:" >&5
19650fd6
AS
12509sed 's/^/| /' conftest.$ac_ext >&5
12510
c0d27fcc
MR
12511ac_header_compiler=no
12512fi
35996d22 12513rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12514echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12515echo "${ECHO_T}$ac_header_compiler" >&6
12516
12517# Is the header present?
12518echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
12519echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6
12520cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12521/* confdefs.h. */
12522_ACEOF
12523cat confdefs.h >>conftest.$ac_ext
12524cat >>conftest.$ac_ext <<_ACEOF
12525/* end confdefs.h. */
98418dba
CW
12526#include <X11/SM/SMlib.h>
12527_ACEOF
c0d27fcc 12528if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12529 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12530 ac_status=$?
6bae0ccf 12531 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12532 rm -f conftest.er1
12533 cat conftest.err >&5
c0d27fcc 12534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12535 (exit $ac_status); } >/dev/null; then
12536 if test -s conftest.err; then
12537 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 12538 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12539 else
12540 ac_cpp_err=
12541 fi
12542else
12543 ac_cpp_err=yes
503d2be0 12544fi
98418dba 12545if test -z "$ac_cpp_err"; then
c0d27fcc 12546 ac_header_preproc=yes
98418dba
CW
12547else
12548 echo "$as_me: failed program was:" >&5
19650fd6
AS
12549sed 's/^/| /' conftest.$ac_ext >&5
12550
c0d27fcc 12551 ac_header_preproc=no
98418dba
CW
12552fi
12553rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12554echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12555echo "${ECHO_T}$ac_header_preproc" >&6
12556
12557# So? What about this header?
35996d22
AS
12558case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12559 yes:no: )
c0d27fcc
MR
12560 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
12561echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
12562 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
12563echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
12564 ac_header_preproc=yes
19650fd6 12565 ;;
35996d22 12566 no:yes:* )
c0d27fcc
MR
12567 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
12568echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
35996d22
AS
12569 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
12570echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
12571 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
12572echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
12573 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
12574echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12575 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 12576echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
12577 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
12578echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12579 (
12580 cat <<\_ASBOX
35996d22
AS
12581## ------------------------------------------ ##
12582## Report this to the AC_PACKAGE_NAME lists. ##
12583## ------------------------------------------ ##
19650fd6
AS
12584_ASBOX
12585 ) |
12586 sed "s/^/$as_me: WARNING: /" >&2
12587 ;;
c0d27fcc
MR
12588esac
12589echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
12590echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
12591if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
12592 echo $ECHO_N "(cached) $ECHO_C" >&6
12593else
12594 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 12595fi
c0d27fcc 12596echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
98418dba 12597echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
c0d27fcc
MR
12598
12599fi
98418dba 12600if test $ac_cv_header_X11_SM_SMlib_h = yes; then
c0d27fcc 12601 echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
98418dba
CW
12602echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6
12603if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 12604 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12605else
503d2be0 12606 ac_check_lib_save_LIBS=$LIBS
1660500f 12607LIBS="-lSM -lICE $LIBS"
503d2be0 12608cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12609/* confdefs.h. */
12610_ACEOF
12611cat confdefs.h >>conftest.$ac_ext
12612cat >>conftest.$ac_ext <<_ACEOF
12613/* end confdefs.h. */
503d2be0 12614
73b77ee5 12615/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12616#ifdef __cplusplus
12617extern "C"
12618#endif
73b77ee5 12619/* We use char because int might match the return type of a gcc2
503d2be0 12620 builtin and then its argument prototype would still apply. */
98418dba 12621char SmcOpenConnection ();
503d2be0
AS
12622int
12623main ()
12624{
98418dba 12625SmcOpenConnection ();
503d2be0
AS
12626 ;
12627 return 0;
12628}
12629_ACEOF
12630rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12631if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12632 (eval $ac_link) 2>conftest.er1
503d2be0 12633 ac_status=$?
35996d22
AS
12634 grep -v '^ *+' conftest.er1 >conftest.err
12635 rm -f conftest.er1
12636 cat conftest.err >&5
c0d27fcc 12637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12638 (exit $ac_status); } &&
4494a266
JD
12639 { ac_try='test -z "$ac_c_werror_flag"
12640 || test ! -s conftest.err'
35996d22
AS
12641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12642 (eval $ac_try) 2>&5
12643 ac_status=$?
12644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12645 (exit $ac_status); }; } &&
12646 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12648 (eval $ac_try) 2>&5
12649 ac_status=$?
c0d27fcc 12650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12651 (exit $ac_status); }; }; then
98418dba 12652 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
12653else
12654 echo "$as_me: failed program was:" >&5
19650fd6
AS
12655sed 's/^/| /' conftest.$ac_ext >&5
12656
98418dba 12657ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 12658fi
35996d22
AS
12659rm -f conftest.err conftest.$ac_objext \
12660 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
12661LIBS=$ac_check_lib_save_LIBS
12662fi
c0d27fcc 12663echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
98418dba
CW
12664echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6
12665if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
12666 HAVE_X_SM=yes
73b77ee5
GM
12667fi
12668
73b77ee5 12669fi
73b77ee5 12670
c0d27fcc
MR
12671
12672
98418dba 12673 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 12674
c0d27fcc 12675cat >>confdefs.h <<\_ACEOF
98418dba 12676#define HAVE_X_SM 1
c0d27fcc 12677_ACEOF
73b77ee5 12678
98418dba
CW
12679 case "$LIBS" in
12680 *-lSM*) ;;
12681 *) LIBS="-lSM -lICE $LIBS" ;;
12682 esac
73b77ee5 12683 fi
98418dba 12684fi
73b77ee5 12685
98418dba 12686# If netdb.h doesn't declare h_errno, we must declare it by hand.
c0d27fcc 12687echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
98418dba
CW
12688echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6
12689if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
12690 echo $ECHO_N "(cached) $ECHO_C" >&6
12691else
12692 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12693/* confdefs.h. */
12694_ACEOF
12695cat confdefs.h >>conftest.$ac_ext
12696cat >>conftest.$ac_ext <<_ACEOF
12697/* end confdefs.h. */
98418dba 12698#include <netdb.h>
503d2be0
AS
12699int
12700main ()
12701{
98418dba 12702return h_errno;
503d2be0
AS
12703 ;
12704 return 0;
12705}
12706_ACEOF
12707rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12708if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12709 (eval $ac_link) 2>conftest.er1
503d2be0 12710 ac_status=$?
35996d22
AS
12711 grep -v '^ *+' conftest.er1 >conftest.err
12712 rm -f conftest.er1
12713 cat conftest.err >&5
c0d27fcc 12714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12715 (exit $ac_status); } &&
4494a266
JD
12716 { ac_try='test -z "$ac_c_werror_flag"
12717 || test ! -s conftest.err'
35996d22
AS
12718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12719 (eval $ac_try) 2>&5
12720 ac_status=$?
12721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12722 (exit $ac_status); }; } &&
12723 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12725 (eval $ac_try) 2>&5
12726 ac_status=$?
c0d27fcc 12727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12728 (exit $ac_status); }; }; then
98418dba 12729 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 12730else
503d2be0 12731 echo "$as_me: failed program was:" >&5
19650fd6
AS
12732sed 's/^/| /' conftest.$ac_ext >&5
12733
98418dba 12734emacs_cv_netdb_declares_h_errno=no
73b77ee5 12735fi
35996d22
AS
12736rm -f conftest.err conftest.$ac_objext \
12737 conftest$ac_exeext conftest.$ac_ext
98418dba 12738fi
c0d27fcc 12739echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
98418dba
CW
12740echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6
12741if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 12742
c0d27fcc 12743cat >>confdefs.h <<\_ACEOF
98418dba 12744#define HAVE_H_ERRNO 1
c0d27fcc 12745_ACEOF
73b77ee5 12746
98418dba
CW
12747fi
12748
12749# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12750# for constant arguments. Useless!
c0d27fcc 12751echo "$as_me:$LINENO: checking for working alloca.h" >&5
98418dba
CW
12752echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
12753if test "${ac_cv_working_alloca_h+set}" = set; then
12754 echo $ECHO_N "(cached) $ECHO_C" >&6
12755else
12756 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12757/* confdefs.h. */
12758_ACEOF
12759cat confdefs.h >>conftest.$ac_ext
12760cat >>conftest.$ac_ext <<_ACEOF
12761/* end confdefs.h. */
98418dba 12762#include <alloca.h>
503d2be0
AS
12763int
12764main ()
12765{
98418dba 12766char *p = (char *) alloca (2 * sizeof (int));
503d2be0
AS
12767 ;
12768 return 0;
12769}
12770_ACEOF
12771rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12772if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12773 (eval $ac_link) 2>conftest.er1
503d2be0 12774 ac_status=$?
35996d22
AS
12775 grep -v '^ *+' conftest.er1 >conftest.err
12776 rm -f conftest.er1
12777 cat conftest.err >&5
c0d27fcc 12778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12779 (exit $ac_status); } &&
4494a266
JD
12780 { ac_try='test -z "$ac_c_werror_flag"
12781 || test ! -s conftest.err'
35996d22
AS
12782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12783 (eval $ac_try) 2>&5
12784 ac_status=$?
12785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12786 (exit $ac_status); }; } &&
12787 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12789 (eval $ac_try) 2>&5
12790 ac_status=$?
c0d27fcc 12791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12792 (exit $ac_status); }; }; then
98418dba 12793 ac_cv_working_alloca_h=yes
73b77ee5 12794else
503d2be0 12795 echo "$as_me: failed program was:" >&5
19650fd6
AS
12796sed 's/^/| /' conftest.$ac_ext >&5
12797
98418dba 12798ac_cv_working_alloca_h=no
73b77ee5 12799fi
35996d22
AS
12800rm -f conftest.err conftest.$ac_objext \
12801 conftest$ac_exeext conftest.$ac_ext
98418dba 12802fi
c0d27fcc 12803echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
98418dba
CW
12804echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
12805if test $ac_cv_working_alloca_h = yes; then
73b77ee5 12806
c0d27fcc 12807cat >>confdefs.h <<\_ACEOF
98418dba 12808#define HAVE_ALLOCA_H 1
c0d27fcc 12809_ACEOF
98418dba
CW
12810
12811fi
12812
c0d27fcc 12813echo "$as_me:$LINENO: checking for alloca" >&5
98418dba
CW
12814echo $ECHO_N "checking for alloca... $ECHO_C" >&6
12815if test "${ac_cv_func_alloca_works+set}" = set; then
12816 echo $ECHO_N "(cached) $ECHO_C" >&6
12817else
503d2be0 12818 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12819/* confdefs.h. */
12820_ACEOF
12821cat confdefs.h >>conftest.$ac_ext
12822cat >>conftest.$ac_ext <<_ACEOF
12823/* end confdefs.h. */
98418dba
CW
12824#ifdef __GNUC__
12825# define alloca __builtin_alloca
12826#else
12827# ifdef _MSC_VER
12828# include <malloc.h>
12829# define alloca _alloca
12830# else
12831# if HAVE_ALLOCA_H
12832# include <alloca.h>
12833# else
12834# ifdef _AIX
12835 #pragma alloca
12836# else
12837# ifndef alloca /* predefined by HP cc +Olibcalls */
12838char *alloca ();
12839# endif
12840# endif
12841# endif
12842# endif
12843#endif
12844
503d2be0
AS
12845int
12846main ()
12847{
98418dba 12848char *p = (char *) alloca (1);
503d2be0
AS
12849 ;
12850 return 0;
12851}
12852_ACEOF
12853rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12854if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12855 (eval $ac_link) 2>conftest.er1
503d2be0 12856 ac_status=$?
35996d22
AS
12857 grep -v '^ *+' conftest.er1 >conftest.err
12858 rm -f conftest.er1
12859 cat conftest.err >&5
c0d27fcc 12860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12861 (exit $ac_status); } &&
4494a266
JD
12862 { ac_try='test -z "$ac_c_werror_flag"
12863 || test ! -s conftest.err'
35996d22
AS
12864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12865 (eval $ac_try) 2>&5
12866 ac_status=$?
12867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12868 (exit $ac_status); }; } &&
12869 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12871 (eval $ac_try) 2>&5
12872 ac_status=$?
c0d27fcc 12873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12874 (exit $ac_status); }; }; then
98418dba 12875 ac_cv_func_alloca_works=yes
ac95a621 12876else
503d2be0 12877 echo "$as_me: failed program was:" >&5
19650fd6
AS
12878sed 's/^/| /' conftest.$ac_ext >&5
12879
98418dba 12880ac_cv_func_alloca_works=no
ac95a621 12881fi
35996d22
AS
12882rm -f conftest.err conftest.$ac_objext \
12883 conftest$ac_exeext conftest.$ac_ext
98418dba 12884fi
c0d27fcc 12885echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
98418dba 12886echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
ac95a621 12887
98418dba
CW
12888if test $ac_cv_func_alloca_works = yes; then
12889
c0d27fcc 12890cat >>confdefs.h <<\_ACEOF
98418dba 12891#define HAVE_ALLOCA 1
c0d27fcc 12892_ACEOF
98418dba
CW
12893
12894else
12895 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12896# that cause trouble. Some versions do not even contain alloca or
12897# contain a buggy version. If you still want to use their alloca,
12898# use ar to extract alloca.o from them instead of compiling alloca.c.
12899
12900ALLOCA=alloca.$ac_objext
12901
c0d27fcc 12902cat >>confdefs.h <<\_ACEOF
98418dba 12903#define C_ALLOCA 1
c0d27fcc 12904_ACEOF
98418dba 12905
c0d27fcc
MR
12906
12907echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
98418dba
CW
12908echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
12909if test "${ac_cv_os_cray+set}" = set; then
12910 echo $ECHO_N "(cached) $ECHO_C" >&6
12911else
12912 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12913/* confdefs.h. */
12914_ACEOF
12915cat confdefs.h >>conftest.$ac_ext
12916cat >>conftest.$ac_ext <<_ACEOF
12917/* end confdefs.h. */
98418dba
CW
12918#if defined(CRAY) && ! defined(CRAY2)
12919webecray
12920#else
12921wenotbecray
12922#endif
12923
12924_ACEOF
12925if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 12926 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
12927 ac_cv_os_cray=yes
12928else
12929 ac_cv_os_cray=no
12930fi
12931rm -f conftest*
ac95a621 12932
98418dba 12933fi
c0d27fcc 12934echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
98418dba
CW
12935echo "${ECHO_T}$ac_cv_os_cray" >&6
12936if test $ac_cv_os_cray = yes; then
12937 for ac_func in _getb67 GETB67 getb67; do
12938 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 12939echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
12940echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12941if eval "test \"\${$as_ac_var+set}\" = set"; then
12942 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12943else
503d2be0 12944 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12945/* confdefs.h. */
12946_ACEOF
12947cat confdefs.h >>conftest.$ac_ext
12948cat >>conftest.$ac_ext <<_ACEOF
12949/* end confdefs.h. */
35996d22
AS
12950/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
12951 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12952#define $ac_func innocuous_$ac_func
12953
73b77ee5 12954/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
12955 which can conflict with char $ac_func (); below.
12956 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12957 <limits.h> exists even on freestanding compilers. */
35996d22 12958
19650fd6
AS
12959#ifdef __STDC__
12960# include <limits.h>
12961#else
12962# include <assert.h>
12963#endif
35996d22
AS
12964
12965#undef $ac_func
12966
73b77ee5 12967/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12968#ifdef __cplusplus
12969extern "C"
19650fd6 12970{
503d2be0 12971#endif
73b77ee5 12972/* We use char because int might match the return type of a gcc2
503d2be0
AS
12973 builtin and then its argument prototype would still apply. */
12974char $ac_func ();
73b77ee5
GM
12975/* The GNU C library defines this for functions which it implements
12976 to always fail with ENOSYS. Some functions are actually named
12977 something starting with __ and the normal name is an alias. */
12978#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12979choke me
12980#else
19650fd6
AS
12981char (*f) () = $ac_func;
12982#endif
12983#ifdef __cplusplus
12984}
73b77ee5
GM
12985#endif
12986
19650fd6
AS
12987int
12988main ()
12989{
12990return f != $ac_func;
503d2be0
AS
12991 ;
12992 return 0;
12993}
12994_ACEOF
12995rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12996if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12997 (eval $ac_link) 2>conftest.er1
503d2be0 12998 ac_status=$?
35996d22
AS
12999 grep -v '^ *+' conftest.er1 >conftest.err
13000 rm -f conftest.er1
13001 cat conftest.err >&5
c0d27fcc 13002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13003 (exit $ac_status); } &&
4494a266
JD
13004 { ac_try='test -z "$ac_c_werror_flag"
13005 || test ! -s conftest.err'
35996d22
AS
13006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13007 (eval $ac_try) 2>&5
13008 ac_status=$?
13009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13010 (exit $ac_status); }; } &&
13011 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13013 (eval $ac_try) 2>&5
13014 ac_status=$?
c0d27fcc 13015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13016 (exit $ac_status); }; }; then
13017 eval "$as_ac_var=yes"
13018else
13019 echo "$as_me: failed program was:" >&5
19650fd6
AS
13020sed 's/^/| /' conftest.$ac_ext >&5
13021
503d2be0
AS
13022eval "$as_ac_var=no"
13023fi
35996d22
AS
13024rm -f conftest.err conftest.$ac_objext \
13025 conftest$ac_exeext conftest.$ac_ext
503d2be0 13026fi
c0d27fcc 13027echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
13028echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13029if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 13030
c0d27fcc 13031cat >>confdefs.h <<_ACEOF
98418dba 13032#define CRAY_STACKSEG_END $ac_func
c0d27fcc 13033_ACEOF
98418dba
CW
13034
13035 break
73b77ee5 13036fi
73b77ee5 13037
98418dba 13038 done
73b77ee5
GM
13039fi
13040
c0d27fcc 13041echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
98418dba
CW
13042echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
13043if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 13044 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
13045else
13046 if test "$cross_compiling" = yes; then
13047 ac_cv_c_stack_direction=0
73b77ee5 13048else
503d2be0 13049 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13050/* confdefs.h. */
13051_ACEOF
13052cat confdefs.h >>conftest.$ac_ext
13053cat >>conftest.$ac_ext <<_ACEOF
13054/* end confdefs.h. */
503d2be0 13055int
98418dba 13056find_stack_direction ()
503d2be0 13057{
98418dba
CW
13058 static char *addr = 0;
13059 auto char dummy;
13060 if (addr == 0)
13061 {
13062 addr = &dummy;
13063 return find_stack_direction ();
13064 }
73b77ee5 13065 else
98418dba
CW
13066 return (&dummy > addr) ? 1 : -1;
13067}
ba4481b5 13068
503d2be0
AS
13069int
13070main ()
13071{
98418dba 13072 exit (find_stack_direction () < 0);
503d2be0
AS
13073}
13074_ACEOF
98418dba 13075rm -f conftest$ac_exeext
c0d27fcc 13076if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
13077 (eval $ac_link) 2>&5
13078 ac_status=$?
c0d27fcc 13079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 13080 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 13081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13082 (eval $ac_try) 2>&5
13083 ac_status=$?
c0d27fcc 13084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13085 (exit $ac_status); }; }; then
98418dba 13086 ac_cv_c_stack_direction=1
ba4481b5 13087else
98418dba
CW
13088 echo "$as_me: program exited with status $ac_status" >&5
13089echo "$as_me: failed program was:" >&5
19650fd6
AS
13090sed 's/^/| /' conftest.$ac_ext >&5
13091
c0d27fcc 13092( exit $ac_status )
98418dba 13093ac_cv_c_stack_direction=-1
ba4481b5 13094fi
35996d22 13095rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 13096fi
98418dba 13097fi
c0d27fcc 13098echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
98418dba
CW
13099echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
13100
c0d27fcc 13101cat >>confdefs.h <<_ACEOF
98418dba 13102#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
13103_ACEOF
13104
ba4481b5 13105
ba4481b5
DL
13106fi
13107
c0d27fcc 13108
98418dba
CW
13109# fmod, logb, and frexp are found in -lm on most systems.
13110# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
13111
c0d27fcc 13112echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
98418dba
CW
13113echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
13114if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 13115 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13116else
98418dba
CW
13117 ac_check_lib_save_LIBS=$LIBS
13118LIBS="-lm $LIBS"
13119cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13120/* confdefs.h. */
13121_ACEOF
13122cat confdefs.h >>conftest.$ac_ext
13123cat >>conftest.$ac_ext <<_ACEOF
13124/* end confdefs.h. */
ba4481b5 13125
98418dba
CW
13126/* Override any gcc2 internal prototype to avoid an error. */
13127#ifdef __cplusplus
13128extern "C"
13129#endif
13130/* We use char because int might match the return type of a gcc2
13131 builtin and then its argument prototype would still apply. */
13132char sqrt ();
503d2be0
AS
13133int
13134main ()
13135{
98418dba 13136sqrt ();
503d2be0
AS
13137 ;
13138 return 0;
13139}
13140_ACEOF
13141rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13142if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13143 (eval $ac_link) 2>conftest.er1
503d2be0 13144 ac_status=$?
35996d22
AS
13145 grep -v '^ *+' conftest.er1 >conftest.err
13146 rm -f conftest.er1
13147 cat conftest.err >&5
c0d27fcc 13148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13149 (exit $ac_status); } &&
4494a266
JD
13150 { ac_try='test -z "$ac_c_werror_flag"
13151 || test ! -s conftest.err'
35996d22
AS
13152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13153 (eval $ac_try) 2>&5
13154 ac_status=$?
13155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13156 (exit $ac_status); }; } &&
13157 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13159 (eval $ac_try) 2>&5
13160 ac_status=$?
c0d27fcc 13161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13162 (exit $ac_status); }; }; then
98418dba 13163 ac_cv_lib_m_sqrt=yes
ba4481b5 13164else
503d2be0 13165 echo "$as_me: failed program was:" >&5
19650fd6
AS
13166sed 's/^/| /' conftest.$ac_ext >&5
13167
98418dba 13168ac_cv_lib_m_sqrt=no
ba4481b5 13169fi
35996d22
AS
13170rm -f conftest.err conftest.$ac_objext \
13171 conftest$ac_exeext conftest.$ac_ext
98418dba 13172LIBS=$ac_check_lib_save_LIBS
ba4481b5 13173fi
c0d27fcc 13174echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
98418dba
CW
13175echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
13176if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 13177 cat >>confdefs.h <<_ACEOF
98418dba 13178#define HAVE_LIBM 1
c0d27fcc 13179_ACEOF
98418dba
CW
13180
13181 LIBS="-lm $LIBS"
ba4481b5 13182
ba4481b5
DL
13183fi
13184
c0d27fcc 13185
55597d70
DL
13186# Check for mail-locking functions in a "mail" library. Probably this should
13187# have the same check as for liblockfile below.
98418dba 13188
c0d27fcc 13189echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
98418dba
CW
13190echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6
13191if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 13192 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13193else
98418dba
CW
13194 ac_check_lib_save_LIBS=$LIBS
13195LIBS="-lmail $LIBS"
13196cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13197/* confdefs.h. */
13198_ACEOF
13199cat confdefs.h >>conftest.$ac_ext
13200cat >>conftest.$ac_ext <<_ACEOF
13201/* end confdefs.h. */
98418dba
CW
13202
13203/* Override any gcc2 internal prototype to avoid an error. */
13204#ifdef __cplusplus
13205extern "C"
13206#endif
13207/* We use char because int might match the return type of a gcc2
13208 builtin and then its argument prototype would still apply. */
13209char maillock ();
503d2be0
AS
13210int
13211main ()
13212{
98418dba 13213maillock ();
503d2be0
AS
13214 ;
13215 return 0;
13216}
13217_ACEOF
13218rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13219if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13220 (eval $ac_link) 2>conftest.er1
503d2be0 13221 ac_status=$?
35996d22
AS
13222 grep -v '^ *+' conftest.er1 >conftest.err
13223 rm -f conftest.er1
13224 cat conftest.err >&5
c0d27fcc 13225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13226 (exit $ac_status); } &&
4494a266
JD
13227 { ac_try='test -z "$ac_c_werror_flag"
13228 || test ! -s conftest.err'
35996d22
AS
13229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13230 (eval $ac_try) 2>&5
13231 ac_status=$?
13232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13233 (exit $ac_status); }; } &&
13234 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13236 (eval $ac_try) 2>&5
13237 ac_status=$?
c0d27fcc 13238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13239 (exit $ac_status); }; }; then
98418dba 13240 ac_cv_lib_mail_maillock=yes
ba4481b5 13241else
503d2be0 13242 echo "$as_me: failed program was:" >&5
19650fd6
AS
13243sed 's/^/| /' conftest.$ac_ext >&5
13244
98418dba 13245ac_cv_lib_mail_maillock=no
ba4481b5 13246fi
35996d22
AS
13247rm -f conftest.err conftest.$ac_objext \
13248 conftest$ac_exeext conftest.$ac_ext
98418dba 13249LIBS=$ac_check_lib_save_LIBS
ba4481b5 13250fi
c0d27fcc 13251echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
98418dba
CW
13252echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6
13253if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 13254 cat >>confdefs.h <<_ACEOF
98418dba 13255#define HAVE_LIBMAIL 1
c0d27fcc 13256_ACEOF
ba4481b5 13257
98418dba 13258 LIBS="-lmail $LIBS"
ba4481b5 13259
98418dba 13260fi
ba4481b5 13261
c0d27fcc
MR
13262
13263echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
98418dba
CW
13264echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6
13265if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 13266 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13267else
503d2be0 13268 ac_check_lib_save_LIBS=$LIBS
98418dba 13269LIBS="-llockfile $LIBS"
503d2be0 13270cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13271/* confdefs.h. */
13272_ACEOF
13273cat confdefs.h >>conftest.$ac_ext
13274cat >>conftest.$ac_ext <<_ACEOF
13275/* end confdefs.h. */
503d2be0 13276
ba4481b5 13277/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13278#ifdef __cplusplus
13279extern "C"
13280#endif
ba4481b5 13281/* We use char because int might match the return type of a gcc2
503d2be0 13282 builtin and then its argument prototype would still apply. */
98418dba 13283char maillock ();
503d2be0
AS
13284int
13285main ()
13286{
98418dba 13287maillock ();
503d2be0
AS
13288 ;
13289 return 0;
13290}
13291_ACEOF
13292rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13293if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13294 (eval $ac_link) 2>conftest.er1
503d2be0 13295 ac_status=$?
35996d22
AS
13296 grep -v '^ *+' conftest.er1 >conftest.err
13297 rm -f conftest.er1
13298 cat conftest.err >&5
c0d27fcc 13299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13300 (exit $ac_status); } &&
4494a266
JD
13301 { ac_try='test -z "$ac_c_werror_flag"
13302 || test ! -s conftest.err'
35996d22
AS
13303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13304 (eval $ac_try) 2>&5
13305 ac_status=$?
13306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13307 (exit $ac_status); }; } &&
13308 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13310 (eval $ac_try) 2>&5
13311 ac_status=$?
c0d27fcc 13312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13313 (exit $ac_status); }; }; then
98418dba 13314 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
13315else
13316 echo "$as_me: failed program was:" >&5
19650fd6
AS
13317sed 's/^/| /' conftest.$ac_ext >&5
13318
98418dba
CW
13319ac_cv_lib_lockfile_maillock=no
13320fi
35996d22
AS
13321rm -f conftest.err conftest.$ac_objext \
13322 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
13323LIBS=$ac_check_lib_save_LIBS
13324fi
c0d27fcc 13325echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
98418dba
CW
13326echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6
13327if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 13328 cat >>confdefs.h <<_ACEOF
98418dba 13329#define HAVE_LIBLOCKFILE 1
c0d27fcc 13330_ACEOF
98418dba
CW
13331
13332 LIBS="-llockfile $LIBS"
13333
13334fi
13335
13336# If we have the shared liblockfile, assume we must use it for mail
13337# locking (e.g. Debian). If we couldn't link against liblockfile
13338# (no liblockfile.a installed), ensure that we don't need to.
13339if test "$ac_cv_lib_lockfile_maillock" = no; then
13340 # Extract the first word of "liblockfile.so", so it can be a program name with args.
13341set dummy liblockfile.so; ac_word=$2
c0d27fcc 13342echo "$as_me:$LINENO: checking for $ac_word" >&5
98418dba
CW
13343echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13344if test "${ac_cv_prog_liblockfile+set}" = set; then
13345 echo $ECHO_N "(cached) $ECHO_C" >&6
13346else
13347 if test -n "$liblockfile"; then
13348 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
13349else
c0d27fcc 13350as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
13351as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
13352for as_dir in $as_dummy
c0d27fcc
MR
13353do
13354 IFS=$as_save_IFS
13355 test -z "$as_dir" && as_dir=.
13356 for ac_exec_ext in '' $ac_executable_extensions; do
13357 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13358 ac_cv_prog_liblockfile="yes"
13359 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13360 break 2
13361 fi
13362done
98418dba
CW
13363done
13364
13365 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 13366fi
503d2be0 13367fi
98418dba
CW
13368liblockfile=$ac_cv_prog_liblockfile
13369if test -n "$liblockfile"; then
c0d27fcc 13370 echo "$as_me:$LINENO: result: $liblockfile" >&5
98418dba
CW
13371echo "${ECHO_T}$liblockfile" >&6
13372else
c0d27fcc 13373 echo "$as_me:$LINENO: result: no" >&5
98418dba 13374echo "${ECHO_T}no" >&6
ba4481b5
DL
13375fi
13376
98418dba 13377 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 13378 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
13379This probably means that movemail could lose mail.
13380There may be a \`development' package to install containing liblockfile." >&5
13381echo "$as_me: error: Shared liblockfile found but can't link against it.
13382This probably means that movemail could lose mail.
13383There may be a \`development' package to install containing liblockfile." >&2;}
13384 { (exit 1); exit 1; }; }
98418dba 13385 else :
55597d70 13386 fi
98418dba 13387fi
503d2be0 13388
98418dba
CW
13389for ac_func in touchlock
13390do
13391as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13392echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
13393echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13394if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 13395 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 13396else
98418dba 13397 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13398/* confdefs.h. */
13399_ACEOF
13400cat confdefs.h >>conftest.$ac_ext
13401cat >>conftest.$ac_ext <<_ACEOF
13402/* end confdefs.h. */
35996d22
AS
13403/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13404 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13405#define $ac_func innocuous_$ac_func
13406
98418dba 13407/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
13408 which can conflict with char $ac_func (); below.
13409 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13410 <limits.h> exists even on freestanding compilers. */
35996d22 13411
19650fd6
AS
13412#ifdef __STDC__
13413# include <limits.h>
13414#else
13415# include <assert.h>
13416#endif
35996d22
AS
13417
13418#undef $ac_func
13419
457b792c 13420/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13421#ifdef __cplusplus
13422extern "C"
19650fd6 13423{
503d2be0 13424#endif
457b792c 13425/* We use char because int might match the return type of a gcc2
503d2be0 13426 builtin and then its argument prototype would still apply. */
98418dba 13427char $ac_func ();
98418dba
CW
13428/* The GNU C library defines this for functions which it implements
13429 to always fail with ENOSYS. Some functions are actually named
13430 something starting with __ and the normal name is an alias. */
13431#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13432choke me
13433#else
19650fd6
AS
13434char (*f) () = $ac_func;
13435#endif
13436#ifdef __cplusplus
13437}
cd958eb3
MB
13438#endif
13439
19650fd6
AS
13440int
13441main ()
13442{
13443return f != $ac_func;
503d2be0
AS
13444 ;
13445 return 0;
13446}
13447_ACEOF
13448rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13449if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13450 (eval $ac_link) 2>conftest.er1
503d2be0 13451 ac_status=$?
35996d22
AS
13452 grep -v '^ *+' conftest.er1 >conftest.err
13453 rm -f conftest.er1
13454 cat conftest.err >&5
c0d27fcc 13455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13456 (exit $ac_status); } &&
4494a266
JD
13457 { ac_try='test -z "$ac_c_werror_flag"
13458 || test ! -s conftest.err'
35996d22
AS
13459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13460 (eval $ac_try) 2>&5
13461 ac_status=$?
13462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13463 (exit $ac_status); }; } &&
13464 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13466 (eval $ac_try) 2>&5
13467 ac_status=$?
c0d27fcc 13468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13469 (exit $ac_status); }; }; then
98418dba 13470 eval "$as_ac_var=yes"
503d2be0
AS
13471else
13472 echo "$as_me: failed program was:" >&5
19650fd6
AS
13473sed 's/^/| /' conftest.$ac_ext >&5
13474
98418dba 13475eval "$as_ac_var=no"
503d2be0 13476fi
35996d22
AS
13477rm -f conftest.err conftest.$ac_objext \
13478 conftest$ac_exeext conftest.$ac_ext
503d2be0 13479fi
c0d27fcc 13480echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
13481echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13482if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 13483 cat >>confdefs.h <<_ACEOF
98418dba 13484#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 13485_ACEOF
457b792c 13486
457b792c 13487fi
98418dba 13488done
457b792c 13489
c0d27fcc 13490
98418dba
CW
13491for ac_header in maillock.h
13492do
13493as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
13494if eval "test \"\${$as_ac_Header+set}\" = set"; then
13495 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
13496echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13497if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 13498 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13499fi
13500echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13501echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba4481b5 13502else
c0d27fcc
MR
13503 # Is the header compilable?
13504echo "$as_me:$LINENO: checking $ac_header usability" >&5
13505echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13506cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13507/* confdefs.h. */
13508_ACEOF
13509cat confdefs.h >>conftest.$ac_ext
13510cat >>conftest.$ac_ext <<_ACEOF
13511/* end confdefs.h. */
c0d27fcc
MR
13512$ac_includes_default
13513#include <$ac_header>
13514_ACEOF
13515rm -f conftest.$ac_objext
13516if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 13517 (eval $ac_compile) 2>conftest.er1
c0d27fcc 13518 ac_status=$?
35996d22
AS
13519 grep -v '^ *+' conftest.er1 >conftest.err
13520 rm -f conftest.er1
13521 cat conftest.err >&5
c0d27fcc
MR
13522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13523 (exit $ac_status); } &&
4494a266
JD
13524 { ac_try='test -z "$ac_c_werror_flag"
13525 || test ! -s conftest.err'
35996d22
AS
13526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13527 (eval $ac_try) 2>&5
13528 ac_status=$?
13529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13530 (exit $ac_status); }; } &&
13531 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
13532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13533 (eval $ac_try) 2>&5
13534 ac_status=$?
13535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13536 (exit $ac_status); }; }; then
13537 ac_header_compiler=yes
13538else
13539 echo "$as_me: failed program was:" >&5
19650fd6
AS
13540sed 's/^/| /' conftest.$ac_ext >&5
13541
c0d27fcc
MR
13542ac_header_compiler=no
13543fi
35996d22 13544rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
13545echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13546echo "${ECHO_T}$ac_header_compiler" >&6
13547
13548# Is the header present?
13549echo "$as_me:$LINENO: checking $ac_header presence" >&5
13550echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13551cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13552/* confdefs.h. */
13553_ACEOF
13554cat confdefs.h >>conftest.$ac_ext
13555cat >>conftest.$ac_ext <<_ACEOF
13556/* end confdefs.h. */
98418dba 13557#include <$ac_header>
503d2be0 13558_ACEOF
c0d27fcc 13559if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 13560 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 13561 ac_status=$?
6bae0ccf 13562 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13563 rm -f conftest.er1
13564 cat conftest.err >&5
c0d27fcc 13565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
13566 (exit $ac_status); } >/dev/null; then
13567 if test -s conftest.err; then
13568 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 13569 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
13570 else
13571 ac_cpp_err=
13572 fi
503d2be0 13573else
98418dba 13574 ac_cpp_err=yes
503d2be0 13575fi
98418dba 13576if test -z "$ac_cpp_err"; then
c0d27fcc 13577 ac_header_preproc=yes
98418dba
CW
13578else
13579 echo "$as_me: failed program was:" >&5
19650fd6
AS
13580sed 's/^/| /' conftest.$ac_ext >&5
13581
c0d27fcc 13582 ac_header_preproc=no
503d2be0 13583fi
98418dba 13584rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
13585echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13586echo "${ECHO_T}$ac_header_preproc" >&6
13587
13588# So? What about this header?
35996d22
AS
13589case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13590 yes:no: )
c0d27fcc
MR
13591 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13592echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
13593 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13594echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13595 ac_header_preproc=yes
19650fd6 13596 ;;
35996d22 13597 no:yes:* )
c0d27fcc
MR
13598 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13599echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
13600 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13601echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13602 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13603echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13604 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
13605echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13606 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 13607echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
13608 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13609echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
13610 (
13611 cat <<\_ASBOX
35996d22
AS
13612## ------------------------------------------ ##
13613## Report this to the AC_PACKAGE_NAME lists. ##
13614## ------------------------------------------ ##
19650fd6
AS
13615_ASBOX
13616 ) |
13617 sed "s/^/$as_me: WARNING: /" >&2
13618 ;;
c0d27fcc
MR
13619esac
13620echo "$as_me:$LINENO: checking for $ac_header" >&5
13621echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13622if eval "test \"\${$as_ac_Header+set}\" = set"; then
13623 echo $ECHO_N "(cached) $ECHO_C" >&6
13624else
35996d22 13625 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 13626fi
c0d27fcc 13627echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 13628echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
13629
13630fi
98418dba 13631if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 13632 cat >>confdefs.h <<_ACEOF
98418dba 13633#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 13634_ACEOF
48d4b120 13635
ba4481b5 13636fi
c0d27fcc 13637
98418dba
CW
13638done
13639
c0d27fcc
MR
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
22044edf
DL
13695
13696
c0d27fcc 13697
b0e44248
RB
13698
13699
973a76b1
DL
13700
13701
13702
cd958eb3 13703
25ca0bca 13704
ea92fc9f 13705
c0d27fcc
MR
13706
13707
98418dba 13708for ac_func in gethostname getdomainname dup2 \
ea92fc9f 13709rename closedir mkdir rmdir sysinfo getrusage \
98418dba
CW
13710random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
13711strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 13712utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
13713__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
13714sendto recvfrom getsockopt setsockopt getsockname getpeername \
b0e44248 13715gai_strerror mkstemp getline getdelim mremap memmove fsync bzero \
4489ece2 13716memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
98418dba
CW
13717do
13718as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13719echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
13720echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13721if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 13722 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13723else
503d2be0 13724 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13725/* confdefs.h. */
13726_ACEOF
13727cat confdefs.h >>conftest.$ac_ext
13728cat >>conftest.$ac_ext <<_ACEOF
13729/* end confdefs.h. */
35996d22
AS
13730/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13731 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13732#define $ac_func innocuous_$ac_func
13733
98418dba 13734/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
13735 which can conflict with char $ac_func (); below.
13736 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13737 <limits.h> exists even on freestanding compilers. */
35996d22 13738
19650fd6
AS
13739#ifdef __STDC__
13740# include <limits.h>
13741#else
13742# include <assert.h>
13743#endif
35996d22
AS
13744
13745#undef $ac_func
13746
ba4481b5 13747/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13748#ifdef __cplusplus
13749extern "C"
19650fd6 13750{
503d2be0 13751#endif
ba4481b5 13752/* We use char because int might match the return type of a gcc2
503d2be0 13753 builtin and then its argument prototype would still apply. */
98418dba 13754char $ac_func ();
98418dba
CW
13755/* The GNU C library defines this for functions which it implements
13756 to always fail with ENOSYS. Some functions are actually named
13757 something starting with __ and the normal name is an alias. */
13758#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13759choke me
13760#else
19650fd6
AS
13761char (*f) () = $ac_func;
13762#endif
13763#ifdef __cplusplus
13764}
98418dba
CW
13765#endif
13766
19650fd6
AS
13767int
13768main ()
13769{
13770return f != $ac_func;
503d2be0
AS
13771 ;
13772 return 0;
13773}
13774_ACEOF
13775rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13776if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13777 (eval $ac_link) 2>conftest.er1
503d2be0 13778 ac_status=$?
35996d22
AS
13779 grep -v '^ *+' conftest.er1 >conftest.err
13780 rm -f conftest.er1
13781 cat conftest.err >&5
c0d27fcc 13782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13783 (exit $ac_status); } &&
4494a266
JD
13784 { ac_try='test -z "$ac_c_werror_flag"
13785 || test ! -s conftest.err'
35996d22
AS
13786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13787 (eval $ac_try) 2>&5
13788 ac_status=$?
13789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13790 (exit $ac_status); }; } &&
13791 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13793 (eval $ac_try) 2>&5
13794 ac_status=$?
c0d27fcc 13795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13796 (exit $ac_status); }; }; then
98418dba 13797 eval "$as_ac_var=yes"
503d2be0
AS
13798else
13799 echo "$as_me: failed program was:" >&5
19650fd6
AS
13800sed 's/^/| /' conftest.$ac_ext >&5
13801
98418dba 13802eval "$as_ac_var=no"
503d2be0 13803fi
35996d22
AS
13804rm -f conftest.err conftest.$ac_objext \
13805 conftest$ac_exeext conftest.$ac_ext
ba4481b5 13806fi
c0d27fcc 13807echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
13808echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13809if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 13810 cat >>confdefs.h <<_ACEOF
98418dba 13811#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 13812_ACEOF
ba4481b5 13813
ba4481b5 13814fi
98418dba 13815done
ba4481b5 13816
c0d27fcc
MR
13817
13818
98418dba
CW
13819for ac_header in sys/un.h
13820do
13821as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
13822if eval "test \"\${$as_ac_Header+set}\" = set"; then
13823 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
13824echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13825if eval "test \"\${$as_ac_Header+set}\" = set"; then
13826 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13827fi
13828echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13829echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 13830else
c0d27fcc
MR
13831 # Is the header compilable?
13832echo "$as_me:$LINENO: checking $ac_header usability" >&5
13833echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13834cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13835/* confdefs.h. */
13836_ACEOF
13837cat confdefs.h >>conftest.$ac_ext
13838cat >>conftest.$ac_ext <<_ACEOF
13839/* end confdefs.h. */
c0d27fcc
MR
13840$ac_includes_default
13841#include <$ac_header>
13842_ACEOF
13843rm -f conftest.$ac_objext
13844if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 13845 (eval $ac_compile) 2>conftest.er1
c0d27fcc 13846 ac_status=$?
35996d22
AS
13847 grep -v '^ *+' conftest.er1 >conftest.err
13848 rm -f conftest.er1
13849 cat conftest.err >&5
c0d27fcc
MR
13850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13851 (exit $ac_status); } &&
4494a266
JD
13852 { ac_try='test -z "$ac_c_werror_flag"
13853 || test ! -s conftest.err'
35996d22
AS
13854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13855 (eval $ac_try) 2>&5
13856 ac_status=$?
13857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13858 (exit $ac_status); }; } &&
13859 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
13860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13861 (eval $ac_try) 2>&5
13862 ac_status=$?
13863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13864 (exit $ac_status); }; }; then
13865 ac_header_compiler=yes
13866else
13867 echo "$as_me: failed program was:" >&5
19650fd6
AS
13868sed 's/^/| /' conftest.$ac_ext >&5
13869
c0d27fcc
MR
13870ac_header_compiler=no
13871fi
35996d22 13872rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
13873echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13874echo "${ECHO_T}$ac_header_compiler" >&6
13875
13876# Is the header present?
13877echo "$as_me:$LINENO: checking $ac_header presence" >&5
13878echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13879cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13880/* confdefs.h. */
13881_ACEOF
13882cat confdefs.h >>conftest.$ac_ext
13883cat >>conftest.$ac_ext <<_ACEOF
13884/* end confdefs.h. */
98418dba 13885#include <$ac_header>
503d2be0 13886_ACEOF
c0d27fcc 13887if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
13888 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13889 ac_status=$?
6bae0ccf 13890 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13891 rm -f conftest.er1
13892 cat conftest.err >&5
c0d27fcc 13893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13894 (exit $ac_status); } >/dev/null; then
13895 if test -s conftest.err; then
13896 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 13897 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
13898 else
13899 ac_cpp_err=
13900 fi
13901else
13902 ac_cpp_err=yes
13903fi
13904if test -z "$ac_cpp_err"; then
c0d27fcc 13905 ac_header_preproc=yes
ba4481b5 13906else
503d2be0 13907 echo "$as_me: failed program was:" >&5
19650fd6
AS
13908sed 's/^/| /' conftest.$ac_ext >&5
13909
c0d27fcc 13910 ac_header_preproc=no
ba4481b5 13911fi
503d2be0 13912rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
13913echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13914echo "${ECHO_T}$ac_header_preproc" >&6
13915
13916# So? What about this header?
35996d22
AS
13917case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13918 yes:no: )
c0d27fcc
MR
13919 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13920echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
13921 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13922echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13923 ac_header_preproc=yes
19650fd6 13924 ;;
35996d22 13925 no:yes:* )
c0d27fcc
MR
13926 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13927echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
13928 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13929echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13930 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13931echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13932 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
13933echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13934 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 13935echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
13936 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13937echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
13938 (
13939 cat <<\_ASBOX
35996d22
AS
13940## ------------------------------------------ ##
13941## Report this to the AC_PACKAGE_NAME lists. ##
13942## ------------------------------------------ ##
19650fd6
AS
13943_ASBOX
13944 ) |
13945 sed "s/^/$as_me: WARNING: /" >&2
13946 ;;
c0d27fcc
MR
13947esac
13948echo "$as_me:$LINENO: checking for $ac_header" >&5
13949echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13950if eval "test \"\${$as_ac_Header+set}\" = set"; then
13951 echo $ECHO_N "(cached) $ECHO_C" >&6
13952else
35996d22 13953 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 13954fi
c0d27fcc 13955echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
925c2f3f 13956echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
13957
13958fi
925c2f3f 13959if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 13960 cat >>confdefs.h <<_ACEOF
925c2f3f 13961#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 13962_ACEOF
503d2be0 13963
925c2f3f 13964fi
c0d27fcc 13965
925c2f3f
EZ
13966done
13967
c0d27fcc
MR
13968
13969
13970
35996d22
AS
13971
13972for ac_header in stdlib.h sys/time.h unistd.h
925c2f3f
EZ
13973do
13974as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
13975if eval "test \"\${$as_ac_Header+set}\" = set"; then
13976 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
13977echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13978if eval "test \"\${$as_ac_Header+set}\" = set"; then
13979 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13980fi
13981echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13982echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
925c2f3f 13983else
c0d27fcc
MR
13984 # Is the header compilable?
13985echo "$as_me:$LINENO: checking $ac_header usability" >&5
13986echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13987cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13988/* confdefs.h. */
13989_ACEOF
13990cat confdefs.h >>conftest.$ac_ext
13991cat >>conftest.$ac_ext <<_ACEOF
13992/* end confdefs.h. */
c0d27fcc
MR
13993$ac_includes_default
13994#include <$ac_header>
13995_ACEOF
13996rm -f conftest.$ac_objext
13997if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 13998 (eval $ac_compile) 2>conftest.er1
c0d27fcc 13999 ac_status=$?
35996d22
AS
14000 grep -v '^ *+' conftest.er1 >conftest.err
14001 rm -f conftest.er1
14002 cat conftest.err >&5
c0d27fcc
MR
14003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14004 (exit $ac_status); } &&
4494a266
JD
14005 { ac_try='test -z "$ac_c_werror_flag"
14006 || test ! -s conftest.err'
35996d22
AS
14007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14008 (eval $ac_try) 2>&5
14009 ac_status=$?
14010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14011 (exit $ac_status); }; } &&
14012 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
14013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14014 (eval $ac_try) 2>&5
14015 ac_status=$?
14016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14017 (exit $ac_status); }; }; then
14018 ac_header_compiler=yes
14019else
14020 echo "$as_me: failed program was:" >&5
19650fd6
AS
14021sed 's/^/| /' conftest.$ac_ext >&5
14022
c0d27fcc
MR
14023ac_header_compiler=no
14024fi
35996d22 14025rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14026echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14027echo "${ECHO_T}$ac_header_compiler" >&6
14028
14029# Is the header present?
14030echo "$as_me:$LINENO: checking $ac_header presence" >&5
14031echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14032cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14033/* confdefs.h. */
14034_ACEOF
14035cat confdefs.h >>conftest.$ac_ext
14036cat >>conftest.$ac_ext <<_ACEOF
14037/* end confdefs.h. */
98418dba 14038#include <$ac_header>
503d2be0 14039_ACEOF
c0d27fcc 14040if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
14041 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14042 ac_status=$?
6bae0ccf 14043 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
14044 rm -f conftest.er1
14045 cat conftest.err >&5
c0d27fcc 14046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14047 (exit $ac_status); } >/dev/null; then
14048 if test -s conftest.err; then
14049 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 14050 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
14051 else
14052 ac_cpp_err=
14053 fi
14054else
14055 ac_cpp_err=yes
14056fi
14057if test -z "$ac_cpp_err"; then
c0d27fcc 14058 ac_header_preproc=yes
98418dba
CW
14059else
14060 echo "$as_me: failed program was:" >&5
19650fd6
AS
14061sed 's/^/| /' conftest.$ac_ext >&5
14062
c0d27fcc 14063 ac_header_preproc=no
98418dba
CW
14064fi
14065rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14066echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14067echo "${ECHO_T}$ac_header_preproc" >&6
14068
14069# So? What about this header?
35996d22
AS
14070case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14071 yes:no: )
c0d27fcc
MR
14072 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14073echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
14074 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14075echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14076 ac_header_preproc=yes
19650fd6 14077 ;;
35996d22 14078 no:yes:* )
c0d27fcc
MR
14079 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14080echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
14081 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14082echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14083 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14084echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14085 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14086echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14087 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14088echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
14089 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14090echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14091 (
14092 cat <<\_ASBOX
35996d22
AS
14093## ------------------------------------------ ##
14094## Report this to the AC_PACKAGE_NAME lists. ##
14095## ------------------------------------------ ##
19650fd6
AS
14096_ASBOX
14097 ) |
14098 sed "s/^/$as_me: WARNING: /" >&2
14099 ;;
c0d27fcc
MR
14100esac
14101echo "$as_me:$LINENO: checking for $ac_header" >&5
14102echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14103if eval "test \"\${$as_ac_Header+set}\" = set"; then
14104 echo $ECHO_N "(cached) $ECHO_C" >&6
14105else
35996d22 14106 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 14107fi
c0d27fcc 14108echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 14109echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14110
14111fi
98418dba 14112if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14113 cat >>confdefs.h <<_ACEOF
98418dba 14114#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14115_ACEOF
98418dba
CW
14116
14117fi
c0d27fcc 14118
98418dba
CW
14119done
14120
c0d27fcc 14121
98418dba
CW
14122for ac_func in alarm
14123do
14124as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14125echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14126echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14127if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14128 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14129else
98418dba 14130 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14131/* confdefs.h. */
14132_ACEOF
14133cat confdefs.h >>conftest.$ac_ext
14134cat >>conftest.$ac_ext <<_ACEOF
14135/* end confdefs.h. */
35996d22
AS
14136/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14137 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14138#define $ac_func innocuous_$ac_func
14139
98418dba 14140/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14141 which can conflict with char $ac_func (); below.
14142 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14143 <limits.h> exists even on freestanding compilers. */
35996d22 14144
19650fd6
AS
14145#ifdef __STDC__
14146# include <limits.h>
14147#else
14148# include <assert.h>
14149#endif
35996d22
AS
14150
14151#undef $ac_func
14152
ba4481b5 14153/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14154#ifdef __cplusplus
14155extern "C"
19650fd6 14156{
503d2be0 14157#endif
ba4481b5 14158/* We use char because int might match the return type of a gcc2
503d2be0 14159 builtin and then its argument prototype would still apply. */
98418dba 14160char $ac_func ();
98418dba
CW
14161/* The GNU C library defines this for functions which it implements
14162 to always fail with ENOSYS. Some functions are actually named
14163 something starting with __ and the normal name is an alias. */
14164#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14165choke me
14166#else
19650fd6
AS
14167char (*f) () = $ac_func;
14168#endif
14169#ifdef __cplusplus
14170}
98418dba
CW
14171#endif
14172
19650fd6
AS
14173int
14174main ()
14175{
14176return f != $ac_func;
503d2be0
AS
14177 ;
14178 return 0;
14179}
14180_ACEOF
14181rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14182if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14183 (eval $ac_link) 2>conftest.er1
503d2be0 14184 ac_status=$?
35996d22
AS
14185 grep -v '^ *+' conftest.er1 >conftest.err
14186 rm -f conftest.er1
14187 cat conftest.err >&5
c0d27fcc 14188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14189 (exit $ac_status); } &&
4494a266
JD
14190 { ac_try='test -z "$ac_c_werror_flag"
14191 || test ! -s conftest.err'
35996d22
AS
14192 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14193 (eval $ac_try) 2>&5
14194 ac_status=$?
14195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14196 (exit $ac_status); }; } &&
14197 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14199 (eval $ac_try) 2>&5
14200 ac_status=$?
c0d27fcc 14201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14202 (exit $ac_status); }; }; then
98418dba 14203 eval "$as_ac_var=yes"
503d2be0
AS
14204else
14205 echo "$as_me: failed program was:" >&5
19650fd6
AS
14206sed 's/^/| /' conftest.$ac_ext >&5
14207
98418dba 14208eval "$as_ac_var=no"
503d2be0 14209fi
35996d22
AS
14210rm -f conftest.err conftest.$ac_objext \
14211 conftest$ac_exeext conftest.$ac_ext
ffe36136 14212fi
c0d27fcc 14213echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14214echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14215if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14216 cat >>confdefs.h <<_ACEOF
98418dba 14217#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14218_ACEOF
ffe36136 14219
ba4481b5 14220fi
98418dba 14221done
ba4481b5 14222
c0d27fcc 14223echo "$as_me:$LINENO: checking for working mktime" >&5
98418dba
CW
14224echo $ECHO_N "checking for working mktime... $ECHO_C" >&6
14225if test "${ac_cv_func_working_mktime+set}" = set; then
14226 echo $ECHO_N "(cached) $ECHO_C" >&6
14227else
14228 if test "$cross_compiling" = yes; then
14229 ac_cv_func_working_mktime=no
14230else
14231 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14232/* confdefs.h. */
14233_ACEOF
14234cat confdefs.h >>conftest.$ac_ext
14235cat >>conftest.$ac_ext <<_ACEOF
14236/* end confdefs.h. */
98418dba
CW
14237/* Test program from Paul Eggert and Tony Leneis. */
14238#if TIME_WITH_SYS_TIME
14239# include <sys/time.h>
14240# include <time.h>
14241#else
14242# if HAVE_SYS_TIME_H
14243# include <sys/time.h>
14244# else
14245# include <time.h>
14246# endif
14247#endif
ba4481b5 14248
35996d22
AS
14249#if HAVE_STDLIB_H
14250# include <stdlib.h>
14251#endif
14252
98418dba
CW
14253#if HAVE_UNISTD_H
14254# include <unistd.h>
14255#endif
ba4481b5 14256
98418dba
CW
14257#if !HAVE_ALARM
14258# define alarm(X) /* empty */
14259#endif
df645f7c 14260
98418dba
CW
14261/* Work around redefinition to rpl_putenv by other config tests. */
14262#undef putenv
df645f7c 14263
98418dba 14264static time_t time_t_max;
35996d22 14265static time_t time_t_min;
df645f7c 14266
98418dba 14267/* Values we'll use to set the TZ environment variable. */
35996d22
AS
14268static char *tz_strings[] = {
14269 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
14270 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
14271};
14272#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 14273
98418dba
CW
14274/* Fail if mktime fails to convert a date in the spring-forward gap.
14275 Based on a problem report from Andreas Jaeger. */
14276static void
14277spring_forward_gap ()
14278{
14279 /* glibc (up to about 1998-10-07) failed this test. */
14280 struct tm tm;
14281
14282 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
14283 instead of "TZ=America/Vancouver" in order to detect the bug even
14284 on systems that don't support the Olson extension, or don't have the
14285 full zoneinfo tables installed. */
14286 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
14287
14288 tm.tm_year = 98;
14289 tm.tm_mon = 3;
14290 tm.tm_mday = 5;
14291 tm.tm_hour = 2;
14292 tm.tm_min = 0;
14293 tm.tm_sec = 0;
14294 tm.tm_isdst = -1;
14295 if (mktime (&tm) == (time_t)-1)
14296 exit (1);
14297}
14298
14299static void
35996d22 14300mktime_test1 (now)
98418dba
CW
14301 time_t now;
14302{
14303 struct tm *lt;
14304 if ((lt = localtime (&now)) && mktime (lt) != now)
14305 exit (1);
35996d22
AS
14306}
14307
14308static void
14309mktime_test (now)
14310 time_t now;
14311{
14312 mktime_test1 (now);
14313 mktime_test1 ((time_t) (time_t_max - now));
14314 mktime_test1 ((time_t) (time_t_min + now));
98418dba
CW
14315}
14316
14317static void
14318irix_6_4_bug ()
14319{
14320 /* Based on code from Ariel Faigon. */
14321 struct tm tm;
14322 tm.tm_year = 96;
14323 tm.tm_mon = 3;
14324 tm.tm_mday = 0;
14325 tm.tm_hour = 0;
14326 tm.tm_min = 0;
14327 tm.tm_sec = 0;
14328 tm.tm_isdst = -1;
14329 mktime (&tm);
14330 if (tm.tm_mon != 2 || tm.tm_mday != 31)
14331 exit (1);
14332}
14333
14334static void
14335bigtime_test (j)
14336 int j;
14337{
14338 struct tm tm;
14339 time_t now;
14340 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
14341 now = mktime (&tm);
14342 if (now != (time_t) -1)
14343 {
14344 struct tm *lt = localtime (&now);
14345 if (! (lt
14346 && lt->tm_year == tm.tm_year
14347 && lt->tm_mon == tm.tm_mon
14348 && lt->tm_mday == tm.tm_mday
14349 && lt->tm_hour == tm.tm_hour
14350 && lt->tm_min == tm.tm_min
14351 && lt->tm_sec == tm.tm_sec
14352 && lt->tm_yday == tm.tm_yday
14353 && lt->tm_wday == tm.tm_wday
14354 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
14355 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
14356 exit (1);
14357 }
14358}
14359
14360int
14361main ()
14362{
14363 time_t t, delta;
14364 int i, j;
14365
14366 /* This test makes some buggy mktime implementations loop.
14367 Give up after 60 seconds; a mktime slower than that
14368 isn't worth using anyway. */
14369 alarm (60);
14370
14371 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
14372 continue;
14373 time_t_max--;
35996d22
AS
14374 if ((time_t) -1 < 0)
14375 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
14376 continue;
98418dba
CW
14377 delta = time_t_max / 997; /* a suitable prime number */
14378 for (i = 0; i < N_STRINGS; i++)
14379 {
14380 if (tz_strings[i])
14381 putenv (tz_strings[i]);
503d2be0 14382
98418dba
CW
14383 for (t = 0; t <= time_t_max - delta; t += delta)
14384 mktime_test (t);
35996d22
AS
14385 mktime_test ((time_t) 1);
14386 mktime_test ((time_t) (60 * 60));
14387 mktime_test ((time_t) (60 * 60 * 24));
98418dba
CW
14388
14389 for (j = 1; 0 < j; j *= 2)
35996d22 14390 bigtime_test (j);
98418dba
CW
14391 bigtime_test (j - 1);
14392 }
14393 irix_6_4_bug ();
14394 spring_forward_gap ();
14395 exit (0);
503d2be0
AS
14396}
14397_ACEOF
98418dba 14398rm -f conftest$ac_exeext
c0d27fcc 14399if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14400 (eval $ac_link) 2>&5
14401 ac_status=$?
c0d27fcc 14402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 14403 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 14404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14405 (eval $ac_try) 2>&5
14406 ac_status=$?
c0d27fcc 14407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14408 (exit $ac_status); }; }; then
98418dba 14409 ac_cv_func_working_mktime=yes
503d2be0 14410else
98418dba
CW
14411 echo "$as_me: program exited with status $ac_status" >&5
14412echo "$as_me: failed program was:" >&5
19650fd6
AS
14413sed 's/^/| /' conftest.$ac_ext >&5
14414
c0d27fcc 14415( exit $ac_status )
98418dba 14416ac_cv_func_working_mktime=no
503d2be0 14417fi
35996d22 14418rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 14419fi
ba4481b5 14420fi
c0d27fcc 14421echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
98418dba
CW
14422echo "${ECHO_T}$ac_cv_func_working_mktime" >&6
14423if test $ac_cv_func_working_mktime = no; then
35996d22
AS
14424 case $LIBOBJS in
14425 "mktime.$ac_objext" | \
14426 *" mktime.$ac_objext" | \
14427 "mktime.$ac_objext "* | \
14428 *" mktime.$ac_objext "* ) ;;
14429 *) LIBOBJS="$LIBOBJS mktime.$ac_objext" ;;
14430esac
14431
ba4481b5
DL
14432fi
14433
98418dba 14434if test "$ac_cv_func_working_mktime" = no; then
b936fae4 14435
c0d27fcc 14436cat >>confdefs.h <<\_ACEOF
98418dba 14437#define BROKEN_MKTIME 1
c0d27fcc 14438_ACEOF
ba4481b5 14439
ba4481b5 14440fi
503d2be0 14441
98418dba
CW
14442ac_have_func=no # yes means we've found a way to get the load average.
14443
6bae0ccf
DL
14444# Make sure getloadavg.c is where it belongs, at configure-time.
14445test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
14446 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
14447echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
14448 { (exit 1); exit 1; }; }
14449
98418dba
CW
14450ac_save_LIBS=$LIBS
14451
14452# Check for getloadavg, but be sure not to touch the cache variable.
c0d27fcc 14453(echo "$as_me:$LINENO: checking for getloadavg" >&5
98418dba
CW
14454echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6
14455if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 14456 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14457else
503d2be0 14458 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14459/* confdefs.h. */
14460_ACEOF
14461cat confdefs.h >>conftest.$ac_ext
14462cat >>conftest.$ac_ext <<_ACEOF
14463/* end confdefs.h. */
35996d22
AS
14464/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
14465 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14466#define getloadavg innocuous_getloadavg
14467
98418dba 14468/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14469 which can conflict with char getloadavg (); below.
14470 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14471 <limits.h> exists even on freestanding compilers. */
35996d22 14472
19650fd6
AS
14473#ifdef __STDC__
14474# include <limits.h>
14475#else
14476# include <assert.h>
14477#endif
35996d22
AS
14478
14479#undef getloadavg
14480
ba4481b5 14481/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14482#ifdef __cplusplus
14483extern "C"
19650fd6 14484{
503d2be0 14485#endif
ba4481b5 14486/* We use char because int might match the return type of a gcc2
503d2be0 14487 builtin and then its argument prototype would still apply. */
98418dba 14488char getloadavg ();
98418dba
CW
14489/* The GNU C library defines this for functions which it implements
14490 to always fail with ENOSYS. Some functions are actually named
14491 something starting with __ and the normal name is an alias. */
14492#if defined (__stub_getloadavg) || defined (__stub___getloadavg)
14493choke me
14494#else
19650fd6
AS
14495char (*f) () = getloadavg;
14496#endif
14497#ifdef __cplusplus
14498}
cd958eb3
MB
14499#endif
14500
19650fd6
AS
14501int
14502main ()
14503{
14504return f != getloadavg;
503d2be0
AS
14505 ;
14506 return 0;
14507}
14508_ACEOF
14509rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14510if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14511 (eval $ac_link) 2>conftest.er1
503d2be0 14512 ac_status=$?
35996d22
AS
14513 grep -v '^ *+' conftest.er1 >conftest.err
14514 rm -f conftest.er1
14515 cat conftest.err >&5
c0d27fcc 14516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14517 (exit $ac_status); } &&
4494a266
JD
14518 { ac_try='test -z "$ac_c_werror_flag"
14519 || test ! -s conftest.err'
35996d22
AS
14520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14521 (eval $ac_try) 2>&5
14522 ac_status=$?
14523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14524 (exit $ac_status); }; } &&
14525 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14527 (eval $ac_try) 2>&5
14528 ac_status=$?
c0d27fcc 14529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14530 (exit $ac_status); }; }; then
98418dba 14531 ac_cv_func_getloadavg=yes
503d2be0
AS
14532else
14533 echo "$as_me: failed program was:" >&5
19650fd6
AS
14534sed 's/^/| /' conftest.$ac_ext >&5
14535
98418dba 14536ac_cv_func_getloadavg=no
503d2be0 14537fi
35996d22
AS
14538rm -f conftest.err conftest.$ac_objext \
14539 conftest$ac_exeext conftest.$ac_ext
ba4481b5 14540fi
c0d27fcc 14541echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
98418dba
CW
14542echo "${ECHO_T}$ac_cv_func_getloadavg" >&6
14543if test $ac_cv_func_getloadavg = yes; then
14544 exit 0
14545else
14546 exit 1
ba4481b5 14547fi
98418dba 14548) && ac_have_func=yes
ba4481b5 14549
98418dba 14550# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 14551
98418dba
CW
14552for ac_func in pstat_getdynamic
14553do
14554as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14555echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14556echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14557if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14558 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14559else
503d2be0 14560 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14561/* confdefs.h. */
14562_ACEOF
14563cat confdefs.h >>conftest.$ac_ext
14564cat >>conftest.$ac_ext <<_ACEOF
14565/* end confdefs.h. */
35996d22
AS
14566/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14567 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14568#define $ac_func innocuous_$ac_func
14569
98418dba 14570/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14571 which can conflict with char $ac_func (); below.
14572 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14573 <limits.h> exists even on freestanding compilers. */
35996d22 14574
19650fd6
AS
14575#ifdef __STDC__
14576# include <limits.h>
14577#else
14578# include <assert.h>
14579#endif
35996d22
AS
14580
14581#undef $ac_func
14582
ba4481b5 14583/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14584#ifdef __cplusplus
14585extern "C"
19650fd6 14586{
503d2be0 14587#endif
ba4481b5 14588/* We use char because int might match the return type of a gcc2
503d2be0 14589 builtin and then its argument prototype would still apply. */
98418dba 14590char $ac_func ();
98418dba
CW
14591/* The GNU C library defines this for functions which it implements
14592 to always fail with ENOSYS. Some functions are actually named
14593 something starting with __ and the normal name is an alias. */
14594#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14595choke me
14596#else
19650fd6
AS
14597char (*f) () = $ac_func;
14598#endif
14599#ifdef __cplusplus
14600}
98418dba
CW
14601#endif
14602
19650fd6
AS
14603int
14604main ()
14605{
14606return f != $ac_func;
98418dba
CW
14607 ;
14608 return 0;
14609}
f21fadcc 14610_ACEOF
98418dba 14611rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14612if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14613 (eval $ac_link) 2>conftest.er1
f21fadcc 14614 ac_status=$?
35996d22
AS
14615 grep -v '^ *+' conftest.er1 >conftest.err
14616 rm -f conftest.er1
14617 cat conftest.err >&5
c0d27fcc 14618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 14619 (exit $ac_status); } &&
4494a266
JD
14620 { ac_try='test -z "$ac_c_werror_flag"
14621 || test ! -s conftest.err'
35996d22
AS
14622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14623 (eval $ac_try) 2>&5
14624 ac_status=$?
14625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14626 (exit $ac_status); }; } &&
14627 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
14629 (eval $ac_try) 2>&5
14630 ac_status=$?
c0d27fcc 14631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
14632 (exit $ac_status); }; }; then
14633 eval "$as_ac_var=yes"
f21fadcc
JD
14634else
14635 echo "$as_me: failed program was:" >&5
19650fd6
AS
14636sed 's/^/| /' conftest.$ac_ext >&5
14637
98418dba 14638eval "$as_ac_var=no"
f21fadcc 14639fi
35996d22
AS
14640rm -f conftest.err conftest.$ac_objext \
14641 conftest$ac_exeext conftest.$ac_ext
f21fadcc 14642fi
c0d27fcc 14643echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14644echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14645if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14646 cat >>confdefs.h <<_ACEOF
98418dba 14647#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14648_ACEOF
98418dba
CW
14649
14650fi
14651done
14652
c0d27fcc 14653
98418dba
CW
14654# Solaris has libkstat which does not require root.
14655
c0d27fcc 14656echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
98418dba
CW
14657echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
14658if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
14659 echo $ECHO_N "(cached) $ECHO_C" >&6
14660else
14661 ac_check_lib_save_LIBS=$LIBS
98418dba 14662LIBS="-lkstat $LIBS"
f21fadcc 14663cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14664/* confdefs.h. */
14665_ACEOF
14666cat confdefs.h >>conftest.$ac_ext
14667cat >>conftest.$ac_ext <<_ACEOF
14668/* end confdefs.h. */
f21fadcc
JD
14669
14670/* Override any gcc2 internal prototype to avoid an error. */
14671#ifdef __cplusplus
14672extern "C"
14673#endif
14674/* We use char because int might match the return type of a gcc2
14675 builtin and then its argument prototype would still apply. */
98418dba 14676char kstat_open ();
f21fadcc
JD
14677int
14678main ()
14679{
98418dba 14680kstat_open ();
f21fadcc
JD
14681 ;
14682 return 0;
14683}
14684_ACEOF
14685rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14686if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14687 (eval $ac_link) 2>conftest.er1
f21fadcc 14688 ac_status=$?
35996d22
AS
14689 grep -v '^ *+' conftest.er1 >conftest.err
14690 rm -f conftest.er1
14691 cat conftest.err >&5
c0d27fcc 14692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 14693 (exit $ac_status); } &&
4494a266
JD
14694 { ac_try='test -z "$ac_c_werror_flag"
14695 || test ! -s conftest.err'
35996d22
AS
14696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14697 (eval $ac_try) 2>&5
14698 ac_status=$?
14699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14700 (exit $ac_status); }; } &&
14701 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
f21fadcc
JD
14703 (eval $ac_try) 2>&5
14704 ac_status=$?
c0d27fcc 14705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 14706 (exit $ac_status); }; }; then
98418dba 14707 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
14708else
14709 echo "$as_me: failed program was:" >&5
19650fd6
AS
14710sed 's/^/| /' conftest.$ac_ext >&5
14711
98418dba 14712ac_cv_lib_kstat_kstat_open=no
f21fadcc 14713fi
35996d22
AS
14714rm -f conftest.err conftest.$ac_objext \
14715 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
14716LIBS=$ac_check_lib_save_LIBS
14717fi
c0d27fcc 14718echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
98418dba
CW
14719echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6
14720if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 14721 cat >>confdefs.h <<_ACEOF
98418dba 14722#define HAVE_LIBKSTAT 1
c0d27fcc 14723_ACEOF
f21fadcc 14724
98418dba 14725 LIBS="-lkstat $LIBS"
f21fadcc 14726
f21fadcc
JD
14727fi
14728
98418dba
CW
14729test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
14730
14731# Some systems with -lutil have (and need) -lkvm as well, some do not.
14732# On Solaris, -lkvm requires nlist from -lelf, so check that first
14733# to get the right answer into the cache.
14734# For kstat on solaris, we need libelf to force the definition of SVR4 below.
14735if test $ac_have_func = no; then
c0d27fcc 14736 echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
98418dba
CW
14737echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
14738if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 14739 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14740else
98418dba
CW
14741 ac_check_lib_save_LIBS=$LIBS
14742LIBS="-lelf $LIBS"
14743cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14744/* confdefs.h. */
14745_ACEOF
14746cat confdefs.h >>conftest.$ac_ext
14747cat >>conftest.$ac_ext <<_ACEOF
14748/* end confdefs.h. */
98418dba
CW
14749
14750/* Override any gcc2 internal prototype to avoid an error. */
14751#ifdef __cplusplus
14752extern "C"
14753#endif
14754/* We use char because int might match the return type of a gcc2
14755 builtin and then its argument prototype would still apply. */
14756char elf_begin ();
503d2be0
AS
14757int
14758main ()
14759{
98418dba 14760elf_begin ();
503d2be0
AS
14761 ;
14762 return 0;
14763}
14764_ACEOF
14765rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14766if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14767 (eval $ac_link) 2>conftest.er1
503d2be0 14768 ac_status=$?
35996d22
AS
14769 grep -v '^ *+' conftest.er1 >conftest.err
14770 rm -f conftest.er1
14771 cat conftest.err >&5
c0d27fcc 14772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14773 (exit $ac_status); } &&
4494a266
JD
14774 { ac_try='test -z "$ac_c_werror_flag"
14775 || test ! -s conftest.err'
35996d22
AS
14776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14777 (eval $ac_try) 2>&5
14778 ac_status=$?
14779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14780 (exit $ac_status); }; } &&
14781 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14783 (eval $ac_try) 2>&5
14784 ac_status=$?
c0d27fcc 14785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14786 (exit $ac_status); }; }; then
98418dba 14787 ac_cv_lib_elf_elf_begin=yes
ba4481b5 14788else
503d2be0 14789 echo "$as_me: failed program was:" >&5
19650fd6
AS
14790sed 's/^/| /' conftest.$ac_ext >&5
14791
98418dba 14792ac_cv_lib_elf_elf_begin=no
ba4481b5 14793fi
35996d22
AS
14794rm -f conftest.err conftest.$ac_objext \
14795 conftest$ac_exeext conftest.$ac_ext
98418dba 14796LIBS=$ac_check_lib_save_LIBS
ba4481b5 14797fi
c0d27fcc 14798echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
98418dba
CW
14799echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
14800if test $ac_cv_lib_elf_elf_begin = yes; then
14801 LIBS="-lelf $LIBS"
ba4481b5
DL
14802fi
14803
98418dba
CW
14804fi
14805if test $ac_have_func = no; then
c0d27fcc 14806 echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
98418dba
CW
14807echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6
14808if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 14809 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14810else
98418dba
CW
14811 ac_check_lib_save_LIBS=$LIBS
14812LIBS="-lkvm $LIBS"
14813cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14814/* confdefs.h. */
14815_ACEOF
14816cat confdefs.h >>conftest.$ac_ext
14817cat >>conftest.$ac_ext <<_ACEOF
14818/* end confdefs.h. */
98418dba
CW
14819
14820/* Override any gcc2 internal prototype to avoid an error. */
14821#ifdef __cplusplus
14822extern "C"
14823#endif
14824/* We use char because int might match the return type of a gcc2
14825 builtin and then its argument prototype would still apply. */
14826char kvm_open ();
503d2be0
AS
14827int
14828main ()
14829{
98418dba 14830kvm_open ();
503d2be0
AS
14831 ;
14832 return 0;
14833}
14834_ACEOF
14835rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14836if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14837 (eval $ac_link) 2>conftest.er1
503d2be0 14838 ac_status=$?
35996d22
AS
14839 grep -v '^ *+' conftest.er1 >conftest.err
14840 rm -f conftest.er1
14841 cat conftest.err >&5
c0d27fcc 14842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14843 (exit $ac_status); } &&
4494a266
JD
14844 { ac_try='test -z "$ac_c_werror_flag"
14845 || test ! -s conftest.err'
35996d22
AS
14846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14847 (eval $ac_try) 2>&5
14848 ac_status=$?
14849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14850 (exit $ac_status); }; } &&
14851 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14853 (eval $ac_try) 2>&5
14854 ac_status=$?
c0d27fcc 14855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14856 (exit $ac_status); }; }; then
98418dba 14857 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
14858else
14859 echo "$as_me: failed program was:" >&5
19650fd6
AS
14860sed 's/^/| /' conftest.$ac_ext >&5
14861
98418dba 14862ac_cv_lib_kvm_kvm_open=no
503d2be0 14863fi
35996d22
AS
14864rm -f conftest.err conftest.$ac_objext \
14865 conftest$ac_exeext conftest.$ac_ext
98418dba 14866LIBS=$ac_check_lib_save_LIBS
503d2be0 14867fi
c0d27fcc 14868echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
98418dba
CW
14869echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6
14870if test $ac_cv_lib_kvm_kvm_open = yes; then
14871 LIBS="-lkvm $LIBS"
ba4481b5
DL
14872fi
14873
98418dba 14874 # Check for the 4.4BSD definition of getloadavg.
c0d27fcc 14875 echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
98418dba
CW
14876echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6
14877if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 14878 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14879else
98418dba
CW
14880 ac_check_lib_save_LIBS=$LIBS
14881LIBS="-lutil $LIBS"
14882cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14883/* confdefs.h. */
14884_ACEOF
14885cat confdefs.h >>conftest.$ac_ext
14886cat >>conftest.$ac_ext <<_ACEOF
14887/* end confdefs.h. */
98418dba
CW
14888
14889/* Override any gcc2 internal prototype to avoid an error. */
14890#ifdef __cplusplus
14891extern "C"
14892#endif
14893/* We use char because int might match the return type of a gcc2
14894 builtin and then its argument prototype would still apply. */
14895char getloadavg ();
503d2be0
AS
14896int
14897main ()
14898{
98418dba 14899getloadavg ();
503d2be0
AS
14900 ;
14901 return 0;
14902}
14903_ACEOF
14904rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14905if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14906 (eval $ac_link) 2>conftest.er1
503d2be0 14907 ac_status=$?
35996d22
AS
14908 grep -v '^ *+' conftest.er1 >conftest.err
14909 rm -f conftest.er1
14910 cat conftest.err >&5
c0d27fcc 14911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14912 (exit $ac_status); } &&
4494a266
JD
14913 { ac_try='test -z "$ac_c_werror_flag"
14914 || test ! -s conftest.err'
c0d27fcc 14915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14916 (eval $ac_try) 2>&5
14917 ac_status=$?
c0d27fcc 14918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
35996d22
AS
14919 (exit $ac_status); }; } &&
14920 { ac_try='test -s conftest$ac_exeext'
14921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14922 (eval $ac_try) 2>&5
14923 ac_status=$?
14924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14925 (exit $ac_status); }; }; then
14926 ac_cv_lib_util_getloadavg=yes
14927else
503d2be0 14928 echo "$as_me: failed program was:" >&5
19650fd6
AS
14929sed 's/^/| /' conftest.$ac_ext >&5
14930
98418dba 14931ac_cv_lib_util_getloadavg=no
ba4481b5 14932fi
35996d22
AS
14933rm -f conftest.err conftest.$ac_objext \
14934 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
14935LIBS=$ac_check_lib_save_LIBS
14936fi
c0d27fcc 14937echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
98418dba
CW
14938echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6
14939if test $ac_cv_lib_util_getloadavg = yes; then
14940 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 14941fi
503d2be0 14942
98418dba 14943fi
ba4481b5 14944
98418dba
CW
14945if test $ac_have_func = no; then
14946 # There is a commonly available library for RS/6000 AIX.
14947 # Since it is not a standard part of AIX, it might be installed locally.
14948 ac_getloadavg_LIBS=$LIBS
14949 LIBS="-L/usr/local/lib $LIBS"
c0d27fcc 14950 echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
98418dba
CW
14951echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6
14952if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 14953 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14954else
98418dba
CW
14955 ac_check_lib_save_LIBS=$LIBS
14956LIBS="-lgetloadavg $LIBS"
14957cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14958/* confdefs.h. */
14959_ACEOF
14960cat confdefs.h >>conftest.$ac_ext
14961cat >>conftest.$ac_ext <<_ACEOF
14962/* end confdefs.h. */
ba4481b5 14963
98418dba
CW
14964/* Override any gcc2 internal prototype to avoid an error. */
14965#ifdef __cplusplus
14966extern "C"
14967#endif
14968/* We use char because int might match the return type of a gcc2
14969 builtin and then its argument prototype would still apply. */
14970char getloadavg ();
98418dba
CW
14971int
14972main ()
14973{
14974getloadavg ();
14975 ;
14976 return 0;
14977}
503d2be0 14978_ACEOF
98418dba 14979rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14980if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14981 (eval $ac_link) 2>conftest.er1
98418dba 14982 ac_status=$?
35996d22
AS
14983 grep -v '^ *+' conftest.er1 >conftest.err
14984 rm -f conftest.er1
14985 cat conftest.err >&5
c0d27fcc 14986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 14987 (exit $ac_status); } &&
4494a266
JD
14988 { ac_try='test -z "$ac_c_werror_flag"
14989 || test ! -s conftest.err'
35996d22
AS
14990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14991 (eval $ac_try) 2>&5
14992 ac_status=$?
14993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14994 (exit $ac_status); }; } &&
14995 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
14997 (eval $ac_try) 2>&5
14998 ac_status=$?
c0d27fcc 14999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15000 (exit $ac_status); }; }; then
15001 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 15002else
98418dba 15003 echo "$as_me: failed program was:" >&5
19650fd6
AS
15004sed 's/^/| /' conftest.$ac_ext >&5
15005
98418dba
CW
15006ac_cv_lib_getloadavg_getloadavg=no
15007fi
35996d22
AS
15008rm -f conftest.err conftest.$ac_objext \
15009 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15010LIBS=$ac_check_lib_save_LIBS
15011fi
c0d27fcc 15012echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
98418dba
CW
15013echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6
15014if test $ac_cv_lib_getloadavg_getloadavg = yes; then
15015 LIBS="-lgetloadavg $LIBS"
15016else
15017 LIBS=$ac_getloadavg_LIBS
ba4481b5 15018fi
ba4481b5
DL
15019
15020fi
98418dba
CW
15021
15022# Make sure it is really in the library, if we think we found it,
15023# otherwise set up the replacement function.
15024
15025for ac_func in getloadavg
15026do
15027as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 15028echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
15029echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15030if eval "test \"\${$as_ac_var+set}\" = set"; then
15031 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15032else
503d2be0 15033 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15034/* confdefs.h. */
15035_ACEOF
15036cat confdefs.h >>conftest.$ac_ext
15037cat >>conftest.$ac_ext <<_ACEOF
15038/* end confdefs.h. */
35996d22
AS
15039/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15040 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15041#define $ac_func innocuous_$ac_func
15042
ba4481b5 15043/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15044 which can conflict with char $ac_func (); below.
15045 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15046 <limits.h> exists even on freestanding compilers. */
35996d22 15047
19650fd6
AS
15048#ifdef __STDC__
15049# include <limits.h>
15050#else
15051# include <assert.h>
15052#endif
35996d22
AS
15053
15054#undef $ac_func
15055
ba4481b5 15056/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15057#ifdef __cplusplus
15058extern "C"
19650fd6 15059{
503d2be0 15060#endif
ba4481b5 15061/* We use char because int might match the return type of a gcc2
503d2be0
AS
15062 builtin and then its argument prototype would still apply. */
15063char $ac_func ();
ba4481b5
DL
15064/* The GNU C library defines this for functions which it implements
15065 to always fail with ENOSYS. Some functions are actually named
15066 something starting with __ and the normal name is an alias. */
15067#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15068choke me
15069#else
19650fd6
AS
15070char (*f) () = $ac_func;
15071#endif
15072#ifdef __cplusplus
15073}
cd958eb3
MB
15074#endif
15075
19650fd6
AS
15076int
15077main ()
15078{
15079return f != $ac_func;
503d2be0
AS
15080 ;
15081 return 0;
15082}
15083_ACEOF
15084rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15085if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15086 (eval $ac_link) 2>conftest.er1
503d2be0 15087 ac_status=$?
35996d22
AS
15088 grep -v '^ *+' conftest.er1 >conftest.err
15089 rm -f conftest.er1
15090 cat conftest.err >&5
c0d27fcc 15091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15092 (exit $ac_status); } &&
4494a266
JD
15093 { ac_try='test -z "$ac_c_werror_flag"
15094 || test ! -s conftest.err'
35996d22
AS
15095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15096 (eval $ac_try) 2>&5
15097 ac_status=$?
15098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15099 (exit $ac_status); }; } &&
15100 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15102 (eval $ac_try) 2>&5
15103 ac_status=$?
c0d27fcc 15104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15105 (exit $ac_status); }; }; then
15106 eval "$as_ac_var=yes"
15107else
15108 echo "$as_me: failed program was:" >&5
19650fd6
AS
15109sed 's/^/| /' conftest.$ac_ext >&5
15110
503d2be0
AS
15111eval "$as_ac_var=no"
15112fi
35996d22
AS
15113rm -f conftest.err conftest.$ac_objext \
15114 conftest$ac_exeext conftest.$ac_ext
503d2be0 15115fi
c0d27fcc 15116echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
15117echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15118if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15119 cat >>confdefs.h <<_ACEOF
98418dba 15120#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15121_ACEOF
503d2be0 15122
98418dba 15123else
35996d22
AS
15124 case $LIBOBJS in
15125 "getloadavg.$ac_objext" | \
15126 *" getloadavg.$ac_objext" | \
15127 "getloadavg.$ac_objext "* | \
15128 *" getloadavg.$ac_objext "* ) ;;
15129 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext" ;;
15130esac
15131
ba4481b5 15132
c0d27fcc 15133cat >>confdefs.h <<\_ACEOF
98418dba 15134#define C_GETLOADAVG 1
c0d27fcc 15135_ACEOF
ba4481b5 15136
98418dba
CW
15137# Figure out what our getloadavg.c needs.
15138ac_have_func=no
c0d27fcc
MR
15139if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
15140 echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
98418dba
CW
15141echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
15142if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 15143 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15144fi
15145echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
15146echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
ba4481b5 15147else
c0d27fcc
MR
15148 # Is the header compilable?
15149echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
15150echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6
15151cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15152/* confdefs.h. */
15153_ACEOF
15154cat confdefs.h >>conftest.$ac_ext
15155cat >>conftest.$ac_ext <<_ACEOF
15156/* end confdefs.h. */
c0d27fcc
MR
15157$ac_includes_default
15158#include <sys/dg_sys_info.h>
15159_ACEOF
15160rm -f conftest.$ac_objext
15161if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 15162 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15163 ac_status=$?
35996d22
AS
15164 grep -v '^ *+' conftest.er1 >conftest.err
15165 rm -f conftest.er1
15166 cat conftest.err >&5
c0d27fcc
MR
15167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15168 (exit $ac_status); } &&
4494a266
JD
15169 { ac_try='test -z "$ac_c_werror_flag"
15170 || test ! -s conftest.err'
35996d22
AS
15171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15172 (eval $ac_try) 2>&5
15173 ac_status=$?
15174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15175 (exit $ac_status); }; } &&
15176 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15178 (eval $ac_try) 2>&5
15179 ac_status=$?
15180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15181 (exit $ac_status); }; }; then
15182 ac_header_compiler=yes
15183else
15184 echo "$as_me: failed program was:" >&5
19650fd6
AS
15185sed 's/^/| /' conftest.$ac_ext >&5
15186
c0d27fcc
MR
15187ac_header_compiler=no
15188fi
35996d22 15189rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15190echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15191echo "${ECHO_T}$ac_header_compiler" >&6
15192
15193# Is the header present?
15194echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
15195echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6
15196cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15197/* confdefs.h. */
15198_ACEOF
15199cat confdefs.h >>conftest.$ac_ext
15200cat >>conftest.$ac_ext <<_ACEOF
15201/* end confdefs.h. */
98418dba
CW
15202#include <sys/dg_sys_info.h>
15203_ACEOF
c0d27fcc 15204if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
15205 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15206 ac_status=$?
6bae0ccf 15207 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15208 rm -f conftest.er1
15209 cat conftest.err >&5
c0d27fcc 15210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15211 (exit $ac_status); } >/dev/null; then
15212 if test -s conftest.err; then
15213 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 15214 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
15215 else
15216 ac_cpp_err=
15217 fi
15218else
15219 ac_cpp_err=yes
ba4481b5 15220fi
98418dba 15221if test -z "$ac_cpp_err"; then
c0d27fcc 15222 ac_header_preproc=yes
98418dba
CW
15223else
15224 echo "$as_me: failed program was:" >&5
19650fd6
AS
15225sed 's/^/| /' conftest.$ac_ext >&5
15226
c0d27fcc 15227 ac_header_preproc=no
ba4481b5 15228fi
98418dba 15229rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15230echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15231echo "${ECHO_T}$ac_header_preproc" >&6
15232
15233# So? What about this header?
35996d22
AS
15234case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15235 yes:no: )
c0d27fcc
MR
15236 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
15237echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
15238 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
15239echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
15240 ac_header_preproc=yes
19650fd6 15241 ;;
35996d22 15242 no:yes:* )
c0d27fcc
MR
15243 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
15244echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
35996d22
AS
15245 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
15246echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
15247 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
15248echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
15249 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
15250echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15251 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 15252echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
15253 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
15254echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
15255 (
15256 cat <<\_ASBOX
35996d22
AS
15257## ------------------------------------------ ##
15258## Report this to the AC_PACKAGE_NAME lists. ##
15259## ------------------------------------------ ##
19650fd6
AS
15260_ASBOX
15261 ) |
15262 sed "s/^/$as_me: WARNING: /" >&2
15263 ;;
c0d27fcc
MR
15264esac
15265echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
15266echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
15267if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
15268 echo $ECHO_N "(cached) $ECHO_C" >&6
15269else
15270 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 15271fi
c0d27fcc 15272echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
98418dba 15273echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
c0d27fcc
MR
15274
15275fi
98418dba
CW
15276if test $ac_cv_header_sys_dg_sys_info_h = yes; then
15277 ac_have_func=yes
ba4481b5 15278
c0d27fcc 15279cat >>confdefs.h <<\_ACEOF
98418dba 15280#define DGUX 1
c0d27fcc
MR
15281_ACEOF
15282
503d2be0 15283
c0d27fcc 15284echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
98418dba
CW
15285echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6
15286if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 15287 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15288else
503d2be0 15289 ac_check_lib_save_LIBS=$LIBS
98418dba 15290LIBS="-ldgc $LIBS"
503d2be0 15291cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15292/* confdefs.h. */
15293_ACEOF
15294cat confdefs.h >>conftest.$ac_ext
15295cat >>conftest.$ac_ext <<_ACEOF
15296/* end confdefs.h. */
503d2be0 15297
ba4481b5 15298/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15299#ifdef __cplusplus
15300extern "C"
15301#endif
ba4481b5 15302/* We use char because int might match the return type of a gcc2
503d2be0 15303 builtin and then its argument prototype would still apply. */
98418dba 15304char dg_sys_info ();
503d2be0
AS
15305int
15306main ()
15307{
98418dba 15308dg_sys_info ();
503d2be0
AS
15309 ;
15310 return 0;
15311}
15312_ACEOF
15313rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15314if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15315 (eval $ac_link) 2>conftest.er1
503d2be0 15316 ac_status=$?
35996d22
AS
15317 grep -v '^ *+' conftest.er1 >conftest.err
15318 rm -f conftest.er1
15319 cat conftest.err >&5
c0d27fcc 15320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15321 (exit $ac_status); } &&
4494a266
JD
15322 { ac_try='test -z "$ac_c_werror_flag"
15323 || test ! -s conftest.err'
35996d22
AS
15324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15325 (eval $ac_try) 2>&5
15326 ac_status=$?
15327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15328 (exit $ac_status); }; } &&
15329 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15331 (eval $ac_try) 2>&5
15332 ac_status=$?
c0d27fcc 15333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15334 (exit $ac_status); }; }; then
98418dba 15335 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
15336else
15337 echo "$as_me: failed program was:" >&5
19650fd6
AS
15338sed 's/^/| /' conftest.$ac_ext >&5
15339
98418dba 15340ac_cv_lib_dgc_dg_sys_info=no
503d2be0 15341fi
35996d22
AS
15342rm -f conftest.err conftest.$ac_objext \
15343 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
15344LIBS=$ac_check_lib_save_LIBS
15345fi
c0d27fcc 15346echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
98418dba
CW
15347echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6
15348if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 15349 cat >>confdefs.h <<_ACEOF
98418dba 15350#define HAVE_LIBDGC 1
c0d27fcc 15351_ACEOF
ba4481b5 15352
98418dba 15353 LIBS="-ldgc $LIBS"
ba4481b5 15354
ba4481b5
DL
15355fi
15356
98418dba 15357fi
503d2be0 15358
c0d27fcc
MR
15359
15360
15361if test "${ac_cv_header_locale_h+set}" = set; then
15362 echo "$as_me:$LINENO: checking for locale.h" >&5
98418dba
CW
15363echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
15364if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 15365 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15366fi
15367echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
15368echo "${ECHO_T}$ac_cv_header_locale_h" >&6
503d2be0 15369else
c0d27fcc
MR
15370 # Is the header compilable?
15371echo "$as_me:$LINENO: checking locale.h usability" >&5
15372echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6
15373cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15374/* confdefs.h. */
15375_ACEOF
15376cat confdefs.h >>conftest.$ac_ext
15377cat >>conftest.$ac_ext <<_ACEOF
15378/* end confdefs.h. */
c0d27fcc
MR
15379$ac_includes_default
15380#include <locale.h>
15381_ACEOF
15382rm -f conftest.$ac_objext
15383if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 15384 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15385 ac_status=$?
35996d22
AS
15386 grep -v '^ *+' conftest.er1 >conftest.err
15387 rm -f conftest.er1
15388 cat conftest.err >&5
c0d27fcc
MR
15389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15390 (exit $ac_status); } &&
4494a266
JD
15391 { ac_try='test -z "$ac_c_werror_flag"
15392 || test ! -s conftest.err'
35996d22
AS
15393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15394 (eval $ac_try) 2>&5
15395 ac_status=$?
15396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15397 (exit $ac_status); }; } &&
15398 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15400 (eval $ac_try) 2>&5
15401 ac_status=$?
15402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15403 (exit $ac_status); }; }; then
15404 ac_header_compiler=yes
15405else
15406 echo "$as_me: failed program was:" >&5
19650fd6
AS
15407sed 's/^/| /' conftest.$ac_ext >&5
15408
c0d27fcc
MR
15409ac_header_compiler=no
15410fi
35996d22 15411rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15412echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15413echo "${ECHO_T}$ac_header_compiler" >&6
15414
15415# Is the header present?
15416echo "$as_me:$LINENO: checking locale.h presence" >&5
15417echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6
15418cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15419/* confdefs.h. */
15420_ACEOF
15421cat confdefs.h >>conftest.$ac_ext
15422cat >>conftest.$ac_ext <<_ACEOF
15423/* end confdefs.h. */
98418dba 15424#include <locale.h>
503d2be0 15425_ACEOF
c0d27fcc 15426if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 15427 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 15428 ac_status=$?
6bae0ccf 15429 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15430 rm -f conftest.er1
15431 cat conftest.err >&5
c0d27fcc 15432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15433 (exit $ac_status); } >/dev/null; then
15434 if test -s conftest.err; then
15435 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 15436 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
15437 else
15438 ac_cpp_err=
15439 fi
503d2be0 15440else
98418dba 15441 ac_cpp_err=yes
503d2be0 15442fi
98418dba 15443if test -z "$ac_cpp_err"; then
c0d27fcc 15444 ac_header_preproc=yes
98418dba
CW
15445else
15446 echo "$as_me: failed program was:" >&5
19650fd6
AS
15447sed 's/^/| /' conftest.$ac_ext >&5
15448
c0d27fcc 15449 ac_header_preproc=no
ba4481b5 15450fi
98418dba 15451rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15452echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15453echo "${ECHO_T}$ac_header_preproc" >&6
15454
15455# So? What about this header?
35996d22
AS
15456case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15457 yes:no: )
c0d27fcc
MR
15458 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
15459echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
15460 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
15461echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
15462 ac_header_preproc=yes
19650fd6 15463 ;;
35996d22 15464 no:yes:* )
c0d27fcc
MR
15465 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
15466echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
35996d22
AS
15467 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
15468echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
15469 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
15470echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
15471 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
15472echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15473 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 15474echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
15475 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
15476echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
15477 (
15478 cat <<\_ASBOX
35996d22
AS
15479## ------------------------------------------ ##
15480## Report this to the AC_PACKAGE_NAME lists. ##
15481## ------------------------------------------ ##
19650fd6
AS
15482_ASBOX
15483 ) |
15484 sed "s/^/$as_me: WARNING: /" >&2
15485 ;;
c0d27fcc
MR
15486esac
15487echo "$as_me:$LINENO: checking for locale.h" >&5
15488echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
15489if test "${ac_cv_header_locale_h+set}" = set; then
15490 echo $ECHO_N "(cached) $ECHO_C" >&6
15491else
15492 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 15493fi
c0d27fcc 15494echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
98418dba
CW
15495echo "${ECHO_T}$ac_cv_header_locale_h" >&6
15496
c0d27fcc
MR
15497fi
15498
15499
15500
98418dba 15501for ac_func in setlocale
ba4481b5 15502do
503d2be0 15503as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 15504echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
15505echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15506if eval "test \"\${$as_ac_var+set}\" = set"; then
15507 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15508else
503d2be0 15509 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15510/* confdefs.h. */
15511_ACEOF
15512cat confdefs.h >>conftest.$ac_ext
15513cat >>conftest.$ac_ext <<_ACEOF
15514/* end confdefs.h. */
35996d22
AS
15515/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15516 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15517#define $ac_func innocuous_$ac_func
15518
ba4481b5 15519/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15520 which can conflict with char $ac_func (); below.
15521 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15522 <limits.h> exists even on freestanding compilers. */
35996d22 15523
19650fd6
AS
15524#ifdef __STDC__
15525# include <limits.h>
15526#else
15527# include <assert.h>
15528#endif
35996d22
AS
15529
15530#undef $ac_func
15531
ba4481b5 15532/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15533#ifdef __cplusplus
15534extern "C"
19650fd6 15535{
503d2be0 15536#endif
ba4481b5 15537/* We use char because int might match the return type of a gcc2
503d2be0
AS
15538 builtin and then its argument prototype would still apply. */
15539char $ac_func ();
ba4481b5
DL
15540/* The GNU C library defines this for functions which it implements
15541 to always fail with ENOSYS. Some functions are actually named
15542 something starting with __ and the normal name is an alias. */
15543#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15544choke me
15545#else
19650fd6
AS
15546char (*f) () = $ac_func;
15547#endif
15548#ifdef __cplusplus
15549}
ba4481b5
DL
15550#endif
15551
19650fd6
AS
15552int
15553main ()
15554{
15555return f != $ac_func;
503d2be0
AS
15556 ;
15557 return 0;
15558}
15559_ACEOF
15560rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15561if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15562 (eval $ac_link) 2>conftest.er1
503d2be0 15563 ac_status=$?
35996d22
AS
15564 grep -v '^ *+' conftest.er1 >conftest.err
15565 rm -f conftest.er1
15566 cat conftest.err >&5
c0d27fcc 15567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15568 (exit $ac_status); } &&
4494a266
JD
15569 { ac_try='test -z "$ac_c_werror_flag"
15570 || test ! -s conftest.err'
35996d22
AS
15571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15572 (eval $ac_try) 2>&5
15573 ac_status=$?
15574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15575 (exit $ac_status); }; } &&
15576 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15578 (eval $ac_try) 2>&5
15579 ac_status=$?
c0d27fcc 15580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15581 (exit $ac_status); }; }; then
15582 eval "$as_ac_var=yes"
15583else
15584 echo "$as_me: failed program was:" >&5
19650fd6
AS
15585sed 's/^/| /' conftest.$ac_ext >&5
15586
503d2be0
AS
15587eval "$as_ac_var=no"
15588fi
35996d22
AS
15589rm -f conftest.err conftest.$ac_objext \
15590 conftest$ac_exeext conftest.$ac_ext
503d2be0 15591fi
c0d27fcc 15592echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
15593echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15594if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15595 cat >>confdefs.h <<_ACEOF
503d2be0 15596#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15597_ACEOF
ba4481b5 15598
ba4481b5
DL
15599fi
15600done
15601
c0d27fcc 15602
98418dba
CW
15603# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
15604# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
15605# Irix 4.0.5F has the header but not the library.
15606if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
15607 ac_have_func=yes
15608
c0d27fcc 15609cat >>confdefs.h <<\_ACEOF
98418dba 15610#define SVR4 1
c0d27fcc 15611_ACEOF
98418dba
CW
15612
15613fi
15614
15615if test $ac_have_func = no; then
c0d27fcc
MR
15616 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
15617 echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
98418dba
CW
15618echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
15619if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 15620 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15621fi
15622echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
15623echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
98418dba 15624else
c0d27fcc
MR
15625 # Is the header compilable?
15626echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
15627echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6
15628cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15629/* confdefs.h. */
15630_ACEOF
15631cat confdefs.h >>conftest.$ac_ext
15632cat >>conftest.$ac_ext <<_ACEOF
15633/* end confdefs.h. */
c0d27fcc
MR
15634$ac_includes_default
15635#include <inq_stats/cpustats.h>
15636_ACEOF
15637rm -f conftest.$ac_objext
15638if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 15639 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15640 ac_status=$?
35996d22
AS
15641 grep -v '^ *+' conftest.er1 >conftest.err
15642 rm -f conftest.er1
15643 cat conftest.err >&5
c0d27fcc
MR
15644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15645 (exit $ac_status); } &&
4494a266
JD
15646 { ac_try='test -z "$ac_c_werror_flag"
15647 || test ! -s conftest.err'
35996d22
AS
15648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15649 (eval $ac_try) 2>&5
15650 ac_status=$?
15651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15652 (exit $ac_status); }; } &&
15653 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15655 (eval $ac_try) 2>&5
15656 ac_status=$?
15657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15658 (exit $ac_status); }; }; then
15659 ac_header_compiler=yes
15660else
15661 echo "$as_me: failed program was:" >&5
19650fd6
AS
15662sed 's/^/| /' conftest.$ac_ext >&5
15663
c0d27fcc
MR
15664ac_header_compiler=no
15665fi
35996d22 15666rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15667echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15668echo "${ECHO_T}$ac_header_compiler" >&6
15669
15670# Is the header present?
15671echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
15672echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6
15673cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15674/* confdefs.h. */
15675_ACEOF
15676cat confdefs.h >>conftest.$ac_ext
15677cat >>conftest.$ac_ext <<_ACEOF
15678/* end confdefs.h. */
98418dba 15679#include <inq_stats/cpustats.h>
503d2be0 15680_ACEOF
c0d27fcc 15681if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15682 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15683 ac_status=$?
6bae0ccf 15684 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15685 rm -f conftest.er1
15686 cat conftest.err >&5
c0d27fcc 15687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15688 (exit $ac_status); } >/dev/null; then
15689 if test -s conftest.err; then
15690 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 15691 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
15692 else
15693 ac_cpp_err=
15694 fi
15695else
15696 ac_cpp_err=yes
15697fi
15698if test -z "$ac_cpp_err"; then
c0d27fcc 15699 ac_header_preproc=yes
503d2be0
AS
15700else
15701 echo "$as_me: failed program was:" >&5
19650fd6
AS
15702sed 's/^/| /' conftest.$ac_ext >&5
15703
c0d27fcc 15704 ac_header_preproc=no
ba4481b5 15705fi
503d2be0 15706rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15707echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15708echo "${ECHO_T}$ac_header_preproc" >&6
15709
15710# So? What about this header?
35996d22
AS
15711case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15712 yes:no: )
c0d27fcc
MR
15713 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
15714echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
15715 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
15716echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
15717 ac_header_preproc=yes
19650fd6 15718 ;;
35996d22 15719 no:yes:* )
c0d27fcc
MR
15720 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
15721echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
35996d22
AS
15722 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
15723echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
15724 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
15725echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
15726 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
15727echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15728 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 15729echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
15730 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
15731echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
15732 (
15733 cat <<\_ASBOX
35996d22
AS
15734## ------------------------------------------ ##
15735## Report this to the AC_PACKAGE_NAME lists. ##
15736## ------------------------------------------ ##
19650fd6
AS
15737_ASBOX
15738 ) |
15739 sed "s/^/$as_me: WARNING: /" >&2
15740 ;;
c0d27fcc
MR
15741esac
15742echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
15743echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
15744if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
15745 echo $ECHO_N "(cached) $ECHO_C" >&6
15746else
15747 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 15748fi
c0d27fcc 15749echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
98418dba 15750echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
c0d27fcc
MR
15751
15752fi
98418dba
CW
15753if test $ac_cv_header_inq_stats_cpustats_h = yes; then
15754 ac_have_func=yes
ba4481b5 15755
c0d27fcc 15756cat >>confdefs.h <<\_ACEOF
98418dba 15757#define UMAX 1
c0d27fcc 15758_ACEOF
98418dba 15759
c0d27fcc
MR
15760
15761cat >>confdefs.h <<\_ACEOF
98418dba 15762#define UMAX4_3 1
c0d27fcc 15763_ACEOF
98418dba
CW
15764
15765fi
15766
c0d27fcc 15767
98418dba
CW
15768fi
15769
15770if test $ac_have_func = no; then
c0d27fcc
MR
15771 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
15772 echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
98418dba
CW
15773echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
15774if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 15775 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15776fi
15777echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
15778echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
503d2be0 15779else
c0d27fcc
MR
15780 # Is the header compilable?
15781echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
15782echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6
15783cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15784/* confdefs.h. */
15785_ACEOF
15786cat confdefs.h >>conftest.$ac_ext
15787cat >>conftest.$ac_ext <<_ACEOF
15788/* end confdefs.h. */
c0d27fcc
MR
15789$ac_includes_default
15790#include <sys/cpustats.h>
15791_ACEOF
15792rm -f conftest.$ac_objext
15793if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 15794 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15795 ac_status=$?
35996d22
AS
15796 grep -v '^ *+' conftest.er1 >conftest.err
15797 rm -f conftest.er1
15798 cat conftest.err >&5
c0d27fcc
MR
15799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15800 (exit $ac_status); } &&
4494a266
JD
15801 { ac_try='test -z "$ac_c_werror_flag"
15802 || test ! -s conftest.err'
35996d22
AS
15803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15804 (eval $ac_try) 2>&5
15805 ac_status=$?
15806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15807 (exit $ac_status); }; } &&
15808 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15810 (eval $ac_try) 2>&5
15811 ac_status=$?
15812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15813 (exit $ac_status); }; }; then
15814 ac_header_compiler=yes
15815else
15816 echo "$as_me: failed program was:" >&5
19650fd6
AS
15817sed 's/^/| /' conftest.$ac_ext >&5
15818
c0d27fcc
MR
15819ac_header_compiler=no
15820fi
35996d22 15821rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15822echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15823echo "${ECHO_T}$ac_header_compiler" >&6
15824
15825# Is the header present?
15826echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
15827echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6
15828cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15829/* confdefs.h. */
15830_ACEOF
15831cat confdefs.h >>conftest.$ac_ext
15832cat >>conftest.$ac_ext <<_ACEOF
15833/* end confdefs.h. */
98418dba
CW
15834#include <sys/cpustats.h>
15835_ACEOF
c0d27fcc 15836if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
15837 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15838 ac_status=$?
6bae0ccf 15839 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15840 rm -f conftest.er1
15841 cat conftest.err >&5
c0d27fcc 15842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15843 (exit $ac_status); } >/dev/null; then
15844 if test -s conftest.err; then
15845 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 15846 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
15847 else
15848 ac_cpp_err=
15849 fi
15850else
15851 ac_cpp_err=yes
503d2be0 15852fi
98418dba 15853if test -z "$ac_cpp_err"; then
c0d27fcc 15854 ac_header_preproc=yes
98418dba
CW
15855else
15856 echo "$as_me: failed program was:" >&5
19650fd6
AS
15857sed 's/^/| /' conftest.$ac_ext >&5
15858
c0d27fcc 15859 ac_header_preproc=no
98418dba
CW
15860fi
15861rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15862echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15863echo "${ECHO_T}$ac_header_preproc" >&6
15864
15865# So? What about this header?
35996d22
AS
15866case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15867 yes:no: )
c0d27fcc
MR
15868 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
15869echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
15870 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
15871echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
15872 ac_header_preproc=yes
19650fd6 15873 ;;
35996d22 15874 no:yes:* )
c0d27fcc
MR
15875 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
15876echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
35996d22
AS
15877 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
15878echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
15879 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
15880echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
15881 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
15882echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15883 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 15884echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
15885 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
15886echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
15887 (
15888 cat <<\_ASBOX
35996d22
AS
15889## ------------------------------------------ ##
15890## Report this to the AC_PACKAGE_NAME lists. ##
15891## ------------------------------------------ ##
19650fd6
AS
15892_ASBOX
15893 ) |
15894 sed "s/^/$as_me: WARNING: /" >&2
15895 ;;
c0d27fcc
MR
15896esac
15897echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
15898echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
15899if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
15900 echo $ECHO_N "(cached) $ECHO_C" >&6
15901else
15902 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 15903fi
c0d27fcc 15904echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
98418dba 15905echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
c0d27fcc
MR
15906
15907fi
98418dba 15908if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 15909 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 15910#define UMAX 1
c0d27fcc 15911_ACEOF
ba4481b5 15912
98418dba
CW
15913fi
15914
c0d27fcc 15915
98418dba
CW
15916fi
15917
15918if test $ac_have_func = no; then
15919
15920for ac_header in mach/mach.h
2c9dccc9
PJ
15921do
15922as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
15923if eval "test \"\${$as_ac_Header+set}\" = set"; then
15924 echo "$as_me:$LINENO: checking for $ac_header" >&5
2c9dccc9
PJ
15925echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15926if eval "test \"\${$as_ac_Header+set}\" = set"; then
15927 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15928fi
15929echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15930echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 15931else
c0d27fcc
MR
15932 # Is the header compilable?
15933echo "$as_me:$LINENO: checking $ac_header usability" >&5
15934echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15935cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15936/* confdefs.h. */
15937_ACEOF
15938cat confdefs.h >>conftest.$ac_ext
15939cat >>conftest.$ac_ext <<_ACEOF
15940/* end confdefs.h. */
c0d27fcc
MR
15941$ac_includes_default
15942#include <$ac_header>
15943_ACEOF
15944rm -f conftest.$ac_objext
15945if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 15946 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15947 ac_status=$?
35996d22
AS
15948 grep -v '^ *+' conftest.er1 >conftest.err
15949 rm -f conftest.er1
15950 cat conftest.err >&5
c0d27fcc
MR
15951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15952 (exit $ac_status); } &&
4494a266
JD
15953 { ac_try='test -z "$ac_c_werror_flag"
15954 || test ! -s conftest.err'
35996d22
AS
15955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15956 (eval $ac_try) 2>&5
15957 ac_status=$?
15958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15959 (exit $ac_status); }; } &&
15960 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15962 (eval $ac_try) 2>&5
15963 ac_status=$?
15964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15965 (exit $ac_status); }; }; then
15966 ac_header_compiler=yes
15967else
15968 echo "$as_me: failed program was:" >&5
19650fd6
AS
15969sed 's/^/| /' conftest.$ac_ext >&5
15970
c0d27fcc
MR
15971ac_header_compiler=no
15972fi
35996d22 15973rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15974echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15975echo "${ECHO_T}$ac_header_compiler" >&6
15976
15977# Is the header present?
15978echo "$as_me:$LINENO: checking $ac_header presence" >&5
15979echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15980cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15981/* confdefs.h. */
15982_ACEOF
15983cat confdefs.h >>conftest.$ac_ext
15984cat >>conftest.$ac_ext <<_ACEOF
15985/* end confdefs.h. */
2c9dccc9
PJ
15986#include <$ac_header>
15987_ACEOF
c0d27fcc 15988if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2c9dccc9
PJ
15989 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15990 ac_status=$?
6bae0ccf 15991 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
15992 rm -f conftest.er1
15993 cat conftest.err >&5
c0d27fcc 15994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2c9dccc9
PJ
15995 (exit $ac_status); } >/dev/null; then
15996 if test -s conftest.err; then
15997 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 15998 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2c9dccc9
PJ
15999 else
16000 ac_cpp_err=
16001 fi
16002else
16003 ac_cpp_err=yes
16004fi
16005if test -z "$ac_cpp_err"; then
c0d27fcc
MR
16006 ac_header_preproc=yes
16007else
16008 echo "$as_me: failed program was:" >&5
19650fd6
AS
16009sed 's/^/| /' conftest.$ac_ext >&5
16010
c0d27fcc
MR
16011 ac_header_preproc=no
16012fi
16013rm -f conftest.err conftest.$ac_ext
16014echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16015echo "${ECHO_T}$ac_header_preproc" >&6
16016
16017# So? What about this header?
35996d22
AS
16018case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16019 yes:no: )
c0d27fcc
MR
16020 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16021echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
16022 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16023echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16024 ac_header_preproc=yes
19650fd6 16025 ;;
35996d22 16026 no:yes:* )
c0d27fcc
MR
16027 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16028echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
16029 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16030echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16031 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16032echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16033 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16034echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16035 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16036echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
16037 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16038echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16039 (
16040 cat <<\_ASBOX
35996d22
AS
16041## ------------------------------------------ ##
16042## Report this to the AC_PACKAGE_NAME lists. ##
16043## ------------------------------------------ ##
19650fd6
AS
16044_ASBOX
16045 ) |
16046 sed "s/^/$as_me: WARNING: /" >&2
16047 ;;
c0d27fcc
MR
16048esac
16049echo "$as_me:$LINENO: checking for $ac_header" >&5
16050echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16051if eval "test \"\${$as_ac_Header+set}\" = set"; then
16052 echo $ECHO_N "(cached) $ECHO_C" >&6
16053else
35996d22 16054 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc
MR
16055fi
16056echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16057echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16058
16059fi
16060if test `eval echo '${'$as_ac_Header'}'` = yes; then
16061 cat >>confdefs.h <<_ACEOF
16062#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16063_ACEOF
16064
16065fi
16066
16067done
16068
16069fi
16070
16071
16072for ac_header in nlist.h
16073do
16074as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16075if eval "test \"\${$as_ac_Header+set}\" = set"; then
16076 echo "$as_me:$LINENO: checking for $ac_header" >&5
16077echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16078if eval "test \"\${$as_ac_Header+set}\" = set"; then
16079 echo $ECHO_N "(cached) $ECHO_C" >&6
16080fi
16081echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16082echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16083else
16084 # Is the header compilable?
16085echo "$as_me:$LINENO: checking $ac_header usability" >&5
16086echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16087cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16088/* confdefs.h. */
16089_ACEOF
16090cat confdefs.h >>conftest.$ac_ext
16091cat >>conftest.$ac_ext <<_ACEOF
16092/* end confdefs.h. */
c0d27fcc
MR
16093$ac_includes_default
16094#include <$ac_header>
16095_ACEOF
16096rm -f conftest.$ac_objext
16097if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16098 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16099 ac_status=$?
35996d22
AS
16100 grep -v '^ *+' conftest.er1 >conftest.err
16101 rm -f conftest.er1
16102 cat conftest.err >&5
c0d27fcc
MR
16103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16104 (exit $ac_status); } &&
4494a266
JD
16105 { ac_try='test -z "$ac_c_werror_flag"
16106 || test ! -s conftest.err'
35996d22
AS
16107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16108 (eval $ac_try) 2>&5
16109 ac_status=$?
16110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16111 (exit $ac_status); }; } &&
16112 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16114 (eval $ac_try) 2>&5
16115 ac_status=$?
16116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16117 (exit $ac_status); }; }; then
16118 ac_header_compiler=yes
2c9dccc9
PJ
16119else
16120 echo "$as_me: failed program was:" >&5
19650fd6
AS
16121sed 's/^/| /' conftest.$ac_ext >&5
16122
c0d27fcc 16123ac_header_compiler=no
98418dba 16124fi
35996d22 16125rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16126echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16127echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 16128
c0d27fcc
MR
16129# Is the header present?
16130echo "$as_me:$LINENO: checking $ac_header presence" >&5
16131echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16132cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16133/* confdefs.h. */
16134_ACEOF
16135cat confdefs.h >>conftest.$ac_ext
16136cat >>conftest.$ac_ext <<_ACEOF
16137/* end confdefs.h. */
503d2be0
AS
16138#include <$ac_header>
16139_ACEOF
c0d27fcc 16140if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16141 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16142 ac_status=$?
6bae0ccf 16143 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16144 rm -f conftest.er1
16145 cat conftest.err >&5
c0d27fcc 16146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16147 (exit $ac_status); } >/dev/null; then
16148 if test -s conftest.err; then
16149 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 16150 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
16151 else
16152 ac_cpp_err=
16153 fi
16154else
16155 ac_cpp_err=yes
16156fi
16157if test -z "$ac_cpp_err"; then
c0d27fcc 16158 ac_header_preproc=yes
503d2be0
AS
16159else
16160 echo "$as_me: failed program was:" >&5
19650fd6
AS
16161sed 's/^/| /' conftest.$ac_ext >&5
16162
c0d27fcc 16163 ac_header_preproc=no
b5de8dc0 16164fi
503d2be0 16165rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16166echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16167echo "${ECHO_T}$ac_header_preproc" >&6
16168
16169# So? What about this header?
35996d22
AS
16170case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16171 yes:no: )
c0d27fcc
MR
16172 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16173echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
16174 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16175echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16176 ac_header_preproc=yes
19650fd6 16177 ;;
35996d22 16178 no:yes:* )
c0d27fcc
MR
16179 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16180echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
16181 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16182echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16183 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16184echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16185 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16186echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16187 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16188echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
16189 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16190echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16191 (
16192 cat <<\_ASBOX
35996d22
AS
16193## ------------------------------------------ ##
16194## Report this to the AC_PACKAGE_NAME lists. ##
16195## ------------------------------------------ ##
19650fd6
AS
16196_ASBOX
16197 ) |
16198 sed "s/^/$as_me: WARNING: /" >&2
16199 ;;
c0d27fcc
MR
16200esac
16201echo "$as_me:$LINENO: checking for $ac_header" >&5
16202echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16203if eval "test \"\${$as_ac_Header+set}\" = set"; then
16204 echo $ECHO_N "(cached) $ECHO_C" >&6
16205else
35996d22 16206 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 16207fi
c0d27fcc 16208echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 16209echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
16210
16211fi
98418dba 16212if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16213 cat >>confdefs.h <<_ACEOF
98418dba 16214#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc
MR
16215_ACEOF
16216 echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
98418dba
CW
16217echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6
16218if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 16219 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 16220else
503d2be0 16221 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16222/* confdefs.h. */
16223_ACEOF
16224cat confdefs.h >>conftest.$ac_ext
16225cat >>conftest.$ac_ext <<_ACEOF
16226/* end confdefs.h. */
98418dba 16227#include <nlist.h>
b5de8dc0 16228
503d2be0
AS
16229int
16230main ()
16231{
98418dba
CW
16232static struct nlist ac_aggr;
16233if (ac_aggr.n_un.n_name)
16234return 0;
503d2be0
AS
16235 ;
16236 return 0;
16237}
16238_ACEOF
98418dba 16239rm -f conftest.$ac_objext
c0d27fcc 16240if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16241 (eval $ac_compile) 2>conftest.er1
503d2be0 16242 ac_status=$?
35996d22
AS
16243 grep -v '^ *+' conftest.er1 >conftest.err
16244 rm -f conftest.er1
16245 cat conftest.err >&5
c0d27fcc 16246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16247 (exit $ac_status); } &&
4494a266
JD
16248 { ac_try='test -z "$ac_c_werror_flag"
16249 || test ! -s conftest.err'
35996d22
AS
16250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16251 (eval $ac_try) 2>&5
16252 ac_status=$?
16253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16254 (exit $ac_status); }; } &&
16255 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16257 (eval $ac_try) 2>&5
16258 ac_status=$?
c0d27fcc 16259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16260 (exit $ac_status); }; }; then
98418dba 16261 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
16262else
16263 echo "$as_me: failed program was:" >&5
19650fd6
AS
16264sed 's/^/| /' conftest.$ac_ext >&5
16265
6bae0ccf 16266cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16267/* confdefs.h. */
16268_ACEOF
16269cat confdefs.h >>conftest.$ac_ext
16270cat >>conftest.$ac_ext <<_ACEOF
16271/* end confdefs.h. */
6bae0ccf
DL
16272#include <nlist.h>
16273
16274int
16275main ()
16276{
16277static struct nlist ac_aggr;
16278if (sizeof ac_aggr.n_un.n_name)
16279return 0;
16280 ;
16281 return 0;
16282}
16283_ACEOF
16284rm -f conftest.$ac_objext
16285if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16286 (eval $ac_compile) 2>conftest.er1
6bae0ccf 16287 ac_status=$?
35996d22
AS
16288 grep -v '^ *+' conftest.er1 >conftest.err
16289 rm -f conftest.er1
16290 cat conftest.err >&5
6bae0ccf
DL
16291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16292 (exit $ac_status); } &&
4494a266
JD
16293 { ac_try='test -z "$ac_c_werror_flag"
16294 || test ! -s conftest.err'
35996d22
AS
16295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16296 (eval $ac_try) 2>&5
16297 ac_status=$?
16298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16299 (exit $ac_status); }; } &&
16300 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
16301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16302 (eval $ac_try) 2>&5
16303 ac_status=$?
16304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16305 (exit $ac_status); }; }; then
16306 ac_cv_member_struct_nlist_n_un_n_name=yes
16307else
16308 echo "$as_me: failed program was:" >&5
19650fd6
AS
16309sed 's/^/| /' conftest.$ac_ext >&5
16310
98418dba 16311ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 16312fi
35996d22 16313rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 16314fi
35996d22 16315rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 16316fi
c0d27fcc 16317echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
98418dba
CW
16318echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6
16319if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 16320
c0d27fcc 16321cat >>confdefs.h <<_ACEOF
98418dba 16322#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 16323_ACEOF
b5de8dc0 16324
c0d27fcc
MR
16325
16326cat >>confdefs.h <<\_ACEOF
98418dba 16327#define NLIST_NAME_UNION 1
c0d27fcc 16328_ACEOF
b5de8dc0 16329
98418dba 16330fi
b5de8dc0 16331
c0d27fcc 16332
98418dba 16333fi
c0d27fcc 16334
98418dba 16335done
b5de8dc0 16336
98418dba
CW
16337fi
16338done
b5de8dc0 16339
c0d27fcc 16340
98418dba 16341# Some definitions of getloadavg require that the program be installed setgid.
c0d27fcc 16342echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
98418dba
CW
16343echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6
16344if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
16345 echo $ECHO_N "(cached) $ECHO_C" >&6
16346else
16347 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16348/* confdefs.h. */
16349_ACEOF
16350cat confdefs.h >>conftest.$ac_ext
16351cat >>conftest.$ac_ext <<_ACEOF
16352/* end confdefs.h. */
6bae0ccf 16353#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
16354#ifdef LDAV_PRIVILEGED
16355Yowza Am I SETGID yet
16356#endif
16357_ACEOF
16358if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 16359 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
16360 ac_cv_func_getloadavg_setgid=yes
16361else
16362 ac_cv_func_getloadavg_setgid=no
16363fi
16364rm -f conftest*
b5de8dc0 16365
98418dba 16366fi
c0d27fcc 16367echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
98418dba
CW
16368echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6
16369if test $ac_cv_func_getloadavg_setgid = yes; then
16370 NEED_SETGID=true
b5de8dc0 16371
c0d27fcc 16372cat >>confdefs.h <<\_ACEOF
98418dba 16373#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 16374_ACEOF
98418dba 16375
b5de8dc0 16376else
98418dba 16377 NEED_SETGID=false
b5de8dc0 16378fi
98418dba
CW
16379
16380if test $ac_cv_func_getloadavg_setgid = yes; then
c0d27fcc 16381 echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
98418dba
CW
16382echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6
16383if test "${ac_cv_group_kmem+set}" = set; then
16384 echo $ECHO_N "(cached) $ECHO_C" >&6
16385else
16386 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
16387 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
16388 # If we got an error (system does not support symlinks), try without -L.
16389 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
16390 ac_cv_group_kmem=`echo $ac_ls_output \
35996d22 16391 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
16392 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
16393 / /s/.* //;p;'`
16394
b5de8dc0 16395fi
c0d27fcc 16396echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
98418dba
CW
16397echo "${ECHO_T}$ac_cv_group_kmem" >&6
16398 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 16399fi
98418dba
CW
16400if test "x$ac_save_LIBS" = x; then
16401 GETLOADAVG_LIBS=$LIBS
16402else
16403 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 16404fi
98418dba 16405LIBS=$ac_save_LIBS
b5de8dc0 16406
c0d27fcc
MR
16407
16408
16409echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
b936fae4
AS
16410echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
16411if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 16412 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 16413else
b936fae4
AS
16414 while :; do
16415 ac_cv_sys_largefile_source=no
503d2be0 16416 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16417/* confdefs.h. */
16418_ACEOF
16419cat confdefs.h >>conftest.$ac_ext
16420cat >>conftest.$ac_ext <<_ACEOF
16421/* end confdefs.h. */
b936fae4 16422#include <stdio.h>
503d2be0
AS
16423int
16424main ()
16425{
b936fae4
AS
16426return !fseeko;
16427 ;
16428 return 0;
16429}
16430_ACEOF
16431rm -f conftest.$ac_objext
c0d27fcc 16432if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16433 (eval $ac_compile) 2>conftest.er1
b936fae4 16434 ac_status=$?
35996d22
AS
16435 grep -v '^ *+' conftest.er1 >conftest.err
16436 rm -f conftest.er1
16437 cat conftest.err >&5
c0d27fcc 16438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 16439 (exit $ac_status); } &&
4494a266
JD
16440 { ac_try='test -z "$ac_c_werror_flag"
16441 || test ! -s conftest.err'
35996d22
AS
16442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16443 (eval $ac_try) 2>&5
16444 ac_status=$?
16445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16446 (exit $ac_status); }; } &&
16447 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
16449 (eval $ac_try) 2>&5
16450 ac_status=$?
c0d27fcc 16451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
16452 (exit $ac_status); }; }; then
16453 break
16454else
16455 echo "$as_me: failed program was:" >&5
19650fd6
AS
16456sed 's/^/| /' conftest.$ac_ext >&5
16457
b936fae4 16458fi
35996d22 16459rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b936fae4 16460 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16461/* confdefs.h. */
16462_ACEOF
16463cat confdefs.h >>conftest.$ac_ext
16464cat >>conftest.$ac_ext <<_ACEOF
16465/* end confdefs.h. */
b936fae4
AS
16466#define _LARGEFILE_SOURCE 1
16467#include <stdio.h>
b936fae4
AS
16468int
16469main ()
16470{
16471return !fseeko;
16472 ;
16473 return 0;
16474}
16475_ACEOF
16476rm -f conftest.$ac_objext
c0d27fcc 16477if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16478 (eval $ac_compile) 2>conftest.er1
b936fae4 16479 ac_status=$?
35996d22
AS
16480 grep -v '^ *+' conftest.er1 >conftest.err
16481 rm -f conftest.er1
16482 cat conftest.err >&5
c0d27fcc 16483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 16484 (exit $ac_status); } &&
4494a266
JD
16485 { ac_try='test -z "$ac_c_werror_flag"
16486 || test ! -s conftest.err'
35996d22
AS
16487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16488 (eval $ac_try) 2>&5
16489 ac_status=$?
16490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16491 (exit $ac_status); }; } &&
16492 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
16494 (eval $ac_try) 2>&5
16495 ac_status=$?
c0d27fcc 16496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
16497 (exit $ac_status); }; }; then
16498 ac_cv_sys_largefile_source=1; break
16499else
16500 echo "$as_me: failed program was:" >&5
19650fd6
AS
16501sed 's/^/| /' conftest.$ac_ext >&5
16502
b936fae4 16503fi
35996d22 16504rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b936fae4
AS
16505 break
16506done
16507fi
c0d27fcc 16508echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
b936fae4
AS
16509echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
16510if test "$ac_cv_sys_largefile_source" != no; then
16511
c0d27fcc 16512cat >>confdefs.h <<_ACEOF
b936fae4 16513#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 16514_ACEOF
b936fae4
AS
16515
16516fi
16517rm -f conftest*
4c343001 16518
b936fae4
AS
16519# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16520# in glibc 2.1.3, but that breaks too many other things.
16521# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c0d27fcc 16522echo "$as_me:$LINENO: checking for fseeko" >&5
b936fae4
AS
16523echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
16524if test "${ac_cv_func_fseeko+set}" = set; then
16525 echo $ECHO_N "(cached) $ECHO_C" >&6
16526else
16527 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16528/* confdefs.h. */
16529_ACEOF
16530cat confdefs.h >>conftest.$ac_ext
16531cat >>conftest.$ac_ext <<_ACEOF
16532/* end confdefs.h. */
b936fae4 16533#include <stdio.h>
b936fae4
AS
16534int
16535main ()
16536{
16537return fseeko && fseeko (stdin, 0, 0);
503d2be0
AS
16538 ;
16539 return 0;
16540}
16541_ACEOF
16542rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16543if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 16544 (eval $ac_link) 2>conftest.er1
503d2be0 16545 ac_status=$?
35996d22
AS
16546 grep -v '^ *+' conftest.er1 >conftest.err
16547 rm -f conftest.er1
16548 cat conftest.err >&5
c0d27fcc 16549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16550 (exit $ac_status); } &&
4494a266
JD
16551 { ac_try='test -z "$ac_c_werror_flag"
16552 || test ! -s conftest.err'
35996d22
AS
16553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16554 (eval $ac_try) 2>&5
16555 ac_status=$?
16556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16557 (exit $ac_status); }; } &&
16558 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16560 (eval $ac_try) 2>&5
16561 ac_status=$?
c0d27fcc 16562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16563 (exit $ac_status); }; }; then
b936fae4 16564 ac_cv_func_fseeko=yes
503d2be0
AS
16565else
16566 echo "$as_me: failed program was:" >&5
19650fd6
AS
16567sed 's/^/| /' conftest.$ac_ext >&5
16568
b936fae4 16569ac_cv_func_fseeko=no
503d2be0 16570fi
35996d22
AS
16571rm -f conftest.err conftest.$ac_objext \
16572 conftest$ac_exeext conftest.$ac_ext
503d2be0 16573fi
c0d27fcc 16574echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
b936fae4
AS
16575echo "${ECHO_T}$ac_cv_func_fseeko" >&6
16576if test $ac_cv_func_fseeko = yes; then
16577
c0d27fcc 16578cat >>confdefs.h <<\_ACEOF
b936fae4 16579#define HAVE_FSEEKO 1
c0d27fcc 16580_ACEOF
b936fae4 16581
4c343001
DL
16582fi
16583
c0d27fcc 16584
cd958eb3
MB
16585echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
16586echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6
16587if test "${ac_cv_func_getpgrp_void+set}" = set; then
16588 echo $ECHO_N "(cached) $ECHO_C" >&6
16589else
16590 # Use it with a single arg.
16591cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16592/* confdefs.h. */
16593_ACEOF
16594cat confdefs.h >>conftest.$ac_ext
16595cat >>conftest.$ac_ext <<_ACEOF
16596/* end confdefs.h. */
cd958eb3
MB
16597$ac_includes_default
16598int
16599main ()
16600{
16601getpgrp (0);
16602 ;
16603 return 0;
16604}
16605_ACEOF
16606rm -f conftest.$ac_objext
16607if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16608 (eval $ac_compile) 2>conftest.er1
cd958eb3 16609 ac_status=$?
35996d22
AS
16610 grep -v '^ *+' conftest.er1 >conftest.err
16611 rm -f conftest.er1
16612 cat conftest.err >&5
cd958eb3
MB
16613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16614 (exit $ac_status); } &&
4494a266
JD
16615 { ac_try='test -z "$ac_c_werror_flag"
16616 || test ! -s conftest.err'
35996d22
AS
16617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16618 (eval $ac_try) 2>&5
16619 ac_status=$?
16620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16621 (exit $ac_status); }; } &&
16622 { ac_try='test -s conftest.$ac_objext'
cd958eb3
MB
16623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16624 (eval $ac_try) 2>&5
16625 ac_status=$?
16626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16627 (exit $ac_status); }; }; then
16628 ac_cv_func_getpgrp_void=no
16629else
16630 echo "$as_me: failed program was:" >&5
19650fd6
AS
16631sed 's/^/| /' conftest.$ac_ext >&5
16632
cd958eb3
MB
16633ac_cv_func_getpgrp_void=yes
16634fi
35996d22 16635rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
16636
16637fi
16638echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
16639echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6
16640if test $ac_cv_func_getpgrp_void = yes; then
16641
16642cat >>confdefs.h <<\_ACEOF
16643#define GETPGRP_VOID 1
16644_ACEOF
16645
16646fi
16647
16648
973a76b1
DL
16649
16650for ac_func in strftime
16651do
16652as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16653echo "$as_me:$LINENO: checking for $ac_func" >&5
16654echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16655if eval "test \"\${$as_ac_var+set}\" = set"; then
16656 echo $ECHO_N "(cached) $ECHO_C" >&6
16657else
16658 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16659/* confdefs.h. */
16660_ACEOF
16661cat confdefs.h >>conftest.$ac_ext
16662cat >>conftest.$ac_ext <<_ACEOF
16663/* end confdefs.h. */
35996d22
AS
16664/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16665 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16666#define $ac_func innocuous_$ac_func
16667
973a76b1 16668/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16669 which can conflict with char $ac_func (); below.
16670 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16671 <limits.h> exists even on freestanding compilers. */
35996d22 16672
19650fd6
AS
16673#ifdef __STDC__
16674# include <limits.h>
16675#else
16676# include <assert.h>
16677#endif
35996d22
AS
16678
16679#undef $ac_func
16680
973a76b1
DL
16681/* Override any gcc2 internal prototype to avoid an error. */
16682#ifdef __cplusplus
16683extern "C"
19650fd6 16684{
973a76b1
DL
16685#endif
16686/* We use char because int might match the return type of a gcc2
16687 builtin and then its argument prototype would still apply. */
16688char $ac_func ();
16689/* The GNU C library defines this for functions which it implements
16690 to always fail with ENOSYS. Some functions are actually named
16691 something starting with __ and the normal name is an alias. */
16692#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16693choke me
16694#else
19650fd6
AS
16695char (*f) () = $ac_func;
16696#endif
16697#ifdef __cplusplus
16698}
973a76b1
DL
16699#endif
16700
19650fd6
AS
16701int
16702main ()
16703{
16704return f != $ac_func;
973a76b1
DL
16705 ;
16706 return 0;
16707}
16708_ACEOF
16709rm -f conftest.$ac_objext conftest$ac_exeext
16710if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 16711 (eval $ac_link) 2>conftest.er1
973a76b1 16712 ac_status=$?
35996d22
AS
16713 grep -v '^ *+' conftest.er1 >conftest.err
16714 rm -f conftest.er1
16715 cat conftest.err >&5
973a76b1
DL
16716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16717 (exit $ac_status); } &&
4494a266
JD
16718 { ac_try='test -z "$ac_c_werror_flag"
16719 || test ! -s conftest.err'
35996d22
AS
16720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16721 (eval $ac_try) 2>&5
16722 ac_status=$?
16723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16724 (exit $ac_status); }; } &&
16725 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
16726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16727 (eval $ac_try) 2>&5
16728 ac_status=$?
16729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16730 (exit $ac_status); }; }; then
16731 eval "$as_ac_var=yes"
16732else
16733 echo "$as_me: failed program was:" >&5
19650fd6
AS
16734sed 's/^/| /' conftest.$ac_ext >&5
16735
973a76b1
DL
16736eval "$as_ac_var=no"
16737fi
35996d22
AS
16738rm -f conftest.err conftest.$ac_objext \
16739 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
16740fi
16741echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16742echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16743if test `eval echo '${'$as_ac_var'}'` = yes; then
16744 cat >>confdefs.h <<_ACEOF
16745#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16746_ACEOF
16747
16748else
16749 # strftime is in -lintl on SCO UNIX.
16750echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
16751echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
16752if test "${ac_cv_lib_intl_strftime+set}" = set; then
16753 echo $ECHO_N "(cached) $ECHO_C" >&6
16754else
16755 ac_check_lib_save_LIBS=$LIBS
16756LIBS="-lintl $LIBS"
16757cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16758/* confdefs.h. */
16759_ACEOF
16760cat confdefs.h >>conftest.$ac_ext
16761cat >>conftest.$ac_ext <<_ACEOF
16762/* end confdefs.h. */
973a76b1
DL
16763
16764/* Override any gcc2 internal prototype to avoid an error. */
16765#ifdef __cplusplus
16766extern "C"
16767#endif
16768/* We use char because int might match the return type of a gcc2
16769 builtin and then its argument prototype would still apply. */
16770char strftime ();
16771int
16772main ()
16773{
16774strftime ();
16775 ;
16776 return 0;
16777}
16778_ACEOF
16779rm -f conftest.$ac_objext conftest$ac_exeext
16780if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 16781 (eval $ac_link) 2>conftest.er1
973a76b1 16782 ac_status=$?
35996d22
AS
16783 grep -v '^ *+' conftest.er1 >conftest.err
16784 rm -f conftest.er1
16785 cat conftest.err >&5
973a76b1
DL
16786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16787 (exit $ac_status); } &&
4494a266
JD
16788 { ac_try='test -z "$ac_c_werror_flag"
16789 || test ! -s conftest.err'
35996d22
AS
16790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16791 (eval $ac_try) 2>&5
16792 ac_status=$?
16793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16794 (exit $ac_status); }; } &&
16795 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
16796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16797 (eval $ac_try) 2>&5
16798 ac_status=$?
16799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16800 (exit $ac_status); }; }; then
16801 ac_cv_lib_intl_strftime=yes
16802else
16803 echo "$as_me: failed program was:" >&5
19650fd6
AS
16804sed 's/^/| /' conftest.$ac_ext >&5
16805
973a76b1
DL
16806ac_cv_lib_intl_strftime=no
16807fi
35996d22
AS
16808rm -f conftest.err conftest.$ac_objext \
16809 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
16810LIBS=$ac_check_lib_save_LIBS
16811fi
16812echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
16813echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
16814if test $ac_cv_lib_intl_strftime = yes; then
16815 cat >>confdefs.h <<\_ACEOF
16816#define HAVE_STRFTIME 1
16817_ACEOF
16818
16819LIBS="-lintl $LIBS"
16820fi
16821
16822fi
16823done
16824
16825
b936fae4
AS
16826# UNIX98 PTYs.
16827
16828for ac_func in grantpt
503d2be0
AS
16829do
16830as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 16831echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
16832echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16833if eval "test \"\${$as_ac_var+set}\" = set"; then
16834 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 16835else
503d2be0 16836 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16837/* confdefs.h. */
16838_ACEOF
16839cat confdefs.h >>conftest.$ac_ext
16840cat >>conftest.$ac_ext <<_ACEOF
16841/* end confdefs.h. */
35996d22
AS
16842/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16843 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16844#define $ac_func innocuous_$ac_func
16845
503d2be0 16846/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16847 which can conflict with char $ac_func (); below.
16848 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16849 <limits.h> exists even on freestanding compilers. */
35996d22 16850
19650fd6
AS
16851#ifdef __STDC__
16852# include <limits.h>
16853#else
16854# include <assert.h>
16855#endif
35996d22
AS
16856
16857#undef $ac_func
16858
4c343001 16859/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
16860#ifdef __cplusplus
16861extern "C"
19650fd6 16862{
503d2be0 16863#endif
4c343001 16864/* We use char because int might match the return type of a gcc2
503d2be0
AS
16865 builtin and then its argument prototype would still apply. */
16866char $ac_func ();
503d2be0
AS
16867/* The GNU C library defines this for functions which it implements
16868 to always fail with ENOSYS. Some functions are actually named
16869 something starting with __ and the normal name is an alias. */
16870#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16871choke me
16872#else
19650fd6
AS
16873char (*f) () = $ac_func;
16874#endif
16875#ifdef __cplusplus
16876}
503d2be0 16877#endif
4c343001 16878
19650fd6
AS
16879int
16880main ()
16881{
16882return f != $ac_func;
503d2be0
AS
16883 ;
16884 return 0;
16885}
16886_ACEOF
16887rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16888if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 16889 (eval $ac_link) 2>conftest.er1
503d2be0 16890 ac_status=$?
35996d22
AS
16891 grep -v '^ *+' conftest.er1 >conftest.err
16892 rm -f conftest.er1
16893 cat conftest.err >&5
c0d27fcc 16894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16895 (exit $ac_status); } &&
4494a266
JD
16896 { ac_try='test -z "$ac_c_werror_flag"
16897 || test ! -s conftest.err'
35996d22
AS
16898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16899 (eval $ac_try) 2>&5
16900 ac_status=$?
16901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16902 (exit $ac_status); }; } &&
16903 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16905 (eval $ac_try) 2>&5
16906 ac_status=$?
c0d27fcc 16907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16908 (exit $ac_status); }; }; then
16909 eval "$as_ac_var=yes"
16910else
16911 echo "$as_me: failed program was:" >&5
19650fd6
AS
16912sed 's/^/| /' conftest.$ac_ext >&5
16913
503d2be0
AS
16914eval "$as_ac_var=no"
16915fi
35996d22
AS
16916rm -f conftest.err conftest.$ac_objext \
16917 conftest$ac_exeext conftest.$ac_ext
503d2be0 16918fi
c0d27fcc 16919echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
16920echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16921if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16922 cat >>confdefs.h <<_ACEOF
503d2be0 16923#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16924_ACEOF
4c343001
DL
16925
16926fi
503d2be0
AS
16927done
16928
c0d27fcc 16929
b936fae4 16930# PTY-related GNU extensions.
4c343001 16931
b936fae4
AS
16932for ac_func in getpt
16933do
16934as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 16935echo "$as_me:$LINENO: checking for $ac_func" >&5
b936fae4
AS
16936echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16937if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 16938 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 16939else
b936fae4 16940 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16941/* confdefs.h. */
16942_ACEOF
16943cat confdefs.h >>conftest.$ac_ext
16944cat >>conftest.$ac_ext <<_ACEOF
16945/* end confdefs.h. */
35996d22
AS
16946/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16947 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16948#define $ac_func innocuous_$ac_func
16949
087121cc 16950/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16951 which can conflict with char $ac_func (); below.
16952 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16953 <limits.h> exists even on freestanding compilers. */
35996d22 16954
19650fd6
AS
16955#ifdef __STDC__
16956# include <limits.h>
16957#else
16958# include <assert.h>
16959#endif
35996d22
AS
16960
16961#undef $ac_func
16962
087121cc 16963/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
16964#ifdef __cplusplus
16965extern "C"
19650fd6 16966{
503d2be0 16967#endif
087121cc 16968/* We use char because int might match the return type of a gcc2
503d2be0
AS
16969 builtin and then its argument prototype would still apply. */
16970char $ac_func ();
087121cc
GM
16971/* The GNU C library defines this for functions which it implements
16972 to always fail with ENOSYS. Some functions are actually named
16973 something starting with __ and the normal name is an alias. */
16974#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16975choke me
16976#else
19650fd6
AS
16977char (*f) () = $ac_func;
16978#endif
16979#ifdef __cplusplus
16980}
087121cc
GM
16981#endif
16982
19650fd6
AS
16983int
16984main ()
16985{
16986return f != $ac_func;
503d2be0
AS
16987 ;
16988 return 0;
16989}
16990_ACEOF
16991rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16992if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 16993 (eval $ac_link) 2>conftest.er1
503d2be0 16994 ac_status=$?
35996d22
AS
16995 grep -v '^ *+' conftest.er1 >conftest.err
16996 rm -f conftest.er1
16997 cat conftest.err >&5
c0d27fcc 16998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16999 (exit $ac_status); } &&
4494a266
JD
17000 { ac_try='test -z "$ac_c_werror_flag"
17001 || test ! -s conftest.err'
35996d22
AS
17002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17003 (eval $ac_try) 2>&5
17004 ac_status=$?
17005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17006 (exit $ac_status); }; } &&
17007 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17009 (eval $ac_try) 2>&5
17010 ac_status=$?
c0d27fcc 17011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17012 (exit $ac_status); }; }; then
17013 eval "$as_ac_var=yes"
17014else
17015 echo "$as_me: failed program was:" >&5
19650fd6
AS
17016sed 's/^/| /' conftest.$ac_ext >&5
17017
503d2be0
AS
17018eval "$as_ac_var=no"
17019fi
35996d22
AS
17020rm -f conftest.err conftest.$ac_objext \
17021 conftest$ac_exeext conftest.$ac_ext
503d2be0 17022fi
c0d27fcc 17023echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
17024echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17025if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17026 cat >>confdefs.h <<_ACEOF
503d2be0 17027#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17028_ACEOF
087121cc 17029
087121cc
GM
17030fi
17031done
17032
c0d27fcc 17033
ba4481b5
DL
17034# Check this now, so that we will NOT find the above functions in ncurses.
17035# That is because we have not set up to link ncurses in lib-src.
17036# It's better to believe a function is not available
17037# than to expect to find it in ncurses.
503d2be0 17038
c0d27fcc 17039echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
503d2be0
AS
17040echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6
17041if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
17042 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17043else
503d2be0 17044 ac_check_lib_save_LIBS=$LIBS
ba4481b5 17045LIBS="-lncurses $LIBS"
503d2be0 17046cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17047/* confdefs.h. */
17048_ACEOF
17049cat confdefs.h >>conftest.$ac_ext
17050cat >>conftest.$ac_ext <<_ACEOF
17051/* end confdefs.h. */
503d2be0 17052
ba4481b5 17053/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17054#ifdef __cplusplus
17055extern "C"
17056#endif
ba4481b5 17057/* We use char because int might match the return type of a gcc2
503d2be0
AS
17058 builtin and then its argument prototype would still apply. */
17059char tparm ();
17060int
17061main ()
17062{
17063tparm ();
17064 ;
17065 return 0;
17066}
17067_ACEOF
17068rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17069if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17070 (eval $ac_link) 2>conftest.er1
503d2be0 17071 ac_status=$?
35996d22
AS
17072 grep -v '^ *+' conftest.er1 >conftest.err
17073 rm -f conftest.er1
17074 cat conftest.err >&5
c0d27fcc 17075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17076 (exit $ac_status); } &&
4494a266
JD
17077 { ac_try='test -z "$ac_c_werror_flag"
17078 || test ! -s conftest.err'
35996d22
AS
17079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17080 (eval $ac_try) 2>&5
17081 ac_status=$?
17082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17083 (exit $ac_status); }; } &&
17084 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17086 (eval $ac_try) 2>&5
17087 ac_status=$?
c0d27fcc 17088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17089 (exit $ac_status); }; }; then
17090 ac_cv_lib_ncurses_tparm=yes
17091else
17092 echo "$as_me: failed program was:" >&5
19650fd6
AS
17093sed 's/^/| /' conftest.$ac_ext >&5
17094
503d2be0
AS
17095ac_cv_lib_ncurses_tparm=no
17096fi
35996d22
AS
17097rm -f conftest.err conftest.$ac_objext \
17098 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17099LIBS=$ac_check_lib_save_LIBS
17100fi
c0d27fcc 17101echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
503d2be0
AS
17102echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6
17103if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 17104 cat >>confdefs.h <<_ACEOF
503d2be0 17105#define HAVE_LIBNCURSES 1
c0d27fcc 17106_ACEOF
ba4481b5
DL
17107
17108 LIBS="-lncurses $LIBS"
17109
ba4481b5
DL
17110fi
17111
c0d27fcc 17112
84e70f78
KR
17113# Do we need the Hesiod library to provide the support routines?
17114if test "$with_hesiod" = yes ; then
17115 # Don't set $LIBS here -- see comments above.
17116 resolv=no
c0d27fcc 17117 echo "$as_me:$LINENO: checking for res_send" >&5
84e70f78
KR
17118echo $ECHO_N "checking for res_send... $ECHO_C" >&6
17119if test "${ac_cv_func_res_send+set}" = set; then
17120 echo $ECHO_N "(cached) $ECHO_C" >&6
17121else
17122 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17123/* confdefs.h. */
17124_ACEOF
17125cat confdefs.h >>conftest.$ac_ext
17126cat >>conftest.$ac_ext <<_ACEOF
17127/* end confdefs.h. */
35996d22
AS
17128/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
17129 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17130#define res_send innocuous_res_send
17131
84e70f78 17132/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17133 which can conflict with char res_send (); below.
17134 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17135 <limits.h> exists even on freestanding compilers. */
35996d22 17136
19650fd6
AS
17137#ifdef __STDC__
17138# include <limits.h>
17139#else
17140# include <assert.h>
17141#endif
35996d22
AS
17142
17143#undef res_send
17144
84e70f78
KR
17145/* Override any gcc2 internal prototype to avoid an error. */
17146#ifdef __cplusplus
17147extern "C"
19650fd6 17148{
84e70f78
KR
17149#endif
17150/* We use char because int might match the return type of a gcc2
17151 builtin and then its argument prototype would still apply. */
17152char res_send ();
84e70f78
KR
17153/* The GNU C library defines this for functions which it implements
17154 to always fail with ENOSYS. Some functions are actually named
17155 something starting with __ and the normal name is an alias. */
17156#if defined (__stub_res_send) || defined (__stub___res_send)
17157choke me
17158#else
19650fd6
AS
17159char (*f) () = res_send;
17160#endif
17161#ifdef __cplusplus
17162}
cd958eb3
MB
17163#endif
17164
19650fd6
AS
17165int
17166main ()
17167{
17168return f != res_send;
84e70f78
KR
17169 ;
17170 return 0;
17171}
17172_ACEOF
17173rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17174if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17175 (eval $ac_link) 2>conftest.er1
84e70f78 17176 ac_status=$?
35996d22
AS
17177 grep -v '^ *+' conftest.er1 >conftest.err
17178 rm -f conftest.er1
17179 cat conftest.err >&5
c0d27fcc 17180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17181 (exit $ac_status); } &&
4494a266
JD
17182 { ac_try='test -z "$ac_c_werror_flag"
17183 || test ! -s conftest.err'
35996d22
AS
17184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17185 (eval $ac_try) 2>&5
17186 ac_status=$?
17187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17188 (exit $ac_status); }; } &&
17189 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17191 (eval $ac_try) 2>&5
17192 ac_status=$?
c0d27fcc 17193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17194 (exit $ac_status); }; }; then
17195 ac_cv_func_res_send=yes
17196else
17197 echo "$as_me: failed program was:" >&5
19650fd6
AS
17198sed 's/^/| /' conftest.$ac_ext >&5
17199
84e70f78
KR
17200ac_cv_func_res_send=no
17201fi
35996d22
AS
17202rm -f conftest.err conftest.$ac_objext \
17203 conftest$ac_exeext conftest.$ac_ext
84e70f78 17204fi
c0d27fcc 17205echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
84e70f78
KR
17206echo "${ECHO_T}$ac_cv_func_res_send" >&6
17207if test $ac_cv_func_res_send = yes; then
17208 :
17209else
c0d27fcc 17210 echo "$as_me:$LINENO: checking for __res_send" >&5
84e70f78
KR
17211echo $ECHO_N "checking for __res_send... $ECHO_C" >&6
17212if test "${ac_cv_func___res_send+set}" = set; then
17213 echo $ECHO_N "(cached) $ECHO_C" >&6
17214else
17215 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17216/* confdefs.h. */
17217_ACEOF
17218cat confdefs.h >>conftest.$ac_ext
17219cat >>conftest.$ac_ext <<_ACEOF
17220/* end confdefs.h. */
35996d22
AS
17221/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
17222 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17223#define __res_send innocuous___res_send
17224
84e70f78 17225/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17226 which can conflict with char __res_send (); below.
17227 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17228 <limits.h> exists even on freestanding compilers. */
35996d22 17229
19650fd6
AS
17230#ifdef __STDC__
17231# include <limits.h>
17232#else
17233# include <assert.h>
17234#endif
35996d22
AS
17235
17236#undef __res_send
17237
84e70f78
KR
17238/* Override any gcc2 internal prototype to avoid an error. */
17239#ifdef __cplusplus
17240extern "C"
19650fd6 17241{
84e70f78
KR
17242#endif
17243/* We use char because int might match the return type of a gcc2
17244 builtin and then its argument prototype would still apply. */
17245char __res_send ();
84e70f78
KR
17246/* The GNU C library defines this for functions which it implements
17247 to always fail with ENOSYS. Some functions are actually named
17248 something starting with __ and the normal name is an alias. */
17249#if defined (__stub___res_send) || defined (__stub_____res_send)
17250choke me
17251#else
19650fd6
AS
17252char (*f) () = __res_send;
17253#endif
17254#ifdef __cplusplus
17255}
84e70f78
KR
17256#endif
17257
19650fd6
AS
17258int
17259main ()
17260{
17261return f != __res_send;
84e70f78
KR
17262 ;
17263 return 0;
17264}
17265_ACEOF
17266rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17267if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17268 (eval $ac_link) 2>conftest.er1
84e70f78 17269 ac_status=$?
35996d22
AS
17270 grep -v '^ *+' conftest.er1 >conftest.err
17271 rm -f conftest.er1
17272 cat conftest.err >&5
c0d27fcc 17273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17274 (exit $ac_status); } &&
4494a266
JD
17275 { ac_try='test -z "$ac_c_werror_flag"
17276 || test ! -s conftest.err'
35996d22
AS
17277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17278 (eval $ac_try) 2>&5
17279 ac_status=$?
17280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17281 (exit $ac_status); }; } &&
17282 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17284 (eval $ac_try) 2>&5
17285 ac_status=$?
c0d27fcc 17286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17287 (exit $ac_status); }; }; then
17288 ac_cv_func___res_send=yes
17289else
17290 echo "$as_me: failed program was:" >&5
19650fd6
AS
17291sed 's/^/| /' conftest.$ac_ext >&5
17292
84e70f78
KR
17293ac_cv_func___res_send=no
17294fi
35996d22
AS
17295rm -f conftest.err conftest.$ac_objext \
17296 conftest$ac_exeext conftest.$ac_ext
84e70f78 17297fi
c0d27fcc 17298echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
84e70f78
KR
17299echo "${ECHO_T}$ac_cv_func___res_send" >&6
17300if test $ac_cv_func___res_send = yes; then
17301 :
17302else
c0d27fcc 17303 echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
84e70f78
KR
17304echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6
17305if test "${ac_cv_lib_resolv_res_send+set}" = set; then
17306 echo $ECHO_N "(cached) $ECHO_C" >&6
17307else
17308 ac_check_lib_save_LIBS=$LIBS
17309LIBS="-lresolv $LIBS"
17310cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17311/* confdefs.h. */
17312_ACEOF
17313cat confdefs.h >>conftest.$ac_ext
17314cat >>conftest.$ac_ext <<_ACEOF
17315/* end confdefs.h. */
84e70f78
KR
17316
17317/* Override any gcc2 internal prototype to avoid an error. */
17318#ifdef __cplusplus
17319extern "C"
17320#endif
17321/* We use char because int might match the return type of a gcc2
17322 builtin and then its argument prototype would still apply. */
17323char res_send ();
17324int
17325main ()
17326{
17327res_send ();
17328 ;
17329 return 0;
17330}
17331_ACEOF
17332rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17333if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17334 (eval $ac_link) 2>conftest.er1
84e70f78 17335 ac_status=$?
35996d22
AS
17336 grep -v '^ *+' conftest.er1 >conftest.err
17337 rm -f conftest.er1
17338 cat conftest.err >&5
c0d27fcc 17339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17340 (exit $ac_status); } &&
4494a266
JD
17341 { ac_try='test -z "$ac_c_werror_flag"
17342 || test ! -s conftest.err'
35996d22
AS
17343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17344 (eval $ac_try) 2>&5
17345 ac_status=$?
17346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17347 (exit $ac_status); }; } &&
17348 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17350 (eval $ac_try) 2>&5
17351 ac_status=$?
c0d27fcc 17352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17353 (exit $ac_status); }; }; then
17354 ac_cv_lib_resolv_res_send=yes
17355else
17356 echo "$as_me: failed program was:" >&5
19650fd6
AS
17357sed 's/^/| /' conftest.$ac_ext >&5
17358
84e70f78
KR
17359ac_cv_lib_resolv_res_send=no
17360fi
35996d22
AS
17361rm -f conftest.err conftest.$ac_objext \
17362 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
17363LIBS=$ac_check_lib_save_LIBS
17364fi
c0d27fcc 17365echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
84e70f78
KR
17366echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6
17367if test $ac_cv_lib_resolv_res_send = yes; then
17368 resolv=yes
17369else
c0d27fcc 17370 echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
84e70f78
KR
17371echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6
17372if test "${ac_cv_lib_resolv___res_send+set}" = set; then
17373 echo $ECHO_N "(cached) $ECHO_C" >&6
17374else
17375 ac_check_lib_save_LIBS=$LIBS
17376LIBS="-lresolv $LIBS"
17377cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17378/* confdefs.h. */
17379_ACEOF
17380cat confdefs.h >>conftest.$ac_ext
17381cat >>conftest.$ac_ext <<_ACEOF
17382/* end confdefs.h. */
84e70f78
KR
17383
17384/* Override any gcc2 internal prototype to avoid an error. */
17385#ifdef __cplusplus
17386extern "C"
17387#endif
17388/* We use char because int might match the return type of a gcc2
17389 builtin and then its argument prototype would still apply. */
17390char __res_send ();
17391int
17392main ()
17393{
17394__res_send ();
17395 ;
17396 return 0;
17397}
17398_ACEOF
17399rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17400if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17401 (eval $ac_link) 2>conftest.er1
84e70f78 17402 ac_status=$?
35996d22
AS
17403 grep -v '^ *+' conftest.er1 >conftest.err
17404 rm -f conftest.er1
17405 cat conftest.err >&5
c0d27fcc 17406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17407 (exit $ac_status); } &&
4494a266
JD
17408 { ac_try='test -z "$ac_c_werror_flag"
17409 || test ! -s conftest.err'
35996d22
AS
17410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17411 (eval $ac_try) 2>&5
17412 ac_status=$?
17413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17414 (exit $ac_status); }; } &&
17415 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17417 (eval $ac_try) 2>&5
17418 ac_status=$?
c0d27fcc 17419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17420 (exit $ac_status); }; }; then
17421 ac_cv_lib_resolv___res_send=yes
17422else
17423 echo "$as_me: failed program was:" >&5
19650fd6
AS
17424sed 's/^/| /' conftest.$ac_ext >&5
17425
84e70f78
KR
17426ac_cv_lib_resolv___res_send=no
17427fi
35996d22
AS
17428rm -f conftest.err conftest.$ac_objext \
17429 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
17430LIBS=$ac_check_lib_save_LIBS
17431fi
c0d27fcc 17432echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
84e70f78
KR
17433echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6
17434if test $ac_cv_lib_resolv___res_send = yes; then
17435 resolv=yes
17436fi
17437
17438fi
17439
17440fi
17441
17442fi
17443
17444 if test "$resolv" = yes ; then
17445 RESOLVLIB=-lresolv
b936fae4 17446
c0d27fcc 17447cat >>confdefs.h <<\_ACEOF
84e70f78 17448#define HAVE_LIBRESOLV 1
c0d27fcc 17449_ACEOF
84e70f78
KR
17450
17451 else
17452 RESOLVLIB=
17453 fi
c0d27fcc 17454 echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
84e70f78
KR
17455echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6
17456if test "${ac_cv_func_hes_getmailhost+set}" = set; then
17457 echo $ECHO_N "(cached) $ECHO_C" >&6
17458else
17459 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17460/* confdefs.h. */
17461_ACEOF
17462cat confdefs.h >>conftest.$ac_ext
17463cat >>conftest.$ac_ext <<_ACEOF
17464/* end confdefs.h. */
35996d22
AS
17465/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
17466 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17467#define hes_getmailhost innocuous_hes_getmailhost
17468
84e70f78 17469/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17470 which can conflict with char hes_getmailhost (); below.
17471 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17472 <limits.h> exists even on freestanding compilers. */
35996d22 17473
19650fd6
AS
17474#ifdef __STDC__
17475# include <limits.h>
17476#else
17477# include <assert.h>
17478#endif
35996d22
AS
17479
17480#undef hes_getmailhost
17481
84e70f78
KR
17482/* Override any gcc2 internal prototype to avoid an error. */
17483#ifdef __cplusplus
17484extern "C"
19650fd6 17485{
84e70f78
KR
17486#endif
17487/* We use char because int might match the return type of a gcc2
17488 builtin and then its argument prototype would still apply. */
17489char hes_getmailhost ();
84e70f78
KR
17490/* The GNU C library defines this for functions which it implements
17491 to always fail with ENOSYS. Some functions are actually named
17492 something starting with __ and the normal name is an alias. */
17493#if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
17494choke me
17495#else
19650fd6
AS
17496char (*f) () = hes_getmailhost;
17497#endif
17498#ifdef __cplusplus
17499}
cd958eb3
MB
17500#endif
17501
19650fd6
AS
17502int
17503main ()
17504{
17505return f != hes_getmailhost;
84e70f78
KR
17506 ;
17507 return 0;
17508}
17509_ACEOF
17510rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17511if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17512 (eval $ac_link) 2>conftest.er1
84e70f78 17513 ac_status=$?
35996d22
AS
17514 grep -v '^ *+' conftest.er1 >conftest.err
17515 rm -f conftest.er1
17516 cat conftest.err >&5
c0d27fcc 17517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17518 (exit $ac_status); } &&
4494a266
JD
17519 { ac_try='test -z "$ac_c_werror_flag"
17520 || test ! -s conftest.err'
35996d22
AS
17521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17522 (eval $ac_try) 2>&5
17523 ac_status=$?
17524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17525 (exit $ac_status); }; } &&
17526 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17528 (eval $ac_try) 2>&5
17529 ac_status=$?
c0d27fcc 17530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17531 (exit $ac_status); }; }; then
17532 ac_cv_func_hes_getmailhost=yes
17533else
17534 echo "$as_me: failed program was:" >&5
19650fd6
AS
17535sed 's/^/| /' conftest.$ac_ext >&5
17536
84e70f78
KR
17537ac_cv_func_hes_getmailhost=no
17538fi
35996d22
AS
17539rm -f conftest.err conftest.$ac_objext \
17540 conftest$ac_exeext conftest.$ac_ext
84e70f78 17541fi
c0d27fcc 17542echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
84e70f78
KR
17543echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6
17544if test $ac_cv_func_hes_getmailhost = yes; then
17545 :
17546else
c0d27fcc 17547 echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
84e70f78
KR
17548echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6
17549if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
17550 echo $ECHO_N "(cached) $ECHO_C" >&6
17551else
17552 ac_check_lib_save_LIBS=$LIBS
17553LIBS="-lhesiod $RESOLVLIB $LIBS"
17554cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17555/* confdefs.h. */
17556_ACEOF
17557cat confdefs.h >>conftest.$ac_ext
17558cat >>conftest.$ac_ext <<_ACEOF
17559/* end confdefs.h. */
84e70f78
KR
17560
17561/* Override any gcc2 internal prototype to avoid an error. */
17562#ifdef __cplusplus
17563extern "C"
17564#endif
17565/* We use char because int might match the return type of a gcc2
17566 builtin and then its argument prototype would still apply. */
17567char hes_getmailhost ();
17568int
17569main ()
17570{
17571hes_getmailhost ();
17572 ;
17573 return 0;
17574}
17575_ACEOF
17576rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17577if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17578 (eval $ac_link) 2>conftest.er1
84e70f78 17579 ac_status=$?
35996d22
AS
17580 grep -v '^ *+' conftest.er1 >conftest.err
17581 rm -f conftest.er1
17582 cat conftest.err >&5
c0d27fcc 17583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17584 (exit $ac_status); } &&
4494a266
JD
17585 { ac_try='test -z "$ac_c_werror_flag"
17586 || test ! -s conftest.err'
35996d22
AS
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); }; } &&
17592 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17594 (eval $ac_try) 2>&5
17595 ac_status=$?
c0d27fcc 17596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17597 (exit $ac_status); }; }; then
17598 ac_cv_lib_hesiod_hes_getmailhost=yes
17599else
17600 echo "$as_me: failed program was:" >&5
19650fd6
AS
17601sed 's/^/| /' conftest.$ac_ext >&5
17602
84e70f78
KR
17603ac_cv_lib_hesiod_hes_getmailhost=no
17604fi
35996d22
AS
17605rm -f conftest.err conftest.$ac_objext \
17606 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
17607LIBS=$ac_check_lib_save_LIBS
17608fi
c0d27fcc 17609echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
84e70f78
KR
17610echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6
17611if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 17612
c0d27fcc 17613cat >>confdefs.h <<\_ACEOF
84e70f78 17614#define HAVE_LIBHESIOD 1
c0d27fcc 17615_ACEOF
84e70f78
KR
17616
17617else
17618 :
17619fi
17620
17621fi
17622
17623fi
17624
a21616bd
KR
17625# These tell us which Kerberos-related libraries to use.
17626if test "${with_kerberos+set}" = set; then
503d2be0 17627
c0d27fcc 17628echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
503d2be0
AS
17629echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
17630if test "${ac_cv_lib_com_err_com_err+set}" = set; then
17631 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 17632else
503d2be0 17633 ac_check_lib_save_LIBS=$LIBS
a21616bd 17634LIBS="-lcom_err $LIBS"
503d2be0 17635cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17636/* confdefs.h. */
17637_ACEOF
17638cat confdefs.h >>conftest.$ac_ext
17639cat >>conftest.$ac_ext <<_ACEOF
17640/* end confdefs.h. */
503d2be0 17641
a21616bd 17642/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17643#ifdef __cplusplus
17644extern "C"
17645#endif
a21616bd 17646/* We use char because int might match the return type of a gcc2
503d2be0
AS
17647 builtin and then its argument prototype would still apply. */
17648char com_err ();
17649int
17650main ()
17651{
17652com_err ();
17653 ;
17654 return 0;
17655}
17656_ACEOF
17657rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17658if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17659 (eval $ac_link) 2>conftest.er1
503d2be0 17660 ac_status=$?
35996d22
AS
17661 grep -v '^ *+' conftest.er1 >conftest.err
17662 rm -f conftest.er1
17663 cat conftest.err >&5
c0d27fcc 17664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17665 (exit $ac_status); } &&
4494a266
JD
17666 { ac_try='test -z "$ac_c_werror_flag"
17667 || test ! -s conftest.err'
35996d22
AS
17668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17669 (eval $ac_try) 2>&5
17670 ac_status=$?
17671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17672 (exit $ac_status); }; } &&
17673 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17675 (eval $ac_try) 2>&5
17676 ac_status=$?
c0d27fcc 17677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17678 (exit $ac_status); }; }; then
17679 ac_cv_lib_com_err_com_err=yes
17680else
17681 echo "$as_me: failed program was:" >&5
19650fd6
AS
17682sed 's/^/| /' conftest.$ac_ext >&5
17683
503d2be0
AS
17684ac_cv_lib_com_err_com_err=no
17685fi
35996d22
AS
17686rm -f conftest.err conftest.$ac_objext \
17687 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17688LIBS=$ac_check_lib_save_LIBS
17689fi
c0d27fcc 17690echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
503d2be0
AS
17691echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
17692if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 17693 cat >>confdefs.h <<_ACEOF
503d2be0 17694#define HAVE_LIBCOM_ERR 1
c0d27fcc 17695_ACEOF
a21616bd
KR
17696
17697 LIBS="-lcom_err $LIBS"
17698
a21616bd
KR
17699fi
17700
c0d27fcc
MR
17701
17702echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
503d2be0
AS
17703echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6
17704if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
17705 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 17706else
503d2be0 17707 ac_check_lib_save_LIBS=$LIBS
a21616bd 17708LIBS="-lk5crypto $LIBS"
503d2be0 17709cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17710/* confdefs.h. */
17711_ACEOF
17712cat confdefs.h >>conftest.$ac_ext
17713cat >>conftest.$ac_ext <<_ACEOF
17714/* end confdefs.h. */
503d2be0 17715
a21616bd 17716/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17717#ifdef __cplusplus
17718extern "C"
17719#endif
a21616bd 17720/* We use char because int might match the return type of a gcc2
503d2be0
AS
17721 builtin and then its argument prototype would still apply. */
17722char mit_des_cbc_encrypt ();
17723int
17724main ()
17725{
17726mit_des_cbc_encrypt ();
17727 ;
17728 return 0;
17729}
17730_ACEOF
17731rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17732if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17733 (eval $ac_link) 2>conftest.er1
503d2be0 17734 ac_status=$?
35996d22
AS
17735 grep -v '^ *+' conftest.er1 >conftest.err
17736 rm -f conftest.er1
17737 cat conftest.err >&5
c0d27fcc 17738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17739 (exit $ac_status); } &&
4494a266
JD
17740 { ac_try='test -z "$ac_c_werror_flag"
17741 || test ! -s conftest.err'
35996d22
AS
17742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17743 (eval $ac_try) 2>&5
17744 ac_status=$?
17745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17746 (exit $ac_status); }; } &&
17747 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17749 (eval $ac_try) 2>&5
17750 ac_status=$?
c0d27fcc 17751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17752 (exit $ac_status); }; }; then
17753 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
17754else
17755 echo "$as_me: failed program was:" >&5
19650fd6
AS
17756sed 's/^/| /' conftest.$ac_ext >&5
17757
503d2be0
AS
17758ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
17759fi
35996d22
AS
17760rm -f conftest.err conftest.$ac_objext \
17761 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17762LIBS=$ac_check_lib_save_LIBS
17763fi
c0d27fcc 17764echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
17765echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6
17766if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 17767 cat >>confdefs.h <<_ACEOF
503d2be0 17768#define HAVE_LIBK5CRYPTO 1
c0d27fcc 17769_ACEOF
a21616bd
KR
17770
17771 LIBS="-lk5crypto $LIBS"
17772
a21616bd
KR
17773fi
17774
c0d27fcc
MR
17775
17776echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
503d2be0
AS
17777echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6
17778if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
17779 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 17780else
503d2be0 17781 ac_check_lib_save_LIBS=$LIBS
a21616bd 17782LIBS="-lcrypto $LIBS"
503d2be0 17783cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17784/* confdefs.h. */
17785_ACEOF
17786cat confdefs.h >>conftest.$ac_ext
17787cat >>conftest.$ac_ext <<_ACEOF
17788/* end confdefs.h. */
503d2be0 17789
a21616bd 17790/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17791#ifdef __cplusplus
17792extern "C"
17793#endif
a21616bd 17794/* We use char because int might match the return type of a gcc2
503d2be0
AS
17795 builtin and then its argument prototype would still apply. */
17796char mit_des_cbc_encrypt ();
17797int
17798main ()
17799{
17800mit_des_cbc_encrypt ();
17801 ;
17802 return 0;
17803}
17804_ACEOF
17805rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17806if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17807 (eval $ac_link) 2>conftest.er1
503d2be0 17808 ac_status=$?
35996d22
AS
17809 grep -v '^ *+' conftest.er1 >conftest.err
17810 rm -f conftest.er1
17811 cat conftest.err >&5
c0d27fcc 17812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17813 (exit $ac_status); } &&
4494a266
JD
17814 { ac_try='test -z "$ac_c_werror_flag"
17815 || test ! -s conftest.err'
35996d22
AS
17816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17817 (eval $ac_try) 2>&5
17818 ac_status=$?
17819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17820 (exit $ac_status); }; } &&
17821 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17823 (eval $ac_try) 2>&5
17824 ac_status=$?
c0d27fcc 17825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17826 (exit $ac_status); }; }; then
17827 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
17828else
17829 echo "$as_me: failed program was:" >&5
19650fd6
AS
17830sed 's/^/| /' conftest.$ac_ext >&5
17831
503d2be0
AS
17832ac_cv_lib_crypto_mit_des_cbc_encrypt=no
17833fi
35996d22
AS
17834rm -f conftest.err conftest.$ac_objext \
17835 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17836LIBS=$ac_check_lib_save_LIBS
17837fi
c0d27fcc 17838echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
17839echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6
17840if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 17841 cat >>confdefs.h <<_ACEOF
503d2be0 17842#define HAVE_LIBCRYPTO 1
c0d27fcc 17843_ACEOF
a21616bd
KR
17844
17845 LIBS="-lcrypto $LIBS"
17846
a21616bd
KR
17847fi
17848
c0d27fcc
MR
17849
17850echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
503d2be0
AS
17851echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6
17852if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
17853 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 17854else
503d2be0 17855 ac_check_lib_save_LIBS=$LIBS
a21616bd 17856LIBS="-lkrb5 $LIBS"
503d2be0 17857cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17858/* confdefs.h. */
17859_ACEOF
17860cat confdefs.h >>conftest.$ac_ext
17861cat >>conftest.$ac_ext <<_ACEOF
17862/* end confdefs.h. */
a21616bd 17863
503d2be0
AS
17864/* Override any gcc2 internal prototype to avoid an error. */
17865#ifdef __cplusplus
17866extern "C"
17867#endif
17868/* We use char because int might match the return type of a gcc2
17869 builtin and then its argument prototype would still apply. */
17870char krb5_init_context ();
17871int
17872main ()
17873{
17874krb5_init_context ();
17875 ;
17876 return 0;
17877}
17878_ACEOF
17879rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17880if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17881 (eval $ac_link) 2>conftest.er1
503d2be0 17882 ac_status=$?
35996d22
AS
17883 grep -v '^ *+' conftest.er1 >conftest.err
17884 rm -f conftest.er1
17885 cat conftest.err >&5
c0d27fcc 17886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17887 (exit $ac_status); } &&
4494a266
JD
17888 { ac_try='test -z "$ac_c_werror_flag"
17889 || test ! -s conftest.err'
35996d22
AS
17890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17891 (eval $ac_try) 2>&5
17892 ac_status=$?
17893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17894 (exit $ac_status); }; } &&
17895 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17897 (eval $ac_try) 2>&5
17898 ac_status=$?
c0d27fcc 17899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17900 (exit $ac_status); }; }; then
17901 ac_cv_lib_krb5_krb5_init_context=yes
17902else
17903 echo "$as_me: failed program was:" >&5
19650fd6
AS
17904sed 's/^/| /' conftest.$ac_ext >&5
17905
503d2be0
AS
17906ac_cv_lib_krb5_krb5_init_context=no
17907fi
35996d22
AS
17908rm -f conftest.err conftest.$ac_objext \
17909 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17910LIBS=$ac_check_lib_save_LIBS
17911fi
c0d27fcc 17912echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
503d2be0
AS
17913echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6
17914if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 17915 cat >>confdefs.h <<_ACEOF
503d2be0 17916#define HAVE_LIBKRB5 1
c0d27fcc 17917_ACEOF
a21616bd
KR
17918
17919 LIBS="-lkrb5 $LIBS"
17920
a21616bd
KR
17921fi
17922
17923 if test "${with_kerberos5+set}" != set; then
503d2be0 17924
c0d27fcc 17925echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
503d2be0
AS
17926echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
17927if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
17928 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 17929else
503d2be0 17930 ac_check_lib_save_LIBS=$LIBS
a21616bd 17931LIBS="-ldes425 $LIBS"
503d2be0 17932cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17933/* confdefs.h. */
17934_ACEOF
17935cat confdefs.h >>conftest.$ac_ext
17936cat >>conftest.$ac_ext <<_ACEOF
17937/* end confdefs.h. */
503d2be0 17938
a21616bd 17939/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17940#ifdef __cplusplus
17941extern "C"
17942#endif
a21616bd 17943/* We use char because int might match the return type of a gcc2
503d2be0
AS
17944 builtin and then its argument prototype would still apply. */
17945char des_cbc_encrypt ();
17946int
17947main ()
17948{
17949des_cbc_encrypt ();
17950 ;
17951 return 0;
17952}
17953_ACEOF
17954rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17955if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17956 (eval $ac_link) 2>conftest.er1
503d2be0 17957 ac_status=$?
35996d22
AS
17958 grep -v '^ *+' conftest.er1 >conftest.err
17959 rm -f conftest.er1
17960 cat conftest.err >&5
c0d27fcc 17961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17962 (exit $ac_status); } &&
4494a266
JD
17963 { ac_try='test -z "$ac_c_werror_flag"
17964 || test ! -s conftest.err'
35996d22
AS
17965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17966 (eval $ac_try) 2>&5
17967 ac_status=$?
17968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17969 (exit $ac_status); }; } &&
17970 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17972 (eval $ac_try) 2>&5
17973 ac_status=$?
c0d27fcc 17974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17975 (exit $ac_status); }; }; then
17976 ac_cv_lib_des425_des_cbc_encrypt=yes
17977else
17978 echo "$as_me: failed program was:" >&5
19650fd6
AS
17979sed 's/^/| /' conftest.$ac_ext >&5
17980
503d2be0
AS
17981ac_cv_lib_des425_des_cbc_encrypt=no
17982fi
35996d22
AS
17983rm -f conftest.err conftest.$ac_objext \
17984 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17985LIBS=$ac_check_lib_save_LIBS
17986fi
c0d27fcc 17987echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
503d2be0
AS
17988echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
17989if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 17990 cat >>confdefs.h <<_ACEOF
503d2be0 17991#define HAVE_LIBDES425 1
c0d27fcc 17992_ACEOF
a21616bd
KR
17993
17994 LIBS="-ldes425 $LIBS"
17995
17996else
503d2be0 17997
c0d27fcc 17998echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
503d2be0
AS
17999echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
18000if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
18001 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18002else
503d2be0 18003 ac_check_lib_save_LIBS=$LIBS
a21616bd 18004LIBS="-ldes $LIBS"
503d2be0 18005cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18006/* confdefs.h. */
18007_ACEOF
18008cat confdefs.h >>conftest.$ac_ext
18009cat >>conftest.$ac_ext <<_ACEOF
18010/* end confdefs.h. */
503d2be0 18011
a21616bd 18012/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18013#ifdef __cplusplus
18014extern "C"
18015#endif
a21616bd 18016/* We use char because int might match the return type of a gcc2
503d2be0
AS
18017 builtin and then its argument prototype would still apply. */
18018char des_cbc_encrypt ();
18019int
18020main ()
18021{
18022des_cbc_encrypt ();
18023 ;
18024 return 0;
18025}
18026_ACEOF
18027rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18028if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18029 (eval $ac_link) 2>conftest.er1
503d2be0 18030 ac_status=$?
35996d22
AS
18031 grep -v '^ *+' conftest.er1 >conftest.err
18032 rm -f conftest.er1
18033 cat conftest.err >&5
c0d27fcc 18034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18035 (exit $ac_status); } &&
4494a266
JD
18036 { ac_try='test -z "$ac_c_werror_flag"
18037 || test ! -s conftest.err'
35996d22
AS
18038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18039 (eval $ac_try) 2>&5
18040 ac_status=$?
18041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18042 (exit $ac_status); }; } &&
18043 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18045 (eval $ac_try) 2>&5
18046 ac_status=$?
c0d27fcc 18047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18048 (exit $ac_status); }; }; then
18049 ac_cv_lib_des_des_cbc_encrypt=yes
18050else
18051 echo "$as_me: failed program was:" >&5
19650fd6
AS
18052sed 's/^/| /' conftest.$ac_ext >&5
18053
503d2be0
AS
18054ac_cv_lib_des_des_cbc_encrypt=no
18055fi
35996d22
AS
18056rm -f conftest.err conftest.$ac_objext \
18057 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18058LIBS=$ac_check_lib_save_LIBS
18059fi
c0d27fcc 18060echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
503d2be0
AS
18061echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
18062if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 18063 cat >>confdefs.h <<_ACEOF
503d2be0 18064#define HAVE_LIBDES 1
c0d27fcc 18065_ACEOF
a21616bd
KR
18066
18067 LIBS="-ldes $LIBS"
18068
a21616bd
KR
18069fi
18070
18071fi
18072
c0d27fcc
MR
18073
18074echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
503d2be0
AS
18075echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6
18076if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
18077 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18078else
503d2be0 18079 ac_check_lib_save_LIBS=$LIBS
a21616bd 18080LIBS="-lkrb4 $LIBS"
503d2be0 18081cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18082/* confdefs.h. */
18083_ACEOF
18084cat confdefs.h >>conftest.$ac_ext
18085cat >>conftest.$ac_ext <<_ACEOF
18086/* end confdefs.h. */
503d2be0 18087
a21616bd 18088/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18089#ifdef __cplusplus
18090extern "C"
18091#endif
a21616bd 18092/* We use char because int might match the return type of a gcc2
503d2be0
AS
18093 builtin and then its argument prototype would still apply. */
18094char krb_get_cred ();
18095int
18096main ()
18097{
18098krb_get_cred ();
18099 ;
18100 return 0;
18101}
18102_ACEOF
18103rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18104if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18105 (eval $ac_link) 2>conftest.er1
503d2be0 18106 ac_status=$?
35996d22
AS
18107 grep -v '^ *+' conftest.er1 >conftest.err
18108 rm -f conftest.er1
18109 cat conftest.err >&5
c0d27fcc 18110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18111 (exit $ac_status); } &&
4494a266
JD
18112 { ac_try='test -z "$ac_c_werror_flag"
18113 || test ! -s conftest.err'
35996d22
AS
18114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18115 (eval $ac_try) 2>&5
18116 ac_status=$?
18117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18118 (exit $ac_status); }; } &&
18119 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18121 (eval $ac_try) 2>&5
18122 ac_status=$?
c0d27fcc 18123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18124 (exit $ac_status); }; }; then
18125 ac_cv_lib_krb4_krb_get_cred=yes
18126else
18127 echo "$as_me: failed program was:" >&5
19650fd6
AS
18128sed 's/^/| /' conftest.$ac_ext >&5
18129
503d2be0
AS
18130ac_cv_lib_krb4_krb_get_cred=no
18131fi
35996d22
AS
18132rm -f conftest.err conftest.$ac_objext \
18133 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18134LIBS=$ac_check_lib_save_LIBS
18135fi
c0d27fcc 18136echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
503d2be0
AS
18137echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6
18138if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 18139 cat >>confdefs.h <<_ACEOF
503d2be0 18140#define HAVE_LIBKRB4 1
c0d27fcc 18141_ACEOF
a21616bd
KR
18142
18143 LIBS="-lkrb4 $LIBS"
18144
18145else
503d2be0 18146
c0d27fcc 18147echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
503d2be0
AS
18148echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6
18149if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
18150 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18151else
503d2be0 18152 ac_check_lib_save_LIBS=$LIBS
a21616bd 18153LIBS="-lkrb $LIBS"
503d2be0 18154cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18155/* confdefs.h. */
18156_ACEOF
18157cat confdefs.h >>conftest.$ac_ext
18158cat >>conftest.$ac_ext <<_ACEOF
18159/* end confdefs.h. */
503d2be0 18160
a21616bd 18161/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18162#ifdef __cplusplus
18163extern "C"
18164#endif
a21616bd 18165/* We use char because int might match the return type of a gcc2
503d2be0
AS
18166 builtin and then its argument prototype would still apply. */
18167char krb_get_cred ();
18168int
18169main ()
18170{
18171krb_get_cred ();
18172 ;
18173 return 0;
18174}
18175_ACEOF
18176rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18177if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18178 (eval $ac_link) 2>conftest.er1
503d2be0 18179 ac_status=$?
35996d22
AS
18180 grep -v '^ *+' conftest.er1 >conftest.err
18181 rm -f conftest.er1
18182 cat conftest.err >&5
c0d27fcc 18183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18184 (exit $ac_status); } &&
4494a266
JD
18185 { ac_try='test -z "$ac_c_werror_flag"
18186 || test ! -s conftest.err'
35996d22
AS
18187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18188 (eval $ac_try) 2>&5
18189 ac_status=$?
18190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18191 (exit $ac_status); }; } &&
18192 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18194 (eval $ac_try) 2>&5
18195 ac_status=$?
c0d27fcc 18196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18197 (exit $ac_status); }; }; then
18198 ac_cv_lib_krb_krb_get_cred=yes
18199else
18200 echo "$as_me: failed program was:" >&5
19650fd6
AS
18201sed 's/^/| /' conftest.$ac_ext >&5
18202
503d2be0
AS
18203ac_cv_lib_krb_krb_get_cred=no
18204fi
35996d22
AS
18205rm -f conftest.err conftest.$ac_objext \
18206 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18207LIBS=$ac_check_lib_save_LIBS
18208fi
c0d27fcc 18209echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
503d2be0
AS
18210echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6
18211if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 18212 cat >>confdefs.h <<_ACEOF
503d2be0 18213#define HAVE_LIBKRB 1
c0d27fcc 18214_ACEOF
a21616bd
KR
18215
18216 LIBS="-lkrb $LIBS"
18217
a21616bd
KR
18218fi
18219
18220fi
18221
18222 fi
18223
18224 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
18225
18226for ac_header in krb5.h
a21616bd 18227do
503d2be0 18228as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18229if eval "test \"\${$as_ac_Header+set}\" = set"; then
18230 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18231echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18232if eval "test \"\${$as_ac_Header+set}\" = set"; then
18233 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18234fi
18235echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18236echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18237else
c0d27fcc
MR
18238 # Is the header compilable?
18239echo "$as_me:$LINENO: checking $ac_header usability" >&5
18240echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18241cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18242/* confdefs.h. */
18243_ACEOF
18244cat confdefs.h >>conftest.$ac_ext
18245cat >>conftest.$ac_ext <<_ACEOF
18246/* end confdefs.h. */
c0d27fcc
MR
18247$ac_includes_default
18248#include <$ac_header>
18249_ACEOF
18250rm -f conftest.$ac_objext
18251if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18252 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18253 ac_status=$?
35996d22
AS
18254 grep -v '^ *+' conftest.er1 >conftest.err
18255 rm -f conftest.er1
18256 cat conftest.err >&5
c0d27fcc
MR
18257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18258 (exit $ac_status); } &&
4494a266
JD
18259 { ac_try='test -z "$ac_c_werror_flag"
18260 || test ! -s conftest.err'
35996d22
AS
18261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18262 (eval $ac_try) 2>&5
18263 ac_status=$?
18264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18265 (exit $ac_status); }; } &&
18266 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18268 (eval $ac_try) 2>&5
18269 ac_status=$?
18270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18271 (exit $ac_status); }; }; then
18272 ac_header_compiler=yes
18273else
18274 echo "$as_me: failed program was:" >&5
19650fd6
AS
18275sed 's/^/| /' conftest.$ac_ext >&5
18276
c0d27fcc
MR
18277ac_header_compiler=no
18278fi
35996d22 18279rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18280echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18281echo "${ECHO_T}$ac_header_compiler" >&6
18282
18283# Is the header present?
18284echo "$as_me:$LINENO: checking $ac_header presence" >&5
18285echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18286cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18287/* confdefs.h. */
18288_ACEOF
18289cat confdefs.h >>conftest.$ac_ext
18290cat >>conftest.$ac_ext <<_ACEOF
18291/* end confdefs.h. */
503d2be0
AS
18292#include <$ac_header>
18293_ACEOF
c0d27fcc 18294if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18295 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18296 ac_status=$?
6bae0ccf 18297 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18298 rm -f conftest.er1
18299 cat conftest.err >&5
c0d27fcc 18300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18301 (exit $ac_status); } >/dev/null; then
18302 if test -s conftest.err; then
18303 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 18304 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18305 else
18306 ac_cpp_err=
18307 fi
18308else
18309 ac_cpp_err=yes
18310fi
18311if test -z "$ac_cpp_err"; then
c0d27fcc 18312 ac_header_preproc=yes
503d2be0
AS
18313else
18314 echo "$as_me: failed program was:" >&5
19650fd6
AS
18315sed 's/^/| /' conftest.$ac_ext >&5
18316
c0d27fcc 18317 ac_header_preproc=no
a21616bd 18318fi
503d2be0 18319rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18320echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18321echo "${ECHO_T}$ac_header_preproc" >&6
18322
18323# So? What about this header?
35996d22
AS
18324case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18325 yes:no: )
c0d27fcc
MR
18326 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18327echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
18328 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18329echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18330 ac_header_preproc=yes
19650fd6 18331 ;;
35996d22 18332 no:yes:* )
c0d27fcc
MR
18333 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18334echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
18335 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18336echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18337 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18338echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18339 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18340echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18341 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18342echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
18343 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18344echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
18345 (
18346 cat <<\_ASBOX
35996d22
AS
18347## ------------------------------------------ ##
18348## Report this to the AC_PACKAGE_NAME lists. ##
18349## ------------------------------------------ ##
19650fd6
AS
18350_ASBOX
18351 ) |
18352 sed "s/^/$as_me: WARNING: /" >&2
18353 ;;
c0d27fcc
MR
18354esac
18355echo "$as_me:$LINENO: checking for $ac_header" >&5
18356echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18357if eval "test \"\${$as_ac_Header+set}\" = set"; then
18358 echo $ECHO_N "(cached) $ECHO_C" >&6
18359else
35996d22 18360 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 18361fi
c0d27fcc 18362echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 18363echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
18364
18365fi
503d2be0 18366if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18367 cat >>confdefs.h <<_ACEOF
503d2be0 18368#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18369_ACEOF
503d2be0 18370
a21616bd 18371fi
c0d27fcc 18372
a21616bd
KR
18373done
18374
18375 else
503d2be0
AS
18376
18377for ac_header in des.h
a21616bd 18378do
503d2be0 18379as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18380if eval "test \"\${$as_ac_Header+set}\" = set"; then
18381 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18382echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18383if eval "test \"\${$as_ac_Header+set}\" = set"; then
18384 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18385fi
18386echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18387echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18388else
c0d27fcc
MR
18389 # Is the header compilable?
18390echo "$as_me:$LINENO: checking $ac_header usability" >&5
18391echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18392cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18393/* confdefs.h. */
18394_ACEOF
18395cat confdefs.h >>conftest.$ac_ext
18396cat >>conftest.$ac_ext <<_ACEOF
18397/* end confdefs.h. */
c0d27fcc
MR
18398$ac_includes_default
18399#include <$ac_header>
18400_ACEOF
18401rm -f conftest.$ac_objext
18402if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18403 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18404 ac_status=$?
35996d22
AS
18405 grep -v '^ *+' conftest.er1 >conftest.err
18406 rm -f conftest.er1
18407 cat conftest.err >&5
c0d27fcc
MR
18408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18409 (exit $ac_status); } &&
4494a266
JD
18410 { ac_try='test -z "$ac_c_werror_flag"
18411 || test ! -s conftest.err'
35996d22
AS
18412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18413 (eval $ac_try) 2>&5
18414 ac_status=$?
18415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18416 (exit $ac_status); }; } &&
18417 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18419 (eval $ac_try) 2>&5
18420 ac_status=$?
18421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18422 (exit $ac_status); }; }; then
18423 ac_header_compiler=yes
18424else
18425 echo "$as_me: failed program was:" >&5
19650fd6
AS
18426sed 's/^/| /' conftest.$ac_ext >&5
18427
c0d27fcc
MR
18428ac_header_compiler=no
18429fi
35996d22 18430rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18431echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18432echo "${ECHO_T}$ac_header_compiler" >&6
18433
18434# Is the header present?
18435echo "$as_me:$LINENO: checking $ac_header presence" >&5
18436echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18437cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18438/* confdefs.h. */
18439_ACEOF
18440cat confdefs.h >>conftest.$ac_ext
18441cat >>conftest.$ac_ext <<_ACEOF
18442/* end confdefs.h. */
503d2be0
AS
18443#include <$ac_header>
18444_ACEOF
c0d27fcc 18445if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18446 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18447 ac_status=$?
6bae0ccf 18448 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18449 rm -f conftest.er1
18450 cat conftest.err >&5
c0d27fcc 18451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18452 (exit $ac_status); } >/dev/null; then
18453 if test -s conftest.err; then
18454 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 18455 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18456 else
18457 ac_cpp_err=
18458 fi
18459else
18460 ac_cpp_err=yes
18461fi
18462if test -z "$ac_cpp_err"; then
c0d27fcc 18463 ac_header_preproc=yes
503d2be0
AS
18464else
18465 echo "$as_me: failed program was:" >&5
19650fd6
AS
18466sed 's/^/| /' conftest.$ac_ext >&5
18467
c0d27fcc 18468 ac_header_preproc=no
a21616bd 18469fi
503d2be0 18470rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18471echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18472echo "${ECHO_T}$ac_header_preproc" >&6
18473
18474# So? What about this header?
35996d22
AS
18475case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18476 yes:no: )
c0d27fcc
MR
18477 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18478echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
18479 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18480echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18481 ac_header_preproc=yes
19650fd6 18482 ;;
35996d22 18483 no:yes:* )
c0d27fcc
MR
18484 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18485echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
18486 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18487echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18488 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18489echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18490 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18491echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18492 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18493echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
18494 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18495echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
18496 (
18497 cat <<\_ASBOX
35996d22
AS
18498## ------------------------------------------ ##
18499## Report this to the AC_PACKAGE_NAME lists. ##
18500## ------------------------------------------ ##
19650fd6
AS
18501_ASBOX
18502 ) |
18503 sed "s/^/$as_me: WARNING: /" >&2
18504 ;;
c0d27fcc
MR
18505esac
18506echo "$as_me:$LINENO: checking for $ac_header" >&5
18507echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18508if eval "test \"\${$as_ac_Header+set}\" = set"; then
18509 echo $ECHO_N "(cached) $ECHO_C" >&6
18510else
35996d22 18511 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 18512fi
c0d27fcc 18513echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 18514echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
18515
18516fi
503d2be0 18517if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18518 cat >>confdefs.h <<_ACEOF
503d2be0 18519#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18520_ACEOF
503d2be0 18521
a21616bd 18522else
503d2be0
AS
18523
18524for ac_header in kerberosIV/des.h
a21616bd 18525do
503d2be0 18526as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18527if eval "test \"\${$as_ac_Header+set}\" = set"; then
18528 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18529echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18530if eval "test \"\${$as_ac_Header+set}\" = set"; then
18531 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18532fi
18533echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18534echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18535else
c0d27fcc
MR
18536 # Is the header compilable?
18537echo "$as_me:$LINENO: checking $ac_header usability" >&5
18538echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18539cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18540/* confdefs.h. */
18541_ACEOF
18542cat confdefs.h >>conftest.$ac_ext
18543cat >>conftest.$ac_ext <<_ACEOF
18544/* end confdefs.h. */
c0d27fcc
MR
18545$ac_includes_default
18546#include <$ac_header>
18547_ACEOF
18548rm -f conftest.$ac_objext
18549if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18550 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18551 ac_status=$?
35996d22
AS
18552 grep -v '^ *+' conftest.er1 >conftest.err
18553 rm -f conftest.er1
18554 cat conftest.err >&5
c0d27fcc
MR
18555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18556 (exit $ac_status); } &&
4494a266
JD
18557 { ac_try='test -z "$ac_c_werror_flag"
18558 || test ! -s conftest.err'
35996d22
AS
18559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18560 (eval $ac_try) 2>&5
18561 ac_status=$?
18562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18563 (exit $ac_status); }; } &&
18564 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18566 (eval $ac_try) 2>&5
18567 ac_status=$?
18568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18569 (exit $ac_status); }; }; then
18570 ac_header_compiler=yes
18571else
18572 echo "$as_me: failed program was:" >&5
19650fd6
AS
18573sed 's/^/| /' conftest.$ac_ext >&5
18574
c0d27fcc
MR
18575ac_header_compiler=no
18576fi
35996d22 18577rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18578echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18579echo "${ECHO_T}$ac_header_compiler" >&6
18580
18581# Is the header present?
18582echo "$as_me:$LINENO: checking $ac_header presence" >&5
18583echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18584cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18585/* confdefs.h. */
18586_ACEOF
18587cat confdefs.h >>conftest.$ac_ext
18588cat >>conftest.$ac_ext <<_ACEOF
18589/* end confdefs.h. */
503d2be0
AS
18590#include <$ac_header>
18591_ACEOF
c0d27fcc 18592if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18593 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18594 ac_status=$?
6bae0ccf 18595 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18596 rm -f conftest.er1
18597 cat conftest.err >&5
c0d27fcc 18598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18599 (exit $ac_status); } >/dev/null; then
18600 if test -s conftest.err; then
18601 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 18602 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18603 else
18604 ac_cpp_err=
18605 fi
18606else
18607 ac_cpp_err=yes
18608fi
18609if test -z "$ac_cpp_err"; then
c0d27fcc 18610 ac_header_preproc=yes
503d2be0
AS
18611else
18612 echo "$as_me: failed program was:" >&5
19650fd6
AS
18613sed 's/^/| /' conftest.$ac_ext >&5
18614
c0d27fcc 18615 ac_header_preproc=no
a21616bd 18616fi
503d2be0 18617rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18618echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18619echo "${ECHO_T}$ac_header_preproc" >&6
18620
18621# So? What about this header?
35996d22
AS
18622case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18623 yes:no: )
c0d27fcc
MR
18624 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18625echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
18626 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18627echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18628 ac_header_preproc=yes
19650fd6 18629 ;;
35996d22 18630 no:yes:* )
c0d27fcc
MR
18631 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18632echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
18633 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18634echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18635 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18636echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18637 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18638echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18639 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18640echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
18641 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18642echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
18643 (
18644 cat <<\_ASBOX
35996d22
AS
18645## ------------------------------------------ ##
18646## Report this to the AC_PACKAGE_NAME lists. ##
18647## ------------------------------------------ ##
19650fd6
AS
18648_ASBOX
18649 ) |
18650 sed "s/^/$as_me: WARNING: /" >&2
18651 ;;
c0d27fcc
MR
18652esac
18653echo "$as_me:$LINENO: checking for $ac_header" >&5
18654echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18655if eval "test \"\${$as_ac_Header+set}\" = set"; then
18656 echo $ECHO_N "(cached) $ECHO_C" >&6
18657else
35996d22 18658 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 18659fi
c0d27fcc 18660echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 18661echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
18662
18663fi
503d2be0 18664if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18665 cat >>confdefs.h <<_ACEOF
503d2be0 18666#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18667_ACEOF
503d2be0 18668
a21616bd 18669else
503d2be0
AS
18670
18671for ac_header in kerberos/des.h
a21616bd 18672do
503d2be0 18673as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18674if eval "test \"\${$as_ac_Header+set}\" = set"; then
18675 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18676echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18677if eval "test \"\${$as_ac_Header+set}\" = set"; then
18678 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18679fi
18680echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18681echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18682else
c0d27fcc
MR
18683 # Is the header compilable?
18684echo "$as_me:$LINENO: checking $ac_header usability" >&5
18685echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18686cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18687/* confdefs.h. */
18688_ACEOF
18689cat confdefs.h >>conftest.$ac_ext
18690cat >>conftest.$ac_ext <<_ACEOF
18691/* end confdefs.h. */
c0d27fcc
MR
18692$ac_includes_default
18693#include <$ac_header>
18694_ACEOF
18695rm -f conftest.$ac_objext
18696if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18697 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18698 ac_status=$?
35996d22
AS
18699 grep -v '^ *+' conftest.er1 >conftest.err
18700 rm -f conftest.er1
18701 cat conftest.err >&5
c0d27fcc
MR
18702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18703 (exit $ac_status); } &&
4494a266
JD
18704 { ac_try='test -z "$ac_c_werror_flag"
18705 || test ! -s conftest.err'
35996d22
AS
18706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18707 (eval $ac_try) 2>&5
18708 ac_status=$?
18709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18710 (exit $ac_status); }; } &&
18711 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18713 (eval $ac_try) 2>&5
18714 ac_status=$?
18715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18716 (exit $ac_status); }; }; then
18717 ac_header_compiler=yes
18718else
18719 echo "$as_me: failed program was:" >&5
19650fd6
AS
18720sed 's/^/| /' conftest.$ac_ext >&5
18721
c0d27fcc
MR
18722ac_header_compiler=no
18723fi
35996d22 18724rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18725echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18726echo "${ECHO_T}$ac_header_compiler" >&6
18727
18728# Is the header present?
18729echo "$as_me:$LINENO: checking $ac_header presence" >&5
18730echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18731cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18732/* confdefs.h. */
18733_ACEOF
18734cat confdefs.h >>conftest.$ac_ext
18735cat >>conftest.$ac_ext <<_ACEOF
18736/* end confdefs.h. */
503d2be0
AS
18737#include <$ac_header>
18738_ACEOF
c0d27fcc 18739if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18740 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18741 ac_status=$?
6bae0ccf 18742 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18743 rm -f conftest.er1
18744 cat conftest.err >&5
c0d27fcc 18745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18746 (exit $ac_status); } >/dev/null; then
18747 if test -s conftest.err; then
18748 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 18749 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18750 else
18751 ac_cpp_err=
18752 fi
18753else
18754 ac_cpp_err=yes
18755fi
18756if test -z "$ac_cpp_err"; then
c0d27fcc 18757 ac_header_preproc=yes
503d2be0
AS
18758else
18759 echo "$as_me: failed program was:" >&5
19650fd6
AS
18760sed 's/^/| /' conftest.$ac_ext >&5
18761
c0d27fcc 18762 ac_header_preproc=no
a21616bd 18763fi
503d2be0 18764rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18765echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18766echo "${ECHO_T}$ac_header_preproc" >&6
18767
18768# So? What about this header?
35996d22
AS
18769case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18770 yes:no: )
c0d27fcc
MR
18771 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18772echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
18773 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18774echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18775 ac_header_preproc=yes
19650fd6 18776 ;;
35996d22 18777 no:yes:* )
c0d27fcc
MR
18778 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18779echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
18780 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18781echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18782 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18783echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18784 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18785echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18786 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18787echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
18788 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18789echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
18790 (
18791 cat <<\_ASBOX
35996d22
AS
18792## ------------------------------------------ ##
18793## Report this to the AC_PACKAGE_NAME lists. ##
18794## ------------------------------------------ ##
19650fd6
AS
18795_ASBOX
18796 ) |
18797 sed "s/^/$as_me: WARNING: /" >&2
18798 ;;
c0d27fcc
MR
18799esac
18800echo "$as_me:$LINENO: checking for $ac_header" >&5
18801echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18802if eval "test \"\${$as_ac_Header+set}\" = set"; then
18803 echo $ECHO_N "(cached) $ECHO_C" >&6
18804else
35996d22 18805 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 18806fi
c0d27fcc 18807echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 18808echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
18809
18810fi
503d2be0 18811if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18812 cat >>confdefs.h <<_ACEOF
503d2be0 18813#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18814_ACEOF
a21616bd
KR
18815
18816fi
c0d27fcc 18817
a21616bd
KR
18818done
18819
98418dba 18820fi
c0d27fcc 18821
925c2f3f
EZ
18822done
18823
98418dba 18824fi
c0d27fcc 18825
925c2f3f 18826done
98418dba 18827
c0d27fcc 18828
925c2f3f
EZ
18829for ac_header in krb.h
18830do
18831as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18832if eval "test \"\${$as_ac_Header+set}\" = set"; then
18833 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
18834echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18835if eval "test \"\${$as_ac_Header+set}\" = set"; then
18836 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18837fi
18838echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18839echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18840else
18841 # Is the header compilable?
18842echo "$as_me:$LINENO: checking $ac_header usability" >&5
18843echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18844cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18845/* confdefs.h. */
18846_ACEOF
18847cat confdefs.h >>conftest.$ac_ext
18848cat >>conftest.$ac_ext <<_ACEOF
18849/* end confdefs.h. */
c0d27fcc
MR
18850$ac_includes_default
18851#include <$ac_header>
18852_ACEOF
18853rm -f conftest.$ac_objext
18854if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18855 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18856 ac_status=$?
35996d22
AS
18857 grep -v '^ *+' conftest.er1 >conftest.err
18858 rm -f conftest.er1
18859 cat conftest.err >&5
c0d27fcc
MR
18860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18861 (exit $ac_status); } &&
4494a266
JD
18862 { ac_try='test -z "$ac_c_werror_flag"
18863 || test ! -s conftest.err'
35996d22
AS
18864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18865 (eval $ac_try) 2>&5
18866 ac_status=$?
18867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18868 (exit $ac_status); }; } &&
18869 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18871 (eval $ac_try) 2>&5
18872 ac_status=$?
18873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18874 (exit $ac_status); }; }; then
18875 ac_header_compiler=yes
925c2f3f 18876else
c0d27fcc 18877 echo "$as_me: failed program was:" >&5
19650fd6
AS
18878sed 's/^/| /' conftest.$ac_ext >&5
18879
c0d27fcc
MR
18880ac_header_compiler=no
18881fi
35996d22 18882rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18883echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18884echo "${ECHO_T}$ac_header_compiler" >&6
18885
18886# Is the header present?
18887echo "$as_me:$LINENO: checking $ac_header presence" >&5
18888echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18889cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18890/* confdefs.h. */
18891_ACEOF
18892cat confdefs.h >>conftest.$ac_ext
18893cat >>conftest.$ac_ext <<_ACEOF
18894/* end confdefs.h. */
503d2be0
AS
18895#include <$ac_header>
18896_ACEOF
c0d27fcc 18897if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18898 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18899 ac_status=$?
6bae0ccf 18900 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18901 rm -f conftest.er1
18902 cat conftest.err >&5
c0d27fcc 18903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18904 (exit $ac_status); } >/dev/null; then
18905 if test -s conftest.err; then
18906 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 18907 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18908 else
18909 ac_cpp_err=
18910 fi
18911else
18912 ac_cpp_err=yes
18913fi
18914if test -z "$ac_cpp_err"; then
c0d27fcc 18915 ac_header_preproc=yes
503d2be0
AS
18916else
18917 echo "$as_me: failed program was:" >&5
19650fd6
AS
18918sed 's/^/| /' conftest.$ac_ext >&5
18919
c0d27fcc 18920 ac_header_preproc=no
a21616bd 18921fi
503d2be0 18922rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18923echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18924echo "${ECHO_T}$ac_header_preproc" >&6
18925
18926# So? What about this header?
35996d22
AS
18927case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18928 yes:no: )
c0d27fcc
MR
18929 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18930echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
18931 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18932echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18933 ac_header_preproc=yes
19650fd6 18934 ;;
35996d22 18935 no:yes:* )
c0d27fcc
MR
18936 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18937echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
18938 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18939echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18940 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18941echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18942 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18943echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18944 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18945echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
18946 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18947echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
18948 (
18949 cat <<\_ASBOX
35996d22
AS
18950## ------------------------------------------ ##
18951## Report this to the AC_PACKAGE_NAME lists. ##
18952## ------------------------------------------ ##
19650fd6
AS
18953_ASBOX
18954 ) |
18955 sed "s/^/$as_me: WARNING: /" >&2
18956 ;;
c0d27fcc
MR
18957esac
18958echo "$as_me:$LINENO: checking for $ac_header" >&5
18959echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18960if eval "test \"\${$as_ac_Header+set}\" = set"; then
18961 echo $ECHO_N "(cached) $ECHO_C" >&6
18962else
35996d22 18963 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 18964fi
c0d27fcc 18965echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 18966echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
18967
18968fi
503d2be0 18969if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18970 cat >>confdefs.h <<_ACEOF
503d2be0 18971#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18972_ACEOF
503d2be0 18973
a21616bd 18974else
503d2be0
AS
18975
18976for ac_header in kerberosIV/krb.h
a21616bd 18977do
503d2be0 18978as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18979if eval "test \"\${$as_ac_Header+set}\" = set"; then
18980 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18981echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18982if eval "test \"\${$as_ac_Header+set}\" = set"; then
18983 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18984fi
18985echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18986echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18987else
c0d27fcc
MR
18988 # Is the header compilable?
18989echo "$as_me:$LINENO: checking $ac_header usability" >&5
18990echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18991cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18992/* confdefs.h. */
18993_ACEOF
18994cat confdefs.h >>conftest.$ac_ext
18995cat >>conftest.$ac_ext <<_ACEOF
18996/* end confdefs.h. */
c0d27fcc
MR
18997$ac_includes_default
18998#include <$ac_header>
18999_ACEOF
19000rm -f conftest.$ac_objext
19001if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19002 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19003 ac_status=$?
35996d22
AS
19004 grep -v '^ *+' conftest.er1 >conftest.err
19005 rm -f conftest.er1
19006 cat conftest.err >&5
c0d27fcc
MR
19007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19008 (exit $ac_status); } &&
4494a266
JD
19009 { ac_try='test -z "$ac_c_werror_flag"
19010 || test ! -s conftest.err'
35996d22
AS
19011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19012 (eval $ac_try) 2>&5
19013 ac_status=$?
19014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19015 (exit $ac_status); }; } &&
19016 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19018 (eval $ac_try) 2>&5
19019 ac_status=$?
19020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19021 (exit $ac_status); }; }; then
19022 ac_header_compiler=yes
19023else
19024 echo "$as_me: failed program was:" >&5
19650fd6
AS
19025sed 's/^/| /' conftest.$ac_ext >&5
19026
c0d27fcc
MR
19027ac_header_compiler=no
19028fi
35996d22 19029rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19030echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19031echo "${ECHO_T}$ac_header_compiler" >&6
19032
19033# Is the header present?
19034echo "$as_me:$LINENO: checking $ac_header presence" >&5
19035echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19036cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19037/* confdefs.h. */
19038_ACEOF
19039cat confdefs.h >>conftest.$ac_ext
19040cat >>conftest.$ac_ext <<_ACEOF
19041/* end confdefs.h. */
503d2be0
AS
19042#include <$ac_header>
19043_ACEOF
c0d27fcc 19044if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19045 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19046 ac_status=$?
6bae0ccf 19047 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19048 rm -f conftest.er1
19049 cat conftest.err >&5
c0d27fcc 19050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19051 (exit $ac_status); } >/dev/null; then
19052 if test -s conftest.err; then
19053 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 19054 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19055 else
19056 ac_cpp_err=
19057 fi
19058else
19059 ac_cpp_err=yes
19060fi
19061if test -z "$ac_cpp_err"; then
c0d27fcc 19062 ac_header_preproc=yes
503d2be0
AS
19063else
19064 echo "$as_me: failed program was:" >&5
19650fd6
AS
19065sed 's/^/| /' conftest.$ac_ext >&5
19066
c0d27fcc 19067 ac_header_preproc=no
a21616bd 19068fi
503d2be0 19069rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19070echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19071echo "${ECHO_T}$ac_header_preproc" >&6
19072
19073# So? What about this header?
35996d22
AS
19074case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19075 yes:no: )
c0d27fcc
MR
19076 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19077echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
19078 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19079echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19080 ac_header_preproc=yes
19650fd6 19081 ;;
35996d22 19082 no:yes:* )
c0d27fcc
MR
19083 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19084echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
19085 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19086echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19087 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19088echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19089 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19090echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19091 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19092echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
19093 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19094echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19095 (
19096 cat <<\_ASBOX
35996d22
AS
19097## ------------------------------------------ ##
19098## Report this to the AC_PACKAGE_NAME lists. ##
19099## ------------------------------------------ ##
19650fd6
AS
19100_ASBOX
19101 ) |
19102 sed "s/^/$as_me: WARNING: /" >&2
19103 ;;
c0d27fcc
MR
19104esac
19105echo "$as_me:$LINENO: checking for $ac_header" >&5
19106echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19107if eval "test \"\${$as_ac_Header+set}\" = set"; then
19108 echo $ECHO_N "(cached) $ECHO_C" >&6
19109else
35996d22 19110 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19111fi
c0d27fcc 19112echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19113echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19114
19115fi
503d2be0 19116if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19117 cat >>confdefs.h <<_ACEOF
503d2be0 19118#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19119_ACEOF
503d2be0 19120
a21616bd 19121else
503d2be0
AS
19122
19123for ac_header in kerberos/krb.h
a21616bd 19124do
503d2be0 19125as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19126if eval "test \"\${$as_ac_Header+set}\" = set"; then
19127 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19128echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19129if eval "test \"\${$as_ac_Header+set}\" = set"; then
19130 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19131fi
19132echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19133echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19134else
c0d27fcc
MR
19135 # Is the header compilable?
19136echo "$as_me:$LINENO: checking $ac_header usability" >&5
19137echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19138cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19139/* confdefs.h. */
19140_ACEOF
19141cat confdefs.h >>conftest.$ac_ext
19142cat >>conftest.$ac_ext <<_ACEOF
19143/* end confdefs.h. */
c0d27fcc
MR
19144$ac_includes_default
19145#include <$ac_header>
19146_ACEOF
19147rm -f conftest.$ac_objext
19148if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19149 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19150 ac_status=$?
35996d22
AS
19151 grep -v '^ *+' conftest.er1 >conftest.err
19152 rm -f conftest.er1
19153 cat conftest.err >&5
c0d27fcc
MR
19154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19155 (exit $ac_status); } &&
4494a266
JD
19156 { ac_try='test -z "$ac_c_werror_flag"
19157 || test ! -s conftest.err'
35996d22
AS
19158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19159 (eval $ac_try) 2>&5
19160 ac_status=$?
19161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19162 (exit $ac_status); }; } &&
19163 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19165 (eval $ac_try) 2>&5
19166 ac_status=$?
19167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19168 (exit $ac_status); }; }; then
19169 ac_header_compiler=yes
19170else
19171 echo "$as_me: failed program was:" >&5
19650fd6
AS
19172sed 's/^/| /' conftest.$ac_ext >&5
19173
c0d27fcc
MR
19174ac_header_compiler=no
19175fi
35996d22 19176rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19177echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19178echo "${ECHO_T}$ac_header_compiler" >&6
19179
19180# Is the header present?
19181echo "$as_me:$LINENO: checking $ac_header presence" >&5
19182echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19183cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19184/* confdefs.h. */
19185_ACEOF
19186cat confdefs.h >>conftest.$ac_ext
19187cat >>conftest.$ac_ext <<_ACEOF
19188/* end confdefs.h. */
503d2be0
AS
19189#include <$ac_header>
19190_ACEOF
c0d27fcc 19191if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19192 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19193 ac_status=$?
6bae0ccf 19194 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19195 rm -f conftest.er1
19196 cat conftest.err >&5
c0d27fcc 19197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19198 (exit $ac_status); } >/dev/null; then
19199 if test -s conftest.err; then
19200 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 19201 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19202 else
19203 ac_cpp_err=
19204 fi
19205else
19206 ac_cpp_err=yes
19207fi
19208if test -z "$ac_cpp_err"; then
c0d27fcc 19209 ac_header_preproc=yes
503d2be0
AS
19210else
19211 echo "$as_me: failed program was:" >&5
19650fd6
AS
19212sed 's/^/| /' conftest.$ac_ext >&5
19213
c0d27fcc 19214 ac_header_preproc=no
a21616bd 19215fi
503d2be0 19216rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19217echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19218echo "${ECHO_T}$ac_header_preproc" >&6
35996d22
AS
19219
19220# So? What about this header?
19221case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19222 yes:no: )
19223 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19224echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19225 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19226echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19227 ac_header_preproc=yes
19650fd6 19228 ;;
35996d22 19229 no:yes:* )
c0d27fcc
MR
19230 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19231echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
19232 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19233echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19234 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19235echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19236 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19237echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19238 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19239echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
19240 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19241echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19242 (
19243 cat <<\_ASBOX
35996d22
AS
19244## ------------------------------------------ ##
19245## Report this to the AC_PACKAGE_NAME lists. ##
19246## ------------------------------------------ ##
19650fd6
AS
19247_ASBOX
19248 ) |
19249 sed "s/^/$as_me: WARNING: /" >&2
19250 ;;
c0d27fcc
MR
19251esac
19252echo "$as_me:$LINENO: checking for $ac_header" >&5
19253echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19254if eval "test \"\${$as_ac_Header+set}\" = set"; then
19255 echo $ECHO_N "(cached) $ECHO_C" >&6
19256else
35996d22 19257 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19258fi
c0d27fcc 19259echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19260echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19261
19262fi
503d2be0 19263if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19264 cat >>confdefs.h <<_ACEOF
503d2be0 19265#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19266_ACEOF
503d2be0 19267
a21616bd 19268fi
c0d27fcc 19269
a21616bd
KR
19270done
19271
19272fi
c0d27fcc 19273
a21616bd
KR
19274done
19275
19276fi
c0d27fcc 19277
a21616bd
KR
19278done
19279
19280 fi
503d2be0
AS
19281
19282for ac_header in com_err.h
a21616bd 19283do
503d2be0 19284as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19285if eval "test \"\${$as_ac_Header+set}\" = set"; then
19286 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19287echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19288if eval "test \"\${$as_ac_Header+set}\" = set"; then
19289 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19290fi
19291echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19292echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19293else
c0d27fcc
MR
19294 # Is the header compilable?
19295echo "$as_me:$LINENO: checking $ac_header usability" >&5
19296echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19297cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19298/* confdefs.h. */
19299_ACEOF
19300cat confdefs.h >>conftest.$ac_ext
19301cat >>conftest.$ac_ext <<_ACEOF
19302/* end confdefs.h. */
c0d27fcc
MR
19303$ac_includes_default
19304#include <$ac_header>
19305_ACEOF
19306rm -f conftest.$ac_objext
19307if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19308 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19309 ac_status=$?
35996d22
AS
19310 grep -v '^ *+' conftest.er1 >conftest.err
19311 rm -f conftest.er1
19312 cat conftest.err >&5
c0d27fcc
MR
19313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19314 (exit $ac_status); } &&
4494a266
JD
19315 { ac_try='test -z "$ac_c_werror_flag"
19316 || test ! -s conftest.err'
35996d22
AS
19317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19318 (eval $ac_try) 2>&5
19319 ac_status=$?
19320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19321 (exit $ac_status); }; } &&
19322 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19324 (eval $ac_try) 2>&5
19325 ac_status=$?
19326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19327 (exit $ac_status); }; }; then
19328 ac_header_compiler=yes
19329else
19330 echo "$as_me: failed program was:" >&5
19650fd6
AS
19331sed 's/^/| /' conftest.$ac_ext >&5
19332
c0d27fcc
MR
19333ac_header_compiler=no
19334fi
35996d22 19335rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19336echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19337echo "${ECHO_T}$ac_header_compiler" >&6
19338
19339# Is the header present?
19340echo "$as_me:$LINENO: checking $ac_header presence" >&5
19341echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19342cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19343/* confdefs.h. */
19344_ACEOF
19345cat confdefs.h >>conftest.$ac_ext
19346cat >>conftest.$ac_ext <<_ACEOF
19347/* end confdefs.h. */
503d2be0
AS
19348#include <$ac_header>
19349_ACEOF
c0d27fcc 19350if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19351 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19352 ac_status=$?
6bae0ccf 19353 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19354 rm -f conftest.er1
19355 cat conftest.err >&5
c0d27fcc 19356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19357 (exit $ac_status); } >/dev/null; then
19358 if test -s conftest.err; then
19359 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 19360 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19361 else
19362 ac_cpp_err=
19363 fi
19364else
19365 ac_cpp_err=yes
19366fi
19367if test -z "$ac_cpp_err"; then
c0d27fcc 19368 ac_header_preproc=yes
503d2be0
AS
19369else
19370 echo "$as_me: failed program was:" >&5
19650fd6
AS
19371sed 's/^/| /' conftest.$ac_ext >&5
19372
c0d27fcc 19373 ac_header_preproc=no
a21616bd 19374fi
503d2be0 19375rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19376echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19377echo "${ECHO_T}$ac_header_preproc" >&6
19378
19379# So? What about this header?
35996d22
AS
19380case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19381 yes:no: )
c0d27fcc
MR
19382 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19383echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
19384 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19385echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19386 ac_header_preproc=yes
19650fd6 19387 ;;
35996d22 19388 no:yes:* )
c0d27fcc
MR
19389 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19390echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
19391 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19392echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19393 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19394echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19395 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19396echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19397 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19398echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
19399 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19400echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19401 (
19402 cat <<\_ASBOX
35996d22
AS
19403## ------------------------------------------ ##
19404## Report this to the AC_PACKAGE_NAME lists. ##
19405## ------------------------------------------ ##
19650fd6
AS
19406_ASBOX
19407 ) |
19408 sed "s/^/$as_me: WARNING: /" >&2
19409 ;;
c0d27fcc
MR
19410esac
19411echo "$as_me:$LINENO: checking for $ac_header" >&5
19412echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19413if eval "test \"\${$as_ac_Header+set}\" = set"; then
19414 echo $ECHO_N "(cached) $ECHO_C" >&6
19415else
35996d22 19416 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19417fi
c0d27fcc 19418echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19419echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19420
19421fi
503d2be0 19422if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19423 cat >>confdefs.h <<_ACEOF
503d2be0 19424#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19425_ACEOF
503d2be0 19426
a21616bd 19427fi
c0d27fcc 19428
a21616bd
KR
19429done
19430
19431fi
19432
ba4481b5
DL
19433# Solaris requires -lintl if you want strerror (which calls dgettext)
19434# to return localized messages.
503d2be0 19435
c0d27fcc 19436echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
503d2be0
AS
19437echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
19438if test "${ac_cv_lib_intl_dgettext+set}" = set; then
19439 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19440else
503d2be0 19441 ac_check_lib_save_LIBS=$LIBS
ba4481b5 19442LIBS="-lintl $LIBS"
503d2be0 19443cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19444/* confdefs.h. */
19445_ACEOF
19446cat confdefs.h >>conftest.$ac_ext
19447cat >>conftest.$ac_ext <<_ACEOF
19448/* end confdefs.h. */
503d2be0 19449
ba4481b5 19450/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19451#ifdef __cplusplus
19452extern "C"
19453#endif
ba4481b5 19454/* We use char because int might match the return type of a gcc2
503d2be0
AS
19455 builtin and then its argument prototype would still apply. */
19456char dgettext ();
19457int
19458main ()
19459{
19460dgettext ();
19461 ;
19462 return 0;
19463}
19464_ACEOF
19465rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19466if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 19467 (eval $ac_link) 2>conftest.er1
503d2be0 19468 ac_status=$?
35996d22
AS
19469 grep -v '^ *+' conftest.er1 >conftest.err
19470 rm -f conftest.er1
19471 cat conftest.err >&5
c0d27fcc 19472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19473 (exit $ac_status); } &&
4494a266
JD
19474 { ac_try='test -z "$ac_c_werror_flag"
19475 || test ! -s conftest.err'
35996d22
AS
19476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19477 (eval $ac_try) 2>&5
19478 ac_status=$?
19479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19480 (exit $ac_status); }; } &&
19481 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19483 (eval $ac_try) 2>&5
19484 ac_status=$?
c0d27fcc 19485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19486 (exit $ac_status); }; }; then
19487 ac_cv_lib_intl_dgettext=yes
19488else
19489 echo "$as_me: failed program was:" >&5
19650fd6
AS
19490sed 's/^/| /' conftest.$ac_ext >&5
19491
503d2be0
AS
19492ac_cv_lib_intl_dgettext=no
19493fi
35996d22
AS
19494rm -f conftest.err conftest.$ac_objext \
19495 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19496LIBS=$ac_check_lib_save_LIBS
19497fi
c0d27fcc 19498echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
503d2be0
AS
19499echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
19500if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 19501 cat >>confdefs.h <<_ACEOF
503d2be0 19502#define HAVE_LIBINTL 1
c0d27fcc 19503_ACEOF
ba4481b5
DL
19504
19505 LIBS="-lintl $LIBS"
19506
ba4481b5
DL
19507fi
19508
c0d27fcc
MR
19509
19510echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
503d2be0
AS
19511echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6
19512if test "${emacs_cv_localtime_cache+set}" = set; then
19513 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
19514else
19515 if test x$ac_cv_func_tzset = xyes; then
19516if test "$cross_compiling" = yes; then
19517 # If we have tzset, assume the worst when cross-compiling.
19518emacs_cv_localtime_cache=yes
19519else
503d2be0 19520 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19521/* confdefs.h. */
19522_ACEOF
19523cat confdefs.h >>conftest.$ac_ext
19524cat >>conftest.$ac_ext <<_ACEOF
19525/* end confdefs.h. */
ba4481b5 19526#include <time.h>
ba4481b5
DL
19527extern char **environ;
19528unset_TZ ()
19529{
19530 char **from, **to;
19531 for (to = from = environ; (*to = *from); from++)
19532 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
19533 to++;
19534}
19535char TZ_GMT0[] = "TZ=GMT0";
19536char TZ_PST8[] = "TZ=PST8";
19537main()
19538{
19539 time_t now = time ((time_t *) 0);
19540 int hour_GMT0, hour_unset;
19541 if (putenv (TZ_GMT0) != 0)
19542 exit (1);
19543 hour_GMT0 = localtime (&now)->tm_hour;
19544 unset_TZ ();
19545 hour_unset = localtime (&now)->tm_hour;
19546 if (putenv (TZ_PST8) != 0)
19547 exit (1);
19548 if (localtime (&now)->tm_hour == hour_GMT0)
19549 exit (1);
19550 unset_TZ ();
19551 if (localtime (&now)->tm_hour != hour_unset)
19552 exit (1);
19553 exit (0);
19554}
503d2be0
AS
19555_ACEOF
19556rm -f conftest$ac_exeext
c0d27fcc 19557if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
19558 (eval $ac_link) 2>&5
19559 ac_status=$?
c0d27fcc 19560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19561 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 19562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19563 (eval $ac_try) 2>&5
19564 ac_status=$?
c0d27fcc 19565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19566 (exit $ac_status); }; }; then
ba4481b5
DL
19567 emacs_cv_localtime_cache=no
19568else
503d2be0
AS
19569 echo "$as_me: program exited with status $ac_status" >&5
19570echo "$as_me: failed program was:" >&5
19650fd6
AS
19571sed 's/^/| /' conftest.$ac_ext >&5
19572
c0d27fcc 19573( exit $ac_status )
503d2be0 19574emacs_cv_localtime_cache=yes
ba4481b5 19575fi
35996d22 19576rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 19577fi
ba4481b5
DL
19578else
19579 # If we lack tzset, report that localtime does not cache TZ,
19580 # since we can't invalidate the cache if we don't have tzset.
19581 emacs_cv_localtime_cache=no
19582fi
19583fi
c0d27fcc 19584echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
503d2be0 19585echo "${ECHO_T}$emacs_cv_localtime_cache" >&6
ba4481b5 19586if test $emacs_cv_localtime_cache = yes; then
b936fae4 19587
c0d27fcc 19588cat >>confdefs.h <<\_ACEOF
ba4481b5 19589#define LOCALTIME_CACHE 1
c0d27fcc 19590_ACEOF
ba4481b5
DL
19591
19592fi
19593
19594if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
19595
19596for ac_func in gettimeofday
48d4b120 19597do
503d2be0 19598as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 19599echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
19600echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19601if eval "test \"\${$as_ac_var+set}\" = set"; then
19602 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 19603else
503d2be0 19604 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19605/* confdefs.h. */
19606_ACEOF
19607cat confdefs.h >>conftest.$ac_ext
19608cat >>conftest.$ac_ext <<_ACEOF
19609/* end confdefs.h. */
35996d22
AS
19610/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19611 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19612#define $ac_func innocuous_$ac_func
19613
48d4b120 19614/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19615 which can conflict with char $ac_func (); below.
19616 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19617 <limits.h> exists even on freestanding compilers. */
35996d22 19618
19650fd6
AS
19619#ifdef __STDC__
19620# include <limits.h>
19621#else
19622# include <assert.h>
19623#endif
35996d22
AS
19624
19625#undef $ac_func
19626
48d4b120 19627/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19628#ifdef __cplusplus
19629extern "C"
19650fd6 19630{
503d2be0 19631#endif
48d4b120 19632/* We use char because int might match the return type of a gcc2
503d2be0
AS
19633 builtin and then its argument prototype would still apply. */
19634char $ac_func ();
48d4b120
DL
19635/* The GNU C library defines this for functions which it implements
19636 to always fail with ENOSYS. Some functions are actually named
19637 something starting with __ and the normal name is an alias. */
19638#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19639choke me
19640#else
19650fd6
AS
19641char (*f) () = $ac_func;
19642#endif
19643#ifdef __cplusplus
19644}
cd958eb3
MB
19645#endif
19646
19650fd6
AS
19647int
19648main ()
19649{
19650return f != $ac_func;
503d2be0
AS
19651 ;
19652 return 0;
19653}
19654_ACEOF
19655rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19656if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 19657 (eval $ac_link) 2>conftest.er1
503d2be0 19658 ac_status=$?
35996d22
AS
19659 grep -v '^ *+' conftest.er1 >conftest.err
19660 rm -f conftest.er1
19661 cat conftest.err >&5
c0d27fcc 19662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19663 (exit $ac_status); } &&
4494a266
JD
19664 { ac_try='test -z "$ac_c_werror_flag"
19665 || test ! -s conftest.err'
35996d22
AS
19666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19667 (eval $ac_try) 2>&5
19668 ac_status=$?
19669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19670 (exit $ac_status); }; } &&
19671 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19673 (eval $ac_try) 2>&5
19674 ac_status=$?
c0d27fcc 19675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19676 (exit $ac_status); }; }; then
19677 eval "$as_ac_var=yes"
19678else
19679 echo "$as_me: failed program was:" >&5
19650fd6
AS
19680sed 's/^/| /' conftest.$ac_ext >&5
19681
503d2be0
AS
19682eval "$as_ac_var=no"
19683fi
35996d22
AS
19684rm -f conftest.err conftest.$ac_objext \
19685 conftest$ac_exeext conftest.$ac_ext
503d2be0 19686fi
c0d27fcc 19687echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
19688echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19689if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19690 cat >>confdefs.h <<_ACEOF
503d2be0 19691#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19692_ACEOF
48d4b120 19693
48d4b120
DL
19694fi
19695done
19696
b936fae4 19697 if test $ac_cv_func_gettimeofday = yes; then
c0d27fcc 19698 echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
503d2be0
AS
19699echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6
19700if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
19701 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19702else
503d2be0 19703 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19704/* confdefs.h. */
19705_ACEOF
19706cat confdefs.h >>conftest.$ac_ext
19707cat >>conftest.$ac_ext <<_ACEOF
19708/* end confdefs.h. */
ba4481b5 19709
a3f08d9e
DL
19710#ifdef TIME_WITH_SYS_TIME
19711#include <sys/time.h>
19712#include <time.h>
19713#else
19714#ifdef HAVE_SYS_TIME_H
19715#include <sys/time.h>
19716#else
19717#include <time.h>
19718#endif
19719#endif
503d2be0
AS
19720int
19721main ()
19722{
a3f08d9e 19723struct timeval time;
b936fae4 19724 gettimeofday (&time, 0);
503d2be0
AS
19725 ;
19726 return 0;
19727}
19728_ACEOF
19729rm -f conftest.$ac_objext
c0d27fcc 19730if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19731 (eval $ac_compile) 2>conftest.er1
503d2be0 19732 ac_status=$?
35996d22
AS
19733 grep -v '^ *+' conftest.er1 >conftest.err
19734 rm -f conftest.er1
19735 cat conftest.err >&5
c0d27fcc 19736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19737 (exit $ac_status); } &&
4494a266
JD
19738 { ac_try='test -z "$ac_c_werror_flag"
19739 || test ! -s conftest.err'
35996d22
AS
19740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19741 (eval $ac_try) 2>&5
19742 ac_status=$?
19743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19744 (exit $ac_status); }; } &&
19745 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 19746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19747 (eval $ac_try) 2>&5
19748 ac_status=$?
c0d27fcc 19749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19750 (exit $ac_status); }; }; then
ba4481b5
DL
19751 emacs_cv_gettimeofday_two_arguments=yes
19752else
503d2be0 19753 echo "$as_me: failed program was:" >&5
19650fd6
AS
19754sed 's/^/| /' conftest.$ac_ext >&5
19755
503d2be0 19756emacs_cv_gettimeofday_two_arguments=no
ba4481b5 19757fi
35996d22 19758rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 19759fi
c0d27fcc 19760echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
503d2be0 19761echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6
b936fae4
AS
19762 if test $emacs_cv_gettimeofday_two_arguments = no; then
19763
c0d27fcc 19764cat >>confdefs.h <<\_ACEOF
ba4481b5 19765#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 19766_ACEOF
ba4481b5 19767
b936fae4 19768 fi
ba4481b5
DL
19769 fi
19770fi
19771
973a76b1
DL
19772# This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
19773echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19774echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
19775if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
19776 echo $ECHO_N "(cached) $ECHO_C" >&6
19777else
19778 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19779/* confdefs.h. */
19780_ACEOF
19781cat confdefs.h >>conftest.$ac_ext
19782cat >>conftest.$ac_ext <<_ACEOF
19783/* end confdefs.h. */
973a76b1
DL
19784#include <sys/types.h>
19785#include <$ac_cv_struct_tm>
19786
19787
19788int
19789main ()
19790{
19791static struct tm ac_aggr;
19792if (ac_aggr.tm_zone)
19793return 0;
19794 ;
19795 return 0;
19796}
19797_ACEOF
19798rm -f conftest.$ac_objext
19799if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19800 (eval $ac_compile) 2>conftest.er1
973a76b1 19801 ac_status=$?
35996d22
AS
19802 grep -v '^ *+' conftest.er1 >conftest.err
19803 rm -f conftest.er1
19804 cat conftest.err >&5
973a76b1
DL
19805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19806 (exit $ac_status); } &&
4494a266
JD
19807 { ac_try='test -z "$ac_c_werror_flag"
19808 || test ! -s conftest.err'
35996d22
AS
19809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19810 (eval $ac_try) 2>&5
19811 ac_status=$?
19812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19813 (exit $ac_status); }; } &&
19814 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
19815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19816 (eval $ac_try) 2>&5
19817 ac_status=$?
19818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19819 (exit $ac_status); }; }; then
19820 ac_cv_member_struct_tm_tm_zone=yes
19821else
19822 echo "$as_me: failed program was:" >&5
19650fd6
AS
19823sed 's/^/| /' conftest.$ac_ext >&5
19824
973a76b1 19825cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19826/* confdefs.h. */
19827_ACEOF
19828cat confdefs.h >>conftest.$ac_ext
19829cat >>conftest.$ac_ext <<_ACEOF
19830/* end confdefs.h. */
973a76b1
DL
19831#include <sys/types.h>
19832#include <$ac_cv_struct_tm>
19833
19834
19835int
19836main ()
19837{
19838static struct tm ac_aggr;
19839if (sizeof ac_aggr.tm_zone)
19840return 0;
19841 ;
19842 return 0;
19843}
19844_ACEOF
19845rm -f conftest.$ac_objext
19846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19847 (eval $ac_compile) 2>conftest.er1
973a76b1 19848 ac_status=$?
35996d22
AS
19849 grep -v '^ *+' conftest.er1 >conftest.err
19850 rm -f conftest.er1
19851 cat conftest.err >&5
973a76b1
DL
19852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19853 (exit $ac_status); } &&
4494a266
JD
19854 { ac_try='test -z "$ac_c_werror_flag"
19855 || test ! -s conftest.err'
35996d22
AS
19856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19857 (eval $ac_try) 2>&5
19858 ac_status=$?
19859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19860 (exit $ac_status); }; } &&
19861 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
19862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19863 (eval $ac_try) 2>&5
19864 ac_status=$?
19865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19866 (exit $ac_status); }; }; then
19867 ac_cv_member_struct_tm_tm_zone=yes
19868else
19869 echo "$as_me: failed program was:" >&5
19650fd6
AS
19870sed 's/^/| /' conftest.$ac_ext >&5
19871
973a76b1
DL
19872ac_cv_member_struct_tm_tm_zone=no
19873fi
35996d22 19874rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 19875fi
35996d22 19876rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1
DL
19877fi
19878echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19879echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
19880if test $ac_cv_member_struct_tm_tm_zone = yes; then
19881
19882cat >>confdefs.h <<_ACEOF
19883#define HAVE_STRUCT_TM_TM_ZONE 1
19884_ACEOF
19885
19886
19887fi
19888
19889if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19890
19891cat >>confdefs.h <<\_ACEOF
19892#define HAVE_TM_ZONE 1
19893_ACEOF
19894
19895else
19896 echo "$as_me:$LINENO: checking for tzname" >&5
19897echo $ECHO_N "checking for tzname... $ECHO_C" >&6
19898if test "${ac_cv_var_tzname+set}" = set; then
19899 echo $ECHO_N "(cached) $ECHO_C" >&6
19900else
19901 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19902/* confdefs.h. */
19903_ACEOF
19904cat confdefs.h >>conftest.$ac_ext
19905cat >>conftest.$ac_ext <<_ACEOF
19906/* end confdefs.h. */
973a76b1
DL
19907#include <time.h>
19908#ifndef tzname /* For SGI. */
19909extern char *tzname[]; /* RS6000 and others reject char **tzname. */
19910#endif
19911
19912int
19913main ()
19914{
19915atoi(*tzname);
19916 ;
19917 return 0;
19918}
19919_ACEOF
19920rm -f conftest.$ac_objext conftest$ac_exeext
19921if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 19922 (eval $ac_link) 2>conftest.er1
973a76b1 19923 ac_status=$?
35996d22
AS
19924 grep -v '^ *+' conftest.er1 >conftest.err
19925 rm -f conftest.er1
19926 cat conftest.err >&5
973a76b1
DL
19927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19928 (exit $ac_status); } &&
4494a266
JD
19929 { ac_try='test -z "$ac_c_werror_flag"
19930 || test ! -s conftest.err'
35996d22
AS
19931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19932 (eval $ac_try) 2>&5
19933 ac_status=$?
19934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19935 (exit $ac_status); }; } &&
19936 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
19937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19938 (eval $ac_try) 2>&5
19939 ac_status=$?
19940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19941 (exit $ac_status); }; }; then
19942 ac_cv_var_tzname=yes
19943else
19944 echo "$as_me: failed program was:" >&5
19650fd6
AS
19945sed 's/^/| /' conftest.$ac_ext >&5
19946
973a76b1
DL
19947ac_cv_var_tzname=no
19948fi
35996d22
AS
19949rm -f conftest.err conftest.$ac_objext \
19950 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
19951fi
19952echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19953echo "${ECHO_T}$ac_cv_var_tzname" >&6
19954 if test $ac_cv_var_tzname = yes; then
19955
19956cat >>confdefs.h <<\_ACEOF
19957#define HAVE_TZNAME 1
19958_ACEOF
19959
19960 fi
19961fi
19962
19963
48d4b120 19964if test "$ac_cv_func_gettimeofday" = yes; then
c0d27fcc 19965 echo "$as_me:$LINENO: checking for struct timezone" >&5
503d2be0
AS
19966echo $ECHO_N "checking for struct timezone... $ECHO_C" >&6
19967if test "${emacs_cv_struct_timezone+set}" = set; then
19968 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 19969else
503d2be0 19970 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19971/* confdefs.h. */
19972_ACEOF
19973cat confdefs.h >>conftest.$ac_ext
19974cat >>conftest.$ac_ext <<_ACEOF
19975/* end confdefs.h. */
48d4b120 19976#include <sys/time.h>
503d2be0
AS
19977int
19978main ()
19979{
48d4b120 19980struct timezone tz;
503d2be0
AS
19981 ;
19982 return 0;
19983}
19984_ACEOF
19985rm -f conftest.$ac_objext
c0d27fcc 19986if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19987 (eval $ac_compile) 2>conftest.er1
503d2be0 19988 ac_status=$?
35996d22
AS
19989 grep -v '^ *+' conftest.er1 >conftest.err
19990 rm -f conftest.er1
19991 cat conftest.err >&5
c0d27fcc 19992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19993 (exit $ac_status); } &&
4494a266
JD
19994 { ac_try='test -z "$ac_c_werror_flag"
19995 || test ! -s conftest.err'
35996d22
AS
19996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19997 (eval $ac_try) 2>&5
19998 ac_status=$?
19999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20000 (exit $ac_status); }; } &&
20001 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 20002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20003 (eval $ac_try) 2>&5
20004 ac_status=$?
c0d27fcc 20005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20006 (exit $ac_status); }; }; then
48d4b120
DL
20007 if test "$cross_compiling" = yes; then
20008 emacs_cv_struct_timezone=yes
20009else
503d2be0 20010 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20011/* confdefs.h. */
20012_ACEOF
20013cat confdefs.h >>conftest.$ac_ext
20014cat >>conftest.$ac_ext <<_ACEOF
20015/* end confdefs.h. */
48d4b120
DL
20016
20017#ifdef TIME_WITH_SYS_TIME
20018#include <sys/time.h>
20019#include <time.h>
20020#else
20021#ifdef HAVE_SYS_TIME_H
20022#include <sys/time.h>
20023#else
20024#include <time.h>
20025#endif
20026#endif
20027main () {
20028 struct timeval time;
20029 struct timezone dummy;
20030 exit (gettimeofday (&time, &dummy));
20031}
503d2be0
AS
20032_ACEOF
20033rm -f conftest$ac_exeext
c0d27fcc 20034if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
20035 (eval $ac_link) 2>&5
20036 ac_status=$?
c0d27fcc 20037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20038 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 20039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20040 (eval $ac_try) 2>&5
20041 ac_status=$?
c0d27fcc 20042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20043 (exit $ac_status); }; }; then
48d4b120
DL
20044 emacs_cv_struct_timezone=yes
20045else
503d2be0
AS
20046 echo "$as_me: program exited with status $ac_status" >&5
20047echo "$as_me: failed program was:" >&5
19650fd6
AS
20048sed 's/^/| /' conftest.$ac_ext >&5
20049
c0d27fcc 20050( exit $ac_status )
503d2be0 20051emacs_cv_struct_timezone=no
48d4b120 20052fi
35996d22 20053rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
48d4b120 20054fi
48d4b120 20055else
503d2be0 20056 echo "$as_me: failed program was:" >&5
19650fd6
AS
20057sed 's/^/| /' conftest.$ac_ext >&5
20058
503d2be0 20059emacs_cv_struct_timezone=no
48d4b120 20060fi
35996d22 20061rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
48d4b120 20062fi
c0d27fcc 20063echo "$as_me:$LINENO: result: $emacs_cv_struct_timezone" >&5
503d2be0 20064echo "${ECHO_T}$emacs_cv_struct_timezone" >&6
48d4b120
DL
20065fi
20066
ba4481b5 20067ok_so_far=yes
c0d27fcc 20068echo "$as_me:$LINENO: checking for socket" >&5
503d2be0
AS
20069echo $ECHO_N "checking for socket... $ECHO_C" >&6
20070if test "${ac_cv_func_socket+set}" = set; then
20071 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 20072else
503d2be0 20073 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20074/* confdefs.h. */
20075_ACEOF
20076cat confdefs.h >>conftest.$ac_ext
20077cat >>conftest.$ac_ext <<_ACEOF
20078/* end confdefs.h. */
35996d22
AS
20079/* Define socket to an innocuous variant, in case <limits.h> declares socket.
20080 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20081#define socket innocuous_socket
20082
ba4481b5 20083/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20084 which can conflict with char socket (); below.
20085 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20086 <limits.h> exists even on freestanding compilers. */
35996d22 20087
19650fd6
AS
20088#ifdef __STDC__
20089# include <limits.h>
20090#else
20091# include <assert.h>
20092#endif
35996d22
AS
20093
20094#undef socket
20095
ba4481b5 20096/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
20097#ifdef __cplusplus
20098extern "C"
19650fd6 20099{
503d2be0 20100#endif
ba4481b5 20101/* We use char because int might match the return type of a gcc2
503d2be0
AS
20102 builtin and then its argument prototype would still apply. */
20103char socket ();
ba4481b5
DL
20104/* The GNU C library defines this for functions which it implements
20105 to always fail with ENOSYS. Some functions are actually named
20106 something starting with __ and the normal name is an alias. */
20107#if defined (__stub_socket) || defined (__stub___socket)
20108choke me
20109#else
19650fd6
AS
20110char (*f) () = socket;
20111#endif
20112#ifdef __cplusplus
20113}
cd958eb3
MB
20114#endif
20115
19650fd6
AS
20116int
20117main ()
20118{
20119return f != socket;
503d2be0
AS
20120 ;
20121 return 0;
20122}
20123_ACEOF
20124rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 20125if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 20126 (eval $ac_link) 2>conftest.er1
503d2be0 20127 ac_status=$?
35996d22
AS
20128 grep -v '^ *+' conftest.er1 >conftest.err
20129 rm -f conftest.er1
20130 cat conftest.err >&5
c0d27fcc 20131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20132 (exit $ac_status); } &&
4494a266
JD
20133 { ac_try='test -z "$ac_c_werror_flag"
20134 || test ! -s conftest.err'
35996d22
AS
20135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20136 (eval $ac_try) 2>&5
20137 ac_status=$?
20138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20139 (exit $ac_status); }; } &&
20140 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 20141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20142 (eval $ac_try) 2>&5
20143 ac_status=$?
c0d27fcc 20144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20145 (exit $ac_status); }; }; then
20146 ac_cv_func_socket=yes
20147else
20148 echo "$as_me: failed program was:" >&5
19650fd6
AS
20149sed 's/^/| /' conftest.$ac_ext >&5
20150
503d2be0
AS
20151ac_cv_func_socket=no
20152fi
35996d22
AS
20153rm -f conftest.err conftest.$ac_objext \
20154 conftest$ac_exeext conftest.$ac_ext
503d2be0 20155fi
c0d27fcc 20156echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
503d2be0
AS
20157echo "${ECHO_T}$ac_cv_func_socket" >&6
20158if test $ac_cv_func_socket = yes; then
ba4481b5
DL
20159 :
20160else
503d2be0 20161 ok_so_far=no
ba4481b5
DL
20162fi
20163
20164if test $ok_so_far = yes; then
c0d27fcc
MR
20165 if test "${ac_cv_header_netinet_in_h+set}" = set; then
20166 echo "$as_me:$LINENO: checking for netinet/in.h" >&5
503d2be0
AS
20167echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
20168if test "${ac_cv_header_netinet_in_h+set}" = set; then
20169 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20170fi
20171echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
20172echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
98418dba 20173else
c0d27fcc
MR
20174 # Is the header compilable?
20175echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
20176echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6
20177cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20178/* confdefs.h. */
20179_ACEOF
20180cat confdefs.h >>conftest.$ac_ext
20181cat >>conftest.$ac_ext <<_ACEOF
20182/* end confdefs.h. */
c0d27fcc
MR
20183$ac_includes_default
20184#include <netinet/in.h>
20185_ACEOF
20186rm -f conftest.$ac_objext
20187if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20188 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20189 ac_status=$?
35996d22
AS
20190 grep -v '^ *+' conftest.er1 >conftest.err
20191 rm -f conftest.er1
20192 cat conftest.err >&5
c0d27fcc
MR
20193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20194 (exit $ac_status); } &&
4494a266
JD
20195 { ac_try='test -z "$ac_c_werror_flag"
20196 || test ! -s conftest.err'
35996d22
AS
20197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20198 (eval $ac_try) 2>&5
20199 ac_status=$?
20200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20201 (exit $ac_status); }; } &&
20202 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20204 (eval $ac_try) 2>&5
20205 ac_status=$?
20206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20207 (exit $ac_status); }; }; then
20208 ac_header_compiler=yes
20209else
20210 echo "$as_me: failed program was:" >&5
19650fd6
AS
20211sed 's/^/| /' conftest.$ac_ext >&5
20212
c0d27fcc
MR
20213ac_header_compiler=no
20214fi
35996d22 20215rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20216echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20217echo "${ECHO_T}$ac_header_compiler" >&6
20218
20219# Is the header present?
20220echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
20221echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6
20222cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20223/* confdefs.h. */
20224_ACEOF
20225cat confdefs.h >>conftest.$ac_ext
20226cat >>conftest.$ac_ext <<_ACEOF
20227/* end confdefs.h. */
ba4481b5 20228#include <netinet/in.h>
503d2be0 20229_ACEOF
c0d27fcc 20230if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20231 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20232 ac_status=$?
6bae0ccf 20233 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20234 rm -f conftest.er1
20235 cat conftest.err >&5
c0d27fcc 20236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20237 (exit $ac_status); } >/dev/null; then
20238 if test -s conftest.err; then
20239 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 20240 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20241 else
20242 ac_cpp_err=
20243 fi
20244else
20245 ac_cpp_err=yes
20246fi
20247if test -z "$ac_cpp_err"; then
c0d27fcc 20248 ac_header_preproc=yes
ba4481b5 20249else
503d2be0 20250 echo "$as_me: failed program was:" >&5
19650fd6
AS
20251sed 's/^/| /' conftest.$ac_ext >&5
20252
c0d27fcc 20253 ac_header_preproc=no
ba4481b5 20254fi
503d2be0 20255rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20256echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20257echo "${ECHO_T}$ac_header_preproc" >&6
20258
20259# So? What about this header?
35996d22
AS
20260case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20261 yes:no: )
c0d27fcc
MR
20262 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
20263echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
20264 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
20265echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
20266 ac_header_preproc=yes
19650fd6 20267 ;;
35996d22 20268 no:yes:* )
c0d27fcc
MR
20269 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
20270echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
35996d22
AS
20271 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
20272echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
20273 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
20274echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
20275 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
20276echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20277 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 20278echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
20279 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
20280echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20281 (
20282 cat <<\_ASBOX
35996d22
AS
20283## ------------------------------------------ ##
20284## Report this to the AC_PACKAGE_NAME lists. ##
20285## ------------------------------------------ ##
19650fd6
AS
20286_ASBOX
20287 ) |
20288 sed "s/^/$as_me: WARNING: /" >&2
20289 ;;
c0d27fcc
MR
20290esac
20291echo "$as_me:$LINENO: checking for netinet/in.h" >&5
20292echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
20293if test "${ac_cv_header_netinet_in_h+set}" = set; then
20294 echo $ECHO_N "(cached) $ECHO_C" >&6
20295else
20296 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 20297fi
c0d27fcc 20298echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
503d2be0 20299echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
c0d27fcc
MR
20300
20301fi
503d2be0 20302if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
20303 :
20304else
503d2be0 20305 ok_so_far=no
ba4481b5
DL
20306fi
20307
c0d27fcc 20308
ba4481b5
DL
20309fi
20310if test $ok_so_far = yes; then
c0d27fcc
MR
20311 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
20312 echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
503d2be0
AS
20313echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
20314if test "${ac_cv_header_arpa_inet_h+set}" = set; then
20315 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20316fi
20317echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
20318echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
98418dba 20319else
c0d27fcc
MR
20320 # Is the header compilable?
20321echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
20322echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6
20323cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20324/* confdefs.h. */
20325_ACEOF
20326cat confdefs.h >>conftest.$ac_ext
20327cat >>conftest.$ac_ext <<_ACEOF
20328/* end confdefs.h. */
c0d27fcc
MR
20329$ac_includes_default
20330#include <arpa/inet.h>
20331_ACEOF
20332rm -f conftest.$ac_objext
20333if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20334 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20335 ac_status=$?
35996d22
AS
20336 grep -v '^ *+' conftest.er1 >conftest.err
20337 rm -f conftest.er1
20338 cat conftest.err >&5
c0d27fcc
MR
20339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20340 (exit $ac_status); } &&
4494a266
JD
20341 { ac_try='test -z "$ac_c_werror_flag"
20342 || test ! -s conftest.err'
35996d22
AS
20343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20344 (eval $ac_try) 2>&5
20345 ac_status=$?
20346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20347 (exit $ac_status); }; } &&
20348 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20350 (eval $ac_try) 2>&5
20351 ac_status=$?
20352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20353 (exit $ac_status); }; }; then
20354 ac_header_compiler=yes
20355else
20356 echo "$as_me: failed program was:" >&5
19650fd6
AS
20357sed 's/^/| /' conftest.$ac_ext >&5
20358
c0d27fcc
MR
20359ac_header_compiler=no
20360fi
35996d22 20361rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20362echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20363echo "${ECHO_T}$ac_header_compiler" >&6
20364
20365# Is the header present?
20366echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
20367echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6
20368cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20369/* confdefs.h. */
20370_ACEOF
20371cat confdefs.h >>conftest.$ac_ext
20372cat >>conftest.$ac_ext <<_ACEOF
20373/* end confdefs.h. */
ba4481b5 20374#include <arpa/inet.h>
503d2be0 20375_ACEOF
c0d27fcc 20376if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20377 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20378 ac_status=$?
6bae0ccf 20379 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20380 rm -f conftest.er1
20381 cat conftest.err >&5
c0d27fcc 20382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20383 (exit $ac_status); } >/dev/null; then
20384 if test -s conftest.err; then
20385 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 20386 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20387 else
20388 ac_cpp_err=
20389 fi
20390else
20391 ac_cpp_err=yes
20392fi
20393if test -z "$ac_cpp_err"; then
c0d27fcc 20394 ac_header_preproc=yes
ba4481b5 20395else
503d2be0 20396 echo "$as_me: failed program was:" >&5
19650fd6
AS
20397sed 's/^/| /' conftest.$ac_ext >&5
20398
c0d27fcc 20399 ac_header_preproc=no
ba4481b5 20400fi
503d2be0 20401rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20402echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20403echo "${ECHO_T}$ac_header_preproc" >&6
20404
20405# So? What about this header?
35996d22
AS
20406case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20407 yes:no: )
c0d27fcc
MR
20408 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
20409echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
20410 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
20411echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
20412 ac_header_preproc=yes
19650fd6 20413 ;;
35996d22 20414 no:yes:* )
c0d27fcc
MR
20415 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
20416echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
35996d22
AS
20417 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
20418echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
20419 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
20420echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
20421 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
20422echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20423 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 20424echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
20425 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
20426echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20427 (
20428 cat <<\_ASBOX
35996d22
AS
20429## ------------------------------------------ ##
20430## Report this to the AC_PACKAGE_NAME lists. ##
20431## ------------------------------------------ ##
19650fd6
AS
20432_ASBOX
20433 ) |
20434 sed "s/^/$as_me: WARNING: /" >&2
20435 ;;
c0d27fcc
MR
20436esac
20437echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
20438echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
20439if test "${ac_cv_header_arpa_inet_h+set}" = set; then
20440 echo $ECHO_N "(cached) $ECHO_C" >&6
20441else
20442 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 20443fi
c0d27fcc 20444echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
503d2be0 20445echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
c0d27fcc
MR
20446
20447fi
503d2be0 20448if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
20449 :
20450else
503d2be0 20451 ok_so_far=no
ba4481b5
DL
20452fi
20453
c0d27fcc 20454
ba4481b5
DL
20455fi
20456if test $ok_so_far = yes; then
b936fae4 20457
c0d27fcc 20458cat >>confdefs.h <<\_ACEOF
ba4481b5 20459#define HAVE_INET_SOCKETS 1
c0d27fcc 20460_ACEOF
ba4481b5
DL
20461
20462fi
20463
2d2b6695 20464
7862d3a8 20465for ac_header in sys/ioctl.h
2d2b6695
KS
20466do
20467as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20468if eval "test \"\${$as_ac_Header+set}\" = set"; then
20469 echo "$as_me:$LINENO: checking for $ac_header" >&5
20470echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20471if eval "test \"\${$as_ac_Header+set}\" = set"; then
20472 echo $ECHO_N "(cached) $ECHO_C" >&6
20473fi
20474echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20475echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20476else
20477 # Is the header compilable?
20478echo "$as_me:$LINENO: checking $ac_header usability" >&5
20479echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20480cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
20481/* confdefs.h. */
20482_ACEOF
20483cat confdefs.h >>conftest.$ac_ext
20484cat >>conftest.$ac_ext <<_ACEOF
20485/* end confdefs.h. */
20486$ac_includes_default
20487#include <$ac_header>
20488_ACEOF
20489rm -f conftest.$ac_objext
20490if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20491 (eval $ac_compile) 2>conftest.er1
2d2b6695 20492 ac_status=$?
35996d22
AS
20493 grep -v '^ *+' conftest.er1 >conftest.err
20494 rm -f conftest.er1
20495 cat conftest.err >&5
2d2b6695
KS
20496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20497 (exit $ac_status); } &&
4494a266
JD
20498 { ac_try='test -z "$ac_c_werror_flag"
20499 || test ! -s conftest.err'
35996d22
AS
20500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20501 (eval $ac_try) 2>&5
20502 ac_status=$?
20503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20504 (exit $ac_status); }; } &&
20505 { ac_try='test -s conftest.$ac_objext'
2d2b6695
KS
20506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20507 (eval $ac_try) 2>&5
20508 ac_status=$?
20509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20510 (exit $ac_status); }; }; then
20511 ac_header_compiler=yes
20512else
20513 echo "$as_me: failed program was:" >&5
20514sed 's/^/| /' conftest.$ac_ext >&5
20515
20516ac_header_compiler=no
20517fi
35996d22 20518rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2d2b6695
KS
20519echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20520echo "${ECHO_T}$ac_header_compiler" >&6
20521
20522# Is the header present?
20523echo "$as_me:$LINENO: checking $ac_header presence" >&5
20524echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20525cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
20526/* confdefs.h. */
20527_ACEOF
20528cat confdefs.h >>conftest.$ac_ext
20529cat >>conftest.$ac_ext <<_ACEOF
20530/* end confdefs.h. */
20531#include <$ac_header>
20532_ACEOF
20533if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20534 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20535 ac_status=$?
20536 grep -v '^ *+' conftest.er1 >conftest.err
20537 rm -f conftest.er1
20538 cat conftest.err >&5
20539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20540 (exit $ac_status); } >/dev/null; then
20541 if test -s conftest.err; then
20542 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 20543 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2d2b6695
KS
20544 else
20545 ac_cpp_err=
20546 fi
20547else
20548 ac_cpp_err=yes
20549fi
20550if test -z "$ac_cpp_err"; then
20551 ac_header_preproc=yes
20552else
20553 echo "$as_me: failed program was:" >&5
20554sed 's/^/| /' conftest.$ac_ext >&5
20555
20556 ac_header_preproc=no
20557fi
20558rm -f conftest.err conftest.$ac_ext
20559echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20560echo "${ECHO_T}$ac_header_preproc" >&6
20561
20562# So? What about this header?
35996d22
AS
20563case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20564 yes:no: )
2d2b6695
KS
20565 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20566echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
20567 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20568echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20569 ac_header_preproc=yes
2d2b6695 20570 ;;
35996d22 20571 no:yes:* )
2d2b6695
KS
20572 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20573echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
20574 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20575echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20576 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20577echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20578 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20579echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
20580 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
20581echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
20582 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20583echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
2d2b6695
KS
20584 (
20585 cat <<\_ASBOX
35996d22
AS
20586## ------------------------------------------ ##
20587## Report this to the AC_PACKAGE_NAME lists. ##
20588## ------------------------------------------ ##
2d2b6695
KS
20589_ASBOX
20590 ) |
20591 sed "s/^/$as_me: WARNING: /" >&2
20592 ;;
20593esac
20594echo "$as_me:$LINENO: checking for $ac_header" >&5
20595echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20596if eval "test \"\${$as_ac_Header+set}\" = set"; then
20597 echo $ECHO_N "(cached) $ECHO_C" >&6
20598else
35996d22 20599 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695
KS
20600fi
20601echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20602echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20603
20604fi
20605if test `eval echo '${'$as_ac_Header'}'` = yes; then
20606 cat >>confdefs.h <<_ACEOF
20607#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20608_ACEOF
20609
20610fi
20611
20612done
20613
20614
ba4481b5 20615if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 20616
c0d27fcc 20617cat >>confdefs.h <<\_ACEOF
ba4481b5 20618#define HAVE_AIX_SMT_EXP 1
c0d27fcc 20619_ACEOF
ba4481b5
DL
20620
20621fi
20622
c0d27fcc 20623echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
503d2be0 20624echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6
3d9fec71 20625if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
c0d27fcc 20626 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 20627echo "${ECHO_T}yes" >&6
b936fae4 20628
c0d27fcc 20629cat >>confdefs.h <<\_ACEOF
3d9fec71 20630#define HAVE_DEV_PTMX 1
c0d27fcc 20631_ACEOF
3d9fec71
DL
20632
20633else
c0d27fcc 20634 echo "$as_me:$LINENO: result: no" >&5
503d2be0 20635echo "${ECHO_T}no" >&6
3d9fec71
DL
20636fi
20637
c0d27fcc 20638echo "$as_me:$LINENO: checking for pid_t" >&5
503d2be0
AS
20639echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
20640if test "${ac_cv_type_pid_t+set}" = set; then
20641 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 20642else
503d2be0 20643 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20644/* confdefs.h. */
20645_ACEOF
20646cat confdefs.h >>conftest.$ac_ext
20647cat >>conftest.$ac_ext <<_ACEOF
20648/* end confdefs.h. */
503d2be0
AS
20649$ac_includes_default
20650int
20651main ()
20652{
20653if ((pid_t *) 0)
20654 return 0;
20655if (sizeof (pid_t))
20656 return 0;
20657 ;
20658 return 0;
20659}
20660_ACEOF
20661rm -f conftest.$ac_objext
c0d27fcc 20662if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20663 (eval $ac_compile) 2>conftest.er1
503d2be0 20664 ac_status=$?
35996d22
AS
20665 grep -v '^ *+' conftest.er1 >conftest.err
20666 rm -f conftest.er1
20667 cat conftest.err >&5
c0d27fcc 20668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20669 (exit $ac_status); } &&
4494a266
JD
20670 { ac_try='test -z "$ac_c_werror_flag"
20671 || test ! -s conftest.err'
35996d22
AS
20672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20673 (eval $ac_try) 2>&5
20674 ac_status=$?
20675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20676 (exit $ac_status); }; } &&
20677 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 20678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20679 (eval $ac_try) 2>&5
20680 ac_status=$?
c0d27fcc 20681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20682 (exit $ac_status); }; }; then
647847ea
DL
20683 ac_cv_type_pid_t=yes
20684else
503d2be0 20685 echo "$as_me: failed program was:" >&5
19650fd6
AS
20686sed 's/^/| /' conftest.$ac_ext >&5
20687
503d2be0 20688ac_cv_type_pid_t=no
647847ea 20689fi
35996d22 20690rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 20691fi
c0d27fcc 20692echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
503d2be0
AS
20693echo "${ECHO_T}$ac_cv_type_pid_t" >&6
20694if test $ac_cv_type_pid_t = yes; then
20695 :
20696else
20697
c0d27fcc 20698cat >>confdefs.h <<_ACEOF
647847ea 20699#define pid_t int
c0d27fcc 20700_ACEOF
647847ea
DL
20701
20702fi
20703
c0d27fcc
MR
20704
20705
503d2be0
AS
20706for ac_header in unistd.h vfork.h
20707do
20708as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20709if eval "test \"\${$as_ac_Header+set}\" = set"; then
20710 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
20711echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20712if eval "test \"\${$as_ac_Header+set}\" = set"; then
20713 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20714fi
20715echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20716echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 20717else
c0d27fcc
MR
20718 # Is the header compilable?
20719echo "$as_me:$LINENO: checking $ac_header usability" >&5
20720echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20721cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20722/* confdefs.h. */
20723_ACEOF
20724cat confdefs.h >>conftest.$ac_ext
20725cat >>conftest.$ac_ext <<_ACEOF
20726/* end confdefs.h. */
c0d27fcc
MR
20727$ac_includes_default
20728#include <$ac_header>
20729_ACEOF
20730rm -f conftest.$ac_objext
20731if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20732 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20733 ac_status=$?
35996d22
AS
20734 grep -v '^ *+' conftest.er1 >conftest.err
20735 rm -f conftest.er1
20736 cat conftest.err >&5
c0d27fcc
MR
20737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20738 (exit $ac_status); } &&
4494a266
JD
20739 { ac_try='test -z "$ac_c_werror_flag"
20740 || test ! -s conftest.err'
35996d22
AS
20741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20742 (eval $ac_try) 2>&5
20743 ac_status=$?
20744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20745 (exit $ac_status); }; } &&
20746 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20748 (eval $ac_try) 2>&5
20749 ac_status=$?
20750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20751 (exit $ac_status); }; }; then
20752 ac_header_compiler=yes
20753else
20754 echo "$as_me: failed program was:" >&5
19650fd6
AS
20755sed 's/^/| /' conftest.$ac_ext >&5
20756
c0d27fcc
MR
20757ac_header_compiler=no
20758fi
35996d22 20759rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20760echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20761echo "${ECHO_T}$ac_header_compiler" >&6
20762
20763# Is the header present?
20764echo "$as_me:$LINENO: checking $ac_header presence" >&5
20765echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20766cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20767/* confdefs.h. */
20768_ACEOF
20769cat confdefs.h >>conftest.$ac_ext
20770cat >>conftest.$ac_ext <<_ACEOF
20771/* end confdefs.h. */
503d2be0
AS
20772#include <$ac_header>
20773_ACEOF
c0d27fcc 20774if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20775 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20776 ac_status=$?
6bae0ccf 20777 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20778 rm -f conftest.er1
20779 cat conftest.err >&5
c0d27fcc 20780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20781 (exit $ac_status); } >/dev/null; then
20782 if test -s conftest.err; then
20783 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 20784 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20785 else
20786 ac_cpp_err=
20787 fi
647847ea 20788else
503d2be0
AS
20789 ac_cpp_err=yes
20790fi
20791if test -z "$ac_cpp_err"; then
c0d27fcc 20792 ac_header_preproc=yes
647847ea 20793else
503d2be0 20794 echo "$as_me: failed program was:" >&5
19650fd6
AS
20795sed 's/^/| /' conftest.$ac_ext >&5
20796
c0d27fcc 20797 ac_header_preproc=no
647847ea 20798fi
503d2be0 20799rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20800echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20801echo "${ECHO_T}$ac_header_preproc" >&6
20802
20803# So? What about this header?
35996d22
AS
20804case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20805 yes:no: )
c0d27fcc
MR
20806 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20807echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
20808 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20809echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20810 ac_header_preproc=yes
19650fd6 20811 ;;
35996d22 20812 no:yes:* )
c0d27fcc
MR
20813 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20814echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
20815 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20816echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20817 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20818echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20819 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20820echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20821 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20822echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
20823 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20824echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20825 (
20826 cat <<\_ASBOX
35996d22
AS
20827## ------------------------------------------ ##
20828## Report this to the AC_PACKAGE_NAME lists. ##
20829## ------------------------------------------ ##
19650fd6
AS
20830_ASBOX
20831 ) |
20832 sed "s/^/$as_me: WARNING: /" >&2
20833 ;;
c0d27fcc
MR
20834esac
20835echo "$as_me:$LINENO: checking for $ac_header" >&5
20836echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20837if eval "test \"\${$as_ac_Header+set}\" = set"; then
20838 echo $ECHO_N "(cached) $ECHO_C" >&6
20839else
35996d22 20840 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 20841fi
c0d27fcc 20842echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20843echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20844
20845fi
503d2be0 20846if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20847 cat >>confdefs.h <<_ACEOF
503d2be0 20848#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20849_ACEOF
647847ea 20850
73b77ee5 20851fi
c0d27fcc 20852
503d2be0 20853done
73b77ee5 20854
c0d27fcc
MR
20855
20856
503d2be0
AS
20857for ac_func in fork vfork
20858do
20859as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 20860echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
20861echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20862if eval "test \"\${$as_ac_var+set}\" = set"; then
20863 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 20864else
503d2be0 20865 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20866/* confdefs.h. */
20867_ACEOF
20868cat confdefs.h >>conftest.$ac_ext
20869cat >>conftest.$ac_ext <<_ACEOF
20870/* end confdefs.h. */
35996d22
AS
20871/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20872 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20873#define $ac_func innocuous_$ac_func
20874
fa0b693c 20875/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20876 which can conflict with char $ac_func (); below.
20877 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20878 <limits.h> exists even on freestanding compilers. */
35996d22 20879
19650fd6
AS
20880#ifdef __STDC__
20881# include <limits.h>
20882#else
20883# include <assert.h>
20884#endif
35996d22
AS
20885
20886#undef $ac_func
20887
fa0b693c 20888/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
20889#ifdef __cplusplus
20890extern "C"
19650fd6 20891{
503d2be0 20892#endif
fa0b693c 20893/* We use char because int might match the return type of a gcc2
503d2be0
AS
20894 builtin and then its argument prototype would still apply. */
20895char $ac_func ();
fa0b693c
GM
20896/* The GNU C library defines this for functions which it implements
20897 to always fail with ENOSYS. Some functions are actually named
20898 something starting with __ and the normal name is an alias. */
503d2be0 20899#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
fa0b693c
GM
20900choke me
20901#else
19650fd6
AS
20902char (*f) () = $ac_func;
20903#endif
20904#ifdef __cplusplus
20905}
fa0b693c
GM
20906#endif
20907
19650fd6
AS
20908int
20909main ()
20910{
20911return f != $ac_func;
503d2be0
AS
20912 ;
20913 return 0;
20914}
20915_ACEOF
20916rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 20917if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 20918 (eval $ac_link) 2>conftest.er1
503d2be0 20919 ac_status=$?
35996d22
AS
20920 grep -v '^ *+' conftest.er1 >conftest.err
20921 rm -f conftest.er1
20922 cat conftest.err >&5
c0d27fcc 20923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20924 (exit $ac_status); } &&
4494a266
JD
20925 { ac_try='test -z "$ac_c_werror_flag"
20926 || test ! -s conftest.err'
35996d22
AS
20927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20928 (eval $ac_try) 2>&5
20929 ac_status=$?
20930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20931 (exit $ac_status); }; } &&
20932 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 20933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20934 (eval $ac_try) 2>&5
20935 ac_status=$?
c0d27fcc 20936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20937 (exit $ac_status); }; }; then
20938 eval "$as_ac_var=yes"
20939else
20940 echo "$as_me: failed program was:" >&5
19650fd6
AS
20941sed 's/^/| /' conftest.$ac_ext >&5
20942
503d2be0
AS
20943eval "$as_ac_var=no"
20944fi
35996d22
AS
20945rm -f conftest.err conftest.$ac_objext \
20946 conftest$ac_exeext conftest.$ac_ext
503d2be0 20947fi
c0d27fcc 20948echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
20949echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20950if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 20951 cat >>confdefs.h <<_ACEOF
503d2be0 20952#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 20953_ACEOF
503d2be0 20954
fa0b693c 20955fi
503d2be0 20956done
fa0b693c 20957
503d2be0 20958if test "x$ac_cv_func_fork" = xyes; then
c0d27fcc 20959 echo "$as_me:$LINENO: checking for working fork" >&5
503d2be0
AS
20960echo $ECHO_N "checking for working fork... $ECHO_C" >&6
20961if test "${ac_cv_func_fork_works+set}" = set; then
20962 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 20963else
503d2be0
AS
20964 if test "$cross_compiling" = yes; then
20965 ac_cv_func_fork_works=cross
20966else
20967 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 20968/* By Ruediger Kuhlmann. */
503d2be0
AS
20969 #include <sys/types.h>
20970 #if HAVE_UNISTD_H
20971 # include <unistd.h>
20972 #endif
20973 /* Some systems only have a dummy stub for fork() */
20974 int main ()
20975 {
35996d22
AS
20976 if (fork() < 0)
20977 exit (1);
20978 exit (0);
503d2be0
AS
20979 }
20980_ACEOF
20981rm -f conftest$ac_exeext
c0d27fcc 20982if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
20983 (eval $ac_link) 2>&5
20984 ac_status=$?
c0d27fcc 20985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20986 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 20987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20988 (eval $ac_try) 2>&5
20989 ac_status=$?
c0d27fcc 20990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20991 (exit $ac_status); }; }; then
20992 ac_cv_func_fork_works=yes
20993else
20994 echo "$as_me: program exited with status $ac_status" >&5
20995echo "$as_me: failed program was:" >&5
19650fd6
AS
20996sed 's/^/| /' conftest.$ac_ext >&5
20997
c0d27fcc 20998( exit $ac_status )
503d2be0
AS
20999ac_cv_func_fork_works=no
21000fi
35996d22 21001rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
21002fi
21003fi
c0d27fcc 21004echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
503d2be0
AS
21005echo "${ECHO_T}$ac_cv_func_fork_works" >&6
21006
6bae0ccf
DL
21007else
21008 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
21009fi
21010if test "x$ac_cv_func_fork_works" = xcross; then
21011 case $host in
21012 *-*-amigaos* | *-*-msdosdjgpp*)
21013 # Override, as these systems have only a dummy fork() stub
21014 ac_cv_func_fork_works=no
21015 ;;
21016 *)
21017 ac_cv_func_fork_works=yes
21018 ;;
21019 esac
c0d27fcc
MR
21020 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
21021echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 21022fi
73b77ee5 21023ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 21024if test "x$ac_cv_func_vfork" = xyes; then
c0d27fcc 21025 echo "$as_me:$LINENO: checking for working vfork" >&5
503d2be0
AS
21026echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
21027if test "${ac_cv_func_vfork_works+set}" = set; then
21028 echo $ECHO_N "(cached) $ECHO_C" >&6
21029else
21030 if test "$cross_compiling" = yes; then
21031 ac_cv_func_vfork_works=cross
fa0b693c 21032else
503d2be0 21033 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21034/* confdefs.h. */
21035_ACEOF
21036cat confdefs.h >>conftest.$ac_ext
21037cat >>conftest.$ac_ext <<_ACEOF
21038/* end confdefs.h. */
73b77ee5
GM
21039/* Thanks to Paul Eggert for this test. */
21040#include <stdio.h>
19650fd6 21041#include <stdlib.h>
fa0b693c 21042#include <sys/types.h>
73b77ee5 21043#include <sys/stat.h>
19650fd6 21044#include <sys/wait.h>
503d2be0
AS
21045#if HAVE_UNISTD_H
21046# include <unistd.h>
73b77ee5 21047#endif
503d2be0
AS
21048#if HAVE_VFORK_H
21049# include <vfork.h>
73b77ee5
GM
21050#endif
21051/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
21052 argument registers are propagated back to the parent. The compiler
21053 is told about this with #include <vfork.h>, but some compilers
21054 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
21055 static variable whose address is put into a register that is
21056 clobbered by the vfork. */
19650fd6 21057static void
fa0b693c 21058#ifdef __cplusplus
73b77ee5 21059sparc_address_test (int arg)
503d2be0 21060# else
73b77ee5 21061sparc_address_test (arg) int arg;
fa0b693c 21062#endif
fa0b693c 21063{
73b77ee5
GM
21064 static pid_t child;
21065 if (!child) {
21066 child = vfork ();
21067 if (child < 0) {
21068 perror ("vfork");
21069 _exit(2);
21070 }
21071 if (!child) {
21072 arg = getpid();
21073 write(-1, "", 0);
21074 _exit (arg);
21075 }
21076 }
21077}
503d2be0
AS
21078
21079int
21080main ()
21081{
73b77ee5
GM
21082 pid_t parent = getpid ();
21083 pid_t child;
fa0b693c 21084
19650fd6 21085 sparc_address_test (0);
fa0b693c 21086
73b77ee5 21087 child = vfork ();
fa0b693c 21088
73b77ee5 21089 if (child == 0) {
503d2be0
AS
21090 /* Here is another test for sparc vfork register problems. This
21091 test uses lots of local variables, at least as many local
21092 variables as main has allocated so far including compiler
21093 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
21094 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
21095 reuse the register of parent for one of the local variables,
21096 since it will think that parent can't possibly be used any more
21097 in this routine. Assigning to the local variable will thus
21098 munge parent in the parent process. */
73b77ee5
GM
21099 pid_t
21100 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
21101 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
21102 /* Convince the compiler that p..p7 are live; otherwise, it might
21103 use the same hardware register for all 8 local variables. */
21104 if (p != p1 || p != p2 || p != p3 || p != p4
21105 || p != p5 || p != p6 || p != p7)
21106 _exit(1);
fa0b693c 21107
503d2be0
AS
21108 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
21109 from child file descriptors. If the child closes a descriptor
21110 before it execs or exits, this munges the parent's descriptor
21111 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
21112 _exit(close(fileno(stdout)) != 0);
21113 } else {
21114 int status;
21115 struct stat st;
21116
21117 while (wait(&status) != child)
21118 ;
21119 exit(
21120 /* Was there some problem with vforking? */
21121 child < 0
21122
21123 /* Did the child fail? (This shouldn't happen.) */
21124 || status
21125
21126 /* Did the vfork/compiler bug occur? */
21127 || parent != getpid()
fa0b693c 21128
73b77ee5
GM
21129 /* Did the file descriptor bug occur? */
21130 || fstat(fileno(stdout), &st) != 0
21131 );
21132 }
21133}
503d2be0
AS
21134_ACEOF
21135rm -f conftest$ac_exeext
c0d27fcc 21136if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
21137 (eval $ac_link) 2>&5
21138 ac_status=$?
c0d27fcc 21139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21140 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 21141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21142 (eval $ac_try) 2>&5
21143 ac_status=$?
c0d27fcc 21144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21145 (exit $ac_status); }; }; then
73b77ee5 21146 ac_cv_func_vfork_works=yes
fa0b693c 21147else
503d2be0
AS
21148 echo "$as_me: program exited with status $ac_status" >&5
21149echo "$as_me: failed program was:" >&5
19650fd6
AS
21150sed 's/^/| /' conftest.$ac_ext >&5
21151
c0d27fcc 21152( exit $ac_status )
503d2be0
AS
21153ac_cv_func_vfork_works=no
21154fi
35996d22 21155rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 21156fi
fa0b693c 21157fi
c0d27fcc 21158echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
503d2be0 21159echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
fa0b693c 21160
503d2be0
AS
21161fi;
21162if test "x$ac_cv_func_fork_works" = xcross; then
35996d22 21163 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
21164 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
21165echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
21166fi
21167
503d2be0
AS
21168if test "x$ac_cv_func_vfork_works" = xyes; then
21169
c0d27fcc 21170cat >>confdefs.h <<\_ACEOF
503d2be0 21171#define HAVE_WORKING_VFORK 1
c0d27fcc 21172_ACEOF
503d2be0
AS
21173
21174else
21175
c0d27fcc 21176cat >>confdefs.h <<\_ACEOF
73b77ee5 21177#define vfork fork
c0d27fcc 21178_ACEOF
fa0b693c
GM
21179
21180fi
503d2be0
AS
21181if test "x$ac_cv_func_fork_works" = xyes; then
21182
c0d27fcc 21183cat >>confdefs.h <<\_ACEOF
503d2be0 21184#define HAVE_WORKING_FORK 1
c0d27fcc 21185_ACEOF
fa0b693c 21186
503d2be0 21187fi
647847ea 21188
c0d27fcc 21189
6a3a24fa
JD
21190echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
21191echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
21192if test "${emacs_cv_langinfo_codeset+set}" = set; then
21193 echo $ECHO_N "(cached) $ECHO_C" >&6
21194else
21195 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21196/* confdefs.h. */
21197_ACEOF
21198cat confdefs.h >>conftest.$ac_ext
21199cat >>conftest.$ac_ext <<_ACEOF
21200/* end confdefs.h. */
6a3a24fa
JD
21201#include <langinfo.h>
21202int
21203main ()
21204{
21205char* cs = nl_langinfo(CODESET);
21206 ;
21207 return 0;
21208}
21209_ACEOF
21210rm -f conftest.$ac_objext conftest$ac_exeext
21211if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 21212 (eval $ac_link) 2>conftest.er1
6a3a24fa 21213 ac_status=$?
35996d22
AS
21214 grep -v '^ *+' conftest.er1 >conftest.err
21215 rm -f conftest.er1
21216 cat conftest.err >&5
6a3a24fa
JD
21217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21218 (exit $ac_status); } &&
4494a266
JD
21219 { ac_try='test -z "$ac_c_werror_flag"
21220 || test ! -s conftest.err'
35996d22
AS
21221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21222 (eval $ac_try) 2>&5
21223 ac_status=$?
21224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21225 (exit $ac_status); }; } &&
21226 { ac_try='test -s conftest$ac_exeext'
6a3a24fa
JD
21227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21228 (eval $ac_try) 2>&5
21229 ac_status=$?
21230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21231 (exit $ac_status); }; }; then
21232 emacs_cv_langinfo_codeset=yes
21233else
21234 echo "$as_me: failed program was:" >&5
19650fd6
AS
21235sed 's/^/| /' conftest.$ac_ext >&5
21236
6a3a24fa
JD
21237emacs_cv_langinfo_codeset=no
21238fi
35996d22
AS
21239rm -f conftest.err conftest.$ac_objext \
21240 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
21241
21242fi
21243echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
21244echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6
21245if test $emacs_cv_langinfo_codeset = yes; then
21246
21247cat >>confdefs.h <<\_ACEOF
21248#define HAVE_LANGINFO_CODESET 1
21249_ACEOF
21250
21251fi
21252
c0d27fcc 21253echo "$as_me:$LINENO: checking for size_t" >&5
503d2be0
AS
21254echo $ECHO_N "checking for size_t... $ECHO_C" >&6
21255if test "${ac_cv_type_size_t+set}" = set; then
21256 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 21257else
503d2be0 21258 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21259/* confdefs.h. */
21260_ACEOF
21261cat confdefs.h >>conftest.$ac_ext
21262cat >>conftest.$ac_ext <<_ACEOF
21263/* end confdefs.h. */
503d2be0
AS
21264$ac_includes_default
21265int
21266main ()
21267{
21268if ((size_t *) 0)
21269 return 0;
21270if (sizeof (size_t))
21271 return 0;
21272 ;
21273 return 0;
21274}
21275_ACEOF
21276rm -f conftest.$ac_objext
c0d27fcc 21277if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21278 (eval $ac_compile) 2>conftest.er1
503d2be0 21279 ac_status=$?
35996d22
AS
21280 grep -v '^ *+' conftest.er1 >conftest.err
21281 rm -f conftest.er1
21282 cat conftest.err >&5
c0d27fcc 21283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21284 (exit $ac_status); } &&
4494a266
JD
21285 { ac_try='test -z "$ac_c_werror_flag"
21286 || test ! -s conftest.err'
35996d22
AS
21287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21288 (eval $ac_try) 2>&5
21289 ac_status=$?
21290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21291 (exit $ac_status); }; } &&
21292 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 21293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21294 (eval $ac_try) 2>&5
21295 ac_status=$?
c0d27fcc 21296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21297 (exit $ac_status); }; }; then
8730a8da
DL
21298 ac_cv_type_size_t=yes
21299else
503d2be0 21300 echo "$as_me: failed program was:" >&5
19650fd6
AS
21301sed 's/^/| /' conftest.$ac_ext >&5
21302
503d2be0 21303ac_cv_type_size_t=no
8730a8da 21304fi
35996d22 21305rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 21306fi
c0d27fcc 21307echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
503d2be0
AS
21308echo "${ECHO_T}$ac_cv_type_size_t" >&6
21309if test $ac_cv_type_size_t = yes; then
503d2be0 21310
c0d27fcc
MR
21311cat >>confdefs.h <<_ACEOF
21312#define HAVE_SIZE_T 1
21313_ACEOF
21314
8730a8da
DL
21315
21316fi
21317
c0d27fcc 21318
973a76b1
DL
21319echo "$as_me:$LINENO: checking for mbstate_t" >&5
21320echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
21321if test "${ac_cv_type_mbstate_t+set}" = set; then
21322 echo $ECHO_N "(cached) $ECHO_C" >&6
21323else
21324 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21325/* confdefs.h. */
21326_ACEOF
21327cat confdefs.h >>conftest.$ac_ext
21328cat >>conftest.$ac_ext <<_ACEOF
21329/* end confdefs.h. */
973a76b1
DL
21330$ac_includes_default
21331# include <wchar.h>
21332int
21333main ()
21334{
21335mbstate_t x; return sizeof x;
21336 ;
21337 return 0;
21338}
21339_ACEOF
21340rm -f conftest.$ac_objext
21341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21342 (eval $ac_compile) 2>conftest.er1
973a76b1 21343 ac_status=$?
35996d22
AS
21344 grep -v '^ *+' conftest.er1 >conftest.err
21345 rm -f conftest.er1
21346 cat conftest.err >&5
973a76b1
DL
21347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21348 (exit $ac_status); } &&
4494a266
JD
21349 { ac_try='test -z "$ac_c_werror_flag"
21350 || test ! -s conftest.err'
35996d22
AS
21351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21352 (eval $ac_try) 2>&5
21353 ac_status=$?
21354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21355 (exit $ac_status); }; } &&
21356 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
21357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21358 (eval $ac_try) 2>&5
21359 ac_status=$?
21360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21361 (exit $ac_status); }; }; then
21362 ac_cv_type_mbstate_t=yes
21363else
21364 echo "$as_me: failed program was:" >&5
19650fd6
AS
21365sed 's/^/| /' conftest.$ac_ext >&5
21366
973a76b1
DL
21367ac_cv_type_mbstate_t=no
21368fi
35996d22 21369rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1
DL
21370fi
21371echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
21372echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6
21373 if test $ac_cv_type_mbstate_t = yes; then
21374
21375cat >>confdefs.h <<\_ACEOF
21376#define HAVE_MBSTATE_T 1
21377_ACEOF
21378
21379 else
21380
21381cat >>confdefs.h <<\_ACEOF
21382#define mbstate_t int
21383_ACEOF
21384
21385 fi
21386
22044edf
DL
21387echo "$as_me:$LINENO: checking for C restrict keyword" >&5
21388echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6
21389if test "${emacs_cv_c_restrict+set}" = set; then
21390 echo $ECHO_N "(cached) $ECHO_C" >&6
21391else
21392 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21393/* confdefs.h. */
21394_ACEOF
21395cat confdefs.h >>conftest.$ac_ext
21396cat >>conftest.$ac_ext <<_ACEOF
21397/* end confdefs.h. */
22044edf
DL
21398void fred (int *restrict x);
21399int
21400main ()
21401{
b936fae4 21402
22044edf
DL
21403 ;
21404 return 0;
21405}
c0d27fcc 21406_ACEOF
22044edf
DL
21407rm -f conftest.$ac_objext
21408if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21409 (eval $ac_compile) 2>conftest.er1
22044edf 21410 ac_status=$?
35996d22
AS
21411 grep -v '^ *+' conftest.er1 >conftest.err
21412 rm -f conftest.er1
21413 cat conftest.err >&5
22044edf
DL
21414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21415 (exit $ac_status); } &&
4494a266
JD
21416 { ac_try='test -z "$ac_c_werror_flag"
21417 || test ! -s conftest.err'
35996d22
AS
21418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21419 (eval $ac_try) 2>&5
21420 ac_status=$?
21421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21422 (exit $ac_status); }; } &&
21423 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
21424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21425 (eval $ac_try) 2>&5
21426 ac_status=$?
21427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21428 (exit $ac_status); }; }; then
21429 emacs_cv_c_restrict=yes
21430else
21431 echo "$as_me: failed program was:" >&5
19650fd6
AS
21432sed 's/^/| /' conftest.$ac_ext >&5
21433
22044edf 21434cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21435/* confdefs.h. */
21436_ACEOF
21437cat confdefs.h >>conftest.$ac_ext
21438cat >>conftest.$ac_ext <<_ACEOF
21439/* end confdefs.h. */
22044edf
DL
21440void fred (int *__restrict x);
21441int
21442main ()
21443{
c0d27fcc 21444
22044edf
DL
21445 ;
21446 return 0;
21447}
c0d27fcc 21448_ACEOF
22044edf
DL
21449rm -f conftest.$ac_objext
21450if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21451 (eval $ac_compile) 2>conftest.er1
22044edf 21452 ac_status=$?
35996d22
AS
21453 grep -v '^ *+' conftest.er1 >conftest.err
21454 rm -f conftest.er1
21455 cat conftest.err >&5
22044edf
DL
21456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21457 (exit $ac_status); } &&
4494a266
JD
21458 { ac_try='test -z "$ac_c_werror_flag"
21459 || test ! -s conftest.err'
35996d22
AS
21460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21461 (eval $ac_try) 2>&5
21462 ac_status=$?
21463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21464 (exit $ac_status); }; } &&
21465 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
21466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21467 (eval $ac_try) 2>&5
21468 ac_status=$?
21469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21470 (exit $ac_status); }; }; then
21471 emacs_cv_c_restrict=__restrict
21472else
21473 echo "$as_me: failed program was:" >&5
19650fd6
AS
21474sed 's/^/| /' conftest.$ac_ext >&5
21475
22044edf 21476emacs_cv_c_restrict=no
ba4481b5 21477fi
35996d22 21478rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 21479fi
35996d22 21480rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 21481fi
22044edf
DL
21482echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
21483echo "${ECHO_T}$emacs_cv_c_restrict" >&6
21484case "$emacs_cv_c_restrict" in
21485 yes) emacs_restrict=restrict;;
21486 no) emacs_restrict="";;
21487 *) emacs_restrict="$emacs_cv_c_restrict";;
21488esac
21489if test "$emacs_restrict" != __restrict; then
b936fae4 21490
22044edf
DL
21491cat >>confdefs.h <<_ACEOF
21492#define __restrict $emacs_restrict
c0d27fcc 21493_ACEOF
ba4481b5
DL
21494
21495fi
ba4481b5 21496
22044edf
DL
21497echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
21498echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6
21499if test "${emacs_cv_c_restrict_arr+set}" = set; then
21500 echo $ECHO_N "(cached) $ECHO_C" >&6
21501else
21502 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21503/* confdefs.h. */
21504_ACEOF
21505cat confdefs.h >>conftest.$ac_ext
21506cat >>conftest.$ac_ext <<_ACEOF
21507/* end confdefs.h. */
22044edf
DL
21508void fred (int x[__restrict]);
21509int
21510main ()
21511{
b936fae4 21512
22044edf
DL
21513 ;
21514 return 0;
21515}
c0d27fcc 21516_ACEOF
22044edf
DL
21517rm -f conftest.$ac_objext
21518if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21519 (eval $ac_compile) 2>conftest.er1
22044edf 21520 ac_status=$?
35996d22
AS
21521 grep -v '^ *+' conftest.er1 >conftest.err
21522 rm -f conftest.er1
21523 cat conftest.err >&5
22044edf
DL
21524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21525 (exit $ac_status); } &&
4494a266
JD
21526 { ac_try='test -z "$ac_c_werror_flag"
21527 || test ! -s conftest.err'
35996d22
AS
21528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21529 (eval $ac_try) 2>&5
21530 ac_status=$?
21531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21532 (exit $ac_status); }; } &&
21533 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
21534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21535 (eval $ac_try) 2>&5
21536 ac_status=$?
21537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21538 (exit $ac_status); }; }; then
21539 emacs_cv_c_restrict_arr=yes
21540else
21541 echo "$as_me: failed program was:" >&5
19650fd6
AS
21542sed 's/^/| /' conftest.$ac_ext >&5
21543
22044edf 21544emacs_cv_c_restrict_arr=no
ba4481b5 21545fi
35996d22 21546rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf
DL
21547fi
21548echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
21549echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6
21550if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 21551
c0d27fcc 21552cat >>confdefs.h <<\_ACEOF
22044edf 21553#define __restrict_arr __restrict
c0d27fcc 21554_ACEOF
ba4481b5 21555
ba4481b5
DL
21556fi
21557
c0d27fcc 21558
c0d27fcc 21559
22044edf
DL
21560# Set up the CFLAGS for real compilation, so we can substitute it.
21561CFLAGS="$REAL_CFLAGS"
21562CPPFLAGS="$REAL_CPPFLAGS"
21563
21564#### Find out which version of Emacs this is.
21565version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
21566 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
21567if test x"${version}" = x; then
21568 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
21569echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
21570 { (exit 1); exit 1; }; }
21571fi
21572
21573### Specify what sort of things we'll be editing into Makefile and config.h.
21574### Use configuration here uncanonicalized to avoid exceeding size limits.
21575
21576
21577
21578
21579
21580
21581
21582
21583
21584
21585
21586
21587
21588
21589
21590
21591
21592
21593
21594
21595
21596
21597
21598
21599
21600
21601
21602
21603
21604
21605
21606
6a3a24fa 21607
22044edf
DL
21608
21609
21610cat >>confdefs.h <<_ACEOF
21611#define EMACS_CONFIGURATION "${canonical}"
21612_ACEOF
21613
21614
21615cat >>confdefs.h <<_ACEOF
21616#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
21617_ACEOF
21618
21619
21620cat >>confdefs.h <<_ACEOF
21621#define config_machfile "${machfile}"
21622_ACEOF
21623
21624
21625cat >>confdefs.h <<_ACEOF
21626#define config_opsysfile "${opsysfile}"
21627_ACEOF
21628
21629
21630cat >>confdefs.h <<_ACEOF
21631#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
21632_ACEOF
21633
21634
21635cat >>confdefs.h <<_ACEOF
21636#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
21637_ACEOF
21638
21639
21640cat >>confdefs.h <<_ACEOF
21641#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
21642_ACEOF
21643
21644
21645cat >>confdefs.h <<_ACEOF
21646#define UNEXEC_SRC ${UNEXEC_SRC}
21647_ACEOF
21648
21649
21650if test "${HAVE_X_WINDOWS}" = "yes" ; then
21651
21652cat >>confdefs.h <<\_ACEOF
21653#define HAVE_X_WINDOWS 1
21654_ACEOF
21655
21656fi
21657if test "${USE_X_TOOLKIT}" != "none" ; then
21658
21659cat >>confdefs.h <<\_ACEOF
21660#define USE_X_TOOLKIT 1
21661_ACEOF
21662
21663fi
21664if test "${HAVE_X11}" = "yes" ; then
21665
21666cat >>confdefs.h <<\_ACEOF
21667#define HAVE_X11 1
21668_ACEOF
21669
21670fi
21671if test "${HAVE_XFREE386}" = "yes" ; then
21672
21673cat >>confdefs.h <<\_ACEOF
21674#define HAVE_XFREE386 1
21675_ACEOF
21676
21677fi
21678if test "${HAVE_MENUS}" = "yes" ; then
21679
21680cat >>confdefs.h <<\_ACEOF
21681#define HAVE_MENUS 1
21682_ACEOF
21683
21684fi
21685if test "${GNU_MALLOC}" = "yes" ; then
21686
21687cat >>confdefs.h <<\_ACEOF
21688#define GNU_MALLOC 1
21689_ACEOF
21690
21691fi
21692if test "${REL_ALLOC}" = "yes" ; then
21693
21694cat >>confdefs.h <<\_ACEOF
21695#define REL_ALLOC 1
21696_ACEOF
21697
21698fi
21699
21700
21701
c0d27fcc
MR
21702
21703
ba4481b5 21704#### Report on what we decided to do.
488dd4c4
JD
21705#### Report GTK as a toolkit, even if it doesn't use Xt.
21706#### It makes printing result more understandable as using GTK sets
21707#### toolkit_scroll_bars to yes by default.
21708if test "${HAVE_GTK}" = "yes"; then
21709 USE_X_TOOLKIT=GTK
21710fi
21711
ba4481b5
DL
21712echo "
21713Configured for \`${canonical}'.
21714
21715 Where should the build process find the source code? ${srcdir}
21716 What operating system and machine description files should Emacs use?
21717 \`${opsysfile}' and \`${machfile}'
21718 What compiler should emacs be built with? ${CC} ${CFLAGS}
21719 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 21720 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 21721 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 21722 What window system should Emacs use? ${window_system}
8e967cf7 21723 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
21724
21725if test -n "${x_includes}"; then
21726echo " Where do we find X Windows header files? ${x_includes}"
21727else
21728echo " Where do we find X Windows header files? Standard dirs"
21729fi
21730if test -n "${x_libraries}"; then
21731echo " Where do we find X Windows libraries? ${x_libraries}"
21732else
21733echo " Where do we find X Windows libraries? Standard dirs"
21734fi
21735
21736echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
21737echo " Does Emacs use -lXpm? ${HAVE_XPM}"
21738echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
21739echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
21740echo " Does Emacs use -lungif? ${HAVE_GIF}"
21741echo " Does Emacs use -lpng? ${HAVE_PNG}"
21742echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
21743echo
21744
05cf15c6
JD
21745if test "$emacs_cv_randomheap" = warn; then
21746 { echo "$as_me:$LINENO: WARNING:
21747**********************************************************************
21748
21749Heap start address is randomized and no workaround is known.
21750Emacs will probably dump core when temacs is run in the build phase.
21751Maybe exec-shield is turned on. Read about exec-shield in \`etc/PROBLEMS'
21752for further information.
21753
21754**********************************************************************
21755" >&5
21756echo "$as_me: WARNING:
21757**********************************************************************
21758
21759Heap start address is randomized and no workaround is known.
21760Emacs will probably dump core when temacs is run in the build phase.
21761Maybe exec-shield is turned on. Read about exec-shield in \`etc/PROBLEMS'
21762for further information.
21763
21764**********************************************************************
21765" >&2;}
21766fi
21767
ba4481b5
DL
21768# Remove any trailing slashes in these variables.
21769test "${prefix}" != NONE &&
21770 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
21771test "${exec_prefix}" != NONE &&
21772 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
21773
d0e9bfd2
GM
21774## Check if the C preprocessor will convert `..' to `. .'. If so, set
21775## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
21776## from Makefile.c can correctly provide the arg `-traditional' to the
21777## C preprocessor.
21778
503d2be0 21779cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21780/* confdefs.h. */
21781_ACEOF
21782cat confdefs.h >>conftest.$ac_ext
21783cat >>conftest.$ac_ext <<_ACEOF
21784/* end confdefs.h. */
d0e9bfd2 21785yes..yes
503d2be0 21786_ACEOF
d0e9bfd2 21787if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 21788 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
21789 CPP_NEED_TRADITIONAL=no
21790else
d0e9bfd2
GM
21791 CPP_NEED_TRADITIONAL=yes
21792fi
21793rm -f conftest*
21794
c0d27fcc 21795
6bae0ccf
DL
21796 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"
21797 ac_config_commands="$ac_config_commands default"
503d2be0 21798cat >confcache <<\_ACEOF
ba4481b5
DL
21799# This file is a shell script that caches the results of configure
21800# tests run on this system so they can be shared between configure
503d2be0
AS
21801# scripts and configure runs, see configure's option --config-cache.
21802# It is not useful on other systems. If it contains results you don't
21803# want to keep, you may remove or edit it.
ba4481b5 21804#
503d2be0
AS
21805# config.status only pays attention to the cache file if you give it
21806# the --recheck option to rerun configure.
ba4481b5 21807#
6bae0ccf 21808# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
21809# loading this file, other *unset* `ac_cv_foo' will be assigned the
21810# following values.
21811
21812_ACEOF
21813
ba4481b5
DL
21814# The following way of writing the cache mishandles newlines in values,
21815# but we know of no workaround that is simple, portable, and efficient.
21816# So, don't put newlines in cache variables' values.
21817# Ultrix sh set writes to stderr and can't be redirected directly,
21818# and sets the high bit in the cache file unless we assign to the vars.
503d2be0
AS
21819{
21820 (set) 2>&1 |
21821 case `(ac_space=' '; set | grep ac_space) 2>&1` in
21822 *ac_space=\ *)
21823 # `set' does not quote correctly, so add quotes (double-quote
21824 # substitution turns \\\\ into \\, and sed turns \\ into \).
21825 sed -n \
35996d22
AS
21826 "s/'/'\\\\''/g;
21827 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
503d2be0
AS
21828 ;;
21829 *)
21830 # `set' quotes correctly as required by POSIX, so do not add quotes.
21831 sed -n \
35996d22 21832 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
503d2be0
AS
21833 ;;
21834 esac;
21835} |
21836 sed '
21837 t clear
21838 : clear
21839 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21840 t end
21841 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21842 : end' >>confcache
19650fd6 21843if diff $cache_file confcache >/dev/null 2>&1; then :; else
ba4481b5 21844 if test -w $cache_file; then
503d2be0
AS
21845 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21846 cat confcache >$cache_file
ba4481b5
DL
21847 else
21848 echo "not updating unwritable cache $cache_file"
21849 fi
21850fi
21851rm -f confcache
21852
ba4481b5
DL
21853test "x$prefix" = xNONE && prefix=$ac_default_prefix
21854# Let make expand exec_prefix.
21855test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21856
503d2be0
AS
21857# VPATH may cause trouble with some makes, so we remove $(srcdir),
21858# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21859# trailing colons and then remove the whole line if VPATH becomes empty
21860# (actually we leave an empty line to preserve line numbers).
ba4481b5 21861if test "x$srcdir" = x.; then
35996d22 21862 ac_vpsub='/^[ ]*VPATH[ ]*=/{
503d2be0
AS
21863s/:*\$(srcdir):*/:/;
21864s/:*\${srcdir}:*/:/;
21865s/:*@srcdir@:*/:/;
35996d22 21866s/^\([^=]*=[ ]*\):*/\1/;
503d2be0 21867s/:*$//;
35996d22 21868s/^[^=]*=[ ]*$//;
503d2be0 21869}'
ba4481b5
DL
21870fi
21871
ba4481b5
DL
21872DEFS=-DHAVE_CONFIG_H
21873
6bae0ccf
DL
21874ac_libobjs=
21875ac_ltlibobjs=
21876for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21877 # 1. Remove the extension, and $U if already installed.
21878 ac_i=`echo "$ac_i" |
35996d22 21879 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
6bae0ccf
DL
21880 # 2. Add them.
21881 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
21882 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
21883done
21884LIBOBJS=$ac_libobjs
21885
21886LTLIBOBJS=$ac_ltlibobjs
21887
21888
c0d27fcc 21889
ba4481b5 21890: ${CONFIG_STATUS=./config.status}
503d2be0
AS
21891ac_clean_files_save=$ac_clean_files
21892ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 21893{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
21894echo "$as_me: creating $CONFIG_STATUS" >&6;}
21895cat >$CONFIG_STATUS <<_ACEOF
21896#! $SHELL
c0d27fcc 21897# Generated by $as_me.
ba4481b5 21898# Run this file to recreate the current configuration.
ba4481b5 21899# Compiler output produced by configure, useful for debugging
503d2be0 21900# configure, is in config.log if it exists.
ba4481b5 21901
503d2be0 21902debug=false
19650fd6
AS
21903ac_cs_recheck=false
21904ac_cs_silent=false
503d2be0 21905SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
21906_ACEOF
21907
21908cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
21909## --------------------- ##
21910## M4sh Initialization. ##
21911## --------------------- ##
21912
503d2be0
AS
21913# Be Bourne compatible
21914if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21915 emulate sh
21916 NULLCMD=:
6bae0ccf
DL
21917 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21918 # is contrary to our usage. Disable this feature.
21919 alias -g '${1+"$@"}'='"$@"'
503d2be0
AS
21920elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21921 set -o posix
21922fi
35996d22 21923DUALCASE=1; export DUALCASE # for MKS sh
503d2be0 21924
c0d27fcc 21925# Support unset when possible.
35996d22 21926if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
21927 as_unset=unset
21928else
21929 as_unset=false
21930fi
21931
6bae0ccf
DL
21932
21933# Work around bugs in pre-3.0 UWIN ksh.
21934$as_unset ENV MAIL MAILPATH
21935PS1='$ '
21936PS2='> '
21937PS4='+ '
21938
21939# NLS nuisances.
19650fd6
AS
21940for as_var in \
21941 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
21942 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
21943 LC_TELEPHONE LC_TIME
6bae0ccf 21944do
35996d22 21945 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
21946 eval $as_var=C; export $as_var
21947 else
21948 $as_unset $as_var
21949 fi
21950done
21951
21952# Required to use basename.
21953if expr a : '\(a\)' >/dev/null 2>&1; then
21954 as_expr=expr
21955else
21956 as_expr=false
21957fi
21958
21959if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
21960 as_basename=basename
21961else
21962 as_basename=false
21963fi
c0d27fcc
MR
21964
21965
503d2be0 21966# Name of the executable.
6bae0ccf 21967as_me=`$as_basename "$0" ||
c0d27fcc
MR
21968$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21969 X"$0" : 'X\(//\)$' \| \
21970 X"$0" : 'X\(/\)$' \| \
21971 . : '\(.\)' 2>/dev/null ||
21972echo X/"$0" |
21973 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
21974 /^X\/\(\/\/\)$/{ s//\1/; q; }
21975 /^X\/\(\/\).*/{ s//\1/; q; }
21976 s/.*/./; q'`
21977
6bae0ccf 21978
c0d27fcc
MR
21979# PATH needs CR, and LINENO needs CR and PATH.
21980# Avoid depending upon Character Ranges.
21981as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21982as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21983as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21984as_cr_digits='0123456789'
21985as_cr_alnum=$as_cr_Letters$as_cr_digits
21986
21987# The user is always right.
21988if test "${PATH_SEPARATOR+set}" != set; then
19650fd6
AS
21989 echo "#! /bin/sh" >conf$$.sh
21990 echo "exit 0" >>conf$$.sh
21991 chmod +x conf$$.sh
21992 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
c0d27fcc
MR
21993 PATH_SEPARATOR=';'
21994 else
21995 PATH_SEPARATOR=:
21996 fi
19650fd6 21997 rm -f conf$$.sh
c0d27fcc
MR
21998fi
21999
22000
22001 as_lineno_1=$LINENO
22002 as_lineno_2=$LINENO
22003 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22004 test "x$as_lineno_1" != "x$as_lineno_2" &&
22005 test "x$as_lineno_3" = "x$as_lineno_2" || {
22006 # Find who we are. Look in the path if we contain no path at all
22007 # relative or not.
22008 case $0 in
22009 *[\\/]* ) as_myself=$0 ;;
22010 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22011for as_dir in $PATH
22012do
22013 IFS=$as_save_IFS
22014 test -z "$as_dir" && as_dir=.
22015 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22016done
22017
22018 ;;
22019 esac
22020 # We did not find ourselves, most probably we were run as `sh COMMAND'
22021 # in which case we are not to be found in the path.
22022 if test "x$as_myself" = x; then
22023 as_myself=$0
22024 fi
22025 if test ! -f "$as_myself"; then
22026 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
22027echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
22028 { (exit 1); exit 1; }; }
22029 fi
22030 case $CONFIG_SHELL in
22031 '')
22032 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22033for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
22034do
22035 IFS=$as_save_IFS
22036 test -z "$as_dir" && as_dir=.
22037 for as_base in sh bash ksh sh5; do
22038 case $as_dir in
22039 /*)
22040 if ("$as_dir/$as_base" -c '
22041 as_lineno_1=$LINENO
22042 as_lineno_2=$LINENO
22043 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22044 test "x$as_lineno_1" != "x$as_lineno_2" &&
22045 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
6bae0ccf
DL
22046 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
22047 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
c0d27fcc
MR
22048 CONFIG_SHELL=$as_dir/$as_base
22049 export CONFIG_SHELL
22050 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
22051 fi;;
22052 esac
22053 done
22054done
22055;;
22056 esac
22057
22058 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
22059 # uniformly replaced by the line number. The first 'sed' inserts a
22060 # line-number line before each line; the second 'sed' does the real
22061 # work. The second script uses 'N' to pair each line-number line
22062 # with the numbered line, and appends trailing '-' during
22063 # substitution so that $LINENO is not a special case at line end.
22064 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
22065 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
22066 sed '=' <$as_myself |
22067 sed '
22068 N
22069 s,$,-,
22070 : loop
22071 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
22072 t loop
22073 s,-$,,
22074 s,^['$as_cr_digits']*\n,,
22075 ' >$as_me.lineno &&
22076 chmod +x $as_me.lineno ||
22077 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
22078echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
22079 { (exit 1); exit 1; }; }
22080
22081 # Don't try to exec as it changes $[0], causing all sort of problems
22082 # (the dirname of $[0] is not the place where we might find the
22083 # original and so on. Autoconf is especially sensible to this).
22084 . ./$as_me.lineno
22085 # Exit status is that of the last command.
22086 exit
22087}
22088
22089
22090case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
22091 *c*,-n*) ECHO_N= ECHO_C='
22092' ECHO_T=' ' ;;
22093 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
22094 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
22095esac
503d2be0
AS
22096
22097if expr a : '\(a\)' >/dev/null 2>&1; then
22098 as_expr=expr
22099else
22100 as_expr=false
22101fi
22102
22103rm -f conf$$ conf$$.exe conf$$.file
22104echo >conf$$.file
22105if ln -s conf$$.file conf$$ 2>/dev/null; then
22106 # We could just check for DJGPP; but this test a) works b) is more generic
22107 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22108 if test -f conf$$.exe; then
22109 # Don't use ln at all; we don't have any links
22110 as_ln_s='cp -p'
22111 else
22112 as_ln_s='ln -s'
22113 fi
22114elif ln conf$$.file conf$$ 2>/dev/null; then
22115 as_ln_s=ln
22116else
22117 as_ln_s='cp -p'
22118fi
22119rm -f conf$$ conf$$.exe conf$$.file
22120
6bae0ccf
DL
22121if mkdir -p . 2>/dev/null; then
22122 as_mkdir_p=:
22123else
35996d22 22124 test -d ./-p && rmdir ./-p
6bae0ccf
DL
22125 as_mkdir_p=false
22126fi
22127
503d2be0
AS
22128as_executable_p="test -f"
22129
c0d27fcc 22130# Sed expression to map a string onto a valid CPP name.
35996d22 22131as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
22132
22133# Sed expression to map a string onto a valid variable name.
35996d22 22134as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 22135
503d2be0
AS
22136
22137# IFS
22138# We need space, tab and new line, in precisely that order.
22139as_nl='
22140'
22141IFS=" $as_nl"
22142
22143# CDPATH.
6bae0ccf 22144$as_unset CDPATH
503d2be0
AS
22145
22146exec 6>&1
22147
c0d27fcc
MR
22148# Open the log real soon, to keep \$[0] and so on meaningful, and to
22149# report actual input values of CONFIG_FILES etc. instead of their
22150# values after options handling. Logging --version etc. is OK.
22151exec 5>>config.log
22152{
22153 echo
22154 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22155## Running $as_me. ##
22156_ASBOX
22157} >&5
22158cat >&5 <<_CSEOF
22159
22160This file was extended by $as_me, which was
35996d22 22161generated by GNU Autoconf 2.59. Invocation command line was
c0d27fcc
MR
22162
22163 CONFIG_FILES = $CONFIG_FILES
22164 CONFIG_HEADERS = $CONFIG_HEADERS
22165 CONFIG_LINKS = $CONFIG_LINKS
22166 CONFIG_COMMANDS = $CONFIG_COMMANDS
22167 $ $0 $@
22168
22169_CSEOF
22170echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
22171echo >&5
503d2be0
AS
22172_ACEOF
22173
22174# Files that config.status was made for.
22175if test -n "$ac_config_files"; then
22176 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22177fi
22178
22179if test -n "$ac_config_headers"; then
22180 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22181fi
22182
22183if test -n "$ac_config_links"; then
22184 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22185fi
22186
22187if test -n "$ac_config_commands"; then
22188 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22189fi
22190
c0d27fcc 22191cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22192
22193ac_cs_usage="\
22194\`$as_me' instantiates files from templates according to the
22195current configuration.
22196
22197Usage: $0 [OPTIONS] [FILE]...
22198
22199 -h, --help print this help, then exit
22200 -V, --version print version number, then exit
19650fd6 22201 -q, --quiet do not print progress messages
503d2be0
AS
22202 -d, --debug don't remove temporary files
22203 --recheck update $as_me by reconfiguring in the same conditions
22204 --file=FILE[:TEMPLATE]
35996d22 22205 instantiate the configuration file FILE
503d2be0 22206 --header=FILE[:TEMPLATE]
35996d22 22207 instantiate the configuration header FILE
503d2be0
AS
22208
22209Configuration files:
22210$config_files
22211
22212Configuration headers:
22213$config_headers
22214
22215Configuration commands:
22216$config_commands
22217
22218Report bugs to <bug-autoconf@gnu.org>."
c0d27fcc 22219_ACEOF
503d2be0 22220
c0d27fcc 22221cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22222ac_cs_version="\\
22223config.status
35996d22 22224configured by $0, generated by GNU Autoconf 2.59,
503d2be0
AS
22225 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22226
35996d22 22227Copyright (C) 2003 Free Software Foundation, Inc.
503d2be0
AS
22228This config.status script is free software; the Free Software Foundation
22229gives unlimited permission to copy, distribute and modify it."
22230srcdir=$srcdir
22231INSTALL="$INSTALL"
c0d27fcc 22232_ACEOF
503d2be0 22233
c0d27fcc 22234cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22235# If no file are specified by the user, then we need to provide default
22236# value. By we need to know if files were specified by the user.
22237ac_need_defaults=:
22238while test $# != 0
ba4481b5 22239do
503d2be0
AS
22240 case $1 in
22241 --*=*)
22242 ac_option=`expr "x$1" : 'x\([^=]*\)='`
22243 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
6bae0ccf
DL
22244 ac_shift=:
22245 ;;
22246 -*)
22247 ac_option=$1
22248 ac_optarg=$2
22249 ac_shift=shift
503d2be0 22250 ;;
503d2be0
AS
22251 *) # This is not an option, so the user has probably given explicit
22252 # arguments.
6bae0ccf 22253 ac_option=$1
503d2be0
AS
22254 ac_need_defaults=false;;
22255 esac
22256
6bae0ccf 22257 case $ac_option in
503d2be0 22258 # Handling of the options.
c0d27fcc 22259_ACEOF
f57bd967 22260cat >>$CONFIG_STATUS <<\_ACEOF
19650fd6
AS
22261 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22262 ac_cs_recheck=: ;;
503d2be0
AS
22263 --version | --vers* | -V )
22264 echo "$ac_cs_version"; exit 0 ;;
22265 --he | --h)
22266 # Conflict between --help and --header
c0d27fcc 22267 { { echo "$as_me:$LINENO: error: ambiguous option: $1
503d2be0
AS
22268Try \`$0 --help' for more information." >&5
22269echo "$as_me: error: ambiguous option: $1
22270Try \`$0 --help' for more information." >&2;}
22271 { (exit 1); exit 1; }; };;
22272 --help | --hel | -h )
22273 echo "$ac_cs_usage"; exit 0 ;;
22274 --debug | --d* | -d )
22275 debug=: ;;
22276 --file | --fil | --fi | --f )
6bae0ccf
DL
22277 $ac_shift
22278 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
22279 ac_need_defaults=false;;
22280 --header | --heade | --head | --hea )
6bae0ccf
DL
22281 $ac_shift
22282 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 22283 ac_need_defaults=false;;
19650fd6
AS
22284 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
22285 | -silent | --silent | --silen | --sile | --sil | --si | --s)
22286 ac_cs_silent=: ;;
503d2be0
AS
22287
22288 # This is an error.
c0d27fcc 22289 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
503d2be0
AS
22290Try \`$0 --help' for more information." >&5
22291echo "$as_me: error: unrecognized option: $1
22292Try \`$0 --help' for more information." >&2;}
22293 { (exit 1); exit 1; }; } ;;
22294
22295 *) ac_config_targets="$ac_config_targets $1" ;;
22296
ba4481b5 22297 esac
503d2be0 22298 shift
ba4481b5
DL
22299done
22300
19650fd6
AS
22301ac_configure_extra_args=
22302
22303if $ac_cs_silent; then
22304 exec 6>/dev/null
22305 ac_configure_extra_args="$ac_configure_extra_args --silent"
22306fi
22307
22308_ACEOF
22309cat >>$CONFIG_STATUS <<_ACEOF
22310if \$ac_cs_recheck; then
22311 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
22312 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
22313fi
22314
503d2be0 22315_ACEOF
ba4481b5 22316
c0d27fcc 22317cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22318#
22319# INIT-COMMANDS section.
22320#
ba4481b5 22321
503d2be0
AS
22322GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
22323
c0d27fcc
MR
22324_ACEOF
22325
503d2be0 22326
c0d27fcc
MR
22327
22328cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22329for ac_config_target in $ac_config_targets
22330do
22331 case "$ac_config_target" in
22332 # Handling of arguments.
22333 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22334 "lib-src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
22335 "oldXMenu/Makefile" ) CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
22336 "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
22337 "lwlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
22338 "src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
22339 "lisp/Makefile" ) CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
23b24859 22340 "lispref/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispref/Makefile" ;;
981626b7 22341 "lispintro/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispintro/Makefile" ;;
503d2be0
AS
22342 "leim/Makefile" ) CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
22343 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22344 "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
c0d27fcc 22345 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
22346echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22347 { (exit 1); exit 1; }; };;
22348 esac
ba4481b5 22349done
503d2be0
AS
22350
22351# If the user did not use the arguments to specify the items to instantiate,
22352# then the envvar interface is used. Set only those that are not.
22353# We use the long form for the default assignment because of an extremely
22354# bizarre bug on SunOS 4.1.3.
22355if $ac_need_defaults; then
22356 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22357 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22358 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 22359fi
503d2be0 22360
19650fd6
AS
22361# Have a temporary directory for convenience. Make it in the build tree
22362# simply because there is no reason to put it here, and in addition,
22363# creating and moving files from /tmp can sometimes cause problems.
503d2be0
AS
22364# Create a temporary directory, and hook for its removal unless debugging.
22365$debug ||
22366{
22367 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22368 trap '{ (exit 1); exit 1; }' 1 2 13 15
22369}
22370
22371# Create a (secure) tmp directory for tmp files.
19650fd6 22372
503d2be0 22373{
19650fd6 22374 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
503d2be0
AS
22375 test -n "$tmp" && test -d "$tmp"
22376} ||
22377{
19650fd6 22378 tmp=./confstat$$-$RANDOM
503d2be0
AS
22379 (umask 077 && mkdir $tmp)
22380} ||
22381{
19650fd6 22382 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
22383 { (exit 1); exit 1; }
22384}
22385
c0d27fcc 22386_ACEOF
503d2be0 22387
c0d27fcc 22388cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22389
22390#
22391# CONFIG_FILES section.
22392#
22393
22394# No need to generate the scripts if there are no CONFIG_FILES.
22395# This happens for instance when ./config.status config.h
22396if test -n "\$CONFIG_FILES"; then
22397 # Protect against being on the right side of a sed subst in config.status.
22398 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22399 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22400s,@SHELL@,$SHELL,;t t
c0d27fcc
MR
22401s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22402s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22403s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22404s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22405s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22406s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
503d2be0
AS
22407s,@exec_prefix@,$exec_prefix,;t t
22408s,@prefix@,$prefix,;t t
22409s,@program_transform_name@,$program_transform_name,;t t
22410s,@bindir@,$bindir,;t t
22411s,@sbindir@,$sbindir,;t t
22412s,@libexecdir@,$libexecdir,;t t
22413s,@datadir@,$datadir,;t t
22414s,@sysconfdir@,$sysconfdir,;t t
22415s,@sharedstatedir@,$sharedstatedir,;t t
22416s,@localstatedir@,$localstatedir,;t t
22417s,@libdir@,$libdir,;t t
22418s,@includedir@,$includedir,;t t
22419s,@oldincludedir@,$oldincludedir,;t t
22420s,@infodir@,$infodir,;t t
22421s,@mandir@,$mandir,;t t
503d2be0
AS
22422s,@build_alias@,$build_alias,;t t
22423s,@host_alias@,$host_alias,;t t
22424s,@target_alias@,$target_alias,;t t
c0d27fcc 22425s,@DEFS@,$DEFS,;t t
503d2be0
AS
22426s,@ECHO_C@,$ECHO_C,;t t
22427s,@ECHO_N@,$ECHO_N,;t t
22428s,@ECHO_T@,$ECHO_T,;t t
503d2be0 22429s,@LIBS@,$LIBS,;t t
19650fd6 22430s,@MAINT@,$MAINT,;t t
503d2be0
AS
22431s,@build@,$build,;t t
22432s,@build_cpu@,$build_cpu,;t t
22433s,@build_vendor@,$build_vendor,;t t
22434s,@build_os@,$build_os,;t t
22435s,@host@,$host,;t t
22436s,@host_cpu@,$host_cpu,;t t
22437s,@host_vendor@,$host_vendor,;t t
22438s,@host_os@,$host_os,;t t
22439s,@CC@,$CC,;t t
22440s,@CFLAGS@,$CFLAGS,;t t
22441s,@LDFLAGS@,$LDFLAGS,;t t
22442s,@CPPFLAGS@,$CPPFLAGS,;t t
22443s,@ac_ct_CC@,$ac_ct_CC,;t t
22444s,@EXEEXT@,$EXEEXT,;t t
22445s,@OBJEXT@,$OBJEXT,;t t
22446s,@LN_S@,$LN_S,;t t
22447s,@CPP@,$CPP,;t t
22448s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22449s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22450s,@INSTALL_DATA@,$INSTALL_DATA,;t t
503d2be0
AS
22451s,@RANLIB@,$RANLIB,;t t
22452s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
9e71690e 22453s,@INSTALL_INFO@,$INSTALL_INFO,;t t
6bae0ccf 22454s,@EGREP@,$EGREP,;t t
503d2be0
AS
22455s,@LIBSOUND@,$LIBSOUND,;t t
22456s,@SET_MAKE@,$SET_MAKE,;t t
488dd4c4
JD
22457s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22458s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t
22459s,@GTK_LIBS@,$GTK_LIBS,;t t
503d2be0
AS
22460s,@ALLOCA@,$ALLOCA,;t t
22461s,@liblockfile@,$liblockfile,;t t
22462s,@LIBOBJS@,$LIBOBJS,;t t
22463s,@NEED_SETGID@,$NEED_SETGID,;t t
22464s,@KMEM_GROUP@,$KMEM_GROUP,;t t
22465s,@GETLOADAVG_LIBS@,$GETLOADAVG_LIBS,;t t
22466s,@version@,$version,;t t
22467s,@configuration@,$configuration,;t t
22468s,@canonical@,$canonical,;t t
22469s,@srcdir@,$srcdir,;t t
22470s,@lispdir@,$lispdir,;t t
22471s,@locallisppath@,$locallisppath,;t t
22472s,@lisppath@,$lisppath,;t t
22473s,@x_default_search_path@,$x_default_search_path,;t t
22474s,@etcdir@,$etcdir,;t t
22475s,@archlibdir@,$archlibdir,;t t
22476s,@docdir@,$docdir,;t t
22477s,@bitmapdir@,$bitmapdir,;t t
98418dba
CW
22478s,@gamedir@,$gamedir,;t t
22479s,@gameuser@,$gameuser,;t t
503d2be0
AS
22480s,@c_switch_system@,$c_switch_system,;t t
22481s,@c_switch_machine@,$c_switch_machine,;t t
22482s,@LD_SWITCH_X_SITE@,$LD_SWITCH_X_SITE,;t t
22483s,@LD_SWITCH_X_SITE_AUX@,$LD_SWITCH_X_SITE_AUX,;t t
22484s,@C_SWITCH_X_SITE@,$C_SWITCH_X_SITE,;t t
22485s,@X_TOOLKIT_TYPE@,$X_TOOLKIT_TYPE,;t t
22486s,@machfile@,$machfile,;t t
22487s,@opsysfile@,$opsysfile,;t t
6a3a24fa 22488s,@carbon_appdir@,$carbon_appdir,;t t
6bae0ccf 22489s,@LTLIBOBJS@,$LTLIBOBJS,;t t
503d2be0
AS
22490CEOF
22491
c0d27fcc 22492_ACEOF
ba4481b5 22493
c0d27fcc 22494 cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22495 # Split the substitutions into bite-sized pieces for seds with
22496 # small command number limits, like on Digital OSF/1 and HP-UX.
22497 ac_max_sed_lines=48
22498 ac_sed_frag=1 # Number of current file.
22499 ac_beg=1 # First line for current file.
22500 ac_end=$ac_max_sed_lines # Line after last line for current file.
22501 ac_more_lines=:
22502 ac_sed_cmds=
22503 while $ac_more_lines; do
22504 if test $ac_beg -gt 1; then
22505 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22506 else
22507 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22508 fi
22509 if test ! -s $tmp/subs.frag; then
22510 ac_more_lines=false
22511 else
22512 # The purpose of the label and of the branching condition is to
22513 # speed up the sed processing (if there are no `@' at all, there
22514 # is no need to browse any of the substitutions).
22515 # These are the two extra sed commands mentioned above.
22516 (echo ':t
22517 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22518 if test -z "$ac_sed_cmds"; then
35996d22 22519 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
503d2be0 22520 else
35996d22 22521 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
503d2be0
AS
22522 fi
22523 ac_sed_frag=`expr $ac_sed_frag + 1`
22524 ac_beg=$ac_end
22525 ac_end=`expr $ac_end + $ac_max_sed_lines`
22526 fi
22527 done
22528 if test -z "$ac_sed_cmds"; then
22529 ac_sed_cmds=cat
22530 fi
22531fi # test -n "$CONFIG_FILES"
ba4481b5 22532
c0d27fcc
MR
22533_ACEOF
22534cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 22535for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
ba4481b5 22536 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
22537 case $ac_file in
22538 - | *:- | *:-:* ) # input from stdin
35996d22
AS
22539 cat >$tmp/stdin
22540 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22541 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22542 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
35996d22 22543 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22544 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
22545 esac
22546
503d2be0 22547 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
c0d27fcc
MR
22548 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22549$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
22550 X"$ac_file" : 'X\(//\)[^/]' \| \
22551 X"$ac_file" : 'X\(//\)$' \| \
22552 X"$ac_file" : 'X\(/\)' \| \
22553 . : '\(.\)' 2>/dev/null ||
503d2be0
AS
22554echo X"$ac_file" |
22555 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22556 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22557 /^X\(\/\/\)$/{ s//\1/; q; }
22558 /^X\(\/\).*/{ s//\1/; q; }
22559 s/.*/./; q'`
6bae0ccf
DL
22560 { if $as_mkdir_p; then
22561 mkdir -p "$ac_dir"
22562 else
22563 as_dir="$ac_dir"
22564 as_dirs=
22565 while test ! -d "$as_dir"; do
22566 as_dirs="$as_dir $as_dirs"
22567 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22568$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
22569 X"$as_dir" : 'X\(//\)[^/]' \| \
22570 X"$as_dir" : 'X\(//\)$' \| \
22571 X"$as_dir" : 'X\(/\)' \| \
22572 . : '\(.\)' 2>/dev/null ||
6bae0ccf
DL
22573echo X"$as_dir" |
22574 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22575 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22576 /^X\(\/\/\)$/{ s//\1/; q; }
22577 /^X\(\/\).*/{ s//\1/; q; }
22578 s/.*/./; q'`
22579 done
22580 test ! -n "$as_dirs" || mkdir $as_dirs
22581 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22582echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22583 { (exit 1); exit 1; }; }; }
503d2be0 22584
c0d27fcc 22585 ac_builddir=.
98418dba 22586
c0d27fcc
MR
22587if test "$ac_dir" != .; then
22588 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
22589 # A "../" for each directory in $ac_dir_suffix.
22590 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22591else
22592 ac_dir_suffix= ac_top_builddir=
22593fi
22594
22595case $srcdir in
22596 .) # No --srcdir option. We are building in place.
22597 ac_srcdir=.
22598 if test -z "$ac_top_builddir"; then
22599 ac_top_srcdir=.
22600 else
22601 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22602 fi ;;
22603 [\\/]* | ?:[\\/]* ) # Absolute path.
22604 ac_srcdir=$srcdir$ac_dir_suffix;
22605 ac_top_srcdir=$srcdir ;;
ba4481b5 22606 *) # Relative path.
c0d27fcc
MR
22607 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22608 ac_top_srcdir=$ac_top_builddir$srcdir ;;
22609esac
35996d22
AS
22610
22611# Do not use `cd foo && pwd` to compute absolute paths, because
22612# the directories may not exist.
22613case `pwd` in
22614.) ac_abs_builddir="$ac_dir";;
22615*)
22616 case "$ac_dir" in
22617 .) ac_abs_builddir=`pwd`;;
22618 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22619 *) ac_abs_builddir=`pwd`/"$ac_dir";;
22620 esac;;
22621esac
22622case $ac_abs_builddir in
22623.) ac_abs_top_builddir=${ac_top_builddir}.;;
22624*)
22625 case ${ac_top_builddir}. in
22626 .) ac_abs_top_builddir=$ac_abs_builddir;;
22627 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22628 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22629 esac;;
22630esac
22631case $ac_abs_builddir in
22632.) ac_abs_srcdir=$ac_srcdir;;
22633*)
22634 case $ac_srcdir in
22635 .) ac_abs_srcdir=$ac_abs_builddir;;
22636 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22637 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22638 esac;;
22639esac
22640case $ac_abs_builddir in
22641.) ac_abs_top_srcdir=$ac_top_srcdir;;
22642*)
22643 case $ac_top_srcdir in
22644 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22645 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22646 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22647 esac;;
22648esac
c0d27fcc 22649
ba4481b5 22650
503d2be0
AS
22651 case $INSTALL in
22652 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
c0d27fcc 22653 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
ba4481b5
DL
22654 esac
22655
4494a266
JD
22656 if test x"$ac_file" != x-; then
22657 { echo "$as_me:$LINENO: creating $ac_file" >&5
22658echo "$as_me: creating $ac_file" >&6;}
22659 rm -f "$ac_file"
22660 fi
503d2be0
AS
22661 # Let's still pretend it is `configure' which instantiates (i.e., don't
22662 # use $as_me), people would be surprised to read:
c0d27fcc
MR
22663 # /* config.h. Generated by config.status. */
22664 if test x"$ac_file" = x-; then
22665 configure_input=
22666 else
22667 configure_input="$ac_file. "
22668 fi
22669 configure_input=$configure_input"Generated from `echo $ac_file_in |
35996d22 22670 sed 's,.*/,,'` by configure."
503d2be0
AS
22671
22672 # First look for the input files in the build tree, otherwise in the
22673 # src tree.
22674 ac_file_inputs=`IFS=:
22675 for f in $ac_file_in; do
22676 case $f in
22677 -) echo $tmp/stdin ;;
22678 [\\/$]*)
35996d22
AS
22679 # Absolute (can't be DOS-style, as IFS=:)
22680 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
22681echo "$as_me: error: cannot find input file: $f" >&2;}
22682 { (exit 1); exit 1; }; }
35996d22 22683 echo "$f";;
503d2be0 22684 *) # Relative
35996d22
AS
22685 if test -f "$f"; then
22686 # Build tree
22687 echo "$f"
22688 elif test -f "$srcdir/$f"; then
22689 # Source tree
22690 echo "$srcdir/$f"
22691 else
22692 # /dev/null tree
22693 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
22694echo "$as_me: error: cannot find input file: $f" >&2;}
22695 { (exit 1); exit 1; }; }
35996d22 22696 fi;;
503d2be0
AS
22697 esac
22698 done` || { (exit 1); exit 1; }
c0d27fcc
MR
22699_ACEOF
22700cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22701 sed "$ac_vpsub
22702$extrasub
c0d27fcc
MR
22703_ACEOF
22704cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22705:t
22706/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22707s,@configure_input@,$configure_input,;t t
22708s,@srcdir@,$ac_srcdir,;t t
c0d27fcc 22709s,@abs_srcdir@,$ac_abs_srcdir,;t t
503d2be0 22710s,@top_srcdir@,$ac_top_srcdir,;t t
c0d27fcc
MR
22711s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
22712s,@builddir@,$ac_builddir,;t t
22713s,@abs_builddir@,$ac_abs_builddir,;t t
22714s,@top_builddir@,$ac_top_builddir,;t t
22715s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
503d2be0
AS
22716s,@INSTALL@,$ac_INSTALL,;t t
22717" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22718 rm -f $tmp/stdin
22719 if test x"$ac_file" != x-; then
22720 mv $tmp/out $ac_file
22721 else
22722 cat $tmp/out
22723 rm -f $tmp/out
22724 fi
22725
22726done
c0d27fcc
MR
22727_ACEOF
22728cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 22729
503d2be0
AS
22730#
22731# CONFIG_HEADER section.
22732#
ba4481b5
DL
22733
22734# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22735# NAME is the cpp macro being defined and VALUE is the value it is being given.
22736#
22737# ac_d sets the value in "#define NAME VALUE" lines.
35996d22
AS
22738ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
22739ac_dB='[ ].*$,\1#\2'
503d2be0
AS
22740ac_dC=' '
22741ac_dD=',;t'
22742# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
35996d22 22743ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
503d2be0 22744ac_uB='$,\1#\2define\3'
ba4481b5 22745ac_uC=' '
503d2be0 22746ac_uD=',;t'
ba4481b5 22747
503d2be0 22748for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
ba4481b5 22749 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
22750 case $ac_file in
22751 - | *:- | *:-:* ) # input from stdin
35996d22
AS
22752 cat >$tmp/stdin
22753 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22754 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22755 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
35996d22 22756 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22757 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
22758 esac
22759
c0d27fcc 22760 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
503d2be0
AS
22761echo "$as_me: creating $ac_file" >&6;}
22762
22763 # First look for the input files in the build tree, otherwise in the
22764 # src tree.
22765 ac_file_inputs=`IFS=:
22766 for f in $ac_file_in; do
22767 case $f in
22768 -) echo $tmp/stdin ;;
22769 [\\/$]*)
35996d22
AS
22770 # Absolute (can't be DOS-style, as IFS=:)
22771 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
22772echo "$as_me: error: cannot find input file: $f" >&2;}
22773 { (exit 1); exit 1; }; }
35996d22
AS
22774 # Do quote $f, to prevent DOS paths from being IFS'd.
22775 echo "$f";;
503d2be0 22776 *) # Relative
35996d22
AS
22777 if test -f "$f"; then
22778 # Build tree
22779 echo "$f"
22780 elif test -f "$srcdir/$f"; then
22781 # Source tree
22782 echo "$srcdir/$f"
22783 else
22784 # /dev/null tree
22785 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
22786echo "$as_me: error: cannot find input file: $f" >&2;}
22787 { (exit 1); exit 1; }; }
35996d22 22788 fi;;
503d2be0
AS
22789 esac
22790 done` || { (exit 1); exit 1; }
22791 # Remove the trailing spaces.
35996d22 22792 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
503d2be0 22793
c0d27fcc 22794_ACEOF
503d2be0
AS
22795
22796# Transform confdefs.h into two sed scripts, `conftest.defines' and
22797# `conftest.undefs', that substitutes the proper values into
22798# config.h.in to produce config.h. The first handles `#define'
22799# templates, and the second `#undef' templates.
22800# And first: Protect against being on the right side of a sed subst in
22801# config.status. Protect against being in an unquoted here document
22802# in config.status.
22803rm -f conftest.defines conftest.undefs
22804# Using a here document instead of a string reduces the quoting nightmare.
22805# Putting comments in sed scripts is not portable.
22806#
22807# `end' is used to avoid that the second main sed command (meant for
22808# 0-ary CPP macros) applies to n-ary macro definitions.
22809# See the Autoconf documentation for `clear'.
c0d27fcc 22810cat >confdef2sed.sed <<\_ACEOF
503d2be0
AS
22811s/[\\&,]/\\&/g
22812s,[\\$`],\\&,g
22813t clear
22814: clear
35996d22 22815s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
503d2be0 22816t end
35996d22 22817s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
503d2be0 22818: end
c0d27fcc 22819_ACEOF
503d2be0
AS
22820# If some macros were called several times there might be several times
22821# the same #defines, which is useless. Nevertheless, we may not want to
22822# sort them, since we want the *last* AC-DEFINE to be honored.
22823uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
22824sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
22825rm -f confdef2sed.sed
ba4481b5
DL
22826
22827# This sed command replaces #undef with comments. This is necessary, for
22828# example, in the case of _POSIX_SOURCE, which is predefined and required
22829# on some systems where configure will not decide to define it.
c0d27fcc 22830cat >>conftest.undefs <<\_ACEOF
35996d22 22831s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
c0d27fcc 22832_ACEOF
ba4481b5 22833
503d2be0
AS
22834# Break up conftest.defines because some shells have a limit on the size
22835# of here documents, and old seds have small limits too (100 cmds).
22836echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
35996d22 22837echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
503d2be0
AS
22838echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
22839echo ' :' >>$CONFIG_STATUS
22840rm -f conftest.tail
22841while grep . conftest.defines >/dev/null
22842do
22843 # Write a limited-size here document to $tmp/defines.sed.
22844 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
22845 # Speed up: don't consider the non `#define' lines.
35996d22 22846 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
503d2be0
AS
22847 # Work around the forget-to-reset-the-flag bug.
22848 echo 't clr' >>$CONFIG_STATUS
22849 echo ': clr' >>$CONFIG_STATUS
22850 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
22851 echo 'CEOF
22852 sed -f $tmp/defines.sed $tmp/in >$tmp/out
22853 rm -f $tmp/in
22854 mv $tmp/out $tmp/in
22855' >>$CONFIG_STATUS
22856 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
22857 rm -f conftest.defines
22858 mv conftest.tail conftest.defines
22859done
22860rm -f conftest.defines
6bae0ccf 22861echo ' fi # grep' >>$CONFIG_STATUS
503d2be0 22862echo >>$CONFIG_STATUS
ba4481b5 22863
503d2be0
AS
22864# Break up conftest.undefs because some shells have a limit on the size
22865# of here documents, and old seds have small limits too (100 cmds).
22866echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
ba4481b5 22867rm -f conftest.tail
503d2be0 22868while grep . conftest.undefs >/dev/null
ba4481b5 22869do
503d2be0
AS
22870 # Write a limited-size here document to $tmp/undefs.sed.
22871 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
22872 # Speed up: don't consider the non `#undef'
35996d22 22873 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
503d2be0
AS
22874 # Work around the forget-to-reset-the-flag bug.
22875 echo 't clr' >>$CONFIG_STATUS
22876 echo ': clr' >>$CONFIG_STATUS
22877 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
ba4481b5 22878 echo 'CEOF
503d2be0
AS
22879 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
22880 rm -f $tmp/in
22881 mv $tmp/out $tmp/in
22882' >>$CONFIG_STATUS
22883 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
22884 rm -f conftest.undefs
22885 mv conftest.tail conftest.undefs
ba4481b5 22886done
503d2be0
AS
22887rm -f conftest.undefs
22888
c0d27fcc 22889cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22890 # Let's still pretend it is `configure' which instantiates (i.e., don't
22891 # use $as_me), people would be surprised to read:
c0d27fcc 22892 # /* config.h. Generated by config.status. */
503d2be0 22893 if test x"$ac_file" = x-; then
c0d27fcc 22894 echo "/* Generated by configure. */" >$tmp/config.h
ba4481b5 22895 else
c0d27fcc 22896 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
503d2be0
AS
22897 fi
22898 cat $tmp/in >>$tmp/config.h
22899 rm -f $tmp/in
22900 if test x"$ac_file" != x-; then
19650fd6 22901 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
c0d27fcc 22902 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
22903echo "$as_me: $ac_file is unchanged" >&6;}
22904 else
c0d27fcc
MR
22905 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22906$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
22907 X"$ac_file" : 'X\(//\)[^/]' \| \
22908 X"$ac_file" : 'X\(//\)$' \| \
22909 X"$ac_file" : 'X\(/\)' \| \
22910 . : '\(.\)' 2>/dev/null ||
503d2be0
AS
22911echo X"$ac_file" |
22912 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22913 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22914 /^X\(\/\/\)$/{ s//\1/; q; }
22915 /^X\(\/\).*/{ s//\1/; q; }
22916 s/.*/./; q'`
6bae0ccf
DL
22917 { if $as_mkdir_p; then
22918 mkdir -p "$ac_dir"
22919 else
22920 as_dir="$ac_dir"
22921 as_dirs=
22922 while test ! -d "$as_dir"; do
22923 as_dirs="$as_dir $as_dirs"
22924 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22925$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
22926 X"$as_dir" : 'X\(//\)[^/]' \| \
22927 X"$as_dir" : 'X\(//\)$' \| \
22928 X"$as_dir" : 'X\(/\)' \| \
22929 . : '\(.\)' 2>/dev/null ||
6bae0ccf
DL
22930echo X"$as_dir" |
22931 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22932 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22933 /^X\(\/\/\)$/{ s//\1/; q; }
22934 /^X\(\/\).*/{ s//\1/; q; }
22935 s/.*/./; q'`
22936 done
22937 test ! -n "$as_dirs" || mkdir $as_dirs
22938 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22939echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22940 { (exit 1); exit 1; }; }; }
503d2be0 22941
503d2be0
AS
22942 rm -f $ac_file
22943 mv $tmp/config.h $ac_file
ba4481b5 22944 fi
503d2be0
AS
22945 else
22946 cat $tmp/config.h
22947 rm -f $tmp/config.h
ba4481b5 22948 fi
503d2be0 22949done
c0d27fcc
MR
22950_ACEOF
22951cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22952
22953#
22954# CONFIG_COMMANDS section.
22955#
22956for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
22957 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22958 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
c0d27fcc
MR
22959 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
22960$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
22961 X"$ac_dest" : 'X\(//\)[^/]' \| \
22962 X"$ac_dest" : 'X\(//\)$' \| \
22963 X"$ac_dest" : 'X\(/\)' \| \
22964 . : '\(.\)' 2>/dev/null ||
c0d27fcc
MR
22965echo X"$ac_dest" |
22966 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22967 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22968 /^X\(\/\/\)$/{ s//\1/; q; }
22969 /^X\(\/\).*/{ s//\1/; q; }
22970 s/.*/./; q'`
35996d22
AS
22971 { if $as_mkdir_p; then
22972 mkdir -p "$ac_dir"
22973 else
22974 as_dir="$ac_dir"
22975 as_dirs=
22976 while test ! -d "$as_dir"; do
22977 as_dirs="$as_dir $as_dirs"
22978 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22979$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22980 X"$as_dir" : 'X\(//\)[^/]' \| \
22981 X"$as_dir" : 'X\(//\)$' \| \
22982 X"$as_dir" : 'X\(/\)' \| \
22983 . : '\(.\)' 2>/dev/null ||
22984echo X"$as_dir" |
22985 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22986 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22987 /^X\(\/\/\)$/{ s//\1/; q; }
22988 /^X\(\/\).*/{ s//\1/; q; }
22989 s/.*/./; q'`
22990 done
22991 test ! -n "$as_dirs" || mkdir $as_dirs
22992 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22993echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22994 { (exit 1); exit 1; }; }; }
22995
c0d27fcc
MR
22996 ac_builddir=.
22997
22998if test "$ac_dir" != .; then
22999 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23000 # A "../" for each directory in $ac_dir_suffix.
23001 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23002else
23003 ac_dir_suffix= ac_top_builddir=
23004fi
23005
23006case $srcdir in
23007 .) # No --srcdir option. We are building in place.
23008 ac_srcdir=.
23009 if test -z "$ac_top_builddir"; then
23010 ac_top_srcdir=.
23011 else
23012 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23013 fi ;;
23014 [\\/]* | ?:[\\/]* ) # Absolute path.
23015 ac_srcdir=$srcdir$ac_dir_suffix;
23016 ac_top_srcdir=$srcdir ;;
23017 *) # Relative path.
23018 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23019 ac_top_srcdir=$ac_top_builddir$srcdir ;;
23020esac
35996d22
AS
23021
23022# Do not use `cd foo && pwd` to compute absolute paths, because
23023# the directories may not exist.
23024case `pwd` in
23025.) ac_abs_builddir="$ac_dir";;
23026*)
23027 case "$ac_dir" in
23028 .) ac_abs_builddir=`pwd`;;
23029 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23030 *) ac_abs_builddir=`pwd`/"$ac_dir";;
23031 esac;;
23032esac
23033case $ac_abs_builddir in
23034.) ac_abs_top_builddir=${ac_top_builddir}.;;
23035*)
23036 case ${ac_top_builddir}. in
23037 .) ac_abs_top_builddir=$ac_abs_builddir;;
23038 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23039 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23040 esac;;
23041esac
23042case $ac_abs_builddir in
23043.) ac_abs_srcdir=$ac_srcdir;;
23044*)
23045 case $ac_srcdir in
23046 .) ac_abs_srcdir=$ac_abs_builddir;;
23047 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23048 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23049 esac;;
23050esac
23051case $ac_abs_builddir in
23052.) ac_abs_top_srcdir=$ac_top_srcdir;;
23053*)
23054 case $ac_top_srcdir in
23055 .) ac_abs_top_srcdir=$ac_abs_builddir;;
23056 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23057 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23058 esac;;
23059esac
ba4481b5 23060
c0d27fcc
MR
23061
23062 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
23063echo "$as_me: executing $ac_dest commands" >&6;}
503d2be0
AS
23064 case $ac_dest in
23065 default )
ba4481b5
DL
23066
23067### Make the necessary directories, if they don't exist.
23068for dir in etc lisp ; do
23069 test -d ${dir} || mkdir ${dir}
23070done
23071
23072# Build src/Makefile from ${srcdir}/src/Makefile.c
23073# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
23074# This must be done after src/config.h is built, since we rely on that file.
23075
23076# Now get this: Some word that is part of the ${srcdir} directory name
23077# or the ${configuration} value might, just might, happen to be an
23078# identifier like `sun4' or `i386' or something, and be predefined by
23079# the C preprocessor to some helpful value like 1, or maybe the empty
23080# string. Needless to say consequent macro substitutions are less
23081# than conducive to the makefile finding the correct directory.
23082undefs="`echo $top_srcdir $configuration $canonical |
23083sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
23084 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
23085`"
23086
23087echo creating src/epaths.h
4aa6b955 23088${MAKE-make} epaths-force
ba4481b5 23089
1c203d4c
DL
23090# As of 2000-11-19, newest development versions of GNU cpp preprocess
23091# `..' to `. .' unless invoked with -traditional
23092
d0e9bfd2 23093if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
23094 CPPFLAGS="$CPPFLAGS -traditional"
23095fi
23096
ba4481b5
DL
23097echo creating lib-src/Makefile
23098( cd lib-src
23099 rm -f junk.c junk1.c junk2.c
23100 sed -e '/start of cpp stuff/q' \
23101 < Makefile.c > junk1.c
23102 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 23103 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 23104 < Makefile.c > junk.c
503d2be0 23105 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
23106 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
23107 cat junk1.c junk2.c > Makefile.new
23108 rm -f junk.c junk1.c junk2.c
23109 chmod 444 Makefile.new
23110 mv -f Makefile.new Makefile
23111)
23112
23113echo creating src/Makefile
23114( cd src
23115 rm -f junk.c junk1.c junk2.c
23116 sed -e '/start of cpp stuff/q' \
23117 < Makefile.c > junk1.c
23118 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 23119 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 23120 < Makefile.c > junk.c
503d2be0 23121 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
23122 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
23123 cat junk1.c junk2.c > Makefile.new
23124 rm -f junk.c junk1.c junk2.c
23125 chmod 444 Makefile.new
23126 mv -f Makefile.new Makefile
23127)
23128
503d2be0 23129if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 23130 echo creating src/.gdbinit
503d2be0 23131 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
23132fi
23133
23134# This is how we know whether to re-run configure in certain cases.
23135touch src/config.stamp
23136
503d2be0
AS
23137 ;;
23138 esac
23139done
c0d27fcc 23140_ACEOF
503d2be0 23141
c0d27fcc 23142cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 23143
503d2be0 23144{ (exit 0); exit 0; }
c0d27fcc 23145_ACEOF
ba4481b5 23146chmod +x $CONFIG_STATUS
503d2be0
AS
23147ac_clean_files=$ac_clean_files_save
23148
c0d27fcc 23149
503d2be0
AS
23150# configure is writing to config.log, and then calls config.status.
23151# config.status does its own redirection, appending to config.log.
23152# Unfortunately, on DOS this fails, as config.log is still kept open
23153# by configure, so config.status won't be able to write to it; its
23154# output is simply discarded. So we exec the FD to /dev/null,
23155# effectively closing config.log, so it can be properly (re)opened and
23156# appended to by config.status. When coming back to configure, we
23157# need to make the FD available again.
23158if test "$no_create" != yes; then
23159 ac_cs_success=:
19650fd6
AS
23160 ac_config_status_args=
23161 test "$silent" = yes &&
23162 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 23163 exec 5>/dev/null
19650fd6 23164 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
23165 exec 5>>config.log
23166 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23167 # would make configure fail if this is the last instruction.
23168 $ac_cs_success || { (exit 1); exit 1; }
23169fi
f5f47add 23170
c0d27fcc 23171