*** empty log message ***
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
edfaf76d 3# Generated by GNU Autoconf 2.59.
ba4481b5 4#
edfaf76d 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
edfaf76d 22DUALCASE=1; export DUALCASE # for MKS sh
503d2be0 23
c0d27fcc 24# Support unset when possible.
edfaf76d 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
edfaf76d 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
edfaf76d 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.
edfaf76d 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.
edfaf76d 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 \
edfaf76d 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\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
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
edfaf76d 807 [$ac_default_prefix]
503d2be0 808 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
edfaf76d 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
d0098f13 859 --enable-asserts compile code with asserts enabled
19650fd6
AS
860 --enable-maintainer-mode enable make rules and dependencies not useful
861 (and sometimes confusing) to the casual installer
9adfabc2
LK
862 --enable-locallisppath=PATH
863 directories Emacs should search for lisp files
864 specific to this site
503d2be0
AS
865 --disable-largefile omit support for large files
866
867Optional Packages:
868 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
869 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
870 --without-gcc don't use GCC to compile Emacs if GCC is found
871 --without-pop don't support POP mail retrieval with movemail
872 --with-kerberos support Kerberos-authenticated POP
873 --with-kerberos5 support Kerberos version 5 authenticated POP
874 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 875 --without-sound don't compile with sound support
488dd4c4
JD
876 --with-x-toolkit=KIT use an X toolkit
877 (KIT = yes/lucid/athena/motif/gtk/no)
503d2be0
AS
878 --with-xpm use -lXpm for displaying XPM images
879 --with-jpeg use -ljpeg for displaying JPEG images
880 --with-tiff use -ltiff for displaying TIFF images
881 --with-gif use -lungif for displaying GIF images
882 --with-png use -lpng for displaying PNG images
488dd4c4
JD
883 --with-gtk use GTK (same as --with-x-toolkit=gtk)
884 --with-pkg-config-prog Path to pkg-config to use for finding GTK
503d2be0 885 --without-toolkit-scroll-bars
cc227489
MB
886 don't use Motif or Xaw3d scroll bars
887 --without-xim don't use X11 XIM
e0f712ba 888 --without-carbon don't use Carbon GUI on Mac OS X
503d2be0
AS
889 --with-x use the X Window System
890
891Some influential environment variables:
892 CC C compiler command
893 CFLAGS C compiler flags
894 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
895 nonstandard directory <lib dir>
896 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
897 headers in a nonstandard directory <include dir>
898 CPP C preprocessor
899
900Use these variables to override the choices made by `configure' or to help
901it to find libraries and programs with nonstandard names/locations.
902
c0d27fcc 903_ACEOF
503d2be0
AS
904fi
905
906if test "$ac_init_help" = "recursive"; then
907 # If there are subdirs, report their specific --help.
908 ac_popdir=`pwd`
c0d27fcc
MR
909 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
910 test -d $ac_dir || continue
911 ac_builddir=.
912
913if test "$ac_dir" != .; then
914 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
915 # A "../" for each directory in $ac_dir_suffix.
916 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
917else
918 ac_dir_suffix= ac_top_builddir=
919fi
503d2be0 920
c0d27fcc
MR
921case $srcdir in
922 .) # No --srcdir option. We are building in place.
923 ac_srcdir=.
924 if test -z "$ac_top_builddir"; then
925 ac_top_srcdir=.
926 else
927 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
928 fi ;;
929 [\\/]* | ?:[\\/]* ) # Absolute path.
930 ac_srcdir=$srcdir$ac_dir_suffix;
931 ac_top_srcdir=$srcdir ;;
932 *) # Relative path.
933 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
934 ac_top_srcdir=$ac_top_builddir$srcdir ;;
935esac
edfaf76d
LK
936
937# Do not use `cd foo && pwd` to compute absolute paths, because
938# the directories may not exist.
939case `pwd` in
940.) ac_abs_builddir="$ac_dir";;
941*)
942 case "$ac_dir" in
943 .) ac_abs_builddir=`pwd`;;
944 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
945 *) ac_abs_builddir=`pwd`/"$ac_dir";;
946 esac;;
947esac
948case $ac_abs_builddir in
949.) ac_abs_top_builddir=${ac_top_builddir}.;;
950*)
951 case ${ac_top_builddir}. in
952 .) ac_abs_top_builddir=$ac_abs_builddir;;
953 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
954 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
955 esac;;
956esac
957case $ac_abs_builddir in
958.) ac_abs_srcdir=$ac_srcdir;;
959*)
960 case $ac_srcdir in
961 .) ac_abs_srcdir=$ac_abs_builddir;;
962 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
963 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
964 esac;;
965esac
966case $ac_abs_builddir in
967.) ac_abs_top_srcdir=$ac_top_srcdir;;
968*)
969 case $ac_top_srcdir in
970 .) ac_abs_top_srcdir=$ac_abs_builddir;;
971 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
972 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
973 esac;;
974esac
c0d27fcc
MR
975
976 cd $ac_dir
503d2be0 977 # Check for guested configure; otherwise get Cygnus style configure.
c0d27fcc 978 if test -f $ac_srcdir/configure.gnu; then
503d2be0 979 echo
c0d27fcc
MR
980 $SHELL $ac_srcdir/configure.gnu --help=recursive
981 elif test -f $ac_srcdir/configure; then
503d2be0 982 echo
c0d27fcc
MR
983 $SHELL $ac_srcdir/configure --help=recursive
984 elif test -f $ac_srcdir/configure.ac ||
edfaf76d 985 test -f $ac_srcdir/configure.in; then
503d2be0
AS
986 echo
987 $ac_configure --help
988 else
c0d27fcc 989 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
503d2be0 990 fi
edfaf76d 991 cd "$ac_popdir"
503d2be0
AS
992 done
993fi
994
995test -n "$ac_init_help" && exit 0
996if $ac_init_version; then
c0d27fcc 997 cat <<\_ACEOF
503d2be0 998
edfaf76d 999Copyright (C) 2003 Free Software Foundation, Inc.
503d2be0
AS
1000This configure script is free software; the Free Software Foundation
1001gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1002_ACEOF
503d2be0
AS
1003 exit 0
1004fi
1005exec 5>config.log
c0d27fcc 1006cat >&5 <<_ACEOF
503d2be0
AS
1007This file contains any messages produced by compilers while
1008running configure, to aid debugging if configure makes a mistake.
1009
1010It was created by $as_me, which was
edfaf76d 1011generated by GNU Autoconf 2.59. Invocation command line was
503d2be0
AS
1012
1013 $ $0 $@
1014
c0d27fcc 1015_ACEOF
503d2be0
AS
1016{
1017cat <<_ASUNAME
c0d27fcc
MR
1018## --------- ##
1019## Platform. ##
1020## --------- ##
503d2be0
AS
1021
1022hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1023uname -m = `(uname -m) 2>/dev/null || echo unknown`
1024uname -r = `(uname -r) 2>/dev/null || echo unknown`
1025uname -s = `(uname -s) 2>/dev/null || echo unknown`
1026uname -v = `(uname -v) 2>/dev/null || echo unknown`
1027
1028/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1029/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1030
1031/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1032/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1033/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1034hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1035/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1036/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1037/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1038
925c2f3f 1039_ASUNAME
c0d27fcc
MR
1040
1041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1042for as_dir in $PATH
1043do
1044 IFS=$as_save_IFS
1045 test -z "$as_dir" && as_dir=.
1046 echo "PATH: $as_dir"
1047done
1048
503d2be0
AS
1049} >&5
1050
c0d27fcc
MR
1051cat >&5 <<_ACEOF
1052
1053
1054## ----------- ##
1055## Core tests. ##
1056## ----------- ##
1057
1058_ACEOF
503d2be0 1059
503d2be0
AS
1060
1061# Keep a trace of the command line.
1062# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1063# Strip out --silent because we don't want to record it for future runs.
503d2be0 1064# Also quote any args containing shell meta-characters.
19650fd6 1065# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1066ac_configure_args=
19650fd6
AS
1067ac_configure_args0=
1068ac_configure_args1=
503d2be0 1069ac_sep=
19650fd6
AS
1070ac_must_keep_next=false
1071for ac_pass in 1 2
503d2be0 1072do
19650fd6
AS
1073 for ac_arg
1074 do
1075 case $ac_arg in
1076 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1077 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1078 | -silent | --silent | --silen | --sile | --sil)
1079 continue ;;
1080 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1081 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1082 esac
1083 case $ac_pass in
1084 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1085 2)
1086 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1087 if test $ac_must_keep_next = true; then
edfaf76d 1088 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1089 else
edfaf76d
LK
1090 case $ac_arg in
1091 *=* | --config-cache | -C | -disable-* | --disable-* \
1092 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1093 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1094 | -with-* | --with-* | -without-* | --without-* | --x)
1095 case "$ac_configure_args0 " in
1096 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1097 esac
1098 ;;
1099 -* ) ac_must_keep_next=true ;;
1100 esac
19650fd6
AS
1101 fi
1102 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1103 # Get rid of the leading space.
1104 ac_sep=" "
1105 ;;
1106 esac
1107 done
503d2be0 1108done
19650fd6
AS
1109$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1110$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1111
1112# When interrupted or exit'd, cleanup temporary files, and complete
1113# config.log. We remove comments because anyway the quotes in there
1114# would cause problems or look ugly.
c0d27fcc
MR
1115# WARNING: Be sure not to use single quotes in there, as some shells,
1116# such as our DU 5.0 friend, will then `close' the trap.
503d2be0
AS
1117trap 'exit_status=$?
1118 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1119 {
1120 echo
6bae0ccf 1121
c0d27fcc
MR
1122 cat <<\_ASBOX
1123## ---------------- ##
1124## Cache variables. ##
1125## ---------------- ##
1126_ASBOX
1127 echo
1128 # The following way of writing the cache mishandles newlines in values,
503d2be0
AS
1129{
1130 (set) 2>&1 |
1131 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1132 *ac_space=\ *)
1133 sed -n \
edfaf76d
LK
1134 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1135 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
503d2be0
AS
1136 ;;
1137 *)
1138 sed -n \
edfaf76d 1139 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
503d2be0
AS
1140 ;;
1141 esac;
c0d27fcc
MR
1142}
1143 echo
6bae0ccf
DL
1144
1145 cat <<\_ASBOX
1146## ----------------- ##
1147## Output variables. ##
1148## ----------------- ##
1149_ASBOX
1150 echo
1151 for ac_var in $ac_subst_vars
1152 do
1153 eval ac_val=$`echo $ac_var`
1154 echo "$ac_var='"'"'$ac_val'"'"'"
1155 done | sort
1156 echo
1157
1158 if test -n "$ac_subst_files"; then
1159 cat <<\_ASBOX
1160## ------------- ##
1161## Output files. ##
1162## ------------- ##
1163_ASBOX
1164 echo
1165 for ac_var in $ac_subst_files
1166 do
1167 eval ac_val=$`echo $ac_var`
edfaf76d 1168 echo "$ac_var='"'"'$ac_val'"'"'"
6bae0ccf
DL
1169 done | sort
1170 echo
1171 fi
1172
c0d27fcc
MR
1173 if test -s confdefs.h; then
1174 cat <<\_ASBOX
1175## ----------- ##
1176## confdefs.h. ##
1177## ----------- ##
1178_ASBOX
1179 echo
6bae0ccf 1180 sed "/^$/d" confdefs.h | sort
c0d27fcc
MR
1181 echo
1182 fi
1183 test "$ac_signal" != 0 &&
1184 echo "$as_me: caught signal $ac_signal"
1185 echo "$as_me: exit $exit_status"
1186 } >&5
edfaf76d 1187 rm -f core *.core &&
c0d27fcc 1188 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0
AS
1189 exit $exit_status
1190 ' 0
1191for ac_signal in 1 2 13 15; do
1192 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1193done
1194ac_signal=0
1195
1196# confdefs.h avoids OS command line length limits that DEFS can exceed.
1197rm -rf conftest* confdefs.h
1198# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1199echo >confdefs.h
ba4481b5 1200
c0d27fcc
MR
1201# Predefined preprocessor variables.
1202
1203cat >>confdefs.h <<_ACEOF
1204#define PACKAGE_NAME "$PACKAGE_NAME"
1205_ACEOF
1206
1207
1208cat >>confdefs.h <<_ACEOF
1209#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1210_ACEOF
1211
1212
1213cat >>confdefs.h <<_ACEOF
1214#define PACKAGE_VERSION "$PACKAGE_VERSION"
1215_ACEOF
1216
1217
1218cat >>confdefs.h <<_ACEOF
1219#define PACKAGE_STRING "$PACKAGE_STRING"
1220_ACEOF
1221
1222
1223cat >>confdefs.h <<_ACEOF
1224#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1225_ACEOF
1226
1227
503d2be0 1228# Let the site file select an alternate cache file if it wants to.
ba4481b5
DL
1229# Prefer explicitly selected file to automatically selected ones.
1230if test -z "$CONFIG_SITE"; then
1231 if test "x$prefix" != xNONE; then
1232 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1233 else
1234 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1235 fi
1236fi
1237for ac_site_file in $CONFIG_SITE; do
1238 if test -r "$ac_site_file"; then
c0d27fcc 1239 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1240echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1241 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1242 . "$ac_site_file"
1243 fi
1244done
1245
1246if test -r "$cache_file"; then
503d2be0
AS
1247 # Some versions of bash will fail to source /dev/null (special
1248 # files actually), so we avoid doing that.
1249 if test -f "$cache_file"; then
c0d27fcc 1250 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1251echo "$as_me: loading cache $cache_file" >&6;}
1252 case $cache_file in
1253 [\\/]* | ?:[\\/]* ) . $cache_file;;
1254 *) . ./$cache_file;;
1255 esac
1256 fi
ba4481b5 1257else
c0d27fcc 1258 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1259echo "$as_me: creating cache $cache_file" >&6;}
1260 >$cache_file
1261fi
1262
1263# Check that the precious variables saved in the cache have kept the same
1264# value.
1265ac_cache_corrupted=false
1266for ac_var in `(set) 2>&1 |
edfaf76d 1267 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
503d2be0
AS
1268 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1269 eval ac_new_set=\$ac_env_${ac_var}_set
1270 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1271 eval ac_new_val="\$ac_env_${ac_var}_value"
1272 case $ac_old_set,$ac_new_set in
1273 set,)
c0d27fcc 1274 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1275echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1276 ac_cache_corrupted=: ;;
1277 ,set)
c0d27fcc 1278 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1279echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1280 ac_cache_corrupted=: ;;
1281 ,);;
1282 *)
1283 if test "x$ac_old_val" != "x$ac_new_val"; then
edfaf76d 1284 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1285echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
edfaf76d 1286 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1287echo "$as_me: former value: $ac_old_val" >&2;}
edfaf76d 1288 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1289echo "$as_me: current value: $ac_new_val" >&2;}
edfaf76d 1290 ac_cache_corrupted=:
503d2be0
AS
1291 fi;;
1292 esac
c0d27fcc 1293 # Pass precious variables to config.status.
503d2be0
AS
1294 if test "$ac_new_set" = set; then
1295 case $ac_new_val in
1296 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
c0d27fcc
MR
1297 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1298 *) ac_arg=$ac_var=$ac_new_val ;;
1299 esac
1300 case " $ac_configure_args " in
1301 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1302 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1303 esac
1304 fi
1305done
1306if $ac_cache_corrupted; then
c0d27fcc 1307 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1308echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1309 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1310echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1311 { (exit 1); exit 1; }; }
ba4481b5
DL
1312fi
1313
1314ac_ext=c
ba4481b5 1315ac_cpp='$CPP $CPPFLAGS'
503d2be0
AS
1316ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1317ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1318ac_compiler_gnu=$ac_cv_c_compiler_gnu
1319
c0d27fcc
MR
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
ba4481b5 1336
6bae0ccf
DL
1337
1338 ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1339
c0d27fcc 1340
ba5da88a
PJ
1341test "$program_prefix" != NONE &&
1342 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1343# Use a double $ so make ignores it.
1344test "$program_suffix" != NONE &&
1345 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1346# Double any \ or $. echo might interpret backslashes.
1347# By default was `s,x,x', remove it if useless.
1348cat <<\_ACEOF >conftest.sed
1349s/[\\$]/&&/g;s/;s,x,x,$//
1350_ACEOF
1351program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1352rm conftest.sed
1353
c0d27fcc 1354
ba4481b5
DL
1355lispdir='${datadir}/emacs/${version}/lisp'
1356locallisppath='${datadir}/emacs/${version}/site-lisp:'\
1357'${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
1358lisppath='${locallisppath}:${lispdir}'
1359etcdir='${datadir}/emacs/${version}/etc'
1360archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1361docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1362gamedir='${localstatedir}/games/emacs'
98418dba
CW
1363
1364gameuser=games
1365
c0d27fcc 1366
ba4481b5
DL
1367# Check whether --with-gcc or --without-gcc was given.
1368if test "${with_gcc+set}" = set; then
1369 withval="$with_gcc"
503d2be0
AS
1370
1371fi;
ba4481b5
DL
1372
1373# Check whether --with-pop or --without-pop was given.
1374if test "${with_pop+set}" = set; then
1375 withval="$with_pop"
243cf185 1376 if test "$withval" = yes; then
c0d27fcc 1377 cat >>confdefs.h <<\_ACEOF
ba4481b5 1378#define MAIL_USE_POP 1
c0d27fcc 1379_ACEOF
ba4481b5 1380
243cf185
DL
1381else :
1382fi
3d9fec71 1383else
c0d27fcc 1384 cat >>confdefs.h <<\_ACEOF
3d9fec71 1385#define MAIL_USE_POP 1
c0d27fcc 1386_ACEOF
3d9fec71 1387
503d2be0 1388fi;
ba4481b5 1389
c0d27fcc 1390
a21616bd
KR
1391# Check whether --with-kerberos or --without-kerberos was given.
1392if test "${with_kerberos+set}" = set; then
1393 withval="$with_kerberos"
c0d27fcc 1394 cat >>confdefs.h <<\_ACEOF
a21616bd 1395#define KERBEROS 1
c0d27fcc 1396_ACEOF
a21616bd 1397
503d2be0 1398fi;
a21616bd 1399
c0d27fcc 1400
a21616bd
KR
1401# Check whether --with-kerberos5 or --without-kerberos5 was given.
1402if test "${with_kerberos5+set}" = set; then
1403 withval="$with_kerberos5"
1404 if test "${with_kerberos5+set}" = set; then
1405 if test "${with_kerberos+set}" != set; then
1406 with_kerberos=yes
c0d27fcc 1407 cat >>confdefs.h <<\_ACEOF
a21616bd 1408#define KERBEROS 1
c0d27fcc 1409_ACEOF
a21616bd
KR
1410
1411 fi
1412fi
b936fae4 1413
c0d27fcc 1414cat >>confdefs.h <<\_ACEOF
a21616bd 1415#define KERBEROS5 1
c0d27fcc 1416_ACEOF
a21616bd 1417
503d2be0 1418fi;
a21616bd 1419
ba4481b5
DL
1420# Check whether --with-hesiod or --without-hesiod was given.
1421if test "${with_hesiod+set}" = set; then
1422 withval="$with_hesiod"
b936fae4 1423
c0d27fcc 1424cat >>confdefs.h <<\_ACEOF
ba4481b5 1425#define HESIOD 1
c0d27fcc 1426_ACEOF
ba4481b5 1427
503d2be0 1428fi;
ba4481b5 1429
c0d27fcc 1430
2c9dccc9
PJ
1431# Check whether --with-sound or --without-sound was given.
1432if test "${with_sound+set}" = set; then
1433 withval="$with_sound"
1434
1435fi;
1436
c0d27fcc 1437
ba4481b5
DL
1438# Check whether --with-x-toolkit or --without-x-toolkit was given.
1439if test "${with_x_toolkit+set}" = set; then
1440 withval="$with_x_toolkit"
1441 case "${withval}" in
1442 y | ye | yes ) val=athena ;;
1443 n | no ) val=no ;;
1444 l | lu | luc | luci | lucid ) val=lucid ;;
1445 a | at | ath | athe | athen | athena ) val=athena ;;
1446 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1447 g | gt | gtk ) val=gtk ;;
ba4481b5 1448 * )
c0d27fcc 1449{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1450this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1451Currently, \`yes', \`athena' and \`lucid' are synonyms." >&5
1452echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1453this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1454Currently, \`yes', \`athena' and \`lucid' are synonyms." >&2;}
1455 { (exit 1); exit 1; }; }
ba4481b5
DL
1456 ;;
1457 esac
1458 with_x_toolkit=$val
1459
503d2be0 1460fi;
ba4481b5
DL
1461
1462# Check whether --with-xpm or --without-xpm was given.
1463if test "${with_xpm+set}" = set; then
1464 withval="$with_xpm"
503d2be0
AS
1465
1466fi;
ba4481b5
DL
1467
1468# Check whether --with-jpeg or --without-jpeg was given.
1469if test "${with_jpeg+set}" = set; then
1470 withval="$with_jpeg"
503d2be0
AS
1471
1472fi;
ba4481b5
DL
1473
1474# Check whether --with-tiff or --without-tiff was given.
1475if test "${with_tiff+set}" = set; then
1476 withval="$with_tiff"
503d2be0
AS
1477
1478fi;
ba4481b5
DL
1479
1480# Check whether --with-gif or --without-gif was given.
1481if test "${with_gif+set}" = set; then
1482 withval="$with_gif"
503d2be0
AS
1483
1484fi;
ba4481b5
DL
1485
1486# Check whether --with-png or --without-png was given.
1487if test "${with_png+set}" = set; then
1488 withval="$with_png"
503d2be0
AS
1489
1490fi;
ba4481b5 1491
488dd4c4
JD
1492# Check whether --with-gtk or --without-gtk was given.
1493if test "${with_gtk+set}" = set; then
1494 withval="$with_gtk"
1495
1496fi;
1497
1498# Check whether --with-pkg-config-prog or --without-pkg-config-prog was given.
1499if test "${with_pkg_config_prog+set}" = set; then
1500 withval="$with_pkg_config_prog"
1501
1502fi;
1503
ba4481b5
DL
1504# Check whether --with-toolkit-scroll-bars or --without-toolkit-scroll-bars was given.
1505if test "${with_toolkit_scroll_bars+set}" = set; then
1506 withval="$with_toolkit_scroll_bars"
503d2be0
AS
1507
1508fi;
ba4481b5 1509
1d36487c
GM
1510# Check whether --with-xim or --without-xim was given.
1511if test "${with_xim+set}" = set; then
1512 withval="$with_xim"
1d36487c 1513
503d2be0 1514fi;
ba4481b5 1515
e0f712ba
AC
1516# Check whether --with-carbon or --without-carbon was given.
1517if test "${with_carbon+set}" = set; then
1518 withval="$with_carbon"
1519
1520fi;
6a3a24fa
JD
1521# Check whether --enable-carbon-app or --disable-carbon-app was given.
1522if test "${enable_carbon_app+set}" = set; then
1523 enableval="$enable_carbon_app"
1524 carbon_appdir_x=${enableval}
1525fi;
e0f712ba 1526
d0098f13
JD
1527# Check whether --enable-asserts or --disable-asserts was given.
1528if test "${enable_asserts+set}" = set; then
1529 enableval="$enable_asserts"
1530 USE_XASSERTS=$enableval
1531else
1532 USE_XASSERTS=no
1533fi;
1534
19650fd6
AS
1535# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1536if test "${enable_maintainer_mode+set}" = set; then
1537 enableval="$enable_maintainer_mode"
1538 USE_MAINTAINER_MODE=$enableval
1539else
1540 USE_MAINTAINER_MODE=no
1541fi;
1542if test $USE_MAINTAINER_MODE = yes; then
1543 MAINT=
1544else
1545 MAINT=#
1546fi
1547
1548
9adfabc2
LK
1549# Check whether --enable-locallisppath or --disable-locallisppath was given.
1550if test "${enable_locallisppath+set}" = set; then
1551 enableval="$enable_locallisppath"
1552 if test "${enableval}" = "no"; then
1553 locallisppath=
1554elif test "${enableval}" != "yes"; then
1555 locallisppath=${enableval}
1556fi
1557fi;
1558
ba4481b5 1559#### Make srcdir absolute, if it isn't already. It's important to
17494071 1560#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
1561#### give you automounter prefixes, which can go away. We do all this
1562#### so Emacs can find its files when run uninstalled.
17494071
GM
1563## Make sure CDPATH doesn't affect cd (in case PWD is relative).
1564unset CDPATH
ba4481b5
DL
1565case "${srcdir}" in
1566 /* ) ;;
1567 . )
1568 ## We may be able to use the $PWD environment variable to make this
1569 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
1570 ## Note: we used to use ${PWD} at the end instead of `pwd`,
1571 ## but that tested only for a well-formed and valid PWD,
1572 ## it did not object when PWD was well-formed and valid but just wrong.
1573 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
1574 then
1575 srcdir="$PWD"
1576 else
1577 srcdir="`(cd ${srcdir}; pwd)`"
1578 fi
1579 ;;
1580 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
1581esac
1582
1583#### Check if the source directory already has a configured system in it.
1584if test `pwd` != `(cd ${srcdir} && pwd)` \
1585 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 1586 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
1587 as a build directory right now; it has been configured in its own
1588 right. To configure in another directory as well, you MUST
1589 use GNU make. If you do not have GNU make, then you must
1590 now do \`make distclean' in ${srcdir},
1591 and then run $0 again." >&5
1592echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
1593 as a build directory right now; it has been configured in its own
1594 right. To configure in another directory as well, you MUST
1595 use GNU make. If you do not have GNU make, then you must
1596 now do \`make distclean' in ${srcdir},
503d2be0 1597 and then run $0 again." >&2;}
ba4481b5
DL
1598fi
1599
1600#### Given the configuration name, set machfile and opsysfile to the
1601#### names of the m/*.h and s/*.h files we should use.
1602
1603### Canonicalize the configuration name.
1604
1605ac_aux_dir=
1606for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1607 if test -f $ac_dir/install-sh; then
1608 ac_aux_dir=$ac_dir
1609 ac_install_sh="$ac_aux_dir/install-sh -c"
1610 break
1611 elif test -f $ac_dir/install.sh; then
1612 ac_aux_dir=$ac_dir
1613 ac_install_sh="$ac_aux_dir/install.sh -c"
1614 break
503d2be0
AS
1615 elif test -f $ac_dir/shtool; then
1616 ac_aux_dir=$ac_dir
1617 ac_install_sh="$ac_aux_dir/shtool install -c"
1618 break
ba4481b5
DL
1619 fi
1620done
1621if test -z "$ac_aux_dir"; then
c0d27fcc 1622 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
503d2be0
AS
1623echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1624 { (exit 1); exit 1; }; }
ba4481b5 1625fi
503d2be0
AS
1626ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1627ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1628ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ba4481b5
DL
1629
1630# Make sure we can run config.sub.
503d2be0 1631$ac_config_sub sun4 >/dev/null 2>&1 ||
c0d27fcc 1632 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
503d2be0
AS
1633echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1634 { (exit 1); exit 1; }; }
1635
c0d27fcc 1636echo "$as_me:$LINENO: checking build system type" >&5
503d2be0
AS
1637echo $ECHO_N "checking build system type... $ECHO_C" >&6
1638if test "${ac_cv_build+set}" = set; then
1639 echo $ECHO_N "(cached) $ECHO_C" >&6
1640else
1641 ac_cv_build_alias=$build_alias
1642test -z "$ac_cv_build_alias" &&
1643 ac_cv_build_alias=`$ac_config_guess`
1644test -z "$ac_cv_build_alias" &&
c0d27fcc 1645 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
1646echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1647 { (exit 1); exit 1; }; }
1648ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
c0d27fcc
MR
1649 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1650echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
503d2be0
AS
1651 { (exit 1); exit 1; }; }
1652
1653fi
c0d27fcc 1654echo "$as_me:$LINENO: result: $ac_cv_build" >&5
503d2be0
AS
1655echo "${ECHO_T}$ac_cv_build" >&6
1656build=$ac_cv_build
1657build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1658build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1659build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1660
c0d27fcc
MR
1661
1662echo "$as_me:$LINENO: checking host system type" >&5
503d2be0
AS
1663echo $ECHO_N "checking host system type... $ECHO_C" >&6
1664if test "${ac_cv_host+set}" = set; then
1665 echo $ECHO_N "(cached) $ECHO_C" >&6
1666else
1667 ac_cv_host_alias=$host_alias
1668test -z "$ac_cv_host_alias" &&
1669 ac_cv_host_alias=$ac_cv_build_alias
1670ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
c0d27fcc 1671 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
503d2be0
AS
1672echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1673 { (exit 1); exit 1; }; }
1674
1675fi
c0d27fcc 1676echo "$as_me:$LINENO: result: $ac_cv_host" >&5
503d2be0
AS
1677echo "${ECHO_T}$ac_cv_host" >&6
1678host=$ac_cv_host
1679host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1680host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1681host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ba4481b5 1682
c0d27fcc 1683
ba4481b5 1684canonical=$host
531a3336 1685configuration=${host_alias-$host}
ba4481b5 1686
c0d27fcc 1687
22044edf 1688
ba4481b5
DL
1689### If you add support for a new configuration, add code to this
1690### switch statement to recognize your configuration name and select
1691### the appropriate operating system and machine description files.
1692
1693### You would hope that you could choose an m/*.h file pretty much
1694### based on the machine portion of the configuration name, and an s-
1695### file based on the operating system portion. However, it turns out
1696### that each m/*.h file is pretty manufacturer-specific - for
1697### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
1698### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
1699### machines. So we basically have to have a special case for each
1700### configuration name.
1701###
1702### As far as handling version numbers on operating systems is
1703### concerned, make sure things will fail in a fixable way. If
1704### /etc/MACHINES doesn't say anything about version numbers, be
1705### prepared to handle anything reasonably. If version numbers
1706### matter, be sure /etc/MACHINES says something about it.
1707###
1708### Eric Raymond says we should accept strings like "sysvr4" to mean
1709### "System V Release 4"; he writes, "The old convention encouraged
1710### confusion between `system' and `release' levels'."
1711
1712machine='' opsys='' unported=no
1713case "${canonical}" in
1714
1096bcc0
GM
1715 ## FreeBSD ports
1716 *-*-freebsd* )
1717 opsys=freebsd
1718 case "${canonical}" in
1719 alpha*-*-freebsd*) machine=alpha ;;
1720 i[3456]86-*-freebsd*) machine=intel386 ;;
1721 esac
1722 ;;
1723
ba4481b5
DL
1724 ## NetBSD ports
1725 *-*-netbsd* )
1726 opsys=netbsd
dd038e26 1727 if test -f /usr/lib/crti.o; then
f57bd967
DL
1728
1729cat >>confdefs.h <<\_ACEOF
1730#define HAVE_CRTIN
dd038e26
AS
1731_ACEOF
1732
1733 fi
1734
ba4481b5
DL
1735 case "${canonical}" in
1736 alpha*-*-netbsd*) machine=alpha ;;
1737 i[3456]86-*-netbsd*) machine=intel386 ;;
1738 m68k-*-netbsd*)
1739 # This is somewhat bogus.
1740 machine=hp9000s300 ;;
1741 powerpc-apple-netbsd*) machine=macppc ;;
1742 mips-*-netbsd*) machine=pmax ;;
2df636f4 1743 mipsel-*-netbsd*) machine=pmax ;;
97836269 1744 mipseb-*-netbsd*) machine=pmax ;;
ba4481b5 1745 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 1746 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 1747 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 1748 vax-*-netbsd*) machine=vax ;;
2df636f4 1749 arm-*-netbsd*) machine=arm ;;
ba4481b5
DL
1750 esac
1751 ;;
1752
1753 ## OpenBSD ports
1754 *-*-openbsd* )
1755 opsys=openbsd
1756 case "${canonical}" in
1757 alpha*-*-openbsd*) machine=alpha ;;
1758 i386-*-openbsd*) machine=intel386 ;;
1759 m68k-*-openbsd*) machine=hp9000s300 ;;
1760 mipsel-*-openbsd*) machine=pmax ;;
1761 ns32k-*-openbsd*) machine=ns32000 ;;
1762 sparc-*-openbsd*) machine=sparc ;;
1763 vax-*-openbsd*) machine=vax ;;
1764 esac
1765 ;;
1766
1767 ## Acorn RISCiX:
1768 arm-acorn-riscix1.1* )
1769 machine=acorn opsys=riscix1-1
1770 ;;
1771 arm-acorn-riscix1.2* | arm-acorn-riscix )
1772 ## This name is riscix12 instead of riscix1.2
1773 ## to avoid a file name conflict on MSDOS.
1774 machine=acorn opsys=riscix12
1775 ;;
1776
1777 ## BSDI ports
1778 *-*-bsdi* )
1779 opsys=bsdi
1780 case "${canonical}" in
1781 i[345]86-*-bsdi*) machine=intel386 ;;
1782 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 1783 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
1784 esac
1785 case "${canonical}" in
1786 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
1787 *-*-bsdi2.0* ) opsys=bsdos2 ;;
1788 *-*-bsdi2* ) opsys=bsdos2-1 ;;
1789 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 1790 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
1791 esac
1792 ;;
1793
1794 ## Alliant machines
1795 ## Strictly speaking, we need the version of the alliant operating
1796 ## system to choose the right machine file, but currently the
1797 ## configuration name doesn't tell us enough to choose the right
1798 ## one; we need to give alliants their own operating system name to
1799 ## do this right. When someone cares, they can help us.
1800 fx80-alliant-* )
1801 machine=alliant4 opsys=bsd4-2
1802 ;;
1803 i860-alliant-* )
1804 machine=alliant-2800 opsys=bsd4-3
1805 ;;
1806
1807 ## Alpha (DEC) machines.
1808 alpha*-dec-osf* )
1809 machine=alpha opsys=osf1
1810 # This is needed to find X11R6.1 libraries for certain tests.
1811 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
1812 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
1813 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
1814 # due to non-traditional preprocessing with the current compiler
1815 # defaults. OSF 4 can also have that compiler version, and there
1816 # seems always to have been a usable /usr/bin/cpp.
1817 NON_GNU_CPP=/usr/bin/cpp
ca512671 1818 case "${canonical}" in
a55b799a 1819 alpha*-dec-osf[5-9]*)
bb17930d 1820 opsys=osf5-0 ;;
ca512671 1821 esac
ba4481b5
DL
1822 ;;
1823
1824 alpha*-*-linux-gnu* )
1825 machine=alpha opsys=gnu-linux
1826 ;;
1827
c4bb2108
DL
1828 arm*-*-linux-gnu* )
1829 machine=arm opsys=gnu-linux
1830 ;;
1831
ba4481b5
DL
1832 ## Altos 3068
1833 m68*-altos-sysv* )
1834 machine=altos opsys=usg5-2
1835 ;;
1836
1837 ## Amdahl UTS
1838 580-amdahl-sysv* )
1839 machine=amdahl opsys=usg5-2-2
1840 ;;
1841
1842 ## Apollo, Domain/OS
1843 m68*-apollo-* )
1844 machine=apollo opsys=bsd4-3
1845 ;;
1846
1847 ## AT&T 3b2, 3b5, 3b15, 3b20
1848 we32k-att-sysv* )
1849 machine=att3b opsys=usg5-2-2
1850 ;;
1851
1852 ## AT&T 3b1 - The Mighty Unix PC!
1853 m68*-att-sysv* )
1854 machine=7300 opsys=usg5-2-2
1855 ;;
1856
1857 ## Bull dpx20
1858 rs6000-bull-bosx* )
1859 machine=ibmrs6000 opsys=aix3-2
1860 ;;
1861
1862 ## Bull dpx2
1863 m68*-bull-sysv3* )
1864 machine=dpx2 opsys=usg5-3
1865 ;;
1866
1867 ## Bull sps7
1868 m68*-bull-sysv2* )
1869 machine=sps7 opsys=usg5-2
1870 ;;
1871
1872 ## CCI 5/32, 6/32 -- see "Tahoe".
1873
1874 ## Celerity
1875 ## I don't know what configuration name to use for this; config.sub
1876 ## doesn't seem to know anything about it. Hey, Celerity users, get
1877 ## in touch with us!
1878 celerity-celerity-bsd* )
1879 machine=celerity opsys=bsd4-2
1880 ;;
1881
1882 ## Clipper
1883 ## What operating systems does this chip run that Emacs has been
1884 ## tested on?
1885 clipper-* )
1886 machine=clipper
1887 ## We'll use the catch-all code at the bottom to guess the
1888 ## operating system.
1889 ;;
1890
df645f7c
AS
1891 ## Compaq Nonstop
1892 mips-compaq-nonstopux* )
1893 machine=nonstopux opsys=nonstopux
1894 ;;
1895
ba4481b5
DL
1896 ## Convex
1897 *-convex-bsd* | *-convex-convexos* )
1898 machine=convex opsys=bsd4-3
1899 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
1900 NON_GNU_CPP="cc -E -P"
1901 ;;
1902
1903 ## Cubix QBx/386
1904 i[3456]86-cubix-sysv* )
1905 machine=intel386 opsys=usg5-3
1906 ;;
1907
1908 ## Cydra 5
1909 cydra*-cydrome-sysv* )
1910 machine=cydra5 opsys=usg5-3
1911 ;;
1912
1913 ## Data General AViiON Machines
1914 ## DG changed naming conventions with the release of 5.4.4.10, they
1915 ## dropped the initial 5.4 but left the intervening R. Because of the
1916 ## R this shouldn't conflict with older versions of the OS (which I
1917 ## think were named like dgux4.*). In addition, DG new AViiONs series
1918 ## uses either Motorola M88k or Intel Pentium CPUs.
1919 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
1920 machine=aviion opsys=dgux4
1921 ;;
1922 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
1923 ## This name is dgux5-4-3 instead of dgux5-4r3
1924 ## to avoid a file name conflict on MSDOS.
1925 machine=aviion opsys=dgux5-4-3
1926 ;;
1927 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
1928 machine=aviion opsys=dgux5-4r2
1929 ;;
1930 m88k-dg-dgux* )
1931 machine=aviion opsys=dgux
1932 ;;
1933
1934 ## Data General AViiON Intel (x86) Machines
1935 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
1936 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
1937 i[345]86-dg-dguxR4* )
1938 machine=aviion-intel opsys=dgux4
1939 ;;
1940
1941 ## DECstations
1942 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1943 machine=pmax opsys=bsd4-2
1944 ;;
1945 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1946 machine=pmax opsys=bsd4-3
1947 ;;
1948 mips-dec-ultrix* )
1949 machine=pmax opsys=ultrix4-3
1950 ;;
1951 mips-dec-osf* )
1952 machine=pmax opsys=osf1
1953 ;;
1954 mips-dec-mach_bsd4.3* )
1955 machine=pmax opsys=mach-bsd4-3
1956 ;;
1957
cd890796
JD
1958 ## Motorola Delta machines
1959 m68k-motorola-sysv* | m68000-motorola-sysv* )
1960 machine=delta opsys=usg5-3
1961 if test -z "`type gnucc | grep 'not found'`"
1962 then
1963 if test -s /etc/167config
1964 then CC="gnucc -m68040"
1965 else CC="gnucc -m68881"
1966 fi
1967 else
1968 if test -z "`type gcc | grep 'not found'`"
1969 then CC=gcc
1970 else CC=cc
1971 fi
1972 fi
1973 ;;
ba4481b5
DL
1974 m88k-motorola-sysv4* )
1975 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1976 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1977 # I hope there are not other 4.0 versions for this machine
1978 # which really need usg5-4 instead.
1979 machine=delta88k opsys=usg5-4-2
1980 ;;
1981 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1982 machine=delta88k opsys=usg5-3
1983 ;;
1984
1985 ## Dual machines
1986 m68*-dual-sysv* )
1987 machine=dual opsys=usg5-2
1988 ;;
1989 m68*-dual-uniplus* )
1990 machine=dual opsys=unipl5-2
1991 ;;
1992
1993 ## Elxsi 6400
1994 elxsi-elxsi-sysv* )
1995 machine=elxsi opsys=usg5-2
1996 ;;
1997
1998 ## Encore machines
1999 ns16k-encore-bsd* )
2000 machine=ns16000 opsys=umax
2001 ;;
2002
65171e3a
DL
2003 ## The GEC 63 - apparently, this port isn't really finished yet.
2004 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
2005
2006 ## Gould Power Node and NP1
2007 pn-gould-bsd4.2* )
2008 machine=gould opsys=bsd4-2
2009 ;;
2010 pn-gould-bsd4.3* )
2011 machine=gould opsys=bsd4-3
2012 ;;
2013 np1-gould-bsd* )
2014 machine=gould-np1 opsys=bsd4-3
2015 ;;
2016
2017 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
2018 ## as far as Emacs is concerned).
2019 m88k-harris-cxux* )
2020 # Build needs to be different on 7.0 and later releases
2021 case "`uname -r`" in
2022 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
2023 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
2024 esac
2025 NON_GNU_CPP="/lib/cpp"
2026 ;;
2027 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
2028 m68k-harris-cxux* )
2029 machine=nh3000 opsys=cxux
2030 ;;
2031 ## Harris power pc NightHawk running Power UNIX (Series 6000)
2032 powerpc-harris-powerunix )
2033 machine=nh6000 opsys=powerunix
2034 NON_GNU_CPP="cc -Xo -E -P"
2035 ;;
2036 ## SR2001/SR2201 running HI-UX/MPP
2037 hppa1.1-hitachi-hiuxmpp* )
2038 machine=sr2k opsys=hiuxmpp
2039 ;;
89a336fa
GM
2040 hppa1.1-hitachi-hiuxwe2* )
2041 machine=sr2k opsys=hiuxwe2
2042 ;;
ba4481b5
DL
2043 ## Honeywell XPS100
2044 xps*-honeywell-sysv* )
2045 machine=xps100 opsys=usg5-2
2046 ;;
2047
2048 ## HP 9000 series 200 or 300
2049 m68*-hp-bsd* )
2050 machine=hp9000s300 opsys=bsd4-3
2051 ;;
2052 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
2053 m68*-hp-hpux* )
2054 case "`uname -r`" in
2055 ## Someone's system reports A.B8.05 for this.
2056 ## I wonder what other possibilities there are.
2057 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
2058 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
2059 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
2060 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
2061 *) machine=hp9000s300 opsys=hpux ;;
2062 esac
2063 ;;
2064
2065 ## HP 9000 series 700 and 800, running HP/UX
2066 hppa*-hp-hpux7* )
2067 machine=hp800 opsys=hpux
2068 ;;
2069 hppa*-hp-hpux8* )
2070 machine=hp800 opsys=hpux8
2071 ;;
2072 hppa*-hp-hpux9shr* )
2073 machine=hp800 opsys=hpux9shr
2074 ;;
2075 hppa*-hp-hpux9* )
2076 machine=hp800 opsys=hpux9
2077 ;;
b0e44248
RB
2078 hppa*-hp-hpux10.2* )
2079 machine=hp800 opsys=hpux10-20
2080 ;;
cc227489 2081 hppa*-hp-hpux10* )
ba4481b5
DL
2082 machine=hp800 opsys=hpux10
2083 ;;
cc227489
MB
2084 hppa*-hp-hpux1[1-9]* )
2085 machine=hp800 opsys=hpux11
2086 ;;
ba4481b5 2087
409d9577
GM
2088 hppa*-*-linux-gnu* )
2089 machine=hp800 opsys=gnu-linux
2090 ;;
2091
ba4481b5
DL
2092 ## HP 9000 series 700 and 800, running HP/UX
2093 hppa*-hp-hpux* )
2094 ## Cross-compilation? Nah!
2095 case "`uname -r`" in
2096 ## Someone's system reports A.B8.05 for this.
2097 ## I wonder what other possibilities there are.
2098 *.B8.* ) machine=hp800 opsys=hpux8 ;;
2099 *.08.* ) machine=hp800 opsys=hpux8 ;;
2100 *.09.* ) machine=hp800 opsys=hpux9 ;;
2101 *) machine=hp800 opsys=hpux10 ;;
2102 esac
2103 ;;
2104 hppa*-*-nextstep* )
2105 machine=hp800 opsys=nextstep
2106 ;;
2107
2108 ## Orion machines
2109 orion-orion-bsd* )
2110 machine=orion opsys=bsd4-2
2111 ;;
2112 clipper-orion-bsd* )
2113 machine=orion105 opsys=bsd4-2
2114 ;;
2115
2116 ## IBM machines
2117 i[3456]86-ibm-aix1.1* )
2118 machine=ibmps2-aix opsys=usg5-2-2
2119 ;;
2120 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
2121 machine=ibmps2-aix opsys=usg5-3
2122 ;;
2123 i370-ibm-aix*)
2124 machine=ibm370aix opsys=usg5-3
2125 ;;
55597d70 2126 s390-*-linux-gnu* )
138f0859
GM
2127 machine=ibms390 opsys=gnu-linux
2128 ;;
ba4481b5
DL
2129 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2130 machine=ibmrs6000 opsys=aix3-1
2131 ;;
2132 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2133 machine=ibmrs6000 opsys=aix3-2-5
2134 ;;
2135 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2136 machine=ibmrs6000 opsys=aix4-1
2137 ;;
2138 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2139 machine=ibmrs6000 opsys=aix4-2
2140 ;;
55597d70 2141 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2142 machine=ibmrs6000 opsys=aix4-2
2143 ;;
ba4481b5
DL
2144 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2145 machine=ibmrs6000 opsys=aix4
2146 ;;
2147 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2148 machine=ibmrs6000 opsys=aix4-1
2149 ;;
2150 rs6000-ibm-aix* | powerpc-ibm-aix* )
2151 machine=ibmrs6000 opsys=aix3-2
2152 ;;
2153 romp-ibm-bsd4.3* )
2154 machine=ibmrt opsys=bsd4-3
2155 ;;
2156 romp-ibm-bsd4.2* )
2157 machine=ibmrt opsys=bsd4-2
2158 ;;
2159 romp-ibm-aos4.3* )
2160 machine=ibmrt opsys=bsd4-3
2161 ;;
2162 romp-ibm-aos4.2* )
2163 machine=ibmrt opsys=bsd4-2
2164 ;;
2165 romp-ibm-aos* )
2166 machine=ibmrt opsys=bsd4-3
2167 ;;
2168 romp-ibm-bsd* )
2169 machine=ibmrt opsys=bsd4-3
2170 ;;
2171 romp-ibm-aix* )
2172 machine=ibmrt-aix opsys=usg5-2-2
2173 ;;
2174
2175 ## Integrated Solutions `Optimum V'
2176 m68*-isi-bsd4.2* )
2177 machine=isi-ov opsys=bsd4-2
2178 ;;
2179 m68*-isi-bsd4.3* )
2180 machine=isi-ov opsys=bsd4-3
2181 ;;
2182
2183 ## Intel 386 machines where we do care about the manufacturer
2184 i[3456]86-intsys-sysv* )
2185 machine=is386 opsys=usg5-2-2
2186 ;;
2187
2188 ## Prime EXL
2189 i[3456]86-prime-sysv* )
2190 machine=i386 opsys=usg5-3
2191 ;;
2192
2193 ## Sequent Symmetry running Dynix
2194 i[3456]86-sequent-bsd* )
2195 machine=symmetry opsys=bsd4-3
2196 ;;
2197
2198 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
2199 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
2200 machine=sequent-ptx opsys=ptx4
2201 NON_GNU_CPP=/lib/cpp
2202 ;;
2203
2204 ## Sequent Symmetry running DYNIX/ptx
2205 ## Use the old cpp rather than the newer ANSI one.
2206 i[3456]86-sequent-ptx* )
2207 machine=sequent-ptx opsys=ptx
2208 NON_GNU_CPP="/lib/cpp"
2209 ;;
2210
2211 ## ncr machine running svr4.3.
2212 i[3456]86-ncr-sysv4.3 )
2213 machine=ncr386 opsys=usg5-4-3
2214 ;;
2215
2216 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2217 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2218 i[3456]86-ncr-sysv* )
2219 machine=ncr386 opsys=usg5-4-2
2220 ;;
2221
2222 ## Intel Paragon OSF/1
2223 i860-intel-osf1* )
2224 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
2225 ;;
2226
2227 ## Intel 860
2228 i860-*-sysv4* )
2229 machine=i860 opsys=usg5-4
2230 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
2231 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
2232 ;;
2233
c76e04a8
GM
2234 ## Macintosh PowerPC
2235 powerpc*-*-linux-gnu* )
2236 machine=macppc opsys=gnu-linux
2237 ;;
2238
ba4481b5
DL
2239 ## Masscomp machines
2240 m68*-masscomp-rtu* )
2241 machine=masscomp opsys=rtu
2242 ;;
2243
2244 ## Megatest machines
2245 m68*-megatest-bsd* )
2246 machine=mega68 opsys=bsd4-2
2247 ;;
2248
2249 ## Workstations sold by MIPS
2250 ## This is not necessarily all workstations using the MIPS processor -
2251 ## Irises are produced by SGI, and DECstations by DEC.
2252
2253 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
2254 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
2255 ## it gives for choosing between the alternatives seems to be "Use
2256 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
2257 ## the BSD world." I'll assume that these are instructions for
2258 ## handling two odd situations, and that every other situation
2259 ## should use mips.h and usg5-2-2, they being listed first.
2260 mips-mips-usg* )
2261 machine=mips4
2262 ## Fall through to the general code at the bottom to decide on the OS.
2263 ;;
2264 mips-mips-riscos4* )
2265 machine=mips4 opsys=bsd4-3
2266 NON_GNU_CC="cc -systype bsd43"
2267 NON_GNU_CPP="cc -systype bsd43 -E"
2268 ;;
2269 mips-mips-riscos5* )
2270 machine=mips4 opsys=riscos5
2271 NON_GNU_CC="cc -systype bsd43"
2272 NON_GNU_CPP="cc -systype bsd43 -E"
2273 ;;
2274 mips-mips-bsd* )
2275 machine=mips opsys=bsd4-3
2276 ;;
2277 mips-mips-* )
2278 machine=mips opsys=usg5-2-2
2279 ;;
2280
2281 ## NeXT
2282 m68*-next-* | m68k-*-nextstep* )
2283 machine=m68k opsys=nextstep
2284 ;;
2285
2286 ## The complete machine from National Semiconductor
2287 ns32k-ns-genix* )
2288 machine=ns32000 opsys=usg5-2
2289 ;;
2290
2291 ## NCR machines
2292 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
2293 machine=tower32 opsys=usg5-2-2
2294 ;;
2295 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
2296 machine=tower32v3 opsys=usg5-3
2297 ;;
2298
2299 ## NEC EWS4800
2300 mips-nec-sysv4*)
2301 machine=ews4800 opsys=ux4800
2302 ;;
2303
2304 ## Nixdorf Targon 31
2305 m68*-nixdorf-sysv* )
2306 machine=targon31 opsys=usg5-2-2
2307 ;;
2308
2309 ## Nu (TI or LMI)
2310 m68*-nu-sysv* )
2311 machine=nu opsys=usg5-2
2312 ;;
2313
2314 ## Plexus
2315 m68*-plexus-sysv* )
2316 machine=plexus opsys=usg5-2
2317 ;;
2318
ba4481b5
DL
2319 ## Pyramid machines
2320 ## I don't really have any idea what sort of processor the Pyramid has,
2321 ## so I'm assuming it is its own architecture.
2322 pyramid-pyramid-bsd* )
2323 machine=pyramid opsys=bsd4-2
2324 ;;
2325
2326 ## Sequent Balance
2327 ns32k-sequent-bsd4.2* )
2328 machine=sequent opsys=bsd4-2
2329 ;;
2330 ns32k-sequent-bsd4.3* )
2331 machine=sequent opsys=bsd4-3
2332 ;;
2333
2334 ## Siemens Nixdorf
2335 mips-siemens-sysv* | mips-sni-sysv*)
2336 machine=mips-siemens opsys=usg5-4
2337 NON_GNU_CC=/usr/ccs/bin/cc
2338 NON_GNU_CPP=/usr/ccs/lib/cpp
2339 ;;
2340
2341 ## Silicon Graphics machines
2342 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
2343 m68*-sgi-iris3.5* )
2344 machine=irist opsys=iris3-5
2345 ;;
2346 m68*-sgi-iris3.6* | m68*-sgi-iris*)
2347 machine=irist opsys=iris3-6
2348 ;;
2349 ## Iris 4D
2350 mips-sgi-irix3* )
2351 machine=iris4d opsys=irix3-3
2352 ;;
2353 mips-sgi-irix4* )
2354 machine=iris4d opsys=irix4-0
2355 ;;
2356 mips-sgi-irix6.5 )
2357 machine=iris4d opsys=irix6-5
946173ad
DL
2358 # Without defining _LANGUAGE_C, things get masked out in the headers
2359 # so that, for instance, grepping for `free' in stdlib.h fails and
2360 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2361 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2362 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
2363 ;;
2364 mips-sgi-irix6* )
2365 machine=iris4d opsys=irix6-0
c4bb2108 2366 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2367 # but presumably it does no harm.
2368 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2369 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2370 NON_GCC_TEST_OPTIONS=-32
2371 ;;
2372 mips-sgi-irix5.[01]* )
2373 machine=iris4d opsys=irix5-0
2374 ;;
2375 mips-sgi-irix5* | mips-sgi-irix* )
2376 machine=iris4d opsys=irix5-2
2377 ;;
2378
2379 ## SONY machines
2380 m68*-sony-bsd4.2* )
2381 machine=news opsys=bsd4-2
2382 ;;
2383 m68*-sony-bsd4.3* )
2384 machine=news opsys=bsd4-3
2385 ;;
2386 m68*-sony-newsos3* | m68*-sony-news3*)
2387 machine=news opsys=bsd4-3
2388 ;;
2389 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2390 machine=news-risc opsys=bsd4-3
2391 ;;
2392 mips-sony-newsos6* )
2393 machine=news-r6 opsys=newsos6
2394 ;;
2395 mips-sony-news* )
2396 machine=news-risc opsys=newsos5
2397 ;;
2398
2399 ## Stride
2400 m68*-stride-sysv* )
2401 machine=stride opsys=usg5-2
2402 ;;
2403
2404 ## Suns
2405 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2406 machine=sparc opsys=gnu-linux
2407 ;;
2408
d054101f 2409 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2410 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2411 | rs6000-*-solaris2*)
2412 case "${canonical}" in
2413 m68*-sunos1* ) machine=sun1 ;;
2414 m68*-sunos2* ) machine=sun2 ;;
2415 m68* ) machine=sun3 ;;
2416 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
2417 i[3456]86-*-* ) machine=intel386 ;;
2418 powerpcle* ) machine=powerpcle ;;
2419 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2420 sparc* ) machine=sparc ;;
2421 * ) unported=yes ;;
2422 esac
2423 case "${canonical}" in
2424 ## The Sun386 didn't get past 4.0.
2425 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2426 *-sunos4.0* ) opsys=sunos4-0 ;;
2427 *-sunos4.1.[3-9]*noshare )
2428 ## This name is sunos413 instead of sunos4-1-3
2429 ## to avoid a file name conflict on MSDOS.
2430 opsys=sunos413
2431 NON_GNU_CPP=/usr/lib/cpp
2432 NON_GCC_TEST_OPTIONS=-Bstatic
2433 GCC_TEST_OPTIONS=-static
2434 ;;
2435 *-sunos4.1.[3-9]* | *-sunos4shr*)
2436 opsys=sunos4shr
2437 NON_GNU_CPP=/usr/lib/cpp
2438 ;;
2439 *-sunos4* | *-sunos )
2440 opsys=sunos4-1
2441 NON_GCC_TEST_OPTIONS=-Bstatic
2442 GCC_TEST_OPTIONS=-static
2443 ;;
2444 *-sunos5.3* | *-solaris2.3* )
2445 opsys=sol2-3
2446 NON_GNU_CPP=/usr/ccs/lib/cpp
2447 ;;
2448 *-sunos5.4* | *-solaris2.4* )
2449 opsys=sol2-4
2450 NON_GNU_CPP=/usr/ccs/lib/cpp
2451 RANLIB="ar -ts"
2452 ;;
2453 *-sunos5.5* | *-solaris2.5* )
2454 opsys=sol2-5
2455 NON_GNU_CPP=/usr/ccs/lib/cpp
2456 RANLIB="ar -ts"
2457 ;;
8e967cf7
MR
2458 *-sunos5.6* | *-solaris2.6* )
2459 opsys=sol2-6
2460 NON_GNU_CPP=/usr/ccs/lib/cpp
2461 RANLIB="ar -ts"
2462 ;;
ba4481b5 2463 *-sunos5* | *-solaris* )
9e71690e 2464 opsys=sol2-6
ba4481b5
DL
2465 NON_GNU_CPP=/usr/ccs/lib/cpp
2466 ;;
2467 * ) opsys=bsd4-2 ;;
2468 esac
2469 ## Watch out for a compiler that we know will not work.
2470 case "${canonical}" in
2471 *-solaris* | *-sunos5* )
2472 if [ "x$CC" = x/usr/ucb/cc ]; then
2473 ## /usr/ucb/cc doesn't work;
2474 ## we should find some other compiler that does work.
2475 unset CC
2476 fi
2477 ;;
2478 *) ;;
2479 esac
2480 ;;
2481 sparc-*-nextstep* )
2482 machine=sparc opsys=nextstep
2483 ;;
2484
2485 ## Tadpole 68k
2486 m68*-tadpole-sysv* )
2487 machine=tad68k opsys=usg5-3
2488 ;;
2489
2490 ## Tahoe machines
2491 tahoe-tahoe-bsd4.2* )
2492 machine=tahoe opsys=bsd4-2
2493 ;;
2494 tahoe-tahoe-bsd4.3* )
2495 machine=tahoe opsys=bsd4-3
2496 ;;
2497
2498 ## Tandem Integrity S2
2499 mips-tandem-sysv* )
2500 machine=tandem-s2 opsys=usg5-3
2501 ;;
2502
2503 ## Tektronix XD88
2504 m88k-tektronix-sysv3* )
2505 machine=tekxd88 opsys=usg5-3
2506 ;;
2507
2508 ## Tektronix 16000 box (6130?)
2509 ns16k-tektronix-bsd* )
2510 machine=ns16000 opsys=bsd4-2
2511 ;;
2512 ## Tektronix 4300
2513 ## src/m/tek4300.h hints that this is a m68k machine.
2514 m68*-tektronix-bsd* )
2515 machine=tek4300 opsys=bsd4-3
2516 ;;
2517
2518 ## Titan P2 or P3
2519 ## We seem to have lost the machine-description file titan.h!
2520 titan-titan-sysv* )
2521 machine=titan opsys=usg5-3
2522 ;;
2523
2524 ## Ustation E30 (SS5E)
2525 m68*-unisys-uniplus* )
2526 machine=ustation opsystem=unipl5-2
2527 ;;
2528
2529 ## Vaxen.
2530 vax-dec-* )
2531 machine=vax
2532 case "${canonical}" in
2533 *-bsd4.1* ) opsys=bsd4-1 ;;
2534 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
2535 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
2536 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
2537 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
2538 *-vms* ) opsys=vms ;;
2539 * ) unported=yes
2540 esac
2541 ;;
2542
2543 ## Whitechapel MG1
2544 ns16k-whitechapel-* )
2545 machine=mg1
2546 ## We don't know what sort of OS runs on these; we'll let the
2547 ## operating system guessing code below try.
2548 ;;
2549
2550 ## Wicat
2551 m68*-wicat-sysv* )
2552 machine=wicat opsys=usg5-2
2553 ;;
2554
f4988be7
GM
2555 ## IA-64
2556 ia64*-*-linux* )
2557 machine=ia64 opsys=gnu-linux
2558 ;;
2559
ba4481b5
DL
2560 ## Intel 386 machines where we don't care about the manufacturer
2561 i[3456]86-*-* )
2562 machine=intel386
2563 case "${canonical}" in
c60ee5e7 2564 *-cygwin ) opsys=cygwin ;;
23fd4483
ST
2565 *-darwin ) opsys=darwin
2566 CPP="${CC-cc} -E -no-cpp-precomp"
2567 ;;
9f817ea4 2568 *-lynxos* ) opsys=lynxos ;;
ba4481b5
DL
2569 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
2570 *-isc2.2* ) opsys=isc2-2 ;;
2571 *-isc4.0* ) opsys=isc4-0 ;;
2572 *-isc4.* ) opsys=isc4-1
2573 GCC_TEST_OPTIONS=-posix
2574 NON_GCC_TEST_OPTIONS=-Xp
2575 ;;
2576 *-isc* ) opsys=isc3-0 ;;
2577 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
2578 *-esix* ) opsys=esix ;;
2579 *-xenix* ) opsys=xenix ;;
2580 *-linux-gnu* ) opsys=gnu-linux ;;
2581 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 2582 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
2583 NON_GNU_CPP=/lib/cpp
2584 # Prevent -belf from being passed to $CPP.
2585 # /lib/cpp does not accept it.
2586 OVERRIDE_CPPFLAGS=" "
2587 ;;
2588 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
2589 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2590 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5 2591 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
2592 *-nextstep* ) opsys=nextstep ;;
2593 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2594 esac
2595 ;;
2596
2597 ## m68k Linux-based GNU system
2598 m68k-*-linux-gnu* )
2599 machine=m68k opsys=gnu-linux
2600 ;;
2601
2602 ## Mips Linux-based GNU system
cd958eb3 2603 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
2604 machine=mips opsys=gnu-linux
2605 ;;
2606
2607 ## UXP/DS
2608 sparc-fujitsu-sysv4* )
2609 machine=sparc opsys=uxpds
2610 NON_GNU_CPP=/usr/ccs/lib/cpp
2611 RANLIB="ar -ts"
2612 ;;
2613
2614 ## UXP/V
2615 f301-fujitsu-uxpv4.1)
2616 machine=f301 opsys=uxpv
2617 ;;
2618
e0f712ba
AC
2619 ## Darwin / Mac OS X
2620 powerpc-apple-darwin* )
2621 machine=powermac opsys=darwin
2622 # Define CPP as follows to make autoconf work correctly.
2a75d75d 2623 CPP="${CC-cc} -E -no-cpp-precomp"
c14dc0ed
AS
2624 # Use fink packages if available.
2625 if test -d /sw/include && test -d /sw/lib; then
2626 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2627 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2628 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2629 fi
e0f712ba
AC
2630 ;;
2631
598a2813
AS
2632 ## AMD x86-64 Linux-based GNU system
2633 x86_64-*-linux-gnu* )
24b01ec4 2634 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2635 ;;
2636
ba4481b5
DL
2637 * )
2638 unported=yes
2639 ;;
2640esac
2641
2642### If the code above didn't choose an operating system, just choose
2643### an operating system based on the configuration name. You really
2644### only want to use this when you have no idea what the right
2645### operating system is; if you know what operating systems a machine
2646### runs, it's cleaner to make it explicit in the case statement
2647### above.
2648if test x"${opsys}" = x; then
2649 case "${canonical}" in
2650 *-gnu* ) opsys=gnu ;;
2651 *-bsd4.[01] ) opsys=bsd4-1 ;;
2652 *-bsd4.2 ) opsys=bsd4-2 ;;
2653 *-bsd4.3 ) opsys=bsd4-3 ;;
2654 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
2655 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
2656 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
2657 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
2658 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
2659 *-sysv5uw* ) opsys=unixware ;;
2660 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
2661 *-sysv4.1* | *-sysvr4.1* )
2662 NON_GNU_CPP=/usr/lib/cpp
2663 opsys=usg5-4 ;;
2664 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2665 if [ x$NON_GNU_CPP = x ]; then
2666 if [ -f /usr/ccs/lib/cpp ]; then
2667 NON_GNU_CPP=/usr/ccs/lib/cpp
2668 else
2669 NON_GNU_CPP=/lib/cpp
2670 fi
2671 fi
2672 opsys=usg5-4-2 ;;
2673 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2674 * )
2675 unported=yes
2676 ;;
2677 esac
2678fi
2679
c0d27fcc 2680
22044edf 2681
ba4481b5 2682if test $unported = yes; then
c0d27fcc 2683 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2684Check \`etc/MACHINES' for recognized configuration names." >&5
2685echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2686Check \`etc/MACHINES' for recognized configuration names." >&2;}
2687 { (exit 1); exit 1; }; }
ba4481b5
DL
2688fi
2689
2690machfile="m/${machine}.h"
2691opsysfile="s/${opsys}.h"
2692
c0d27fcc 2693
ba4481b5
DL
2694#### Choose a compiler.
2695test -n "$CC" && cc_specified=yes
2696
2697# Save the value of CFLAGS that the user specified.
2698SPECIFIED_CFLAGS="$CFLAGS"
2699
2700case ${with_gcc} in
2701 "yes" ) CC="gcc" GCC=yes ;;
2702 "no" ) : ${CC=cc} ;;
503d2be0
AS
2703 * )
2704esac
2705ac_ext=c
2706ac_cpp='$CPP $CPPFLAGS'
2707ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2708ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2709ac_compiler_gnu=$ac_cv_c_compiler_gnu
2710if test -n "$ac_tool_prefix"; then
2711 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2712set dummy ${ac_tool_prefix}gcc; ac_word=$2
c0d27fcc 2713echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2714echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2715if test "${ac_cv_prog_CC+set}" = set; then
2716 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2717else
2718 if test -n "$CC"; then
2719 ac_cv_prog_CC="$CC" # Let the user override the test.
2720else
c0d27fcc
MR
2721as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2722for as_dir in $PATH
2723do
2724 IFS=$as_save_IFS
2725 test -z "$as_dir" && as_dir=.
2726 for ac_exec_ext in '' $ac_executable_extensions; do
2727 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2728 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2729 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2730 break 2
2731 fi
2732done
503d2be0
AS
2733done
2734
ba4481b5
DL
2735fi
2736fi
503d2be0 2737CC=$ac_cv_prog_CC
ba4481b5 2738if test -n "$CC"; then
c0d27fcc 2739 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2740echo "${ECHO_T}$CC" >&6
2741else
c0d27fcc 2742 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2743echo "${ECHO_T}no" >&6
2744fi
2745
2746fi
2747if test -z "$ac_cv_prog_CC"; then
2748 ac_ct_CC=$CC
2749 # Extract the first word of "gcc", so it can be a program name with args.
2750set dummy gcc; ac_word=$2
c0d27fcc 2751echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2752echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2753if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2754 echo $ECHO_N "(cached) $ECHO_C" >&6
2755else
2756 if test -n "$ac_ct_CC"; then
2757 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2758else
c0d27fcc
MR
2759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2760for as_dir in $PATH
2761do
2762 IFS=$as_save_IFS
2763 test -z "$as_dir" && as_dir=.
2764 for ac_exec_ext in '' $ac_executable_extensions; do
2765 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2766 ac_cv_prog_ac_ct_CC="gcc"
2767 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2768 break 2
2769 fi
2770done
503d2be0
AS
2771done
2772
2773fi
2774fi
2775ac_ct_CC=$ac_cv_prog_ac_ct_CC
2776if test -n "$ac_ct_CC"; then
c0d27fcc 2777 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0 2778echo "${ECHO_T}$ac_ct_CC" >&6
ba4481b5 2779else
c0d27fcc 2780 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2781echo "${ECHO_T}no" >&6
2782fi
2783
2784 CC=$ac_ct_CC
2785else
2786 CC="$ac_cv_prog_CC"
ba4481b5
DL
2787fi
2788
2789if test -z "$CC"; then
503d2be0
AS
2790 if test -n "$ac_tool_prefix"; then
2791 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2792set dummy ${ac_tool_prefix}cc; ac_word=$2
c0d27fcc 2793echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2794echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2795if test "${ac_cv_prog_CC+set}" = set; then
2796 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2797else
2798 if test -n "$CC"; then
2799 ac_cv_prog_CC="$CC" # Let the user override the test.
2800else
c0d27fcc
MR
2801as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2802for as_dir in $PATH
2803do
2804 IFS=$as_save_IFS
2805 test -z "$as_dir" && as_dir=.
2806 for ac_exec_ext in '' $ac_executable_extensions; do
2807 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2808 ac_cv_prog_CC="${ac_tool_prefix}cc"
2809 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2810 break 2
2811 fi
2812done
503d2be0
AS
2813done
2814
2815fi
2816fi
2817CC=$ac_cv_prog_CC
2818if test -n "$CC"; then
c0d27fcc 2819 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2820echo "${ECHO_T}$CC" >&6
2821else
c0d27fcc 2822 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2823echo "${ECHO_T}no" >&6
2824fi
2825
2826fi
2827if test -z "$ac_cv_prog_CC"; then
2828 ac_ct_CC=$CC
2829 # Extract the first word of "cc", so it can be a program name with args.
2830set dummy cc; ac_word=$2
c0d27fcc 2831echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2832echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2833if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2834 echo $ECHO_N "(cached) $ECHO_C" >&6
2835else
2836 if test -n "$ac_ct_CC"; then
2837 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2838else
c0d27fcc
MR
2839as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2840for as_dir in $PATH
2841do
2842 IFS=$as_save_IFS
2843 test -z "$as_dir" && as_dir=.
2844 for ac_exec_ext in '' $ac_executable_extensions; do
2845 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2846 ac_cv_prog_ac_ct_CC="cc"
2847 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2848 break 2
2849 fi
2850done
503d2be0
AS
2851done
2852
2853fi
2854fi
2855ac_ct_CC=$ac_cv_prog_ac_ct_CC
2856if test -n "$ac_ct_CC"; then
c0d27fcc 2857 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
2858echo "${ECHO_T}$ac_ct_CC" >&6
2859else
c0d27fcc 2860 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2861echo "${ECHO_T}no" >&6
2862fi
2863
2864 CC=$ac_ct_CC
2865else
2866 CC="$ac_cv_prog_CC"
2867fi
2868
2869fi
2870if test -z "$CC"; then
2871 # Extract the first word of "cc", so it can be a program name with args.
2872set dummy cc; ac_word=$2
c0d27fcc 2873echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2874echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2875if test "${ac_cv_prog_CC+set}" = set; then
2876 echo $ECHO_N "(cached) $ECHO_C" >&6
2877else
2878 if test -n "$CC"; then
2879 ac_cv_prog_CC="$CC" # Let the user override the test.
2880else
2881 ac_prog_rejected=no
c0d27fcc
MR
2882as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2883for as_dir in $PATH
2884do
2885 IFS=$as_save_IFS
2886 test -z "$as_dir" && as_dir=.
2887 for ac_exec_ext in '' $ac_executable_extensions; do
2888 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2889 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2890 ac_prog_rejected=yes
2891 continue
2892 fi
2893 ac_cv_prog_CC="cc"
2894 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2895 break 2
2896 fi
2897done
503d2be0
AS
2898done
2899
ba4481b5
DL
2900if test $ac_prog_rejected = yes; then
2901 # We found a bogon in the path, so make sure we never use it.
2902 set dummy $ac_cv_prog_CC
2903 shift
503d2be0 2904 if test $# != 0; then
ba4481b5
DL
2905 # We chose a different compiler from the bogus one.
2906 # However, it has the same basename, so the bogon will be chosen
2907 # first if we set CC to just the basename; use the full file name.
2908 shift
6bae0ccf 2909 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
2910 fi
2911fi
2912fi
2913fi
503d2be0 2914CC=$ac_cv_prog_CC
ba4481b5 2915if test -n "$CC"; then
c0d27fcc 2916 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2917echo "${ECHO_T}$CC" >&6
ba4481b5 2918else
c0d27fcc 2919 echo "$as_me:$LINENO: result: no" >&5
503d2be0 2920echo "${ECHO_T}no" >&6
ba4481b5
DL
2921fi
2922
503d2be0
AS
2923fi
2924if test -z "$CC"; then
2925 if test -n "$ac_tool_prefix"; then
2926 for ac_prog in cl
2927 do
2928 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2929set dummy $ac_tool_prefix$ac_prog; ac_word=$2
c0d27fcc 2930echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2931echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2932if test "${ac_cv_prog_CC+set}" = set; then
2933 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2934else
2935 if test -n "$CC"; then
2936 ac_cv_prog_CC="$CC" # Let the user override the test.
2937else
c0d27fcc
MR
2938as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2939for as_dir in $PATH
2940do
2941 IFS=$as_save_IFS
2942 test -z "$as_dir" && as_dir=.
2943 for ac_exec_ext in '' $ac_executable_extensions; do
2944 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2945 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2946 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2947 break 2
2948 fi
2949done
503d2be0
AS
2950done
2951
c4bb2108
DL
2952fi
2953fi
503d2be0 2954CC=$ac_cv_prog_CC
c4bb2108 2955if test -n "$CC"; then
c0d27fcc 2956 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2957echo "${ECHO_T}$CC" >&6
c4bb2108 2958else
c0d27fcc 2959 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2960echo "${ECHO_T}no" >&6
2961fi
2962
2963 test -n "$CC" && break
2964 done
2965fi
2966if test -z "$CC"; then
2967 ac_ct_CC=$CC
2968 for ac_prog in cl
2969do
2970 # Extract the first word of "$ac_prog", so it can be a program name with args.
2971set dummy $ac_prog; ac_word=$2
c0d27fcc 2972echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2973echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2974if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2975 echo $ECHO_N "(cached) $ECHO_C" >&6
2976else
2977 if test -n "$ac_ct_CC"; then
2978 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2979else
c0d27fcc
MR
2980as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2981for as_dir in $PATH
2982do
2983 IFS=$as_save_IFS
2984 test -z "$as_dir" && as_dir=.
2985 for ac_exec_ext in '' $ac_executable_extensions; do
2986 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2987 ac_cv_prog_ac_ct_CC="$ac_prog"
2988 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2989 break 2
2990 fi
2991done
503d2be0
AS
2992done
2993
c4bb2108 2994fi
503d2be0
AS
2995fi
2996ac_ct_CC=$ac_cv_prog_ac_ct_CC
2997if test -n "$ac_ct_CC"; then
c0d27fcc 2998 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
2999echo "${ECHO_T}$ac_ct_CC" >&6
3000else
c0d27fcc 3001 echo "$as_me:$LINENO: result: no" >&5
503d2be0 3002echo "${ECHO_T}no" >&6
ba4481b5
DL
3003fi
3004
503d2be0
AS
3005 test -n "$ac_ct_CC" && break
3006done
ba4481b5 3007
503d2be0
AS
3008 CC=$ac_ct_CC
3009fi
3010
3011fi
ba4481b5 3012
c0d27fcc 3013
19650fd6
AS
3014test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3015See \`config.log' for more details." >&5
3016echo "$as_me: error: no acceptable C compiler found in \$PATH
3017See \`config.log' for more details." >&2;}
503d2be0 3018 { (exit 1); exit 1; }; }
c4bb2108 3019
503d2be0 3020# Provide some information about the compiler.
c0d27fcc 3021echo "$as_me:$LINENO:" \
503d2be0
AS
3022 "checking for C compiler version" >&5
3023ac_compiler=`set X $ac_compile; echo $2`
c0d27fcc 3024{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
503d2be0
AS
3025 (eval $ac_compiler --version </dev/null >&5) 2>&5
3026 ac_status=$?
c0d27fcc 3027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3028 (exit $ac_status); }
c0d27fcc 3029{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
503d2be0
AS
3030 (eval $ac_compiler -v </dev/null >&5) 2>&5
3031 ac_status=$?
c0d27fcc 3032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3033 (exit $ac_status); }
c0d27fcc 3034{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
503d2be0
AS
3035 (eval $ac_compiler -V </dev/null >&5) 2>&5
3036 ac_status=$?
c0d27fcc 3037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3038 (exit $ac_status); }
3039
3040cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3041/* confdefs.h. */
3042_ACEOF
3043cat confdefs.h >>conftest.$ac_ext
3044cat >>conftest.$ac_ext <<_ACEOF
3045/* end confdefs.h. */
c4bb2108 3046
503d2be0
AS
3047int
3048main ()
3049{
3050
3051 ;
3052 return 0;
3053}
3054_ACEOF
3055ac_clean_files_save=$ac_clean_files
19650fd6 3056ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3057# Try to create an executable without -o first, disregard a.out.
3058# It will help us diagnose broken compilers, and finding out an intuition
3059# of exeext.
edfaf76d
LK
3060echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3061echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
503d2be0 3062ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
c0d27fcc 3063if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
503d2be0
AS
3064 (eval $ac_link_default) 2>&5
3065 ac_status=$?
c0d27fcc 3066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3067 (exit $ac_status); }; then
3068 # Find the output, starting from the most likely. This scheme is
3069# not robust to junk in `.', hence go to wildcards (a.*) only as a last
3070# resort.
c0d27fcc
MR
3071
3072# Be careful to initialize this variable, since it used to be cached.
3073# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
3074ac_cv_exeext=
19650fd6
AS
3075# b.out is created by i960 compilers.
3076for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
3077do
6bae0ccf 3078 test -f "$ac_file" || continue
503d2be0 3079 case $ac_file in
19650fd6 3080 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
edfaf76d 3081 ;;
19650fd6 3082 conftest.$ac_ext )
edfaf76d
LK
3083 # This is the source file.
3084 ;;
19650fd6 3085 [ab].out )
edfaf76d
LK
3086 # We found the default executable, but exeext='' is most
3087 # certainly right.
3088 break;;
19650fd6 3089 *.* )
edfaf76d
LK
3090 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3091 # FIXME: I believe we export ac_cv_exeext for Libtool,
3092 # but it would be cool to find out if it's true. Does anybody
3093 # maintain Libtool? --akim.
3094 export ac_cv_exeext
3095 break;;
19650fd6 3096 * )
edfaf76d 3097 break;;
503d2be0
AS
3098 esac
3099done
3100else
3101 echo "$as_me: failed program was:" >&5
19650fd6
AS
3102sed 's/^/| /' conftest.$ac_ext >&5
3103
6bae0ccf 3104{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3105See \`config.log' for more details." >&5
6bae0ccf 3106echo "$as_me: error: C compiler cannot create executables
19650fd6 3107See \`config.log' for more details." >&2;}
503d2be0
AS
3108 { (exit 77); exit 77; }; }
3109fi
3110
3111ac_exeext=$ac_cv_exeext
c0d27fcc 3112echo "$as_me:$LINENO: result: $ac_file" >&5
503d2be0
AS
3113echo "${ECHO_T}$ac_file" >&6
3114
3115# Check the compiler produces executables we can run. If not, either
3116# the compiler is broken, or we cross compile.
c0d27fcc 3117echo "$as_me:$LINENO: checking whether the C compiler works" >&5
503d2be0
AS
3118echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
3119# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3120# If not cross compiling, check that we can run a simple program.
3121if test "$cross_compiling" != yes; then
3122 if { ac_try='./$ac_file'
c0d27fcc 3123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3124 (eval $ac_try) 2>&5
3125 ac_status=$?
c0d27fcc 3126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3127 (exit $ac_status); }; }; then
3128 cross_compiling=no
ba4481b5 3129 else
503d2be0
AS
3130 if test "$cross_compiling" = maybe; then
3131 cross_compiling=yes
3132 else
c0d27fcc 3133 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3134If you meant to cross compile, use \`--host'.
3135See \`config.log' for more details." >&5
503d2be0 3136echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3137If you meant to cross compile, use \`--host'.
3138See \`config.log' for more details." >&2;}
503d2be0
AS
3139 { (exit 1); exit 1; }; }
3140 fi
ba4481b5 3141 fi
503d2be0 3142fi
c0d27fcc 3143echo "$as_me:$LINENO: result: yes" >&5
503d2be0
AS
3144echo "${ECHO_T}yes" >&6
3145
19650fd6 3146rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0
AS
3147ac_clean_files=$ac_clean_files_save
3148# Check the compiler produces executables we can run. If not, either
3149# the compiler is broken, or we cross compile.
c0d27fcc 3150echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
503d2be0 3151echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
c0d27fcc 3152echo "$as_me:$LINENO: result: $cross_compiling" >&5
503d2be0
AS
3153echo "${ECHO_T}$cross_compiling" >&6
3154
c0d27fcc
MR
3155echo "$as_me:$LINENO: checking for suffix of executables" >&5
3156echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
3157if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
3158 (eval $ac_link) 2>&5
3159 ac_status=$?
c0d27fcc 3160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3161 (exit $ac_status); }; then
3162 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3163# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3164# work properly (i.e., refer to `conftest.exe'), while it won't with
3165# `rm'.
6bae0ccf
DL
3166for ac_file in conftest.exe conftest conftest.*; do
3167 test -f "$ac_file" || continue
503d2be0 3168 case $ac_file in
6bae0ccf 3169 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
503d2be0 3170 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d
LK
3171 export ac_cv_exeext
3172 break;;
503d2be0
AS
3173 * ) break;;
3174 esac
3175done
ba4481b5 3176else
19650fd6
AS
3177 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3178See \`config.log' for more details." >&5
3179echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3180See \`config.log' for more details." >&2;}
503d2be0 3181 { (exit 1); exit 1; }; }
ba4481b5 3182fi
ba4481b5 3183
503d2be0 3184rm -f conftest$ac_cv_exeext
c0d27fcc 3185echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
503d2be0 3186echo "${ECHO_T}$ac_cv_exeext" >&6
ba4481b5 3187
503d2be0
AS
3188rm -f conftest.$ac_ext
3189EXEEXT=$ac_cv_exeext
3190ac_exeext=$EXEEXT
c0d27fcc
MR
3191echo "$as_me:$LINENO: checking for suffix of object files" >&5
3192echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
503d2be0
AS
3193if test "${ac_cv_objext+set}" = set; then
3194 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3195else
503d2be0 3196 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3197/* confdefs.h. */
3198_ACEOF
3199cat confdefs.h >>conftest.$ac_ext
3200cat >>conftest.$ac_ext <<_ACEOF
3201/* end confdefs.h. */
ba4481b5 3202
503d2be0
AS
3203int
3204main ()
3205{
ba4481b5 3206
503d2be0
AS
3207 ;
3208 return 0;
3209}
3210_ACEOF
3211rm -f conftest.o conftest.obj
c0d27fcc 3212if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3213 (eval $ac_compile) 2>&5
3214 ac_status=$?
c0d27fcc 3215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3216 (exit $ac_status); }; then
3217 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
3218 case $ac_file in
6bae0ccf 3219 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
503d2be0
AS
3220 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3221 break;;
3222 esac
3223done
c4bb2108 3224else
503d2be0 3225 echo "$as_me: failed program was:" >&5
19650fd6
AS
3226sed 's/^/| /' conftest.$ac_ext >&5
3227
3228{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3229See \`config.log' for more details." >&5
3230echo "$as_me: error: cannot compute suffix of object files: cannot compile
3231See \`config.log' for more details." >&2;}
503d2be0 3232 { (exit 1); exit 1; }; }
c4bb2108
DL
3233fi
3234
503d2be0
AS
3235rm -f conftest.$ac_cv_objext conftest.$ac_ext
3236fi
c0d27fcc 3237echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
503d2be0
AS
3238echo "${ECHO_T}$ac_cv_objext" >&6
3239OBJEXT=$ac_cv_objext
3240ac_objext=$OBJEXT
c0d27fcc 3241echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
503d2be0
AS
3242echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
3243if test "${ac_cv_c_compiler_gnu+set}" = set; then
3244 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3245else
503d2be0 3246 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3247/* confdefs.h. */
3248_ACEOF
3249cat confdefs.h >>conftest.$ac_ext
3250cat >>conftest.$ac_ext <<_ACEOF
3251/* end confdefs.h. */
503d2be0
AS
3252
3253int
3254main ()
3255{
3256#ifndef __GNUC__
3257 choke me
3258#endif
3259
3260 ;
3261 return 0;
3262}
3263_ACEOF
3264rm -f conftest.$ac_objext
c0d27fcc 3265if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3266 (eval $ac_compile) 2>conftest.er1
503d2be0 3267 ac_status=$?
edfaf76d
LK
3268 grep -v '^ *+' conftest.er1 >conftest.err
3269 rm -f conftest.er1
3270 cat conftest.err >&5
c0d27fcc 3271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3272 (exit $ac_status); } &&
edfaf76d
LK
3273 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3275 (eval $ac_try) 2>&5
3276 ac_status=$?
3277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3278 (exit $ac_status); }; } &&
3279 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3281 (eval $ac_try) 2>&5
3282 ac_status=$?
c0d27fcc 3283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3284 (exit $ac_status); }; }; then
3285 ac_compiler_gnu=yes
3286else
3287 echo "$as_me: failed program was:" >&5
19650fd6
AS
3288sed 's/^/| /' conftest.$ac_ext >&5
3289
503d2be0
AS
3290ac_compiler_gnu=no
3291fi
edfaf76d 3292rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3293ac_cv_c_compiler_gnu=$ac_compiler_gnu
3294
3295fi
c0d27fcc 3296echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
503d2be0
AS
3297echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
3298GCC=`test $ac_compiler_gnu = yes && echo yes`
3299ac_test_CFLAGS=${CFLAGS+set}
3300ac_save_CFLAGS=$CFLAGS
3301CFLAGS="-g"
c0d27fcc 3302echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
503d2be0
AS
3303echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
3304if test "${ac_cv_prog_cc_g+set}" = set; then
3305 echo $ECHO_N "(cached) $ECHO_C" >&6
3306else
3307 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3308/* confdefs.h. */
3309_ACEOF
3310cat confdefs.h >>conftest.$ac_ext
3311cat >>conftest.$ac_ext <<_ACEOF
3312/* end confdefs.h. */
503d2be0
AS
3313
3314int
3315main ()
3316{
3317
3318 ;
3319 return 0;
3320}
3321_ACEOF
3322rm -f conftest.$ac_objext
c0d27fcc 3323if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3324 (eval $ac_compile) 2>conftest.er1
503d2be0 3325 ac_status=$?
edfaf76d
LK
3326 grep -v '^ *+' conftest.er1 >conftest.err
3327 rm -f conftest.er1
3328 cat conftest.err >&5
c0d27fcc 3329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3330 (exit $ac_status); } &&
edfaf76d
LK
3331 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3333 (eval $ac_try) 2>&5
3334 ac_status=$?
3335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3336 (exit $ac_status); }; } &&
3337 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3339 (eval $ac_try) 2>&5
3340 ac_status=$?
c0d27fcc 3341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3342 (exit $ac_status); }; }; then
ba4481b5
DL
3343 ac_cv_prog_cc_g=yes
3344else
503d2be0 3345 echo "$as_me: failed program was:" >&5
19650fd6
AS
3346sed 's/^/| /' conftest.$ac_ext >&5
3347
503d2be0 3348ac_cv_prog_cc_g=no
ba4481b5 3349fi
edfaf76d 3350rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 3351fi
c0d27fcc 3352echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
503d2be0 3353echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c4bb2108 3354if test "$ac_test_CFLAGS" = set; then
503d2be0 3355 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
3356elif test $ac_cv_prog_cc_g = yes; then
3357 if test "$GCC" = yes; then
ba4481b5
DL
3358 CFLAGS="-g -O2"
3359 else
c4bb2108 3360 CFLAGS="-g"
ba4481b5 3361 fi
22afa6e8 3362else
c4bb2108
DL
3363 if test "$GCC" = yes; then
3364 CFLAGS="-O2"
3365 else
3366 CFLAGS=
3367 fi
ba4481b5 3368fi
6bae0ccf
DL
3369echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
3370echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3371if test "${ac_cv_prog_cc_stdc+set}" = set; then
3372 echo $ECHO_N "(cached) $ECHO_C" >&6
3373else
3374 ac_cv_prog_cc_stdc=no
3375ac_save_CC=$CC
3376cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3377/* confdefs.h. */
3378_ACEOF
3379cat confdefs.h >>conftest.$ac_ext
3380cat >>conftest.$ac_ext <<_ACEOF
3381/* end confdefs.h. */
6bae0ccf
DL
3382#include <stdarg.h>
3383#include <stdio.h>
3384#include <sys/types.h>
3385#include <sys/stat.h>
3386/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3387struct buf { int x; };
3388FILE * (*rcsopen) (struct buf *, struct stat *, int);
3389static char *e (p, i)
3390 char **p;
3391 int i;
3392{
3393 return p[i];
3394}
3395static char *f (char * (*g) (char **, int), char **p, ...)
3396{
3397 char *s;
3398 va_list v;
3399 va_start (v,p);
3400 s = g (p, va_arg (v,int));
3401 va_end (v);
3402 return s;
3403}
edfaf76d
LK
3404
3405/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3406 function prototypes and stuff, but not '\xHH' hex character constants.
3407 These don't provoke an error unfortunately, instead are silently treated
3408 as 'x'. The following induces an error, until -std1 is added to get
3409 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3410 array size at least. It's necessary to write '\x00'==0 to get something
3411 that's true only with -std1. */
3412int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3413
6bae0ccf
DL
3414int test (int i, double x);
3415struct s1 {int (*f) (int a);};
3416struct s2 {int (*f) (double a);};
3417int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3418int argc;
3419char **argv;
3420int
3421main ()
3422{
3423return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3424 ;
3425 return 0;
3426}
3427_ACEOF
3428# Don't try gcc -ansi; that turns off useful extensions and
3429# breaks some systems' header files.
3430# AIX -qlanglvl=ansi
3431# Ultrix and OSF/1 -std1
3432# HP-UX 10.20 and later -Ae
3433# HP-UX older versions -Aa -D_HPUX_SOURCE
3434# SVR4 -Xc -D__EXTENSIONS__
3435for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3436do
3437 CC="$ac_save_CC $ac_arg"
3438 rm -f conftest.$ac_objext
3439if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3440 (eval $ac_compile) 2>conftest.er1
6bae0ccf 3441 ac_status=$?
edfaf76d
LK
3442 grep -v '^ *+' conftest.er1 >conftest.err
3443 rm -f conftest.er1
3444 cat conftest.err >&5
6bae0ccf
DL
3445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3446 (exit $ac_status); } &&
edfaf76d
LK
3447 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3449 (eval $ac_try) 2>&5
3450 ac_status=$?
3451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3452 (exit $ac_status); }; } &&
3453 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
3454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3455 (eval $ac_try) 2>&5
3456 ac_status=$?
3457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3458 (exit $ac_status); }; }; then
3459 ac_cv_prog_cc_stdc=$ac_arg
3460break
3461else
3462 echo "$as_me: failed program was:" >&5
19650fd6
AS
3463sed 's/^/| /' conftest.$ac_ext >&5
3464
6bae0ccf 3465fi
edfaf76d 3466rm -f conftest.err conftest.$ac_objext
6bae0ccf
DL
3467done
3468rm -f conftest.$ac_ext conftest.$ac_objext
3469CC=$ac_save_CC
3470
3471fi
3472
3473case "x$ac_cv_prog_cc_stdc" in
3474 x|xno)
3475 echo "$as_me:$LINENO: result: none needed" >&5
3476echo "${ECHO_T}none needed" >&6 ;;
3477 *)
3478 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
3479echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3480 CC="$CC $ac_cv_prog_cc_stdc" ;;
3481esac
3482
503d2be0
AS
3483# Some people use a C++ compiler to compile C. Since we use `exit',
3484# in C++ we need to declare it. In case someone uses the same compiler
3485# for both compiling C and C++ we need to have the C++ compiler decide
3486# the declaration of exit, since it's the most demanding environment.
3487cat >conftest.$ac_ext <<_ACEOF
3488#ifndef __cplusplus
3489 choke me
3490#endif
3491_ACEOF
3492rm -f conftest.$ac_objext
c0d27fcc 3493if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3494 (eval $ac_compile) 2>conftest.er1
503d2be0 3495 ac_status=$?
edfaf76d
LK
3496 grep -v '^ *+' conftest.er1 >conftest.err
3497 rm -f conftest.er1
3498 cat conftest.err >&5
c0d27fcc 3499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3500 (exit $ac_status); } &&
edfaf76d
LK
3501 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3503 (eval $ac_try) 2>&5
3504 ac_status=$?
3505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3506 (exit $ac_status); }; } &&
3507 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3509 (eval $ac_try) 2>&5
3510 ac_status=$?
c0d27fcc 3511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3512 (exit $ac_status); }; }; then
3513 for ac_declaration in \
edfaf76d 3514 '' \
503d2be0
AS
3515 'extern "C" void std::exit (int) throw (); using std::exit;' \
3516 'extern "C" void std::exit (int); using std::exit;' \
3517 'extern "C" void exit (int) throw ();' \
3518 'extern "C" void exit (int);' \
cffcede7 3519 'void exit (int);'
503d2be0
AS
3520do
3521 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3522/* confdefs.h. */
3523_ACEOF
3524cat confdefs.h >>conftest.$ac_ext
3525cat >>conftest.$ac_ext <<_ACEOF
3526/* end confdefs.h. */
7c9e5167 3527$ac_declaration
edfaf76d 3528#include <stdlib.h>
503d2be0
AS
3529int
3530main ()
3531{
3532exit (42);
3533 ;
3534 return 0;
3535}
3536_ACEOF
3537rm -f conftest.$ac_objext
c0d27fcc 3538if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3539 (eval $ac_compile) 2>conftest.er1
503d2be0 3540 ac_status=$?
edfaf76d
LK
3541 grep -v '^ *+' conftest.er1 >conftest.err
3542 rm -f conftest.er1
3543 cat conftest.err >&5
c0d27fcc 3544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3545 (exit $ac_status); } &&
edfaf76d
LK
3546 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3548 (eval $ac_try) 2>&5
3549 ac_status=$?
3550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3551 (exit $ac_status); }; } &&
3552 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3554 (eval $ac_try) 2>&5
3555 ac_status=$?
c0d27fcc 3556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3557 (exit $ac_status); }; }; then
3558 :
3559else
3560 echo "$as_me: failed program was:" >&5
19650fd6
AS
3561sed 's/^/| /' conftest.$ac_ext >&5
3562
503d2be0
AS
3563continue
3564fi
edfaf76d 3565rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 3566 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3567/* confdefs.h. */
3568_ACEOF
3569cat confdefs.h >>conftest.$ac_ext
3570cat >>conftest.$ac_ext <<_ACEOF
3571/* end confdefs.h. */
503d2be0
AS
3572$ac_declaration
3573int
3574main ()
3575{
3576exit (42);
3577 ;
3578 return 0;
3579}
3580_ACEOF
3581rm -f conftest.$ac_objext
c0d27fcc 3582if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3583 (eval $ac_compile) 2>conftest.er1
503d2be0 3584 ac_status=$?
edfaf76d
LK
3585 grep -v '^ *+' conftest.er1 >conftest.err
3586 rm -f conftest.er1
3587 cat conftest.err >&5
c0d27fcc 3588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3589 (exit $ac_status); } &&
edfaf76d
LK
3590 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3592 (eval $ac_try) 2>&5
3593 ac_status=$?
3594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3595 (exit $ac_status); }; } &&
3596 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3598 (eval $ac_try) 2>&5
3599 ac_status=$?
c0d27fcc 3600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3601 (exit $ac_status); }; }; then
3602 break
3603else
3604 echo "$as_me: failed program was:" >&5
19650fd6
AS
3605sed 's/^/| /' conftest.$ac_ext >&5
3606
503d2be0 3607fi
edfaf76d 3608rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3609done
3610rm -f conftest*
3611if test -n "$ac_declaration"; then
3612 echo '#ifdef __cplusplus' >>confdefs.h
3613 echo $ac_declaration >>confdefs.h
3614 echo '#endif' >>confdefs.h
3615fi
ba4481b5 3616
503d2be0
AS
3617else
3618 echo "$as_me: failed program was:" >&5
19650fd6
AS
3619sed 's/^/| /' conftest.$ac_ext >&5
3620
503d2be0 3621fi
edfaf76d 3622rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3623ac_ext=c
3624ac_cpp='$CPP $CPPFLAGS'
3625ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3626ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3627ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3628
c0d27fcc 3629
ba4481b5
DL
3630# On Suns, sometimes $CPP names a directory.
3631if test -n "$CPP" && test -d "$CPP"; then
3632 CPP=
3633fi
3634
3635#### Some systems specify a CPP to use unless we are using GCC.
3636#### Now that we know whether we are using GCC, we can decide whether
3637#### to use that one.
3638if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3639then
3640 CPP="$NON_GNU_CPP"
3641fi
3642
3643#### Some systems specify a CC to use unless we are using GCC.
3644#### Now that we know whether we are using GCC, we can decide whether
3645#### to use that one.
3646if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3647 test x$cc_specified != xyes
3648then
3649 CC="$NON_GNU_CC"
3650fi
3651
3652if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3653then
3654 CC="$CC $GCC_TEST_OPTIONS"
3655fi
3656
3657if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3658then
3659 CC="$CC $NON_GCC_TEST_OPTIONS"
3660fi
3661
6a3a24fa 3662#### Some other nice autoconf tests.
ba4481b5 3663
c0d27fcc 3664echo "$as_me:$LINENO: checking whether ln -s works" >&5
503d2be0
AS
3665echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3666LN_S=$as_ln_s
3667if test "$LN_S" = "ln -s"; then
c0d27fcc 3668 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 3669echo "${ECHO_T}yes" >&6
ba4481b5 3670else
c0d27fcc 3671 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
503d2be0 3672echo "${ECHO_T}no, using $LN_S" >&6
ba4481b5
DL
3673fi
3674
503d2be0
AS
3675ac_ext=c
3676ac_cpp='$CPP $CPPFLAGS'
3677ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3678ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3679ac_compiler_gnu=$ac_cv_c_compiler_gnu
c0d27fcc 3680echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
503d2be0 3681echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
ba4481b5
DL
3682# On Suns, sometimes $CPP names a directory.
3683if test -n "$CPP" && test -d "$CPP"; then
3684 CPP=
3685fi
3686if test -z "$CPP"; then
503d2be0
AS
3687 if test "${ac_cv_prog_CPP+set}" = set; then
3688 echo $ECHO_N "(cached) $ECHO_C" >&6
3689else
3690 # Double quotes because CPP needs to be expanded
3691 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3692 do
3693 ac_preproc_ok=false
3694for ac_c_preproc_warn_flag in '' yes
3695do
3696 # Use a header file that comes with gcc, so configuring glibc
3697 # with a fresh cross-compiler works.
19650fd6
AS
3698 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3699 # <limits.h> exists even on freestanding compilers.
ba4481b5 3700 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
3701 # not just through cpp. "Syntax error" is here to catch this case.
3702 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3703/* confdefs.h. */
3704_ACEOF
3705cat confdefs.h >>conftest.$ac_ext
3706cat >>conftest.$ac_ext <<_ACEOF
3707/* end confdefs.h. */
3708#ifdef __STDC__
3709# include <limits.h>
3710#else
3711# include <assert.h>
3712#endif
edfaf76d 3713 Syntax error
503d2be0 3714_ACEOF
c0d27fcc 3715if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3716 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3717 ac_status=$?
6bae0ccf 3718 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3719 rm -f conftest.er1
3720 cat conftest.err >&5
c0d27fcc 3721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3722 (exit $ac_status); } >/dev/null; then
3723 if test -s conftest.err; then
3724 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 3725 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
3726 else
3727 ac_cpp_err=
3728 fi
3729else
3730 ac_cpp_err=yes
3731fi
3732if test -z "$ac_cpp_err"; then
ba4481b5
DL
3733 :
3734else
503d2be0 3735 echo "$as_me: failed program was:" >&5
19650fd6
AS
3736sed 's/^/| /' conftest.$ac_ext >&5
3737
503d2be0
AS
3738 # Broken: fails on valid input.
3739continue
3740fi
3741rm -f conftest.err conftest.$ac_ext
3742
3743 # OK, works on sane cases. Now check whether non-existent headers
3744 # can be detected and how.
3745 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3746/* confdefs.h. */
3747_ACEOF
3748cat confdefs.h >>conftest.$ac_ext
3749cat >>conftest.$ac_ext <<_ACEOF
3750/* end confdefs.h. */
503d2be0
AS
3751#include <ac_nonexistent.h>
3752_ACEOF
c0d27fcc 3753if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3754 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3755 ac_status=$?
6bae0ccf 3756 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3757 rm -f conftest.er1
3758 cat conftest.err >&5
c0d27fcc 3759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3760 (exit $ac_status); } >/dev/null; then
3761 if test -s conftest.err; then
3762 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 3763 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
3764 else
3765 ac_cpp_err=
3766 fi
3767else
3768 ac_cpp_err=yes
3769fi
3770if test -z "$ac_cpp_err"; then
3771 # Broken: success on invalid input.
3772continue
c4bb2108 3773else
503d2be0 3774 echo "$as_me: failed program was:" >&5
19650fd6
AS
3775sed 's/^/| /' conftest.$ac_ext >&5
3776
503d2be0
AS
3777 # Passes both tests.
3778ac_preproc_ok=:
3779break
3780fi
3781rm -f conftest.err conftest.$ac_ext
3782
3783done
3784# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3785rm -f conftest.err conftest.$ac_ext
3786if $ac_preproc_ok; then
3787 break
3788fi
3789
3790 done
3791 ac_cv_prog_CPP=$CPP
3792
3793fi
3794 CPP=$ac_cv_prog_CPP
3795else
3796 ac_cv_prog_CPP=$CPP
3797fi
c0d27fcc 3798echo "$as_me:$LINENO: result: $CPP" >&5
503d2be0
AS
3799echo "${ECHO_T}$CPP" >&6
3800ac_preproc_ok=false
3801for ac_c_preproc_warn_flag in '' yes
3802do
3803 # Use a header file that comes with gcc, so configuring glibc
3804 # with a fresh cross-compiler works.
19650fd6
AS
3805 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3806 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
3807 # On the NeXT, cc -E runs the code through the compiler's parser,
3808 # not just through cpp. "Syntax error" is here to catch this case.
3809 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3810/* confdefs.h. */
3811_ACEOF
3812cat confdefs.h >>conftest.$ac_ext
3813cat >>conftest.$ac_ext <<_ACEOF
3814/* end confdefs.h. */
3815#ifdef __STDC__
3816# include <limits.h>
3817#else
3818# include <assert.h>
3819#endif
edfaf76d 3820 Syntax error
503d2be0 3821_ACEOF
c0d27fcc 3822if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3823 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3824 ac_status=$?
6bae0ccf 3825 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3826 rm -f conftest.er1
3827 cat conftest.err >&5
c0d27fcc 3828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3829 (exit $ac_status); } >/dev/null; then
3830 if test -s conftest.err; then
3831 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 3832 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
3833 else
3834 ac_cpp_err=
3835 fi
3836else
3837 ac_cpp_err=yes
3838fi
3839if test -z "$ac_cpp_err"; then
ba4481b5
DL
3840 :
3841else
503d2be0 3842 echo "$as_me: failed program was:" >&5
19650fd6
AS
3843sed 's/^/| /' conftest.$ac_ext >&5
3844
503d2be0
AS
3845 # Broken: fails on valid input.
3846continue
3847fi
3848rm -f conftest.err conftest.$ac_ext
3849
3850 # OK, works on sane cases. Now check whether non-existent headers
3851 # can be detected and how.
3852 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3853/* confdefs.h. */
3854_ACEOF
3855cat confdefs.h >>conftest.$ac_ext
3856cat >>conftest.$ac_ext <<_ACEOF
3857/* end confdefs.h. */
503d2be0
AS
3858#include <ac_nonexistent.h>
3859_ACEOF
c0d27fcc 3860if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3861 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3862 ac_status=$?
6bae0ccf 3863 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3864 rm -f conftest.er1
3865 cat conftest.err >&5
c0d27fcc 3866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3867 (exit $ac_status); } >/dev/null; then
3868 if test -s conftest.err; then
3869 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 3870 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
3871 else
3872 ac_cpp_err=
3873 fi
3874else
3875 ac_cpp_err=yes
c4bb2108 3876fi
503d2be0
AS
3877if test -z "$ac_cpp_err"; then
3878 # Broken: success on invalid input.
3879continue
3880else
3881 echo "$as_me: failed program was:" >&5
19650fd6
AS
3882sed 's/^/| /' conftest.$ac_ext >&5
3883
503d2be0
AS
3884 # Passes both tests.
3885ac_preproc_ok=:
3886break
ba4481b5 3887fi
503d2be0
AS
3888rm -f conftest.err conftest.$ac_ext
3889
3890done
3891# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3892rm -f conftest.err conftest.$ac_ext
3893if $ac_preproc_ok; then
3894 :
ba4481b5 3895else
19650fd6
AS
3896 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3897See \`config.log' for more details." >&5
3898echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3899See \`config.log' for more details." >&2;}
503d2be0 3900 { (exit 1); exit 1; }; }
ba4481b5 3901fi
503d2be0
AS
3902
3903ac_ext=c
3904ac_cpp='$CPP $CPPFLAGS'
3905ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3906ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3907ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
3908
3909# Find a good install program. We prefer a C program (faster),
3910# so one script is as good as another. But avoid the broken or
3911# incompatible versions:
3912# SysV /etc/install, /usr/sbin/install
3913# SunOS /usr/etc/install
3914# IRIX /sbin/install
3915# AIX /bin/install
503d2be0 3916# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 3917# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
3918# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3919# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 3920# OS/2's system install, which has a completely different semantic
ba4481b5 3921# ./install, which can be erroneously created by make from ./install.sh.
c0d27fcc
MR
3922echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3923echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
ba4481b5 3924if test -z "$INSTALL"; then
503d2be0
AS
3925if test "${ac_cv_path_install+set}" = set; then
3926 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3927else
c0d27fcc
MR
3928 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3929for as_dir in $PATH
3930do
3931 IFS=$as_save_IFS
3932 test -z "$as_dir" && as_dir=.
3933 # Account for people who put trailing slashes in PATH elements.
3934case $as_dir/ in
3935 ./ | .// | /cC/* | \
3936 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 3937 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
3938 /usr/ucb/* ) ;;
3939 *)
3940 # OSF1 and SCO ODT 3.0 have their own names for install.
3941 # Don't use installbsd from OSF since it installs stuff as root
3942 # by default.
3943 for ac_prog in ginstall scoinst install; do
3944 for ac_exec_ext in '' $ac_executable_extensions; do
edfaf76d
LK
3945 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3946 if test $ac_prog = install &&
3947 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3948 # AIX install. It has an incompatible calling convention.
3949 :
3950 elif test $ac_prog = install &&
3951 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3952 # program-specific install script used by HP pwplus--don't use.
3953 :
3954 else
3955 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3956 break 3
3957 fi
3958 fi
ba4481b5 3959 done
c0d27fcc
MR
3960 done
3961 ;;
3962esac
3963done
3964
ba4481b5
DL
3965
3966fi
3967 if test "${ac_cv_path_install+set}" = set; then
503d2be0 3968 INSTALL=$ac_cv_path_install
ba4481b5
DL
3969 else
3970 # As a last resort, use the slow shell script. We don't cache a
3971 # path for INSTALL within a source directory, because that will
3972 # break other packages using the cache if that directory is
3973 # removed, or if the path is relative.
503d2be0 3974 INSTALL=$ac_install_sh
ba4481b5
DL
3975 fi
3976fi
c0d27fcc 3977echo "$as_me:$LINENO: result: $INSTALL" >&5
503d2be0 3978echo "${ECHO_T}$INSTALL" >&6
ba4481b5
DL
3979
3980# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3981# It thinks the first close brace ends the variable substitution.
3982test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3983
503d2be0 3984test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 3985
ba4481b5
DL
3986test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3987
c0d27fcc
MR
3988if test "x$RANLIB" = x; then
3989 if test -n "$ac_tool_prefix"; then
3990 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3991set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3992echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0 3993echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
c0d27fcc 3994if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 3995 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
3996else
3997 if test -n "$RANLIB"; then
3998 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3999else
c0d27fcc
MR
4000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4001for as_dir in $PATH
4002do
4003 IFS=$as_save_IFS
4004 test -z "$as_dir" && as_dir=.
4005 for ac_exec_ext in '' $ac_executable_extensions; do
4006 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4007 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4008 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4009 break 2
4010 fi
4011done
503d2be0
AS
4012done
4013
7397acc4
DL
4014fi
4015fi
503d2be0 4016RANLIB=$ac_cv_prog_RANLIB
7397acc4 4017if test -n "$RANLIB"; then
c0d27fcc 4018 echo "$as_me:$LINENO: result: $RANLIB" >&5
503d2be0
AS
4019echo "${ECHO_T}$RANLIB" >&6
4020else
c0d27fcc 4021 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
4022echo "${ECHO_T}no" >&6
4023fi
4024
4025fi
4026if test -z "$ac_cv_prog_RANLIB"; then
4027 ac_ct_RANLIB=$RANLIB
4028 # Extract the first word of "ranlib", so it can be a program name with args.
4029set dummy ranlib; ac_word=$2
c0d27fcc 4030echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
4031echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4032if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4033 echo $ECHO_N "(cached) $ECHO_C" >&6
4034else
4035 if test -n "$ac_ct_RANLIB"; then
4036 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4037else
c0d27fcc
MR
4038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4039for as_dir in $PATH
4040do
4041 IFS=$as_save_IFS
4042 test -z "$as_dir" && as_dir=.
4043 for ac_exec_ext in '' $ac_executable_extensions; do
4044 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4045 ac_cv_prog_ac_ct_RANLIB="ranlib"
4046 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4047 break 2
4048 fi
4049done
503d2be0
AS
4050done
4051
4052 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4053fi
4054fi
4055ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4056if test -n "$ac_ct_RANLIB"; then
c0d27fcc 4057 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
503d2be0
AS
4058echo "${ECHO_T}$ac_ct_RANLIB" >&6
4059else
c0d27fcc 4060 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
4061echo "${ECHO_T}no" >&6
4062fi
4063
4064 RANLIB=$ac_ct_RANLIB
7397acc4 4065else
503d2be0 4066 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
4067fi
4068
4069fi
9e71690e
DK
4070# Extract the first word of "install-info", so it can be a program name with args.
4071set dummy install-info; ac_word=$2
4072echo "$as_me:$LINENO: checking for $ac_word" >&5
4073echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4074if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4075 echo $ECHO_N "(cached) $ECHO_C" >&6
4076else
4077 case $INSTALL_INFO in
4078 [\\/]* | ?:[\\/]*)
4079 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4080 ;;
4081 *)
4082 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4083for as_dir in $PATH
4084do
4085 IFS=$as_save_IFS
4086 test -z "$as_dir" && as_dir=.
4087 for ac_exec_ext in '' $ac_executable_extensions; do
4088 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4089 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4090 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4091 break 2
4092 fi
4093done
4094done
4095
4096 ;;
4097esac
4098fi
4099INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4100
4101if test -n "$INSTALL_INFO"; then
4102 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4103echo "${ECHO_T}$INSTALL_INFO" >&6
4104else
4105 echo "$as_me:$LINENO: result: no" >&5
4106echo "${ECHO_T}no" >&6
4107fi
4108
4109# Extract the first word of "install-info", so it can be a program name with args.
4110set dummy install-info; ac_word=$2
4111echo "$as_me:$LINENO: checking for $ac_word" >&5
4112echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4113if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4114 echo $ECHO_N "(cached) $ECHO_C" >&6
4115else
4116 case $INSTALL_INFO in
4117 [\\/]* | ?:[\\/]*)
4118 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4119 ;;
4120 *)
4121 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4122for as_dir in /usr/sbin
4123do
4124 IFS=$as_save_IFS
4125 test -z "$as_dir" && as_dir=.
4126 for ac_exec_ext in '' $ac_executable_extensions; do
4127 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4128 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4129 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4130 break 2
4131 fi
4132done
4133done
4134
4135 ;;
4136esac
4137fi
4138INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4139
4140if test -n "$INSTALL_INFO"; then
4141 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4142echo "${ECHO_T}$INSTALL_INFO" >&6
4143else
4144 echo "$as_me:$LINENO: result: no" >&5
4145echo "${ECHO_T}no" >&6
4146fi
4147
4148# Extract the first word of "install-info", so it can be a program name with args.
4149set dummy install-info; ac_word=$2
4150echo "$as_me:$LINENO: checking for $ac_word" >&5
4151echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4152if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4153 echo $ECHO_N "(cached) $ECHO_C" >&6
4154else
4155 case $INSTALL_INFO in
4156 [\\/]* | ?:[\\/]*)
4157 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4158 ;;
4159 *)
4160 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4161for as_dir in /sbin
4162do
4163 IFS=$as_save_IFS
4164 test -z "$as_dir" && as_dir=.
4165 for ac_exec_ext in '' $ac_executable_extensions; do
4166 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4167 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4168 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4169 break 2
4170 fi
4171done
4172done
4173
4174 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
4175 ;;
4176esac
4177fi
4178INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4179
4180if test -n "$INSTALL_INFO"; then
4181 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4182echo "${ECHO_T}$INSTALL_INFO" >&6
4183else
4184 echo "$as_me:$LINENO: result: no" >&5
4185echo "${ECHO_T}no" >&6
4186fi
4187
ba4481b5 4188
c0d27fcc 4189
8e967cf7
MR
4190if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
4191then
4192 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
4193fi
4194
4195if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
4196then
4197 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
4198fi
4199
c0d27fcc 4200
fe239f0f 4201late_LDFLAGS=$LDFLAGS
4af002d6 4202if test "$GCC" = yes; then
fe239f0f
AS
4203 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
4204else
4205 LDFLAGS="$LDFLAGS -znocombreloc"
4206fi
4207
edfaf76d
LK
4208echo "$as_me:$LINENO: checking for -znocombreloc" >&5
4209echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6
fe239f0f
AS
4210
4211cat >conftest.$ac_ext <<_ACEOF
4212main(){return 0;}
4213_ACEOF
4214rm -f conftest.$ac_objext conftest$ac_exeext
4215if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 4216 (eval $ac_link) 2>conftest.er1
fe239f0f 4217 ac_status=$?
edfaf76d
LK
4218 grep -v '^ *+' conftest.er1 >conftest.err
4219 rm -f conftest.er1
4220 cat conftest.err >&5
fe239f0f
AS
4221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4222 (exit $ac_status); } &&
edfaf76d
LK
4223 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4225 (eval $ac_try) 2>&5
4226 ac_status=$?
4227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4228 (exit $ac_status); }; } &&
4229 { ac_try='test -s conftest$ac_exeext'
fe239f0f
AS
4230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4231 (eval $ac_try) 2>&5
4232 ac_status=$?
4233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4234 (exit $ac_status); }; }; then
4235 echo "$as_me:$LINENO: result: yes" >&5
4236echo "${ECHO_T}yes" >&6
4237else
4238 echo "$as_me: failed program was:" >&5
4239sed 's/^/| /' conftest.$ac_ext >&5
4240
4241LDFLAGS=$late_LDFLAGS
4242 echo "$as_me:$LINENO: result: no" >&5
4243echo "${ECHO_T}no" >&6
4244fi
edfaf76d
LK
4245rm -f conftest.err conftest.$ac_objext \
4246 conftest$ac_exeext conftest.$ac_ext
fe239f0f 4247
c0d27fcc 4248
6bae0ccf
DL
4249echo "$as_me:$LINENO: checking for egrep" >&5
4250echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4251if test "${ac_cv_prog_egrep+set}" = set; then
4252 echo $ECHO_N "(cached) $ECHO_C" >&6
4253else
4254 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4255 then ac_cv_prog_egrep='grep -E'
4256 else ac_cv_prog_egrep='egrep'
4257 fi
4258fi
4259echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4260echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4261 EGREP=$ac_cv_prog_egrep
4262
4263
c0d27fcc
MR
4264
4265echo "$as_me:$LINENO: checking for AIX" >&5
503d2be0
AS
4266echo $ECHO_N "checking for AIX... $ECHO_C" >&6
4267cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4268/* confdefs.h. */
4269_ACEOF
4270cat confdefs.h >>conftest.$ac_ext
4271cat >>conftest.$ac_ext <<_ACEOF
4272/* end confdefs.h. */
ba4481b5
DL
4273#ifdef _AIX
4274 yes
4275#endif
4276
503d2be0 4277_ACEOF
ba4481b5 4278if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4279 $EGREP "yes" >/dev/null 2>&1; then
c0d27fcc 4280 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 4281echo "${ECHO_T}yes" >&6
c0d27fcc 4282cat >>confdefs.h <<\_ACEOF
ba4481b5 4283#define _ALL_SOURCE 1
c0d27fcc 4284_ACEOF
ba4481b5
DL
4285
4286else
c0d27fcc 4287 echo "$as_me:$LINENO: result: no" >&5
503d2be0 4288echo "${ECHO_T}no" >&6
ba4481b5
DL
4289fi
4290rm -f conftest*
4291
c0d27fcc
MR
4292
4293
4489ece2 4294
3b33a005
DL
4295#### Extract some information from the operating system and machine files.
4296
c0d27fcc 4297{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 4298 - which libraries the lib-src programs will want, and
503d2be0
AS
4299 - whether the GNU malloc routines are usable..." >&5
4300echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 4301 - which libraries the lib-src programs will want, and
503d2be0 4302 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
4303
4304### First figure out CFLAGS (which we use for running the compiler here)
4305### and REAL_CFLAGS (which we use for real compilation).
4306### The two are the same except on a few systems, where they are made
4307### different to work around various lossages. For example,
4308### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
4309### as implying static linking.
4310
4311### If the CFLAGS env var is specified, we use that value
4312### instead of the default.
4313
4314### It's not important that this name contain the PID; you can't run
4315### two configures in the same directory and have anything work
4316### anyway.
4317tempcname="conftest.c"
4318
4319echo '
4320#include "'${srcdir}'/src/'${opsysfile}'"
4321#include "'${srcdir}'/src/'${machfile}'"
4322#ifndef LIBS_MACHINE
4323#define LIBS_MACHINE
4324#endif
4325#ifndef LIBS_SYSTEM
4326#define LIBS_SYSTEM
4327#endif
4328#ifndef C_SWITCH_SYSTEM
4329#define C_SWITCH_SYSTEM
4330#endif
4331#ifndef C_SWITCH_MACHINE
4332#define C_SWITCH_MACHINE
4333#endif
4334configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
4335configure___ c_switch_system=C_SWITCH_SYSTEM
4336configure___ c_switch_machine=C_SWITCH_MACHINE
4337
4338#ifndef LIB_X11_LIB
4339#define LIB_X11_LIB -lX11
4340#endif
4341
4342#ifndef LIBX11_MACHINE
4343#define LIBX11_MACHINE
4344#endif
4345
4346#ifndef LIBX11_SYSTEM
4347#define LIBX11_SYSTEM
4348#endif
4349configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
4350
4351#ifdef UNEXEC
4352configure___ unexec=UNEXEC
4353#else
4354configure___ unexec=unexec.o
4355#endif
4356
4357#ifdef SYSTEM_MALLOC
4358configure___ system_malloc=yes
4359#else
4360configure___ system_malloc=no
4361#endif
4362
ef9e4345
GM
4363#ifdef USE_MMAP_FOR_BUFFERS
4364configure___ use_mmap_for_buffers=yes
73b77ee5 4365#else
ef9e4345 4366configure___ use_mmap_for_buffers=no
73b77ee5
GM
4367#endif
4368
3b33a005
DL
4369#ifndef C_DEBUG_SWITCH
4370#define C_DEBUG_SWITCH -g
4371#endif
4372
4373#ifndef C_OPTIMIZE_SWITCH
4374#ifdef __GNUC__
4375#define C_OPTIMIZE_SWITCH -O2
4376#else
4377#define C_OPTIMIZE_SWITCH -O
4378#endif
4379#endif
4380
4381#ifndef LD_SWITCH_MACHINE
4382#define LD_SWITCH_MACHINE
4383#endif
4384
4385#ifndef LD_SWITCH_SYSTEM
4386#define LD_SWITCH_SYSTEM
4387#endif
4388
4389#ifndef LD_SWITCH_X_SITE_AUX
4390#define LD_SWITCH_X_SITE_AUX
503d2be0 4391#endif
3b33a005
DL
4392
4393configure___ ld_switch_system=LD_SWITCH_SYSTEM
4394configure___ ld_switch_machine=LD_SWITCH_MACHINE
4395
4396#ifdef THIS_IS_CONFIGURE
4397
4398/* Get the CFLAGS for tests in configure. */
4399#ifdef __GNUC__
4400configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
4401#else
4402configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4403#endif
4404
4405#else /* not THIS_IS_CONFIGURE */
4406
4407/* Get the CFLAGS for real compilation. */
4408#ifdef __GNUC__
4409configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
4410#else
4411configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4412#endif
4413
4414#endif /* not THIS_IS_CONFIGURE */
4415' > ${tempcname}
4416
4417# The value of CPP is a quoted variable reference, so we need to do this
4418# to get its actual value...
4419CPP=`eval "echo $CPP"`
4420eval `${CPP} -Isrc ${tempcname} \
4421 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4422if test "x$SPECIFIED_CFLAGS" = x; then
4423 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
4424 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4425else
4426 REAL_CFLAGS="$CFLAGS"
4427fi
4428rm ${tempcname}
4429
4430ac_link="$ac_link $ld_switch_machine $ld_switch_system"
4431
4432### Make sure subsequent tests use flags consistent with the build flags.
4433
4434if test x"${OVERRIDE_CPPFLAGS}" != x; then
4435 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
4436else
4437 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
4438fi
4439
6bae0ccf
DL
4440
4441
22044edf
DL
4442
4443cat >>confdefs.h <<\_ACEOF
4444#define _GNU_SOURCE 1
4445_ACEOF
4446
4447
4448
503d2be0 4449# Check whether --enable-largefile or --disable-largefile was given.
f4988be7
GM
4450if test "${enable_largefile+set}" = set; then
4451 enableval="$enable_largefile"
f4988be7 4452
503d2be0
AS
4453fi;
4454if test "$enable_largefile" != no; then
f4988be7 4455
c0d27fcc 4456 echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
503d2be0
AS
4457echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
4458if test "${ac_cv_sys_largefile_CC+set}" = set; then
4459 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4460else
f4988be7 4461 ac_cv_sys_largefile_CC=no
503d2be0
AS
4462 if test "$GCC" != yes; then
4463 ac_save_CC=$CC
4464 while :; do
4465 # IRIX 6.2 and later do not support large files by default,
4466 # so use the C compiler's -n32 option if that helps.
edfaf76d 4467 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4468/* confdefs.h. */
4469_ACEOF
4470cat confdefs.h >>conftest.$ac_ext
4471cat >>conftest.$ac_ext <<_ACEOF
4472/* end confdefs.h. */
f4988be7 4473#include <sys/types.h>
503d2be0
AS
4474 /* Check that off_t can represent 2**63 - 1 correctly.
4475 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4476 since some C++ compilers masquerading as C compilers
4477 incorrectly reject 9223372036854775807. */
4478#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4479 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4480 && LARGE_OFF_T % 2147483647 == 1)
4481 ? 1 : -1];
4482int
4483main ()
4484{
f4988be7 4485
503d2be0
AS
4486 ;
4487 return 0;
4488}
4489_ACEOF
4490 rm -f conftest.$ac_objext
c0d27fcc 4491if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 4492 (eval $ac_compile) 2>conftest.er1
503d2be0 4493 ac_status=$?
edfaf76d
LK
4494 grep -v '^ *+' conftest.er1 >conftest.err
4495 rm -f conftest.er1
4496 cat conftest.err >&5
c0d27fcc 4497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4498 (exit $ac_status); } &&
edfaf76d
LK
4499 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4501 (eval $ac_try) 2>&5
4502 ac_status=$?
4503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4504 (exit $ac_status); }; } &&
4505 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4507 (eval $ac_try) 2>&5
4508 ac_status=$?
c0d27fcc 4509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4510 (exit $ac_status); }; }; then
4511 break
b192d653 4512else
503d2be0 4513 echo "$as_me: failed program was:" >&5
19650fd6
AS
4514sed 's/^/| /' conftest.$ac_ext >&5
4515
503d2be0 4516fi
edfaf76d 4517rm -f conftest.err conftest.$ac_objext
503d2be0
AS
4518 CC="$CC -n32"
4519 rm -f conftest.$ac_objext
c0d27fcc 4520if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 4521 (eval $ac_compile) 2>conftest.er1
503d2be0 4522 ac_status=$?
edfaf76d
LK
4523 grep -v '^ *+' conftest.er1 >conftest.err
4524 rm -f conftest.er1
4525 cat conftest.err >&5
c0d27fcc 4526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4527 (exit $ac_status); } &&
edfaf76d
LK
4528 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4530 (eval $ac_try) 2>&5
4531 ac_status=$?
4532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4533 (exit $ac_status); }; } &&
4534 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4536 (eval $ac_try) 2>&5
4537 ac_status=$?
c0d27fcc 4538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4539 (exit $ac_status); }; }; then
4540 ac_cv_sys_largefile_CC=' -n32'; break
4541else
4542 echo "$as_me: failed program was:" >&5
19650fd6
AS
4543sed 's/^/| /' conftest.$ac_ext >&5
4544
503d2be0 4545fi
edfaf76d
LK
4546rm -f conftest.err conftest.$ac_objext
4547 break
503d2be0
AS
4548 done
4549 CC=$ac_save_CC
4550 rm -f conftest.$ac_ext
4551 fi
b192d653 4552fi
c0d27fcc 4553echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
503d2be0
AS
4554echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
4555 if test "$ac_cv_sys_largefile_CC" != no; then
4556 CC=$CC$ac_cv_sys_largefile_CC
4557 fi
b192d653 4558
c0d27fcc 4559 echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
503d2be0
AS
4560echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
4561if test "${ac_cv_sys_file_offset_bits+set}" = set; then
4562 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4563else
503d2be0 4564 while :; do
f4988be7 4565 ac_cv_sys_file_offset_bits=no
503d2be0 4566 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4567/* confdefs.h. */
4568_ACEOF
4569cat confdefs.h >>conftest.$ac_ext
4570cat >>conftest.$ac_ext <<_ACEOF
4571/* end confdefs.h. */
f4988be7 4572#include <sys/types.h>
503d2be0
AS
4573 /* Check that off_t can represent 2**63 - 1 correctly.
4574 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4575 since some C++ compilers masquerading as C compilers
4576 incorrectly reject 9223372036854775807. */
4577#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4578 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4579 && LARGE_OFF_T % 2147483647 == 1)
4580 ? 1 : -1];
4581int
4582main ()
4583{
f4988be7 4584
503d2be0
AS
4585 ;
4586 return 0;
4587}
4588_ACEOF
4589rm -f conftest.$ac_objext
c0d27fcc 4590if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 4591 (eval $ac_compile) 2>conftest.er1
503d2be0 4592 ac_status=$?
edfaf76d
LK
4593 grep -v '^ *+' conftest.er1 >conftest.err
4594 rm -f conftest.er1
4595 cat conftest.err >&5
c0d27fcc 4596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4597 (exit $ac_status); } &&
edfaf76d
LK
4598 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4600 (eval $ac_try) 2>&5
4601 ac_status=$?
4602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4603 (exit $ac_status); }; } &&
4604 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4606 (eval $ac_try) 2>&5
4607 ac_status=$?
c0d27fcc 4608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4609 (exit $ac_status); }; }; then
4610 break
f4988be7 4611else
503d2be0 4612 echo "$as_me: failed program was:" >&5
19650fd6
AS
4613sed 's/^/| /' conftest.$ac_ext >&5
4614
503d2be0 4615fi
edfaf76d 4616rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 4617 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4618/* confdefs.h. */
4619_ACEOF
4620cat confdefs.h >>conftest.$ac_ext
4621cat >>conftest.$ac_ext <<_ACEOF
4622/* end confdefs.h. */
f4988be7
GM
4623#define _FILE_OFFSET_BITS 64
4624#include <sys/types.h>
503d2be0
AS
4625 /* Check that off_t can represent 2**63 - 1 correctly.
4626 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4627 since some C++ compilers masquerading as C compilers
4628 incorrectly reject 9223372036854775807. */
4629#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4630 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4631 && LARGE_OFF_T % 2147483647 == 1)
4632 ? 1 : -1];
4633int
4634main ()
4635{
4636
4637 ;
4638 return 0;
4639}
4640_ACEOF
4641rm -f conftest.$ac_objext
c0d27fcc 4642if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 4643 (eval $ac_compile) 2>conftest.er1
503d2be0 4644 ac_status=$?
edfaf76d
LK
4645 grep -v '^ *+' conftest.er1 >conftest.err
4646 rm -f conftest.er1
4647 cat conftest.err >&5
c0d27fcc 4648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4649 (exit $ac_status); } &&
edfaf76d
LK
4650 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4652 (eval $ac_try) 2>&5
4653 ac_status=$?
4654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4655 (exit $ac_status); }; } &&
4656 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4658 (eval $ac_try) 2>&5
4659 ac_status=$?
c0d27fcc 4660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4661 (exit $ac_status); }; }; then
4662 ac_cv_sys_file_offset_bits=64; break
4663else
4664 echo "$as_me: failed program was:" >&5
19650fd6
AS
4665sed 's/^/| /' conftest.$ac_ext >&5
4666
503d2be0 4667fi
edfaf76d 4668rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
4669 break
4670done
ba4481b5 4671fi
c0d27fcc 4672echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
503d2be0
AS
4673echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
4674if test "$ac_cv_sys_file_offset_bits" != no; then
ba4481b5 4675
c0d27fcc 4676cat >>confdefs.h <<_ACEOF
f4988be7 4677#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 4678_ACEOF
f4988be7 4679
503d2be0
AS
4680fi
4681rm -f conftest*
c0d27fcc 4682 echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
503d2be0
AS
4683echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
4684if test "${ac_cv_sys_large_files+set}" = set; then
4685 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4686else
503d2be0 4687 while :; do
f4988be7 4688 ac_cv_sys_large_files=no
503d2be0 4689 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4690/* confdefs.h. */
4691_ACEOF
4692cat confdefs.h >>conftest.$ac_ext
4693cat >>conftest.$ac_ext <<_ACEOF
4694/* end confdefs.h. */
503d2be0
AS
4695#include <sys/types.h>
4696 /* Check that off_t can represent 2**63 - 1 correctly.
4697 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4698 since some C++ compilers masquerading as C compilers
4699 incorrectly reject 9223372036854775807. */
4700#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4701 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4702 && LARGE_OFF_T % 2147483647 == 1)
4703 ? 1 : -1];
4704int
4705main ()
4706{
ba4481b5 4707
503d2be0
AS
4708 ;
4709 return 0;
4710}
4711_ACEOF
4712rm -f conftest.$ac_objext
c0d27fcc 4713if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 4714 (eval $ac_compile) 2>conftest.er1
503d2be0 4715 ac_status=$?
edfaf76d
LK
4716 grep -v '^ *+' conftest.er1 >conftest.err
4717 rm -f conftest.er1
4718 cat conftest.err >&5
c0d27fcc 4719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4720 (exit $ac_status); } &&
edfaf76d
LK
4721 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4723 (eval $ac_try) 2>&5
4724 ac_status=$?
4725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4726 (exit $ac_status); }; } &&
4727 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4729 (eval $ac_try) 2>&5
4730 ac_status=$?
c0d27fcc 4731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4732 (exit $ac_status); }; }; then
4733 break
ba4481b5 4734else
503d2be0 4735 echo "$as_me: failed program was:" >&5
19650fd6
AS
4736sed 's/^/| /' conftest.$ac_ext >&5
4737
503d2be0 4738fi
edfaf76d 4739rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 4740 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4741/* confdefs.h. */
4742_ACEOF
4743cat confdefs.h >>conftest.$ac_ext
4744cat >>conftest.$ac_ext <<_ACEOF
4745/* end confdefs.h. */
f4988be7 4746#define _LARGE_FILES 1
503d2be0
AS
4747#include <sys/types.h>
4748 /* Check that off_t can represent 2**63 - 1 correctly.
4749 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4750 since some C++ compilers masquerading as C compilers
4751 incorrectly reject 9223372036854775807. */
4752#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4753 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4754 && LARGE_OFF_T % 2147483647 == 1)
4755 ? 1 : -1];
4756int
4757main ()
4758{
f4988be7 4759
503d2be0
AS
4760 ;
4761 return 0;
4762}
4763_ACEOF
4764rm -f conftest.$ac_objext
c0d27fcc 4765if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 4766 (eval $ac_compile) 2>conftest.er1
503d2be0 4767 ac_status=$?
edfaf76d
LK
4768 grep -v '^ *+' conftest.er1 >conftest.err
4769 rm -f conftest.er1
4770 cat conftest.err >&5
c0d27fcc 4771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4772 (exit $ac_status); } &&
edfaf76d
LK
4773 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4775 (eval $ac_try) 2>&5
4776 ac_status=$?
4777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4778 (exit $ac_status); }; } &&
4779 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4781 (eval $ac_try) 2>&5
4782 ac_status=$?
c0d27fcc 4783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4784 (exit $ac_status); }; }; then
4785 ac_cv_sys_large_files=1; break
4786else
4787 echo "$as_me: failed program was:" >&5
19650fd6
AS
4788sed 's/^/| /' conftest.$ac_ext >&5
4789
503d2be0 4790fi
edfaf76d 4791rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
4792 break
4793done
ba4481b5 4794fi
c0d27fcc 4795echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
503d2be0
AS
4796echo "${ECHO_T}$ac_cv_sys_large_files" >&6
4797if test "$ac_cv_sys_large_files" != no; then
ba4481b5 4798
c0d27fcc 4799cat >>confdefs.h <<_ACEOF
f4988be7 4800#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 4801_ACEOF
ba4481b5 4802
503d2be0
AS
4803fi
4804rm -f conftest*
4805fi
ba4481b5 4806
c0d27fcc 4807
2c9dccc9
PJ
4808if test "${with_sound}" != "no"; then
4809 # Sound support for GNU/Linux and the free BSDs.
c0d27fcc
MR
4810 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4811echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4812if test "${ac_cv_header_stdc+set}" = set; then
4813 echo $ECHO_N "(cached) $ECHO_C" >&6
4814else
4815 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4816/* confdefs.h. */
4817_ACEOF
4818cat confdefs.h >>conftest.$ac_ext
4819cat >>conftest.$ac_ext <<_ACEOF
4820/* end confdefs.h. */
c0d27fcc
MR
4821#include <stdlib.h>
4822#include <stdarg.h>
4823#include <string.h>
4824#include <float.h>
98418dba 4825
19650fd6
AS
4826int
4827main ()
4828{
4829
4830 ;
4831 return 0;
4832}
c0d27fcc 4833_ACEOF
19650fd6
AS
4834rm -f conftest.$ac_objext
4835if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 4836 (eval $ac_compile) 2>conftest.er1
cd958eb3 4837 ac_status=$?
edfaf76d
LK
4838 grep -v '^ *+' conftest.er1 >conftest.err
4839 rm -f conftest.er1
4840 cat conftest.err >&5
cd958eb3 4841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 4842 (exit $ac_status); } &&
edfaf76d
LK
4843 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
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); }; } &&
4849 { ac_try='test -s conftest.$ac_objext'
19650fd6
AS
4850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4851 (eval $ac_try) 2>&5
4852 ac_status=$?
4853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4854 (exit $ac_status); }; }; then
c0d27fcc
MR
4855 ac_cv_header_stdc=yes
4856else
4857 echo "$as_me: failed program was:" >&5
19650fd6
AS
4858sed 's/^/| /' conftest.$ac_ext >&5
4859
4860ac_cv_header_stdc=no
c0d27fcc 4861fi
edfaf76d 4862rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
4863
4864if test $ac_cv_header_stdc = yes; then
4865 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4866 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4867/* confdefs.h. */
4868_ACEOF
4869cat confdefs.h >>conftest.$ac_ext
4870cat >>conftest.$ac_ext <<_ACEOF
4871/* end confdefs.h. */
c0d27fcc
MR
4872#include <string.h>
4873
4874_ACEOF
4875if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4876 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
4877 :
4878else
4879 ac_cv_header_stdc=no
4880fi
4881rm -f conftest*
4882
4883fi
4884
4885if test $ac_cv_header_stdc = yes; then
4886 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4887 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4888/* confdefs.h. */
4889_ACEOF
4890cat confdefs.h >>conftest.$ac_ext
4891cat >>conftest.$ac_ext <<_ACEOF
4892/* end confdefs.h. */
c0d27fcc
MR
4893#include <stdlib.h>
4894
4895_ACEOF
4896if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4897 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
4898 :
4899else
4900 ac_cv_header_stdc=no
4901fi
4902rm -f conftest*
4903
4904fi
4905
4906if test $ac_cv_header_stdc = yes; then
4907 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4908 if test "$cross_compiling" = yes; then
4909 :
4910else
4911 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4912/* confdefs.h. */
4913_ACEOF
4914cat confdefs.h >>conftest.$ac_ext
4915cat >>conftest.$ac_ext <<_ACEOF
4916/* end confdefs.h. */
c0d27fcc
MR
4917#include <ctype.h>
4918#if ((' ' & 0x0FF) == 0x020)
4919# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4920# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4921#else
19650fd6 4922# define ISLOWER(c) \
edfaf76d
LK
4923 (('a' <= (c) && (c) <= 'i') \
4924 || ('j' <= (c) && (c) <= 'r') \
4925 || ('s' <= (c) && (c) <= 'z'))
c0d27fcc
MR
4926# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4927#endif
4928
4929#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4930int
4931main ()
4932{
4933 int i;
4934 for (i = 0; i < 256; i++)
4935 if (XOR (islower (i), ISLOWER (i))
edfaf76d 4936 || toupper (i) != TOUPPER (i))
c0d27fcc
MR
4937 exit(2);
4938 exit (0);
4939}
4940_ACEOF
4941rm -f conftest$ac_exeext
4942if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4943 (eval $ac_link) 2>&5
4944 ac_status=$?
4945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4946 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4948 (eval $ac_try) 2>&5
4949 ac_status=$?
4950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4951 (exit $ac_status); }; }; then
4952 :
4953else
4954 echo "$as_me: program exited with status $ac_status" >&5
4955echo "$as_me: failed program was:" >&5
19650fd6
AS
4956sed 's/^/| /' conftest.$ac_ext >&5
4957
c0d27fcc
MR
4958( exit $ac_status )
4959ac_cv_header_stdc=no
4960fi
edfaf76d 4961rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
4962fi
4963fi
4964fi
4965echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4966echo "${ECHO_T}$ac_cv_header_stdc" >&6
4967if test $ac_cv_header_stdc = yes; then
4968
4969cat >>confdefs.h <<\_ACEOF
4970#define STDC_HEADERS 1
4971_ACEOF
4972
4973fi
4974
4975# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
edfaf76d 4986 inttypes.h stdint.h unistd.h
98418dba
CW
4987do
4988as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc 4989echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
4990echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4991if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 4992 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4993else
925c2f3f 4994 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4995/* confdefs.h. */
4996_ACEOF
4997cat confdefs.h >>conftest.$ac_ext
4998cat >>conftest.$ac_ext <<_ACEOF
4999/* end confdefs.h. */
c0d27fcc
MR
5000$ac_includes_default
5001
5002#include <$ac_header>
5003_ACEOF
5004rm -f conftest.$ac_objext
5005if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5006 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5007 ac_status=$?
edfaf76d
LK
5008 grep -v '^ *+' conftest.er1 >conftest.err
5009 rm -f conftest.er1
5010 cat conftest.err >&5
c0d27fcc
MR
5011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5012 (exit $ac_status); } &&
edfaf76d
LK
5013 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5015 (eval $ac_try) 2>&5
5016 ac_status=$?
5017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5018 (exit $ac_status); }; } &&
5019 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5021 (eval $ac_try) 2>&5
5022 ac_status=$?
5023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5024 (exit $ac_status); }; }; then
5025 eval "$as_ac_Header=yes"
5026else
5027 echo "$as_me: failed program was:" >&5
19650fd6
AS
5028sed 's/^/| /' conftest.$ac_ext >&5
5029
c0d27fcc
MR
5030eval "$as_ac_Header=no"
5031fi
edfaf76d 5032rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5033fi
5034echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5035echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5036if test `eval echo '${'$as_ac_Header'}'` = yes; then
5037 cat >>confdefs.h <<_ACEOF
5038#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5039_ACEOF
5040
5041fi
5042
5043done
5044
5045
5046
5047
5048
5049for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5050do
5051as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5052if eval "test \"\${$as_ac_Header+set}\" = set"; then
5053 echo "$as_me:$LINENO: checking for $ac_header" >&5
5054echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5055if eval "test \"\${$as_ac_Header+set}\" = set"; then
5056 echo $ECHO_N "(cached) $ECHO_C" >&6
5057fi
5058echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5059echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5060else
5061 # Is the header compilable?
5062echo "$as_me:$LINENO: checking $ac_header usability" >&5
5063echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5064cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5065/* confdefs.h. */
5066_ACEOF
5067cat confdefs.h >>conftest.$ac_ext
5068cat >>conftest.$ac_ext <<_ACEOF
5069/* end confdefs.h. */
c0d27fcc 5070$ac_includes_default
98418dba 5071#include <$ac_header>
503d2be0 5072_ACEOF
c0d27fcc
MR
5073rm -f conftest.$ac_objext
5074if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5075 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5076 ac_status=$?
edfaf76d
LK
5077 grep -v '^ *+' conftest.er1 >conftest.err
5078 rm -f conftest.er1
5079 cat conftest.err >&5
c0d27fcc
MR
5080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5081 (exit $ac_status); } &&
edfaf76d
LK
5082 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5084 (eval $ac_try) 2>&5
5085 ac_status=$?
5086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5087 (exit $ac_status); }; } &&
5088 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5090 (eval $ac_try) 2>&5
5091 ac_status=$?
5092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5093 (exit $ac_status); }; }; then
5094 ac_header_compiler=yes
5095else
5096 echo "$as_me: failed program was:" >&5
19650fd6
AS
5097sed 's/^/| /' conftest.$ac_ext >&5
5098
c0d27fcc
MR
5099ac_header_compiler=no
5100fi
edfaf76d 5101rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5102echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5103echo "${ECHO_T}$ac_header_compiler" >&6
5104
5105# Is the header present?
5106echo "$as_me:$LINENO: checking $ac_header presence" >&5
5107echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5108cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5109/* confdefs.h. */
5110_ACEOF
5111cat confdefs.h >>conftest.$ac_ext
5112cat >>conftest.$ac_ext <<_ACEOF
5113/* end confdefs.h. */
c0d27fcc
MR
5114#include <$ac_header>
5115_ACEOF
5116if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5117 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5118 ac_status=$?
6bae0ccf 5119 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5120 rm -f conftest.er1
5121 cat conftest.err >&5
c0d27fcc 5122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5123 (exit $ac_status); } >/dev/null; then
5124 if test -s conftest.err; then
5125 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 5126 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
5127 else
5128 ac_cpp_err=
5129 fi
5130else
5131 ac_cpp_err=yes
5132fi
5133if test -z "$ac_cpp_err"; then
c0d27fcc 5134 ac_header_preproc=yes
f4988be7 5135else
503d2be0 5136 echo "$as_me: failed program was:" >&5
19650fd6
AS
5137sed 's/^/| /' conftest.$ac_ext >&5
5138
c0d27fcc 5139 ac_header_preproc=no
f4988be7 5140fi
98418dba 5141rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5142echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5143echo "${ECHO_T}$ac_header_preproc" >&6
5144
5145# So? What about this header?
edfaf76d
LK
5146case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5147 yes:no: )
c0d27fcc
MR
5148 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5149echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
5150 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5151echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5152 ac_header_preproc=yes
19650fd6 5153 ;;
edfaf76d 5154 no:yes:* )
c0d27fcc
MR
5155 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5156echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
5157 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5158echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5159 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5160echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5161 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5162echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 5163 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 5164echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
5165 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5166echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
5167 (
5168 cat <<\_ASBOX
edfaf76d
LK
5169## ------------------------------------------ ##
5170## Report this to the AC_PACKAGE_NAME lists. ##
5171## ------------------------------------------ ##
19650fd6
AS
5172_ASBOX
5173 ) |
5174 sed "s/^/$as_me: WARNING: /" >&2
5175 ;;
c0d27fcc
MR
5176esac
5177echo "$as_me:$LINENO: checking for $ac_header" >&5
5178echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5179if eval "test \"\${$as_ac_Header+set}\" = set"; then
5180 echo $ECHO_N "(cached) $ECHO_C" >&6
5181else
edfaf76d 5182 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 5183fi
c0d27fcc 5184echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5185echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5186
5187fi
98418dba 5188if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5189 cat >>confdefs.h <<_ACEOF
98418dba 5190#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5191_ACEOF
f4988be7
GM
5192
5193fi
c0d27fcc 5194
98418dba
CW
5195done
5196
5197 # Emulation library used on NetBSD.
c0d27fcc 5198 echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
98418dba
CW
5199echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6
5200if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 5201 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 5202else
98418dba
CW
5203 ac_check_lib_save_LIBS=$LIBS
5204LIBS="-lossaudio $LIBS"
5205cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5206/* confdefs.h. */
5207_ACEOF
5208cat confdefs.h >>conftest.$ac_ext
5209cat >>conftest.$ac_ext <<_ACEOF
5210/* end confdefs.h. */
98418dba
CW
5211
5212/* Override any gcc2 internal prototype to avoid an error. */
5213#ifdef __cplusplus
5214extern "C"
f4988be7 5215#endif
98418dba
CW
5216/* We use char because int might match the return type of a gcc2
5217 builtin and then its argument prototype would still apply. */
5218char _oss_ioctl ();
503d2be0
AS
5219int
5220main ()
5221{
98418dba 5222_oss_ioctl ();
503d2be0
AS
5223 ;
5224 return 0;
5225}
5226_ACEOF
98418dba 5227rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 5228if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 5229 (eval $ac_link) 2>conftest.er1
503d2be0 5230 ac_status=$?
edfaf76d
LK
5231 grep -v '^ *+' conftest.er1 >conftest.err
5232 rm -f conftest.er1
5233 cat conftest.err >&5
c0d27fcc 5234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5235 (exit $ac_status); } &&
edfaf76d
LK
5236 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5238 (eval $ac_try) 2>&5
5239 ac_status=$?
5240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5241 (exit $ac_status); }; } &&
5242 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 5243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5244 (eval $ac_try) 2>&5
5245 ac_status=$?
c0d27fcc 5246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5247 (exit $ac_status); }; }; then
98418dba 5248 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 5249else
503d2be0 5250 echo "$as_me: failed program was:" >&5
19650fd6
AS
5251sed 's/^/| /' conftest.$ac_ext >&5
5252
98418dba 5253ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 5254fi
edfaf76d
LK
5255rm -f conftest.err conftest.$ac_objext \
5256 conftest$ac_exeext conftest.$ac_ext
98418dba 5257LIBS=$ac_check_lib_save_LIBS
f4988be7 5258fi
c0d27fcc 5259echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
98418dba
CW
5260echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6
5261if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
5262 LIBSOUND=-lossaudio
5263else
5264 LIBSOUND=
5265fi
5266
c0d27fcc 5267
f4988be7 5268fi
c0d27fcc
MR
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
22044edf
DL
5287
5288
973a76b1 5289
cffcede7 5290
551ffc27 5291
226e2359 5292
c0d27fcc 5293
f4988be7 5294
98418dba
CW
5295for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
5296 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 5297 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 5298 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 5299 sys/utsname.h pwd.h
98418dba
CW
5300do
5301as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
5302if eval "test \"\${$as_ac_Header+set}\" = set"; then
5303 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
5304echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5305if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 5306 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
5307fi
5308echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5309echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
f4988be7 5310else
c0d27fcc
MR
5311 # Is the header compilable?
5312echo "$as_me:$LINENO: checking $ac_header usability" >&5
5313echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5314cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5315/* confdefs.h. */
5316_ACEOF
5317cat confdefs.h >>conftest.$ac_ext
5318cat >>conftest.$ac_ext <<_ACEOF
5319/* end confdefs.h. */
c0d27fcc
MR
5320$ac_includes_default
5321#include <$ac_header>
5322_ACEOF
5323rm -f conftest.$ac_objext
5324if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5325 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5326 ac_status=$?
edfaf76d
LK
5327 grep -v '^ *+' conftest.er1 >conftest.err
5328 rm -f conftest.er1
5329 cat conftest.err >&5
c0d27fcc
MR
5330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5331 (exit $ac_status); } &&
edfaf76d
LK
5332 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5334 (eval $ac_try) 2>&5
5335 ac_status=$?
5336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5337 (exit $ac_status); }; } &&
5338 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5340 (eval $ac_try) 2>&5
5341 ac_status=$?
5342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5343 (exit $ac_status); }; }; then
5344 ac_header_compiler=yes
5345else
5346 echo "$as_me: failed program was:" >&5
19650fd6
AS
5347sed 's/^/| /' conftest.$ac_ext >&5
5348
c0d27fcc
MR
5349ac_header_compiler=no
5350fi
edfaf76d 5351rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5352echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5353echo "${ECHO_T}$ac_header_compiler" >&6
5354
5355# Is the header present?
5356echo "$as_me:$LINENO: checking $ac_header presence" >&5
5357echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5358cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5359/* confdefs.h. */
5360_ACEOF
5361cat confdefs.h >>conftest.$ac_ext
5362cat >>conftest.$ac_ext <<_ACEOF
5363/* end confdefs.h. */
98418dba 5364#include <$ac_header>
503d2be0 5365_ACEOF
c0d27fcc 5366if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5367 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5368 ac_status=$?
6bae0ccf 5369 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5370 rm -f conftest.er1
5371 cat conftest.err >&5
c0d27fcc 5372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5373 (exit $ac_status); } >/dev/null; then
5374 if test -s conftest.err; then
5375 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 5376 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
5377 else
5378 ac_cpp_err=
5379 fi
5380else
5381 ac_cpp_err=yes
5382fi
5383if test -z "$ac_cpp_err"; then
c0d27fcc 5384 ac_header_preproc=yes
34ec9ebe 5385else
503d2be0 5386 echo "$as_me: failed program was:" >&5
19650fd6
AS
5387sed 's/^/| /' conftest.$ac_ext >&5
5388
c0d27fcc 5389 ac_header_preproc=no
34ec9ebe 5390fi
98418dba 5391rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5392echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5393echo "${ECHO_T}$ac_header_preproc" >&6
5394
5395# So? What about this header?
edfaf76d
LK
5396case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5397 yes:no: )
c0d27fcc
MR
5398 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5399echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
5400 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5401echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5402 ac_header_preproc=yes
19650fd6 5403 ;;
edfaf76d 5404 no:yes:* )
c0d27fcc
MR
5405 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5406echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
5407 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5408echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5409 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5410echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5411 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5412echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 5413 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 5414echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
5415 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5416echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
5417 (
5418 cat <<\_ASBOX
edfaf76d
LK
5419## ------------------------------------------ ##
5420## Report this to the AC_PACKAGE_NAME lists. ##
5421## ------------------------------------------ ##
19650fd6
AS
5422_ASBOX
5423 ) |
5424 sed "s/^/$as_me: WARNING: /" >&2
5425 ;;
c0d27fcc
MR
5426esac
5427echo "$as_me:$LINENO: checking for $ac_header" >&5
5428echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5429if eval "test \"\${$as_ac_Header+set}\" = set"; then
5430 echo $ECHO_N "(cached) $ECHO_C" >&6
5431else
edfaf76d 5432 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 5433fi
c0d27fcc 5434echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5435echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5436
5437fi
98418dba 5438if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5439 cat >>confdefs.h <<_ACEOF
98418dba 5440#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5441_ACEOF
34ec9ebe 5442
98418dba 5443fi
c0d27fcc 5444
98418dba
CW
5445done
5446
22044edf 5447
f17e308a
JD
5448echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
5449echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6
5450cat >conftest.$ac_ext <<_ACEOF
5451/* confdefs.h. */
5452_ACEOF
5453cat confdefs.h >>conftest.$ac_ext
5454cat >>conftest.$ac_ext <<_ACEOF
5455/* end confdefs.h. */
5456#include <sys/personality.h>
5457int
5458main ()
5459{
5460personality (PER_LINUX32)
5461 ;
5462 return 0;
5463}
5464_ACEOF
5465rm -f conftest.$ac_objext
5466if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5467 (eval $ac_compile) 2>conftest.er1
f17e308a 5468 ac_status=$?
edfaf76d
LK
5469 grep -v '^ *+' conftest.er1 >conftest.err
5470 rm -f conftest.er1
5471 cat conftest.err >&5
f17e308a
JD
5472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5473 (exit $ac_status); } &&
edfaf76d
LK
5474 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5476 (eval $ac_try) 2>&5
5477 ac_status=$?
5478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5479 (exit $ac_status); }; } &&
5480 { ac_try='test -s conftest.$ac_objext'
f17e308a
JD
5481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5482 (eval $ac_try) 2>&5
5483 ac_status=$?
5484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5485 (exit $ac_status); }; }; then
5486 emacs_cv_personality_linux32=yes
5487else
5488 echo "$as_me: failed program was:" >&5
5489sed 's/^/| /' conftest.$ac_ext >&5
5490
5491emacs_cv_personality_linux32=no
5492fi
edfaf76d 5493rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
f17e308a
JD
5494echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
5495echo "${ECHO_T}$emacs_cv_personality_linux32" >&6
5496
5497if test $emacs_cv_personality_linux32 = yes; then
5498
5499cat >>confdefs.h <<\_ACEOF
5500#define HAVE_PERSONALITY_LINUX32 1
5501_ACEOF
5502
5503fi
5504
5505
22044edf
DL
5506for ac_header in term.h
5507do
5508as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5509echo "$as_me:$LINENO: checking for $ac_header" >&5
5510echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5511if eval "test \"\${$as_ac_Header+set}\" = set"; then
5512 echo $ECHO_N "(cached) $ECHO_C" >&6
5513else
5514 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5515/* confdefs.h. */
5516_ACEOF
5517cat confdefs.h >>conftest.$ac_ext
5518cat >>conftest.$ac_ext <<_ACEOF
5519/* end confdefs.h. */
22044edf
DL
5520#include <$ac_header>
5521_ACEOF
5522if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5523 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5524 ac_status=$?
5525 grep -v '^ *+' conftest.er1 >conftest.err
5526 rm -f conftest.er1
5527 cat conftest.err >&5
5528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5529 (exit $ac_status); } >/dev/null; then
5530 if test -s conftest.err; then
5531 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 5532 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22044edf
DL
5533 else
5534 ac_cpp_err=
5535 fi
5536else
5537 ac_cpp_err=yes
5538fi
5539if test -z "$ac_cpp_err"; then
5540 eval "$as_ac_Header=yes"
5541else
5542 echo "$as_me: failed program was:" >&5
19650fd6
AS
5543sed 's/^/| /' conftest.$ac_ext >&5
5544
22044edf
DL
5545 eval "$as_ac_Header=no"
5546fi
5547rm -f conftest.err conftest.$ac_ext
5548fi
5549echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5550echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5551if test `eval echo '${'$as_ac_Header'}'` = yes; then
5552 cat >>confdefs.h <<_ACEOF
5553#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5554_ACEOF
5555
5556fi
5557
5558done
5559
c0d27fcc 5560echo "$as_me:$LINENO: checking for ANSI C header files" >&5
98418dba
CW
5561echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5562if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 5563 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5564else
503d2be0 5565 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5566/* confdefs.h. */
5567_ACEOF
5568cat confdefs.h >>conftest.$ac_ext
5569cat >>conftest.$ac_ext <<_ACEOF
5570/* end confdefs.h. */
98418dba
CW
5571#include <stdlib.h>
5572#include <stdarg.h>
5573#include <string.h>
5574#include <float.h>
5575
19650fd6
AS
5576int
5577main ()
5578{
5579
5580 ;
5581 return 0;
5582}
98418dba 5583_ACEOF
19650fd6
AS
5584rm -f conftest.$ac_objext
5585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5586 (eval $ac_compile) 2>conftest.er1
cd958eb3 5587 ac_status=$?
edfaf76d
LK
5588 grep -v '^ *+' conftest.er1 >conftest.err
5589 rm -f conftest.er1
5590 cat conftest.err >&5
cd958eb3 5591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 5592 (exit $ac_status); } &&
edfaf76d
LK
5593 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5595 (eval $ac_try) 2>&5
5596 ac_status=$?
5597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5598 (exit $ac_status); }; } &&
5599 { ac_try='test -s conftest.$ac_objext'
19650fd6
AS
5600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5601 (eval $ac_try) 2>&5
5602 ac_status=$?
5603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5604 (exit $ac_status); }; }; then
98418dba 5605 ac_cv_header_stdc=yes
ba4481b5 5606else
503d2be0 5607 echo "$as_me: failed program was:" >&5
19650fd6
AS
5608sed 's/^/| /' conftest.$ac_ext >&5
5609
5610ac_cv_header_stdc=no
ba4481b5 5611fi
edfaf76d 5612rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
5613
5614if test $ac_cv_header_stdc = yes; then
5615 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5616 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5617/* confdefs.h. */
5618_ACEOF
5619cat confdefs.h >>conftest.$ac_ext
5620cat >>conftest.$ac_ext <<_ACEOF
5621/* end confdefs.h. */
98418dba
CW
5622#include <string.h>
5623
5624_ACEOF
5625if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5626 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
5627 :
5628else
5629 ac_cv_header_stdc=no
ba4481b5 5630fi
98418dba 5631rm -f conftest*
ba4481b5
DL
5632
5633fi
5634
98418dba
CW
5635if test $ac_cv_header_stdc = yes; then
5636 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5637 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5638/* confdefs.h. */
5639_ACEOF
5640cat confdefs.h >>conftest.$ac_ext
5641cat >>conftest.$ac_ext <<_ACEOF
5642/* end confdefs.h. */
98418dba
CW
5643#include <stdlib.h>
5644
5645_ACEOF
5646if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5647 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
5648 :
5649else
5650 ac_cv_header_stdc=no
5651fi
5652rm -f conftest*
5653
5654fi
5655
5656if test $ac_cv_header_stdc = yes; then
5657 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5658 if test "$cross_compiling" = yes; then
5659 :
d42122a3 5660else
503d2be0 5661 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5662/* confdefs.h. */
5663_ACEOF
5664cat confdefs.h >>conftest.$ac_ext
5665cat >>conftest.$ac_ext <<_ACEOF
5666/* end confdefs.h. */
98418dba
CW
5667#include <ctype.h>
5668#if ((' ' & 0x0FF) == 0x020)
5669# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5670# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5671#else
19650fd6 5672# define ISLOWER(c) \
edfaf76d
LK
5673 (('a' <= (c) && (c) <= 'i') \
5674 || ('j' <= (c) && (c) <= 'r') \
5675 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
5676# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5677#endif
5678
5679#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
5680int
5681main ()
5682{
98418dba
CW
5683 int i;
5684 for (i = 0; i < 256; i++)
5685 if (XOR (islower (i), ISLOWER (i))
edfaf76d 5686 || toupper (i) != TOUPPER (i))
98418dba
CW
5687 exit(2);
5688 exit (0);
503d2be0
AS
5689}
5690_ACEOF
98418dba 5691rm -f conftest$ac_exeext
c0d27fcc 5692if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba 5693 (eval $ac_link) 2>&5
503d2be0 5694 ac_status=$?
c0d27fcc 5695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 5696 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 5697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5698 (eval $ac_try) 2>&5
5699 ac_status=$?
c0d27fcc 5700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5701 (exit $ac_status); }; }; then
98418dba 5702 :
d42122a3 5703else
98418dba
CW
5704 echo "$as_me: program exited with status $ac_status" >&5
5705echo "$as_me: failed program was:" >&5
19650fd6
AS
5706sed 's/^/| /' conftest.$ac_ext >&5
5707
c0d27fcc 5708( exit $ac_status )
98418dba 5709ac_cv_header_stdc=no
d42122a3 5710fi
edfaf76d 5711rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 5712fi
98418dba
CW
5713fi
5714fi
c0d27fcc 5715echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
98418dba
CW
5716echo "${ECHO_T}$ac_cv_header_stdc" >&6
5717if test $ac_cv_header_stdc = yes; then
5718
c0d27fcc 5719cat >>confdefs.h <<\_ACEOF
98418dba 5720#define STDC_HEADERS 1
c0d27fcc 5721_ACEOF
d42122a3
DL
5722
5723fi
5724
c0d27fcc 5725echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
98418dba
CW
5726echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
5727if test "${ac_cv_header_time+set}" = set; then
503d2be0 5728 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5729else
503d2be0 5730 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5731/* confdefs.h. */
5732_ACEOF
5733cat confdefs.h >>conftest.$ac_ext
5734cat >>conftest.$ac_ext <<_ACEOF
5735/* end confdefs.h. */
ba4481b5 5736#include <sys/types.h>
98418dba 5737#include <sys/time.h>
ba4481b5 5738#include <time.h>
503d2be0
AS
5739
5740int
5741main ()
5742{
98418dba
CW
5743if ((struct tm *) 0)
5744return 0;
503d2be0
AS
5745 ;
5746 return 0;
5747}
5748_ACEOF
5749rm -f conftest.$ac_objext
c0d27fcc 5750if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5751 (eval $ac_compile) 2>conftest.er1
503d2be0 5752 ac_status=$?
edfaf76d
LK
5753 grep -v '^ *+' conftest.er1 >conftest.err
5754 rm -f conftest.er1
5755 cat conftest.err >&5
c0d27fcc 5756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5757 (exit $ac_status); } &&
edfaf76d
LK
5758 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5760 (eval $ac_try) 2>&5
5761 ac_status=$?
5762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5763 (exit $ac_status); }; } &&
5764 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5766 (eval $ac_try) 2>&5
5767 ac_status=$?
c0d27fcc 5768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5769 (exit $ac_status); }; }; then
98418dba 5770 ac_cv_header_time=yes
ba4481b5 5771else
503d2be0 5772 echo "$as_me: failed program was:" >&5
19650fd6
AS
5773sed 's/^/| /' conftest.$ac_ext >&5
5774
98418dba 5775ac_cv_header_time=no
ba4481b5 5776fi
edfaf76d 5777rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 5778fi
c0d27fcc 5779echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
98418dba
CW
5780echo "${ECHO_T}$ac_cv_header_time" >&6
5781if test $ac_cv_header_time = yes; then
503d2be0 5782
c0d27fcc 5783cat >>confdefs.h <<\_ACEOF
98418dba 5784#define TIME_WITH_SYS_TIME 1
c0d27fcc 5785_ACEOF
ba4481b5
DL
5786
5787fi
5788
cd958eb3
MB
5789echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
5790echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6
5791if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 5792 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5793else
503d2be0 5794 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5795/* confdefs.h. */
5796_ACEOF
5797cat confdefs.h >>conftest.$ac_ext
5798cat >>conftest.$ac_ext <<_ACEOF
5799/* end confdefs.h. */
cd958eb3
MB
5800$ac_includes_default
5801int
5802main ()
5803{
5804#ifndef sys_siglist
5805 char *p = (char *) sys_siglist;
98418dba 5806#endif
503d2be0 5807
cd958eb3
MB
5808 ;
5809 return 0;
5810}
5811_ACEOF
5812rm -f conftest.$ac_objext
5813if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5814 (eval $ac_compile) 2>conftest.er1
cd958eb3 5815 ac_status=$?
edfaf76d
LK
5816 grep -v '^ *+' conftest.er1 >conftest.err
5817 rm -f conftest.er1
5818 cat conftest.err >&5
cd958eb3
MB
5819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5820 (exit $ac_status); } &&
edfaf76d
LK
5821 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5823 (eval $ac_try) 2>&5
5824 ac_status=$?
5825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5826 (exit $ac_status); }; } &&
5827 { ac_try='test -s conftest.$ac_objext'
cd958eb3
MB
5828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5829 (eval $ac_try) 2>&5
5830 ac_status=$?
5831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5832 (exit $ac_status); }; }; then
5833 ac_cv_have_decl_sys_siglist=yes
5834else
5835 echo "$as_me: failed program was:" >&5
19650fd6
AS
5836sed 's/^/| /' conftest.$ac_ext >&5
5837
cd958eb3
MB
5838ac_cv_have_decl_sys_siglist=no
5839fi
edfaf76d 5840rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
5841fi
5842echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
5843echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6
5844if test $ac_cv_have_decl_sys_siglist = yes; then
5845
5846cat >>confdefs.h <<_ACEOF
5847#define HAVE_DECL_SYS_SIGLIST 1
5848_ACEOF
5849
5850
5851else
5852 cat >>confdefs.h <<_ACEOF
5853#define HAVE_DECL_SYS_SIGLIST 0
5854_ACEOF
5855
5856
5857fi
5858
5859
5860if test $ac_cv_have_decl_sys_siglist != yes; then
5861 # For Tru64, at least:
5862 echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
5863echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6
5864if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
5865 echo $ECHO_N "(cached) $ECHO_C" >&6
5866else
5867 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5868/* confdefs.h. */
5869_ACEOF
5870cat confdefs.h >>conftest.$ac_ext
5871cat >>conftest.$ac_ext <<_ACEOF
5872/* end confdefs.h. */
cd958eb3 5873$ac_includes_default
503d2be0
AS
5874int
5875main ()
5876{
cd958eb3
MB
5877#ifndef __sys_siglist
5878 char *p = (char *) __sys_siglist;
5879#endif
5880
503d2be0
AS
5881 ;
5882 return 0;
5883}
5884_ACEOF
5885rm -f conftest.$ac_objext
c0d27fcc 5886if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5887 (eval $ac_compile) 2>conftest.er1
503d2be0 5888 ac_status=$?
edfaf76d
LK
5889 grep -v '^ *+' conftest.er1 >conftest.err
5890 rm -f conftest.er1
5891 cat conftest.err >&5
c0d27fcc 5892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5893 (exit $ac_status); } &&
edfaf76d
LK
5894 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
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
edfaf76d 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
edfaf76d 5973 (eval $ac_compile) 2>conftest.er1
503d2be0 5974 ac_status=$?
edfaf76d
LK
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); } &&
edfaf76d
LK
5980 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5982 (eval $ac_try) 2>&5
5983 ac_status=$?
5984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5985 (exit $ac_status); }; } &&
5986 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5988 (eval $ac_try) 2>&5
5989 ac_status=$?
c0d27fcc 5990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5991 (exit $ac_status); }; }; then
98418dba 5992 ac_cv_header_sys_wait_h=yes
ba4481b5 5993else
503d2be0 5994 echo "$as_me: failed program was:" >&5
19650fd6
AS
5995sed 's/^/| /' conftest.$ac_ext >&5
5996
98418dba 5997ac_cv_header_sys_wait_h=no
ba4481b5 5998fi
edfaf76d 5999rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6000fi
c0d27fcc 6001echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
98418dba
CW
6002echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
6003if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 6004
c0d27fcc 6005cat >>confdefs.h <<\_ACEOF
98418dba 6006#define HAVE_SYS_WAIT_H 1
c0d27fcc 6007_ACEOF
ba4481b5 6008
ba4481b5
DL
6009fi
6010
c0d27fcc
MR
6011
6012echo "$as_me:$LINENO: checking for struct utimbuf" >&5
98418dba
CW
6013echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
6014if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 6015 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 6016else
503d2be0 6017 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6018/* confdefs.h. */
6019_ACEOF
6020cat confdefs.h >>conftest.$ac_ext
6021cat >>conftest.$ac_ext <<_ACEOF
6022/* end confdefs.h. */
98418dba
CW
6023#ifdef TIME_WITH_SYS_TIME
6024#include <sys/time.h>
6025#include <time.h>
6026#else
6027#ifdef HAVE_SYS_TIME_H
6028#include <sys/time.h>
6029#else
1113b624 6030#include <time.h>
98418dba
CW
6031#endif
6032#endif
6033#ifdef HAVE_UTIME_H
6034#include <utime.h>
6035#endif
503d2be0
AS
6036int
6037main ()
6038{
98418dba 6039static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
6040 ;
6041 return 0;
6042}
6043_ACEOF
98418dba 6044rm -f conftest.$ac_objext
c0d27fcc 6045if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6046 (eval $ac_compile) 2>conftest.er1
503d2be0 6047 ac_status=$?
edfaf76d
LK
6048 grep -v '^ *+' conftest.er1 >conftest.err
6049 rm -f conftest.er1
6050 cat conftest.err >&5
c0d27fcc 6051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6052 (exit $ac_status); } &&
edfaf76d
LK
6053 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6055 (eval $ac_try) 2>&5
6056 ac_status=$?
6057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6058 (exit $ac_status); }; } &&
6059 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6061 (eval $ac_try) 2>&5
6062 ac_status=$?
c0d27fcc 6063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6064 (exit $ac_status); }; }; then
98418dba 6065 emacs_cv_struct_utimbuf=yes
1113b624 6066else
503d2be0 6067 echo "$as_me: failed program was:" >&5
19650fd6
AS
6068sed 's/^/| /' conftest.$ac_ext >&5
6069
98418dba 6070emacs_cv_struct_utimbuf=no
1113b624 6071fi
edfaf76d 6072rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 6073fi
c0d27fcc 6074echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
98418dba
CW
6075echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6
6076if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 6077
c0d27fcc 6078cat >>confdefs.h <<\_ACEOF
98418dba 6079#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 6080_ACEOF
1113b624
PE
6081
6082fi
ba4481b5 6083
c0d27fcc 6084echo "$as_me:$LINENO: checking return type of signal handlers" >&5
98418dba
CW
6085echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
6086if test "${ac_cv_type_signal+set}" = set; then
503d2be0 6087 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6088else
98418dba 6089 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6090/* confdefs.h. */
6091_ACEOF
6092cat confdefs.h >>conftest.$ac_ext
6093cat >>conftest.$ac_ext <<_ACEOF
6094/* end confdefs.h. */
7397acc4 6095#include <sys/types.h>
98418dba
CW
6096#include <signal.h>
6097#ifdef signal
6098# undef signal
6099#endif
6100#ifdef __cplusplus
6101extern "C" void (*signal (int, void (*)(int)))(int);
6102#else
6103void (*signal ()) ();
6104#endif
6105
503d2be0
AS
6106int
6107main ()
6108{
98418dba 6109int i;
503d2be0
AS
6110 ;
6111 return 0;
6112}
6113_ACEOF
98418dba 6114rm -f conftest.$ac_objext
c0d27fcc 6115if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6116 (eval $ac_compile) 2>conftest.er1
503d2be0 6117 ac_status=$?
edfaf76d
LK
6118 grep -v '^ *+' conftest.er1 >conftest.err
6119 rm -f conftest.er1
6120 cat conftest.err >&5
c0d27fcc 6121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6122 (exit $ac_status); } &&
edfaf76d
LK
6123 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6125 (eval $ac_try) 2>&5
6126 ac_status=$?
6127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6128 (exit $ac_status); }; } &&
6129 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6131 (eval $ac_try) 2>&5
6132 ac_status=$?
c0d27fcc 6133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6134 (exit $ac_status); }; }; then
98418dba 6135 ac_cv_type_signal=void
503d2be0
AS
6136else
6137 echo "$as_me: failed program was:" >&5
19650fd6
AS
6138sed 's/^/| /' conftest.$ac_ext >&5
6139
98418dba 6140ac_cv_type_signal=int
503d2be0 6141fi
edfaf76d 6142rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6143fi
c0d27fcc 6144echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
98418dba 6145echo "${ECHO_T}$ac_cv_type_signal" >&6
7397acc4 6146
c0d27fcc 6147cat >>confdefs.h <<_ACEOF
98418dba 6148#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
6149_ACEOF
6150
503d2be0 6151
c0d27fcc
MR
6152
6153echo "$as_me:$LINENO: checking for speed_t" >&5
98418dba
CW
6154echo $ECHO_N "checking for speed_t... $ECHO_C" >&6
6155if test "${emacs_cv_speed_t+set}" = set; then
6156 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6157else
98418dba 6158 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6159/* confdefs.h. */
6160_ACEOF
6161cat confdefs.h >>conftest.$ac_ext
6162cat >>conftest.$ac_ext <<_ACEOF
6163/* end confdefs.h. */
98418dba 6164#include <termios.h>
98418dba
CW
6165int
6166main ()
6167{
6168speed_t x = 1;
6169 ;
6170 return 0;
6171}
6172_ACEOF
6173rm -f conftest.$ac_objext
c0d27fcc 6174if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6175 (eval $ac_compile) 2>conftest.er1
98418dba 6176 ac_status=$?
edfaf76d
LK
6177 grep -v '^ *+' conftest.er1 >conftest.err
6178 rm -f conftest.er1
6179 cat conftest.err >&5
c0d27fcc 6180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6181 (exit $ac_status); } &&
edfaf76d
LK
6182 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6184 (eval $ac_try) 2>&5
6185 ac_status=$?
6186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6187 (exit $ac_status); }; } &&
6188 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6189 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6190 (eval $ac_try) 2>&5
6191 ac_status=$?
c0d27fcc 6192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6193 (exit $ac_status); }; }; then
6194 emacs_cv_speed_t=yes
6195else
6196 echo "$as_me: failed program was:" >&5
19650fd6
AS
6197sed 's/^/| /' conftest.$ac_ext >&5
6198
98418dba
CW
6199emacs_cv_speed_t=no
6200fi
edfaf76d 6201rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 6202fi
c0d27fcc 6203echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
98418dba
CW
6204echo "${ECHO_T}$emacs_cv_speed_t" >&6
6205if test $emacs_cv_speed_t = yes; then
b936fae4 6206
c0d27fcc 6207cat >>confdefs.h <<\_ACEOF
98418dba 6208#define HAVE_SPEED_T 1
c0d27fcc 6209_ACEOF
98418dba 6210
7397acc4
DL
6211fi
6212
c0d27fcc 6213echo "$as_me:$LINENO: checking for struct timeval" >&5
98418dba
CW
6214echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
6215if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 6216 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6217else
503d2be0 6218 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6219/* confdefs.h. */
6220_ACEOF
6221cat confdefs.h >>conftest.$ac_ext
6222cat >>conftest.$ac_ext <<_ACEOF
6223/* end confdefs.h. */
98418dba
CW
6224#ifdef TIME_WITH_SYS_TIME
6225#include <sys/time.h>
6226#include <time.h>
6227#else
6228#ifdef HAVE_SYS_TIME_H
6229#include <sys/time.h>
6230#else
6231#include <time.h>
6232#endif
6233#endif
503d2be0
AS
6234int
6235main ()
6236{
98418dba 6237static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
6238 ;
6239 return 0;
6240}
6241_ACEOF
6242rm -f conftest.$ac_objext
c0d27fcc 6243if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6244 (eval $ac_compile) 2>conftest.er1
503d2be0 6245 ac_status=$?
edfaf76d
LK
6246 grep -v '^ *+' conftest.er1 >conftest.err
6247 rm -f conftest.er1
6248 cat conftest.err >&5
c0d27fcc 6249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6250 (exit $ac_status); } &&
edfaf76d 6251 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
c0d27fcc 6252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6253 (eval $ac_try) 2>&5
6254 ac_status=$?
c0d27fcc 6255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
6256 (exit $ac_status); }; } &&
6257 { ac_try='test -s conftest.$ac_objext'
6258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6259 (eval $ac_try) 2>&5
6260 ac_status=$?
6261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6262 (exit $ac_status); }; }; then
6263 emacs_cv_struct_timeval=yes
6264else
503d2be0 6265 echo "$as_me: failed program was:" >&5
19650fd6
AS
6266sed 's/^/| /' conftest.$ac_ext >&5
6267
98418dba 6268emacs_cv_struct_timeval=no
7397acc4 6269fi
edfaf76d 6270rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6271fi
c0d27fcc 6272echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
98418dba
CW
6273echo "${ECHO_T}$emacs_cv_struct_timeval" >&6
6274HAVE_TIMEVAL=$emacs_cv_struct_timeval
6275if test $emacs_cv_struct_timeval = yes; then
b936fae4 6276
c0d27fcc 6277cat >>confdefs.h <<\_ACEOF
98418dba 6278#define HAVE_TIMEVAL 1
c0d27fcc 6279_ACEOF
7397acc4
DL
6280
6281fi
6282
c0d27fcc 6283echo "$as_me:$LINENO: checking for struct exception" >&5
98418dba
CW
6284echo $ECHO_N "checking for struct exception... $ECHO_C" >&6
6285if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 6286 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6287else
503d2be0 6288 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6289/* confdefs.h. */
6290_ACEOF
6291cat confdefs.h >>conftest.$ac_ext
6292cat >>conftest.$ac_ext <<_ACEOF
6293/* end confdefs.h. */
98418dba 6294#include <math.h>
503d2be0
AS
6295int
6296main ()
6297{
98418dba 6298static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
6299 ;
6300 return 0;
ba4481b5 6301}
503d2be0
AS
6302_ACEOF
6303rm -f conftest.$ac_objext
c0d27fcc 6304if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6305 (eval $ac_compile) 2>conftest.er1
503d2be0 6306 ac_status=$?
edfaf76d
LK
6307 grep -v '^ *+' conftest.er1 >conftest.err
6308 rm -f conftest.er1
6309 cat conftest.err >&5
c0d27fcc 6310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6311 (exit $ac_status); } &&
edfaf76d
LK
6312 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6314 (eval $ac_try) 2>&5
6315 ac_status=$?
6316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6317 (exit $ac_status); }; } &&
6318 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6320 (eval $ac_try) 2>&5
6321 ac_status=$?
c0d27fcc 6322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6323 (exit $ac_status); }; }; then
98418dba 6324 emacs_cv_struct_exception=yes
ba4481b5 6325else
503d2be0 6326 echo "$as_me: failed program was:" >&5
19650fd6
AS
6327sed 's/^/| /' conftest.$ac_ext >&5
6328
98418dba 6329emacs_cv_struct_exception=no
ba4481b5 6330fi
edfaf76d 6331rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6332fi
c0d27fcc 6333echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
98418dba
CW
6334echo "${ECHO_T}$emacs_cv_struct_exception" >&6
6335HAVE_EXCEPTION=$emacs_cv_struct_exception
6336if test $emacs_cv_struct_exception != yes; then
b936fae4 6337
c0d27fcc 6338cat >>confdefs.h <<\_ACEOF
98418dba 6339#define NO_MATHERR 1
c0d27fcc 6340_ACEOF
ba4481b5
DL
6341
6342fi
6343
7862d3a8
AS
6344
6345for ac_header in sys/socket.h
6346do
6347as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6348if eval "test \"\${$as_ac_Header+set}\" = set"; then
6349 echo "$as_me:$LINENO: checking for $ac_header" >&5
6350echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6351if eval "test \"\${$as_ac_Header+set}\" = set"; then
6352 echo $ECHO_N "(cached) $ECHO_C" >&6
6353fi
6354echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6355echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6356else
6357 # Is the header compilable?
6358echo "$as_me:$LINENO: checking $ac_header usability" >&5
6359echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6360cat >conftest.$ac_ext <<_ACEOF
6361/* confdefs.h. */
6362_ACEOF
6363cat confdefs.h >>conftest.$ac_ext
6364cat >>conftest.$ac_ext <<_ACEOF
6365/* end confdefs.h. */
6366$ac_includes_default
6367#include <$ac_header>
6368_ACEOF
6369rm -f conftest.$ac_objext
6370if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6371 (eval $ac_compile) 2>conftest.er1
7862d3a8 6372 ac_status=$?
edfaf76d
LK
6373 grep -v '^ *+' conftest.er1 >conftest.err
6374 rm -f conftest.er1
6375 cat conftest.err >&5
7862d3a8
AS
6376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6377 (exit $ac_status); } &&
edfaf76d
LK
6378 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6379 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6380 (eval $ac_try) 2>&5
6381 ac_status=$?
6382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6383 (exit $ac_status); }; } &&
6384 { ac_try='test -s conftest.$ac_objext'
7862d3a8
AS
6385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6386 (eval $ac_try) 2>&5
6387 ac_status=$?
6388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6389 (exit $ac_status); }; }; then
6390 ac_header_compiler=yes
6391else
6392 echo "$as_me: failed program was:" >&5
6393sed 's/^/| /' conftest.$ac_ext >&5
6394
6395ac_header_compiler=no
6396fi
edfaf76d 6397rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8
AS
6398echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6399echo "${ECHO_T}$ac_header_compiler" >&6
6400
6401# Is the header present?
6402echo "$as_me:$LINENO: checking $ac_header presence" >&5
6403echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6404cat >conftest.$ac_ext <<_ACEOF
6405/* confdefs.h. */
6406_ACEOF
6407cat confdefs.h >>conftest.$ac_ext
6408cat >>conftest.$ac_ext <<_ACEOF
6409/* end confdefs.h. */
6410#include <$ac_header>
6411_ACEOF
6412if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6413 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6414 ac_status=$?
6415 grep -v '^ *+' conftest.er1 >conftest.err
6416 rm -f conftest.er1
6417 cat conftest.err >&5
6418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6419 (exit $ac_status); } >/dev/null; then
6420 if test -s conftest.err; then
6421 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 6422 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7862d3a8
AS
6423 else
6424 ac_cpp_err=
6425 fi
6426else
6427 ac_cpp_err=yes
6428fi
6429if test -z "$ac_cpp_err"; then
6430 ac_header_preproc=yes
6431else
6432 echo "$as_me: failed program was:" >&5
6433sed 's/^/| /' conftest.$ac_ext >&5
6434
6435 ac_header_preproc=no
6436fi
6437rm -f conftest.err conftest.$ac_ext
6438echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6439echo "${ECHO_T}$ac_header_preproc" >&6
6440
6441# So? What about this header?
edfaf76d
LK
6442case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6443 yes:no: )
7862d3a8
AS
6444 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6445echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6446 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6447echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6448 ac_header_preproc=yes
7862d3a8 6449 ;;
edfaf76d 6450 no:yes:* )
7862d3a8
AS
6451 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6452echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6453 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6454echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6455 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6456echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6457 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6458echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7862d3a8
AS
6459 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6460echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6461 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6462echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7862d3a8
AS
6463 (
6464 cat <<\_ASBOX
edfaf76d
LK
6465## ------------------------------------------ ##
6466## Report this to the AC_PACKAGE_NAME lists. ##
6467## ------------------------------------------ ##
7862d3a8
AS
6468_ASBOX
6469 ) |
6470 sed "s/^/$as_me: WARNING: /" >&2
6471 ;;
6472esac
6473echo "$as_me:$LINENO: checking for $ac_header" >&5
6474echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6475if eval "test \"\${$as_ac_Header+set}\" = set"; then
6476 echo $ECHO_N "(cached) $ECHO_C" >&6
6477else
edfaf76d 6478 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8
AS
6479fi
6480echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6481echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6482
6483fi
6484if test `eval echo '${'$as_ac_Header'}'` = yes; then
6485 cat >>confdefs.h <<_ACEOF
6486#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6487_ACEOF
6488
6489fi
6490
6491done
6492
6493
6494for ac_header in net/if.h
6495do
6496as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6497echo "$as_me:$LINENO: checking for $ac_header" >&5
6498echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6499if eval "test \"\${$as_ac_Header+set}\" = set"; then
6500 echo $ECHO_N "(cached) $ECHO_C" >&6
6501else
6502 cat >conftest.$ac_ext <<_ACEOF
6503/* confdefs.h. */
6504_ACEOF
6505cat confdefs.h >>conftest.$ac_ext
6506cat >>conftest.$ac_ext <<_ACEOF
6507/* end confdefs.h. */
6508$ac_includes_default
6509#if HAVE_SYS_SOCKET_H
6510#include <sys/socket.h>
6511#endif
6512
6513#include <$ac_header>
6514_ACEOF
6515rm -f conftest.$ac_objext
6516if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6517 (eval $ac_compile) 2>conftest.er1
7862d3a8 6518 ac_status=$?
edfaf76d
LK
6519 grep -v '^ *+' conftest.er1 >conftest.err
6520 rm -f conftest.er1
6521 cat conftest.err >&5
7862d3a8
AS
6522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6523 (exit $ac_status); } &&
edfaf76d
LK
6524 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6526 (eval $ac_try) 2>&5
6527 ac_status=$?
6528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6529 (exit $ac_status); }; } &&
6530 { ac_try='test -s conftest.$ac_objext'
7862d3a8
AS
6531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6532 (eval $ac_try) 2>&5
6533 ac_status=$?
6534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6535 (exit $ac_status); }; }; then
6536 eval "$as_ac_Header=yes"
6537else
6538 echo "$as_me: failed program was:" >&5
6539sed 's/^/| /' conftest.$ac_ext >&5
6540
6541eval "$as_ac_Header=no"
6542fi
edfaf76d 6543rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8
AS
6544fi
6545echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6546echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6547if test `eval echo '${'$as_ac_Header'}'` = yes; then
6548 cat >>confdefs.h <<_ACEOF
6549#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6550_ACEOF
6551
6552fi
6553
6554done
6555
6556
c0d27fcc 6557echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
98418dba
CW
6558echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
6559if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 6560 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6561else
503d2be0 6562 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6563/* confdefs.h. */
6564_ACEOF
6565cat confdefs.h >>conftest.$ac_ext
6566cat >>conftest.$ac_ext <<_ACEOF
6567/* end confdefs.h. */
98418dba
CW
6568#include <sys/types.h>
6569#include <time.h>
7397acc4 6570
503d2be0
AS
6571int
6572main ()
6573{
98418dba 6574struct tm *tp; tp->tm_sec;
503d2be0
AS
6575 ;
6576 return 0;
6577}
6578_ACEOF
6579rm -f conftest.$ac_objext
c0d27fcc 6580if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6581 (eval $ac_compile) 2>conftest.er1
503d2be0 6582 ac_status=$?
edfaf76d
LK
6583 grep -v '^ *+' conftest.er1 >conftest.err
6584 rm -f conftest.er1
6585 cat conftest.err >&5
c0d27fcc 6586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6587 (exit $ac_status); } &&
edfaf76d
LK
6588 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6590 (eval $ac_try) 2>&5
6591 ac_status=$?
6592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6593 (exit $ac_status); }; } &&
6594 { ac_try='test -s conftest.$ac_objext'
35996d22
AS
6595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6596 (eval $ac_try) 2>&5
6597 ac_status=$?
6598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6599 (exit $ac_status); }; }; then
6600 ac_cv_struct_tm=time.h
6601else
503d2be0 6602 echo "$as_me: failed program was:" >&5
19650fd6
AS
6603sed 's/^/| /' conftest.$ac_ext >&5
6604
98418dba 6605ac_cv_struct_tm=sys/time.h
7397acc4 6606fi
edfaf76d 6607rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6608fi
c0d27fcc 6609echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
98418dba
CW
6610echo "${ECHO_T}$ac_cv_struct_tm" >&6
6611if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 6612
c0d27fcc 6613cat >>confdefs.h <<\_ACEOF
98418dba 6614#define TM_IN_SYS_TIME 1
c0d27fcc 6615_ACEOF
7397acc4
DL
6616
6617fi
ba4481b5 6618
c0d27fcc 6619echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
98418dba
CW
6620echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
6621if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 6622 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6623else
98418dba 6624 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6625/* confdefs.h. */
6626_ACEOF
6627cat confdefs.h >>conftest.$ac_ext
6628cat >>conftest.$ac_ext <<_ACEOF
6629/* end confdefs.h. */
98418dba
CW
6630#include <sys/types.h>
6631#include <$ac_cv_struct_tm>
ba4481b5 6632
c0d27fcc 6633
98418dba
CW
6634int
6635main ()
6636{
6637static struct tm ac_aggr;
6638if (ac_aggr.tm_zone)
6639return 0;
6640 ;
6641 return 0;
6642}
6643_ACEOF
6644rm -f conftest.$ac_objext
c0d27fcc 6645if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6646 (eval $ac_compile) 2>conftest.er1
98418dba 6647 ac_status=$?
edfaf76d
LK
6648 grep -v '^ *+' conftest.er1 >conftest.err
6649 rm -f conftest.er1
6650 cat conftest.err >&5
c0d27fcc 6651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6652 (exit $ac_status); } &&
edfaf76d
LK
6653 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6655 (eval $ac_try) 2>&5
6656 ac_status=$?
6657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6658 (exit $ac_status); }; } &&
6659 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6661 (eval $ac_try) 2>&5
6662 ac_status=$?
c0d27fcc 6663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6664 (exit $ac_status); }; }; then
6665 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 6666else
98418dba 6667 echo "$as_me: failed program was:" >&5
19650fd6
AS
6668sed 's/^/| /' conftest.$ac_ext >&5
6669
6bae0ccf 6670cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6671/* confdefs.h. */
6672_ACEOF
6673cat confdefs.h >>conftest.$ac_ext
6674cat >>conftest.$ac_ext <<_ACEOF
6675/* end confdefs.h. */
6bae0ccf
DL
6676#include <sys/types.h>
6677#include <$ac_cv_struct_tm>
6678
6679
6680int
6681main ()
6682{
6683static struct tm ac_aggr;
6684if (sizeof ac_aggr.tm_zone)
6685return 0;
6686 ;
6687 return 0;
6688}
6689_ACEOF
6690rm -f conftest.$ac_objext
6691if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6692 (eval $ac_compile) 2>conftest.er1
6bae0ccf 6693 ac_status=$?
edfaf76d
LK
6694 grep -v '^ *+' conftest.er1 >conftest.err
6695 rm -f conftest.er1
6696 cat conftest.err >&5
6bae0ccf
DL
6697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6698 (exit $ac_status); } &&
edfaf76d
LK
6699 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6701 (eval $ac_try) 2>&5
6702 ac_status=$?
6703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6704 (exit $ac_status); }; } &&
6705 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
6706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6707 (eval $ac_try) 2>&5
6708 ac_status=$?
6709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6710 (exit $ac_status); }; }; then
6711 ac_cv_member_struct_tm_tm_zone=yes
6712else
6713 echo "$as_me: failed program was:" >&5
19650fd6
AS
6714sed 's/^/| /' conftest.$ac_ext >&5
6715
98418dba 6716ac_cv_member_struct_tm_tm_zone=no
ba4481b5 6717fi
edfaf76d 6718rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6719fi
edfaf76d 6720rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 6721fi
c0d27fcc 6722echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
98418dba
CW
6723echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
6724if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 6725
c0d27fcc 6726cat >>confdefs.h <<_ACEOF
98418dba 6727#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
6728_ACEOF
6729
ba4481b5 6730
98418dba 6731fi
ba4481b5 6732
98418dba 6733if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 6734
c0d27fcc 6735cat >>confdefs.h <<\_ACEOF
98418dba 6736#define HAVE_TM_ZONE 1
c0d27fcc 6737_ACEOF
ba4481b5 6738
ba4481b5 6739else
c0d27fcc 6740 echo "$as_me:$LINENO: checking for tzname" >&5
98418dba
CW
6741echo $ECHO_N "checking for tzname... $ECHO_C" >&6
6742if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 6743 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6744else
98418dba 6745 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6746/* confdefs.h. */
6747_ACEOF
6748cat confdefs.h >>conftest.$ac_ext
6749cat >>conftest.$ac_ext <<_ACEOF
6750/* end confdefs.h. */
98418dba
CW
6751#include <time.h>
6752#ifndef tzname /* For SGI. */
6753extern char *tzname[]; /* RS6000 and others reject char **tzname. */
6754#endif
6755
98418dba
CW
6756int
6757main ()
6758{
6759atoi(*tzname);
6760 ;
6761 return 0;
6762}
6763_ACEOF
6764rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 6765if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 6766 (eval $ac_link) 2>conftest.er1
98418dba 6767 ac_status=$?
edfaf76d
LK
6768 grep -v '^ *+' conftest.er1 >conftest.err
6769 rm -f conftest.er1
6770 cat conftest.err >&5
c0d27fcc 6771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6772 (exit $ac_status); } &&
edfaf76d
LK
6773 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6775 (eval $ac_try) 2>&5
6776 ac_status=$?
6777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6778 (exit $ac_status); }; } &&
6779 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 6780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6781 (eval $ac_try) 2>&5
6782 ac_status=$?
c0d27fcc 6783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6784 (exit $ac_status); }; }; then
6785 ac_cv_var_tzname=yes
6786else
6787 echo "$as_me: failed program was:" >&5
19650fd6
AS
6788sed 's/^/| /' conftest.$ac_ext >&5
6789
98418dba 6790ac_cv_var_tzname=no
ba4481b5 6791fi
edfaf76d
LK
6792rm -f conftest.err conftest.$ac_objext \
6793 conftest$ac_exeext conftest.$ac_ext
98418dba 6794fi
c0d27fcc 6795echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
98418dba
CW
6796echo "${ECHO_T}$ac_cv_var_tzname" >&6
6797 if test $ac_cv_var_tzname = yes; then
ba4481b5 6798
c0d27fcc 6799cat >>confdefs.h <<\_ACEOF
98418dba 6800#define HAVE_TZNAME 1
c0d27fcc 6801_ACEOF
503d2be0 6802
98418dba
CW
6803 fi
6804fi
503d2be0 6805
c0d27fcc 6806echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
b936fae4
AS
6807echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6
6808if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
6809 echo $ECHO_N "(cached) $ECHO_C" >&6
6810else
6811 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6812/* confdefs.h. */
6813_ACEOF
6814cat confdefs.h >>conftest.$ac_ext
6815cat >>conftest.$ac_ext <<_ACEOF
6816/* end confdefs.h. */
98418dba 6817#include <time.h>
b936fae4 6818
98418dba
CW
6819int
6820main ()
6821{
b936fae4
AS
6822static struct tm ac_aggr;
6823if (ac_aggr.tm_gmtoff)
6824return 0;
98418dba
CW
6825 ;
6826 return 0;
6827}
6828_ACEOF
b936fae4 6829rm -f conftest.$ac_objext
c0d27fcc 6830if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6831 (eval $ac_compile) 2>conftest.er1
98418dba 6832 ac_status=$?
edfaf76d
LK
6833 grep -v '^ *+' conftest.er1 >conftest.err
6834 rm -f conftest.er1
6835 cat conftest.err >&5
c0d27fcc 6836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6837 (exit $ac_status); } &&
edfaf76d
LK
6838 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6840 (eval $ac_try) 2>&5
6841 ac_status=$?
6842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6843 (exit $ac_status); }; } &&
6844 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6846 (eval $ac_try) 2>&5
6847 ac_status=$?
c0d27fcc 6848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6849 (exit $ac_status); }; }; then
b936fae4 6850 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
6851else
6852 echo "$as_me: failed program was:" >&5
19650fd6
AS
6853sed 's/^/| /' conftest.$ac_ext >&5
6854
8799b3e4 6855cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6856/* confdefs.h. */
6857_ACEOF
6858cat confdefs.h >>conftest.$ac_ext
6859cat >>conftest.$ac_ext <<_ACEOF
6860/* end confdefs.h. */
6bae0ccf
DL
6861#include <time.h>
6862
8799b3e4
CW
6863int
6864main ()
6865{
6bae0ccf
DL
6866static struct tm ac_aggr;
6867if (sizeof ac_aggr.tm_gmtoff)
6868return 0;
8799b3e4
CW
6869 ;
6870 return 0;
6871}
6872_ACEOF
6bae0ccf 6873rm -f conftest.$ac_objext
c0d27fcc 6874if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6875 (eval $ac_compile) 2>conftest.er1
8799b3e4 6876 ac_status=$?
edfaf76d
LK
6877 grep -v '^ *+' conftest.er1 >conftest.err
6878 rm -f conftest.er1
6879 cat conftest.err >&5
c0d27fcc 6880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 6881 (exit $ac_status); } &&
edfaf76d
LK
6882 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6884 (eval $ac_try) 2>&5
6885 ac_status=$?
6886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6887 (exit $ac_status); }; } &&
6888 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8799b3e4
CW
6890 (eval $ac_try) 2>&5
6891 ac_status=$?
c0d27fcc 6892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 6893 (exit $ac_status); }; }; then
6bae0ccf 6894 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
6895else
6896 echo "$as_me: failed program was:" >&5
19650fd6
AS
6897sed 's/^/| /' conftest.$ac_ext >&5
6898
6bae0ccf 6899ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 6900fi
edfaf76d 6901rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 6902fi
edfaf76d 6903rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 6904fi
6bae0ccf
DL
6905echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
6906echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6
6907if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
6908
6909cat >>confdefs.h <<\_ACEOF
6910#define HAVE_TM_GMTOFF 1
6911_ACEOF
6912
6913fi
6914
96f3a036
DL
6915echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
6916echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6
6917if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
6918 echo $ECHO_N "(cached) $ECHO_C" >&6
6919else
6920 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
6921/* confdefs.h. */
6922_ACEOF
6923cat confdefs.h >>conftest.$ac_ext
6924cat >>conftest.$ac_ext <<_ACEOF
6925/* end confdefs.h. */
7862d3a8
AS
6926$ac_includes_default
6927#if HAVE_SYS_SOCKET_H
6928#include <sys/socket.h>
6929#endif
6930#if HAVE_NET_IF_H
96f3a036 6931#include <net/if.h>
7862d3a8 6932#endif
96f3a036
DL
6933
6934int
6935main ()
6936{
6937static struct ifreq ac_aggr;
6938if (ac_aggr.ifr_flags)
6939return 0;
6940 ;
6941 return 0;
6942}
6943_ACEOF
6944rm -f conftest.$ac_objext
6945if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6946 (eval $ac_compile) 2>conftest.er1
96f3a036 6947 ac_status=$?
edfaf76d
LK
6948 grep -v '^ *+' conftest.er1 >conftest.err
6949 rm -f conftest.er1
6950 cat conftest.err >&5
96f3a036
DL
6951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6952 (exit $ac_status); } &&
edfaf76d
LK
6953 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6955 (eval $ac_try) 2>&5
6956 ac_status=$?
6957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6958 (exit $ac_status); }; } &&
6959 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
6960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6961 (eval $ac_try) 2>&5
6962 ac_status=$?
6963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6964 (exit $ac_status); }; }; then
6965 ac_cv_member_struct_ifreq_ifr_flags=yes
6966else
6967 echo "$as_me: failed program was:" >&5
6968sed 's/^/| /' conftest.$ac_ext >&5
6969
6970cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
6971/* confdefs.h. */
6972_ACEOF
6973cat confdefs.h >>conftest.$ac_ext
6974cat >>conftest.$ac_ext <<_ACEOF
6975/* end confdefs.h. */
7862d3a8
AS
6976$ac_includes_default
6977#if HAVE_SYS_SOCKET_H
6978#include <sys/socket.h>
6979#endif
6980#if HAVE_NET_IF_H
96f3a036 6981#include <net/if.h>
7862d3a8 6982#endif
96f3a036
DL
6983
6984int
6985main ()
6986{
6987static struct ifreq ac_aggr;
6988if (sizeof ac_aggr.ifr_flags)
6989return 0;
6990 ;
6991 return 0;
6992}
6993_ACEOF
6994rm -f conftest.$ac_objext
6995if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6996 (eval $ac_compile) 2>conftest.er1
96f3a036 6997 ac_status=$?
edfaf76d
LK
6998 grep -v '^ *+' conftest.er1 >conftest.err
6999 rm -f conftest.er1
7000 cat conftest.err >&5
96f3a036
DL
7001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7002 (exit $ac_status); } &&
edfaf76d
LK
7003 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7004 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7005 (eval $ac_try) 2>&5
7006 ac_status=$?
7007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7008 (exit $ac_status); }; } &&
7009 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7011 (eval $ac_try) 2>&5
7012 ac_status=$?
7013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7014 (exit $ac_status); }; }; then
7015 ac_cv_member_struct_ifreq_ifr_flags=yes
7016else
7017 echo "$as_me: failed program was:" >&5
7018sed 's/^/| /' conftest.$ac_ext >&5
7019
7020ac_cv_member_struct_ifreq_ifr_flags=no
7021fi
edfaf76d 7022rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7023fi
edfaf76d 7024rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7025fi
7026echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
7027echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6
7028if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
7029
7030cat >>confdefs.h <<_ACEOF
7031#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
7032_ACEOF
7033
7034
7035fi
7036echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
7037echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6
7038if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
7039 echo $ECHO_N "(cached) $ECHO_C" >&6
7040else
7041 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7042/* confdefs.h. */
7043_ACEOF
7044cat confdefs.h >>conftest.$ac_ext
7045cat >>conftest.$ac_ext <<_ACEOF
7046/* end confdefs.h. */
7862d3a8
AS
7047$ac_includes_default
7048#if HAVE_SYS_SOCKET_H
7049#include <sys/socket.h>
7050#endif
7051#if HAVE_NET_IF_H
96f3a036 7052#include <net/if.h>
7862d3a8 7053#endif
96f3a036
DL
7054
7055int
7056main ()
7057{
7058static struct ifreq ac_aggr;
7059if (ac_aggr.ifr_hwaddr)
7060return 0;
7061 ;
7062 return 0;
7063}
7064_ACEOF
7065rm -f conftest.$ac_objext
7066if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7067 (eval $ac_compile) 2>conftest.er1
96f3a036 7068 ac_status=$?
edfaf76d
LK
7069 grep -v '^ *+' conftest.er1 >conftest.err
7070 rm -f conftest.er1
7071 cat conftest.err >&5
96f3a036
DL
7072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7073 (exit $ac_status); } &&
edfaf76d
LK
7074 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7076 (eval $ac_try) 2>&5
7077 ac_status=$?
7078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7079 (exit $ac_status); }; } &&
7080 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7082 (eval $ac_try) 2>&5
7083 ac_status=$?
7084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7085 (exit $ac_status); }; }; then
7086 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
7087else
7088 echo "$as_me: failed program was:" >&5
7089sed 's/^/| /' conftest.$ac_ext >&5
7090
7091cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7092/* confdefs.h. */
7093_ACEOF
7094cat confdefs.h >>conftest.$ac_ext
7095cat >>conftest.$ac_ext <<_ACEOF
7096/* end confdefs.h. */
7862d3a8
AS
7097$ac_includes_default
7098#if HAVE_SYS_SOCKET_H
7099#include <sys/socket.h>
7100#endif
7101#if HAVE_NET_IF_H
96f3a036 7102#include <net/if.h>
7862d3a8 7103#endif
96f3a036
DL
7104
7105int
7106main ()
7107{
7108static struct ifreq ac_aggr;
7109if (sizeof ac_aggr.ifr_hwaddr)
7110return 0;
7111 ;
7112 return 0;
7113}
7114_ACEOF
7115rm -f conftest.$ac_objext
7116if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7117 (eval $ac_compile) 2>conftest.er1
96f3a036 7118 ac_status=$?
edfaf76d
LK
7119 grep -v '^ *+' conftest.er1 >conftest.err
7120 rm -f conftest.er1
7121 cat conftest.err >&5
96f3a036
DL
7122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7123 (exit $ac_status); } &&
edfaf76d
LK
7124 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7126 (eval $ac_try) 2>&5
7127 ac_status=$?
7128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7129 (exit $ac_status); }; } &&
7130 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7132 (eval $ac_try) 2>&5
7133 ac_status=$?
7134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7135 (exit $ac_status); }; }; then
7136 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
7137else
7138 echo "$as_me: failed program was:" >&5
7139sed 's/^/| /' conftest.$ac_ext >&5
7140
7141ac_cv_member_struct_ifreq_ifr_hwaddr=no
7142fi
edfaf76d 7143rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7144fi
edfaf76d 7145rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7146fi
7147echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
7148echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6
7149if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
7150
7151cat >>confdefs.h <<_ACEOF
7152#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
7153_ACEOF
7154
7155
7156fi
7157echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
7158echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6
7159if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
7160 echo $ECHO_N "(cached) $ECHO_C" >&6
7161else
7162 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7163/* confdefs.h. */
7164_ACEOF
7165cat confdefs.h >>conftest.$ac_ext
7166cat >>conftest.$ac_ext <<_ACEOF
7167/* end confdefs.h. */
7862d3a8
AS
7168$ac_includes_default
7169#if HAVE_SYS_SOCKET_H
7170#include <sys/socket.h>
7171#endif
7172#if HAVE_NET_IF_H
96f3a036 7173#include <net/if.h>
7862d3a8 7174#endif
96f3a036
DL
7175
7176int
7177main ()
7178{
7179static struct ifreq ac_aggr;
7180if (ac_aggr.ifr_netmask)
7181return 0;
7182 ;
7183 return 0;
7184}
7185_ACEOF
7186rm -f conftest.$ac_objext
7187if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7188 (eval $ac_compile) 2>conftest.er1
96f3a036 7189 ac_status=$?
edfaf76d
LK
7190 grep -v '^ *+' conftest.er1 >conftest.err
7191 rm -f conftest.er1
7192 cat conftest.err >&5
96f3a036
DL
7193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7194 (exit $ac_status); } &&
edfaf76d
LK
7195 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7197 (eval $ac_try) 2>&5
7198 ac_status=$?
7199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7200 (exit $ac_status); }; } &&
7201 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7203 (eval $ac_try) 2>&5
7204 ac_status=$?
7205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7206 (exit $ac_status); }; }; then
7207 ac_cv_member_struct_ifreq_ifr_netmask=yes
7208else
7209 echo "$as_me: failed program was:" >&5
7210sed 's/^/| /' conftest.$ac_ext >&5
7211
7212cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7213/* confdefs.h. */
7214_ACEOF
7215cat confdefs.h >>conftest.$ac_ext
7216cat >>conftest.$ac_ext <<_ACEOF
7217/* end confdefs.h. */
7862d3a8
AS
7218$ac_includes_default
7219#if HAVE_SYS_SOCKET_H
7220#include <sys/socket.h>
7221#endif
7222#if HAVE_NET_IF_H
96f3a036 7223#include <net/if.h>
7862d3a8 7224#endif
96f3a036
DL
7225
7226int
7227main ()
7228{
7229static struct ifreq ac_aggr;
7230if (sizeof ac_aggr.ifr_netmask)
7231return 0;
7232 ;
7233 return 0;
7234}
7235_ACEOF
7236rm -f conftest.$ac_objext
7237if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7238 (eval $ac_compile) 2>conftest.er1
96f3a036 7239 ac_status=$?
edfaf76d
LK
7240 grep -v '^ *+' conftest.er1 >conftest.err
7241 rm -f conftest.er1
7242 cat conftest.err >&5
96f3a036
DL
7243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7244 (exit $ac_status); } &&
edfaf76d
LK
7245 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7247 (eval $ac_try) 2>&5
7248 ac_status=$?
7249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7250 (exit $ac_status); }; } &&
7251 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7253 (eval $ac_try) 2>&5
7254 ac_status=$?
7255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7256 (exit $ac_status); }; }; then
7257 ac_cv_member_struct_ifreq_ifr_netmask=yes
7258else
7259 echo "$as_me: failed program was:" >&5
7260sed 's/^/| /' conftest.$ac_ext >&5
7261
7262ac_cv_member_struct_ifreq_ifr_netmask=no
7263fi
edfaf76d 7264rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7265fi
edfaf76d 7266rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7267fi
7268echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
7269echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6
7270if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
7271
7272cat >>confdefs.h <<_ACEOF
7273#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
7274_ACEOF
7275
7276
7277fi
7278echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
7279echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6
7280if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
7281 echo $ECHO_N "(cached) $ECHO_C" >&6
7282else
7283 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7284/* confdefs.h. */
7285_ACEOF
7286cat confdefs.h >>conftest.$ac_ext
7287cat >>conftest.$ac_ext <<_ACEOF
7288/* end confdefs.h. */
7862d3a8
AS
7289$ac_includes_default
7290#if HAVE_SYS_SOCKET_H
7291#include <sys/socket.h>
7292#endif
7293#if HAVE_NET_IF_H
96f3a036 7294#include <net/if.h>
7862d3a8 7295#endif
96f3a036
DL
7296
7297int
7298main ()
7299{
7300static struct ifreq ac_aggr;
7301if (ac_aggr.ifr_broadaddr)
7302return 0;
7303 ;
7304 return 0;
7305}
7306_ACEOF
7307rm -f conftest.$ac_objext
7308if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7309 (eval $ac_compile) 2>conftest.er1
96f3a036 7310 ac_status=$?
edfaf76d
LK
7311 grep -v '^ *+' conftest.er1 >conftest.err
7312 rm -f conftest.er1
7313 cat conftest.err >&5
96f3a036
DL
7314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7315 (exit $ac_status); } &&
edfaf76d
LK
7316 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7318 (eval $ac_try) 2>&5
7319 ac_status=$?
7320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7321 (exit $ac_status); }; } &&
7322 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7324 (eval $ac_try) 2>&5
7325 ac_status=$?
7326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7327 (exit $ac_status); }; }; then
7328 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
7329else
7330 echo "$as_me: failed program was:" >&5
7331sed 's/^/| /' conftest.$ac_ext >&5
7332
7333cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7334/* confdefs.h. */
7335_ACEOF
7336cat confdefs.h >>conftest.$ac_ext
7337cat >>conftest.$ac_ext <<_ACEOF
7338/* end confdefs.h. */
7862d3a8
AS
7339$ac_includes_default
7340#if HAVE_SYS_SOCKET_H
7341#include <sys/socket.h>
7342#endif
7343#if HAVE_NET_IF_H
96f3a036 7344#include <net/if.h>
7862d3a8 7345#endif
96f3a036
DL
7346
7347int
7348main ()
7349{
7350static struct ifreq ac_aggr;
7351if (sizeof ac_aggr.ifr_broadaddr)
7352return 0;
7353 ;
7354 return 0;
7355}
7356_ACEOF
7357rm -f conftest.$ac_objext
7358if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7359 (eval $ac_compile) 2>conftest.er1
96f3a036 7360 ac_status=$?
edfaf76d
LK
7361 grep -v '^ *+' conftest.er1 >conftest.err
7362 rm -f conftest.er1
7363 cat conftest.err >&5
96f3a036
DL
7364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7365 (exit $ac_status); } &&
edfaf76d
LK
7366 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7368 (eval $ac_try) 2>&5
7369 ac_status=$?
7370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7371 (exit $ac_status); }; } &&
7372 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7374 (eval $ac_try) 2>&5
7375 ac_status=$?
7376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7377 (exit $ac_status); }; }; then
7378 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
7379else
7380 echo "$as_me: failed program was:" >&5
7381sed 's/^/| /' conftest.$ac_ext >&5
7382
7383ac_cv_member_struct_ifreq_ifr_broadaddr=no
7384fi
edfaf76d 7385rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7386fi
edfaf76d 7387rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7388fi
7389echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
7390echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6
7391if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
7392
7393cat >>confdefs.h <<_ACEOF
7394#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
7395_ACEOF
7396
7397
7398fi
7399echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
7400echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6
7401if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
7402 echo $ECHO_N "(cached) $ECHO_C" >&6
7403else
7404 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7405/* confdefs.h. */
7406_ACEOF
7407cat confdefs.h >>conftest.$ac_ext
7408cat >>conftest.$ac_ext <<_ACEOF
7409/* end confdefs.h. */
7862d3a8
AS
7410$ac_includes_default
7411#if HAVE_SYS_SOCKET_H
7412#include <sys/socket.h>
7413#endif
7414#if HAVE_NET_IF_H
96f3a036 7415#include <net/if.h>
7862d3a8 7416#endif
96f3a036
DL
7417
7418int
7419main ()
7420{
7421static struct ifreq ac_aggr;
7422if (ac_aggr.ifr_addr)
7423return 0;
7424 ;
7425 return 0;
7426}
7427_ACEOF
7428rm -f conftest.$ac_objext
7429if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7430 (eval $ac_compile) 2>conftest.er1
96f3a036 7431 ac_status=$?
edfaf76d
LK
7432 grep -v '^ *+' conftest.er1 >conftest.err
7433 rm -f conftest.er1
7434 cat conftest.err >&5
96f3a036
DL
7435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7436 (exit $ac_status); } &&
edfaf76d
LK
7437 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7439 (eval $ac_try) 2>&5
7440 ac_status=$?
7441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7442 (exit $ac_status); }; } &&
7443 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7445 (eval $ac_try) 2>&5
7446 ac_status=$?
7447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7448 (exit $ac_status); }; }; then
7449 ac_cv_member_struct_ifreq_ifr_addr=yes
7450else
7451 echo "$as_me: failed program was:" >&5
7452sed 's/^/| /' conftest.$ac_ext >&5
7453
7454cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7455/* confdefs.h. */
7456_ACEOF
7457cat confdefs.h >>conftest.$ac_ext
7458cat >>conftest.$ac_ext <<_ACEOF
7459/* end confdefs.h. */
7862d3a8
AS
7460$ac_includes_default
7461#if HAVE_SYS_SOCKET_H
7462#include <sys/socket.h>
7463#endif
7464#if HAVE_NET_IF_H
96f3a036 7465#include <net/if.h>
7862d3a8 7466#endif
96f3a036
DL
7467
7468int
7469main ()
7470{
7471static struct ifreq ac_aggr;
7472if (sizeof ac_aggr.ifr_addr)
7473return 0;
7474 ;
7475 return 0;
7476}
7477_ACEOF
7478rm -f conftest.$ac_objext
7479if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7480 (eval $ac_compile) 2>conftest.er1
96f3a036 7481 ac_status=$?
edfaf76d
LK
7482 grep -v '^ *+' conftest.er1 >conftest.err
7483 rm -f conftest.er1
7484 cat conftest.err >&5
96f3a036
DL
7485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7486 (exit $ac_status); } &&
edfaf76d
LK
7487 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7489 (eval $ac_try) 2>&5
7490 ac_status=$?
7491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7492 (exit $ac_status); }; } &&
7493 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7495 (eval $ac_try) 2>&5
7496 ac_status=$?
7497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7498 (exit $ac_status); }; }; then
7499 ac_cv_member_struct_ifreq_ifr_addr=yes
7500else
7501 echo "$as_me: failed program was:" >&5
7502sed 's/^/| /' conftest.$ac_ext >&5
7503
7504ac_cv_member_struct_ifreq_ifr_addr=no
7505fi
edfaf76d 7506rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7507fi
edfaf76d 7508rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7509fi
7510echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
7511echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6
7512if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
7513
7514cat >>confdefs.h <<_ACEOF
7515#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
7516_ACEOF
7517
7518
7519fi
7520
8799b3e4 7521
8799b3e4 7522
c0d27fcc 7523echo "$as_me:$LINENO: checking for function prototypes" >&5
98418dba
CW
7524echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
7525if test "$ac_cv_prog_cc_stdc" != no; then
c0d27fcc 7526 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
7527echo "${ECHO_T}yes" >&6
7528
c0d27fcc 7529cat >>confdefs.h <<\_ACEOF
98418dba 7530#define PROTOTYPES 1
c0d27fcc
MR
7531_ACEOF
7532
7533
7534cat >>confdefs.h <<\_ACEOF
7535#define __PROTOTYPES 1
7536_ACEOF
98418dba
CW
7537
7538else
c0d27fcc 7539 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
7540echo "${ECHO_T}no" >&6
7541fi
7542
c0d27fcc 7543echo "$as_me:$LINENO: checking for working volatile" >&5
98418dba
CW
7544echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
7545if test "${ac_cv_c_volatile+set}" = set; then
7546 echo $ECHO_N "(cached) $ECHO_C" >&6
7547else
7548 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7549/* confdefs.h. */
7550_ACEOF
7551cat confdefs.h >>conftest.$ac_ext
7552cat >>conftest.$ac_ext <<_ACEOF
7553/* end confdefs.h. */
98418dba 7554
98418dba
CW
7555int
7556main ()
7557{
7558
7559volatile int x;
7560int * volatile y;
7561 ;
7562 return 0;
7563}
7564_ACEOF
7565rm -f conftest.$ac_objext
c0d27fcc 7566if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7567 (eval $ac_compile) 2>conftest.er1
98418dba 7568 ac_status=$?
edfaf76d
LK
7569 grep -v '^ *+' conftest.er1 >conftest.err
7570 rm -f conftest.er1
7571 cat conftest.err >&5
c0d27fcc 7572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7573 (exit $ac_status); } &&
edfaf76d
LK
7574 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7576 (eval $ac_try) 2>&5
7577 ac_status=$?
7578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7579 (exit $ac_status); }; } &&
7580 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7582 (eval $ac_try) 2>&5
7583 ac_status=$?
c0d27fcc 7584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7585 (exit $ac_status); }; }; then
7586 ac_cv_c_volatile=yes
7587else
7588 echo "$as_me: failed program was:" >&5
19650fd6
AS
7589sed 's/^/| /' conftest.$ac_ext >&5
7590
98418dba
CW
7591ac_cv_c_volatile=no
7592fi
edfaf76d 7593rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7594fi
c0d27fcc 7595echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
98418dba
CW
7596echo "${ECHO_T}$ac_cv_c_volatile" >&6
7597if test $ac_cv_c_volatile = no; then
7598
c0d27fcc 7599cat >>confdefs.h <<\_ACEOF
98418dba 7600#define volatile
c0d27fcc 7601_ACEOF
98418dba
CW
7602
7603fi
7604
c0d27fcc 7605echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
98418dba
CW
7606echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
7607if test "${ac_cv_c_const+set}" = set; then
7608 echo $ECHO_N "(cached) $ECHO_C" >&6
7609else
7610 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7611/* confdefs.h. */
7612_ACEOF
7613cat confdefs.h >>conftest.$ac_ext
7614cat >>conftest.$ac_ext <<_ACEOF
7615/* end confdefs.h. */
98418dba 7616
98418dba
CW
7617int
7618main ()
7619{
7620/* FIXME: Include the comments suggested by Paul. */
7621#ifndef __cplusplus
7622 /* Ultrix mips cc rejects this. */
7623 typedef int charset[2];
7624 const charset x;
7625 /* SunOS 4.1.1 cc rejects this. */
7626 char const *const *ccp;
7627 char **p;
7628 /* NEC SVR4.0.2 mips cc rejects this. */
7629 struct point {int x, y;};
7630 static struct point const zero = {0,0};
7631 /* AIX XL C 1.02.0.0 rejects this.
7632 It does not let you subtract one const X* pointer from another in
7633 an arm of an if-expression whose if-part is not a constant
7634 expression */
7635 const char *g = "string";
7636 ccp = &g + (g ? g-g : 0);
7637 /* HPUX 7.0 cc rejects these. */
7638 ++ccp;
7639 p = (char**) ccp;
7640 ccp = (char const *const *) p;
7641 { /* SCO 3.2v4 cc rejects this. */
7642 char *t;
7643 char const *s = 0 ? (char *) 0 : (char const *) 0;
7644
7645 *t++ = 0;
7646 }
7647 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
7648 int x[] = {25, 17};
7649 const int *foo = &x[0];
7650 ++foo;
7651 }
7652 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
7653 typedef const int *iptr;
7654 iptr p = 0;
7655 ++p;
7656 }
7657 { /* AIX XL C 1.02.0.0 rejects this saying
7658 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
7659 struct s { int j; const int *ap[3]; };
7660 struct s *b; b->j = 5;
7661 }
7662 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
7663 const int foo = 10;
7664 }
7665#endif
7666
7667 ;
7668 return 0;
7669}
7670_ACEOF
7671rm -f conftest.$ac_objext
c0d27fcc 7672if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7673 (eval $ac_compile) 2>conftest.er1
98418dba 7674 ac_status=$?
edfaf76d
LK
7675 grep -v '^ *+' conftest.er1 >conftest.err
7676 rm -f conftest.er1
7677 cat conftest.err >&5
c0d27fcc 7678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7679 (exit $ac_status); } &&
edfaf76d
LK
7680 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7682 (eval $ac_try) 2>&5
7683 ac_status=$?
7684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7685 (exit $ac_status); }; } &&
7686 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7688 (eval $ac_try) 2>&5
7689 ac_status=$?
c0d27fcc 7690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7691 (exit $ac_status); }; }; then
7692 ac_cv_c_const=yes
7693else
7694 echo "$as_me: failed program was:" >&5
19650fd6
AS
7695sed 's/^/| /' conftest.$ac_ext >&5
7696
98418dba
CW
7697ac_cv_c_const=no
7698fi
edfaf76d 7699rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7700fi
c0d27fcc 7701echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
98418dba
CW
7702echo "${ECHO_T}$ac_cv_c_const" >&6
7703if test $ac_cv_c_const = no; then
7704
c0d27fcc 7705cat >>confdefs.h <<\_ACEOF
98418dba 7706#define const
c0d27fcc 7707_ACEOF
98418dba
CW
7708
7709fi
7710
c0d27fcc 7711echo "$as_me:$LINENO: checking for void * support" >&5
98418dba
CW
7712echo $ECHO_N "checking for void * support... $ECHO_C" >&6
7713if test "${emacs_cv_void_star+set}" = set; then
7714 echo $ECHO_N "(cached) $ECHO_C" >&6
7715else
7716 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7717/* confdefs.h. */
7718_ACEOF
7719cat confdefs.h >>conftest.$ac_ext
7720cat >>conftest.$ac_ext <<_ACEOF
7721/* end confdefs.h. */
98418dba 7722
98418dba
CW
7723int
7724main ()
7725{
7726void * foo;
7727 ;
7728 return 0;
7729}
7730_ACEOF
7731rm -f conftest.$ac_objext
c0d27fcc 7732if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7733 (eval $ac_compile) 2>conftest.er1
98418dba 7734 ac_status=$?
edfaf76d
LK
7735 grep -v '^ *+' conftest.er1 >conftest.err
7736 rm -f conftest.er1
7737 cat conftest.err >&5
c0d27fcc 7738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7739 (exit $ac_status); } &&
edfaf76d
LK
7740 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7742 (eval $ac_try) 2>&5
7743 ac_status=$?
7744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7745 (exit $ac_status); }; } &&
7746 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7748 (eval $ac_try) 2>&5
7749 ac_status=$?
c0d27fcc 7750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7751 (exit $ac_status); }; }; then
7752 emacs_cv_void_star=yes
7753else
7754 echo "$as_me: failed program was:" >&5
19650fd6
AS
7755sed 's/^/| /' conftest.$ac_ext >&5
7756
98418dba
CW
7757emacs_cv_void_star=no
7758fi
edfaf76d 7759rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7760fi
c0d27fcc 7761echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
98418dba
CW
7762echo "${ECHO_T}$emacs_cv_void_star" >&6
7763if test $emacs_cv_void_star = yes; then
c0d27fcc 7764 cat >>confdefs.h <<\_ACEOF
98418dba 7765#define POINTER_TYPE void
c0d27fcc 7766_ACEOF
98418dba
CW
7767
7768else
c0d27fcc 7769 cat >>confdefs.h <<\_ACEOF
98418dba 7770#define POINTER_TYPE char
c0d27fcc 7771_ACEOF
98418dba
CW
7772
7773fi
7774
c0d27fcc 7775
4494a266
JD
7776
7777
cd958eb3 7778
19650fd6
AS
7779echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
7780echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
edfaf76d 7781set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
98418dba
CW
7782if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
7783 echo $ECHO_N "(cached) $ECHO_C" >&6
7784else
c0d27fcc 7785 cat >conftest.make <<\_ACEOF
98418dba 7786all:
19650fd6 7787 @echo 'ac_maketemp="$(MAKE)"'
c0d27fcc 7788_ACEOF
98418dba
CW
7789# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7790eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
7791if test -n "$ac_maketemp"; then
7792 eval ac_cv_prog_make_${ac_make}_set=yes
7793else
7794 eval ac_cv_prog_make_${ac_make}_set=no
7795fi
7796rm -f conftest.make
7797fi
7798if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
c0d27fcc 7799 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
7800echo "${ECHO_T}yes" >&6
7801 SET_MAKE=
7802else
c0d27fcc 7803 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
7804echo "${ECHO_T}no" >&6
7805 SET_MAKE="MAKE=${MAKE-make}"
7806fi
7807
c0d27fcc
MR
7808
7809echo "$as_me:$LINENO: checking for long file names" >&5
98418dba
CW
7810echo $ECHO_N "checking for long file names... $ECHO_C" >&6
7811if test "${ac_cv_sys_long_file_names+set}" = set; then
7812 echo $ECHO_N "(cached) $ECHO_C" >&6
7813else
7814 ac_cv_sys_long_file_names=yes
7815# Test for long file names in all the places we know might matter:
7816# . the current directory, where building will happen
7817# $prefix/lib where we will be installing things
7818# $exec_prefix/lib likewise
7819# eval it to expand exec_prefix.
7820# $TMPDIR if set, where it might want to write temporary files
7821# if $TMPDIR is not set:
7822# /tmp where it might want to write temporary files
7823# /var/tmp likewise
7824# /usr/tmp likewise
7825if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
7826 ac_tmpdirs=$TMPDIR
7827else
7828 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
7829fi
7830for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
7831 test -d $ac_dir || continue
7832 test -w $ac_dir || continue # It is less confusing to not echo anything here.
7833 ac_xdir=$ac_dir/cf$$
7834 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
7835 ac_tf1=$ac_xdir/conftest9012345
7836 ac_tf2=$ac_xdir/conftest9012346
7837 (echo 1 >$ac_tf1) 2>/dev/null
7838 (echo 2 >$ac_tf2) 2>/dev/null
7839 ac_val=`cat $ac_tf1 2>/dev/null`
7840 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
7841 ac_cv_sys_long_file_names=no
7842 rm -rf $ac_xdir 2>/dev/null
7843 break
7844 fi
7845 rm -rf $ac_xdir 2>/dev/null
7846done
7847fi
c0d27fcc 7848echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
98418dba
CW
7849echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
7850if test $ac_cv_sys_long_file_names = yes; then
7851
c0d27fcc 7852cat >>confdefs.h <<\_ACEOF
98418dba 7853#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 7854_ACEOF
98418dba
CW
7855
7856fi
7857
c0d27fcc 7858
98418dba
CW
7859#### Choose a window system.
7860
c0d27fcc 7861echo "$as_me:$LINENO: checking for X" >&5
98418dba
CW
7862echo $ECHO_N "checking for X... $ECHO_C" >&6
7863
edfaf76d 7864ac_path_x_has_been_run=yes
c0d27fcc 7865
98418dba
CW
7866# Check whether --with-x or --without-x was given.
7867if test "${with_x+set}" = set; then
7868 withval="$with_x"
7869
7870fi;
7871# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
7872if test "x$with_x" = xno; then
7873 # The user explicitly disabled X.
7874 have_x=disabled
7875else
7876 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
7877 # Both variables are already set.
7878 have_x=yes
7879 else
7880 if test "${ac_cv_have_x+set}" = set; then
7881 echo $ECHO_N "(cached) $ECHO_C" >&6
7882else
7883 # One or both of the vars are not set, and there is no cached value.
7884ac_x_includes=no ac_x_libraries=no
7885rm -fr conftest.dir
7886if mkdir conftest.dir; then
7887 cd conftest.dir
7888 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
c0d27fcc 7889 cat >Imakefile <<'_ACEOF'
98418dba
CW
7890acfindx:
7891 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
c0d27fcc 7892_ACEOF
98418dba
CW
7893 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
7894 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7895 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
7896 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
7897 for ac_extension in a so sl; do
7898 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
edfaf76d
LK
7899 test -f $ac_im_libdir/libX11.$ac_extension; then
7900 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
7901 fi
7902 done
7903 # Screen out bogus values from the imake configuration. They are
7904 # bogus both because they are the default anyway, and because
7905 # using them would break gcc on systems where it needs fixed includes.
7906 case $ac_im_incroot in
7907 /usr/include) ;;
7908 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
7909 esac
7910 case $ac_im_usrlibdir in
7911 /usr/lib | /lib) ;;
7912 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
7913 esac
7914 fi
7915 cd ..
7916 rm -fr conftest.dir
7917fi
7918
7919# Standard set of common directories for X headers.
7920# Check X11 before X11Rn because it is often a symlink to the current release.
7921ac_x_header_dirs='
7922/usr/X11/include
7923/usr/X11R6/include
7924/usr/X11R5/include
7925/usr/X11R4/include
7926
7927/usr/include/X11
7928/usr/include/X11R6
7929/usr/include/X11R5
7930/usr/include/X11R4
7931
7932/usr/local/X11/include
7933/usr/local/X11R6/include
7934/usr/local/X11R5/include
7935/usr/local/X11R4/include
7936
7937/usr/local/include/X11
7938/usr/local/include/X11R6
7939/usr/local/include/X11R5
7940/usr/local/include/X11R4
7941
7942/usr/X386/include
7943/usr/x386/include
7944/usr/XFree86/include/X11
7945
7946/usr/include
7947/usr/local/include
7948/usr/unsupported/include
7949/usr/athena/include
7950/usr/local/x11r5/include
7951/usr/lpp/Xamples/include
7952
7953/usr/openwin/include
7954/usr/openwin/share/include'
7955
7956if test "$ac_x_includes" = no; then
edfaf76d 7957 # Guess where to find include files, by looking for a specified header file.
98418dba
CW
7958 # First, try using that file with no special directory specified.
7959 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7960/* confdefs.h. */
7961_ACEOF
7962cat confdefs.h >>conftest.$ac_ext
7963cat >>conftest.$ac_ext <<_ACEOF
7964/* end confdefs.h. */
98418dba
CW
7965#include <X11/Intrinsic.h>
7966_ACEOF
c0d27fcc 7967if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
7968 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7969 ac_status=$?
6bae0ccf 7970 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
7971 rm -f conftest.er1
7972 cat conftest.err >&5
c0d27fcc 7973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7974 (exit $ac_status); } >/dev/null; then
7975 if test -s conftest.err; then
7976 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 7977 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
7978 else
7979 ac_cpp_err=
7980 fi
7981else
7982 ac_cpp_err=yes
7983fi
7984if test -z "$ac_cpp_err"; then
7985 # We can compile using X headers with no special include directory.
7986ac_x_includes=
7987else
7988 echo "$as_me: failed program was:" >&5
19650fd6
AS
7989sed 's/^/| /' conftest.$ac_ext >&5
7990
98418dba
CW
7991 for ac_dir in $ac_x_header_dirs; do
7992 if test -r "$ac_dir/X11/Intrinsic.h"; then
7993 ac_x_includes=$ac_dir
7994 break
7995 fi
7996done
7997fi
7998rm -f conftest.err conftest.$ac_ext
7999fi # $ac_x_includes = no
8000
8001if test "$ac_x_libraries" = no; then
8002 # Check for the libraries.
8003 # See if we find them without any special options.
8004 # Don't add to $LIBS permanently.
8005 ac_save_LIBS=$LIBS
8006 LIBS="-lXt $LIBS"
8007 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8008/* confdefs.h. */
8009_ACEOF
8010cat confdefs.h >>conftest.$ac_ext
8011cat >>conftest.$ac_ext <<_ACEOF
8012/* end confdefs.h. */
98418dba 8013#include <X11/Intrinsic.h>
98418dba
CW
8014int
8015main ()
8016{
8017XtMalloc (0)
8018 ;
8019 return 0;
8020}
8021_ACEOF
8022rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8023if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 8024 (eval $ac_link) 2>conftest.er1
98418dba 8025 ac_status=$?
edfaf76d
LK
8026 grep -v '^ *+' conftest.er1 >conftest.err
8027 rm -f conftest.er1
8028 cat conftest.err >&5
c0d27fcc 8029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8030 (exit $ac_status); } &&
edfaf76d
LK
8031 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8033 (eval $ac_try) 2>&5
8034 ac_status=$?
8035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8036 (exit $ac_status); }; } &&
8037 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8039 (eval $ac_try) 2>&5
8040 ac_status=$?
c0d27fcc 8041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8042 (exit $ac_status); }; }; then
8043 LIBS=$ac_save_LIBS
8044# We can link X programs with no special library path.
8045ac_x_libraries=
8046else
8047 echo "$as_me: failed program was:" >&5
19650fd6
AS
8048sed 's/^/| /' conftest.$ac_ext >&5
8049
98418dba
CW
8050LIBS=$ac_save_LIBS
8051for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8052do
8053 # Don't even attempt the hair of trying to link an X program!
8054 for ac_extension in a so sl; do
8055 if test -r $ac_dir/libXt.$ac_extension; then
8056 ac_x_libraries=$ac_dir
8057 break 2
8058 fi
8059 done
8060done
8061fi
edfaf76d
LK
8062rm -f conftest.err conftest.$ac_objext \
8063 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
8064fi # $ac_x_libraries = no
8065
8066if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
8067 # Didn't find X anywhere. Cache the known absence of X.
8068 ac_cv_have_x="have_x=no"
8069else
8070 # Record where we found X for the cache.
8071 ac_cv_have_x="have_x=yes \
edfaf76d 8072 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
98418dba
CW
8073fi
8074fi
8075
8076 fi
8077 eval "$ac_cv_have_x"
8078fi # $with_x != no
8079
8080if test "$have_x" != yes; then
c0d27fcc 8081 echo "$as_me:$LINENO: result: $have_x" >&5
98418dba
CW
8082echo "${ECHO_T}$have_x" >&6
8083 no_x=yes
8084else
8085 # If each of the values was on the command line, it overrides each guess.
8086 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8087 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8088 # Update the cache value to reflect the command line values.
8089 ac_cv_have_x="have_x=yes \
8090 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
edfaf76d
LK
8091 # It might be that x_includes is empty (headers are found in the
8092 # standard search path. Then output the corresponding message
8093 ac_out_x_includes=$x_includes
8094 test "x$x_includes" = x && ac_out_x_includes="in standard search path"
8095 echo "$as_me:$LINENO: result: libraries $x_libraries, headers $ac_out_x_includes" >&5
8096echo "${ECHO_T}libraries $x_libraries, headers $ac_out_x_includes" >&6
98418dba
CW
8097fi
8098
8099if test "$no_x" = yes; then
8100 window_system=none
8101else
8102 window_system=x11
8103fi
8104
8105if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
8106 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
8107 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
8108 x_default_search_path=""
8109 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
8110 x_search_path="\
8111${x_library}/X11/%L/%T/%N%C%S:\
8112${x_library}/X11/%l/%T/%N%C%S:\
8113${x_library}/X11/%T/%N%C%S:\
8114${x_library}/X11/%L/%T/%N%S:\
8115${x_library}/X11/%l/%T/%N%S:\
8116${x_library}/X11/%T/%N%S"
8117 if test x"${x_default_search_path}" = x; then
8118 x_default_search_path=${x_search_path}
8119 else
8120 x_default_search_path="${x_search_path}:${x_default_search_path}"
8121 fi
8122 done
8123fi
8124if test "${x_includes}" != NONE && test -n "${x_includes}"; then
8125 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
8126fi
8127
8128if test x"${x_includes}" = x; then
8129 bitmapdir=/usr/include/X11/bitmaps
8130else
8131 # accumulate include directories that have X11 bitmap subdirectories
8132 bmd_acc="dummyval"
8133 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
8134 if test -d "${bmd}/X11/bitmaps"; then
8135 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
8136 fi
8137 if test -d "${bmd}/bitmaps"; then
8138 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
8139 fi
8140 done
8141 if test ${bmd_acc} != "dummyval"; then
8142 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
8143 fi
8144fi
8145
8146case "${window_system}" in
8147 x11 )
8148 HAVE_X_WINDOWS=yes
8149 HAVE_X11=yes
8150 case "${with_x_toolkit}" in
8151 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
8152 motif ) USE_X_TOOLKIT=MOTIF ;;
488dd4c4
JD
8153 gtk ) with_gtk=yes
8154 USE_X_TOOLKIT=none ;;
98418dba
CW
8155 no ) USE_X_TOOLKIT=none ;;
8156 * ) USE_X_TOOLKIT=maybe ;;
8157 esac
8158 ;;
8159 none )
8160 HAVE_X_WINDOWS=no
8161 HAVE_X11=no
8162 USE_X_TOOLKIT=none
8163 ;;
8164esac
8165
8166### If we're using X11, we should use the X menu package.
8167HAVE_MENUS=no
8168case ${HAVE_X11} in
8169 yes ) HAVE_MENUS=yes ;;
8170esac
8171
8172if test "${opsys}" = "hpux9"; then
8173 case "${x_libraries}" in
8174 *X11R4* )
8175 opsysfile="s/hpux9-x11r4.h"
8176 ;;
8177 esac
8178fi
8179
8180if test "${opsys}" = "hpux9shr"; then
8181 case "${x_libraries}" in
8182 *X11R4* )
8183 opsysfile="s/hpux9shxr4.h"
8184 ;;
8185 esac
8186fi
8187
5d6da11e
YM
8188HAVE_CARBON=no
8189if test "${HAVE_X11}" != "yes"; then
8190 if test "${with_carbon}" != "no"; then
8191 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
8192 echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
8193echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
8194if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
8195 echo $ECHO_N "(cached) $ECHO_C" >&6
8196fi
8197echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
8198echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
8199else
8200 # Is the header compilable?
8201echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
8202echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6
8203cat >conftest.$ac_ext <<_ACEOF
8204/* confdefs.h. */
8205_ACEOF
8206cat confdefs.h >>conftest.$ac_ext
8207cat >>conftest.$ac_ext <<_ACEOF
8208/* end confdefs.h. */
8209$ac_includes_default
8210#include <Carbon/Carbon.h>
8211_ACEOF
8212rm -f conftest.$ac_objext
8213if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 8214 (eval $ac_compile) 2>conftest.er1
5d6da11e 8215 ac_status=$?
edfaf76d
LK
8216 grep -v '^ *+' conftest.er1 >conftest.err
8217 rm -f conftest.er1
8218 cat conftest.err >&5
5d6da11e
YM
8219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8220 (exit $ac_status); } &&
edfaf76d
LK
8221 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8223 (eval $ac_try) 2>&5
8224 ac_status=$?
8225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8226 (exit $ac_status); }; } &&
8227 { ac_try='test -s conftest.$ac_objext'
5d6da11e
YM
8228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8229 (eval $ac_try) 2>&5
8230 ac_status=$?
8231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8232 (exit $ac_status); }; }; then
8233 ac_header_compiler=yes
8234else
8235 echo "$as_me: failed program was:" >&5
8236sed 's/^/| /' conftest.$ac_ext >&5
8237
8238ac_header_compiler=no
8239fi
edfaf76d 8240rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5d6da11e
YM
8241echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8242echo "${ECHO_T}$ac_header_compiler" >&6
8243
8244# Is the header present?
8245echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
8246echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6
8247cat >conftest.$ac_ext <<_ACEOF
8248/* confdefs.h. */
8249_ACEOF
8250cat confdefs.h >>conftest.$ac_ext
8251cat >>conftest.$ac_ext <<_ACEOF
8252/* end confdefs.h. */
8253#include <Carbon/Carbon.h>
8254_ACEOF
8255if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8256 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8257 ac_status=$?
8258 grep -v '^ *+' conftest.er1 >conftest.err
8259 rm -f conftest.er1
8260 cat conftest.err >&5
8261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8262 (exit $ac_status); } >/dev/null; then
8263 if test -s conftest.err; then
8264 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 8265 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5d6da11e
YM
8266 else
8267 ac_cpp_err=
8268 fi
8269else
8270 ac_cpp_err=yes
8271fi
8272if test -z "$ac_cpp_err"; then
8273 ac_header_preproc=yes
8274else
8275 echo "$as_me: failed program was:" >&5
8276sed 's/^/| /' conftest.$ac_ext >&5
8277
8278 ac_header_preproc=no
8279fi
8280rm -f conftest.err conftest.$ac_ext
8281echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8282echo "${ECHO_T}$ac_header_preproc" >&6
8283
8284# So? What about this header?
edfaf76d
LK
8285case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8286 yes:no: )
5d6da11e
YM
8287 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
8288echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
8289 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
8290echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
8291 ac_header_preproc=yes
5d6da11e 8292 ;;
edfaf76d 8293 no:yes:* )
5d6da11e
YM
8294 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
8295echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
edfaf76d
LK
8296 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
8297echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
8298 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
8299echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
8300 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
8301echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
5d6da11e
YM
8302 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
8303echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
8304 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
8305echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
5d6da11e
YM
8306 (
8307 cat <<\_ASBOX
edfaf76d
LK
8308## ------------------------------------------ ##
8309## Report this to the AC_PACKAGE_NAME lists. ##
8310## ------------------------------------------ ##
5d6da11e
YM
8311_ASBOX
8312 ) |
8313 sed "s/^/$as_me: WARNING: /" >&2
8314 ;;
8315esac
8316echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
8317echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
8318if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
8319 echo $ECHO_N "(cached) $ECHO_C" >&6
8320else
8321 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
8322fi
8323echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
8324echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
8325
8326fi
8327if test $ac_cv_header_Carbon_Carbon_h = yes; then
8328 HAVE_CARBON=yes
8329fi
8330
8331
8332 fi
8333fi
8334
98418dba
CW
8335### Compute the unexec source name from the object name.
8336UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
8337
8338# Do the opsystem or machine files prohibit the use of the GNU malloc?
8339# Assume not, until told otherwise.
8340GNU_MALLOC=yes
8341doug_lea_malloc=yes
c0d27fcc 8342echo "$as_me:$LINENO: checking for malloc_get_state" >&5
98418dba
CW
8343echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6
8344if test "${ac_cv_func_malloc_get_state+set}" = set; then
8345 echo $ECHO_N "(cached) $ECHO_C" >&6
8346else
8347 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8348/* confdefs.h. */
8349_ACEOF
8350cat confdefs.h >>conftest.$ac_ext
8351cat >>conftest.$ac_ext <<_ACEOF
8352/* end confdefs.h. */
edfaf76d
LK
8353/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
8354 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8355#define malloc_get_state innocuous_malloc_get_state
8356
98418dba 8357/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8358 which can conflict with char malloc_get_state (); below.
8359 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8360 <limits.h> exists even on freestanding compilers. */
edfaf76d 8361
19650fd6
AS
8362#ifdef __STDC__
8363# include <limits.h>
8364#else
8365# include <assert.h>
8366#endif
edfaf76d
LK
8367
8368#undef malloc_get_state
8369
98418dba
CW
8370/* Override any gcc2 internal prototype to avoid an error. */
8371#ifdef __cplusplus
8372extern "C"
19650fd6 8373{
98418dba
CW
8374#endif
8375/* We use char because int might match the return type of a gcc2
8376 builtin and then its argument prototype would still apply. */
8377char malloc_get_state ();
98418dba
CW
8378/* The GNU C library defines this for functions which it implements
8379 to always fail with ENOSYS. Some functions are actually named
8380 something starting with __ and the normal name is an alias. */
8381#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
8382choke me
8383#else
19650fd6
AS
8384char (*f) () = malloc_get_state;
8385#endif
8386#ifdef __cplusplus
8387}
98418dba
CW
8388#endif
8389
19650fd6
AS
8390int
8391main ()
8392{
8393return f != malloc_get_state;
98418dba
CW
8394 ;
8395 return 0;
8396}
8397_ACEOF
8398rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8399if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 8400 (eval $ac_link) 2>conftest.er1
98418dba 8401 ac_status=$?
edfaf76d
LK
8402 grep -v '^ *+' conftest.er1 >conftest.err
8403 rm -f conftest.er1
8404 cat conftest.err >&5
c0d27fcc 8405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8406 (exit $ac_status); } &&
edfaf76d
LK
8407 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8409 (eval $ac_try) 2>&5
8410 ac_status=$?
8411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8412 (exit $ac_status); }; } &&
8413 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8415 (eval $ac_try) 2>&5
8416 ac_status=$?
c0d27fcc 8417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8418 (exit $ac_status); }; }; then
8419 ac_cv_func_malloc_get_state=yes
8420else
8421 echo "$as_me: failed program was:" >&5
19650fd6
AS
8422sed 's/^/| /' conftest.$ac_ext >&5
8423
98418dba
CW
8424ac_cv_func_malloc_get_state=no
8425fi
edfaf76d
LK
8426rm -f conftest.err conftest.$ac_objext \
8427 conftest$ac_exeext conftest.$ac_ext
98418dba 8428fi
c0d27fcc 8429echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
98418dba
CW
8430echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6
8431if test $ac_cv_func_malloc_get_state = yes; then
8432 :
8433else
8434 doug_lea_malloc=no
8435fi
8436
c0d27fcc 8437echo "$as_me:$LINENO: checking for malloc_set_state" >&5
98418dba
CW
8438echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6
8439if test "${ac_cv_func_malloc_set_state+set}" = set; then
8440 echo $ECHO_N "(cached) $ECHO_C" >&6
8441else
8442 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8443/* confdefs.h. */
8444_ACEOF
8445cat confdefs.h >>conftest.$ac_ext
8446cat >>conftest.$ac_ext <<_ACEOF
8447/* end confdefs.h. */
edfaf76d
LK
8448/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
8449 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8450#define malloc_set_state innocuous_malloc_set_state
8451
98418dba 8452/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8453 which can conflict with char malloc_set_state (); below.
8454 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8455 <limits.h> exists even on freestanding compilers. */
edfaf76d 8456
19650fd6
AS
8457#ifdef __STDC__
8458# include <limits.h>
8459#else
8460# include <assert.h>
8461#endif
edfaf76d
LK
8462
8463#undef malloc_set_state
8464
98418dba
CW
8465/* Override any gcc2 internal prototype to avoid an error. */
8466#ifdef __cplusplus
8467extern "C"
19650fd6 8468{
98418dba
CW
8469#endif
8470/* We use char because int might match the return type of a gcc2
8471 builtin and then its argument prototype would still apply. */
8472char malloc_set_state ();
98418dba
CW
8473/* The GNU C library defines this for functions which it implements
8474 to always fail with ENOSYS. Some functions are actually named
8475 something starting with __ and the normal name is an alias. */
8476#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
8477choke me
8478#else
19650fd6
AS
8479char (*f) () = malloc_set_state;
8480#endif
8481#ifdef __cplusplus
8482}
98418dba
CW
8483#endif
8484
19650fd6
AS
8485int
8486main ()
8487{
8488return f != malloc_set_state;
98418dba
CW
8489 ;
8490 return 0;
8491}
8492_ACEOF
8493rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8494if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 8495 (eval $ac_link) 2>conftest.er1
98418dba 8496 ac_status=$?
edfaf76d
LK
8497 grep -v '^ *+' conftest.er1 >conftest.err
8498 rm -f conftest.er1
8499 cat conftest.err >&5
c0d27fcc 8500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8501 (exit $ac_status); } &&
edfaf76d
LK
8502 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8504 (eval $ac_try) 2>&5
8505 ac_status=$?
8506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8507 (exit $ac_status); }; } &&
8508 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8510 (eval $ac_try) 2>&5
8511 ac_status=$?
c0d27fcc 8512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8513 (exit $ac_status); }; }; then
8514 ac_cv_func_malloc_set_state=yes
8515else
8516 echo "$as_me: failed program was:" >&5
19650fd6
AS
8517sed 's/^/| /' conftest.$ac_ext >&5
8518
98418dba
CW
8519ac_cv_func_malloc_set_state=no
8520fi
edfaf76d
LK
8521rm -f conftest.err conftest.$ac_objext \
8522 conftest$ac_exeext conftest.$ac_ext
98418dba 8523fi
c0d27fcc 8524echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
98418dba
CW
8525echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6
8526if test $ac_cv_func_malloc_set_state = yes; then
8527 :
8528else
8529 doug_lea_malloc=no
8530fi
8531
c0d27fcc 8532echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
98418dba
CW
8533echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6
8534if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
8535 echo $ECHO_N "(cached) $ECHO_C" >&6
8536else
8537 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8538/* confdefs.h. */
8539_ACEOF
8540cat confdefs.h >>conftest.$ac_ext
8541cat >>conftest.$ac_ext <<_ACEOF
8542/* end confdefs.h. */
98418dba 8543extern void (* __after_morecore_hook)();
98418dba
CW
8544int
8545main ()
8546{
8547__after_morecore_hook = 0
8548 ;
8549 return 0;
8550}
8551_ACEOF
8552rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8553if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 8554 (eval $ac_link) 2>conftest.er1
98418dba 8555 ac_status=$?
edfaf76d
LK
8556 grep -v '^ *+' conftest.er1 >conftest.err
8557 rm -f conftest.er1
8558 cat conftest.err >&5
c0d27fcc 8559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8560 (exit $ac_status); } &&
edfaf76d
LK
8561 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8563 (eval $ac_try) 2>&5
8564 ac_status=$?
8565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8566 (exit $ac_status); }; } &&
8567 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8569 (eval $ac_try) 2>&5
8570 ac_status=$?
c0d27fcc 8571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8572 (exit $ac_status); }; }; then
8573 emacs_cv_var___after_morecore_hook=yes
8574else
8575 echo "$as_me: failed program was:" >&5
19650fd6
AS
8576sed 's/^/| /' conftest.$ac_ext >&5
8577
98418dba
CW
8578emacs_cv_var___after_morecore_hook=no
8579fi
edfaf76d
LK
8580rm -f conftest.err conftest.$ac_objext \
8581 conftest$ac_exeext conftest.$ac_ext
98418dba 8582fi
c0d27fcc 8583echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
98418dba
CW
8584echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6
8585if test $emacs_cv_var___after_morecore_hook = no; then
8586 doug_lea_malloc=no
8587fi
8588if test "${system_malloc}" = "yes"; then
8589 GNU_MALLOC=no
8590 GNU_MALLOC_reason="
8591 (The GNU allocators don't work with this system configuration.)"
8592fi
8593if test "$doug_lea_malloc" = "yes" ; then
8594 if test "$GNU_MALLOC" = yes ; then
8595 GNU_MALLOC_reason="
8596 (Using Doug Lea's new malloc from the GNU C Library.)"
8597 fi
b936fae4 8598
c0d27fcc 8599cat >>confdefs.h <<\_ACEOF
98418dba 8600#define DOUG_LEA_MALLOC 1
c0d27fcc 8601_ACEOF
98418dba
CW
8602
8603fi
8604
8605if test x"${REL_ALLOC}" = x; then
8606 REL_ALLOC=${GNU_MALLOC}
8607fi
8608
8609
c0d27fcc
MR
8610
8611
8612for ac_header in stdlib.h unistd.h
98418dba
CW
8613do
8614as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
8615if eval "test \"\${$as_ac_Header+set}\" = set"; then
8616 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
8617echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8618if eval "test \"\${$as_ac_Header+set}\" = set"; then
8619 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
8620fi
8621echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8622echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 8623else
c0d27fcc
MR
8624 # Is the header compilable?
8625echo "$as_me:$LINENO: checking $ac_header usability" >&5
8626echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8627cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8628/* confdefs.h. */
8629_ACEOF
8630cat confdefs.h >>conftest.$ac_ext
8631cat >>conftest.$ac_ext <<_ACEOF
8632/* end confdefs.h. */
98418dba
CW
8633$ac_includes_default
8634#include <$ac_header>
8635_ACEOF
8636rm -f conftest.$ac_objext
c0d27fcc 8637if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 8638 (eval $ac_compile) 2>conftest.er1
98418dba 8639 ac_status=$?
edfaf76d
LK
8640 grep -v '^ *+' conftest.er1 >conftest.err
8641 rm -f conftest.er1
8642 cat conftest.err >&5
c0d27fcc 8643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8644 (exit $ac_status); } &&
edfaf76d
LK
8645 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8647 (eval $ac_try) 2>&5
8648 ac_status=$?
8649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8650 (exit $ac_status); }; } &&
8651 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8653 (eval $ac_try) 2>&5
8654 ac_status=$?
c0d27fcc 8655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8656 (exit $ac_status); }; }; then
c0d27fcc 8657 ac_header_compiler=yes
98418dba
CW
8658else
8659 echo "$as_me: failed program was:" >&5
19650fd6
AS
8660sed 's/^/| /' conftest.$ac_ext >&5
8661
c0d27fcc 8662ac_header_compiler=no
98418dba 8663fi
edfaf76d 8664rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
8665echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8666echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 8667
c0d27fcc
MR
8668# Is the header present?
8669echo "$as_me:$LINENO: checking $ac_header presence" >&5
8670echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8671cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8672/* confdefs.h. */
8673_ACEOF
8674cat confdefs.h >>conftest.$ac_ext
8675cat >>conftest.$ac_ext <<_ACEOF
8676/* end confdefs.h. */
98418dba
CW
8677#include <$ac_header>
8678_ACEOF
c0d27fcc 8679if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
8680 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8681 ac_status=$?
6bae0ccf 8682 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
8683 rm -f conftest.er1
8684 cat conftest.err >&5
c0d27fcc 8685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8686 (exit $ac_status); } >/dev/null; then
8687 if test -s conftest.err; then
8688 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 8689 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
8690 else
8691 ac_cpp_err=
8692 fi
8693else
8694 ac_cpp_err=yes
8695fi
8696if test -z "$ac_cpp_err"; then
c0d27fcc 8697 ac_header_preproc=yes
98418dba
CW
8698else
8699 echo "$as_me: failed program was:" >&5
19650fd6
AS
8700sed 's/^/| /' conftest.$ac_ext >&5
8701
c0d27fcc 8702 ac_header_preproc=no
98418dba
CW
8703fi
8704rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
8705echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8706echo "${ECHO_T}$ac_header_preproc" >&6
8707
8708# So? What about this header?
edfaf76d
LK
8709case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8710 yes:no: )
c0d27fcc
MR
8711 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8712echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
8713 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8714echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8715 ac_header_preproc=yes
8716 ;;
8717 no:yes:* )
8718 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8719echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8720 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8721echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8722 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8723echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8724 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8725echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
8726 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8727echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
8728 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8729echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7c9e5167
JD
8730 (
8731 cat <<\_ASBOX
edfaf76d
LK
8732## ------------------------------------------ ##
8733## Report this to the AC_PACKAGE_NAME lists. ##
8734## ------------------------------------------ ##
19650fd6
AS
8735_ASBOX
8736 ) |
8737 sed "s/^/$as_me: WARNING: /" >&2
8738 ;;
c0d27fcc
MR
8739esac
8740echo "$as_me:$LINENO: checking for $ac_header" >&5
8741echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8742if eval "test \"\${$as_ac_Header+set}\" = set"; then
8743 echo $ECHO_N "(cached) $ECHO_C" >&6
8744else
edfaf76d 8745 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 8746fi
c0d27fcc 8747echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 8748echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
8749
8750fi
98418dba 8751if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 8752 cat >>confdefs.h <<_ACEOF
98418dba 8753#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 8754_ACEOF
98418dba
CW
8755
8756fi
c0d27fcc 8757
98418dba
CW
8758done
8759
c0d27fcc 8760
98418dba
CW
8761for ac_func in getpagesize
8762do
8763as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 8764echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
8765echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8766if eval "test \"\${$as_ac_var+set}\" = set"; then
8767 echo $ECHO_N "(cached) $ECHO_C" >&6
8768else
8769 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8770/* confdefs.h. */
8771_ACEOF
8772cat confdefs.h >>conftest.$ac_ext
8773cat >>conftest.$ac_ext <<_ACEOF
8774/* end confdefs.h. */
edfaf76d
LK
8775/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8776 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8777#define $ac_func innocuous_$ac_func
8778
98418dba 8779/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8780 which can conflict with char $ac_func (); below.
8781 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8782 <limits.h> exists even on freestanding compilers. */
edfaf76d 8783
19650fd6
AS
8784#ifdef __STDC__
8785# include <limits.h>
8786#else
8787# include <assert.h>
8788#endif
edfaf76d
LK
8789
8790#undef $ac_func
8791
98418dba
CW
8792/* Override any gcc2 internal prototype to avoid an error. */
8793#ifdef __cplusplus
8794extern "C"
19650fd6 8795{
98418dba
CW
8796#endif
8797/* We use char because int might match the return type of a gcc2
8798 builtin and then its argument prototype would still apply. */
8799char $ac_func ();
98418dba
CW
8800/* The GNU C library defines this for functions which it implements
8801 to always fail with ENOSYS. Some functions are actually named
8802 something starting with __ and the normal name is an alias. */
8803#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8804choke me
8805#else
19650fd6
AS
8806char (*f) () = $ac_func;
8807#endif
8808#ifdef __cplusplus
8809}
98418dba
CW
8810#endif
8811
19650fd6
AS
8812int
8813main ()
8814{
8815return f != $ac_func;
98418dba
CW
8816 ;
8817 return 0;
8818}
8819_ACEOF
8820rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8821if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 8822 (eval $ac_link) 2>conftest.er1
98418dba 8823 ac_status=$?
edfaf76d
LK
8824 grep -v '^ *+' conftest.er1 >conftest.err
8825 rm -f conftest.er1
8826 cat conftest.err >&5
c0d27fcc 8827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8828 (exit $ac_status); } &&
edfaf76d
LK
8829 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8831 (eval $ac_try) 2>&5
8832 ac_status=$?
8833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8834 (exit $ac_status); }; } &&
8835 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8837 (eval $ac_try) 2>&5
8838 ac_status=$?
c0d27fcc 8839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8840 (exit $ac_status); }; }; then
8841 eval "$as_ac_var=yes"
8842else
8843 echo "$as_me: failed program was:" >&5
19650fd6
AS
8844sed 's/^/| /' conftest.$ac_ext >&5
8845
98418dba
CW
8846eval "$as_ac_var=no"
8847fi
edfaf76d
LK
8848rm -f conftest.err conftest.$ac_objext \
8849 conftest$ac_exeext conftest.$ac_ext
98418dba 8850fi
c0d27fcc 8851echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
8852echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8853if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 8854 cat >>confdefs.h <<_ACEOF
98418dba 8855#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 8856_ACEOF
98418dba
CW
8857
8858fi
8859done
8860
c0d27fcc 8861echo "$as_me:$LINENO: checking for working mmap" >&5
98418dba
CW
8862echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
8863if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
8864 echo $ECHO_N "(cached) $ECHO_C" >&6
8865else
8866 if test "$cross_compiling" = yes; then
8867 ac_cv_func_mmap_fixed_mapped=no
8868else
8869 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8870/* confdefs.h. */
8871_ACEOF
8872cat confdefs.h >>conftest.$ac_ext
8873cat >>conftest.$ac_ext <<_ACEOF
8874/* end confdefs.h. */
98418dba 8875$ac_includes_default
c0d27fcc
MR
8876/* malloc might have been renamed as rpl_malloc. */
8877#undef malloc
8878
98418dba
CW
8879/* Thanks to Mike Haertel and Jim Avera for this test.
8880 Here is a matrix of mmap possibilities:
8881 mmap private not fixed
8882 mmap private fixed at somewhere currently unmapped
8883 mmap private fixed at somewhere already mapped
8884 mmap shared not fixed
8885 mmap shared fixed at somewhere currently unmapped
8886 mmap shared fixed at somewhere already mapped
8887 For private mappings, we should verify that changes cannot be read()
8888 back from the file, nor mmap's back from the file at a different
8889 address. (There have been systems where private was not correctly
8890 implemented like the infamous i386 svr4.0, and systems where the
8891 VM page cache was not coherent with the file system buffer cache
8892 like early versions of FreeBSD and possibly contemporary NetBSD.)
8893 For shared mappings, we should conversely verify that changes get
c0d27fcc 8894 propagated back to all the places they're supposed to be.
98418dba
CW
8895
8896 Grep wants private fixed already mapped.
8897 The main things grep needs to know about mmap are:
8898 * does it exist and is it safe to write into the mmap'd area
8899 * how to use it (BSD variants) */
8900
8901#include <fcntl.h>
8902#include <sys/mman.h>
8903
8904#if !STDC_HEADERS && !HAVE_STDLIB_H
8905char *malloc ();
8906#endif
8907
8908/* This mess was copied from the GNU getpagesize.h. */
8909#if !HAVE_GETPAGESIZE
8910/* Assume that all systems that can run configure have sys/param.h. */
8911# if !HAVE_SYS_PARAM_H
8912# define HAVE_SYS_PARAM_H 1
8913# endif
8914
8915# ifdef _SC_PAGESIZE
8916# define getpagesize() sysconf(_SC_PAGESIZE)
8917# else /* no _SC_PAGESIZE */
8918# if HAVE_SYS_PARAM_H
8919# include <sys/param.h>
8920# ifdef EXEC_PAGESIZE
8921# define getpagesize() EXEC_PAGESIZE
8922# else /* no EXEC_PAGESIZE */
8923# ifdef NBPG
8924# define getpagesize() NBPG * CLSIZE
8925# ifndef CLSIZE
8926# define CLSIZE 1
8927# endif /* no CLSIZE */
8928# else /* no NBPG */
8929# ifdef NBPC
8930# define getpagesize() NBPC
8931# else /* no NBPC */
8932# ifdef PAGESIZE
8933# define getpagesize() PAGESIZE
8934# endif /* PAGESIZE */
8935# endif /* no NBPC */
8936# endif /* no NBPG */
8937# endif /* no EXEC_PAGESIZE */
8938# else /* no HAVE_SYS_PARAM_H */
8939# define getpagesize() 8192 /* punt totally */
8940# endif /* no HAVE_SYS_PARAM_H */
8941# endif /* no _SC_PAGESIZE */
8942
8943#endif /* no HAVE_GETPAGESIZE */
8944
8945int
8946main ()
8947{
8948 char *data, *data2, *data3;
8949 int i, pagesize;
8950 int fd;
8951
8952 pagesize = getpagesize ();
8953
8954 /* First, make a file with some known garbage in it. */
8955 data = (char *) malloc (pagesize);
8956 if (!data)
8957 exit (1);
8958 for (i = 0; i < pagesize; ++i)
8959 *(data + i) = rand ();
8960 umask (0);
8961 fd = creat ("conftest.mmap", 0600);
8962 if (fd < 0)
8963 exit (1);
8964 if (write (fd, data, pagesize) != pagesize)
8965 exit (1);
8966 close (fd);
8967
8968 /* Next, try to mmap the file at a fixed address which already has
8969 something else allocated at it. If we can, also make sure that
8970 we see the same garbage. */
8971 fd = open ("conftest.mmap", O_RDWR);
8972 if (fd < 0)
8973 exit (1);
8974 data2 = (char *) malloc (2 * pagesize);
8975 if (!data2)
8976 exit (1);
edfaf76d 8977 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 8978 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 8979 MAP_PRIVATE | MAP_FIXED, fd, 0L))
98418dba
CW
8980 exit (1);
8981 for (i = 0; i < pagesize; ++i)
8982 if (*(data + i) != *(data2 + i))
8983 exit (1);
8984
8985 /* Finally, make sure that changes to the mapped area do not
8986 percolate back to the file as seen by read(). (This is a bug on
8987 some variants of i386 svr4.0.) */
8988 for (i = 0; i < pagesize; ++i)
8989 *(data2 + i) = *(data2 + i) + 1;
8990 data3 = (char *) malloc (pagesize);
8991 if (!data3)
8992 exit (1);
8993 if (read (fd, data3, pagesize) != pagesize)
8994 exit (1);
8995 for (i = 0; i < pagesize; ++i)
8996 if (*(data + i) != *(data3 + i))
8997 exit (1);
8998 close (fd);
8999 exit (0);
9000}
9001_ACEOF
9002rm -f conftest$ac_exeext
c0d27fcc 9003if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
9004 (eval $ac_link) 2>&5
9005 ac_status=$?
c0d27fcc 9006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9007 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 9008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9009 (eval $ac_try) 2>&5
9010 ac_status=$?
c0d27fcc 9011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9012 (exit $ac_status); }; }; then
9013 ac_cv_func_mmap_fixed_mapped=yes
9014else
9015 echo "$as_me: program exited with status $ac_status" >&5
9016echo "$as_me: failed program was:" >&5
19650fd6
AS
9017sed 's/^/| /' conftest.$ac_ext >&5
9018
c0d27fcc 9019( exit $ac_status )
98418dba
CW
9020ac_cv_func_mmap_fixed_mapped=no
9021fi
edfaf76d 9022rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba
CW
9023fi
9024fi
c0d27fcc 9025echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
98418dba
CW
9026echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
9027if test $ac_cv_func_mmap_fixed_mapped = yes; then
9028
c0d27fcc 9029cat >>confdefs.h <<\_ACEOF
98418dba 9030#define HAVE_MMAP 1
c0d27fcc 9031_ACEOF
98418dba
CW
9032
9033fi
9034rm -f conftest.mmap
9035
9036if test $use_mmap_for_buffers = yes; then
9037 REL_ALLOC=no
9038fi
9039
9040LIBS="$libsrc_libs $LIBS"
9041
c0d27fcc
MR
9042
9043echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
98418dba
CW
9044echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
9045if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
9046 echo $ECHO_N "(cached) $ECHO_C" >&6
9047else
9048 ac_check_lib_save_LIBS=$LIBS
9049LIBS="-ldnet $LIBS"
9050cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9051/* confdefs.h. */
9052_ACEOF
9053cat confdefs.h >>conftest.$ac_ext
9054cat >>conftest.$ac_ext <<_ACEOF
9055/* end confdefs.h. */
98418dba
CW
9056
9057/* Override any gcc2 internal prototype to avoid an error. */
9058#ifdef __cplusplus
9059extern "C"
9060#endif
9061/* We use char because int might match the return type of a gcc2
9062 builtin and then its argument prototype would still apply. */
9063char dnet_ntoa ();
98418dba
CW
9064int
9065main ()
9066{
9067dnet_ntoa ();
9068 ;
9069 return 0;
9070}
9071_ACEOF
9072rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9073if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9074 (eval $ac_link) 2>conftest.er1
98418dba 9075 ac_status=$?
edfaf76d
LK
9076 grep -v '^ *+' conftest.er1 >conftest.err
9077 rm -f conftest.er1
9078 cat conftest.err >&5
c0d27fcc 9079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9080 (exit $ac_status); } &&
edfaf76d
LK
9081 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9083 (eval $ac_try) 2>&5
9084 ac_status=$?
9085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9086 (exit $ac_status); }; } &&
9087 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9089 (eval $ac_try) 2>&5
9090 ac_status=$?
c0d27fcc 9091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9092 (exit $ac_status); }; }; then
9093 ac_cv_lib_dnet_dnet_ntoa=yes
9094else
9095 echo "$as_me: failed program was:" >&5
19650fd6
AS
9096sed 's/^/| /' conftest.$ac_ext >&5
9097
98418dba
CW
9098ac_cv_lib_dnet_dnet_ntoa=no
9099fi
edfaf76d
LK
9100rm -f conftest.err conftest.$ac_objext \
9101 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9102LIBS=$ac_check_lib_save_LIBS
9103fi
c0d27fcc 9104echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
98418dba
CW
9105echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
9106if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 9107 cat >>confdefs.h <<_ACEOF
98418dba 9108#define HAVE_LIBDNET 1
c0d27fcc 9109_ACEOF
98418dba
CW
9110
9111 LIBS="-ldnet $LIBS"
9112
9113fi
9114
c0d27fcc
MR
9115
9116echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
98418dba
CW
9117echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6
9118if test "${ac_cv_lib_Xbsd_main+set}" = set; then
9119 echo $ECHO_N "(cached) $ECHO_C" >&6
9120else
9121 ac_check_lib_save_LIBS=$LIBS
9122LIBS="-lXbsd $LIBS"
9123cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9124/* confdefs.h. */
9125_ACEOF
9126cat confdefs.h >>conftest.$ac_ext
9127cat >>conftest.$ac_ext <<_ACEOF
9128/* end confdefs.h. */
98418dba 9129
c0d27fcc 9130
98418dba
CW
9131int
9132main ()
9133{
9134main ();
9135 ;
9136 return 0;
9137}
9138_ACEOF
9139rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9140if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9141 (eval $ac_link) 2>conftest.er1
98418dba 9142 ac_status=$?
edfaf76d
LK
9143 grep -v '^ *+' conftest.er1 >conftest.err
9144 rm -f conftest.er1
9145 cat conftest.err >&5
c0d27fcc 9146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9147 (exit $ac_status); } &&
edfaf76d
LK
9148 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9150 (eval $ac_try) 2>&5
9151 ac_status=$?
9152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9153 (exit $ac_status); }; } &&
9154 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9156 (eval $ac_try) 2>&5
9157 ac_status=$?
c0d27fcc 9158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9159 (exit $ac_status); }; }; then
9160 ac_cv_lib_Xbsd_main=yes
9161else
9162 echo "$as_me: failed program was:" >&5
19650fd6
AS
9163sed 's/^/| /' conftest.$ac_ext >&5
9164
98418dba
CW
9165ac_cv_lib_Xbsd_main=no
9166fi
edfaf76d
LK
9167rm -f conftest.err conftest.$ac_objext \
9168 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9169LIBS=$ac_check_lib_save_LIBS
9170fi
c0d27fcc 9171echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
98418dba
CW
9172echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6
9173if test $ac_cv_lib_Xbsd_main = yes; then
9174 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
9175fi
9176
c0d27fcc
MR
9177
9178
9179echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
98418dba
CW
9180echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6
9181if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
9182 echo $ECHO_N "(cached) $ECHO_C" >&6
9183else
9184 ac_check_lib_save_LIBS=$LIBS
9185LIBS="-lpthreads $LIBS"
9186cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9187/* confdefs.h. */
9188_ACEOF
9189cat confdefs.h >>conftest.$ac_ext
9190cat >>conftest.$ac_ext <<_ACEOF
9191/* end confdefs.h. */
98418dba
CW
9192
9193/* Override any gcc2 internal prototype to avoid an error. */
9194#ifdef __cplusplus
9195extern "C"
9196#endif
9197/* We use char because int might match the return type of a gcc2
9198 builtin and then its argument prototype would still apply. */
9199char cma_open ();
98418dba
CW
9200int
9201main ()
9202{
9203cma_open ();
9204 ;
9205 return 0;
9206}
9207_ACEOF
9208rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9209if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9210 (eval $ac_link) 2>conftest.er1
98418dba 9211 ac_status=$?
edfaf76d
LK
9212 grep -v '^ *+' conftest.er1 >conftest.err
9213 rm -f conftest.er1
9214 cat conftest.err >&5
c0d27fcc 9215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9216 (exit $ac_status); } &&
edfaf76d
LK
9217 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9219 (eval $ac_try) 2>&5
9220 ac_status=$?
9221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9222 (exit $ac_status); }; } &&
9223 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9225 (eval $ac_try) 2>&5
9226 ac_status=$?
c0d27fcc 9227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9228 (exit $ac_status); }; }; then
9229 ac_cv_lib_pthreads_cma_open=yes
9230else
9231 echo "$as_me: failed program was:" >&5
19650fd6
AS
9232sed 's/^/| /' conftest.$ac_ext >&5
9233
98418dba
CW
9234ac_cv_lib_pthreads_cma_open=no
9235fi
edfaf76d
LK
9236rm -f conftest.err conftest.$ac_objext \
9237 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9238LIBS=$ac_check_lib_save_LIBS
9239fi
c0d27fcc 9240echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
98418dba
CW
9241echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6
9242if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 9243 cat >>confdefs.h <<_ACEOF
98418dba 9244#define HAVE_LIBPTHREADS 1
c0d27fcc 9245_ACEOF
98418dba
CW
9246
9247 LIBS="-lpthreads $LIBS"
9248
9249fi
9250
c0d27fcc
MR
9251
9252echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
98418dba
CW
9253echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6
9254if test -d /usr/X386/include; then
9255 HAVE_XFREE386=yes
9256 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
9257else
9258 HAVE_XFREE386=no
9259fi
c0d27fcc 9260echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
98418dba
CW
9261echo "${ECHO_T}$HAVE_XFREE386" >&6
9262
55597d70
DL
9263
9264case ${host_os} in
9265aix*)
9266 echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
9267echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6
9268if test "${gdb_cv_bigtoc+set}" = set; then
9269 echo $ECHO_N "(cached) $ECHO_C" >&6
9270else
9271
9272 case $GCC in
9273 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
9274 *) gdb_cv_bigtoc=-bbigtoc ;;
9275 esac
9276
9277 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
9278 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9279/* confdefs.h. */
9280_ACEOF
9281cat confdefs.h >>conftest.$ac_ext
9282cat >>conftest.$ac_ext <<_ACEOF
9283/* end confdefs.h. */
55597d70
DL
9284
9285int
9286main ()
9287{
9288int i;
9289 ;
9290 return 0;
9291}
9292_ACEOF
9293rm -f conftest.$ac_objext conftest$ac_exeext
9294if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9295 (eval $ac_link) 2>conftest.er1
55597d70 9296 ac_status=$?
edfaf76d
LK
9297 grep -v '^ *+' conftest.er1 >conftest.err
9298 rm -f conftest.er1
9299 cat conftest.err >&5
55597d70
DL
9300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9301 (exit $ac_status); } &&
edfaf76d
LK
9302 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9304 (eval $ac_try) 2>&5
9305 ac_status=$?
9306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9307 (exit $ac_status); }; } &&
9308 { ac_try='test -s conftest$ac_exeext'
55597d70
DL
9309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9310 (eval $ac_try) 2>&5
9311 ac_status=$?
9312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9313 (exit $ac_status); }; }; then
9314 :
9315else
9316 echo "$as_me: failed program was:" >&5
19650fd6
AS
9317sed 's/^/| /' conftest.$ac_ext >&5
9318
55597d70
DL
9319gdb_cv_bigtoc=
9320fi
edfaf76d
LK
9321rm -f conftest.err conftest.$ac_objext \
9322 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
9323
9324fi
9325echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
9326echo "${ECHO_T}$gdb_cv_bigtoc" >&6
9327 ;;
9328esac
9329
ae1a998c
RS
9330# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
9331# used for the tests that follow. We set them back to REAL_CFLAGS and
9332# REAL_CPPFLAGS later on.
98418dba
CW
9333
9334REAL_CPPFLAGS="$CPPFLAGS"
9335
9336if test "${HAVE_X11}" = "yes"; then
9337 DEFS="$C_SWITCH_X_SITE $DEFS"
9338 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
9339 LIBS="$LIBX $LIBS"
9340 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
9341 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
9342
9343 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
9344 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
9345 # but it's more convenient here to set LD_RUN_PATH
9346 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
9347 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
9348 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
9349 export LD_RUN_PATH
9350 fi
9351
9352 if test "${opsys}" = "gnu-linux"; then
c0d27fcc 9353 echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
98418dba
CW
9354echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6
9355 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9356/* confdefs.h. */
9357_ACEOF
9358cat confdefs.h >>conftest.$ac_ext
9359cat >>conftest.$ac_ext <<_ACEOF
9360/* end confdefs.h. */
98418dba 9361
98418dba
CW
9362int
9363main ()
9364{
9365XOpenDisplay ("foo");
9366 ;
9367 return 0;
9368}
9369_ACEOF
9370rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9371if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9372 (eval $ac_link) 2>conftest.er1
98418dba 9373 ac_status=$?
edfaf76d
LK
9374 grep -v '^ *+' conftest.er1 >conftest.err
9375 rm -f conftest.er1
9376 cat conftest.err >&5
c0d27fcc 9377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9378 (exit $ac_status); } &&
edfaf76d
LK
9379 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9380 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9381 (eval $ac_try) 2>&5
9382 ac_status=$?
9383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9384 (exit $ac_status); }; } &&
9385 { ac_try='test -s conftest$ac_exeext'
35996d22
AS
9386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9387 (eval $ac_try) 2>&5
9388 ac_status=$?
9389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9390 (exit $ac_status); }; }; then
9391 xlinux_first_failure=no
98418dba
CW
9392else
9393 echo "$as_me: failed program was:" >&5
19650fd6
AS
9394sed 's/^/| /' conftest.$ac_ext >&5
9395
98418dba
CW
9396xlinux_first_failure=yes
9397fi
edfaf76d
LK
9398rm -f conftest.err conftest.$ac_objext \
9399 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9400 if test "${xlinux_first_failure}" = "yes"; then
9401 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
9402 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
9403 OLD_CPPFLAGS="$CPPFLAGS"
9404 OLD_LIBS="$LIBS"
9405 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
9406 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
9407 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
9408 LIBS="$LIBS -b i486-linuxaout"
9409 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9410/* confdefs.h. */
9411_ACEOF
9412cat confdefs.h >>conftest.$ac_ext
9413cat >>conftest.$ac_ext <<_ACEOF
9414/* end confdefs.h. */
98418dba 9415
98418dba
CW
9416int
9417main ()
9418{
9419XOpenDisplay ("foo");
9420 ;
9421 return 0;
9422}
9423_ACEOF
9424rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9425if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9426 (eval $ac_link) 2>conftest.er1
98418dba 9427 ac_status=$?
edfaf76d
LK
9428 grep -v '^ *+' conftest.er1 >conftest.err
9429 rm -f conftest.er1
9430 cat conftest.err >&5
c0d27fcc 9431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9432 (exit $ac_status); } &&
edfaf76d
LK
9433 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9435 (eval $ac_try) 2>&5
9436 ac_status=$?
9437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9438 (exit $ac_status); }; } &&
9439 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9441 (eval $ac_try) 2>&5
9442 ac_status=$?
c0d27fcc 9443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9444 (exit $ac_status); }; }; then
9445 xlinux_second_failure=no
9446else
9447 echo "$as_me: failed program was:" >&5
19650fd6
AS
9448sed 's/^/| /' conftest.$ac_ext >&5
9449
98418dba
CW
9450xlinux_second_failure=yes
9451fi
edfaf76d
LK
9452rm -f conftest.err conftest.$ac_objext \
9453 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9454 if test "${xlinux_second_failure}" = "yes"; then
9455 # If we get the same failure with -b, there is no use adding -b.
9456 # So take it out. This plays safe.
9457 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
9458 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
9459 CPPFLAGS="$OLD_CPPFLAGS"
9460 LIBS="$OLD_LIBS"
c0d27fcc 9461 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
9462echo "${ECHO_T}no" >&6
9463 else
c0d27fcc 9464 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
9465echo "${ECHO_T}yes" >&6
9466 fi
9467 else
c0d27fcc 9468 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
9469echo "${ECHO_T}no" >&6
9470 fi
9471 fi
9472
9473 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
9474 # header files included from there.
c0d27fcc 9475 echo "$as_me:$LINENO: checking for Xkb" >&5
98418dba
CW
9476echo $ECHO_N "checking for Xkb... $ECHO_C" >&6
9477 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9478/* confdefs.h. */
9479_ACEOF
9480cat confdefs.h >>conftest.$ac_ext
9481cat >>conftest.$ac_ext <<_ACEOF
9482/* end confdefs.h. */
98418dba
CW
9483#include <X11/Xlib.h>
9484#include <X11/XKBlib.h>
98418dba
CW
9485int
9486main ()
9487{
9488XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
9489 ;
9490 return 0;
9491}
9492_ACEOF
9493rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9494if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9495 (eval $ac_link) 2>conftest.er1
98418dba 9496 ac_status=$?
edfaf76d
LK
9497 grep -v '^ *+' conftest.er1 >conftest.err
9498 rm -f conftest.er1
9499 cat conftest.err >&5
c0d27fcc 9500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9501 (exit $ac_status); } &&
edfaf76d
LK
9502 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9504 (eval $ac_try) 2>&5
9505 ac_status=$?
9506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9507 (exit $ac_status); }; } &&
9508 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9510 (eval $ac_try) 2>&5
9511 ac_status=$?
c0d27fcc 9512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9513 (exit $ac_status); }; }; then
9514 emacs_xkb=yes
9515else
9516 echo "$as_me: failed program was:" >&5
19650fd6
AS
9517sed 's/^/| /' conftest.$ac_ext >&5
9518
98418dba
CW
9519emacs_xkb=no
9520fi
edfaf76d
LK
9521rm -f conftest.err conftest.$ac_objext \
9522 conftest$ac_exeext conftest.$ac_ext
c0d27fcc 9523 echo "$as_me:$LINENO: result: $emacs_xkb" >&5
98418dba
CW
9524echo "${ECHO_T}$emacs_xkb" >&6
9525 if test $emacs_xkb = yes; then
b936fae4 9526
c0d27fcc 9527cat >>confdefs.h <<\_ACEOF
98418dba 9528#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 9529_ACEOF
98418dba
CW
9530
9531 fi
9532
c0d27fcc
MR
9533
9534
9535
9536
98418dba
CW
9537for ac_func in XrmSetDatabase XScreenResourceString \
9538XScreenNumberOfScreen XSetWMProtocols
9539do
9540as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 9541echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
9542echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9543if eval "test \"\${$as_ac_var+set}\" = set"; then
9544 echo $ECHO_N "(cached) $ECHO_C" >&6
9545else
9546 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9547/* confdefs.h. */
9548_ACEOF
9549cat confdefs.h >>conftest.$ac_ext
9550cat >>conftest.$ac_ext <<_ACEOF
9551/* end confdefs.h. */
edfaf76d
LK
9552/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9553 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9554#define $ac_func innocuous_$ac_func
9555
98418dba 9556/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9557 which can conflict with char $ac_func (); below.
9558 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9559 <limits.h> exists even on freestanding compilers. */
edfaf76d 9560
19650fd6
AS
9561#ifdef __STDC__
9562# include <limits.h>
9563#else
9564# include <assert.h>
9565#endif
edfaf76d
LK
9566
9567#undef $ac_func
9568
98418dba
CW
9569/* Override any gcc2 internal prototype to avoid an error. */
9570#ifdef __cplusplus
9571extern "C"
19650fd6 9572{
98418dba
CW
9573#endif
9574/* We use char because int might match the return type of a gcc2
9575 builtin and then its argument prototype would still apply. */
9576char $ac_func ();
98418dba
CW
9577/* The GNU C library defines this for functions which it implements
9578 to always fail with ENOSYS. Some functions are actually named
9579 something starting with __ and the normal name is an alias. */
9580#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9581choke me
9582#else
19650fd6
AS
9583char (*f) () = $ac_func;
9584#endif
9585#ifdef __cplusplus
9586}
98418dba
CW
9587#endif
9588
19650fd6
AS
9589int
9590main ()
9591{
9592return f != $ac_func;
98418dba
CW
9593 ;
9594 return 0;
9595}
9596_ACEOF
9597rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9598if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9599 (eval $ac_link) 2>conftest.er1
98418dba 9600 ac_status=$?
edfaf76d
LK
9601 grep -v '^ *+' conftest.er1 >conftest.err
9602 rm -f conftest.er1
9603 cat conftest.err >&5
c0d27fcc 9604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9605 (exit $ac_status); } &&
edfaf76d
LK
9606 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9608 (eval $ac_try) 2>&5
9609 ac_status=$?
9610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9611 (exit $ac_status); }; } &&
9612 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9614 (eval $ac_try) 2>&5
9615 ac_status=$?
c0d27fcc 9616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9617 (exit $ac_status); }; }; then
9618 eval "$as_ac_var=yes"
9619else
9620 echo "$as_me: failed program was:" >&5
19650fd6
AS
9621sed 's/^/| /' conftest.$ac_ext >&5
9622
98418dba
CW
9623eval "$as_ac_var=no"
9624fi
edfaf76d
LK
9625rm -f conftest.err conftest.$ac_objext \
9626 conftest$ac_exeext conftest.$ac_ext
98418dba 9627fi
c0d27fcc 9628echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
9629echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9630if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 9631 cat >>confdefs.h <<_ACEOF
98418dba 9632#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 9633_ACEOF
98418dba
CW
9634
9635fi
9636done
9637
9638fi
9639
9640if test "${window_system}" = "x11"; then
c0d27fcc 9641 echo "$as_me:$LINENO: checking X11 version 6" >&5
98418dba
CW
9642echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6
9643 if test "${emacs_cv_x11_version_6+set}" = set; then
9644 echo $ECHO_N "(cached) $ECHO_C" >&6
9645else
9646 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9647/* confdefs.h. */
9648_ACEOF
9649cat confdefs.h >>conftest.$ac_ext
9650cat >>conftest.$ac_ext <<_ACEOF
9651/* end confdefs.h. */
98418dba 9652#include <X11/Xlib.h>
98418dba
CW
9653int
9654main ()
9655{
9656#if XlibSpecificationRelease < 6
9657fail;
9658#endif
9659
9660 ;
9661 return 0;
9662}
9663_ACEOF
9664rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9665if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9666 (eval $ac_link) 2>conftest.er1
98418dba 9667 ac_status=$?
edfaf76d
LK
9668 grep -v '^ *+' conftest.er1 >conftest.err
9669 rm -f conftest.er1
9670 cat conftest.err >&5
c0d27fcc 9671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9672 (exit $ac_status); } &&
edfaf76d
LK
9673 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9675 (eval $ac_try) 2>&5
9676 ac_status=$?
9677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9678 (exit $ac_status); }; } &&
9679 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9681 (eval $ac_try) 2>&5
9682 ac_status=$?
c0d27fcc 9683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9684 (exit $ac_status); }; }; then
9685 emacs_cv_x11_version_6=yes
9686else
9687 echo "$as_me: failed program was:" >&5
19650fd6
AS
9688sed 's/^/| /' conftest.$ac_ext >&5
9689
98418dba
CW
9690emacs_cv_x11_version_6=no
9691fi
edfaf76d
LK
9692rm -f conftest.err conftest.$ac_objext \
9693 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9694fi
9695
9696 if test $emacs_cv_x11_version_6 = yes; then
c0d27fcc 9697 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 9698echo "${ECHO_T}6 or newer" >&6
b936fae4 9699
c0d27fcc 9700cat >>confdefs.h <<\_ACEOF
98418dba 9701#define HAVE_X11R6 1
c0d27fcc 9702_ACEOF
98418dba
CW
9703
9704 else
c0d27fcc 9705 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
9706echo "${ECHO_T}before 6" >&6
9707 fi
9708fi
9709
9710if test "${window_system}" = "x11"; then
c0d27fcc 9711 echo "$as_me:$LINENO: checking X11 version 5" >&5
98418dba
CW
9712echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6
9713 if test "${emacs_cv_x11_version_5+set}" = set; then
9714 echo $ECHO_N "(cached) $ECHO_C" >&6
9715else
9716 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9717/* confdefs.h. */
9718_ACEOF
9719cat confdefs.h >>conftest.$ac_ext
9720cat >>conftest.$ac_ext <<_ACEOF
9721/* end confdefs.h. */
98418dba 9722#include <X11/Xlib.h>
98418dba
CW
9723int
9724main ()
9725{
9726#if XlibSpecificationRelease < 5
9727fail;
9728#endif
9729
9730 ;
9731 return 0;
9732}
9733_ACEOF
9734rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9735if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9736 (eval $ac_link) 2>conftest.er1
98418dba 9737 ac_status=$?
edfaf76d
LK
9738 grep -v '^ *+' conftest.er1 >conftest.err
9739 rm -f conftest.er1
9740 cat conftest.err >&5
c0d27fcc 9741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9742 (exit $ac_status); } &&
edfaf76d
LK
9743 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9744 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9745 (eval $ac_try) 2>&5
9746 ac_status=$?
9747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9748 (exit $ac_status); }; } &&
9749 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9751 (eval $ac_try) 2>&5
9752 ac_status=$?
c0d27fcc 9753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9754 (exit $ac_status); }; }; then
9755 emacs_cv_x11_version_5=yes
9756else
9757 echo "$as_me: failed program was:" >&5
19650fd6
AS
9758sed 's/^/| /' conftest.$ac_ext >&5
9759
98418dba
CW
9760emacs_cv_x11_version_5=no
9761fi
edfaf76d
LK
9762rm -f conftest.err conftest.$ac_objext \
9763 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9764fi
9765
9766 if test $emacs_cv_x11_version_5 = yes; then
c0d27fcc 9767 echo "$as_me:$LINENO: result: 5 or newer" >&5
98418dba
CW
9768echo "${ECHO_T}5 or newer" >&6
9769 HAVE_X11R5=yes
b936fae4 9770
c0d27fcc 9771cat >>confdefs.h <<\_ACEOF
98418dba 9772#define HAVE_X11R5 1
c0d27fcc 9773_ACEOF
98418dba
CW
9774
9775 else
9776 HAVE_X11R5=no
c0d27fcc 9777 echo "$as_me:$LINENO: result: before 5" >&5
98418dba
CW
9778echo "${ECHO_T}before 5" >&6
9779 fi
9780fi
9781
488dd4c4
JD
9782
9783
9784HAVE_GTK=no
9785if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
cd890796 9786 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
488dd4c4
JD
9787 { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
9788echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
9789 { (exit 1); exit 1; }; };
9790 fi
9791 GLIB_REQUIRED=2.0.1
e512ece1 9792 GTK_REQUIRED=2.0.1
488dd4c4
JD
9793 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
9794
9795 if test "X${with_pkg_config_prog}" != X; then
9796 PKG_CONFIG="${with_pkg_config_prog}"
9797 fi
9798
9799 succeeded=no
9800
9801 if test -z "$PKG_CONFIG"; then
9802 # Extract the first word of "pkg-config", so it can be a program name with args.
9803set dummy pkg-config; ac_word=$2
9804echo "$as_me:$LINENO: checking for $ac_word" >&5
9805echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9806if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
9807 echo $ECHO_N "(cached) $ECHO_C" >&6
9808else
9809 case $PKG_CONFIG in
9810 [\\/]* | ?:[\\/]*)
9811 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9812 ;;
9813 *)
9814 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9815for as_dir in $PATH
9816do
9817 IFS=$as_save_IFS
9818 test -z "$as_dir" && as_dir=.
9819 for ac_exec_ext in '' $ac_executable_extensions; do
9820 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9821 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9822 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9823 break 2
9824 fi
9825done
9826done
9827
9828 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9829 ;;
9830esac
9831fi
9832PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9833
9834if test -n "$PKG_CONFIG"; then
9835 echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
9836echo "${ECHO_T}$PKG_CONFIG" >&6
9837else
9838 echo "$as_me:$LINENO: result: no" >&5
9839echo "${ECHO_T}no" >&6
9840fi
9841
9842 fi
9843
9844 if test "$PKG_CONFIG" = "no" ; then
9845 echo "*** The pkg-config script could not be found. Make sure it is"
9846 echo "*** in your path, or give the full path to pkg-config with"
9847 echo "*** the PKG_CONFIG environment variable or --with-pkg-config-prog."
9848 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
9849 else
9850 PKG_CONFIG_MIN_VERSION=0.9.0
9851 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9852 echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
9853echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6
9854
9855 if $PKG_CONFIG --exists "$GTK_MODULES" ; then
9856 echo "$as_me:$LINENO: result: yes" >&5
9857echo "${ECHO_T}yes" >&6
9858 succeeded=yes
9859
9860 echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
9861echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6
9862 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"`
9863 echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
9864echo "${ECHO_T}$GTK_CFLAGS" >&6
9865
9866 echo "$as_me:$LINENO: checking GTK_LIBS" >&5
9867echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6
9868 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"`
9869 echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
9870echo "${ECHO_T}$GTK_LIBS" >&6
9871 else
9872 GTK_CFLAGS=""
9873 GTK_LIBS=""
9874 ## If we have a custom action on failure, don't print errors, but
9875 ## do set a variable so people can do so.
9876 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
9877 echo $GTK_PKG_ERRORS
9878 fi
9879
9880
9881
9882 else
9883 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9884 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9885 fi
9886 fi
9887
9888 if test $succeeded = yes; then
9889 :
9890 else
9891 { { 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
9892echo "$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;}
9893 { (exit 1); exit 1; }; }
9894 fi
9895
9896
9897
9898 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
9899 CFLAGS="$CFLAGS $GTK_CFLAGS"
9900 LIBS="$GTK_LIBS $LIBS"
488dd4c4
JD
9901 HAVE_GTK=yes
9902
9903cat >>confdefs.h <<\_ACEOF
9904#define HAVE_GTK 1
9905_ACEOF
9906
9907 USE_X_TOOLKIT=none
9908
d0a80c21
JD
9909 if test "$with_toolkit_scroll_bars" != no; then
9910 with_toolkit_scroll_bars=yes
9911 fi
57669b57
JD
9912
9913 HAVE_GTK_MULTIDISPLAY=no
9914
9915for ac_func in gdk_display_open
9916do
9917as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9918echo "$as_me:$LINENO: checking for $ac_func" >&5
9919echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9920if eval "test \"\${$as_ac_var+set}\" = set"; then
9921 echo $ECHO_N "(cached) $ECHO_C" >&6
9922else
9923 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
9924/* confdefs.h. */
9925_ACEOF
9926cat confdefs.h >>conftest.$ac_ext
9927cat >>conftest.$ac_ext <<_ACEOF
9928/* end confdefs.h. */
edfaf76d
LK
9929/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9930 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9931#define $ac_func innocuous_$ac_func
9932
57669b57
JD
9933/* System header to define __stub macros and hopefully few prototypes,
9934 which can conflict with char $ac_func (); below.
9935 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9936 <limits.h> exists even on freestanding compilers. */
edfaf76d 9937
57669b57
JD
9938#ifdef __STDC__
9939# include <limits.h>
9940#else
9941# include <assert.h>
9942#endif
edfaf76d
LK
9943
9944#undef $ac_func
9945
57669b57
JD
9946/* Override any gcc2 internal prototype to avoid an error. */
9947#ifdef __cplusplus
9948extern "C"
9949{
9950#endif
9951/* We use char because int might match the return type of a gcc2
9952 builtin and then its argument prototype would still apply. */
9953char $ac_func ();
9954/* The GNU C library defines this for functions which it implements
9955 to always fail with ENOSYS. Some functions are actually named
9956 something starting with __ and the normal name is an alias. */
9957#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9958choke me
9959#else
9960char (*f) () = $ac_func;
9961#endif
9962#ifdef __cplusplus
9963}
9964#endif
9965
9966int
9967main ()
9968{
9969return f != $ac_func;
9970 ;
9971 return 0;
9972}
9973_ACEOF
9974rm -f conftest.$ac_objext conftest$ac_exeext
9975if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9976 (eval $ac_link) 2>conftest.er1
57669b57 9977 ac_status=$?
edfaf76d
LK
9978 grep -v '^ *+' conftest.er1 >conftest.err
9979 rm -f conftest.er1
9980 cat conftest.err >&5
57669b57
JD
9981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9982 (exit $ac_status); } &&
edfaf76d
LK
9983 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9985 (eval $ac_try) 2>&5
9986 ac_status=$?
9987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9988 (exit $ac_status); }; } &&
9989 { ac_try='test -s conftest$ac_exeext'
57669b57
JD
9990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9991 (eval $ac_try) 2>&5
9992 ac_status=$?
9993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9994 (exit $ac_status); }; }; then
9995 eval "$as_ac_var=yes"
9996else
9997 echo "$as_me: failed program was:" >&5
9998sed 's/^/| /' conftest.$ac_ext >&5
9999
10000eval "$as_ac_var=no"
10001fi
edfaf76d
LK
10002rm -f conftest.err conftest.$ac_objext \
10003 conftest$ac_exeext conftest.$ac_ext
57669b57
JD
10004fi
10005echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10006echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10007if test `eval echo '${'$as_ac_var'}'` = yes; then
10008 cat >>confdefs.h <<_ACEOF
10009#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10010_ACEOF
10011 HAVE_GTK_MULTIDISPLAY=yes
10012fi
10013done
10014
10015 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
10016
10017cat >>confdefs.h <<\_ACEOF
10018#define HAVE_GTK_MULTIDISPLAY 1
572a3cc2
JD
10019_ACEOF
10020
10021 fi
10022 HAVE_GTK_FILE_SELECTION=no
10023
10024for ac_func in gtk_file_selection_new
10025do
10026as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10027echo "$as_me:$LINENO: checking for $ac_func" >&5
10028echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10029if eval "test \"\${$as_ac_var+set}\" = set"; then
10030 echo $ECHO_N "(cached) $ECHO_C" >&6
10031else
10032 cat >conftest.$ac_ext <<_ACEOF
10033/* confdefs.h. */
10034_ACEOF
10035cat confdefs.h >>conftest.$ac_ext
10036cat >>conftest.$ac_ext <<_ACEOF
10037/* end confdefs.h. */
edfaf76d
LK
10038/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10039 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10040#define $ac_func innocuous_$ac_func
10041
572a3cc2
JD
10042/* System header to define __stub macros and hopefully few prototypes,
10043 which can conflict with char $ac_func (); below.
10044 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10045 <limits.h> exists even on freestanding compilers. */
edfaf76d 10046
572a3cc2
JD
10047#ifdef __STDC__
10048# include <limits.h>
10049#else
10050# include <assert.h>
10051#endif
edfaf76d
LK
10052
10053#undef $ac_func
10054
572a3cc2
JD
10055/* Override any gcc2 internal prototype to avoid an error. */
10056#ifdef __cplusplus
10057extern "C"
10058{
10059#endif
10060/* We use char because int might match the return type of a gcc2
10061 builtin and then its argument prototype would still apply. */
10062char $ac_func ();
10063/* The GNU C library defines this for functions which it implements
10064 to always fail with ENOSYS. Some functions are actually named
10065 something starting with __ and the normal name is an alias. */
10066#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10067choke me
10068#else
10069char (*f) () = $ac_func;
10070#endif
10071#ifdef __cplusplus
10072}
10073#endif
10074
10075int
10076main ()
10077{
10078return f != $ac_func;
10079 ;
10080 return 0;
10081}
10082_ACEOF
10083rm -f conftest.$ac_objext conftest$ac_exeext
10084if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10085 (eval $ac_link) 2>conftest.er1
572a3cc2 10086 ac_status=$?
edfaf76d
LK
10087 grep -v '^ *+' conftest.er1 >conftest.err
10088 rm -f conftest.er1
10089 cat conftest.err >&5
572a3cc2
JD
10090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10091 (exit $ac_status); } &&
edfaf76d
LK
10092 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10094 (eval $ac_try) 2>&5
10095 ac_status=$?
10096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10097 (exit $ac_status); }; } &&
10098 { ac_try='test -s conftest$ac_exeext'
572a3cc2
JD
10099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10100 (eval $ac_try) 2>&5
10101 ac_status=$?
10102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10103 (exit $ac_status); }; }; then
10104 eval "$as_ac_var=yes"
10105else
10106 echo "$as_me: failed program was:" >&5
10107sed 's/^/| /' conftest.$ac_ext >&5
10108
10109eval "$as_ac_var=no"
10110fi
edfaf76d
LK
10111rm -f conftest.err conftest.$ac_objext \
10112 conftest$ac_exeext conftest.$ac_ext
572a3cc2
JD
10113fi
10114echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10115echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10116if test `eval echo '${'$as_ac_var'}'` = yes; then
10117 cat >>confdefs.h <<_ACEOF
10118#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10119_ACEOF
10120 HAVE_GTK_FILE_SELECTION=yes
10121fi
10122done
10123
10124
10125 HAVE_GTK_FILE_CHOOSER=no
10126
10127for ac_func in gtk_file_chooser_dialog_new
10128do
10129as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10130echo "$as_me:$LINENO: checking for $ac_func" >&5
10131echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10132if eval "test \"\${$as_ac_var+set}\" = set"; then
10133 echo $ECHO_N "(cached) $ECHO_C" >&6
10134else
10135 cat >conftest.$ac_ext <<_ACEOF
10136/* confdefs.h. */
10137_ACEOF
10138cat confdefs.h >>conftest.$ac_ext
10139cat >>conftest.$ac_ext <<_ACEOF
10140/* end confdefs.h. */
edfaf76d
LK
10141/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10142 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10143#define $ac_func innocuous_$ac_func
10144
572a3cc2
JD
10145/* System header to define __stub macros and hopefully few prototypes,
10146 which can conflict with char $ac_func (); below.
10147 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10148 <limits.h> exists even on freestanding compilers. */
edfaf76d 10149
572a3cc2
JD
10150#ifdef __STDC__
10151# include <limits.h>
10152#else
10153# include <assert.h>
10154#endif
edfaf76d
LK
10155
10156#undef $ac_func
10157
572a3cc2
JD
10158/* Override any gcc2 internal prototype to avoid an error. */
10159#ifdef __cplusplus
10160extern "C"
10161{
10162#endif
10163/* We use char because int might match the return type of a gcc2
10164 builtin and then its argument prototype would still apply. */
10165char $ac_func ();
10166/* The GNU C library defines this for functions which it implements
10167 to always fail with ENOSYS. Some functions are actually named
10168 something starting with __ and the normal name is an alias. */
10169#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10170choke me
10171#else
10172char (*f) () = $ac_func;
10173#endif
10174#ifdef __cplusplus
10175}
10176#endif
10177
10178int
10179main ()
10180{
10181return f != $ac_func;
10182 ;
10183 return 0;
10184}
10185_ACEOF
10186rm -f conftest.$ac_objext conftest$ac_exeext
10187if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10188 (eval $ac_link) 2>conftest.er1
572a3cc2 10189 ac_status=$?
edfaf76d
LK
10190 grep -v '^ *+' conftest.er1 >conftest.err
10191 rm -f conftest.er1
10192 cat conftest.err >&5
572a3cc2
JD
10193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10194 (exit $ac_status); } &&
edfaf76d
LK
10195 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10197 (eval $ac_try) 2>&5
10198 ac_status=$?
10199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10200 (exit $ac_status); }; } &&
10201 { ac_try='test -s conftest$ac_exeext'
572a3cc2
JD
10202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10203 (eval $ac_try) 2>&5
10204 ac_status=$?
10205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10206 (exit $ac_status); }; }; then
10207 eval "$as_ac_var=yes"
10208else
10209 echo "$as_me: failed program was:" >&5
10210sed 's/^/| /' conftest.$ac_ext >&5
10211
10212eval "$as_ac_var=no"
10213fi
edfaf76d
LK
10214rm -f conftest.err conftest.$ac_objext \
10215 conftest$ac_exeext conftest.$ac_ext
572a3cc2
JD
10216fi
10217echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10218echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10219if test `eval echo '${'$as_ac_var'}'` = yes; then
10220 cat >>confdefs.h <<_ACEOF
10221#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10222_ACEOF
10223 HAVE_GTK_FILE_CHOOSER=yes
10224fi
10225done
10226
10227
10228 if test "$HAVE_GTK_FILE_SELECTION" = yes \
10229 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
10230
10231cat >>confdefs.h <<\_ACEOF
10232#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
10233_ACEOF
10234
b8bdffbe
JD
10235 fi
10236
10237 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
10238 HAVE_GTK_AND_PTHREAD=no
10239
10240for ac_header in pthread.h
10241do
10242as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10243if eval "test \"\${$as_ac_Header+set}\" = set"; then
10244 echo "$as_me:$LINENO: checking for $ac_header" >&5
10245echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10246if eval "test \"\${$as_ac_Header+set}\" = set"; then
10247 echo $ECHO_N "(cached) $ECHO_C" >&6
10248fi
10249echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10250echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10251else
10252 # Is the header compilable?
10253echo "$as_me:$LINENO: checking $ac_header usability" >&5
10254echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10255cat >conftest.$ac_ext <<_ACEOF
10256/* confdefs.h. */
10257_ACEOF
10258cat confdefs.h >>conftest.$ac_ext
10259cat >>conftest.$ac_ext <<_ACEOF
10260/* end confdefs.h. */
10261$ac_includes_default
10262#include <$ac_header>
10263_ACEOF
10264rm -f conftest.$ac_objext
10265if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 10266 (eval $ac_compile) 2>conftest.er1
b8bdffbe 10267 ac_status=$?
edfaf76d
LK
10268 grep -v '^ *+' conftest.er1 >conftest.err
10269 rm -f conftest.er1
10270 cat conftest.err >&5
b8bdffbe
JD
10271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10272 (exit $ac_status); } &&
edfaf76d
LK
10273 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10275 (eval $ac_try) 2>&5
10276 ac_status=$?
10277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10278 (exit $ac_status); }; } &&
10279 { ac_try='test -s conftest.$ac_objext'
b8bdffbe
JD
10280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10281 (eval $ac_try) 2>&5
10282 ac_status=$?
10283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10284 (exit $ac_status); }; }; then
10285 ac_header_compiler=yes
10286else
10287 echo "$as_me: failed program was:" >&5
10288sed 's/^/| /' conftest.$ac_ext >&5
10289
10290ac_header_compiler=no
10291fi
edfaf76d 10292rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b8bdffbe
JD
10293echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10294echo "${ECHO_T}$ac_header_compiler" >&6
10295
10296# Is the header present?
10297echo "$as_me:$LINENO: checking $ac_header presence" >&5
10298echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10299cat >conftest.$ac_ext <<_ACEOF
10300/* confdefs.h. */
10301_ACEOF
10302cat confdefs.h >>conftest.$ac_ext
10303cat >>conftest.$ac_ext <<_ACEOF
10304/* end confdefs.h. */
10305#include <$ac_header>
10306_ACEOF
10307if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10308 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10309 ac_status=$?
10310 grep -v '^ *+' conftest.er1 >conftest.err
10311 rm -f conftest.er1
10312 cat conftest.err >&5
10313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10314 (exit $ac_status); } >/dev/null; then
10315 if test -s conftest.err; then
10316 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 10317 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
b8bdffbe
JD
10318 else
10319 ac_cpp_err=
10320 fi
10321else
10322 ac_cpp_err=yes
10323fi
10324if test -z "$ac_cpp_err"; then
10325 ac_header_preproc=yes
10326else
10327 echo "$as_me: failed program was:" >&5
10328sed 's/^/| /' conftest.$ac_ext >&5
10329
10330 ac_header_preproc=no
10331fi
10332rm -f conftest.err conftest.$ac_ext
10333echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10334echo "${ECHO_T}$ac_header_preproc" >&6
10335
10336# So? What about this header?
edfaf76d
LK
10337case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10338 yes:no: )
b8bdffbe
JD
10339 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10340echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
10341 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10342echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10343 ac_header_preproc=yes
b8bdffbe 10344 ;;
edfaf76d 10345 no:yes:* )
b8bdffbe
JD
10346 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10347echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
10348 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10349echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10350 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10351echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10352 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
10353echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
b8bdffbe
JD
10354 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10355echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
10356 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10357echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b8bdffbe
JD
10358 (
10359 cat <<\_ASBOX
edfaf76d
LK
10360## ------------------------------------------ ##
10361## Report this to the AC_PACKAGE_NAME lists. ##
10362## ------------------------------------------ ##
b8bdffbe
JD
10363_ASBOX
10364 ) |
10365 sed "s/^/$as_me: WARNING: /" >&2
10366 ;;
10367esac
10368echo "$as_me:$LINENO: checking for $ac_header" >&5
10369echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10370if eval "test \"\${$as_ac_Header+set}\" = set"; then
10371 echo $ECHO_N "(cached) $ECHO_C" >&6
10372else
edfaf76d 10373 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe
JD
10374fi
10375echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10376echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10377
10378fi
10379if test `eval echo '${'$as_ac_Header'}'` = yes; then
10380 cat >>confdefs.h <<_ACEOF
10381#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10382_ACEOF
10383
10384fi
10385
10386done
10387
10388 if test "$ac_cv_header_pthread_h"; then
10389 echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
10390echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6
10391if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
10392 echo $ECHO_N "(cached) $ECHO_C" >&6
10393else
10394 ac_check_lib_save_LIBS=$LIBS
10395LIBS="-lpthread $LIBS"
10396cat >conftest.$ac_ext <<_ACEOF
10397/* confdefs.h. */
10398_ACEOF
10399cat confdefs.h >>conftest.$ac_ext
10400cat >>conftest.$ac_ext <<_ACEOF
10401/* end confdefs.h. */
10402
10403/* Override any gcc2 internal prototype to avoid an error. */
10404#ifdef __cplusplus
10405extern "C"
10406#endif
10407/* We use char because int might match the return type of a gcc2
10408 builtin and then its argument prototype would still apply. */
10409char pthread_self ();
10410int
10411main ()
10412{
10413pthread_self ();
10414 ;
10415 return 0;
10416}
10417_ACEOF
10418rm -f conftest.$ac_objext conftest$ac_exeext
10419if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10420 (eval $ac_link) 2>conftest.er1
b8bdffbe 10421 ac_status=$?
edfaf76d
LK
10422 grep -v '^ *+' conftest.er1 >conftest.err
10423 rm -f conftest.er1
10424 cat conftest.err >&5
b8bdffbe
JD
10425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10426 (exit $ac_status); } &&
edfaf76d
LK
10427 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10429 (eval $ac_try) 2>&5
10430 ac_status=$?
10431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10432 (exit $ac_status); }; } &&
10433 { ac_try='test -s conftest$ac_exeext'
b8bdffbe
JD
10434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10435 (eval $ac_try) 2>&5
10436 ac_status=$?
10437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10438 (exit $ac_status); }; }; then
10439 ac_cv_lib_pthread_pthread_self=yes
10440else
10441 echo "$as_me: failed program was:" >&5
10442sed 's/^/| /' conftest.$ac_ext >&5
10443
10444ac_cv_lib_pthread_pthread_self=no
10445fi
edfaf76d
LK
10446rm -f conftest.err conftest.$ac_objext \
10447 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
10448LIBS=$ac_check_lib_save_LIBS
10449fi
10450echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
10451echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6
10452if test $ac_cv_lib_pthread_pthread_self = yes; then
10453 HAVE_GTK_AND_PTHREAD=yes
10454fi
10455
10456 fi
10457 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
10458 GTK_LIBS="$GTK_LIBS -lpthread"
10459
10460cat >>confdefs.h <<\_ACEOF
10461#define HAVE_GTK_AND_PTHREAD 1
10462_ACEOF
10463
10464 fi
57669b57 10465 fi
488dd4c4
JD
10466fi
10467
98418dba
CW
10468if test x"${USE_X_TOOLKIT}" = xmaybe; then
10469 if test x"${HAVE_X11R5}" = xyes; then
c0d27fcc 10470 echo "$as_me:$LINENO: checking X11 version 5 with Xaw" >&5
98418dba
CW
10471echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6
10472 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
10473 echo $ECHO_N "(cached) $ECHO_C" >&6
10474else
10475 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10476/* confdefs.h. */
10477_ACEOF
10478cat confdefs.h >>conftest.$ac_ext
10479cat >>conftest.$ac_ext <<_ACEOF
10480/* end confdefs.h. */
98418dba
CW
10481
10482#include <X11/Intrinsic.h>
10483#include <X11/Xaw/Simple.h>
98418dba
CW
10484int
10485main ()
10486{
10487
10488 ;
10489 return 0;
10490}
10491_ACEOF
10492rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10493if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10494 (eval $ac_link) 2>conftest.er1
98418dba 10495 ac_status=$?
edfaf76d
LK
10496 grep -v '^ *+' conftest.er1 >conftest.err
10497 rm -f conftest.er1
10498 cat conftest.err >&5
c0d27fcc 10499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10500 (exit $ac_status); } &&
edfaf76d
LK
10501 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10503 (eval $ac_try) 2>&5
10504 ac_status=$?
10505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10506 (exit $ac_status); }; } &&
10507 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10509 (eval $ac_try) 2>&5
10510 ac_status=$?
c0d27fcc 10511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10512 (exit $ac_status); }; }; then
10513 emacs_cv_x11_version_5_with_xaw=yes
10514else
10515 echo "$as_me: failed program was:" >&5
19650fd6
AS
10516sed 's/^/| /' conftest.$ac_ext >&5
10517
98418dba
CW
10518emacs_cv_x11_version_5_with_xaw=no
10519fi
edfaf76d
LK
10520rm -f conftest.err conftest.$ac_objext \
10521 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10522fi
10523
10524 if test $emacs_cv_x11_version_5_with_xaw = yes; then
c0d27fcc 10525 echo "$as_me:$LINENO: result: 5 or newer, with Xaw; use toolkit by default" >&5
98418dba
CW
10526echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6
10527 USE_X_TOOLKIT=LUCID
10528 else
c0d27fcc 10529 echo "$as_me:$LINENO: result: before 5 or no Xaw; do not use toolkit by default" >&5
98418dba
CW
10530echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6
10531 USE_X_TOOLKIT=none
10532 fi
10533 else
10534 USE_X_TOOLKIT=none
10535 fi
10536fi
10537
10538X_TOOLKIT_TYPE=$USE_X_TOOLKIT
10539
10540if test "${USE_X_TOOLKIT}" != "none"; then
c0d27fcc 10541 echo "$as_me:$LINENO: checking X11 toolkit version" >&5
98418dba
CW
10542echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6
10543 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
10544 echo $ECHO_N "(cached) $ECHO_C" >&6
10545else
10546 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10547/* confdefs.h. */
10548_ACEOF
10549cat confdefs.h >>conftest.$ac_ext
10550cat >>conftest.$ac_ext <<_ACEOF
10551/* end confdefs.h. */
98418dba 10552#include <X11/Intrinsic.h>
98418dba
CW
10553int
10554main ()
10555{
10556#if XtSpecificationRelease < 6
10557fail;
10558#endif
10559
10560 ;
10561 return 0;
10562}
10563_ACEOF
10564rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10565if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10566 (eval $ac_link) 2>conftest.er1
98418dba 10567 ac_status=$?
edfaf76d
LK
10568 grep -v '^ *+' conftest.er1 >conftest.err
10569 rm -f conftest.er1
10570 cat conftest.err >&5
c0d27fcc 10571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10572 (exit $ac_status); } &&
edfaf76d
LK
10573 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10575 (eval $ac_try) 2>&5
10576 ac_status=$?
10577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10578 (exit $ac_status); }; } &&
10579 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10581 (eval $ac_try) 2>&5
10582 ac_status=$?
c0d27fcc 10583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10584 (exit $ac_status); }; }; then
10585 emacs_cv_x11_toolkit_version_6=yes
10586else
10587 echo "$as_me: failed program was:" >&5
19650fd6
AS
10588sed 's/^/| /' conftest.$ac_ext >&5
10589
98418dba
CW
10590emacs_cv_x11_toolkit_version_6=no
10591fi
edfaf76d
LK
10592rm -f conftest.err conftest.$ac_objext \
10593 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10594fi
10595
10596 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
10597 if test $emacs_cv_x11_toolkit_version_6 = yes; then
c0d27fcc 10598 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 10599echo "${ECHO_T}6 or newer" >&6
b936fae4 10600
c0d27fcc 10601cat >>confdefs.h <<\_ACEOF
98418dba 10602#define HAVE_X11XTR6 1
c0d27fcc 10603_ACEOF
98418dba
CW
10604
10605 else
c0d27fcc 10606 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
10607echo "${ECHO_T}before 6" >&6
10608 fi
10609
10610 OLDLIBS="$LIBS"
10611 if test x$HAVE_X11XTR6 = xyes; then
10612 LIBS="-lXt -lSM -lICE $LIBS"
10613 else
10614 LIBS="-lXt $LIBS"
10615 fi
10616
c0d27fcc 10617echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
98418dba
CW
10618echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6
10619if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
10620 echo $ECHO_N "(cached) $ECHO_C" >&6
10621else
10622 ac_check_lib_save_LIBS=$LIBS
10623LIBS="-lXmu $LIBS"
10624cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10625/* confdefs.h. */
10626_ACEOF
10627cat confdefs.h >>conftest.$ac_ext
10628cat >>conftest.$ac_ext <<_ACEOF
10629/* end confdefs.h. */
98418dba
CW
10630
10631/* Override any gcc2 internal prototype to avoid an error. */
10632#ifdef __cplusplus
10633extern "C"
10634#endif
10635/* We use char because int might match the return type of a gcc2
10636 builtin and then its argument prototype would still apply. */
10637char XmuConvertStandardSelection ();
98418dba
CW
10638int
10639main ()
10640{
10641XmuConvertStandardSelection ();
10642 ;
10643 return 0;
10644}
10645_ACEOF
10646rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10647if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10648 (eval $ac_link) 2>conftest.er1
98418dba 10649 ac_status=$?
edfaf76d
LK
10650 grep -v '^ *+' conftest.er1 >conftest.err
10651 rm -f conftest.er1
10652 cat conftest.err >&5
c0d27fcc 10653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10654 (exit $ac_status); } &&
edfaf76d
LK
10655 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10657 (eval $ac_try) 2>&5
10658 ac_status=$?
10659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10660 (exit $ac_status); }; } &&
10661 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10663 (eval $ac_try) 2>&5
10664 ac_status=$?
c0d27fcc 10665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10666 (exit $ac_status); }; }; then
10667 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
10668else
10669 echo "$as_me: failed program was:" >&5
19650fd6
AS
10670sed 's/^/| /' conftest.$ac_ext >&5
10671
98418dba
CW
10672ac_cv_lib_Xmu_XmuConvertStandardSelection=no
10673fi
edfaf76d
LK
10674rm -f conftest.err conftest.$ac_objext \
10675 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10676LIBS=$ac_check_lib_save_LIBS
10677fi
c0d27fcc 10678echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
98418dba
CW
10679echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6
10680if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 10681 cat >>confdefs.h <<_ACEOF
98418dba 10682#define HAVE_LIBXMU 1
c0d27fcc 10683_ACEOF
98418dba
CW
10684
10685 LIBS="-lXmu $LIBS"
10686
10687fi
10688
10689 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
10690fi
10691
10692# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
10693if test "${HAVE_X11}" = "yes"; then
10694 if test "${USE_X_TOOLKIT}" != "none"; then
10695
c0d27fcc 10696echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
98418dba
CW
10697echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6
10698if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
10699 echo $ECHO_N "(cached) $ECHO_C" >&6
10700else
10701 ac_check_lib_save_LIBS=$LIBS
10702LIBS="-lXext $LIBS"
10703cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10704/* confdefs.h. */
10705_ACEOF
10706cat confdefs.h >>conftest.$ac_ext
10707cat >>conftest.$ac_ext <<_ACEOF
10708/* end confdefs.h. */
98418dba
CW
10709
10710/* Override any gcc2 internal prototype to avoid an error. */
10711#ifdef __cplusplus
10712extern "C"
10713#endif
10714/* We use char because int might match the return type of a gcc2
10715 builtin and then its argument prototype would still apply. */
10716char XShapeQueryExtension ();
98418dba
CW
10717int
10718main ()
10719{
10720XShapeQueryExtension ();
10721 ;
10722 return 0;
10723}
10724_ACEOF
10725rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10726if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10727 (eval $ac_link) 2>conftest.er1
98418dba 10728 ac_status=$?
edfaf76d
LK
10729 grep -v '^ *+' conftest.er1 >conftest.err
10730 rm -f conftest.er1
10731 cat conftest.err >&5
c0d27fcc 10732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10733 (exit $ac_status); } &&
edfaf76d
LK
10734 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10736 (eval $ac_try) 2>&5
10737 ac_status=$?
10738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10739 (exit $ac_status); }; } &&
10740 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10742 (eval $ac_try) 2>&5
10743 ac_status=$?
c0d27fcc 10744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10745 (exit $ac_status); }; }; then
10746 ac_cv_lib_Xext_XShapeQueryExtension=yes
10747else
10748 echo "$as_me: failed program was:" >&5
19650fd6
AS
10749sed 's/^/| /' conftest.$ac_ext >&5
10750
98418dba
CW
10751ac_cv_lib_Xext_XShapeQueryExtension=no
10752fi
edfaf76d
LK
10753rm -f conftest.err conftest.$ac_objext \
10754 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10755LIBS=$ac_check_lib_save_LIBS
10756fi
c0d27fcc 10757echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
98418dba
CW
10758echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6
10759if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 10760 cat >>confdefs.h <<_ACEOF
98418dba 10761#define HAVE_LIBXEXT 1
c0d27fcc 10762_ACEOF
98418dba
CW
10763
10764 LIBS="-lXext $LIBS"
10765
10766fi
10767
10768 fi
10769fi
10770
10771if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 10772 echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
98418dba
CW
10773echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6
10774if test "${emacs_cv_motif_version_2_1+set}" = set; then
10775 echo $ECHO_N "(cached) $ECHO_C" >&6
10776else
10777 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10778/* confdefs.h. */
10779_ACEOF
10780cat confdefs.h >>conftest.$ac_ext
10781cat >>conftest.$ac_ext <<_ACEOF
10782/* end confdefs.h. */
98418dba 10783#include <Xm/Xm.h>
98418dba
CW
10784int
10785main ()
10786{
10787#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
10788int x = 5;
10789#else
10790Motif version prior to 2.1.
10791#endif
10792 ;
10793 return 0;
10794}
10795_ACEOF
10796rm -f conftest.$ac_objext
c0d27fcc 10797if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 10798 (eval $ac_compile) 2>conftest.er1
98418dba 10799 ac_status=$?
edfaf76d
LK
10800 grep -v '^ *+' conftest.er1 >conftest.err
10801 rm -f conftest.er1
10802 cat conftest.err >&5
c0d27fcc 10803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10804 (exit $ac_status); } &&
edfaf76d
LK
10805 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10807 (eval $ac_try) 2>&5
10808 ac_status=$?
10809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10810 (exit $ac_status); }; } &&
10811 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 10812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10813 (eval $ac_try) 2>&5
10814 ac_status=$?
c0d27fcc 10815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10816 (exit $ac_status); }; }; then
10817 emacs_cv_motif_version_2_1=yes
10818else
10819 echo "$as_me: failed program was:" >&5
19650fd6
AS
10820sed 's/^/| /' conftest.$ac_ext >&5
10821
98418dba
CW
10822emacs_cv_motif_version_2_1=no
10823fi
edfaf76d 10824rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 10825fi
c0d27fcc 10826echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
98418dba
CW
10827echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6
10828 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
10829 if test $emacs_cv_motif_version_2_1 = yes; then
10830 HAVE_LIBXP=no
b936fae4 10831
c0d27fcc 10832cat >>confdefs.h <<\_ACEOF
98418dba 10833#define HAVE_MOTIF_2_1 1
c0d27fcc 10834_ACEOF
98418dba 10835
c0d27fcc 10836 echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
98418dba
CW
10837echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6
10838if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
10839 echo $ECHO_N "(cached) $ECHO_C" >&6
10840else
10841 ac_check_lib_save_LIBS=$LIBS
10842LIBS="-lXp $LIBS"
10843cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10844/* confdefs.h. */
10845_ACEOF
10846cat confdefs.h >>conftest.$ac_ext
10847cat >>conftest.$ac_ext <<_ACEOF
10848/* end confdefs.h. */
98418dba
CW
10849
10850/* Override any gcc2 internal prototype to avoid an error. */
10851#ifdef __cplusplus
10852extern "C"
10853#endif
10854/* We use char because int might match the return type of a gcc2
10855 builtin and then its argument prototype would still apply. */
10856char XpCreateContext ();
98418dba
CW
10857int
10858main ()
10859{
10860XpCreateContext ();
10861 ;
10862 return 0;
10863}
10864_ACEOF
10865rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10866if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10867 (eval $ac_link) 2>conftest.er1
98418dba 10868 ac_status=$?
edfaf76d
LK
10869 grep -v '^ *+' conftest.er1 >conftest.err
10870 rm -f conftest.er1
10871 cat conftest.err >&5
c0d27fcc 10872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10873 (exit $ac_status); } &&
edfaf76d
LK
10874 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10876 (eval $ac_try) 2>&5
10877 ac_status=$?
10878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10879 (exit $ac_status); }; } &&
10880 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10882 (eval $ac_try) 2>&5
10883 ac_status=$?
c0d27fcc 10884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10885 (exit $ac_status); }; }; then
10886 ac_cv_lib_Xp_XpCreateContext=yes
10887else
10888 echo "$as_me: failed program was:" >&5
19650fd6
AS
10889sed 's/^/| /' conftest.$ac_ext >&5
10890
98418dba
CW
10891ac_cv_lib_Xp_XpCreateContext=no
10892fi
edfaf76d
LK
10893rm -f conftest.err conftest.$ac_objext \
10894 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10895LIBS=$ac_check_lib_save_LIBS
10896fi
c0d27fcc 10897echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
98418dba
CW
10898echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6
10899if test $ac_cv_lib_Xp_XpCreateContext = yes; then
10900 HAVE_LIBXP=yes
10901fi
503d2be0 10902
98418dba 10903 if test ${HAVE_LIBXP} = yes; then
b936fae4 10904
c0d27fcc 10905cat >>confdefs.h <<\_ACEOF
98418dba 10906#define HAVE_LIBXP 1
c0d27fcc 10907_ACEOF
503d2be0 10908
98418dba 10909 fi
4693dbc9
SM
10910 else
10911 echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
10912echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6
10913if test "${emacs_cv_lesstif+set}" = set; then
10914 echo $ECHO_N "(cached) $ECHO_C" >&6
10915else
10916 # We put this in CFLAGS temporarily to precede other -I options
10917 # that might be in CFLAGS temporarily.
10918 # We put this in CPPFLAGS where it precedes the other -I options.
10919 OLD_CPPFLAGS=$CPPFLAGS
10920 OLD_CFLAGS=$CFLAGS
10921 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
10922 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
10923 cat >conftest.$ac_ext <<_ACEOF
10924/* confdefs.h. */
10925_ACEOF
10926cat confdefs.h >>conftest.$ac_ext
10927cat >>conftest.$ac_ext <<_ACEOF
10928/* end confdefs.h. */
10929#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
10930int
10931main ()
10932{
10933int x = 5;
10934 ;
10935 return 0;
10936}
10937_ACEOF
10938rm -f conftest.$ac_objext
10939if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 10940 (eval $ac_compile) 2>conftest.er1
4693dbc9 10941 ac_status=$?
edfaf76d
LK
10942 grep -v '^ *+' conftest.er1 >conftest.err
10943 rm -f conftest.er1
10944 cat conftest.err >&5
4693dbc9
SM
10945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10946 (exit $ac_status); } &&
edfaf76d
LK
10947 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10949 (eval $ac_try) 2>&5
10950 ac_status=$?
10951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10952 (exit $ac_status); }; } &&
10953 { ac_try='test -s conftest.$ac_objext'
4693dbc9
SM
10954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10955 (eval $ac_try) 2>&5
10956 ac_status=$?
10957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10958 (exit $ac_status); }; }; then
10959 emacs_cv_lesstif=yes
10960else
10961 echo "$as_me: failed program was:" >&5
10962sed 's/^/| /' conftest.$ac_ext >&5
10963
10964emacs_cv_lesstif=no
10965fi
edfaf76d 10966rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9
SM
10967fi
10968echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
10969echo "${ECHO_T}$emacs_cv_lesstif" >&6
10970 if test $emacs_cv_lesstif = yes; then
10971 # Make sure this -I option remains in CPPFLAGS after it is set
10972 # back to REAL_CPPFLAGS.
10973 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
10974 # have those other -I options anyway. Ultimately, having this
10975 # directory ultimately in CPPFLAGS will be enough.
10976 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
10977 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
10978 else
10979 CFLAGS=$OLD_CFLAGS
10980 CPPFLAGS=$OLD_CPPFLAGS
10981 fi
98418dba
CW
10982 fi
10983fi
10984
10985### Is -lXaw3d available?
10986HAVE_XAW3D=no
10987if test "${HAVE_X11}" = "yes"; then
10988 if test "${USE_X_TOOLKIT}" != "none"; then
22044edf 10989 echo "$as_me:$LINENO: checking for X11/Xaw3d/Scrollbar.h" >&5
98418dba
CW
10990echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6
10991if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
10992 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 10993else
22044edf 10994 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10995/* confdefs.h. */
10996_ACEOF
10997cat confdefs.h >>conftest.$ac_ext
10998cat >>conftest.$ac_ext <<_ACEOF
10999/* end confdefs.h. */
98418dba 11000#include <X11/Xaw3d/Scrollbar.h>
503d2be0 11001_ACEOF
c0d27fcc 11002if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11003 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11004 ac_status=$?
6bae0ccf 11005 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
11006 rm -f conftest.er1
11007 cat conftest.err >&5
c0d27fcc 11008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11009 (exit $ac_status); } >/dev/null; then
11010 if test -s conftest.err; then
11011 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 11012 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
11013 else
11014 ac_cpp_err=
11015 fi
11016else
11017 ac_cpp_err=yes
11018fi
11019if test -z "$ac_cpp_err"; then
22044edf 11020 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 11021else
503d2be0 11022 echo "$as_me: failed program was:" >&5
19650fd6
AS
11023sed 's/^/| /' conftest.$ac_ext >&5
11024
22044edf 11025 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 11026fi
503d2be0 11027rm -f conftest.err conftest.$ac_ext
98418dba 11028fi
c0d27fcc 11029echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
98418dba 11030echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6
98418dba 11031if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
c0d27fcc 11032 echo "$as_me:$LINENO: checking for XawScrollbarSetThumb in -lXaw3d" >&5
98418dba
CW
11033echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6
11034if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
11035 echo $ECHO_N "(cached) $ECHO_C" >&6
11036else
11037 ac_check_lib_save_LIBS=$LIBS
11038LIBS="-lXaw3d $LIBS"
11039cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11040/* confdefs.h. */
11041_ACEOF
11042cat confdefs.h >>conftest.$ac_ext
11043cat >>conftest.$ac_ext <<_ACEOF
11044/* end confdefs.h. */
98418dba
CW
11045
11046/* Override any gcc2 internal prototype to avoid an error. */
11047#ifdef __cplusplus
11048extern "C"
11049#endif
11050/* We use char because int might match the return type of a gcc2
11051 builtin and then its argument prototype would still apply. */
11052char XawScrollbarSetThumb ();
503d2be0
AS
11053int
11054main ()
11055{
98418dba 11056XawScrollbarSetThumb ();
503d2be0
AS
11057 ;
11058 return 0;
11059}
11060_ACEOF
11061rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11062if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11063 (eval $ac_link) 2>conftest.er1
503d2be0 11064 ac_status=$?
edfaf76d
LK
11065 grep -v '^ *+' conftest.er1 >conftest.err
11066 rm -f conftest.er1
11067 cat conftest.err >&5
c0d27fcc 11068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11069 (exit $ac_status); } &&
edfaf76d
LK
11070 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11072 (eval $ac_try) 2>&5
11073 ac_status=$?
11074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11075 (exit $ac_status); }; } &&
11076 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11078 (eval $ac_try) 2>&5
11079 ac_status=$?
c0d27fcc 11080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11081 (exit $ac_status); }; }; then
98418dba 11082 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
ba4481b5 11083else
503d2be0 11084 echo "$as_me: failed program was:" >&5
19650fd6
AS
11085sed 's/^/| /' conftest.$ac_ext >&5
11086
98418dba 11087ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
ba4481b5 11088fi
edfaf76d
LK
11089rm -f conftest.err conftest.$ac_objext \
11090 conftest$ac_exeext conftest.$ac_ext
98418dba 11091LIBS=$ac_check_lib_save_LIBS
ba4481b5 11092fi
c0d27fcc 11093echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
98418dba
CW
11094echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6
11095if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
11096 HAVE_XAW3D=yes
ba4481b5 11097fi
503d2be0 11098
ba4481b5
DL
11099fi
11100
c0d27fcc 11101
98418dba 11102 if test "${HAVE_XAW3D}" = "yes"; then
b936fae4 11103
c0d27fcc 11104cat >>confdefs.h <<\_ACEOF
98418dba 11105#define HAVE_XAW3D 1
c0d27fcc 11106_ACEOF
98418dba 11107
ba4481b5 11108 fi
98418dba 11109 fi
ba4481b5
DL
11110fi
11111
c0d27fcc
MR
11112
11113
98418dba
CW
11114USE_TOOLKIT_SCROLL_BARS=no
11115if test "${with_toolkit_scroll_bars}" != "no"; then
11116 if test "${USE_X_TOOLKIT}" != "none"; then
11117 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 11118 cat >>confdefs.h <<\_ACEOF
98418dba 11119#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 11120_ACEOF
98418dba
CW
11121
11122 HAVE_XAW3D=no
11123 USE_TOOLKIT_SCROLL_BARS=yes
11124 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 11125 cat >>confdefs.h <<\_ACEOF
98418dba 11126#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 11127_ACEOF
98418dba
CW
11128
11129 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 11130 fi
488dd4c4
JD
11131 elif test "${HAVE_GTK}" = "yes"; then
11132 cat >>confdefs.h <<\_ACEOF
11133#define USE_TOOLKIT_SCROLL_BARS 1
5d6da11e
YM
11134_ACEOF
11135
11136 USE_TOOLKIT_SCROLL_BARS=yes
11137 elif test "${HAVE_CARBON}" = "yes"; then
11138 cat >>confdefs.h <<\_ACEOF
11139#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
11140_ACEOF
11141
11142 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
11143 fi
11144fi
11145
abd39b57 11146cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
11147/* confdefs.h. */
11148_ACEOF
11149cat confdefs.h >>conftest.$ac_ext
11150cat >>conftest.$ac_ext <<_ACEOF
11151/* end confdefs.h. */
11152
11153 #include <X11/Xlib.h>
11154 #include <X11/Xresource.h>
11155int
11156main ()
11157{
11158XIMProc callback;
11159 ;
11160 return 0;
11161}
11162_ACEOF
11163rm -f conftest.$ac_objext
11164if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11165 (eval $ac_compile) 2>conftest.er1
abd39b57 11166 ac_status=$?
edfaf76d
LK
11167 grep -v '^ *+' conftest.er1 >conftest.err
11168 rm -f conftest.er1
11169 cat conftest.err >&5
abd39b57
AC
11170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11171 (exit $ac_status); } &&
edfaf76d
LK
11172 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11174 (eval $ac_try) 2>&5
11175 ac_status=$?
11176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11177 (exit $ac_status); }; } &&
11178 { ac_try='test -s conftest.$ac_objext'
abd39b57
AC
11179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11180 (eval $ac_try) 2>&5
11181 ac_status=$?
11182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11183 (exit $ac_status); }; }; then
11184 HAVE_XIM=yes
11185
11186cat >>confdefs.h <<\_ACEOF
11187#define HAVE_XIM 1
11188_ACEOF
11189
11190else
11191 echo "$as_me: failed program was:" >&5
11192sed 's/^/| /' conftest.$ac_ext >&5
11193
11194HAVE_XIM=no
11195fi
edfaf76d 11196rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 11197
c0d27fcc 11198
98418dba 11199if test "${with_xim}" != "no"; then
b936fae4 11200
c0d27fcc 11201cat >>confdefs.h <<\_ACEOF
98418dba 11202#define USE_XIM 1
c0d27fcc 11203_ACEOF
98418dba 11204
793fa0d7 11205fi
abd39b57
AC
11206
11207
11208if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
11209 late_CFLAGS=$CFLAGS
11210 if test "$GCC" = yes; then
11211 CFLAGS="$CFLAGS --pedantic-errors"
11212 fi
cffcede7 11213 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11214/* confdefs.h. */
11215_ACEOF
11216cat confdefs.h >>conftest.$ac_ext
11217cat >>conftest.$ac_ext <<_ACEOF
11218/* end confdefs.h. */
cffcede7
JD
11219
11220#include <X11/Xlib.h>
11221#include <X11/Xresource.h>
11222int
11223main ()
11224{
11225Display *display;
11226XrmDatabase db;
11227char *res_name;
11228char *res_class;
11229XIMProc callback;
11230XPointer *client_data;
849d80cf
DL
11231#ifndef __GNUC__
11232/* If we're not using GCC, it's probably not XFree86, and this is
11233 probably right, but we can't use something like --pedantic-errors. */
11234extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
11235 char*, XIMProc, XPointer*);
11236#endif
cffcede7
JD
11237(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
11238 client_data);
11239 ;
11240 return 0;
11241}
11242_ACEOF
11243rm -f conftest.$ac_objext
11244if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11245 (eval $ac_compile) 2>conftest.er1
cffcede7 11246 ac_status=$?
edfaf76d
LK
11247 grep -v '^ *+' conftest.er1 >conftest.err
11248 rm -f conftest.er1
11249 cat conftest.err >&5
cffcede7
JD
11250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11251 (exit $ac_status); } &&
edfaf76d
LK
11252 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11254 (eval $ac_try) 2>&5
11255 ac_status=$?
11256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11257 (exit $ac_status); }; } &&
11258 { ac_try='test -s conftest.$ac_objext'
cffcede7
JD
11259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11260 (eval $ac_try) 2>&5
11261 ac_status=$?
11262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11263 (exit $ac_status); }; }; then
11264 emacs_cv_arg6_star=yes
11265else
11266 echo "$as_me: failed program was:" >&5
19650fd6
AS
11267sed 's/^/| /' conftest.$ac_ext >&5
11268
cffcede7 11269fi
edfaf76d 11270rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
11271
11272 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 11273 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
11274#define XRegisterIMInstantiateCallback_arg6 XPointer*
11275_ACEOF
11276
11277 else
f57bd967 11278 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
11279#define XRegisterIMInstantiateCallback_arg6 XPointer
11280_ACEOF
11281
11282 fi
849d80cf 11283 CFLAGS=$late_CFLAGS
98418dba
CW
11284fi
11285
11286### Use -lXpm if available, unless `--with-xpm=no'.
11287HAVE_XPM=no
11288if test "${HAVE_X11}" = "yes"; then
11289 if test "${with_xpm}" != "no"; then
c0d27fcc
MR
11290 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11291 echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
98418dba
CW
11292echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
11293if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11294 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11295fi
11296echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
11297echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
98418dba 11298else
c0d27fcc
MR
11299 # Is the header compilable?
11300echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
11301echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6
11302cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11303/* confdefs.h. */
11304_ACEOF
11305cat confdefs.h >>conftest.$ac_ext
11306cat >>conftest.$ac_ext <<_ACEOF
11307/* end confdefs.h. */
c0d27fcc
MR
11308$ac_includes_default
11309#include <X11/xpm.h>
11310_ACEOF
11311rm -f conftest.$ac_objext
11312if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11313 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11314 ac_status=$?
edfaf76d
LK
11315 grep -v '^ *+' conftest.er1 >conftest.err
11316 rm -f conftest.er1
11317 cat conftest.err >&5
c0d27fcc
MR
11318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11319 (exit $ac_status); } &&
edfaf76d
LK
11320 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11321 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11322 (eval $ac_try) 2>&5
11323 ac_status=$?
11324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11325 (exit $ac_status); }; } &&
11326 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11328 (eval $ac_try) 2>&5
11329 ac_status=$?
11330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11331 (exit $ac_status); }; }; then
11332 ac_header_compiler=yes
11333else
11334 echo "$as_me: failed program was:" >&5
19650fd6
AS
11335sed 's/^/| /' conftest.$ac_ext >&5
11336
c0d27fcc
MR
11337ac_header_compiler=no
11338fi
edfaf76d 11339rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11340echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11341echo "${ECHO_T}$ac_header_compiler" >&6
11342
11343# Is the header present?
11344echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
11345echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6
11346cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11347/* confdefs.h. */
11348_ACEOF
11349cat confdefs.h >>conftest.$ac_ext
11350cat >>conftest.$ac_ext <<_ACEOF
11351/* end confdefs.h. */
98418dba
CW
11352#include <X11/xpm.h>
11353_ACEOF
c0d27fcc 11354if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
11355 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11356 ac_status=$?
6bae0ccf 11357 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11358 rm -f conftest.er1
11359 cat conftest.err >&5
c0d27fcc 11360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11361 (exit $ac_status); } >/dev/null; then
11362 if test -s conftest.err; then
11363 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 11364 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
11365 else
11366 ac_cpp_err=
11367 fi
11368else
11369 ac_cpp_err=yes
11370fi
11371if test -z "$ac_cpp_err"; then
c0d27fcc 11372 ac_header_preproc=yes
98418dba
CW
11373else
11374 echo "$as_me: failed program was:" >&5
19650fd6
AS
11375sed 's/^/| /' conftest.$ac_ext >&5
11376
c0d27fcc 11377 ac_header_preproc=no
98418dba
CW
11378fi
11379rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11380echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11381echo "${ECHO_T}$ac_header_preproc" >&6
11382
11383# So? What about this header?
edfaf76d
LK
11384case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11385 yes:no: )
c0d27fcc
MR
11386 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
11387echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11388 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
11389echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
11390 ac_header_preproc=yes
11391 ;;
11392 no:yes:* )
11393 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
11394echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
11395 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
11396echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
11397 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
11398echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
11399 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
11400echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
11401 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
11402echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11403 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
11404echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
7c9e5167
JD
11405 (
11406 cat <<\_ASBOX
edfaf76d
LK
11407## ------------------------------------------ ##
11408## Report this to the AC_PACKAGE_NAME lists. ##
11409## ------------------------------------------ ##
19650fd6
AS
11410_ASBOX
11411 ) |
11412 sed "s/^/$as_me: WARNING: /" >&2
11413 ;;
c0d27fcc
MR
11414esac
11415echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
11416echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
11417if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11418 echo $ECHO_N "(cached) $ECHO_C" >&6
11419else
11420 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 11421fi
c0d27fcc 11422echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
98418dba 11423echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
c0d27fcc
MR
11424
11425fi
98418dba 11426if test $ac_cv_header_X11_xpm_h = yes; then
c0d27fcc 11427 echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
98418dba
CW
11428echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6
11429if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 11430 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11431else
98418dba
CW
11432 ac_check_lib_save_LIBS=$LIBS
11433LIBS="-lXpm -lX11 $LIBS"
11434cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11435/* confdefs.h. */
11436_ACEOF
11437cat confdefs.h >>conftest.$ac_ext
11438cat >>conftest.$ac_ext <<_ACEOF
11439/* end confdefs.h. */
98418dba 11440
ba4481b5 11441/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11442#ifdef __cplusplus
11443extern "C"
11444#endif
ba4481b5 11445/* We use char because int might match the return type of a gcc2
503d2be0 11446 builtin and then its argument prototype would still apply. */
98418dba 11447char XpmReadFileToPixmap ();
503d2be0
AS
11448int
11449main ()
11450{
98418dba 11451XpmReadFileToPixmap ();
503d2be0
AS
11452 ;
11453 return 0;
11454}
11455_ACEOF
11456rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11457if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11458 (eval $ac_link) 2>conftest.er1
503d2be0 11459 ac_status=$?
edfaf76d
LK
11460 grep -v '^ *+' conftest.er1 >conftest.err
11461 rm -f conftest.er1
11462 cat conftest.err >&5
c0d27fcc 11463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11464 (exit $ac_status); } &&
edfaf76d
LK
11465 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11467 (eval $ac_try) 2>&5
11468 ac_status=$?
11469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11470 (exit $ac_status); }; } &&
11471 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11473 (eval $ac_try) 2>&5
11474 ac_status=$?
c0d27fcc 11475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11476 (exit $ac_status); }; }; then
98418dba 11477 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
11478else
11479 echo "$as_me: failed program was:" >&5
19650fd6
AS
11480sed 's/^/| /' conftest.$ac_ext >&5
11481
98418dba 11482ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 11483fi
edfaf76d
LK
11484rm -f conftest.err conftest.$ac_objext \
11485 conftest$ac_exeext conftest.$ac_ext
98418dba 11486LIBS=$ac_check_lib_save_LIBS
503d2be0 11487fi
c0d27fcc 11488echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
98418dba
CW
11489echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6
11490if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
11491 HAVE_XPM=yes
ba4481b5
DL
11492fi
11493
98418dba
CW
11494fi
11495
c0d27fcc 11496
98418dba 11497 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 11498 echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
98418dba
CW
11499echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6
11500 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11501/* confdefs.h. */
11502_ACEOF
11503cat confdefs.h >>conftest.$ac_ext
11504cat >>conftest.$ac_ext <<_ACEOF
11505/* end confdefs.h. */
98418dba
CW
11506#include "X11/xpm.h"
11507#ifndef XpmReturnAllocPixels
11508no_return_alloc_pixels
503d2be0 11509#endif
ba4481b5 11510
98418dba
CW
11511_ACEOF
11512if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 11513 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
11514 HAVE_XPM=no
11515else
11516 HAVE_XPM=yes
11517fi
11518rm -f conftest*
ba4481b5 11519
c0d27fcc 11520
98418dba 11521 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 11522 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
11523echo "${ECHO_T}yes" >&6
11524 else
c0d27fcc 11525 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
11526echo "${ECHO_T}no" >&6
11527 fi
11528 fi
11529 fi
11530
11531 if test "${HAVE_XPM}" = "yes"; then
b936fae4 11532
c0d27fcc 11533cat >>confdefs.h <<\_ACEOF
98418dba 11534#define HAVE_XPM 1
c0d27fcc 11535_ACEOF
98418dba
CW
11536
11537 fi
11538fi
11539
11540### Use -ljpeg if available, unless `--with-jpeg=no'.
11541HAVE_JPEG=no
11542if test "${HAVE_X11}" = "yes"; then
11543 if test "${with_jpeg}" != "no"; then
c0d27fcc
MR
11544 if test "${ac_cv_header_jerror_h+set}" = set; then
11545 echo "$as_me:$LINENO: checking for jerror.h" >&5
98418dba
CW
11546echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
11547if test "${ac_cv_header_jerror_h+set}" = set; then
11548 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11549fi
11550echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
11551echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
503d2be0 11552else
c0d27fcc
MR
11553 # Is the header compilable?
11554echo "$as_me:$LINENO: checking jerror.h usability" >&5
11555echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6
11556cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11557/* confdefs.h. */
11558_ACEOF
11559cat confdefs.h >>conftest.$ac_ext
11560cat >>conftest.$ac_ext <<_ACEOF
11561/* end confdefs.h. */
c0d27fcc
MR
11562$ac_includes_default
11563#include <jerror.h>
11564_ACEOF
11565rm -f conftest.$ac_objext
11566if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11567 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11568 ac_status=$?
edfaf76d
LK
11569 grep -v '^ *+' conftest.er1 >conftest.err
11570 rm -f conftest.er1
11571 cat conftest.err >&5
c0d27fcc
MR
11572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11573 (exit $ac_status); } &&
edfaf76d
LK
11574 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11576 (eval $ac_try) 2>&5
11577 ac_status=$?
11578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11579 (exit $ac_status); }; } &&
11580 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11582 (eval $ac_try) 2>&5
11583 ac_status=$?
11584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11585 (exit $ac_status); }; }; then
11586 ac_header_compiler=yes
11587else
11588 echo "$as_me: failed program was:" >&5
19650fd6
AS
11589sed 's/^/| /' conftest.$ac_ext >&5
11590
c0d27fcc
MR
11591ac_header_compiler=no
11592fi
edfaf76d 11593rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11594echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11595echo "${ECHO_T}$ac_header_compiler" >&6
11596
11597# Is the header present?
11598echo "$as_me:$LINENO: checking jerror.h presence" >&5
11599echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6
11600cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11601/* confdefs.h. */
11602_ACEOF
11603cat confdefs.h >>conftest.$ac_ext
11604cat >>conftest.$ac_ext <<_ACEOF
11605/* end confdefs.h. */
98418dba
CW
11606#include <jerror.h>
11607_ACEOF
c0d27fcc 11608if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
11609 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11610 ac_status=$?
6bae0ccf 11611 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11612 rm -f conftest.er1
11613 cat conftest.err >&5
c0d27fcc 11614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11615 (exit $ac_status); } >/dev/null; then
11616 if test -s conftest.err; then
11617 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 11618 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
11619 else
11620 ac_cpp_err=
11621 fi
11622else
11623 ac_cpp_err=yes
503d2be0 11624fi
98418dba 11625if test -z "$ac_cpp_err"; then
c0d27fcc 11626 ac_header_preproc=yes
ba4481b5 11627else
98418dba 11628 echo "$as_me: failed program was:" >&5
19650fd6
AS
11629sed 's/^/| /' conftest.$ac_ext >&5
11630
c0d27fcc 11631 ac_header_preproc=no
98418dba
CW
11632fi
11633rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11634echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11635echo "${ECHO_T}$ac_header_preproc" >&6
11636
11637# So? What about this header?
edfaf76d
LK
11638case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11639 yes:no: )
c0d27fcc
MR
11640 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
11641echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11642 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
11643echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
11644 ac_header_preproc=yes
19650fd6 11645 ;;
edfaf76d 11646 no:yes:* )
c0d27fcc
MR
11647 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
11648echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
edfaf76d
LK
11649 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
11650echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
11651 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
11652echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
11653 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
11654echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 11655 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 11656echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11657 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
11658echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
11659 (
11660 cat <<\_ASBOX
edfaf76d
LK
11661## ------------------------------------------ ##
11662## Report this to the AC_PACKAGE_NAME lists. ##
11663## ------------------------------------------ ##
19650fd6
AS
11664_ASBOX
11665 ) |
11666 sed "s/^/$as_me: WARNING: /" >&2
11667 ;;
c0d27fcc
MR
11668esac
11669echo "$as_me:$LINENO: checking for jerror.h" >&5
11670echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
11671if test "${ac_cv_header_jerror_h+set}" = set; then
11672 echo $ECHO_N "(cached) $ECHO_C" >&6
11673else
11674 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 11675fi
c0d27fcc 11676echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
98418dba 11677echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
c0d27fcc
MR
11678
11679fi
98418dba 11680if test $ac_cv_header_jerror_h = yes; then
c0d27fcc 11681 echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
98418dba
CW
11682echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6
11683if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 11684 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11685else
98418dba
CW
11686 ac_check_lib_save_LIBS=$LIBS
11687LIBS="-ljpeg $LIBS"
11688cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11689/* confdefs.h. */
11690_ACEOF
11691cat confdefs.h >>conftest.$ac_ext
11692cat >>conftest.$ac_ext <<_ACEOF
11693/* end confdefs.h. */
98418dba
CW
11694
11695/* Override any gcc2 internal prototype to avoid an error. */
11696#ifdef __cplusplus
11697extern "C"
11698#endif
11699/* We use char because int might match the return type of a gcc2
11700 builtin and then its argument prototype would still apply. */
11701char jpeg_destroy_compress ();
503d2be0
AS
11702int
11703main ()
11704{
98418dba 11705jpeg_destroy_compress ();
503d2be0
AS
11706 ;
11707 return 0;
11708}
11709_ACEOF
11710rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11711if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11712 (eval $ac_link) 2>conftest.er1
503d2be0 11713 ac_status=$?
edfaf76d
LK
11714 grep -v '^ *+' conftest.er1 >conftest.err
11715 rm -f conftest.er1
11716 cat conftest.err >&5
c0d27fcc 11717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11718 (exit $ac_status); } &&
edfaf76d
LK
11719 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11721 (eval $ac_try) 2>&5
11722 ac_status=$?
11723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11724 (exit $ac_status); }; } &&
11725 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11727 (eval $ac_try) 2>&5
11728 ac_status=$?
c0d27fcc 11729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11730 (exit $ac_status); }; }; then
98418dba 11731 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 11732else
503d2be0 11733 echo "$as_me: failed program was:" >&5
19650fd6
AS
11734sed 's/^/| /' conftest.$ac_ext >&5
11735
98418dba 11736ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 11737fi
edfaf76d
LK
11738rm -f conftest.err conftest.$ac_objext \
11739 conftest$ac_exeext conftest.$ac_ext
98418dba 11740LIBS=$ac_check_lib_save_LIBS
ba4481b5 11741fi
c0d27fcc 11742echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
98418dba
CW
11743echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6
11744if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
11745 HAVE_JPEG=yes
ba4481b5 11746fi
98418dba 11747
ba4481b5 11748fi
98418dba 11749
c0d27fcc 11750
ba4481b5 11751 fi
ba4481b5 11752
c0d27fcc 11753
98418dba 11754 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 11755 cat >>confdefs.h <<\_ACEOF
98418dba 11756#define HAVE_JPEG 1
c0d27fcc 11757_ACEOF
98418dba
CW
11758
11759 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11760/* confdefs.h. */
11761_ACEOF
11762cat confdefs.h >>conftest.$ac_ext
11763cat >>conftest.$ac_ext <<_ACEOF
11764/* end confdefs.h. */
22044edf 11765#include <jpeglib.h>
98418dba
CW
11766 version=JPEG_LIB_VERSION
11767
11768_ACEOF
11769if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 11770 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 11771 cat >>confdefs.h <<\_ACEOF
98418dba 11772#define HAVE_JPEG 1
c0d27fcc 11773_ACEOF
ba4481b5 11774
98418dba 11775else
c0d27fcc 11776 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
11777echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
11778 HAVE_JPEG=no
ba4481b5 11779fi
98418dba 11780rm -f conftest*
ba4481b5 11781
98418dba
CW
11782 fi
11783fi
503d2be0 11784
98418dba
CW
11785### Use -lpng if available, unless `--with-png=no'.
11786HAVE_PNG=no
11787if test "${HAVE_X11}" = "yes"; then
11788 if test "${with_png}" != "no"; then
f57bd967
DL
11789 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
11790 # in /usr/include/libpng.
11791
11792
11793for ac_header in png.h libpng/png.h
11794do
11795as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11796if eval "test \"\${$as_ac_Header+set}\" = set"; then
11797 echo "$as_me:$LINENO: checking for $ac_header" >&5
11798echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11799if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 11800 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 11801fi
f57bd967
DL
11802echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11803echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
503d2be0 11804else
c0d27fcc 11805 # Is the header compilable?
f57bd967
DL
11806echo "$as_me:$LINENO: checking $ac_header usability" >&5
11807echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
c0d27fcc 11808cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11809/* confdefs.h. */
11810_ACEOF
11811cat confdefs.h >>conftest.$ac_ext
11812cat >>conftest.$ac_ext <<_ACEOF
11813/* end confdefs.h. */
c0d27fcc 11814$ac_includes_default
f57bd967 11815#include <$ac_header>
c0d27fcc
MR
11816_ACEOF
11817rm -f conftest.$ac_objext
11818if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11819 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11820 ac_status=$?
edfaf76d
LK
11821 grep -v '^ *+' conftest.er1 >conftest.err
11822 rm -f conftest.er1
11823 cat conftest.err >&5
c0d27fcc
MR
11824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11825 (exit $ac_status); } &&
edfaf76d
LK
11826 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11828 (eval $ac_try) 2>&5
11829 ac_status=$?
11830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11831 (exit $ac_status); }; } &&
11832 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11834 (eval $ac_try) 2>&5
11835 ac_status=$?
11836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11837 (exit $ac_status); }; }; then
11838 ac_header_compiler=yes
11839else
11840 echo "$as_me: failed program was:" >&5
19650fd6
AS
11841sed 's/^/| /' conftest.$ac_ext >&5
11842
c0d27fcc
MR
11843ac_header_compiler=no
11844fi
edfaf76d 11845rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11846echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11847echo "${ECHO_T}$ac_header_compiler" >&6
11848
11849# Is the header present?
f57bd967
DL
11850echo "$as_me:$LINENO: checking $ac_header presence" >&5
11851echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
c0d27fcc 11852cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11853/* confdefs.h. */
11854_ACEOF
11855cat confdefs.h >>conftest.$ac_ext
11856cat >>conftest.$ac_ext <<_ACEOF
11857/* end confdefs.h. */
f57bd967 11858#include <$ac_header>
503d2be0 11859_ACEOF
c0d27fcc 11860if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11861 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11862 ac_status=$?
6bae0ccf 11863 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
11864 rm -f conftest.er1
11865 cat conftest.err >&5
c0d27fcc 11866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11867 (exit $ac_status); } >/dev/null; then
11868 if test -s conftest.err; then
11869 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 11870 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
11871 else
11872 ac_cpp_err=
11873 fi
11874else
11875 ac_cpp_err=yes
11876fi
11877if test -z "$ac_cpp_err"; then
c0d27fcc 11878 ac_header_preproc=yes
503d2be0
AS
11879else
11880 echo "$as_me: failed program was:" >&5
19650fd6
AS
11881sed 's/^/| /' conftest.$ac_ext >&5
11882
c0d27fcc 11883 ac_header_preproc=no
ba4481b5 11884fi
503d2be0 11885rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11886echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11887echo "${ECHO_T}$ac_header_preproc" >&6
11888
11889# So? What about this header?
edfaf76d
LK
11890case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11891 yes:no: )
f57bd967
DL
11892 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11893echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11894 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11895echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11896 ac_header_preproc=yes
19650fd6 11897 ;;
edfaf76d 11898 no:yes:* )
f57bd967
DL
11899 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11900echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
11901 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11902echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11903 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11904echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11905 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11906echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 11907 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 11908echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11909 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11910echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
11911 (
11912 cat <<\_ASBOX
edfaf76d
LK
11913## ------------------------------------------ ##
11914## Report this to the AC_PACKAGE_NAME lists. ##
11915## ------------------------------------------ ##
19650fd6
AS
11916_ASBOX
11917 ) |
11918 sed "s/^/$as_me: WARNING: /" >&2
11919 ;;
c0d27fcc 11920esac
f57bd967
DL
11921echo "$as_me:$LINENO: checking for $ac_header" >&5
11922echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11923if eval "test \"\${$as_ac_Header+set}\" = set"; then
c0d27fcc
MR
11924 echo $ECHO_N "(cached) $ECHO_C" >&6
11925else
edfaf76d 11926 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967
DL
11927fi
11928echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11929echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11930
ba4481b5 11931fi
f57bd967
DL
11932if test `eval echo '${'$as_ac_Header'}'` = yes; then
11933 cat >>confdefs.h <<_ACEOF
11934#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11935_ACEOF
c0d27fcc
MR
11936
11937fi
f57bd967
DL
11938
11939done
11940
11941 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
11942 echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
98418dba
CW
11943echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6
11944if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 11945 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11946else
98418dba
CW
11947 ac_check_lib_save_LIBS=$LIBS
11948LIBS="-lpng -lz -lm $LIBS"
11949cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11950/* confdefs.h. */
11951_ACEOF
11952cat confdefs.h >>conftest.$ac_ext
11953cat >>conftest.$ac_ext <<_ACEOF
11954/* end confdefs.h. */
98418dba 11955
ba4481b5 11956/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11957#ifdef __cplusplus
11958extern "C"
11959#endif
ba4481b5 11960/* We use char because int might match the return type of a gcc2
503d2be0 11961 builtin and then its argument prototype would still apply. */
98418dba 11962char png_get_channels ();
503d2be0
AS
11963int
11964main ()
11965{
98418dba 11966png_get_channels ();
503d2be0
AS
11967 ;
11968 return 0;
11969}
11970_ACEOF
11971rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11972if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11973 (eval $ac_link) 2>conftest.er1
503d2be0 11974 ac_status=$?
edfaf76d
LK
11975 grep -v '^ *+' conftest.er1 >conftest.err
11976 rm -f conftest.er1
11977 cat conftest.err >&5
c0d27fcc 11978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11979 (exit $ac_status); } &&
edfaf76d
LK
11980 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11982 (eval $ac_try) 2>&5
11983 ac_status=$?
11984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11985 (exit $ac_status); }; } &&
11986 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11988 (eval $ac_try) 2>&5
11989 ac_status=$?
c0d27fcc 11990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11991 (exit $ac_status); }; }; then
98418dba 11992 ac_cv_lib_png_png_get_channels=yes
73b77ee5 11993else
98418dba 11994 echo "$as_me: failed program was:" >&5
19650fd6
AS
11995sed 's/^/| /' conftest.$ac_ext >&5
11996
98418dba 11997ac_cv_lib_png_png_get_channels=no
73b77ee5 11998fi
edfaf76d
LK
11999rm -f conftest.err conftest.$ac_objext \
12000 conftest$ac_exeext conftest.$ac_ext
98418dba 12001LIBS=$ac_check_lib_save_LIBS
73b77ee5 12002fi
c0d27fcc 12003echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
98418dba
CW
12004echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6
12005if test $ac_cv_lib_png_png_get_channels = yes; then
12006 HAVE_PNG=yes
73b77ee5 12007fi
503d2be0 12008
f57bd967 12009 fi
98418dba
CW
12010 fi
12011
12012 if test "${HAVE_PNG}" = "yes"; then
b936fae4 12013
c0d27fcc 12014cat >>confdefs.h <<\_ACEOF
98418dba 12015#define HAVE_PNG 1
c0d27fcc 12016_ACEOF
73b77ee5 12017
98418dba 12018 fi
73b77ee5
GM
12019fi
12020
98418dba
CW
12021### Use -ltiff if available, unless `--with-tiff=no'.
12022HAVE_TIFF=no
12023if test "${HAVE_X11}" = "yes"; then
12024 if test "${with_tiff}" != "no"; then
c0d27fcc
MR
12025 if test "${ac_cv_header_tiffio_h+set}" = set; then
12026 echo "$as_me:$LINENO: checking for tiffio.h" >&5
98418dba
CW
12027echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
12028if test "${ac_cv_header_tiffio_h+set}" = set; then
12029 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12030fi
12031echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
12032echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
98418dba 12033else
c0d27fcc
MR
12034 # Is the header compilable?
12035echo "$as_me:$LINENO: checking tiffio.h usability" >&5
12036echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6
12037cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12038/* confdefs.h. */
12039_ACEOF
12040cat confdefs.h >>conftest.$ac_ext
12041cat >>conftest.$ac_ext <<_ACEOF
12042/* end confdefs.h. */
c0d27fcc
MR
12043$ac_includes_default
12044#include <tiffio.h>
12045_ACEOF
12046rm -f conftest.$ac_objext
12047if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 12048 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12049 ac_status=$?
edfaf76d
LK
12050 grep -v '^ *+' conftest.er1 >conftest.err
12051 rm -f conftest.er1
12052 cat conftest.err >&5
c0d27fcc
MR
12053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12054 (exit $ac_status); } &&
edfaf76d
LK
12055 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12057 (eval $ac_try) 2>&5
12058 ac_status=$?
12059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12060 (exit $ac_status); }; } &&
12061 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12063 (eval $ac_try) 2>&5
12064 ac_status=$?
12065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12066 (exit $ac_status); }; }; then
12067 ac_header_compiler=yes
12068else
12069 echo "$as_me: failed program was:" >&5
19650fd6
AS
12070sed 's/^/| /' conftest.$ac_ext >&5
12071
c0d27fcc
MR
12072ac_header_compiler=no
12073fi
edfaf76d 12074rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12075echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12076echo "${ECHO_T}$ac_header_compiler" >&6
12077
12078# Is the header present?
12079echo "$as_me:$LINENO: checking tiffio.h presence" >&5
12080echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6
12081cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12082/* confdefs.h. */
12083_ACEOF
12084cat confdefs.h >>conftest.$ac_ext
12085cat >>conftest.$ac_ext <<_ACEOF
12086/* end confdefs.h. */
98418dba
CW
12087#include <tiffio.h>
12088_ACEOF
c0d27fcc 12089if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12090 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12091 ac_status=$?
6bae0ccf 12092 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12093 rm -f conftest.er1
12094 cat conftest.err >&5
c0d27fcc 12095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12096 (exit $ac_status); } >/dev/null; then
12097 if test -s conftest.err; then
12098 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12099 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12100 else
12101 ac_cpp_err=
12102 fi
12103else
12104 ac_cpp_err=yes
12105fi
12106if test -z "$ac_cpp_err"; then
c0d27fcc 12107 ac_header_preproc=yes
98418dba
CW
12108else
12109 echo "$as_me: failed program was:" >&5
19650fd6
AS
12110sed 's/^/| /' conftest.$ac_ext >&5
12111
c0d27fcc 12112 ac_header_preproc=no
98418dba
CW
12113fi
12114rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12115echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12116echo "${ECHO_T}$ac_header_preproc" >&6
12117
12118# So? What about this header?
edfaf76d
LK
12119case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12120 yes:no: )
c0d27fcc
MR
12121 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
12122echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12123 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
12124echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
12125 ac_header_preproc=yes
19650fd6 12126 ;;
edfaf76d 12127 no:yes:* )
c0d27fcc
MR
12128 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
12129echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
edfaf76d
LK
12130 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
12131echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
12132 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
12133echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
12134 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
12135echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12136 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 12137echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12138 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
12139echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12140 (
12141 cat <<\_ASBOX
edfaf76d
LK
12142## ------------------------------------------ ##
12143## Report this to the AC_PACKAGE_NAME lists. ##
12144## ------------------------------------------ ##
19650fd6
AS
12145_ASBOX
12146 ) |
12147 sed "s/^/$as_me: WARNING: /" >&2
12148 ;;
c0d27fcc
MR
12149esac
12150echo "$as_me:$LINENO: checking for tiffio.h" >&5
12151echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
12152if test "${ac_cv_header_tiffio_h+set}" = set; then
12153 echo $ECHO_N "(cached) $ECHO_C" >&6
12154else
12155 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 12156fi
c0d27fcc 12157echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
98418dba 12158echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
c0d27fcc
MR
12159
12160fi
98418dba
CW
12161if test $ac_cv_header_tiffio_h = yes; then
12162 tifflibs="-lz -lm"
12163 # At least one tiff package requires the jpeg library.
12164 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
c0d27fcc 12165 echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
98418dba
CW
12166echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6
12167if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 12168 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12169else
503d2be0 12170 ac_check_lib_save_LIBS=$LIBS
98418dba 12171LIBS="-ltiff $tifflibs $LIBS"
503d2be0 12172cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12173/* confdefs.h. */
12174_ACEOF
12175cat confdefs.h >>conftest.$ac_ext
12176cat >>conftest.$ac_ext <<_ACEOF
12177/* end confdefs.h. */
503d2be0 12178
73b77ee5 12179/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12180#ifdef __cplusplus
12181extern "C"
12182#endif
73b77ee5 12183/* We use char because int might match the return type of a gcc2
503d2be0 12184 builtin and then its argument prototype would still apply. */
98418dba 12185char TIFFGetVersion ();
503d2be0
AS
12186int
12187main ()
12188{
98418dba 12189TIFFGetVersion ();
503d2be0
AS
12190 ;
12191 return 0;
12192}
12193_ACEOF
12194rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12195if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 12196 (eval $ac_link) 2>conftest.er1
503d2be0 12197 ac_status=$?
edfaf76d
LK
12198 grep -v '^ *+' conftest.er1 >conftest.err
12199 rm -f conftest.er1
12200 cat conftest.err >&5
c0d27fcc 12201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12202 (exit $ac_status); } &&
edfaf76d
LK
12203 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12205 (eval $ac_try) 2>&5
12206 ac_status=$?
12207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12208 (exit $ac_status); }; } &&
12209 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12211 (eval $ac_try) 2>&5
12212 ac_status=$?
c0d27fcc 12213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12214 (exit $ac_status); }; }; then
98418dba 12215 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
12216else
12217 echo "$as_me: failed program was:" >&5
19650fd6
AS
12218sed 's/^/| /' conftest.$ac_ext >&5
12219
98418dba 12220ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 12221fi
edfaf76d
LK
12222rm -f conftest.err conftest.$ac_objext \
12223 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
12224LIBS=$ac_check_lib_save_LIBS
12225fi
c0d27fcc 12226echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
98418dba
CW
12227echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6
12228if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
12229 HAVE_TIFF=yes
12230fi
12231
12232fi
73b77ee5 12233
c0d27fcc 12234
98418dba
CW
12235 fi
12236
12237 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 12238
c0d27fcc 12239cat >>confdefs.h <<\_ACEOF
98418dba 12240#define HAVE_TIFF 1
c0d27fcc 12241_ACEOF
98418dba
CW
12242
12243 fi
73b77ee5
GM
12244fi
12245
98418dba
CW
12246### Use -lgif if available, unless `--with-gif=no'.
12247HAVE_GIF=no
12248if test "${HAVE_X11}" = "yes"; then
12249 if test "${with_gif}" != "no"; then
c0d27fcc
MR
12250 if test "${ac_cv_header_gif_lib_h+set}" = set; then
12251 echo "$as_me:$LINENO: checking for gif_lib.h" >&5
98418dba
CW
12252echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
12253if test "${ac_cv_header_gif_lib_h+set}" = set; then
12254 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12255fi
12256echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
12257echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
98418dba 12258else
c0d27fcc
MR
12259 # Is the header compilable?
12260echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
12261echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6
12262cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12263/* confdefs.h. */
12264_ACEOF
12265cat confdefs.h >>conftest.$ac_ext
12266cat >>conftest.$ac_ext <<_ACEOF
12267/* end confdefs.h. */
c0d27fcc
MR
12268$ac_includes_default
12269#include <gif_lib.h>
12270_ACEOF
12271rm -f conftest.$ac_objext
12272if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 12273 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12274 ac_status=$?
edfaf76d
LK
12275 grep -v '^ *+' conftest.er1 >conftest.err
12276 rm -f conftest.er1
12277 cat conftest.err >&5
c0d27fcc
MR
12278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12279 (exit $ac_status); } &&
edfaf76d
LK
12280 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12282 (eval $ac_try) 2>&5
12283 ac_status=$?
12284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12285 (exit $ac_status); }; } &&
12286 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12288 (eval $ac_try) 2>&5
12289 ac_status=$?
12290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12291 (exit $ac_status); }; }; then
12292 ac_header_compiler=yes
12293else
12294 echo "$as_me: failed program was:" >&5
19650fd6
AS
12295sed 's/^/| /' conftest.$ac_ext >&5
12296
c0d27fcc
MR
12297ac_header_compiler=no
12298fi
edfaf76d 12299rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12300echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12301echo "${ECHO_T}$ac_header_compiler" >&6
12302
12303# Is the header present?
12304echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
12305echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6
12306cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12307/* confdefs.h. */
12308_ACEOF
12309cat confdefs.h >>conftest.$ac_ext
12310cat >>conftest.$ac_ext <<_ACEOF
12311/* end confdefs.h. */
98418dba
CW
12312#include <gif_lib.h>
12313_ACEOF
c0d27fcc 12314if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12315 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12316 ac_status=$?
6bae0ccf 12317 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12318 rm -f conftest.er1
12319 cat conftest.err >&5
c0d27fcc 12320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12321 (exit $ac_status); } >/dev/null; then
12322 if test -s conftest.err; then
12323 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12324 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12325 else
12326 ac_cpp_err=
12327 fi
12328else
12329 ac_cpp_err=yes
12330fi
12331if test -z "$ac_cpp_err"; then
c0d27fcc 12332 ac_header_preproc=yes
98418dba
CW
12333else
12334 echo "$as_me: failed program was:" >&5
19650fd6
AS
12335sed 's/^/| /' conftest.$ac_ext >&5
12336
c0d27fcc 12337 ac_header_preproc=no
98418dba
CW
12338fi
12339rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12340echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12341echo "${ECHO_T}$ac_header_preproc" >&6
12342
12343# So? What about this header?
edfaf76d
LK
12344case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12345 yes:no: )
c0d27fcc
MR
12346 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
12347echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12348 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
12349echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
12350 ac_header_preproc=yes
19650fd6 12351 ;;
edfaf76d 12352 no:yes:* )
c0d27fcc
MR
12353 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
12354echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
12355 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
12356echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
12357 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
12358echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
12359 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
12360echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12361 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 12362echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12363 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
12364echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12365 (
12366 cat <<\_ASBOX
edfaf76d
LK
12367## ------------------------------------------ ##
12368## Report this to the AC_PACKAGE_NAME lists. ##
12369## ------------------------------------------ ##
19650fd6
AS
12370_ASBOX
12371 ) |
12372 sed "s/^/$as_me: WARNING: /" >&2
12373 ;;
c0d27fcc
MR
12374esac
12375echo "$as_me:$LINENO: checking for gif_lib.h" >&5
12376echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
12377if test "${ac_cv_header_gif_lib_h+set}" = set; then
12378 echo $ECHO_N "(cached) $ECHO_C" >&6
12379else
12380 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 12381fi
c0d27fcc 12382echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
98418dba 12383echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
c0d27fcc
MR
12384
12385fi
98418dba
CW
12386if test $ac_cv_header_gif_lib_h = yes; then
12387 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
12388# Earlier versions can crash Emacs.
c0d27fcc 12389 echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
98418dba
CW
12390echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6
12391if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
503d2be0 12392 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12393else
503d2be0 12394 ac_check_lib_save_LIBS=$LIBS
98418dba 12395LIBS="-lungif $LIBS"
503d2be0 12396cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12397/* confdefs.h. */
12398_ACEOF
12399cat confdefs.h >>conftest.$ac_ext
12400cat >>conftest.$ac_ext <<_ACEOF
12401/* end confdefs.h. */
73b77ee5 12402
98418dba
CW
12403/* Override any gcc2 internal prototype to avoid an error. */
12404#ifdef __cplusplus
12405extern "C"
12406#endif
12407/* We use char because int might match the return type of a gcc2
12408 builtin and then its argument prototype would still apply. */
12409char EGifPutExtensionLast ();
503d2be0
AS
12410int
12411main ()
12412{
98418dba 12413EGifPutExtensionLast ();
503d2be0
AS
12414 ;
12415 return 0;
12416}
12417_ACEOF
12418rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12419if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 12420 (eval $ac_link) 2>conftest.er1
503d2be0 12421 ac_status=$?
edfaf76d
LK
12422 grep -v '^ *+' conftest.er1 >conftest.err
12423 rm -f conftest.er1
12424 cat conftest.err >&5
c0d27fcc 12425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 12426 (exit $ac_status); } &&
edfaf76d
LK
12427 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12429 (eval $ac_try) 2>&5
12430 ac_status=$?
12431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12432 (exit $ac_status); }; } &&
12433 { ac_try='test -s conftest$ac_exeext'
35996d22
AS
12434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12435 (eval $ac_try) 2>&5
12436 ac_status=$?
12437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12438 (exit $ac_status); }; }; then
12439 ac_cv_lib_ungif_EGifPutExtensionLast=yes
12440else
98418dba 12441 echo "$as_me: failed program was:" >&5
19650fd6
AS
12442sed 's/^/| /' conftest.$ac_ext >&5
12443
98418dba
CW
12444ac_cv_lib_ungif_EGifPutExtensionLast=no
12445fi
edfaf76d
LK
12446rm -f conftest.err conftest.$ac_objext \
12447 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12448LIBS=$ac_check_lib_save_LIBS
12449fi
c0d27fcc 12450echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
98418dba
CW
12451echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6
12452if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
12453 HAVE_GIF=yes
12454fi
12455
12456fi
12457
c0d27fcc 12458
98418dba
CW
12459 fi
12460
12461 if test "${HAVE_GIF}" = "yes"; then
b936fae4 12462
c0d27fcc 12463cat >>confdefs.h <<\_ACEOF
98418dba 12464#define HAVE_GIF 1
c0d27fcc 12465_ACEOF
98418dba
CW
12466
12467 fi
12468fi
12469
cef11da2
ST
12470if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12471 echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
12472echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6
12473if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12474 echo $ECHO_N "(cached) $ECHO_C" >&6
12475fi
12476echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
12477echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6
12478else
12479 # Is the header compilable?
12480echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
12481echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6
12482cat >conftest.$ac_ext <<_ACEOF
12483/* confdefs.h. */
12484_ACEOF
12485cat confdefs.h >>conftest.$ac_ext
12486cat >>conftest.$ac_ext <<_ACEOF
12487/* end confdefs.h. */
12488$ac_includes_default
12489#include <malloc/malloc.h>
12490_ACEOF
12491rm -f conftest.$ac_objext
12492if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 12493 (eval $ac_compile) 2>conftest.er1
cef11da2 12494 ac_status=$?
edfaf76d
LK
12495 grep -v '^ *+' conftest.er1 >conftest.err
12496 rm -f conftest.er1
12497 cat conftest.err >&5
cef11da2
ST
12498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12499 (exit $ac_status); } &&
edfaf76d
LK
12500 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
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); }; } &&
12506 { ac_try='test -s conftest.$ac_objext'
cef11da2
ST
12507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12508 (eval $ac_try) 2>&5
12509 ac_status=$?
12510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12511 (exit $ac_status); }; }; then
12512 ac_header_compiler=yes
12513else
12514 echo "$as_me: failed program was:" >&5
12515sed 's/^/| /' conftest.$ac_ext >&5
12516
12517ac_header_compiler=no
12518fi
edfaf76d 12519rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cef11da2
ST
12520echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12521echo "${ECHO_T}$ac_header_compiler" >&6
12522
12523# Is the header present?
12524echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
12525echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6
12526cat >conftest.$ac_ext <<_ACEOF
12527/* confdefs.h. */
12528_ACEOF
12529cat confdefs.h >>conftest.$ac_ext
12530cat >>conftest.$ac_ext <<_ACEOF
12531/* end confdefs.h. */
12532#include <malloc/malloc.h>
12533_ACEOF
12534if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12535 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12536 ac_status=$?
12537 grep -v '^ *+' conftest.er1 >conftest.err
12538 rm -f conftest.er1
12539 cat conftest.err >&5
12540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12541 (exit $ac_status); } >/dev/null; then
12542 if test -s conftest.err; then
12543 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12544 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
cef11da2
ST
12545 else
12546 ac_cpp_err=
12547 fi
12548else
12549 ac_cpp_err=yes
12550fi
12551if test -z "$ac_cpp_err"; then
12552 ac_header_preproc=yes
12553else
12554 echo "$as_me: failed program was:" >&5
12555sed 's/^/| /' conftest.$ac_ext >&5
12556
12557 ac_header_preproc=no
12558fi
12559rm -f conftest.err conftest.$ac_ext
12560echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12561echo "${ECHO_T}$ac_header_preproc" >&6
12562
12563# So? What about this header?
edfaf76d
LK
12564case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12565 yes:no: )
cef11da2
ST
12566 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
12567echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12568 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
12569echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
12570 ac_header_preproc=yes
cef11da2 12571 ;;
edfaf76d 12572 no:yes:* )
cef11da2
ST
12573 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
12574echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
edfaf76d
LK
12575 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
12576echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
12577 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
12578echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
12579 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
12580echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
cef11da2
ST
12581 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
12582echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12583 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
12584echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
cef11da2
ST
12585 (
12586 cat <<\_ASBOX
edfaf76d
LK
12587## ------------------------------------------ ##
12588## Report this to the AC_PACKAGE_NAME lists. ##
12589## ------------------------------------------ ##
cef11da2
ST
12590_ASBOX
12591 ) |
12592 sed "s/^/$as_me: WARNING: /" >&2
12593 ;;
12594esac
12595echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
12596echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6
12597if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12598 echo $ECHO_N "(cached) $ECHO_C" >&6
12599else
12600 ac_cv_header_malloc_malloc_h=$ac_header_preproc
12601fi
12602echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
12603echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6
12604
12605fi
12606if test $ac_cv_header_malloc_malloc_h = yes; then
12607
12608cat >>confdefs.h <<\_ACEOF
12609#define HAVE_MALLOC_MALLOC_H 1
12610_ACEOF
12611
12612fi
12613
12614
12615
5d6da11e 12616### Use Mac OS X Carbon API to implement GUI.
e0f712ba 12617if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 12618
c0d27fcc 12619cat >>confdefs.h <<\_ACEOF
e0f712ba 12620#define HAVE_CARBON 1
c0d27fcc 12621_ACEOF
e0f712ba 12622
6a3a24fa
JD
12623 window_system=mac
12624 ## Specify the install directory
12625 carbon_appdir=
12626 if test "${carbon_appdir_x}" != ""; then
12627 case ${carbon_appdir_x} in
12628 y | ye | yes) carbon_appdir=/Applications ;;
12629 * ) carbon_appdir=${carbon_appdir_x} ;;
12630 esac
12631 fi
8f417b3b
AS
12632 # We also have mouse menus.
12633 HAVE_MENUS=yes
7c9e5167
JD
12634
12635 tmp_CFLAGS="$CFLAGS"
12636 CFLAGS="$CFLAGS -framework Carbon"
12637 echo "$as_me:$LINENO: checking for CancelMenuTracking" >&5
12638echo $ECHO_N "checking for CancelMenuTracking... $ECHO_C" >&6
12639if test "${ac_cv_func_CancelMenuTracking+set}" = set; then
12640 echo $ECHO_N "(cached) $ECHO_C" >&6
12641else
12642 cat >conftest.$ac_ext <<_ACEOF
7c9e5167
JD
12643/* confdefs.h. */
12644_ACEOF
12645cat confdefs.h >>conftest.$ac_ext
12646cat >>conftest.$ac_ext <<_ACEOF
12647/* end confdefs.h. */
edfaf76d
LK
12648/* Define CancelMenuTracking to an innocuous variant, in case <limits.h> declares CancelMenuTracking.
12649 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12650#define CancelMenuTracking innocuous_CancelMenuTracking
12651
7c9e5167
JD
12652/* System header to define __stub macros and hopefully few prototypes,
12653 which can conflict with char CancelMenuTracking (); below.
12654 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12655 <limits.h> exists even on freestanding compilers. */
edfaf76d 12656
7c9e5167
JD
12657#ifdef __STDC__
12658# include <limits.h>
12659#else
12660# include <assert.h>
12661#endif
edfaf76d
LK
12662
12663#undef CancelMenuTracking
12664
7c9e5167
JD
12665/* Override any gcc2 internal prototype to avoid an error. */
12666#ifdef __cplusplus
12667extern "C"
12668{
12669#endif
12670/* We use char because int might match the return type of a gcc2
12671 builtin and then its argument prototype would still apply. */
12672char CancelMenuTracking ();
12673/* The GNU C library defines this for functions which it implements
12674 to always fail with ENOSYS. Some functions are actually named
12675 something starting with __ and the normal name is an alias. */
12676#if defined (__stub_CancelMenuTracking) || defined (__stub___CancelMenuTracking)
12677choke me
12678#else
12679char (*f) () = CancelMenuTracking;
12680#endif
12681#ifdef __cplusplus
12682}
12683#endif
12684
12685int
12686main ()
12687{
12688return f != CancelMenuTracking;
12689 ;
12690 return 0;
12691}
12692_ACEOF
12693rm -f conftest.$ac_objext conftest$ac_exeext
12694if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 12695 (eval $ac_link) 2>conftest.er1
7c9e5167 12696 ac_status=$?
edfaf76d
LK
12697 grep -v '^ *+' conftest.er1 >conftest.err
12698 rm -f conftest.er1
12699 cat conftest.err >&5
7c9e5167
JD
12700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12701 (exit $ac_status); } &&
edfaf76d
LK
12702 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12704 (eval $ac_try) 2>&5
12705 ac_status=$?
12706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12707 (exit $ac_status); }; } &&
12708 { ac_try='test -s conftest$ac_exeext'
7c9e5167
JD
12709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12710 (eval $ac_try) 2>&5
12711 ac_status=$?
12712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12713 (exit $ac_status); }; }; then
12714 ac_cv_func_CancelMenuTracking=yes
12715else
12716 echo "$as_me: failed program was:" >&5
12717sed 's/^/| /' conftest.$ac_ext >&5
12718
12719ac_cv_func_CancelMenuTracking=no
12720fi
edfaf76d
LK
12721rm -f conftest.err conftest.$ac_objext \
12722 conftest$ac_exeext conftest.$ac_ext
7c9e5167
JD
12723fi
12724echo "$as_me:$LINENO: result: $ac_cv_func_CancelMenuTracking" >&5
12725echo "${ECHO_T}$ac_cv_func_CancelMenuTracking" >&6
12726if test $ac_cv_func_CancelMenuTracking = yes; then
12727 have_cmt=yes
12728else
12729 have_cmt=no
12730fi
12731
12732 if test "$have_cmt" = yes; then
12733
12734cat >>confdefs.h <<\_ACEOF
12735#define HAVE_CANCELMENUTRACKING 1
12736_ACEOF
12737
12738 fi
12739 CFLAGS="$tmp_CFLAGS"
e0f712ba
AC
12740fi
12741
98418dba
CW
12742### Use session management (-lSM -lICE) if available
12743HAVE_X_SM=no
12744if test "${HAVE_X11}" = "yes"; then
c0d27fcc
MR
12745 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
12746 echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
98418dba
CW
12747echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
12748if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
12749 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12750fi
12751echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
12752echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
503d2be0 12753else
c0d27fcc
MR
12754 # Is the header compilable?
12755echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
12756echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6
12757cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12758/* confdefs.h. */
12759_ACEOF
12760cat confdefs.h >>conftest.$ac_ext
12761cat >>conftest.$ac_ext <<_ACEOF
12762/* end confdefs.h. */
c0d27fcc
MR
12763$ac_includes_default
12764#include <X11/SM/SMlib.h>
12765_ACEOF
12766rm -f conftest.$ac_objext
12767if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 12768 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12769 ac_status=$?
edfaf76d
LK
12770 grep -v '^ *+' conftest.er1 >conftest.err
12771 rm -f conftest.er1
12772 cat conftest.err >&5
c0d27fcc
MR
12773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12774 (exit $ac_status); } &&
edfaf76d
LK
12775 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12777 (eval $ac_try) 2>&5
12778 ac_status=$?
12779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12780 (exit $ac_status); }; } &&
12781 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
12787 ac_header_compiler=yes
12788else
12789 echo "$as_me: failed program was:" >&5
19650fd6
AS
12790sed 's/^/| /' conftest.$ac_ext >&5
12791
c0d27fcc
MR
12792ac_header_compiler=no
12793fi
edfaf76d 12794rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12795echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12796echo "${ECHO_T}$ac_header_compiler" >&6
12797
12798# Is the header present?
12799echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
12800echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6
12801cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12802/* confdefs.h. */
12803_ACEOF
12804cat confdefs.h >>conftest.$ac_ext
12805cat >>conftest.$ac_ext <<_ACEOF
12806/* end confdefs.h. */
98418dba
CW
12807#include <X11/SM/SMlib.h>
12808_ACEOF
c0d27fcc 12809if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12810 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12811 ac_status=$?
6bae0ccf 12812 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12813 rm -f conftest.er1
12814 cat conftest.err >&5
c0d27fcc 12815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12816 (exit $ac_status); } >/dev/null; then
12817 if test -s conftest.err; then
12818 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12819 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12820 else
12821 ac_cpp_err=
12822 fi
12823else
12824 ac_cpp_err=yes
503d2be0 12825fi
98418dba 12826if test -z "$ac_cpp_err"; then
c0d27fcc 12827 ac_header_preproc=yes
98418dba
CW
12828else
12829 echo "$as_me: failed program was:" >&5
19650fd6
AS
12830sed 's/^/| /' conftest.$ac_ext >&5
12831
c0d27fcc 12832 ac_header_preproc=no
98418dba
CW
12833fi
12834rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12835echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12836echo "${ECHO_T}$ac_header_preproc" >&6
12837
12838# So? What about this header?
edfaf76d
LK
12839case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12840 yes:no: )
c0d27fcc
MR
12841 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
12842echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12843 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
12844echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
12845 ac_header_preproc=yes
19650fd6 12846 ;;
edfaf76d 12847 no:yes:* )
c0d27fcc
MR
12848 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
12849echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
12850 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
12851echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
12852 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
12853echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
12854 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
12855echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12856 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 12857echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12858 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
12859echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12860 (
12861 cat <<\_ASBOX
edfaf76d
LK
12862## ------------------------------------------ ##
12863## Report this to the AC_PACKAGE_NAME lists. ##
12864## ------------------------------------------ ##
19650fd6
AS
12865_ASBOX
12866 ) |
12867 sed "s/^/$as_me: WARNING: /" >&2
12868 ;;
c0d27fcc
MR
12869esac
12870echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
12871echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
12872if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
12873 echo $ECHO_N "(cached) $ECHO_C" >&6
12874else
12875 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 12876fi
c0d27fcc 12877echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
98418dba 12878echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
c0d27fcc
MR
12879
12880fi
98418dba 12881if test $ac_cv_header_X11_SM_SMlib_h = yes; then
c0d27fcc 12882 echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
98418dba
CW
12883echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6
12884if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 12885 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12886else
503d2be0 12887 ac_check_lib_save_LIBS=$LIBS
1660500f 12888LIBS="-lSM -lICE $LIBS"
503d2be0 12889cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12890/* confdefs.h. */
12891_ACEOF
12892cat confdefs.h >>conftest.$ac_ext
12893cat >>conftest.$ac_ext <<_ACEOF
12894/* end confdefs.h. */
503d2be0 12895
73b77ee5 12896/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12897#ifdef __cplusplus
12898extern "C"
12899#endif
73b77ee5 12900/* We use char because int might match the return type of a gcc2
503d2be0 12901 builtin and then its argument prototype would still apply. */
98418dba 12902char SmcOpenConnection ();
503d2be0
AS
12903int
12904main ()
12905{
98418dba 12906SmcOpenConnection ();
503d2be0
AS
12907 ;
12908 return 0;
12909}
12910_ACEOF
12911rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12912if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 12913 (eval $ac_link) 2>conftest.er1
503d2be0 12914 ac_status=$?
edfaf76d
LK
12915 grep -v '^ *+' conftest.er1 >conftest.err
12916 rm -f conftest.er1
12917 cat conftest.err >&5
c0d27fcc 12918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12919 (exit $ac_status); } &&
edfaf76d
LK
12920 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12922 (eval $ac_try) 2>&5
12923 ac_status=$?
12924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12925 (exit $ac_status); }; } &&
12926 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12928 (eval $ac_try) 2>&5
12929 ac_status=$?
c0d27fcc 12930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12931 (exit $ac_status); }; }; then
98418dba 12932 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
12933else
12934 echo "$as_me: failed program was:" >&5
19650fd6
AS
12935sed 's/^/| /' conftest.$ac_ext >&5
12936
98418dba 12937ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 12938fi
edfaf76d
LK
12939rm -f conftest.err conftest.$ac_objext \
12940 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
12941LIBS=$ac_check_lib_save_LIBS
12942fi
c0d27fcc 12943echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
98418dba
CW
12944echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6
12945if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
12946 HAVE_X_SM=yes
73b77ee5
GM
12947fi
12948
73b77ee5 12949fi
73b77ee5 12950
c0d27fcc
MR
12951
12952
98418dba 12953 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 12954
c0d27fcc 12955cat >>confdefs.h <<\_ACEOF
98418dba 12956#define HAVE_X_SM 1
c0d27fcc 12957_ACEOF
73b77ee5 12958
98418dba
CW
12959 case "$LIBS" in
12960 *-lSM*) ;;
12961 *) LIBS="-lSM -lICE $LIBS" ;;
12962 esac
73b77ee5 12963 fi
98418dba 12964fi
73b77ee5 12965
98418dba 12966# If netdb.h doesn't declare h_errno, we must declare it by hand.
c0d27fcc 12967echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
98418dba
CW
12968echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6
12969if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
12970 echo $ECHO_N "(cached) $ECHO_C" >&6
12971else
12972 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12973/* confdefs.h. */
12974_ACEOF
12975cat confdefs.h >>conftest.$ac_ext
12976cat >>conftest.$ac_ext <<_ACEOF
12977/* end confdefs.h. */
98418dba 12978#include <netdb.h>
503d2be0
AS
12979int
12980main ()
12981{
98418dba 12982return h_errno;
503d2be0
AS
12983 ;
12984 return 0;
12985}
12986_ACEOF
12987rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12988if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 12989 (eval $ac_link) 2>conftest.er1
503d2be0 12990 ac_status=$?
edfaf76d
LK
12991 grep -v '^ *+' conftest.er1 >conftest.err
12992 rm -f conftest.er1
12993 cat conftest.err >&5
c0d27fcc 12994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12995 (exit $ac_status); } &&
edfaf76d
LK
12996 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12998 (eval $ac_try) 2>&5
12999 ac_status=$?
13000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13001 (exit $ac_status); }; } &&
13002 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13004 (eval $ac_try) 2>&5
13005 ac_status=$?
c0d27fcc 13006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13007 (exit $ac_status); }; }; then
98418dba 13008 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 13009else
503d2be0 13010 echo "$as_me: failed program was:" >&5
19650fd6
AS
13011sed 's/^/| /' conftest.$ac_ext >&5
13012
98418dba 13013emacs_cv_netdb_declares_h_errno=no
73b77ee5 13014fi
edfaf76d
LK
13015rm -f conftest.err conftest.$ac_objext \
13016 conftest$ac_exeext conftest.$ac_ext
98418dba 13017fi
c0d27fcc 13018echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
98418dba
CW
13019echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6
13020if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 13021
c0d27fcc 13022cat >>confdefs.h <<\_ACEOF
98418dba 13023#define HAVE_H_ERRNO 1
c0d27fcc 13024_ACEOF
73b77ee5 13025
98418dba
CW
13026fi
13027
13028# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13029# for constant arguments. Useless!
c0d27fcc 13030echo "$as_me:$LINENO: checking for working alloca.h" >&5
98418dba
CW
13031echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
13032if test "${ac_cv_working_alloca_h+set}" = set; then
13033 echo $ECHO_N "(cached) $ECHO_C" >&6
13034else
13035 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13036/* confdefs.h. */
13037_ACEOF
13038cat confdefs.h >>conftest.$ac_ext
13039cat >>conftest.$ac_ext <<_ACEOF
13040/* end confdefs.h. */
98418dba 13041#include <alloca.h>
503d2be0
AS
13042int
13043main ()
13044{
98418dba 13045char *p = (char *) alloca (2 * sizeof (int));
503d2be0
AS
13046 ;
13047 return 0;
13048}
13049_ACEOF
13050rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13051if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13052 (eval $ac_link) 2>conftest.er1
503d2be0 13053 ac_status=$?
edfaf76d
LK
13054 grep -v '^ *+' conftest.er1 >conftest.err
13055 rm -f conftest.er1
13056 cat conftest.err >&5
c0d27fcc 13057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13058 (exit $ac_status); } &&
edfaf76d
LK
13059 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13061 (eval $ac_try) 2>&5
13062 ac_status=$?
13063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13064 (exit $ac_status); }; } &&
13065 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13067 (eval $ac_try) 2>&5
13068 ac_status=$?
c0d27fcc 13069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13070 (exit $ac_status); }; }; then
98418dba 13071 ac_cv_working_alloca_h=yes
73b77ee5 13072else
503d2be0 13073 echo "$as_me: failed program was:" >&5
19650fd6
AS
13074sed 's/^/| /' conftest.$ac_ext >&5
13075
98418dba 13076ac_cv_working_alloca_h=no
73b77ee5 13077fi
edfaf76d
LK
13078rm -f conftest.err conftest.$ac_objext \
13079 conftest$ac_exeext conftest.$ac_ext
98418dba 13080fi
c0d27fcc 13081echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
98418dba
CW
13082echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
13083if test $ac_cv_working_alloca_h = yes; then
73b77ee5 13084
c0d27fcc 13085cat >>confdefs.h <<\_ACEOF
98418dba 13086#define HAVE_ALLOCA_H 1
c0d27fcc 13087_ACEOF
98418dba
CW
13088
13089fi
13090
c0d27fcc 13091echo "$as_me:$LINENO: checking for alloca" >&5
98418dba
CW
13092echo $ECHO_N "checking for alloca... $ECHO_C" >&6
13093if test "${ac_cv_func_alloca_works+set}" = set; then
13094 echo $ECHO_N "(cached) $ECHO_C" >&6
13095else
503d2be0 13096 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13097/* confdefs.h. */
13098_ACEOF
13099cat confdefs.h >>conftest.$ac_ext
13100cat >>conftest.$ac_ext <<_ACEOF
13101/* end confdefs.h. */
98418dba
CW
13102#ifdef __GNUC__
13103# define alloca __builtin_alloca
13104#else
13105# ifdef _MSC_VER
13106# include <malloc.h>
13107# define alloca _alloca
13108# else
13109# if HAVE_ALLOCA_H
13110# include <alloca.h>
13111# else
13112# ifdef _AIX
13113 #pragma alloca
13114# else
13115# ifndef alloca /* predefined by HP cc +Olibcalls */
13116char *alloca ();
13117# endif
13118# endif
13119# endif
13120# endif
13121#endif
13122
503d2be0
AS
13123int
13124main ()
13125{
98418dba 13126char *p = (char *) alloca (1);
503d2be0
AS
13127 ;
13128 return 0;
13129}
13130_ACEOF
13131rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13133 (eval $ac_link) 2>conftest.er1
503d2be0 13134 ac_status=$?
edfaf76d
LK
13135 grep -v '^ *+' conftest.er1 >conftest.err
13136 rm -f conftest.er1
13137 cat conftest.err >&5
c0d27fcc 13138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13139 (exit $ac_status); } &&
edfaf76d
LK
13140 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13142 (eval $ac_try) 2>&5
13143 ac_status=$?
13144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13145 (exit $ac_status); }; } &&
13146 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13148 (eval $ac_try) 2>&5
13149 ac_status=$?
c0d27fcc 13150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13151 (exit $ac_status); }; }; then
98418dba 13152 ac_cv_func_alloca_works=yes
ac95a621 13153else
503d2be0 13154 echo "$as_me: failed program was:" >&5
19650fd6
AS
13155sed 's/^/| /' conftest.$ac_ext >&5
13156
98418dba 13157ac_cv_func_alloca_works=no
ac95a621 13158fi
edfaf76d
LK
13159rm -f conftest.err conftest.$ac_objext \
13160 conftest$ac_exeext conftest.$ac_ext
98418dba 13161fi
c0d27fcc 13162echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
98418dba 13163echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
ac95a621 13164
98418dba
CW
13165if test $ac_cv_func_alloca_works = yes; then
13166
c0d27fcc 13167cat >>confdefs.h <<\_ACEOF
98418dba 13168#define HAVE_ALLOCA 1
c0d27fcc 13169_ACEOF
98418dba
CW
13170
13171else
13172 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13173# that cause trouble. Some versions do not even contain alloca or
13174# contain a buggy version. If you still want to use their alloca,
13175# use ar to extract alloca.o from them instead of compiling alloca.c.
13176
13177ALLOCA=alloca.$ac_objext
13178
c0d27fcc 13179cat >>confdefs.h <<\_ACEOF
98418dba 13180#define C_ALLOCA 1
c0d27fcc 13181_ACEOF
98418dba 13182
c0d27fcc
MR
13183
13184echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
98418dba
CW
13185echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
13186if test "${ac_cv_os_cray+set}" = set; then
13187 echo $ECHO_N "(cached) $ECHO_C" >&6
13188else
13189 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13190/* confdefs.h. */
13191_ACEOF
13192cat confdefs.h >>conftest.$ac_ext
13193cat >>conftest.$ac_ext <<_ACEOF
13194/* end confdefs.h. */
98418dba
CW
13195#if defined(CRAY) && ! defined(CRAY2)
13196webecray
13197#else
13198wenotbecray
13199#endif
13200
13201_ACEOF
13202if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13203 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
13204 ac_cv_os_cray=yes
13205else
13206 ac_cv_os_cray=no
13207fi
13208rm -f conftest*
ac95a621 13209
98418dba 13210fi
c0d27fcc 13211echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
98418dba
CW
13212echo "${ECHO_T}$ac_cv_os_cray" >&6
13213if test $ac_cv_os_cray = yes; then
13214 for ac_func in _getb67 GETB67 getb67; do
13215 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13216echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
13217echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13218if eval "test \"\${$as_ac_var+set}\" = set"; then
13219 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13220else
503d2be0 13221 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13222/* confdefs.h. */
13223_ACEOF
13224cat confdefs.h >>conftest.$ac_ext
13225cat >>conftest.$ac_ext <<_ACEOF
13226/* end confdefs.h. */
edfaf76d
LK
13227/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13228 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13229#define $ac_func innocuous_$ac_func
13230
73b77ee5 13231/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
13232 which can conflict with char $ac_func (); below.
13233 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13234 <limits.h> exists even on freestanding compilers. */
edfaf76d 13235
19650fd6
AS
13236#ifdef __STDC__
13237# include <limits.h>
13238#else
13239# include <assert.h>
13240#endif
edfaf76d
LK
13241
13242#undef $ac_func
13243
73b77ee5 13244/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13245#ifdef __cplusplus
13246extern "C"
19650fd6 13247{
503d2be0 13248#endif
73b77ee5 13249/* We use char because int might match the return type of a gcc2
503d2be0
AS
13250 builtin and then its argument prototype would still apply. */
13251char $ac_func ();
73b77ee5
GM
13252/* The GNU C library defines this for functions which it implements
13253 to always fail with ENOSYS. Some functions are actually named
13254 something starting with __ and the normal name is an alias. */
13255#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13256choke me
13257#else
19650fd6
AS
13258char (*f) () = $ac_func;
13259#endif
13260#ifdef __cplusplus
13261}
73b77ee5
GM
13262#endif
13263
19650fd6
AS
13264int
13265main ()
13266{
13267return f != $ac_func;
503d2be0
AS
13268 ;
13269 return 0;
13270}
13271_ACEOF
13272rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13273if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13274 (eval $ac_link) 2>conftest.er1
503d2be0 13275 ac_status=$?
edfaf76d
LK
13276 grep -v '^ *+' conftest.er1 >conftest.err
13277 rm -f conftest.er1
13278 cat conftest.err >&5
c0d27fcc 13279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13280 (exit $ac_status); } &&
edfaf76d
LK
13281 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13283 (eval $ac_try) 2>&5
13284 ac_status=$?
13285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13286 (exit $ac_status); }; } &&
13287 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13289 (eval $ac_try) 2>&5
13290 ac_status=$?
c0d27fcc 13291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13292 (exit $ac_status); }; }; then
13293 eval "$as_ac_var=yes"
13294else
13295 echo "$as_me: failed program was:" >&5
19650fd6
AS
13296sed 's/^/| /' conftest.$ac_ext >&5
13297
503d2be0
AS
13298eval "$as_ac_var=no"
13299fi
edfaf76d
LK
13300rm -f conftest.err conftest.$ac_objext \
13301 conftest$ac_exeext conftest.$ac_ext
503d2be0 13302fi
c0d27fcc 13303echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
13304echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13305if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 13306
c0d27fcc 13307cat >>confdefs.h <<_ACEOF
98418dba 13308#define CRAY_STACKSEG_END $ac_func
c0d27fcc 13309_ACEOF
98418dba
CW
13310
13311 break
73b77ee5 13312fi
73b77ee5 13313
98418dba 13314 done
73b77ee5
GM
13315fi
13316
c0d27fcc 13317echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
98418dba
CW
13318echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
13319if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 13320 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
13321else
13322 if test "$cross_compiling" = yes; then
13323 ac_cv_c_stack_direction=0
73b77ee5 13324else
503d2be0 13325 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13326/* confdefs.h. */
13327_ACEOF
13328cat confdefs.h >>conftest.$ac_ext
13329cat >>conftest.$ac_ext <<_ACEOF
13330/* end confdefs.h. */
503d2be0 13331int
98418dba 13332find_stack_direction ()
503d2be0 13333{
98418dba
CW
13334 static char *addr = 0;
13335 auto char dummy;
13336 if (addr == 0)
13337 {
13338 addr = &dummy;
13339 return find_stack_direction ();
13340 }
73b77ee5 13341 else
98418dba
CW
13342 return (&dummy > addr) ? 1 : -1;
13343}
ba4481b5 13344
503d2be0
AS
13345int
13346main ()
13347{
98418dba 13348 exit (find_stack_direction () < 0);
503d2be0
AS
13349}
13350_ACEOF
98418dba 13351rm -f conftest$ac_exeext
c0d27fcc 13352if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
13353 (eval $ac_link) 2>&5
13354 ac_status=$?
c0d27fcc 13355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 13356 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 13357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13358 (eval $ac_try) 2>&5
13359 ac_status=$?
c0d27fcc 13360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13361 (exit $ac_status); }; }; then
98418dba 13362 ac_cv_c_stack_direction=1
ba4481b5 13363else
98418dba
CW
13364 echo "$as_me: program exited with status $ac_status" >&5
13365echo "$as_me: failed program was:" >&5
19650fd6
AS
13366sed 's/^/| /' conftest.$ac_ext >&5
13367
c0d27fcc 13368( exit $ac_status )
98418dba 13369ac_cv_c_stack_direction=-1
ba4481b5 13370fi
edfaf76d 13371rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 13372fi
98418dba 13373fi
c0d27fcc 13374echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
98418dba
CW
13375echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
13376
c0d27fcc 13377cat >>confdefs.h <<_ACEOF
98418dba 13378#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
13379_ACEOF
13380
ba4481b5 13381
ba4481b5
DL
13382fi
13383
c0d27fcc 13384
98418dba
CW
13385# fmod, logb, and frexp are found in -lm on most systems.
13386# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
13387
c0d27fcc 13388echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
98418dba
CW
13389echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
13390if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 13391 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13392else
98418dba
CW
13393 ac_check_lib_save_LIBS=$LIBS
13394LIBS="-lm $LIBS"
13395cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13396/* confdefs.h. */
13397_ACEOF
13398cat confdefs.h >>conftest.$ac_ext
13399cat >>conftest.$ac_ext <<_ACEOF
13400/* end confdefs.h. */
ba4481b5 13401
98418dba
CW
13402/* Override any gcc2 internal prototype to avoid an error. */
13403#ifdef __cplusplus
13404extern "C"
13405#endif
13406/* We use char because int might match the return type of a gcc2
13407 builtin and then its argument prototype would still apply. */
13408char sqrt ();
503d2be0
AS
13409int
13410main ()
13411{
98418dba 13412sqrt ();
503d2be0
AS
13413 ;
13414 return 0;
13415}
13416_ACEOF
13417rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13418if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13419 (eval $ac_link) 2>conftest.er1
503d2be0 13420 ac_status=$?
edfaf76d
LK
13421 grep -v '^ *+' conftest.er1 >conftest.err
13422 rm -f conftest.er1
13423 cat conftest.err >&5
c0d27fcc 13424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13425 (exit $ac_status); } &&
edfaf76d
LK
13426 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13428 (eval $ac_try) 2>&5
13429 ac_status=$?
13430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13431 (exit $ac_status); }; } &&
13432 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13434 (eval $ac_try) 2>&5
13435 ac_status=$?
c0d27fcc 13436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13437 (exit $ac_status); }; }; then
98418dba 13438 ac_cv_lib_m_sqrt=yes
ba4481b5 13439else
503d2be0 13440 echo "$as_me: failed program was:" >&5
19650fd6
AS
13441sed 's/^/| /' conftest.$ac_ext >&5
13442
98418dba 13443ac_cv_lib_m_sqrt=no
ba4481b5 13444fi
edfaf76d
LK
13445rm -f conftest.err conftest.$ac_objext \
13446 conftest$ac_exeext conftest.$ac_ext
98418dba 13447LIBS=$ac_check_lib_save_LIBS
ba4481b5 13448fi
c0d27fcc 13449echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
98418dba
CW
13450echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
13451if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 13452 cat >>confdefs.h <<_ACEOF
98418dba 13453#define HAVE_LIBM 1
c0d27fcc 13454_ACEOF
98418dba
CW
13455
13456 LIBS="-lm $LIBS"
ba4481b5 13457
ba4481b5
DL
13458fi
13459
c0d27fcc 13460
55597d70
DL
13461# Check for mail-locking functions in a "mail" library. Probably this should
13462# have the same check as for liblockfile below.
98418dba 13463
c0d27fcc 13464echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
98418dba
CW
13465echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6
13466if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 13467 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13468else
98418dba
CW
13469 ac_check_lib_save_LIBS=$LIBS
13470LIBS="-lmail $LIBS"
13471cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13472/* confdefs.h. */
13473_ACEOF
13474cat confdefs.h >>conftest.$ac_ext
13475cat >>conftest.$ac_ext <<_ACEOF
13476/* end confdefs.h. */
98418dba
CW
13477
13478/* Override any gcc2 internal prototype to avoid an error. */
13479#ifdef __cplusplus
13480extern "C"
13481#endif
13482/* We use char because int might match the return type of a gcc2
13483 builtin and then its argument prototype would still apply. */
13484char maillock ();
503d2be0
AS
13485int
13486main ()
13487{
98418dba 13488maillock ();
503d2be0
AS
13489 ;
13490 return 0;
13491}
13492_ACEOF
13493rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13494if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13495 (eval $ac_link) 2>conftest.er1
503d2be0 13496 ac_status=$?
edfaf76d
LK
13497 grep -v '^ *+' conftest.er1 >conftest.err
13498 rm -f conftest.er1
13499 cat conftest.err >&5
c0d27fcc 13500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13501 (exit $ac_status); } &&
edfaf76d
LK
13502 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13504 (eval $ac_try) 2>&5
13505 ac_status=$?
13506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13507 (exit $ac_status); }; } &&
13508 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13510 (eval $ac_try) 2>&5
13511 ac_status=$?
c0d27fcc 13512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13513 (exit $ac_status); }; }; then
98418dba 13514 ac_cv_lib_mail_maillock=yes
ba4481b5 13515else
503d2be0 13516 echo "$as_me: failed program was:" >&5
19650fd6
AS
13517sed 's/^/| /' conftest.$ac_ext >&5
13518
98418dba 13519ac_cv_lib_mail_maillock=no
ba4481b5 13520fi
edfaf76d
LK
13521rm -f conftest.err conftest.$ac_objext \
13522 conftest$ac_exeext conftest.$ac_ext
98418dba 13523LIBS=$ac_check_lib_save_LIBS
ba4481b5 13524fi
c0d27fcc 13525echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
98418dba
CW
13526echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6
13527if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 13528 cat >>confdefs.h <<_ACEOF
98418dba 13529#define HAVE_LIBMAIL 1
c0d27fcc 13530_ACEOF
ba4481b5 13531
98418dba 13532 LIBS="-lmail $LIBS"
ba4481b5 13533
98418dba 13534fi
ba4481b5 13535
c0d27fcc
MR
13536
13537echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
98418dba
CW
13538echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6
13539if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 13540 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13541else
503d2be0 13542 ac_check_lib_save_LIBS=$LIBS
98418dba 13543LIBS="-llockfile $LIBS"
503d2be0 13544cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13545/* confdefs.h. */
13546_ACEOF
13547cat confdefs.h >>conftest.$ac_ext
13548cat >>conftest.$ac_ext <<_ACEOF
13549/* end confdefs.h. */
503d2be0 13550
ba4481b5 13551/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13552#ifdef __cplusplus
13553extern "C"
13554#endif
ba4481b5 13555/* We use char because int might match the return type of a gcc2
503d2be0 13556 builtin and then its argument prototype would still apply. */
98418dba 13557char maillock ();
503d2be0
AS
13558int
13559main ()
13560{
98418dba 13561maillock ();
503d2be0
AS
13562 ;
13563 return 0;
13564}
13565_ACEOF
13566rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13567if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13568 (eval $ac_link) 2>conftest.er1
503d2be0 13569 ac_status=$?
edfaf76d
LK
13570 grep -v '^ *+' conftest.er1 >conftest.err
13571 rm -f conftest.er1
13572 cat conftest.err >&5
c0d27fcc 13573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13574 (exit $ac_status); } &&
edfaf76d
LK
13575 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13577 (eval $ac_try) 2>&5
13578 ac_status=$?
13579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13580 (exit $ac_status); }; } &&
13581 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13583 (eval $ac_try) 2>&5
13584 ac_status=$?
c0d27fcc 13585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13586 (exit $ac_status); }; }; then
98418dba 13587 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
13588else
13589 echo "$as_me: failed program was:" >&5
19650fd6
AS
13590sed 's/^/| /' conftest.$ac_ext >&5
13591
98418dba
CW
13592ac_cv_lib_lockfile_maillock=no
13593fi
edfaf76d
LK
13594rm -f conftest.err conftest.$ac_objext \
13595 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
13596LIBS=$ac_check_lib_save_LIBS
13597fi
c0d27fcc 13598echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
98418dba
CW
13599echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6
13600if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 13601 cat >>confdefs.h <<_ACEOF
98418dba 13602#define HAVE_LIBLOCKFILE 1
c0d27fcc 13603_ACEOF
98418dba
CW
13604
13605 LIBS="-llockfile $LIBS"
13606
13607fi
13608
13609# If we have the shared liblockfile, assume we must use it for mail
13610# locking (e.g. Debian). If we couldn't link against liblockfile
13611# (no liblockfile.a installed), ensure that we don't need to.
13612if test "$ac_cv_lib_lockfile_maillock" = no; then
13613 # Extract the first word of "liblockfile.so", so it can be a program name with args.
13614set dummy liblockfile.so; ac_word=$2
c0d27fcc 13615echo "$as_me:$LINENO: checking for $ac_word" >&5
98418dba
CW
13616echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13617if test "${ac_cv_prog_liblockfile+set}" = set; then
13618 echo $ECHO_N "(cached) $ECHO_C" >&6
13619else
13620 if test -n "$liblockfile"; then
13621 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
13622else
c0d27fcc 13623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
13624as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
13625for as_dir in $as_dummy
c0d27fcc
MR
13626do
13627 IFS=$as_save_IFS
13628 test -z "$as_dir" && as_dir=.
13629 for ac_exec_ext in '' $ac_executable_extensions; do
13630 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13631 ac_cv_prog_liblockfile="yes"
13632 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13633 break 2
13634 fi
13635done
98418dba
CW
13636done
13637
13638 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 13639fi
503d2be0 13640fi
98418dba
CW
13641liblockfile=$ac_cv_prog_liblockfile
13642if test -n "$liblockfile"; then
c0d27fcc 13643 echo "$as_me:$LINENO: result: $liblockfile" >&5
98418dba
CW
13644echo "${ECHO_T}$liblockfile" >&6
13645else
c0d27fcc 13646 echo "$as_me:$LINENO: result: no" >&5
98418dba 13647echo "${ECHO_T}no" >&6
ba4481b5
DL
13648fi
13649
98418dba 13650 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 13651 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
13652This probably means that movemail could lose mail.
13653There may be a \`development' package to install containing liblockfile." >&5
13654echo "$as_me: error: Shared liblockfile found but can't link against it.
13655This probably means that movemail could lose mail.
13656There may be a \`development' package to install containing liblockfile." >&2;}
13657 { (exit 1); exit 1; }; }
98418dba 13658 else :
55597d70 13659 fi
98418dba 13660fi
503d2be0 13661
98418dba
CW
13662for ac_func in touchlock
13663do
13664as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13665echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
13666echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13667if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 13668 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 13669else
98418dba 13670 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13671/* confdefs.h. */
13672_ACEOF
13673cat confdefs.h >>conftest.$ac_ext
13674cat >>conftest.$ac_ext <<_ACEOF
13675/* end confdefs.h. */
edfaf76d
LK
13676/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13677 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13678#define $ac_func innocuous_$ac_func
13679
98418dba 13680/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
13681 which can conflict with char $ac_func (); below.
13682 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13683 <limits.h> exists even on freestanding compilers. */
edfaf76d 13684
19650fd6
AS
13685#ifdef __STDC__
13686# include <limits.h>
13687#else
13688# include <assert.h>
13689#endif
edfaf76d
LK
13690
13691#undef $ac_func
13692
457b792c 13693/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13694#ifdef __cplusplus
13695extern "C"
19650fd6 13696{
503d2be0 13697#endif
457b792c 13698/* We use char because int might match the return type of a gcc2
503d2be0 13699 builtin and then its argument prototype would still apply. */
98418dba 13700char $ac_func ();
98418dba
CW
13701/* The GNU C library defines this for functions which it implements
13702 to always fail with ENOSYS. Some functions are actually named
13703 something starting with __ and the normal name is an alias. */
13704#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13705choke me
13706#else
19650fd6
AS
13707char (*f) () = $ac_func;
13708#endif
13709#ifdef __cplusplus
13710}
cd958eb3
MB
13711#endif
13712
19650fd6
AS
13713int
13714main ()
13715{
13716return f != $ac_func;
503d2be0
AS
13717 ;
13718 return 0;
13719}
13720_ACEOF
13721rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13722if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13723 (eval $ac_link) 2>conftest.er1
503d2be0 13724 ac_status=$?
edfaf76d
LK
13725 grep -v '^ *+' conftest.er1 >conftest.err
13726 rm -f conftest.er1
13727 cat conftest.err >&5
c0d27fcc 13728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13729 (exit $ac_status); } &&
edfaf76d
LK
13730 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13732 (eval $ac_try) 2>&5
13733 ac_status=$?
13734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13735 (exit $ac_status); }; } &&
13736 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13738 (eval $ac_try) 2>&5
13739 ac_status=$?
c0d27fcc 13740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13741 (exit $ac_status); }; }; then
98418dba 13742 eval "$as_ac_var=yes"
503d2be0
AS
13743else
13744 echo "$as_me: failed program was:" >&5
19650fd6
AS
13745sed 's/^/| /' conftest.$ac_ext >&5
13746
98418dba 13747eval "$as_ac_var=no"
503d2be0 13748fi
edfaf76d
LK
13749rm -f conftest.err conftest.$ac_objext \
13750 conftest$ac_exeext conftest.$ac_ext
503d2be0 13751fi
c0d27fcc 13752echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
13753echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13754if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 13755 cat >>confdefs.h <<_ACEOF
98418dba 13756#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 13757_ACEOF
457b792c 13758
457b792c 13759fi
98418dba 13760done
457b792c 13761
c0d27fcc 13762
98418dba
CW
13763for ac_header in maillock.h
13764do
13765as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
13766if eval "test \"\${$as_ac_Header+set}\" = set"; then
13767 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
13768echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13769if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 13770 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13771fi
13772echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13773echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba4481b5 13774else
c0d27fcc
MR
13775 # Is the header compilable?
13776echo "$as_me:$LINENO: checking $ac_header usability" >&5
13777echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13778cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13779/* confdefs.h. */
13780_ACEOF
13781cat confdefs.h >>conftest.$ac_ext
13782cat >>conftest.$ac_ext <<_ACEOF
13783/* end confdefs.h. */
c0d27fcc
MR
13784$ac_includes_default
13785#include <$ac_header>
13786_ACEOF
13787rm -f conftest.$ac_objext
13788if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 13789 (eval $ac_compile) 2>conftest.er1
c0d27fcc 13790 ac_status=$?
edfaf76d
LK
13791 grep -v '^ *+' conftest.er1 >conftest.err
13792 rm -f conftest.er1
13793 cat conftest.err >&5
c0d27fcc
MR
13794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13795 (exit $ac_status); } &&
edfaf76d
LK
13796 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13798 (eval $ac_try) 2>&5
13799 ac_status=$?
13800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13801 (exit $ac_status); }; } &&
13802 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
13803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13804 (eval $ac_try) 2>&5
13805 ac_status=$?
13806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13807 (exit $ac_status); }; }; then
13808 ac_header_compiler=yes
13809else
13810 echo "$as_me: failed program was:" >&5
19650fd6
AS
13811sed 's/^/| /' conftest.$ac_ext >&5
13812
c0d27fcc
MR
13813ac_header_compiler=no
13814fi
edfaf76d 13815rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
13816echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13817echo "${ECHO_T}$ac_header_compiler" >&6
13818
13819# Is the header present?
13820echo "$as_me:$LINENO: checking $ac_header presence" >&5
13821echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13822cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13823/* confdefs.h. */
13824_ACEOF
13825cat confdefs.h >>conftest.$ac_ext
13826cat >>conftest.$ac_ext <<_ACEOF
13827/* end confdefs.h. */
98418dba 13828#include <$ac_header>
503d2be0 13829_ACEOF
c0d27fcc 13830if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 13831 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 13832 ac_status=$?
6bae0ccf 13833 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13834 rm -f conftest.er1
13835 cat conftest.err >&5
c0d27fcc 13836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
13837 (exit $ac_status); } >/dev/null; then
13838 if test -s conftest.err; then
13839 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 13840 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
13841 else
13842 ac_cpp_err=
13843 fi
503d2be0 13844else
98418dba 13845 ac_cpp_err=yes
503d2be0 13846fi
98418dba 13847if test -z "$ac_cpp_err"; then
c0d27fcc 13848 ac_header_preproc=yes
98418dba
CW
13849else
13850 echo "$as_me: failed program was:" >&5
19650fd6
AS
13851sed 's/^/| /' conftest.$ac_ext >&5
13852
c0d27fcc 13853 ac_header_preproc=no
503d2be0 13854fi
98418dba 13855rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
13856echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13857echo "${ECHO_T}$ac_header_preproc" >&6
13858
13859# So? What about this header?
edfaf76d
LK
13860case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13861 yes:no: )
c0d27fcc
MR
13862 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13863echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13864 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13865echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13866 ac_header_preproc=yes
19650fd6 13867 ;;
edfaf76d 13868 no:yes:* )
c0d27fcc
MR
13869 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13870echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
13871 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13872echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13873 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13874echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13875 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
13876echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13877 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 13878echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13879 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13880echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
13881 (
13882 cat <<\_ASBOX
edfaf76d
LK
13883## ------------------------------------------ ##
13884## Report this to the AC_PACKAGE_NAME lists. ##
13885## ------------------------------------------ ##
19650fd6
AS
13886_ASBOX
13887 ) |
13888 sed "s/^/$as_me: WARNING: /" >&2
13889 ;;
c0d27fcc
MR
13890esac
13891echo "$as_me:$LINENO: checking for $ac_header" >&5
13892echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13893if eval "test \"\${$as_ac_Header+set}\" = set"; then
13894 echo $ECHO_N "(cached) $ECHO_C" >&6
13895else
edfaf76d 13896 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 13897fi
c0d27fcc 13898echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 13899echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
13900
13901fi
98418dba 13902if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 13903 cat >>confdefs.h <<_ACEOF
98418dba 13904#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 13905_ACEOF
48d4b120 13906
ba4481b5 13907fi
c0d27fcc 13908
98418dba
CW
13909done
13910
c0d27fcc
MR
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
22044edf
DL
13966
13967
c0d27fcc 13968
b0e44248
RB
13969
13970
973a76b1
DL
13971
13972
13973
cd958eb3 13974
25ca0bca 13975
ea92fc9f 13976
c0d27fcc
MR
13977
13978
98418dba 13979for ac_func in gethostname getdomainname dup2 \
ea92fc9f 13980rename closedir mkdir rmdir sysinfo getrusage \
98418dba
CW
13981random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
13982strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 13983utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
13984__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
13985sendto recvfrom getsockopt setsockopt getsockname getpeername \
b0e44248 13986gai_strerror mkstemp getline getdelim mremap memmove fsync bzero \
4489ece2 13987memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
98418dba
CW
13988do
13989as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13990echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
13991echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13992if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 13993 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13994else
503d2be0 13995 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13996/* confdefs.h. */
13997_ACEOF
13998cat confdefs.h >>conftest.$ac_ext
13999cat >>conftest.$ac_ext <<_ACEOF
14000/* end confdefs.h. */
edfaf76d
LK
14001/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14002 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14003#define $ac_func innocuous_$ac_func
14004
98418dba 14005/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14006 which can conflict with char $ac_func (); below.
14007 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14008 <limits.h> exists even on freestanding compilers. */
edfaf76d 14009
19650fd6
AS
14010#ifdef __STDC__
14011# include <limits.h>
14012#else
14013# include <assert.h>
14014#endif
edfaf76d
LK
14015
14016#undef $ac_func
14017
ba4481b5 14018/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14019#ifdef __cplusplus
14020extern "C"
19650fd6 14021{
503d2be0 14022#endif
ba4481b5 14023/* We use char because int might match the return type of a gcc2
503d2be0 14024 builtin and then its argument prototype would still apply. */
98418dba 14025char $ac_func ();
98418dba
CW
14026/* The GNU C library defines this for functions which it implements
14027 to always fail with ENOSYS. Some functions are actually named
14028 something starting with __ and the normal name is an alias. */
14029#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14030choke me
14031#else
19650fd6
AS
14032char (*f) () = $ac_func;
14033#endif
14034#ifdef __cplusplus
14035}
98418dba
CW
14036#endif
14037
19650fd6
AS
14038int
14039main ()
14040{
14041return f != $ac_func;
503d2be0
AS
14042 ;
14043 return 0;
14044}
14045_ACEOF
14046rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14047if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 14048 (eval $ac_link) 2>conftest.er1
503d2be0 14049 ac_status=$?
edfaf76d
LK
14050 grep -v '^ *+' conftest.er1 >conftest.err
14051 rm -f conftest.er1
14052 cat conftest.err >&5
c0d27fcc 14053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14054 (exit $ac_status); } &&
edfaf76d 14055 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
c0d27fcc 14056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14057 (eval $ac_try) 2>&5
14058 ac_status=$?
c0d27fcc 14059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
14060 (exit $ac_status); }; } &&
14061 { ac_try='test -s conftest$ac_exeext'
14062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14063 (eval $ac_try) 2>&5
14064 ac_status=$?
14065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14066 (exit $ac_status); }; }; then
98418dba 14067 eval "$as_ac_var=yes"
503d2be0
AS
14068else
14069 echo "$as_me: failed program was:" >&5
19650fd6
AS
14070sed 's/^/| /' conftest.$ac_ext >&5
14071
98418dba 14072eval "$as_ac_var=no"
503d2be0 14073fi
edfaf76d
LK
14074rm -f conftest.err conftest.$ac_objext \
14075 conftest$ac_exeext conftest.$ac_ext
ba4481b5 14076fi
c0d27fcc 14077echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14078echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14079if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14080 cat >>confdefs.h <<_ACEOF
98418dba 14081#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14082_ACEOF
ba4481b5 14083
ba4481b5 14084fi
98418dba 14085done
ba4481b5 14086
c0d27fcc
MR
14087
14088
98418dba
CW
14089for ac_header in sys/un.h
14090do
14091as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
14092if eval "test \"\${$as_ac_Header+set}\" = set"; then
14093 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
14094echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14095if eval "test \"\${$as_ac_Header+set}\" = set"; then
14096 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14097fi
14098echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14099echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 14100else
c0d27fcc
MR
14101 # Is the header compilable?
14102echo "$as_me:$LINENO: checking $ac_header usability" >&5
14103echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14104cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14105/* confdefs.h. */
14106_ACEOF
14107cat confdefs.h >>conftest.$ac_ext
14108cat >>conftest.$ac_ext <<_ACEOF
14109/* end confdefs.h. */
c0d27fcc
MR
14110$ac_includes_default
14111#include <$ac_header>
14112_ACEOF
14113rm -f conftest.$ac_objext
14114if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 14115 (eval $ac_compile) 2>conftest.er1
c0d27fcc 14116 ac_status=$?
edfaf76d
LK
14117 grep -v '^ *+' conftest.er1 >conftest.err
14118 rm -f conftest.er1
14119 cat conftest.err >&5
c0d27fcc
MR
14120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14121 (exit $ac_status); } &&
edfaf76d
LK
14122 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14124 (eval $ac_try) 2>&5
14125 ac_status=$?
14126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14127 (exit $ac_status); }; } &&
14128 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
14129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14130 (eval $ac_try) 2>&5
14131 ac_status=$?
14132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14133 (exit $ac_status); }; }; then
14134 ac_header_compiler=yes
14135else
14136 echo "$as_me: failed program was:" >&5
19650fd6
AS
14137sed 's/^/| /' conftest.$ac_ext >&5
14138
c0d27fcc
MR
14139ac_header_compiler=no
14140fi
edfaf76d 14141rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14142echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14143echo "${ECHO_T}$ac_header_compiler" >&6
14144
14145# Is the header present?
14146echo "$as_me:$LINENO: checking $ac_header presence" >&5
14147echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14148cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14149/* confdefs.h. */
14150_ACEOF
14151cat confdefs.h >>conftest.$ac_ext
14152cat >>conftest.$ac_ext <<_ACEOF
14153/* end confdefs.h. */
98418dba 14154#include <$ac_header>
503d2be0 14155_ACEOF
c0d27fcc 14156if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
14157 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14158 ac_status=$?
6bae0ccf 14159 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
14160 rm -f conftest.er1
14161 cat conftest.err >&5
c0d27fcc 14162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14163 (exit $ac_status); } >/dev/null; then
14164 if test -s conftest.err; then
14165 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 14166 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
14167 else
14168 ac_cpp_err=
14169 fi
14170else
14171 ac_cpp_err=yes
14172fi
14173if test -z "$ac_cpp_err"; then
c0d27fcc 14174 ac_header_preproc=yes
ba4481b5 14175else
503d2be0 14176 echo "$as_me: failed program was:" >&5
19650fd6
AS
14177sed 's/^/| /' conftest.$ac_ext >&5
14178
c0d27fcc 14179 ac_header_preproc=no
ba4481b5 14180fi
503d2be0 14181rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14182echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14183echo "${ECHO_T}$ac_header_preproc" >&6
14184
14185# So? What about this header?
edfaf76d
LK
14186case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14187 yes:no: )
c0d27fcc
MR
14188 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14189echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14190 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14191echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14192 ac_header_preproc=yes
19650fd6 14193 ;;
edfaf76d 14194 no:yes:* )
c0d27fcc
MR
14195 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14196echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
14197 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14198echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14199 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14200echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14201 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14202echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14203 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14204echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14205 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14206echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14207 (
14208 cat <<\_ASBOX
edfaf76d
LK
14209## ------------------------------------------ ##
14210## Report this to the AC_PACKAGE_NAME lists. ##
14211## ------------------------------------------ ##
19650fd6
AS
14212_ASBOX
14213 ) |
14214 sed "s/^/$as_me: WARNING: /" >&2
14215 ;;
c0d27fcc
MR
14216esac
14217echo "$as_me:$LINENO: checking for $ac_header" >&5
14218echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14219if eval "test \"\${$as_ac_Header+set}\" = set"; then
14220 echo $ECHO_N "(cached) $ECHO_C" >&6
14221else
edfaf76d 14222 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 14223fi
c0d27fcc 14224echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
925c2f3f 14225echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14226
14227fi
925c2f3f 14228if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14229 cat >>confdefs.h <<_ACEOF
925c2f3f 14230#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14231_ACEOF
503d2be0 14232
925c2f3f 14233fi
c0d27fcc 14234
925c2f3f
EZ
14235done
14236
c0d27fcc
MR
14237
14238
14239
edfaf76d
LK
14240
14241for ac_header in stdlib.h sys/time.h unistd.h
925c2f3f
EZ
14242do
14243as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
14244if eval "test \"\${$as_ac_Header+set}\" = set"; then
14245 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
14246echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14247if eval "test \"\${$as_ac_Header+set}\" = set"; then
14248 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14249fi
14250echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14251echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
925c2f3f 14252else
c0d27fcc
MR
14253 # Is the header compilable?
14254echo "$as_me:$LINENO: checking $ac_header usability" >&5
14255echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14256cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14257/* confdefs.h. */
14258_ACEOF
14259cat confdefs.h >>conftest.$ac_ext
14260cat >>conftest.$ac_ext <<_ACEOF
14261/* end confdefs.h. */
c0d27fcc
MR
14262$ac_includes_default
14263#include <$ac_header>
14264_ACEOF
14265rm -f conftest.$ac_objext
14266if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 14267 (eval $ac_compile) 2>conftest.er1
c0d27fcc 14268 ac_status=$?
edfaf76d
LK
14269 grep -v '^ *+' conftest.er1 >conftest.err
14270 rm -f conftest.er1
14271 cat conftest.err >&5
c0d27fcc
MR
14272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14273 (exit $ac_status); } &&
edfaf76d
LK
14274 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14276 (eval $ac_try) 2>&5
14277 ac_status=$?
14278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14279 (exit $ac_status); }; } &&
14280 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
14281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14282 (eval $ac_try) 2>&5
14283 ac_status=$?
14284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14285 (exit $ac_status); }; }; then
14286 ac_header_compiler=yes
14287else
14288 echo "$as_me: failed program was:" >&5
19650fd6
AS
14289sed 's/^/| /' conftest.$ac_ext >&5
14290
c0d27fcc
MR
14291ac_header_compiler=no
14292fi
edfaf76d 14293rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14294echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14295echo "${ECHO_T}$ac_header_compiler" >&6
14296
14297# Is the header present?
14298echo "$as_me:$LINENO: checking $ac_header presence" >&5
14299echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14300cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14301/* confdefs.h. */
14302_ACEOF
14303cat confdefs.h >>conftest.$ac_ext
14304cat >>conftest.$ac_ext <<_ACEOF
14305/* end confdefs.h. */
98418dba 14306#include <$ac_header>
503d2be0 14307_ACEOF
c0d27fcc 14308if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
14309 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14310 ac_status=$?
6bae0ccf 14311 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
14312 rm -f conftest.er1
14313 cat conftest.err >&5
c0d27fcc 14314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14315 (exit $ac_status); } >/dev/null; then
14316 if test -s conftest.err; then
14317 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 14318 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
14319 else
14320 ac_cpp_err=
14321 fi
14322else
14323 ac_cpp_err=yes
14324fi
14325if test -z "$ac_cpp_err"; then
c0d27fcc 14326 ac_header_preproc=yes
98418dba
CW
14327else
14328 echo "$as_me: failed program was:" >&5
19650fd6
AS
14329sed 's/^/| /' conftest.$ac_ext >&5
14330
c0d27fcc 14331 ac_header_preproc=no
98418dba
CW
14332fi
14333rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14334echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14335echo "${ECHO_T}$ac_header_preproc" >&6
14336
14337# So? What about this header?
edfaf76d
LK
14338case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14339 yes:no: )
c0d27fcc
MR
14340 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14341echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14342 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14343echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14344 ac_header_preproc=yes
19650fd6 14345 ;;
edfaf76d 14346 no:yes:* )
c0d27fcc
MR
14347 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14348echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
14349 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14350echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14351 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14352echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14353 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14354echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14355 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14356echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14357 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14358echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14359 (
14360 cat <<\_ASBOX
edfaf76d
LK
14361## ------------------------------------------ ##
14362## Report this to the AC_PACKAGE_NAME lists. ##
14363## ------------------------------------------ ##
19650fd6
AS
14364_ASBOX
14365 ) |
14366 sed "s/^/$as_me: WARNING: /" >&2
14367 ;;
c0d27fcc
MR
14368esac
14369echo "$as_me:$LINENO: checking for $ac_header" >&5
14370echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14371if eval "test \"\${$as_ac_Header+set}\" = set"; then
14372 echo $ECHO_N "(cached) $ECHO_C" >&6
14373else
edfaf76d 14374 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 14375fi
c0d27fcc 14376echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 14377echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14378
14379fi
98418dba 14380if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14381 cat >>confdefs.h <<_ACEOF
98418dba 14382#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14383_ACEOF
98418dba
CW
14384
14385fi
c0d27fcc 14386
98418dba
CW
14387done
14388
c0d27fcc 14389
98418dba
CW
14390for ac_func in alarm
14391do
14392as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14393echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14394echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14395if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14396 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14397else
98418dba 14398 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14399/* confdefs.h. */
14400_ACEOF
14401cat confdefs.h >>conftest.$ac_ext
14402cat >>conftest.$ac_ext <<_ACEOF
14403/* end confdefs.h. */
edfaf76d
LK
14404/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14405 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14406#define $ac_func innocuous_$ac_func
14407
98418dba 14408/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14409 which can conflict with char $ac_func (); below.
14410 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14411 <limits.h> exists even on freestanding compilers. */
edfaf76d 14412
19650fd6
AS
14413#ifdef __STDC__
14414# include <limits.h>
14415#else
14416# include <assert.h>
14417#endif
edfaf76d
LK
14418
14419#undef $ac_func
14420
ba4481b5 14421/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14422#ifdef __cplusplus
14423extern "C"
19650fd6 14424{
503d2be0 14425#endif
ba4481b5 14426/* We use char because int might match the return type of a gcc2
503d2be0 14427 builtin and then its argument prototype would still apply. */
98418dba 14428char $ac_func ();
98418dba
CW
14429/* The GNU C library defines this for functions which it implements
14430 to always fail with ENOSYS. Some functions are actually named
14431 something starting with __ and the normal name is an alias. */
14432#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14433choke me
14434#else
19650fd6
AS
14435char (*f) () = $ac_func;
14436#endif
14437#ifdef __cplusplus
14438}
98418dba
CW
14439#endif
14440
19650fd6
AS
14441int
14442main ()
14443{
14444return f != $ac_func;
503d2be0
AS
14445 ;
14446 return 0;
14447}
14448_ACEOF
14449rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14450if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 14451 (eval $ac_link) 2>conftest.er1
503d2be0 14452 ac_status=$?
edfaf76d
LK
14453 grep -v '^ *+' conftest.er1 >conftest.err
14454 rm -f conftest.er1
14455 cat conftest.err >&5
c0d27fcc 14456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14457 (exit $ac_status); } &&
edfaf76d
LK
14458 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14460 (eval $ac_try) 2>&5
14461 ac_status=$?
14462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14463 (exit $ac_status); }; } &&
14464 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14466 (eval $ac_try) 2>&5
14467 ac_status=$?
c0d27fcc 14468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14469 (exit $ac_status); }; }; then
98418dba 14470 eval "$as_ac_var=yes"
503d2be0
AS
14471else
14472 echo "$as_me: failed program was:" >&5
19650fd6
AS
14473sed 's/^/| /' conftest.$ac_ext >&5
14474
98418dba 14475eval "$as_ac_var=no"
503d2be0 14476fi
edfaf76d
LK
14477rm -f conftest.err conftest.$ac_objext \
14478 conftest$ac_exeext conftest.$ac_ext
ffe36136 14479fi
c0d27fcc 14480echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14481echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14482if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14483 cat >>confdefs.h <<_ACEOF
98418dba 14484#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14485_ACEOF
ffe36136 14486
ba4481b5 14487fi
98418dba 14488done
ba4481b5 14489
c0d27fcc 14490echo "$as_me:$LINENO: checking for working mktime" >&5
98418dba
CW
14491echo $ECHO_N "checking for working mktime... $ECHO_C" >&6
14492if test "${ac_cv_func_working_mktime+set}" = set; then
14493 echo $ECHO_N "(cached) $ECHO_C" >&6
14494else
14495 if test "$cross_compiling" = yes; then
14496 ac_cv_func_working_mktime=no
14497else
14498 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14499/* confdefs.h. */
14500_ACEOF
14501cat confdefs.h >>conftest.$ac_ext
14502cat >>conftest.$ac_ext <<_ACEOF
14503/* end confdefs.h. */
98418dba
CW
14504/* Test program from Paul Eggert and Tony Leneis. */
14505#if TIME_WITH_SYS_TIME
14506# include <sys/time.h>
14507# include <time.h>
14508#else
14509# if HAVE_SYS_TIME_H
14510# include <sys/time.h>
14511# else
14512# include <time.h>
14513# endif
14514#endif
ba4481b5 14515
edfaf76d
LK
14516#if HAVE_STDLIB_H
14517# include <stdlib.h>
14518#endif
14519
98418dba
CW
14520#if HAVE_UNISTD_H
14521# include <unistd.h>
14522#endif
ba4481b5 14523
98418dba
CW
14524#if !HAVE_ALARM
14525# define alarm(X) /* empty */
14526#endif
df645f7c 14527
98418dba
CW
14528/* Work around redefinition to rpl_putenv by other config tests. */
14529#undef putenv
df645f7c 14530
98418dba 14531static time_t time_t_max;
edfaf76d 14532static time_t time_t_min;
df645f7c 14533
98418dba 14534/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
14535static char *tz_strings[] = {
14536 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
14537 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
14538};
14539#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 14540
98418dba
CW
14541/* Fail if mktime fails to convert a date in the spring-forward gap.
14542 Based on a problem report from Andreas Jaeger. */
14543static void
14544spring_forward_gap ()
14545{
14546 /* glibc (up to about 1998-10-07) failed this test. */
14547 struct tm tm;
14548
14549 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
14550 instead of "TZ=America/Vancouver" in order to detect the bug even
14551 on systems that don't support the Olson extension, or don't have the
14552 full zoneinfo tables installed. */
14553 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
14554
14555 tm.tm_year = 98;
14556 tm.tm_mon = 3;
14557 tm.tm_mday = 5;
14558 tm.tm_hour = 2;
14559 tm.tm_min = 0;
14560 tm.tm_sec = 0;
14561 tm.tm_isdst = -1;
14562 if (mktime (&tm) == (time_t)-1)
14563 exit (1);
14564}
14565
14566static void
edfaf76d 14567mktime_test1 (now)
98418dba
CW
14568 time_t now;
14569{
14570 struct tm *lt;
14571 if ((lt = localtime (&now)) && mktime (lt) != now)
14572 exit (1);
edfaf76d
LK
14573}
14574
14575static void
14576mktime_test (now)
14577 time_t now;
14578{
14579 mktime_test1 (now);
14580 mktime_test1 ((time_t) (time_t_max - now));
14581 mktime_test1 ((time_t) (time_t_min + now));
98418dba
CW
14582}
14583
14584static void
14585irix_6_4_bug ()
14586{
14587 /* Based on code from Ariel Faigon. */
14588 struct tm tm;
14589 tm.tm_year = 96;
14590 tm.tm_mon = 3;
14591 tm.tm_mday = 0;
14592 tm.tm_hour = 0;
14593 tm.tm_min = 0;
14594 tm.tm_sec = 0;
14595 tm.tm_isdst = -1;
14596 mktime (&tm);
14597 if (tm.tm_mon != 2 || tm.tm_mday != 31)
14598 exit (1);
14599}
14600
14601static void
14602bigtime_test (j)
14603 int j;
14604{
14605 struct tm tm;
14606 time_t now;
14607 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
14608 now = mktime (&tm);
14609 if (now != (time_t) -1)
14610 {
14611 struct tm *lt = localtime (&now);
14612 if (! (lt
14613 && lt->tm_year == tm.tm_year
14614 && lt->tm_mon == tm.tm_mon
14615 && lt->tm_mday == tm.tm_mday
14616 && lt->tm_hour == tm.tm_hour
14617 && lt->tm_min == tm.tm_min
14618 && lt->tm_sec == tm.tm_sec
14619 && lt->tm_yday == tm.tm_yday
14620 && lt->tm_wday == tm.tm_wday
14621 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
14622 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
14623 exit (1);
14624 }
14625}
14626
14627int
14628main ()
14629{
14630 time_t t, delta;
14631 int i, j;
14632
14633 /* This test makes some buggy mktime implementations loop.
14634 Give up after 60 seconds; a mktime slower than that
14635 isn't worth using anyway. */
14636 alarm (60);
14637
14638 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
14639 continue;
14640 time_t_max--;
edfaf76d
LK
14641 if ((time_t) -1 < 0)
14642 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
14643 continue;
98418dba
CW
14644 delta = time_t_max / 997; /* a suitable prime number */
14645 for (i = 0; i < N_STRINGS; i++)
14646 {
14647 if (tz_strings[i])
14648 putenv (tz_strings[i]);
503d2be0 14649
98418dba
CW
14650 for (t = 0; t <= time_t_max - delta; t += delta)
14651 mktime_test (t);
edfaf76d
LK
14652 mktime_test ((time_t) 1);
14653 mktime_test ((time_t) (60 * 60));
14654 mktime_test ((time_t) (60 * 60 * 24));
98418dba
CW
14655
14656 for (j = 1; 0 < j; j *= 2)
edfaf76d 14657 bigtime_test (j);
98418dba
CW
14658 bigtime_test (j - 1);
14659 }
14660 irix_6_4_bug ();
14661 spring_forward_gap ();
14662 exit (0);
503d2be0
AS
14663}
14664_ACEOF
98418dba 14665rm -f conftest$ac_exeext
c0d27fcc 14666if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14667 (eval $ac_link) 2>&5
14668 ac_status=$?
c0d27fcc 14669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 14670 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 14671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14672 (eval $ac_try) 2>&5
14673 ac_status=$?
c0d27fcc 14674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14675 (exit $ac_status); }; }; then
98418dba 14676 ac_cv_func_working_mktime=yes
503d2be0 14677else
98418dba
CW
14678 echo "$as_me: program exited with status $ac_status" >&5
14679echo "$as_me: failed program was:" >&5
19650fd6
AS
14680sed 's/^/| /' conftest.$ac_ext >&5
14681
c0d27fcc 14682( exit $ac_status )
98418dba 14683ac_cv_func_working_mktime=no
503d2be0 14684fi
edfaf76d 14685rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 14686fi
ba4481b5 14687fi
c0d27fcc 14688echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
98418dba
CW
14689echo "${ECHO_T}$ac_cv_func_working_mktime" >&6
14690if test $ac_cv_func_working_mktime = no; then
edfaf76d
LK
14691 case $LIBOBJS in
14692 "mktime.$ac_objext" | \
14693 *" mktime.$ac_objext" | \
14694 "mktime.$ac_objext "* | \
14695 *" mktime.$ac_objext "* ) ;;
14696 *) LIBOBJS="$LIBOBJS mktime.$ac_objext" ;;
14697esac
14698
ba4481b5
DL
14699fi
14700
98418dba 14701if test "$ac_cv_func_working_mktime" = no; then
b936fae4 14702
c0d27fcc 14703cat >>confdefs.h <<\_ACEOF
98418dba 14704#define BROKEN_MKTIME 1
c0d27fcc 14705_ACEOF
ba4481b5 14706
ba4481b5 14707fi
503d2be0 14708
98418dba
CW
14709ac_have_func=no # yes means we've found a way to get the load average.
14710
6bae0ccf
DL
14711# Make sure getloadavg.c is where it belongs, at configure-time.
14712test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
14713 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
14714echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
14715 { (exit 1); exit 1; }; }
14716
98418dba
CW
14717ac_save_LIBS=$LIBS
14718
14719# Check for getloadavg, but be sure not to touch the cache variable.
c0d27fcc 14720(echo "$as_me:$LINENO: checking for getloadavg" >&5
98418dba
CW
14721echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6
14722if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 14723 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14724else
503d2be0 14725 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14726/* confdefs.h. */
14727_ACEOF
14728cat confdefs.h >>conftest.$ac_ext
14729cat >>conftest.$ac_ext <<_ACEOF
14730/* end confdefs.h. */
edfaf76d
LK
14731/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
14732 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14733#define getloadavg innocuous_getloadavg
14734
98418dba 14735/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14736 which can conflict with char getloadavg (); below.
14737 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14738 <limits.h> exists even on freestanding compilers. */
edfaf76d 14739
19650fd6
AS
14740#ifdef __STDC__
14741# include <limits.h>
14742#else
14743# include <assert.h>
14744#endif
edfaf76d
LK
14745
14746#undef getloadavg
14747
ba4481b5 14748/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14749#ifdef __cplusplus
14750extern "C"
19650fd6 14751{
503d2be0 14752#endif
ba4481b5 14753/* We use char because int might match the return type of a gcc2
503d2be0 14754 builtin and then its argument prototype would still apply. */
98418dba 14755char getloadavg ();
98418dba
CW
14756/* The GNU C library defines this for functions which it implements
14757 to always fail with ENOSYS. Some functions are actually named
14758 something starting with __ and the normal name is an alias. */
14759#if defined (__stub_getloadavg) || defined (__stub___getloadavg)
14760choke me
14761#else
19650fd6
AS
14762char (*f) () = getloadavg;
14763#endif
14764#ifdef __cplusplus
14765}
cd958eb3
MB
14766#endif
14767
19650fd6
AS
14768int
14769main ()
14770{
14771return f != getloadavg;
503d2be0
AS
14772 ;
14773 return 0;
14774}
14775_ACEOF
14776rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14777if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 14778 (eval $ac_link) 2>conftest.er1
503d2be0 14779 ac_status=$?
edfaf76d
LK
14780 grep -v '^ *+' conftest.er1 >conftest.err
14781 rm -f conftest.er1
14782 cat conftest.err >&5
c0d27fcc 14783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14784 (exit $ac_status); } &&
edfaf76d
LK
14785 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14787 (eval $ac_try) 2>&5
14788 ac_status=$?
14789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14790 (exit $ac_status); }; } &&
14791 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14793 (eval $ac_try) 2>&5
14794 ac_status=$?
c0d27fcc 14795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14796 (exit $ac_status); }; }; then
98418dba 14797 ac_cv_func_getloadavg=yes
503d2be0
AS
14798else
14799 echo "$as_me: failed program was:" >&5
19650fd6
AS
14800sed 's/^/| /' conftest.$ac_ext >&5
14801
98418dba 14802ac_cv_func_getloadavg=no
503d2be0 14803fi
edfaf76d
LK
14804rm -f conftest.err conftest.$ac_objext \
14805 conftest$ac_exeext conftest.$ac_ext
ba4481b5 14806fi
c0d27fcc 14807echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
98418dba
CW
14808echo "${ECHO_T}$ac_cv_func_getloadavg" >&6
14809if test $ac_cv_func_getloadavg = yes; then
14810 exit 0
14811else
14812 exit 1
ba4481b5 14813fi
98418dba 14814) && ac_have_func=yes
ba4481b5 14815
98418dba 14816# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 14817
98418dba
CW
14818for ac_func in pstat_getdynamic
14819do
14820as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14821echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14822echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14823if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14824 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14825else
503d2be0 14826 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14827/* confdefs.h. */
14828_ACEOF
14829cat confdefs.h >>conftest.$ac_ext
14830cat >>conftest.$ac_ext <<_ACEOF
14831/* end confdefs.h. */
edfaf76d
LK
14832/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14833 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14834#define $ac_func innocuous_$ac_func
14835
98418dba 14836/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14837 which can conflict with char $ac_func (); below.
14838 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14839 <limits.h> exists even on freestanding compilers. */
edfaf76d 14840
19650fd6
AS
14841#ifdef __STDC__
14842# include <limits.h>
14843#else
14844# include <assert.h>
14845#endif
edfaf76d
LK
14846
14847#undef $ac_func
14848
ba4481b5 14849/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14850#ifdef __cplusplus
14851extern "C"
19650fd6 14852{
503d2be0 14853#endif
ba4481b5 14854/* We use char because int might match the return type of a gcc2
503d2be0 14855 builtin and then its argument prototype would still apply. */
98418dba 14856char $ac_func ();
98418dba
CW
14857/* The GNU C library defines this for functions which it implements
14858 to always fail with ENOSYS. Some functions are actually named
14859 something starting with __ and the normal name is an alias. */
14860#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14861choke me
14862#else
19650fd6
AS
14863char (*f) () = $ac_func;
14864#endif
14865#ifdef __cplusplus
14866}
98418dba
CW
14867#endif
14868
19650fd6
AS
14869int
14870main ()
14871{
14872return f != $ac_func;
98418dba
CW
14873 ;
14874 return 0;
14875}
f21fadcc 14876_ACEOF
98418dba 14877rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14878if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 14879 (eval $ac_link) 2>conftest.er1
f21fadcc 14880 ac_status=$?
edfaf76d
LK
14881 grep -v '^ *+' conftest.er1 >conftest.err
14882 rm -f conftest.er1
14883 cat conftest.err >&5
c0d27fcc 14884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 14885 (exit $ac_status); } &&
edfaf76d
LK
14886 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14888 (eval $ac_try) 2>&5
14889 ac_status=$?
14890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14891 (exit $ac_status); }; } &&
14892 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
14894 (eval $ac_try) 2>&5
14895 ac_status=$?
c0d27fcc 14896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
14897 (exit $ac_status); }; }; then
14898 eval "$as_ac_var=yes"
f21fadcc
JD
14899else
14900 echo "$as_me: failed program was:" >&5
19650fd6
AS
14901sed 's/^/| /' conftest.$ac_ext >&5
14902
98418dba 14903eval "$as_ac_var=no"
f21fadcc 14904fi
edfaf76d
LK
14905rm -f conftest.err conftest.$ac_objext \
14906 conftest$ac_exeext conftest.$ac_ext
f21fadcc 14907fi
c0d27fcc 14908echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14909echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14910if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14911 cat >>confdefs.h <<_ACEOF
98418dba 14912#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14913_ACEOF
98418dba
CW
14914
14915fi
14916done
14917
c0d27fcc 14918
98418dba
CW
14919# Solaris has libkstat which does not require root.
14920
c0d27fcc 14921echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
98418dba
CW
14922echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
14923if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
14924 echo $ECHO_N "(cached) $ECHO_C" >&6
14925else
14926 ac_check_lib_save_LIBS=$LIBS
98418dba 14927LIBS="-lkstat $LIBS"
f21fadcc 14928cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14929/* confdefs.h. */
14930_ACEOF
14931cat confdefs.h >>conftest.$ac_ext
14932cat >>conftest.$ac_ext <<_ACEOF
14933/* end confdefs.h. */
f21fadcc
JD
14934
14935/* Override any gcc2 internal prototype to avoid an error. */
14936#ifdef __cplusplus
14937extern "C"
14938#endif
14939/* We use char because int might match the return type of a gcc2
14940 builtin and then its argument prototype would still apply. */
98418dba 14941char kstat_open ();
f21fadcc
JD
14942int
14943main ()
14944{
98418dba 14945kstat_open ();
f21fadcc
JD
14946 ;
14947 return 0;
14948}
14949_ACEOF
14950rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14951if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 14952 (eval $ac_link) 2>conftest.er1
f21fadcc 14953 ac_status=$?
edfaf76d
LK
14954 grep -v '^ *+' conftest.er1 >conftest.err
14955 rm -f conftest.er1
14956 cat conftest.err >&5
c0d27fcc 14957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 14958 (exit $ac_status); } &&
edfaf76d
LK
14959 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14961 (eval $ac_try) 2>&5
14962 ac_status=$?
14963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14964 (exit $ac_status); }; } &&
14965 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
f21fadcc
JD
14967 (eval $ac_try) 2>&5
14968 ac_status=$?
c0d27fcc 14969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 14970 (exit $ac_status); }; }; then
98418dba 14971 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
14972else
14973 echo "$as_me: failed program was:" >&5
19650fd6
AS
14974sed 's/^/| /' conftest.$ac_ext >&5
14975
98418dba 14976ac_cv_lib_kstat_kstat_open=no
f21fadcc 14977fi
edfaf76d
LK
14978rm -f conftest.err conftest.$ac_objext \
14979 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
14980LIBS=$ac_check_lib_save_LIBS
14981fi
c0d27fcc 14982echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
98418dba
CW
14983echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6
14984if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 14985 cat >>confdefs.h <<_ACEOF
98418dba 14986#define HAVE_LIBKSTAT 1
c0d27fcc 14987_ACEOF
f21fadcc 14988
98418dba 14989 LIBS="-lkstat $LIBS"
f21fadcc 14990
f21fadcc
JD
14991fi
14992
98418dba
CW
14993test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
14994
14995# Some systems with -lutil have (and need) -lkvm as well, some do not.
14996# On Solaris, -lkvm requires nlist from -lelf, so check that first
14997# to get the right answer into the cache.
14998# For kstat on solaris, we need libelf to force the definition of SVR4 below.
14999if test $ac_have_func = no; then
c0d27fcc 15000 echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
98418dba
CW
15001echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
15002if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 15003 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15004else
98418dba
CW
15005 ac_check_lib_save_LIBS=$LIBS
15006LIBS="-lelf $LIBS"
15007cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15008/* confdefs.h. */
15009_ACEOF
15010cat confdefs.h >>conftest.$ac_ext
15011cat >>conftest.$ac_ext <<_ACEOF
15012/* end confdefs.h. */
98418dba
CW
15013
15014/* Override any gcc2 internal prototype to avoid an error. */
15015#ifdef __cplusplus
15016extern "C"
15017#endif
15018/* We use char because int might match the return type of a gcc2
15019 builtin and then its argument prototype would still apply. */
15020char elf_begin ();
503d2be0
AS
15021int
15022main ()
15023{
98418dba 15024elf_begin ();
503d2be0
AS
15025 ;
15026 return 0;
15027}
15028_ACEOF
15029rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15030if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15031 (eval $ac_link) 2>conftest.er1
503d2be0 15032 ac_status=$?
edfaf76d
LK
15033 grep -v '^ *+' conftest.er1 >conftest.err
15034 rm -f conftest.er1
15035 cat conftest.err >&5
c0d27fcc 15036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15037 (exit $ac_status); } &&
edfaf76d
LK
15038 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15040 (eval $ac_try) 2>&5
15041 ac_status=$?
15042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15043 (exit $ac_status); }; } &&
15044 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15046 (eval $ac_try) 2>&5
15047 ac_status=$?
c0d27fcc 15048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15049 (exit $ac_status); }; }; then
98418dba 15050 ac_cv_lib_elf_elf_begin=yes
ba4481b5 15051else
503d2be0 15052 echo "$as_me: failed program was:" >&5
19650fd6
AS
15053sed 's/^/| /' conftest.$ac_ext >&5
15054
98418dba 15055ac_cv_lib_elf_elf_begin=no
ba4481b5 15056fi
edfaf76d
LK
15057rm -f conftest.err conftest.$ac_objext \
15058 conftest$ac_exeext conftest.$ac_ext
98418dba 15059LIBS=$ac_check_lib_save_LIBS
ba4481b5 15060fi
c0d27fcc 15061echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
98418dba
CW
15062echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
15063if test $ac_cv_lib_elf_elf_begin = yes; then
15064 LIBS="-lelf $LIBS"
ba4481b5
DL
15065fi
15066
98418dba
CW
15067fi
15068if test $ac_have_func = no; then
c0d27fcc 15069 echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
98418dba
CW
15070echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6
15071if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 15072 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15073else
98418dba
CW
15074 ac_check_lib_save_LIBS=$LIBS
15075LIBS="-lkvm $LIBS"
15076cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15077/* confdefs.h. */
15078_ACEOF
15079cat confdefs.h >>conftest.$ac_ext
15080cat >>conftest.$ac_ext <<_ACEOF
15081/* end confdefs.h. */
98418dba
CW
15082
15083/* Override any gcc2 internal prototype to avoid an error. */
15084#ifdef __cplusplus
15085extern "C"
15086#endif
15087/* We use char because int might match the return type of a gcc2
15088 builtin and then its argument prototype would still apply. */
15089char kvm_open ();
503d2be0
AS
15090int
15091main ()
15092{
98418dba 15093kvm_open ();
503d2be0
AS
15094 ;
15095 return 0;
15096}
15097_ACEOF
15098rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15099if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15100 (eval $ac_link) 2>conftest.er1
503d2be0 15101 ac_status=$?
edfaf76d
LK
15102 grep -v '^ *+' conftest.er1 >conftest.err
15103 rm -f conftest.er1
15104 cat conftest.err >&5
c0d27fcc 15105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15106 (exit $ac_status); } &&
edfaf76d
LK
15107 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15109 (eval $ac_try) 2>&5
15110 ac_status=$?
15111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15112 (exit $ac_status); }; } &&
15113 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15115 (eval $ac_try) 2>&5
15116 ac_status=$?
c0d27fcc 15117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15118 (exit $ac_status); }; }; then
98418dba 15119 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
15120else
15121 echo "$as_me: failed program was:" >&5
19650fd6
AS
15122sed 's/^/| /' conftest.$ac_ext >&5
15123
98418dba 15124ac_cv_lib_kvm_kvm_open=no
503d2be0 15125fi
edfaf76d
LK
15126rm -f conftest.err conftest.$ac_objext \
15127 conftest$ac_exeext conftest.$ac_ext
98418dba 15128LIBS=$ac_check_lib_save_LIBS
503d2be0 15129fi
c0d27fcc 15130echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
98418dba
CW
15131echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6
15132if test $ac_cv_lib_kvm_kvm_open = yes; then
15133 LIBS="-lkvm $LIBS"
ba4481b5
DL
15134fi
15135
98418dba 15136 # Check for the 4.4BSD definition of getloadavg.
c0d27fcc 15137 echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
98418dba
CW
15138echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6
15139if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 15140 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15141else
98418dba
CW
15142 ac_check_lib_save_LIBS=$LIBS
15143LIBS="-lutil $LIBS"
15144cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15145/* confdefs.h. */
15146_ACEOF
15147cat confdefs.h >>conftest.$ac_ext
15148cat >>conftest.$ac_ext <<_ACEOF
15149/* end confdefs.h. */
98418dba
CW
15150
15151/* Override any gcc2 internal prototype to avoid an error. */
15152#ifdef __cplusplus
15153extern "C"
15154#endif
15155/* We use char because int might match the return type of a gcc2
15156 builtin and then its argument prototype would still apply. */
15157char getloadavg ();
503d2be0
AS
15158int
15159main ()
15160{
98418dba 15161getloadavg ();
503d2be0
AS
15162 ;
15163 return 0;
15164}
15165_ACEOF
15166rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15167if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15168 (eval $ac_link) 2>conftest.er1
503d2be0 15169 ac_status=$?
edfaf76d
LK
15170 grep -v '^ *+' conftest.er1 >conftest.err
15171 rm -f conftest.er1
15172 cat conftest.err >&5
c0d27fcc 15173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15174 (exit $ac_status); } &&
edfaf76d
LK
15175 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15177 (eval $ac_try) 2>&5
15178 ac_status=$?
15179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15180 (exit $ac_status); }; } &&
15181 { ac_try='test -s conftest$ac_exeext'
35996d22
AS
15182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15183 (eval $ac_try) 2>&5
15184 ac_status=$?
15185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15186 (exit $ac_status); }; }; then
15187 ac_cv_lib_util_getloadavg=yes
15188else
503d2be0 15189 echo "$as_me: failed program was:" >&5
19650fd6
AS
15190sed 's/^/| /' conftest.$ac_ext >&5
15191
98418dba 15192ac_cv_lib_util_getloadavg=no
ba4481b5 15193fi
edfaf76d
LK
15194rm -f conftest.err conftest.$ac_objext \
15195 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15196LIBS=$ac_check_lib_save_LIBS
15197fi
c0d27fcc 15198echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
98418dba
CW
15199echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6
15200if test $ac_cv_lib_util_getloadavg = yes; then
15201 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 15202fi
503d2be0 15203
98418dba 15204fi
ba4481b5 15205
98418dba
CW
15206if test $ac_have_func = no; then
15207 # There is a commonly available library for RS/6000 AIX.
15208 # Since it is not a standard part of AIX, it might be installed locally.
15209 ac_getloadavg_LIBS=$LIBS
15210 LIBS="-L/usr/local/lib $LIBS"
c0d27fcc 15211 echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
98418dba
CW
15212echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6
15213if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 15214 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15215else
98418dba
CW
15216 ac_check_lib_save_LIBS=$LIBS
15217LIBS="-lgetloadavg $LIBS"
15218cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15219/* confdefs.h. */
15220_ACEOF
15221cat confdefs.h >>conftest.$ac_ext
15222cat >>conftest.$ac_ext <<_ACEOF
15223/* end confdefs.h. */
ba4481b5 15224
98418dba
CW
15225/* Override any gcc2 internal prototype to avoid an error. */
15226#ifdef __cplusplus
15227extern "C"
15228#endif
15229/* We use char because int might match the return type of a gcc2
15230 builtin and then its argument prototype would still apply. */
15231char getloadavg ();
98418dba
CW
15232int
15233main ()
15234{
15235getloadavg ();
15236 ;
15237 return 0;
15238}
503d2be0 15239_ACEOF
98418dba 15240rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15241if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15242 (eval $ac_link) 2>conftest.er1
98418dba 15243 ac_status=$?
edfaf76d
LK
15244 grep -v '^ *+' conftest.er1 >conftest.err
15245 rm -f conftest.er1
15246 cat conftest.err >&5
c0d27fcc 15247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15248 (exit $ac_status); } &&
edfaf76d
LK
15249 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15251 (eval $ac_try) 2>&5
15252 ac_status=$?
15253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15254 (exit $ac_status); }; } &&
15255 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
15257 (eval $ac_try) 2>&5
15258 ac_status=$?
c0d27fcc 15259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15260 (exit $ac_status); }; }; then
15261 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 15262else
98418dba 15263 echo "$as_me: failed program was:" >&5
19650fd6
AS
15264sed 's/^/| /' conftest.$ac_ext >&5
15265
98418dba
CW
15266ac_cv_lib_getloadavg_getloadavg=no
15267fi
edfaf76d
LK
15268rm -f conftest.err conftest.$ac_objext \
15269 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15270LIBS=$ac_check_lib_save_LIBS
15271fi
c0d27fcc 15272echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
98418dba
CW
15273echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6
15274if test $ac_cv_lib_getloadavg_getloadavg = yes; then
15275 LIBS="-lgetloadavg $LIBS"
15276else
15277 LIBS=$ac_getloadavg_LIBS
ba4481b5 15278fi
ba4481b5
DL
15279
15280fi
98418dba
CW
15281
15282# Make sure it is really in the library, if we think we found it,
15283# otherwise set up the replacement function.
15284
15285for ac_func in getloadavg
15286do
15287as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 15288echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
15289echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15290if eval "test \"\${$as_ac_var+set}\" = set"; then
15291 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15292else
503d2be0 15293 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15294/* confdefs.h. */
15295_ACEOF
15296cat confdefs.h >>conftest.$ac_ext
15297cat >>conftest.$ac_ext <<_ACEOF
15298/* end confdefs.h. */
edfaf76d
LK
15299/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15300 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15301#define $ac_func innocuous_$ac_func
15302
ba4481b5 15303/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15304 which can conflict with char $ac_func (); below.
15305 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15306 <limits.h> exists even on freestanding compilers. */
edfaf76d 15307
19650fd6
AS
15308#ifdef __STDC__
15309# include <limits.h>
15310#else
15311# include <assert.h>
15312#endif
edfaf76d
LK
15313
15314#undef $ac_func
15315
ba4481b5 15316/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15317#ifdef __cplusplus
15318extern "C"
19650fd6 15319{
503d2be0 15320#endif
ba4481b5 15321/* We use char because int might match the return type of a gcc2
503d2be0
AS
15322 builtin and then its argument prototype would still apply. */
15323char $ac_func ();
ba4481b5
DL
15324/* The GNU C library defines this for functions which it implements
15325 to always fail with ENOSYS. Some functions are actually named
15326 something starting with __ and the normal name is an alias. */
15327#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15328choke me
15329#else
19650fd6
AS
15330char (*f) () = $ac_func;
15331#endif
15332#ifdef __cplusplus
15333}
cd958eb3
MB
15334#endif
15335
19650fd6
AS
15336int
15337main ()
15338{
15339return f != $ac_func;
503d2be0
AS
15340 ;
15341 return 0;
15342}
15343_ACEOF
15344rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15345if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15346 (eval $ac_link) 2>conftest.er1
503d2be0 15347 ac_status=$?
edfaf76d
LK
15348 grep -v '^ *+' conftest.er1 >conftest.err
15349 rm -f conftest.er1
15350 cat conftest.err >&5
c0d27fcc 15351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15352 (exit $ac_status); } &&
edfaf76d
LK
15353 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15355 (eval $ac_try) 2>&5
15356 ac_status=$?
15357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15358 (exit $ac_status); }; } &&
15359 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15361 (eval $ac_try) 2>&5
15362 ac_status=$?
c0d27fcc 15363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15364 (exit $ac_status); }; }; then
15365 eval "$as_ac_var=yes"
15366else
15367 echo "$as_me: failed program was:" >&5
19650fd6
AS
15368sed 's/^/| /' conftest.$ac_ext >&5
15369
503d2be0
AS
15370eval "$as_ac_var=no"
15371fi
edfaf76d
LK
15372rm -f conftest.err conftest.$ac_objext \
15373 conftest$ac_exeext conftest.$ac_ext
503d2be0 15374fi
c0d27fcc 15375echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
15376echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15377if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15378 cat >>confdefs.h <<_ACEOF
98418dba 15379#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15380_ACEOF
503d2be0 15381
98418dba 15382else
edfaf76d
LK
15383 case $LIBOBJS in
15384 "getloadavg.$ac_objext" | \
15385 *" getloadavg.$ac_objext" | \
15386 "getloadavg.$ac_objext "* | \
15387 *" getloadavg.$ac_objext "* ) ;;
15388 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext" ;;
15389esac
15390
ba4481b5 15391
c0d27fcc 15392cat >>confdefs.h <<\_ACEOF
98418dba 15393#define C_GETLOADAVG 1
c0d27fcc 15394_ACEOF
ba4481b5 15395
98418dba
CW
15396# Figure out what our getloadavg.c needs.
15397ac_have_func=no
c0d27fcc
MR
15398if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
15399 echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
98418dba
CW
15400echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
15401if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 15402 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15403fi
15404echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
15405echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
ba4481b5 15406else
c0d27fcc
MR
15407 # Is the header compilable?
15408echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
15409echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6
15410cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15411/* confdefs.h. */
15412_ACEOF
15413cat confdefs.h >>conftest.$ac_ext
15414cat >>conftest.$ac_ext <<_ACEOF
15415/* end confdefs.h. */
c0d27fcc
MR
15416$ac_includes_default
15417#include <sys/dg_sys_info.h>
15418_ACEOF
15419rm -f conftest.$ac_objext
15420if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 15421 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15422 ac_status=$?
edfaf76d
LK
15423 grep -v '^ *+' conftest.er1 >conftest.err
15424 rm -f conftest.er1
15425 cat conftest.err >&5
c0d27fcc
MR
15426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15427 (exit $ac_status); } &&
edfaf76d
LK
15428 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15430 (eval $ac_try) 2>&5
15431 ac_status=$?
15432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15433 (exit $ac_status); }; } &&
15434 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15436 (eval $ac_try) 2>&5
15437 ac_status=$?
15438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15439 (exit $ac_status); }; }; then
15440 ac_header_compiler=yes
15441else
15442 echo "$as_me: failed program was:" >&5
19650fd6
AS
15443sed 's/^/| /' conftest.$ac_ext >&5
15444
c0d27fcc
MR
15445ac_header_compiler=no
15446fi
edfaf76d 15447rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15448echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15449echo "${ECHO_T}$ac_header_compiler" >&6
15450
15451# Is the header present?
15452echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
15453echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6
15454cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15455/* confdefs.h. */
15456_ACEOF
15457cat confdefs.h >>conftest.$ac_ext
15458cat >>conftest.$ac_ext <<_ACEOF
15459/* end confdefs.h. */
98418dba
CW
15460#include <sys/dg_sys_info.h>
15461_ACEOF
c0d27fcc 15462if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
15463 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15464 ac_status=$?
6bae0ccf 15465 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15466 rm -f conftest.er1
15467 cat conftest.err >&5
c0d27fcc 15468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15469 (exit $ac_status); } >/dev/null; then
15470 if test -s conftest.err; then
15471 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 15472 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
15473 else
15474 ac_cpp_err=
15475 fi
15476else
15477 ac_cpp_err=yes
ba4481b5 15478fi
98418dba 15479if test -z "$ac_cpp_err"; then
c0d27fcc 15480 ac_header_preproc=yes
98418dba
CW
15481else
15482 echo "$as_me: failed program was:" >&5
19650fd6
AS
15483sed 's/^/| /' conftest.$ac_ext >&5
15484
c0d27fcc 15485 ac_header_preproc=no
ba4481b5 15486fi
98418dba 15487rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15488echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15489echo "${ECHO_T}$ac_header_preproc" >&6
15490
15491# So? What about this header?
edfaf76d
LK
15492case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15493 yes:no: )
c0d27fcc
MR
15494 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
15495echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15496 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
15497echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
15498 ac_header_preproc=yes
19650fd6 15499 ;;
edfaf76d 15500 no:yes:* )
c0d27fcc
MR
15501 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
15502echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
edfaf76d
LK
15503 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
15504echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
15505 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
15506echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
15507 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
15508echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15509 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 15510echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15511 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
15512echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
15513 (
15514 cat <<\_ASBOX
edfaf76d
LK
15515## ------------------------------------------ ##
15516## Report this to the AC_PACKAGE_NAME lists. ##
15517## ------------------------------------------ ##
19650fd6
AS
15518_ASBOX
15519 ) |
15520 sed "s/^/$as_me: WARNING: /" >&2
15521 ;;
c0d27fcc
MR
15522esac
15523echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
15524echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
15525if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
15526 echo $ECHO_N "(cached) $ECHO_C" >&6
15527else
15528 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 15529fi
c0d27fcc 15530echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
98418dba 15531echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
c0d27fcc
MR
15532
15533fi
98418dba
CW
15534if test $ac_cv_header_sys_dg_sys_info_h = yes; then
15535 ac_have_func=yes
ba4481b5 15536
c0d27fcc 15537cat >>confdefs.h <<\_ACEOF
98418dba 15538#define DGUX 1
c0d27fcc
MR
15539_ACEOF
15540
503d2be0 15541
c0d27fcc 15542echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
98418dba
CW
15543echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6
15544if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 15545 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15546else
503d2be0 15547 ac_check_lib_save_LIBS=$LIBS
98418dba 15548LIBS="-ldgc $LIBS"
503d2be0 15549cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15550/* confdefs.h. */
15551_ACEOF
15552cat confdefs.h >>conftest.$ac_ext
15553cat >>conftest.$ac_ext <<_ACEOF
15554/* end confdefs.h. */
503d2be0 15555
ba4481b5 15556/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15557#ifdef __cplusplus
15558extern "C"
15559#endif
ba4481b5 15560/* We use char because int might match the return type of a gcc2
503d2be0 15561 builtin and then its argument prototype would still apply. */
98418dba 15562char dg_sys_info ();
503d2be0
AS
15563int
15564main ()
15565{
98418dba 15566dg_sys_info ();
503d2be0
AS
15567 ;
15568 return 0;
15569}
15570_ACEOF
15571rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15572if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15573 (eval $ac_link) 2>conftest.er1
503d2be0 15574 ac_status=$?
edfaf76d
LK
15575 grep -v '^ *+' conftest.er1 >conftest.err
15576 rm -f conftest.er1
15577 cat conftest.err >&5
c0d27fcc 15578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15579 (exit $ac_status); } &&
edfaf76d
LK
15580 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15582 (eval $ac_try) 2>&5
15583 ac_status=$?
15584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15585 (exit $ac_status); }; } &&
15586 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15588 (eval $ac_try) 2>&5
15589 ac_status=$?
c0d27fcc 15590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15591 (exit $ac_status); }; }; then
98418dba 15592 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
15593else
15594 echo "$as_me: failed program was:" >&5
19650fd6
AS
15595sed 's/^/| /' conftest.$ac_ext >&5
15596
98418dba 15597ac_cv_lib_dgc_dg_sys_info=no
503d2be0 15598fi
edfaf76d
LK
15599rm -f conftest.err conftest.$ac_objext \
15600 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
15601LIBS=$ac_check_lib_save_LIBS
15602fi
c0d27fcc 15603echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
98418dba
CW
15604echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6
15605if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 15606 cat >>confdefs.h <<_ACEOF
98418dba 15607#define HAVE_LIBDGC 1
c0d27fcc 15608_ACEOF
ba4481b5 15609
98418dba 15610 LIBS="-ldgc $LIBS"
ba4481b5 15611
ba4481b5
DL
15612fi
15613
98418dba 15614fi
503d2be0 15615
c0d27fcc
MR
15616
15617
15618if test "${ac_cv_header_locale_h+set}" = set; then
15619 echo "$as_me:$LINENO: checking for locale.h" >&5
98418dba
CW
15620echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
15621if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 15622 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15623fi
15624echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
15625echo "${ECHO_T}$ac_cv_header_locale_h" >&6
503d2be0 15626else
c0d27fcc
MR
15627 # Is the header compilable?
15628echo "$as_me:$LINENO: checking locale.h usability" >&5
15629echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6
15630cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15631/* confdefs.h. */
15632_ACEOF
15633cat confdefs.h >>conftest.$ac_ext
15634cat >>conftest.$ac_ext <<_ACEOF
15635/* end confdefs.h. */
c0d27fcc
MR
15636$ac_includes_default
15637#include <locale.h>
15638_ACEOF
15639rm -f conftest.$ac_objext
15640if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 15641 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15642 ac_status=$?
edfaf76d
LK
15643 grep -v '^ *+' conftest.er1 >conftest.err
15644 rm -f conftest.er1
15645 cat conftest.err >&5
c0d27fcc
MR
15646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15647 (exit $ac_status); } &&
edfaf76d
LK
15648 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15650 (eval $ac_try) 2>&5
15651 ac_status=$?
15652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15653 (exit $ac_status); }; } &&
15654 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15656 (eval $ac_try) 2>&5
15657 ac_status=$?
15658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15659 (exit $ac_status); }; }; then
15660 ac_header_compiler=yes
15661else
15662 echo "$as_me: failed program was:" >&5
19650fd6
AS
15663sed 's/^/| /' conftest.$ac_ext >&5
15664
c0d27fcc
MR
15665ac_header_compiler=no
15666fi
edfaf76d 15667rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15668echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15669echo "${ECHO_T}$ac_header_compiler" >&6
15670
15671# Is the header present?
15672echo "$as_me:$LINENO: checking locale.h presence" >&5
15673echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6
15674cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15675/* confdefs.h. */
15676_ACEOF
15677cat confdefs.h >>conftest.$ac_ext
15678cat >>conftest.$ac_ext <<_ACEOF
15679/* end confdefs.h. */
98418dba 15680#include <locale.h>
503d2be0 15681_ACEOF
c0d27fcc 15682if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 15683 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 15684 ac_status=$?
6bae0ccf 15685 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15686 rm -f conftest.er1
15687 cat conftest.err >&5
c0d27fcc 15688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15689 (exit $ac_status); } >/dev/null; then
15690 if test -s conftest.err; then
15691 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 15692 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
15693 else
15694 ac_cpp_err=
15695 fi
503d2be0 15696else
98418dba 15697 ac_cpp_err=yes
503d2be0 15698fi
98418dba 15699if test -z "$ac_cpp_err"; then
c0d27fcc 15700 ac_header_preproc=yes
98418dba
CW
15701else
15702 echo "$as_me: failed program was:" >&5
19650fd6
AS
15703sed 's/^/| /' conftest.$ac_ext >&5
15704
c0d27fcc 15705 ac_header_preproc=no
ba4481b5 15706fi
98418dba 15707rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15708echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15709echo "${ECHO_T}$ac_header_preproc" >&6
15710
15711# So? What about this header?
edfaf76d
LK
15712case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15713 yes:no: )
c0d27fcc
MR
15714 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
15715echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15716 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
15717echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
15718 ac_header_preproc=yes
19650fd6 15719 ;;
edfaf76d 15720 no:yes:* )
c0d27fcc
MR
15721 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
15722echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
edfaf76d
LK
15723 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
15724echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
15725 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
15726echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
15727 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
15728echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15729 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 15730echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15731 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
15732echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
15733 (
15734 cat <<\_ASBOX
edfaf76d
LK
15735## ------------------------------------------ ##
15736## Report this to the AC_PACKAGE_NAME lists. ##
15737## ------------------------------------------ ##
19650fd6
AS
15738_ASBOX
15739 ) |
15740 sed "s/^/$as_me: WARNING: /" >&2
15741 ;;
c0d27fcc
MR
15742esac
15743echo "$as_me:$LINENO: checking for locale.h" >&5
15744echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
15745if test "${ac_cv_header_locale_h+set}" = set; then
15746 echo $ECHO_N "(cached) $ECHO_C" >&6
15747else
15748 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 15749fi
c0d27fcc 15750echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
98418dba
CW
15751echo "${ECHO_T}$ac_cv_header_locale_h" >&6
15752
c0d27fcc
MR
15753fi
15754
15755
15756
98418dba 15757for ac_func in setlocale
ba4481b5 15758do
503d2be0 15759as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 15760echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
15761echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15762if eval "test \"\${$as_ac_var+set}\" = set"; then
15763 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15764else
503d2be0 15765 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15766/* confdefs.h. */
15767_ACEOF
15768cat confdefs.h >>conftest.$ac_ext
15769cat >>conftest.$ac_ext <<_ACEOF
15770/* end confdefs.h. */
edfaf76d
LK
15771/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15772 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15773#define $ac_func innocuous_$ac_func
15774
ba4481b5 15775/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15776 which can conflict with char $ac_func (); below.
15777 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15778 <limits.h> exists even on freestanding compilers. */
edfaf76d 15779
19650fd6
AS
15780#ifdef __STDC__
15781# include <limits.h>
15782#else
15783# include <assert.h>
15784#endif
edfaf76d
LK
15785
15786#undef $ac_func
15787
ba4481b5 15788/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15789#ifdef __cplusplus
15790extern "C"
19650fd6 15791{
503d2be0 15792#endif
ba4481b5 15793/* We use char because int might match the return type of a gcc2
503d2be0
AS
15794 builtin and then its argument prototype would still apply. */
15795char $ac_func ();
ba4481b5
DL
15796/* The GNU C library defines this for functions which it implements
15797 to always fail with ENOSYS. Some functions are actually named
15798 something starting with __ and the normal name is an alias. */
15799#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15800choke me
15801#else
19650fd6
AS
15802char (*f) () = $ac_func;
15803#endif
15804#ifdef __cplusplus
15805}
ba4481b5
DL
15806#endif
15807
19650fd6
AS
15808int
15809main ()
15810{
15811return f != $ac_func;
503d2be0
AS
15812 ;
15813 return 0;
15814}
15815_ACEOF
15816rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15817if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15818 (eval $ac_link) 2>conftest.er1
503d2be0 15819 ac_status=$?
edfaf76d
LK
15820 grep -v '^ *+' conftest.er1 >conftest.err
15821 rm -f conftest.er1
15822 cat conftest.err >&5
c0d27fcc 15823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15824 (exit $ac_status); } &&
edfaf76d
LK
15825 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15827 (eval $ac_try) 2>&5
15828 ac_status=$?
15829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15830 (exit $ac_status); }; } &&
15831 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15833 (eval $ac_try) 2>&5
15834 ac_status=$?
c0d27fcc 15835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15836 (exit $ac_status); }; }; then
15837 eval "$as_ac_var=yes"
15838else
15839 echo "$as_me: failed program was:" >&5
19650fd6
AS
15840sed 's/^/| /' conftest.$ac_ext >&5
15841
503d2be0
AS
15842eval "$as_ac_var=no"
15843fi
edfaf76d
LK
15844rm -f conftest.err conftest.$ac_objext \
15845 conftest$ac_exeext conftest.$ac_ext
503d2be0 15846fi
c0d27fcc 15847echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
15848echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15849if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15850 cat >>confdefs.h <<_ACEOF
503d2be0 15851#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15852_ACEOF
ba4481b5 15853
ba4481b5
DL
15854fi
15855done
15856
c0d27fcc 15857
98418dba
CW
15858# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
15859# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
15860# Irix 4.0.5F has the header but not the library.
15861if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
15862 ac_have_func=yes
15863
c0d27fcc 15864cat >>confdefs.h <<\_ACEOF
98418dba 15865#define SVR4 1
c0d27fcc 15866_ACEOF
98418dba
CW
15867
15868fi
15869
15870if test $ac_have_func = no; then
c0d27fcc
MR
15871 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
15872 echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
98418dba
CW
15873echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
15874if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 15875 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15876fi
15877echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
15878echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
98418dba 15879else
c0d27fcc
MR
15880 # Is the header compilable?
15881echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
15882echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6
15883cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15884/* confdefs.h. */
15885_ACEOF
15886cat confdefs.h >>conftest.$ac_ext
15887cat >>conftest.$ac_ext <<_ACEOF
15888/* end confdefs.h. */
c0d27fcc
MR
15889$ac_includes_default
15890#include <inq_stats/cpustats.h>
15891_ACEOF
15892rm -f conftest.$ac_objext
15893if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 15894 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15895 ac_status=$?
edfaf76d
LK
15896 grep -v '^ *+' conftest.er1 >conftest.err
15897 rm -f conftest.er1
15898 cat conftest.err >&5
c0d27fcc
MR
15899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15900 (exit $ac_status); } &&
edfaf76d
LK
15901 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15903 (eval $ac_try) 2>&5
15904 ac_status=$?
15905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15906 (exit $ac_status); }; } &&
15907 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15909 (eval $ac_try) 2>&5
15910 ac_status=$?
15911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15912 (exit $ac_status); }; }; then
15913 ac_header_compiler=yes
15914else
15915 echo "$as_me: failed program was:" >&5
19650fd6
AS
15916sed 's/^/| /' conftest.$ac_ext >&5
15917
c0d27fcc
MR
15918ac_header_compiler=no
15919fi
edfaf76d 15920rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15921echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15922echo "${ECHO_T}$ac_header_compiler" >&6
15923
15924# Is the header present?
15925echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
15926echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6
15927cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15928/* confdefs.h. */
15929_ACEOF
15930cat confdefs.h >>conftest.$ac_ext
15931cat >>conftest.$ac_ext <<_ACEOF
15932/* end confdefs.h. */
98418dba 15933#include <inq_stats/cpustats.h>
503d2be0 15934_ACEOF
c0d27fcc 15935if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15936 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15937 ac_status=$?
6bae0ccf 15938 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15939 rm -f conftest.er1
15940 cat conftest.err >&5
c0d27fcc 15941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15942 (exit $ac_status); } >/dev/null; then
15943 if test -s conftest.err; then
15944 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 15945 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
15946 else
15947 ac_cpp_err=
15948 fi
15949else
15950 ac_cpp_err=yes
15951fi
15952if test -z "$ac_cpp_err"; then
c0d27fcc 15953 ac_header_preproc=yes
503d2be0
AS
15954else
15955 echo "$as_me: failed program was:" >&5
19650fd6
AS
15956sed 's/^/| /' conftest.$ac_ext >&5
15957
c0d27fcc 15958 ac_header_preproc=no
ba4481b5 15959fi
503d2be0 15960rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15961echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15962echo "${ECHO_T}$ac_header_preproc" >&6
15963
15964# So? What about this header?
edfaf76d
LK
15965case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15966 yes:no: )
c0d27fcc
MR
15967 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
15968echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15969 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
15970echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
15971 ac_header_preproc=yes
19650fd6 15972 ;;
edfaf76d 15973 no:yes:* )
c0d27fcc
MR
15974 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
15975echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
15976 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
15977echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
15978 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
15979echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
15980 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
15981echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15982 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 15983echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15984 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
15985echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
15986 (
15987 cat <<\_ASBOX
edfaf76d
LK
15988## ------------------------------------------ ##
15989## Report this to the AC_PACKAGE_NAME lists. ##
15990## ------------------------------------------ ##
19650fd6
AS
15991_ASBOX
15992 ) |
15993 sed "s/^/$as_me: WARNING: /" >&2
15994 ;;
c0d27fcc
MR
15995esac
15996echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
15997echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
15998if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
15999 echo $ECHO_N "(cached) $ECHO_C" >&6
16000else
16001 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 16002fi
c0d27fcc 16003echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
98418dba 16004echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
c0d27fcc
MR
16005
16006fi
98418dba
CW
16007if test $ac_cv_header_inq_stats_cpustats_h = yes; then
16008 ac_have_func=yes
ba4481b5 16009
c0d27fcc 16010cat >>confdefs.h <<\_ACEOF
98418dba 16011#define UMAX 1
c0d27fcc 16012_ACEOF
98418dba 16013
c0d27fcc
MR
16014
16015cat >>confdefs.h <<\_ACEOF
98418dba 16016#define UMAX4_3 1
c0d27fcc 16017_ACEOF
98418dba
CW
16018
16019fi
16020
c0d27fcc 16021
98418dba
CW
16022fi
16023
16024if test $ac_have_func = no; then
c0d27fcc
MR
16025 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
16026 echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
98418dba
CW
16027echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
16028if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 16029 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16030fi
16031echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
16032echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
503d2be0 16033else
c0d27fcc
MR
16034 # Is the header compilable?
16035echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
16036echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6
16037cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16038/* confdefs.h. */
16039_ACEOF
16040cat confdefs.h >>conftest.$ac_ext
16041cat >>conftest.$ac_ext <<_ACEOF
16042/* end confdefs.h. */
c0d27fcc
MR
16043$ac_includes_default
16044#include <sys/cpustats.h>
16045_ACEOF
16046rm -f conftest.$ac_objext
16047if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16048 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16049 ac_status=$?
edfaf76d
LK
16050 grep -v '^ *+' conftest.er1 >conftest.err
16051 rm -f conftest.er1
16052 cat conftest.err >&5
c0d27fcc
MR
16053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16054 (exit $ac_status); } &&
edfaf76d
LK
16055 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16057 (eval $ac_try) 2>&5
16058 ac_status=$?
16059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16060 (exit $ac_status); }; } &&
16061 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16063 (eval $ac_try) 2>&5
16064 ac_status=$?
16065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16066 (exit $ac_status); }; }; then
16067 ac_header_compiler=yes
16068else
16069 echo "$as_me: failed program was:" >&5
19650fd6
AS
16070sed 's/^/| /' conftest.$ac_ext >&5
16071
c0d27fcc
MR
16072ac_header_compiler=no
16073fi
edfaf76d 16074rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16075echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16076echo "${ECHO_T}$ac_header_compiler" >&6
16077
16078# Is the header present?
16079echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
16080echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6
16081cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16082/* confdefs.h. */
16083_ACEOF
16084cat confdefs.h >>conftest.$ac_ext
16085cat >>conftest.$ac_ext <<_ACEOF
16086/* end confdefs.h. */
98418dba
CW
16087#include <sys/cpustats.h>
16088_ACEOF
c0d27fcc 16089if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
16090 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16091 ac_status=$?
6bae0ccf 16092 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16093 rm -f conftest.er1
16094 cat conftest.err >&5
c0d27fcc 16095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
16096 (exit $ac_status); } >/dev/null; then
16097 if test -s conftest.err; then
16098 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16099 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
16100 else
16101 ac_cpp_err=
16102 fi
16103else
16104 ac_cpp_err=yes
503d2be0 16105fi
98418dba 16106if test -z "$ac_cpp_err"; then
c0d27fcc 16107 ac_header_preproc=yes
98418dba
CW
16108else
16109 echo "$as_me: failed program was:" >&5
19650fd6
AS
16110sed 's/^/| /' conftest.$ac_ext >&5
16111
c0d27fcc 16112 ac_header_preproc=no
98418dba
CW
16113fi
16114rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16115echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16116echo "${ECHO_T}$ac_header_preproc" >&6
16117
16118# So? What about this header?
edfaf76d
LK
16119case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16120 yes:no: )
c0d27fcc
MR
16121 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
16122echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16123 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
16124echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
16125 ac_header_preproc=yes
19650fd6 16126 ;;
edfaf76d 16127 no:yes:* )
c0d27fcc
MR
16128 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
16129echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
16130 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
16131echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
16132 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
16133echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
16134 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
16135echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16136 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 16137echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16138 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
16139echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16140 (
16141 cat <<\_ASBOX
edfaf76d
LK
16142## ------------------------------------------ ##
16143## Report this to the AC_PACKAGE_NAME lists. ##
16144## ------------------------------------------ ##
19650fd6
AS
16145_ASBOX
16146 ) |
16147 sed "s/^/$as_me: WARNING: /" >&2
16148 ;;
c0d27fcc
MR
16149esac
16150echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
16151echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
16152if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
16153 echo $ECHO_N "(cached) $ECHO_C" >&6
16154else
16155 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 16156fi
c0d27fcc 16157echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
98418dba 16158echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
c0d27fcc
MR
16159
16160fi
98418dba 16161if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 16162 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 16163#define UMAX 1
c0d27fcc 16164_ACEOF
ba4481b5 16165
98418dba
CW
16166fi
16167
c0d27fcc 16168
98418dba
CW
16169fi
16170
16171if test $ac_have_func = no; then
16172
16173for ac_header in mach/mach.h
2c9dccc9
PJ
16174do
16175as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
16176if eval "test \"\${$as_ac_Header+set}\" = set"; then
16177 echo "$as_me:$LINENO: checking for $ac_header" >&5
2c9dccc9
PJ
16178echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16179if eval "test \"\${$as_ac_Header+set}\" = set"; then
16180 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16181fi
16182echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16183echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 16184else
c0d27fcc
MR
16185 # Is the header compilable?
16186echo "$as_me:$LINENO: checking $ac_header usability" >&5
16187echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16188cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16189/* confdefs.h. */
16190_ACEOF
16191cat confdefs.h >>conftest.$ac_ext
16192cat >>conftest.$ac_ext <<_ACEOF
16193/* end confdefs.h. */
c0d27fcc
MR
16194$ac_includes_default
16195#include <$ac_header>
16196_ACEOF
16197rm -f conftest.$ac_objext
16198if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16199 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16200 ac_status=$?
edfaf76d
LK
16201 grep -v '^ *+' conftest.er1 >conftest.err
16202 rm -f conftest.er1
16203 cat conftest.err >&5
c0d27fcc
MR
16204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16205 (exit $ac_status); } &&
edfaf76d
LK
16206 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16208 (eval $ac_try) 2>&5
16209 ac_status=$?
16210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16211 (exit $ac_status); }; } &&
16212 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16214 (eval $ac_try) 2>&5
16215 ac_status=$?
16216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16217 (exit $ac_status); }; }; then
16218 ac_header_compiler=yes
16219else
16220 echo "$as_me: failed program was:" >&5
19650fd6
AS
16221sed 's/^/| /' conftest.$ac_ext >&5
16222
c0d27fcc
MR
16223ac_header_compiler=no
16224fi
edfaf76d 16225rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16226echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16227echo "${ECHO_T}$ac_header_compiler" >&6
16228
16229# Is the header present?
16230echo "$as_me:$LINENO: checking $ac_header presence" >&5
16231echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16232cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16233/* confdefs.h. */
16234_ACEOF
16235cat confdefs.h >>conftest.$ac_ext
16236cat >>conftest.$ac_ext <<_ACEOF
16237/* end confdefs.h. */
2c9dccc9
PJ
16238#include <$ac_header>
16239_ACEOF
c0d27fcc 16240if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2c9dccc9
PJ
16241 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16242 ac_status=$?
6bae0ccf 16243 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
16244 rm -f conftest.er1
16245 cat conftest.err >&5
c0d27fcc 16246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2c9dccc9
PJ
16247 (exit $ac_status); } >/dev/null; then
16248 if test -s conftest.err; then
16249 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16250 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2c9dccc9
PJ
16251 else
16252 ac_cpp_err=
16253 fi
16254else
16255 ac_cpp_err=yes
16256fi
16257if test -z "$ac_cpp_err"; then
c0d27fcc
MR
16258 ac_header_preproc=yes
16259else
16260 echo "$as_me: failed program was:" >&5
19650fd6
AS
16261sed 's/^/| /' conftest.$ac_ext >&5
16262
c0d27fcc
MR
16263 ac_header_preproc=no
16264fi
16265rm -f conftest.err conftest.$ac_ext
16266echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16267echo "${ECHO_T}$ac_header_preproc" >&6
16268
16269# So? What about this header?
edfaf76d
LK
16270case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16271 yes:no: )
c0d27fcc
MR
16272 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16273echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16274 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16275echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16276 ac_header_preproc=yes
19650fd6 16277 ;;
edfaf76d 16278 no:yes:* )
c0d27fcc
MR
16279 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16280echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16281 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16282echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16283 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16284echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16285 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16286echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16287 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16288echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16289 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16290echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16291 (
16292 cat <<\_ASBOX
edfaf76d
LK
16293## ------------------------------------------ ##
16294## Report this to the AC_PACKAGE_NAME lists. ##
16295## ------------------------------------------ ##
19650fd6
AS
16296_ASBOX
16297 ) |
16298 sed "s/^/$as_me: WARNING: /" >&2
16299 ;;
c0d27fcc
MR
16300esac
16301echo "$as_me:$LINENO: checking for $ac_header" >&5
16302echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16303if eval "test \"\${$as_ac_Header+set}\" = set"; then
16304 echo $ECHO_N "(cached) $ECHO_C" >&6
16305else
edfaf76d 16306 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc
MR
16307fi
16308echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16309echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16310
16311fi
16312if test `eval echo '${'$as_ac_Header'}'` = yes; then
16313 cat >>confdefs.h <<_ACEOF
16314#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16315_ACEOF
16316
16317fi
16318
16319done
16320
16321fi
16322
16323
16324for ac_header in nlist.h
16325do
16326as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16327if eval "test \"\${$as_ac_Header+set}\" = set"; then
16328 echo "$as_me:$LINENO: checking for $ac_header" >&5
16329echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16330if eval "test \"\${$as_ac_Header+set}\" = set"; then
16331 echo $ECHO_N "(cached) $ECHO_C" >&6
16332fi
16333echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16334echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16335else
16336 # Is the header compilable?
16337echo "$as_me:$LINENO: checking $ac_header usability" >&5
16338echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16339cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16340/* confdefs.h. */
16341_ACEOF
16342cat confdefs.h >>conftest.$ac_ext
16343cat >>conftest.$ac_ext <<_ACEOF
16344/* end confdefs.h. */
c0d27fcc
MR
16345$ac_includes_default
16346#include <$ac_header>
16347_ACEOF
16348rm -f conftest.$ac_objext
16349if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16350 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16351 ac_status=$?
edfaf76d
LK
16352 grep -v '^ *+' conftest.er1 >conftest.err
16353 rm -f conftest.er1
16354 cat conftest.err >&5
c0d27fcc
MR
16355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16356 (exit $ac_status); } &&
edfaf76d
LK
16357 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16359 (eval $ac_try) 2>&5
16360 ac_status=$?
16361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16362 (exit $ac_status); }; } &&
16363 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16365 (eval $ac_try) 2>&5
16366 ac_status=$?
16367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16368 (exit $ac_status); }; }; then
16369 ac_header_compiler=yes
2c9dccc9
PJ
16370else
16371 echo "$as_me: failed program was:" >&5
19650fd6
AS
16372sed 's/^/| /' conftest.$ac_ext >&5
16373
c0d27fcc 16374ac_header_compiler=no
98418dba 16375fi
edfaf76d 16376rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16377echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16378echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 16379
c0d27fcc
MR
16380# Is the header present?
16381echo "$as_me:$LINENO: checking $ac_header presence" >&5
16382echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16383cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16384/* confdefs.h. */
16385_ACEOF
16386cat confdefs.h >>conftest.$ac_ext
16387cat >>conftest.$ac_ext <<_ACEOF
16388/* end confdefs.h. */
503d2be0
AS
16389#include <$ac_header>
16390_ACEOF
c0d27fcc 16391if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16392 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16393 ac_status=$?
6bae0ccf 16394 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16395 rm -f conftest.er1
16396 cat conftest.err >&5
c0d27fcc 16397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16398 (exit $ac_status); } >/dev/null; then
16399 if test -s conftest.err; then
16400 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16401 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
16402 else
16403 ac_cpp_err=
16404 fi
16405else
16406 ac_cpp_err=yes
16407fi
16408if test -z "$ac_cpp_err"; then
c0d27fcc 16409 ac_header_preproc=yes
503d2be0
AS
16410else
16411 echo "$as_me: failed program was:" >&5
19650fd6
AS
16412sed 's/^/| /' conftest.$ac_ext >&5
16413
c0d27fcc 16414 ac_header_preproc=no
b5de8dc0 16415fi
503d2be0 16416rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16417echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16418echo "${ECHO_T}$ac_header_preproc" >&6
16419
16420# So? What about this header?
edfaf76d
LK
16421case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16422 yes:no: )
c0d27fcc
MR
16423 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16424echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16425 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16426echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16427 ac_header_preproc=yes
19650fd6 16428 ;;
edfaf76d 16429 no:yes:* )
c0d27fcc
MR
16430 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16431echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16432 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16433echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16434 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16435echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16436 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16437echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16438 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16439echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16440 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16441echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16442 (
16443 cat <<\_ASBOX
edfaf76d
LK
16444## ------------------------------------------ ##
16445## Report this to the AC_PACKAGE_NAME lists. ##
16446## ------------------------------------------ ##
19650fd6
AS
16447_ASBOX
16448 ) |
16449 sed "s/^/$as_me: WARNING: /" >&2
16450 ;;
c0d27fcc
MR
16451esac
16452echo "$as_me:$LINENO: checking for $ac_header" >&5
16453echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16454if eval "test \"\${$as_ac_Header+set}\" = set"; then
16455 echo $ECHO_N "(cached) $ECHO_C" >&6
16456else
edfaf76d 16457 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 16458fi
c0d27fcc 16459echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 16460echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
16461
16462fi
98418dba 16463if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16464 cat >>confdefs.h <<_ACEOF
98418dba 16465#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc
MR
16466_ACEOF
16467 echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
98418dba
CW
16468echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6
16469if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 16470 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 16471else
503d2be0 16472 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16473/* confdefs.h. */
16474_ACEOF
16475cat confdefs.h >>conftest.$ac_ext
16476cat >>conftest.$ac_ext <<_ACEOF
16477/* end confdefs.h. */
98418dba 16478#include <nlist.h>
b5de8dc0 16479
503d2be0
AS
16480int
16481main ()
16482{
98418dba
CW
16483static struct nlist ac_aggr;
16484if (ac_aggr.n_un.n_name)
16485return 0;
503d2be0
AS
16486 ;
16487 return 0;
16488}
16489_ACEOF
98418dba 16490rm -f conftest.$ac_objext
c0d27fcc 16491if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16492 (eval $ac_compile) 2>conftest.er1
503d2be0 16493 ac_status=$?
edfaf76d
LK
16494 grep -v '^ *+' conftest.er1 >conftest.err
16495 rm -f conftest.er1
16496 cat conftest.err >&5
c0d27fcc 16497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16498 (exit $ac_status); } &&
edfaf76d 16499 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
c0d27fcc 16500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16501 (eval $ac_try) 2>&5
16502 ac_status=$?
c0d27fcc 16503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
16504 (exit $ac_status); }; } &&
16505 { ac_try='test -s conftest.$ac_objext'
16506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16507 (eval $ac_try) 2>&5
16508 ac_status=$?
16509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16510 (exit $ac_status); }; }; then
16511 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
16512else
16513 echo "$as_me: failed program was:" >&5
19650fd6
AS
16514sed 's/^/| /' conftest.$ac_ext >&5
16515
6bae0ccf 16516cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16517/* confdefs.h. */
16518_ACEOF
16519cat confdefs.h >>conftest.$ac_ext
16520cat >>conftest.$ac_ext <<_ACEOF
16521/* end confdefs.h. */
6bae0ccf
DL
16522#include <nlist.h>
16523
16524int
16525main ()
16526{
16527static struct nlist ac_aggr;
16528if (sizeof ac_aggr.n_un.n_name)
16529return 0;
16530 ;
16531 return 0;
16532}
16533_ACEOF
16534rm -f conftest.$ac_objext
16535if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16536 (eval $ac_compile) 2>conftest.er1
6bae0ccf 16537 ac_status=$?
edfaf76d
LK
16538 grep -v '^ *+' conftest.er1 >conftest.err
16539 rm -f conftest.er1
16540 cat conftest.err >&5
6bae0ccf
DL
16541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16542 (exit $ac_status); } &&
edfaf76d
LK
16543 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16545 (eval $ac_try) 2>&5
16546 ac_status=$?
16547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16548 (exit $ac_status); }; } &&
16549 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
16550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16551 (eval $ac_try) 2>&5
16552 ac_status=$?
16553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16554 (exit $ac_status); }; }; then
16555 ac_cv_member_struct_nlist_n_un_n_name=yes
16556else
16557 echo "$as_me: failed program was:" >&5
19650fd6
AS
16558sed 's/^/| /' conftest.$ac_ext >&5
16559
98418dba 16560ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 16561fi
edfaf76d 16562rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 16563fi
edfaf76d 16564rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 16565fi
c0d27fcc 16566echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
98418dba
CW
16567echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6
16568if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 16569
c0d27fcc 16570cat >>confdefs.h <<_ACEOF
98418dba 16571#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 16572_ACEOF
b5de8dc0 16573
c0d27fcc
MR
16574
16575cat >>confdefs.h <<\_ACEOF
98418dba 16576#define NLIST_NAME_UNION 1
c0d27fcc 16577_ACEOF
b5de8dc0 16578
98418dba 16579fi
b5de8dc0 16580
c0d27fcc 16581
98418dba 16582fi
c0d27fcc 16583
98418dba 16584done
b5de8dc0 16585
98418dba
CW
16586fi
16587done
b5de8dc0 16588
c0d27fcc 16589
98418dba 16590# Some definitions of getloadavg require that the program be installed setgid.
c0d27fcc 16591echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
98418dba
CW
16592echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6
16593if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
16594 echo $ECHO_N "(cached) $ECHO_C" >&6
16595else
16596 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16597/* confdefs.h. */
16598_ACEOF
16599cat confdefs.h >>conftest.$ac_ext
16600cat >>conftest.$ac_ext <<_ACEOF
16601/* end confdefs.h. */
6bae0ccf 16602#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
16603#ifdef LDAV_PRIVILEGED
16604Yowza Am I SETGID yet
16605#endif
16606_ACEOF
16607if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 16608 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
16609 ac_cv_func_getloadavg_setgid=yes
16610else
16611 ac_cv_func_getloadavg_setgid=no
16612fi
16613rm -f conftest*
b5de8dc0 16614
98418dba 16615fi
c0d27fcc 16616echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
98418dba
CW
16617echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6
16618if test $ac_cv_func_getloadavg_setgid = yes; then
16619 NEED_SETGID=true
b5de8dc0 16620
c0d27fcc 16621cat >>confdefs.h <<\_ACEOF
98418dba 16622#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 16623_ACEOF
98418dba 16624
b5de8dc0 16625else
98418dba 16626 NEED_SETGID=false
b5de8dc0 16627fi
98418dba
CW
16628
16629if test $ac_cv_func_getloadavg_setgid = yes; then
c0d27fcc 16630 echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
98418dba
CW
16631echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6
16632if test "${ac_cv_group_kmem+set}" = set; then
16633 echo $ECHO_N "(cached) $ECHO_C" >&6
16634else
16635 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
16636 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
16637 # If we got an error (system does not support symlinks), try without -L.
16638 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
16639 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 16640 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
16641 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
16642 / /s/.* //;p;'`
16643
b5de8dc0 16644fi
c0d27fcc 16645echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
98418dba
CW
16646echo "${ECHO_T}$ac_cv_group_kmem" >&6
16647 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 16648fi
98418dba
CW
16649if test "x$ac_save_LIBS" = x; then
16650 GETLOADAVG_LIBS=$LIBS
16651else
16652 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 16653fi
98418dba 16654LIBS=$ac_save_LIBS
b5de8dc0 16655
c0d27fcc
MR
16656
16657
16658echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
b936fae4
AS
16659echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
16660if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 16661 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 16662else
b936fae4
AS
16663 while :; do
16664 ac_cv_sys_largefile_source=no
503d2be0 16665 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16666/* confdefs.h. */
16667_ACEOF
16668cat confdefs.h >>conftest.$ac_ext
16669cat >>conftest.$ac_ext <<_ACEOF
16670/* end confdefs.h. */
b936fae4 16671#include <stdio.h>
503d2be0
AS
16672int
16673main ()
16674{
b936fae4
AS
16675return !fseeko;
16676 ;
16677 return 0;
16678}
16679_ACEOF
16680rm -f conftest.$ac_objext
c0d27fcc 16681if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16682 (eval $ac_compile) 2>conftest.er1
b936fae4 16683 ac_status=$?
edfaf76d
LK
16684 grep -v '^ *+' conftest.er1 >conftest.err
16685 rm -f conftest.er1
16686 cat conftest.err >&5
c0d27fcc 16687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 16688 (exit $ac_status); } &&
edfaf76d
LK
16689 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16691 (eval $ac_try) 2>&5
16692 ac_status=$?
16693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16694 (exit $ac_status); }; } &&
16695 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
16697 (eval $ac_try) 2>&5
16698 ac_status=$?
c0d27fcc 16699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
16700 (exit $ac_status); }; }; then
16701 break
16702else
16703 echo "$as_me: failed program was:" >&5
19650fd6
AS
16704sed 's/^/| /' conftest.$ac_ext >&5
16705
b936fae4 16706fi
edfaf76d 16707rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b936fae4 16708 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16709/* confdefs.h. */
16710_ACEOF
16711cat confdefs.h >>conftest.$ac_ext
16712cat >>conftest.$ac_ext <<_ACEOF
16713/* end confdefs.h. */
b936fae4
AS
16714#define _LARGEFILE_SOURCE 1
16715#include <stdio.h>
b936fae4
AS
16716int
16717main ()
16718{
16719return !fseeko;
16720 ;
16721 return 0;
16722}
16723_ACEOF
16724rm -f conftest.$ac_objext
c0d27fcc 16725if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16726 (eval $ac_compile) 2>conftest.er1
b936fae4 16727 ac_status=$?
edfaf76d
LK
16728 grep -v '^ *+' conftest.er1 >conftest.err
16729 rm -f conftest.er1
16730 cat conftest.err >&5
c0d27fcc 16731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 16732 (exit $ac_status); } &&
edfaf76d
LK
16733 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16735 (eval $ac_try) 2>&5
16736 ac_status=$?
16737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16738 (exit $ac_status); }; } &&
16739 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
16741 (eval $ac_try) 2>&5
16742 ac_status=$?
c0d27fcc 16743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
16744 (exit $ac_status); }; }; then
16745 ac_cv_sys_largefile_source=1; break
16746else
16747 echo "$as_me: failed program was:" >&5
19650fd6
AS
16748sed 's/^/| /' conftest.$ac_ext >&5
16749
b936fae4 16750fi
edfaf76d 16751rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b936fae4
AS
16752 break
16753done
16754fi
c0d27fcc 16755echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
b936fae4
AS
16756echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
16757if test "$ac_cv_sys_largefile_source" != no; then
16758
c0d27fcc 16759cat >>confdefs.h <<_ACEOF
b936fae4 16760#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 16761_ACEOF
b936fae4
AS
16762
16763fi
16764rm -f conftest*
4c343001 16765
b936fae4
AS
16766# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16767# in glibc 2.1.3, but that breaks too many other things.
16768# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c0d27fcc 16769echo "$as_me:$LINENO: checking for fseeko" >&5
b936fae4
AS
16770echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
16771if test "${ac_cv_func_fseeko+set}" = set; then
16772 echo $ECHO_N "(cached) $ECHO_C" >&6
16773else
16774 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16775/* confdefs.h. */
16776_ACEOF
16777cat confdefs.h >>conftest.$ac_ext
16778cat >>conftest.$ac_ext <<_ACEOF
16779/* end confdefs.h. */
b936fae4 16780#include <stdio.h>
b936fae4
AS
16781int
16782main ()
16783{
16784return fseeko && fseeko (stdin, 0, 0);
503d2be0
AS
16785 ;
16786 return 0;
16787}
16788_ACEOF
16789rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16790if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 16791 (eval $ac_link) 2>conftest.er1
503d2be0 16792 ac_status=$?
edfaf76d
LK
16793 grep -v '^ *+' conftest.er1 >conftest.err
16794 rm -f conftest.er1
16795 cat conftest.err >&5
c0d27fcc 16796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16797 (exit $ac_status); } &&
edfaf76d
LK
16798 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16800 (eval $ac_try) 2>&5
16801 ac_status=$?
16802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16803 (exit $ac_status); }; } &&
16804 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16806 (eval $ac_try) 2>&5
16807 ac_status=$?
c0d27fcc 16808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16809 (exit $ac_status); }; }; then
b936fae4 16810 ac_cv_func_fseeko=yes
503d2be0
AS
16811else
16812 echo "$as_me: failed program was:" >&5
19650fd6
AS
16813sed 's/^/| /' conftest.$ac_ext >&5
16814
b936fae4 16815ac_cv_func_fseeko=no
503d2be0 16816fi
edfaf76d
LK
16817rm -f conftest.err conftest.$ac_objext \
16818 conftest$ac_exeext conftest.$ac_ext
503d2be0 16819fi
c0d27fcc 16820echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
b936fae4
AS
16821echo "${ECHO_T}$ac_cv_func_fseeko" >&6
16822if test $ac_cv_func_fseeko = yes; then
16823
c0d27fcc 16824cat >>confdefs.h <<\_ACEOF
b936fae4 16825#define HAVE_FSEEKO 1
c0d27fcc 16826_ACEOF
b936fae4 16827
4c343001
DL
16828fi
16829
c0d27fcc 16830
cd958eb3
MB
16831echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
16832echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6
16833if test "${ac_cv_func_getpgrp_void+set}" = set; then
16834 echo $ECHO_N "(cached) $ECHO_C" >&6
16835else
16836 # Use it with a single arg.
16837cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16838/* confdefs.h. */
16839_ACEOF
16840cat confdefs.h >>conftest.$ac_ext
16841cat >>conftest.$ac_ext <<_ACEOF
16842/* end confdefs.h. */
cd958eb3
MB
16843$ac_includes_default
16844int
16845main ()
16846{
16847getpgrp (0);
16848 ;
16849 return 0;
16850}
16851_ACEOF
16852rm -f conftest.$ac_objext
16853if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16854 (eval $ac_compile) 2>conftest.er1
cd958eb3 16855 ac_status=$?
edfaf76d
LK
16856 grep -v '^ *+' conftest.er1 >conftest.err
16857 rm -f conftest.er1
16858 cat conftest.err >&5
cd958eb3
MB
16859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16860 (exit $ac_status); } &&
edfaf76d
LK
16861 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16863 (eval $ac_try) 2>&5
16864 ac_status=$?
16865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16866 (exit $ac_status); }; } &&
16867 { ac_try='test -s conftest.$ac_objext'
cd958eb3
MB
16868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16869 (eval $ac_try) 2>&5
16870 ac_status=$?
16871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16872 (exit $ac_status); }; }; then
16873 ac_cv_func_getpgrp_void=no
16874else
16875 echo "$as_me: failed program was:" >&5
19650fd6
AS
16876sed 's/^/| /' conftest.$ac_ext >&5
16877
cd958eb3
MB
16878ac_cv_func_getpgrp_void=yes
16879fi
edfaf76d 16880rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
16881
16882fi
16883echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
16884echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6
16885if test $ac_cv_func_getpgrp_void = yes; then
16886
16887cat >>confdefs.h <<\_ACEOF
16888#define GETPGRP_VOID 1
16889_ACEOF
16890
16891fi
16892
16893
973a76b1
DL
16894
16895for ac_func in strftime
16896do
16897as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16898echo "$as_me:$LINENO: checking for $ac_func" >&5
16899echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16900if eval "test \"\${$as_ac_var+set}\" = set"; then
16901 echo $ECHO_N "(cached) $ECHO_C" >&6
16902else
16903 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16904/* confdefs.h. */
16905_ACEOF
16906cat confdefs.h >>conftest.$ac_ext
16907cat >>conftest.$ac_ext <<_ACEOF
16908/* end confdefs.h. */
edfaf76d
LK
16909/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16910 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16911#define $ac_func innocuous_$ac_func
16912
973a76b1 16913/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16914 which can conflict with char $ac_func (); below.
16915 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16916 <limits.h> exists even on freestanding compilers. */
edfaf76d 16917
19650fd6
AS
16918#ifdef __STDC__
16919# include <limits.h>
16920#else
16921# include <assert.h>
16922#endif
edfaf76d
LK
16923
16924#undef $ac_func
16925
973a76b1
DL
16926/* Override any gcc2 internal prototype to avoid an error. */
16927#ifdef __cplusplus
16928extern "C"
19650fd6 16929{
973a76b1
DL
16930#endif
16931/* We use char because int might match the return type of a gcc2
16932 builtin and then its argument prototype would still apply. */
16933char $ac_func ();
16934/* The GNU C library defines this for functions which it implements
16935 to always fail with ENOSYS. Some functions are actually named
16936 something starting with __ and the normal name is an alias. */
16937#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16938choke me
16939#else
19650fd6
AS
16940char (*f) () = $ac_func;
16941#endif
16942#ifdef __cplusplus
16943}
973a76b1
DL
16944#endif
16945
19650fd6
AS
16946int
16947main ()
16948{
16949return f != $ac_func;
973a76b1
DL
16950 ;
16951 return 0;
16952}
16953_ACEOF
16954rm -f conftest.$ac_objext conftest$ac_exeext
16955if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 16956 (eval $ac_link) 2>conftest.er1
973a76b1 16957 ac_status=$?
edfaf76d
LK
16958 grep -v '^ *+' conftest.er1 >conftest.err
16959 rm -f conftest.er1
16960 cat conftest.err >&5
973a76b1
DL
16961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16962 (exit $ac_status); } &&
edfaf76d
LK
16963 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16965 (eval $ac_try) 2>&5
16966 ac_status=$?
16967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16968 (exit $ac_status); }; } &&
16969 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
16970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16971 (eval $ac_try) 2>&5
16972 ac_status=$?
16973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16974 (exit $ac_status); }; }; then
16975 eval "$as_ac_var=yes"
16976else
16977 echo "$as_me: failed program was:" >&5
19650fd6
AS
16978sed 's/^/| /' conftest.$ac_ext >&5
16979
973a76b1
DL
16980eval "$as_ac_var=no"
16981fi
edfaf76d
LK
16982rm -f conftest.err conftest.$ac_objext \
16983 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
16984fi
16985echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16986echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16987if test `eval echo '${'$as_ac_var'}'` = yes; then
16988 cat >>confdefs.h <<_ACEOF
16989#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16990_ACEOF
16991
16992else
16993 # strftime is in -lintl on SCO UNIX.
16994echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
16995echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
16996if test "${ac_cv_lib_intl_strftime+set}" = set; then
16997 echo $ECHO_N "(cached) $ECHO_C" >&6
16998else
16999 ac_check_lib_save_LIBS=$LIBS
17000LIBS="-lintl $LIBS"
17001cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17002/* confdefs.h. */
17003_ACEOF
17004cat confdefs.h >>conftest.$ac_ext
17005cat >>conftest.$ac_ext <<_ACEOF
17006/* end confdefs.h. */
973a76b1
DL
17007
17008/* Override any gcc2 internal prototype to avoid an error. */
17009#ifdef __cplusplus
17010extern "C"
17011#endif
17012/* We use char because int might match the return type of a gcc2
17013 builtin and then its argument prototype would still apply. */
17014char strftime ();
17015int
17016main ()
17017{
17018strftime ();
17019 ;
17020 return 0;
17021}
17022_ACEOF
17023rm -f conftest.$ac_objext conftest$ac_exeext
17024if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 17025 (eval $ac_link) 2>conftest.er1
973a76b1 17026 ac_status=$?
edfaf76d
LK
17027 grep -v '^ *+' conftest.er1 >conftest.err
17028 rm -f conftest.er1
17029 cat conftest.err >&5
973a76b1
DL
17030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17031 (exit $ac_status); } &&
edfaf76d
LK
17032 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17034 (eval $ac_try) 2>&5
17035 ac_status=$?
17036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17037 (exit $ac_status); }; } &&
17038 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
17039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17040 (eval $ac_try) 2>&5
17041 ac_status=$?
17042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17043 (exit $ac_status); }; }; then
17044 ac_cv_lib_intl_strftime=yes
17045else
17046 echo "$as_me: failed program was:" >&5
19650fd6
AS
17047sed 's/^/| /' conftest.$ac_ext >&5
17048
973a76b1
DL
17049ac_cv_lib_intl_strftime=no
17050fi
edfaf76d
LK
17051rm -f conftest.err conftest.$ac_objext \
17052 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
17053LIBS=$ac_check_lib_save_LIBS
17054fi
17055echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
17056echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
17057if test $ac_cv_lib_intl_strftime = yes; then
17058 cat >>confdefs.h <<\_ACEOF
17059#define HAVE_STRFTIME 1
17060_ACEOF
17061
17062LIBS="-lintl $LIBS"
17063fi
17064
17065fi
17066done
17067
17068
b936fae4
AS
17069# UNIX98 PTYs.
17070
17071for ac_func in grantpt
503d2be0
AS
17072do
17073as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 17074echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
17075echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17076if eval "test \"\${$as_ac_var+set}\" = set"; then
17077 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 17078else
503d2be0 17079 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17080/* confdefs.h. */
17081_ACEOF
17082cat confdefs.h >>conftest.$ac_ext
17083cat >>conftest.$ac_ext <<_ACEOF
17084/* end confdefs.h. */
edfaf76d
LK
17085/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17086 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17087#define $ac_func innocuous_$ac_func
17088
503d2be0 17089/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17090 which can conflict with char $ac_func (); below.
17091 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17092 <limits.h> exists even on freestanding compilers. */
edfaf76d 17093
19650fd6
AS
17094#ifdef __STDC__
17095# include <limits.h>
17096#else
17097# include <assert.h>
17098#endif
edfaf76d
LK
17099
17100#undef $ac_func
17101
4c343001 17102/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17103#ifdef __cplusplus
17104extern "C"
19650fd6 17105{
503d2be0 17106#endif
4c343001 17107/* We use char because int might match the return type of a gcc2
503d2be0
AS
17108 builtin and then its argument prototype would still apply. */
17109char $ac_func ();
503d2be0
AS
17110/* The GNU C library defines this for functions which it implements
17111 to always fail with ENOSYS. Some functions are actually named
17112 something starting with __ and the normal name is an alias. */
17113#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17114choke me
17115#else
19650fd6
AS
17116char (*f) () = $ac_func;
17117#endif
17118#ifdef __cplusplus
17119}
503d2be0 17120#endif
4c343001 17121
19650fd6
AS
17122int
17123main ()
17124{
17125return f != $ac_func;
503d2be0
AS
17126 ;
17127 return 0;
17128}
17129_ACEOF
17130rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17131if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 17132 (eval $ac_link) 2>conftest.er1
503d2be0 17133 ac_status=$?
edfaf76d
LK
17134 grep -v '^ *+' conftest.er1 >conftest.err
17135 rm -f conftest.er1
17136 cat conftest.err >&5
c0d27fcc 17137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17138 (exit $ac_status); } &&
edfaf76d
LK
17139 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17141 (eval $ac_try) 2>&5
17142 ac_status=$?
17143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17144 (exit $ac_status); }; } &&
17145 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17147 (eval $ac_try) 2>&5
17148 ac_status=$?
c0d27fcc 17149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17150 (exit $ac_status); }; }; then
17151 eval "$as_ac_var=yes"
17152else
17153 echo "$as_me: failed program was:" >&5
19650fd6
AS
17154sed 's/^/| /' conftest.$ac_ext >&5
17155
503d2be0
AS
17156eval "$as_ac_var=no"
17157fi
edfaf76d
LK
17158rm -f conftest.err conftest.$ac_objext \
17159 conftest$ac_exeext conftest.$ac_ext
503d2be0 17160fi
c0d27fcc 17161echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
17162echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17163if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17164 cat >>confdefs.h <<_ACEOF
503d2be0 17165#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17166_ACEOF
4c343001
DL
17167
17168fi
503d2be0
AS
17169done
17170
c0d27fcc 17171
b936fae4 17172# PTY-related GNU extensions.
4c343001 17173
b936fae4
AS
17174for ac_func in getpt
17175do
17176as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 17177echo "$as_me:$LINENO: checking for $ac_func" >&5
b936fae4
AS
17178echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17179if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 17180 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 17181else
b936fae4 17182 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17183/* confdefs.h. */
17184_ACEOF
17185cat confdefs.h >>conftest.$ac_ext
17186cat >>conftest.$ac_ext <<_ACEOF
17187/* end confdefs.h. */
edfaf76d
LK
17188/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17189 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17190#define $ac_func innocuous_$ac_func
17191
087121cc 17192/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17193 which can conflict with char $ac_func (); below.
17194 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17195 <limits.h> exists even on freestanding compilers. */
edfaf76d 17196
19650fd6
AS
17197#ifdef __STDC__
17198# include <limits.h>
17199#else
17200# include <assert.h>
17201#endif
edfaf76d
LK
17202
17203#undef $ac_func
17204
087121cc 17205/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17206#ifdef __cplusplus
17207extern "C"
19650fd6 17208{
503d2be0 17209#endif
087121cc 17210/* We use char because int might match the return type of a gcc2
503d2be0
AS
17211 builtin and then its argument prototype would still apply. */
17212char $ac_func ();
087121cc
GM
17213/* The GNU C library defines this for functions which it implements
17214 to always fail with ENOSYS. Some functions are actually named
17215 something starting with __ and the normal name is an alias. */
17216#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17217choke me
17218#else
19650fd6
AS
17219char (*f) () = $ac_func;
17220#endif
17221#ifdef __cplusplus
17222}
087121cc
GM
17223#endif
17224
19650fd6
AS
17225int
17226main ()
17227{
17228return f != $ac_func;
503d2be0
AS
17229 ;
17230 return 0;
17231}
17232_ACEOF
17233rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17234if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 17235 (eval $ac_link) 2>conftest.er1
503d2be0 17236 ac_status=$?
edfaf76d
LK
17237 grep -v '^ *+' conftest.er1 >conftest.err
17238 rm -f conftest.er1
17239 cat conftest.err >&5
c0d27fcc 17240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17241 (exit $ac_status); } &&
edfaf76d
LK
17242 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17244 (eval $ac_try) 2>&5
17245 ac_status=$?
17246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17247 (exit $ac_status); }; } &&
17248 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17250 (eval $ac_try) 2>&5
17251 ac_status=$?
c0d27fcc 17252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17253 (exit $ac_status); }; }; then
17254 eval "$as_ac_var=yes"
17255else
17256 echo "$as_me: failed program was:" >&5
19650fd6
AS
17257sed 's/^/| /' conftest.$ac_ext >&5
17258
503d2be0
AS
17259eval "$as_ac_var=no"
17260fi
edfaf76d
LK
17261rm -f conftest.err conftest.$ac_objext \
17262 conftest$ac_exeext conftest.$ac_ext
503d2be0 17263fi
c0d27fcc 17264echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
17265echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17266if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17267 cat >>confdefs.h <<_ACEOF
503d2be0 17268#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17269_ACEOF
087121cc 17270
087121cc
GM
17271fi
17272done
17273
c0d27fcc 17274
ba4481b5
DL
17275# Check this now, so that we will NOT find the above functions in ncurses.
17276# That is because we have not set up to link ncurses in lib-src.
17277# It's better to believe a function is not available
17278# than to expect to find it in ncurses.
503d2be0 17279
c0d27fcc 17280echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
503d2be0
AS
17281echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6
17282if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
17283 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17284else
503d2be0 17285 ac_check_lib_save_LIBS=$LIBS
ba4481b5 17286LIBS="-lncurses $LIBS"
503d2be0 17287cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17288/* confdefs.h. */
17289_ACEOF
17290cat confdefs.h >>conftest.$ac_ext
17291cat >>conftest.$ac_ext <<_ACEOF
17292/* end confdefs.h. */
503d2be0 17293
ba4481b5 17294/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17295#ifdef __cplusplus
17296extern "C"
17297#endif
ba4481b5 17298/* We use char because int might match the return type of a gcc2
503d2be0
AS
17299 builtin and then its argument prototype would still apply. */
17300char tparm ();
17301int
17302main ()
17303{
17304tparm ();
17305 ;
17306 return 0;
17307}
17308_ACEOF
17309rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17310if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 17311 (eval $ac_link) 2>conftest.er1
503d2be0 17312 ac_status=$?
edfaf76d
LK
17313 grep -v '^ *+' conftest.er1 >conftest.err
17314 rm -f conftest.er1
17315 cat conftest.err >&5
c0d27fcc 17316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17317 (exit $ac_status); } &&
edfaf76d
LK
17318 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17320 (eval $ac_try) 2>&5
17321 ac_status=$?
17322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17323 (exit $ac_status); }; } &&
17324 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17326 (eval $ac_try) 2>&5
17327 ac_status=$?
c0d27fcc 17328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17329 (exit $ac_status); }; }; then
17330 ac_cv_lib_ncurses_tparm=yes
17331else
17332 echo "$as_me: failed program was:" >&5
19650fd6
AS
17333sed 's/^/| /' conftest.$ac_ext >&5
17334
503d2be0
AS
17335ac_cv_lib_ncurses_tparm=no
17336fi
edfaf76d
LK
17337rm -f conftest.err conftest.$ac_objext \
17338 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17339LIBS=$ac_check_lib_save_LIBS
17340fi
c0d27fcc 17341echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
503d2be0
AS
17342echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6
17343if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 17344 cat >>confdefs.h <<_ACEOF
503d2be0 17345#define HAVE_LIBNCURSES 1
c0d27fcc 17346_ACEOF
ba4481b5
DL
17347
17348 LIBS="-lncurses $LIBS"
17349
ba4481b5
DL
17350fi
17351
c0d27fcc 17352
84e70f78
KR
17353# Do we need the Hesiod library to provide the support routines?
17354if test "$with_hesiod" = yes ; then
17355 # Don't set $LIBS here -- see comments above.
17356 resolv=no
c0d27fcc 17357 echo "$as_me:$LINENO: checking for res_send" >&5
84e70f78
KR
17358echo $ECHO_N "checking for res_send... $ECHO_C" >&6
17359if test "${ac_cv_func_res_send+set}" = set; then
17360 echo $ECHO_N "(cached) $ECHO_C" >&6
17361else
17362 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17363/* confdefs.h. */
17364_ACEOF
17365cat confdefs.h >>conftest.$ac_ext
17366cat >>conftest.$ac_ext <<_ACEOF
17367/* end confdefs.h. */
edfaf76d
LK
17368/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
17369 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17370#define res_send innocuous_res_send
17371
84e70f78 17372/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17373 which can conflict with char res_send (); below.
17374 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17375 <limits.h> exists even on freestanding compilers. */
edfaf76d 17376
19650fd6
AS
17377#ifdef __STDC__
17378# include <limits.h>
17379#else
17380# include <assert.h>
17381#endif
edfaf76d
LK
17382
17383#undef res_send
17384
84e70f78
KR
17385/* Override any gcc2 internal prototype to avoid an error. */
17386#ifdef __cplusplus
17387extern "C"
19650fd6 17388{
84e70f78
KR
17389#endif
17390/* We use char because int might match the return type of a gcc2
17391 builtin and then its argument prototype would still apply. */
17392char res_send ();
84e70f78
KR
17393/* The GNU C library defines this for functions which it implements
17394 to always fail with ENOSYS. Some functions are actually named
17395 something starting with __ and the normal name is an alias. */
17396#if defined (__stub_res_send) || defined (__stub___res_send)
17397choke me
17398#else
19650fd6
AS
17399char (*f) () = res_send;
17400#endif
17401#ifdef __cplusplus
17402}
cd958eb3
MB
17403#endif
17404
19650fd6
AS
17405int
17406main ()
17407{
17408return f != res_send;
84e70f78
KR
17409 ;
17410 return 0;
17411}
17412_ACEOF
17413rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17414if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 17415 (eval $ac_link) 2>conftest.er1
84e70f78 17416 ac_status=$?
edfaf76d
LK
17417 grep -v '^ *+' conftest.er1 >conftest.err
17418 rm -f conftest.er1
17419 cat conftest.err >&5
c0d27fcc 17420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17421 (exit $ac_status); } &&
edfaf76d
LK
17422 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17424 (eval $ac_try) 2>&5
17425 ac_status=$?
17426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17427 (exit $ac_status); }; } &&
17428 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17430 (eval $ac_try) 2>&5
17431 ac_status=$?
c0d27fcc 17432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17433 (exit $ac_status); }; }; then
17434 ac_cv_func_res_send=yes
17435else
17436 echo "$as_me: failed program was:" >&5
19650fd6
AS
17437sed 's/^/| /' conftest.$ac_ext >&5
17438
84e70f78
KR
17439ac_cv_func_res_send=no
17440fi
edfaf76d
LK
17441rm -f conftest.err conftest.$ac_objext \
17442 conftest$ac_exeext conftest.$ac_ext
84e70f78 17443fi
c0d27fcc 17444echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
84e70f78
KR
17445echo "${ECHO_T}$ac_cv_func_res_send" >&6
17446if test $ac_cv_func_res_send = yes; then
17447 :
17448else
c0d27fcc 17449 echo "$as_me:$LINENO: checking for __res_send" >&5
84e70f78
KR
17450echo $ECHO_N "checking for __res_send... $ECHO_C" >&6
17451if test "${ac_cv_func___res_send+set}" = set; then
17452 echo $ECHO_N "(cached) $ECHO_C" >&6
17453else
17454 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17455/* confdefs.h. */
17456_ACEOF
17457cat confdefs.h >>conftest.$ac_ext
17458cat >>conftest.$ac_ext <<_ACEOF
17459/* end confdefs.h. */
edfaf76d
LK
17460/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
17461 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17462#define __res_send innocuous___res_send
17463
84e70f78 17464/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17465 which can conflict with char __res_send (); below.
17466 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17467 <limits.h> exists even on freestanding compilers. */
edfaf76d 17468
19650fd6
AS
17469#ifdef __STDC__
17470# include <limits.h>
17471#else
17472# include <assert.h>
17473#endif
edfaf76d
LK
17474
17475#undef __res_send
17476
84e70f78
KR
17477/* Override any gcc2 internal prototype to avoid an error. */
17478#ifdef __cplusplus
17479extern "C"
19650fd6 17480{
84e70f78
KR
17481#endif
17482/* We use char because int might match the return type of a gcc2
17483 builtin and then its argument prototype would still apply. */
17484char __res_send ();
84e70f78
KR
17485/* The GNU C library defines this for functions which it implements
17486 to always fail with ENOSYS. Some functions are actually named
17487 something starting with __ and the normal name is an alias. */
17488#if defined (__stub___res_send) || defined (__stub_____res_send)
17489choke me
17490#else
19650fd6
AS
17491char (*f) () = __res_send;
17492#endif
17493#ifdef __cplusplus
17494}
84e70f78
KR
17495#endif
17496
19650fd6
AS
17497int
17498main ()
17499{
17500return f != __res_send;
84e70f78
KR
17501 ;
17502 return 0;
17503}
17504_ACEOF
17505rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17506if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 17507 (eval $ac_link) 2>conftest.er1
84e70f78 17508 ac_status=$?
edfaf76d
LK
17509 grep -v '^ *+' conftest.er1 >conftest.err
17510 rm -f conftest.er1
17511 cat conftest.err >&5
c0d27fcc 17512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17513 (exit $ac_status); } &&
edfaf76d
LK
17514 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17516 (eval $ac_try) 2>&5
17517 ac_status=$?
17518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17519 (exit $ac_status); }; } &&
17520 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17522 (eval $ac_try) 2>&5
17523 ac_status=$?
c0d27fcc 17524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17525 (exit $ac_status); }; }; then
17526 ac_cv_func___res_send=yes
17527else
17528 echo "$as_me: failed program was:" >&5
19650fd6
AS
17529sed 's/^/| /' conftest.$ac_ext >&5
17530
84e70f78
KR
17531ac_cv_func___res_send=no
17532fi
edfaf76d
LK
17533rm -f conftest.err conftest.$ac_objext \
17534 conftest$ac_exeext conftest.$ac_ext
84e70f78 17535fi
c0d27fcc 17536echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
84e70f78
KR
17537echo "${ECHO_T}$ac_cv_func___res_send" >&6
17538if test $ac_cv_func___res_send = yes; then
17539 :
17540else
c0d27fcc 17541 echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
84e70f78
KR
17542echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6
17543if test "${ac_cv_lib_resolv_res_send+set}" = set; then
17544 echo $ECHO_N "(cached) $ECHO_C" >&6
17545else
17546 ac_check_lib_save_LIBS=$LIBS
17547LIBS="-lresolv $LIBS"
17548cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17549/* confdefs.h. */
17550_ACEOF
17551cat confdefs.h >>conftest.$ac_ext
17552cat >>conftest.$ac_ext <<_ACEOF
17553/* end confdefs.h. */
84e70f78
KR
17554
17555/* Override any gcc2 internal prototype to avoid an error. */
17556#ifdef __cplusplus
17557extern "C"
17558#endif
17559/* We use char because int might match the return type of a gcc2
17560 builtin and then its argument prototype would still apply. */
17561char res_send ();
17562int
17563main ()
17564{
17565res_send ();
17566 ;
17567 return 0;
17568}
17569_ACEOF
17570rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17571if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 17572 (eval $ac_link) 2>conftest.er1
84e70f78 17573 ac_status=$?
edfaf76d
LK
17574 grep -v '^ *+' conftest.er1 >conftest.err
17575 rm -f conftest.er1
17576 cat conftest.err >&5
c0d27fcc 17577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17578 (exit $ac_status); } &&
edfaf76d
LK
17579 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17581 (eval $ac_try) 2>&5
17582 ac_status=$?
17583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17584 (exit $ac_status); }; } &&
17585 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17587 (eval $ac_try) 2>&5
17588 ac_status=$?
c0d27fcc 17589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17590 (exit $ac_status); }; }; then
17591 ac_cv_lib_resolv_res_send=yes
17592else
17593 echo "$as_me: failed program was:" >&5
19650fd6
AS
17594sed 's/^/| /' conftest.$ac_ext >&5
17595
84e70f78
KR
17596ac_cv_lib_resolv_res_send=no
17597fi
edfaf76d
LK
17598rm -f conftest.err conftest.$ac_objext \
17599 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
17600LIBS=$ac_check_lib_save_LIBS
17601fi
c0d27fcc 17602echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
84e70f78
KR
17603echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6
17604if test $ac_cv_lib_resolv_res_send = yes; then
17605 resolv=yes
17606else
c0d27fcc 17607 echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
84e70f78
KR
17608echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6
17609if test "${ac_cv_lib_resolv___res_send+set}" = set; then
17610 echo $ECHO_N "(cached) $ECHO_C" >&6
17611else
17612 ac_check_lib_save_LIBS=$LIBS
17613LIBS="-lresolv $LIBS"
17614cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17615/* confdefs.h. */
17616_ACEOF
17617cat confdefs.h >>conftest.$ac_ext
17618cat >>conftest.$ac_ext <<_ACEOF
17619/* end confdefs.h. */
84e70f78
KR
17620
17621/* Override any gcc2 internal prototype to avoid an error. */
17622#ifdef __cplusplus
17623extern "C"
17624#endif
17625/* We use char because int might match the return type of a gcc2
17626 builtin and then its argument prototype would still apply. */
17627char __res_send ();
17628int
17629main ()
17630{
17631__res_send ();
17632 ;
17633 return 0;
17634}
17635_ACEOF
17636rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17637if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 17638 (eval $ac_link) 2>conftest.er1
84e70f78 17639 ac_status=$?
edfaf76d
LK
17640 grep -v '^ *+' conftest.er1 >conftest.err
17641 rm -f conftest.er1
17642 cat conftest.err >&5
c0d27fcc 17643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17644 (exit $ac_status); } &&
edfaf76d
LK
17645 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17647 (eval $ac_try) 2>&5
17648 ac_status=$?
17649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17650 (exit $ac_status); }; } &&
17651 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17653 (eval $ac_try) 2>&5
17654 ac_status=$?
c0d27fcc 17655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17656 (exit $ac_status); }; }; then
17657 ac_cv_lib_resolv___res_send=yes
17658else
17659 echo "$as_me: failed program was:" >&5
19650fd6
AS
17660sed 's/^/| /' conftest.$ac_ext >&5
17661
84e70f78
KR
17662ac_cv_lib_resolv___res_send=no
17663fi
edfaf76d
LK
17664rm -f conftest.err conftest.$ac_objext \
17665 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
17666LIBS=$ac_check_lib_save_LIBS
17667fi
c0d27fcc 17668echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
84e70f78
KR
17669echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6
17670if test $ac_cv_lib_resolv___res_send = yes; then
17671 resolv=yes
17672fi
17673
17674fi
17675
17676fi
17677
17678fi
17679
17680 if test "$resolv" = yes ; then
17681 RESOLVLIB=-lresolv
b936fae4 17682
c0d27fcc 17683cat >>confdefs.h <<\_ACEOF
84e70f78 17684#define HAVE_LIBRESOLV 1
c0d27fcc 17685_ACEOF
84e70f78
KR
17686
17687 else
17688 RESOLVLIB=
17689 fi
c0d27fcc 17690 echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
84e70f78
KR
17691echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6
17692if test "${ac_cv_func_hes_getmailhost+set}" = set; then
17693 echo $ECHO_N "(cached) $ECHO_C" >&6
17694else
17695 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17696/* confdefs.h. */
17697_ACEOF
17698cat confdefs.h >>conftest.$ac_ext
17699cat >>conftest.$ac_ext <<_ACEOF
17700/* end confdefs.h. */
edfaf76d
LK
17701/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
17702 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17703#define hes_getmailhost innocuous_hes_getmailhost
17704
84e70f78 17705/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17706 which can conflict with char hes_getmailhost (); below.
17707 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17708 <limits.h> exists even on freestanding compilers. */
edfaf76d 17709
19650fd6
AS
17710#ifdef __STDC__
17711# include <limits.h>
17712#else
17713# include <assert.h>
17714#endif
edfaf76d
LK
17715
17716#undef hes_getmailhost
17717
84e70f78
KR
17718/* Override any gcc2 internal prototype to avoid an error. */
17719#ifdef __cplusplus
17720extern "C"
19650fd6 17721{
84e70f78
KR
17722#endif
17723/* We use char because int might match the return type of a gcc2
17724 builtin and then its argument prototype would still apply. */
17725char hes_getmailhost ();
84e70f78
KR
17726/* The GNU C library defines this for functions which it implements
17727 to always fail with ENOSYS. Some functions are actually named
17728 something starting with __ and the normal name is an alias. */
17729#if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
17730choke me
17731#else
19650fd6
AS
17732char (*f) () = hes_getmailhost;
17733#endif
17734#ifdef __cplusplus
17735}
cd958eb3
MB
17736#endif
17737
19650fd6
AS
17738int
17739main ()
17740{
17741return f != hes_getmailhost;
84e70f78
KR
17742 ;
17743 return 0;
17744}
17745_ACEOF
17746rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17747if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 17748 (eval $ac_link) 2>conftest.er1
84e70f78 17749 ac_status=$?
edfaf76d
LK
17750 grep -v '^ *+' conftest.er1 >conftest.err
17751 rm -f conftest.er1
17752 cat conftest.err >&5
c0d27fcc 17753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17754 (exit $ac_status); } &&
edfaf76d
LK
17755 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17757 (eval $ac_try) 2>&5
17758 ac_status=$?
17759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17760 (exit $ac_status); }; } &&
17761 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17763 (eval $ac_try) 2>&5
17764 ac_status=$?
c0d27fcc 17765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17766 (exit $ac_status); }; }; then
17767 ac_cv_func_hes_getmailhost=yes
17768else
17769 echo "$as_me: failed program was:" >&5
19650fd6
AS
17770sed 's/^/| /' conftest.$ac_ext >&5
17771
84e70f78
KR
17772ac_cv_func_hes_getmailhost=no
17773fi
edfaf76d
LK
17774rm -f conftest.err conftest.$ac_objext \
17775 conftest$ac_exeext conftest.$ac_ext
84e70f78 17776fi
c0d27fcc 17777echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
84e70f78
KR
17778echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6
17779if test $ac_cv_func_hes_getmailhost = yes; then
17780 :
17781else
c0d27fcc 17782 echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
84e70f78
KR
17783echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6
17784if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
17785 echo $ECHO_N "(cached) $ECHO_C" >&6
17786else
17787 ac_check_lib_save_LIBS=$LIBS
17788LIBS="-lhesiod $RESOLVLIB $LIBS"
17789cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17790/* confdefs.h. */
17791_ACEOF
17792cat confdefs.h >>conftest.$ac_ext
17793cat >>conftest.$ac_ext <<_ACEOF
17794/* end confdefs.h. */
84e70f78
KR
17795
17796/* Override any gcc2 internal prototype to avoid an error. */
17797#ifdef __cplusplus
17798extern "C"
17799#endif
17800/* We use char because int might match the return type of a gcc2
17801 builtin and then its argument prototype would still apply. */
17802char hes_getmailhost ();
17803int
17804main ()
17805{
17806hes_getmailhost ();
17807 ;
17808 return 0;
17809}
17810_ACEOF
17811rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17812if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 17813 (eval $ac_link) 2>conftest.er1
84e70f78 17814 ac_status=$?
edfaf76d
LK
17815 grep -v '^ *+' conftest.er1 >conftest.err
17816 rm -f conftest.er1
17817 cat conftest.err >&5
c0d27fcc 17818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17819 (exit $ac_status); } &&
edfaf76d
LK
17820 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17822 (eval $ac_try) 2>&5
17823 ac_status=$?
17824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17825 (exit $ac_status); }; } &&
17826 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17828 (eval $ac_try) 2>&5
17829 ac_status=$?
c0d27fcc 17830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17831 (exit $ac_status); }; }; then
17832 ac_cv_lib_hesiod_hes_getmailhost=yes
17833else
17834 echo "$as_me: failed program was:" >&5
19650fd6
AS
17835sed 's/^/| /' conftest.$ac_ext >&5
17836
84e70f78
KR
17837ac_cv_lib_hesiod_hes_getmailhost=no
17838fi
edfaf76d
LK
17839rm -f conftest.err conftest.$ac_objext \
17840 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
17841LIBS=$ac_check_lib_save_LIBS
17842fi
c0d27fcc 17843echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
84e70f78
KR
17844echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6
17845if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 17846
c0d27fcc 17847cat >>confdefs.h <<\_ACEOF
84e70f78 17848#define HAVE_LIBHESIOD 1
c0d27fcc 17849_ACEOF
84e70f78
KR
17850
17851else
17852 :
17853fi
17854
17855fi
17856
17857fi
17858
a21616bd
KR
17859# These tell us which Kerberos-related libraries to use.
17860if test "${with_kerberos+set}" = set; then
503d2be0 17861
c0d27fcc 17862echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
503d2be0
AS
17863echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
17864if test "${ac_cv_lib_com_err_com_err+set}" = set; then
17865 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 17866else
503d2be0 17867 ac_check_lib_save_LIBS=$LIBS
a21616bd 17868LIBS="-lcom_err $LIBS"
503d2be0 17869cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17870/* confdefs.h. */
17871_ACEOF
17872cat confdefs.h >>conftest.$ac_ext
17873cat >>conftest.$ac_ext <<_ACEOF
17874/* end confdefs.h. */
503d2be0 17875
a21616bd 17876/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17877#ifdef __cplusplus
17878extern "C"
17879#endif
a21616bd 17880/* We use char because int might match the return type of a gcc2
503d2be0
AS
17881 builtin and then its argument prototype would still apply. */
17882char com_err ();
17883int
17884main ()
17885{
17886com_err ();
17887 ;
17888 return 0;
17889}
17890_ACEOF
17891rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17892if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 17893 (eval $ac_link) 2>conftest.er1
503d2be0 17894 ac_status=$?
edfaf76d
LK
17895 grep -v '^ *+' conftest.er1 >conftest.err
17896 rm -f conftest.er1
17897 cat conftest.err >&5
c0d27fcc 17898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17899 (exit $ac_status); } &&
edfaf76d
LK
17900 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17902 (eval $ac_try) 2>&5
17903 ac_status=$?
17904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17905 (exit $ac_status); }; } &&
17906 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17908 (eval $ac_try) 2>&5
17909 ac_status=$?
c0d27fcc 17910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17911 (exit $ac_status); }; }; then
17912 ac_cv_lib_com_err_com_err=yes
17913else
17914 echo "$as_me: failed program was:" >&5
19650fd6
AS
17915sed 's/^/| /' conftest.$ac_ext >&5
17916
503d2be0
AS
17917ac_cv_lib_com_err_com_err=no
17918fi
edfaf76d
LK
17919rm -f conftest.err conftest.$ac_objext \
17920 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17921LIBS=$ac_check_lib_save_LIBS
17922fi
c0d27fcc 17923echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
503d2be0
AS
17924echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
17925if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 17926 cat >>confdefs.h <<_ACEOF
503d2be0 17927#define HAVE_LIBCOM_ERR 1
c0d27fcc 17928_ACEOF
a21616bd
KR
17929
17930 LIBS="-lcom_err $LIBS"
17931
a21616bd
KR
17932fi
17933
c0d27fcc
MR
17934
17935echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
503d2be0
AS
17936echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6
17937if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
17938 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 17939else
503d2be0 17940 ac_check_lib_save_LIBS=$LIBS
a21616bd 17941LIBS="-lk5crypto $LIBS"
503d2be0 17942cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17943/* confdefs.h. */
17944_ACEOF
17945cat confdefs.h >>conftest.$ac_ext
17946cat >>conftest.$ac_ext <<_ACEOF
17947/* end confdefs.h. */
503d2be0 17948
a21616bd 17949/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17950#ifdef __cplusplus
17951extern "C"
17952#endif
a21616bd 17953/* We use char because int might match the return type of a gcc2
503d2be0
AS
17954 builtin and then its argument prototype would still apply. */
17955char mit_des_cbc_encrypt ();
17956int
17957main ()
17958{
17959mit_des_cbc_encrypt ();
17960 ;
17961 return 0;
17962}
17963_ACEOF
17964rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17965if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 17966 (eval $ac_link) 2>conftest.er1
503d2be0 17967 ac_status=$?
edfaf76d
LK
17968 grep -v '^ *+' conftest.er1 >conftest.err
17969 rm -f conftest.er1
17970 cat conftest.err >&5
c0d27fcc 17971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17972 (exit $ac_status); } &&
edfaf76d
LK
17973 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17975 (eval $ac_try) 2>&5
17976 ac_status=$?
17977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17978 (exit $ac_status); }; } &&
17979 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17981 (eval $ac_try) 2>&5
17982 ac_status=$?
c0d27fcc 17983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17984 (exit $ac_status); }; }; then
17985 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
17986else
17987 echo "$as_me: failed program was:" >&5
19650fd6
AS
17988sed 's/^/| /' conftest.$ac_ext >&5
17989
503d2be0
AS
17990ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
17991fi
edfaf76d
LK
17992rm -f conftest.err conftest.$ac_objext \
17993 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17994LIBS=$ac_check_lib_save_LIBS
17995fi
c0d27fcc 17996echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
17997echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6
17998if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 17999 cat >>confdefs.h <<_ACEOF
503d2be0 18000#define HAVE_LIBK5CRYPTO 1
c0d27fcc 18001_ACEOF
a21616bd
KR
18002
18003 LIBS="-lk5crypto $LIBS"
18004
a21616bd
KR
18005fi
18006
c0d27fcc
MR
18007
18008echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
503d2be0
AS
18009echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6
18010if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
18011 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18012else
503d2be0 18013 ac_check_lib_save_LIBS=$LIBS
a21616bd 18014LIBS="-lcrypto $LIBS"
503d2be0 18015cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18016/* confdefs.h. */
18017_ACEOF
18018cat confdefs.h >>conftest.$ac_ext
18019cat >>conftest.$ac_ext <<_ACEOF
18020/* end confdefs.h. */
503d2be0 18021
a21616bd 18022/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18023#ifdef __cplusplus
18024extern "C"
18025#endif
a21616bd 18026/* We use char because int might match the return type of a gcc2
503d2be0
AS
18027 builtin and then its argument prototype would still apply. */
18028char mit_des_cbc_encrypt ();
18029int
18030main ()
18031{
18032mit_des_cbc_encrypt ();
18033 ;
18034 return 0;
18035}
18036_ACEOF
18037rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18038if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18039 (eval $ac_link) 2>conftest.er1
503d2be0 18040 ac_status=$?
edfaf76d
LK
18041 grep -v '^ *+' conftest.er1 >conftest.err
18042 rm -f conftest.er1
18043 cat conftest.err >&5
c0d27fcc 18044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18045 (exit $ac_status); } &&
edfaf76d
LK
18046 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18048 (eval $ac_try) 2>&5
18049 ac_status=$?
18050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18051 (exit $ac_status); }; } &&
18052 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18054 (eval $ac_try) 2>&5
18055 ac_status=$?
c0d27fcc 18056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18057 (exit $ac_status); }; }; then
18058 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
18059else
18060 echo "$as_me: failed program was:" >&5
19650fd6
AS
18061sed 's/^/| /' conftest.$ac_ext >&5
18062
503d2be0
AS
18063ac_cv_lib_crypto_mit_des_cbc_encrypt=no
18064fi
edfaf76d
LK
18065rm -f conftest.err conftest.$ac_objext \
18066 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18067LIBS=$ac_check_lib_save_LIBS
18068fi
c0d27fcc 18069echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
18070echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6
18071if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 18072 cat >>confdefs.h <<_ACEOF
503d2be0 18073#define HAVE_LIBCRYPTO 1
c0d27fcc 18074_ACEOF
a21616bd
KR
18075
18076 LIBS="-lcrypto $LIBS"
18077
a21616bd
KR
18078fi
18079
c0d27fcc
MR
18080
18081echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
503d2be0
AS
18082echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6
18083if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
18084 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18085else
503d2be0 18086 ac_check_lib_save_LIBS=$LIBS
a21616bd 18087LIBS="-lkrb5 $LIBS"
503d2be0 18088cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18089/* confdefs.h. */
18090_ACEOF
18091cat confdefs.h >>conftest.$ac_ext
18092cat >>conftest.$ac_ext <<_ACEOF
18093/* end confdefs.h. */
a21616bd 18094
503d2be0
AS
18095/* Override any gcc2 internal prototype to avoid an error. */
18096#ifdef __cplusplus
18097extern "C"
18098#endif
18099/* We use char because int might match the return type of a gcc2
18100 builtin and then its argument prototype would still apply. */
18101char krb5_init_context ();
18102int
18103main ()
18104{
18105krb5_init_context ();
18106 ;
18107 return 0;
18108}
18109_ACEOF
18110rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18111if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18112 (eval $ac_link) 2>conftest.er1
503d2be0 18113 ac_status=$?
edfaf76d
LK
18114 grep -v '^ *+' conftest.er1 >conftest.err
18115 rm -f conftest.er1
18116 cat conftest.err >&5
c0d27fcc 18117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18118 (exit $ac_status); } &&
edfaf76d
LK
18119 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18121 (eval $ac_try) 2>&5
18122 ac_status=$?
18123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18124 (exit $ac_status); }; } &&
18125 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18127 (eval $ac_try) 2>&5
18128 ac_status=$?
c0d27fcc 18129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18130 (exit $ac_status); }; }; then
18131 ac_cv_lib_krb5_krb5_init_context=yes
18132else
18133 echo "$as_me: failed program was:" >&5
19650fd6
AS
18134sed 's/^/| /' conftest.$ac_ext >&5
18135
503d2be0
AS
18136ac_cv_lib_krb5_krb5_init_context=no
18137fi
edfaf76d
LK
18138rm -f conftest.err conftest.$ac_objext \
18139 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18140LIBS=$ac_check_lib_save_LIBS
18141fi
c0d27fcc 18142echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
503d2be0
AS
18143echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6
18144if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 18145 cat >>confdefs.h <<_ACEOF
503d2be0 18146#define HAVE_LIBKRB5 1
c0d27fcc 18147_ACEOF
a21616bd
KR
18148
18149 LIBS="-lkrb5 $LIBS"
18150
a21616bd
KR
18151fi
18152
18153 if test "${with_kerberos5+set}" != set; then
503d2be0 18154
c0d27fcc 18155echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
503d2be0
AS
18156echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
18157if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
18158 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18159else
503d2be0 18160 ac_check_lib_save_LIBS=$LIBS
a21616bd 18161LIBS="-ldes425 $LIBS"
503d2be0 18162cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18163/* confdefs.h. */
18164_ACEOF
18165cat confdefs.h >>conftest.$ac_ext
18166cat >>conftest.$ac_ext <<_ACEOF
18167/* end confdefs.h. */
503d2be0 18168
a21616bd 18169/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18170#ifdef __cplusplus
18171extern "C"
18172#endif
a21616bd 18173/* We use char because int might match the return type of a gcc2
503d2be0
AS
18174 builtin and then its argument prototype would still apply. */
18175char des_cbc_encrypt ();
18176int
18177main ()
18178{
18179des_cbc_encrypt ();
18180 ;
18181 return 0;
18182}
18183_ACEOF
18184rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18185if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18186 (eval $ac_link) 2>conftest.er1
503d2be0 18187 ac_status=$?
edfaf76d
LK
18188 grep -v '^ *+' conftest.er1 >conftest.err
18189 rm -f conftest.er1
18190 cat conftest.err >&5
c0d27fcc 18191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18192 (exit $ac_status); } &&
edfaf76d
LK
18193 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18195 (eval $ac_try) 2>&5
18196 ac_status=$?
18197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18198 (exit $ac_status); }; } &&
18199 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18201 (eval $ac_try) 2>&5
18202 ac_status=$?
c0d27fcc 18203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18204 (exit $ac_status); }; }; then
18205 ac_cv_lib_des425_des_cbc_encrypt=yes
18206else
18207 echo "$as_me: failed program was:" >&5
19650fd6
AS
18208sed 's/^/| /' conftest.$ac_ext >&5
18209
503d2be0
AS
18210ac_cv_lib_des425_des_cbc_encrypt=no
18211fi
edfaf76d
LK
18212rm -f conftest.err conftest.$ac_objext \
18213 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18214LIBS=$ac_check_lib_save_LIBS
18215fi
c0d27fcc 18216echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
503d2be0
AS
18217echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
18218if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 18219 cat >>confdefs.h <<_ACEOF
503d2be0 18220#define HAVE_LIBDES425 1
c0d27fcc 18221_ACEOF
a21616bd
KR
18222
18223 LIBS="-ldes425 $LIBS"
18224
18225else
503d2be0 18226
c0d27fcc 18227echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
503d2be0
AS
18228echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
18229if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
18230 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18231else
503d2be0 18232 ac_check_lib_save_LIBS=$LIBS
a21616bd 18233LIBS="-ldes $LIBS"
503d2be0 18234cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18235/* confdefs.h. */
18236_ACEOF
18237cat confdefs.h >>conftest.$ac_ext
18238cat >>conftest.$ac_ext <<_ACEOF
18239/* end confdefs.h. */
503d2be0 18240
a21616bd 18241/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18242#ifdef __cplusplus
18243extern "C"
18244#endif
a21616bd 18245/* We use char because int might match the return type of a gcc2
503d2be0
AS
18246 builtin and then its argument prototype would still apply. */
18247char des_cbc_encrypt ();
18248int
18249main ()
18250{
18251des_cbc_encrypt ();
18252 ;
18253 return 0;
18254}
18255_ACEOF
18256rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18257if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18258 (eval $ac_link) 2>conftest.er1
503d2be0 18259 ac_status=$?
edfaf76d
LK
18260 grep -v '^ *+' conftest.er1 >conftest.err
18261 rm -f conftest.er1
18262 cat conftest.err >&5
c0d27fcc 18263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18264 (exit $ac_status); } &&
edfaf76d
LK
18265 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18267 (eval $ac_try) 2>&5
18268 ac_status=$?
18269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18270 (exit $ac_status); }; } &&
18271 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18273 (eval $ac_try) 2>&5
18274 ac_status=$?
c0d27fcc 18275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18276 (exit $ac_status); }; }; then
18277 ac_cv_lib_des_des_cbc_encrypt=yes
18278else
18279 echo "$as_me: failed program was:" >&5
19650fd6
AS
18280sed 's/^/| /' conftest.$ac_ext >&5
18281
503d2be0
AS
18282ac_cv_lib_des_des_cbc_encrypt=no
18283fi
edfaf76d
LK
18284rm -f conftest.err conftest.$ac_objext \
18285 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18286LIBS=$ac_check_lib_save_LIBS
18287fi
c0d27fcc 18288echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
503d2be0
AS
18289echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
18290if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 18291 cat >>confdefs.h <<_ACEOF
503d2be0 18292#define HAVE_LIBDES 1
c0d27fcc 18293_ACEOF
a21616bd
KR
18294
18295 LIBS="-ldes $LIBS"
18296
a21616bd
KR
18297fi
18298
18299fi
18300
c0d27fcc
MR
18301
18302echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
503d2be0
AS
18303echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6
18304if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
18305 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18306else
503d2be0 18307 ac_check_lib_save_LIBS=$LIBS
a21616bd 18308LIBS="-lkrb4 $LIBS"
503d2be0 18309cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18310/* confdefs.h. */
18311_ACEOF
18312cat confdefs.h >>conftest.$ac_ext
18313cat >>conftest.$ac_ext <<_ACEOF
18314/* end confdefs.h. */
503d2be0 18315
a21616bd 18316/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18317#ifdef __cplusplus
18318extern "C"
18319#endif
a21616bd 18320/* We use char because int might match the return type of a gcc2
503d2be0
AS
18321 builtin and then its argument prototype would still apply. */
18322char krb_get_cred ();
18323int
18324main ()
18325{
18326krb_get_cred ();
18327 ;
18328 return 0;
18329}
18330_ACEOF
18331rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18332if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18333 (eval $ac_link) 2>conftest.er1
503d2be0 18334 ac_status=$?
edfaf76d
LK
18335 grep -v '^ *+' conftest.er1 >conftest.err
18336 rm -f conftest.er1
18337 cat conftest.err >&5
c0d27fcc 18338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18339 (exit $ac_status); } &&
edfaf76d
LK
18340 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18342 (eval $ac_try) 2>&5
18343 ac_status=$?
18344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18345 (exit $ac_status); }; } &&
18346 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18348 (eval $ac_try) 2>&5
18349 ac_status=$?
c0d27fcc 18350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18351 (exit $ac_status); }; }; then
18352 ac_cv_lib_krb4_krb_get_cred=yes
18353else
18354 echo "$as_me: failed program was:" >&5
19650fd6
AS
18355sed 's/^/| /' conftest.$ac_ext >&5
18356
503d2be0
AS
18357ac_cv_lib_krb4_krb_get_cred=no
18358fi
edfaf76d
LK
18359rm -f conftest.err conftest.$ac_objext \
18360 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18361LIBS=$ac_check_lib_save_LIBS
18362fi
c0d27fcc 18363echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
503d2be0
AS
18364echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6
18365if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 18366 cat >>confdefs.h <<_ACEOF
503d2be0 18367#define HAVE_LIBKRB4 1
c0d27fcc 18368_ACEOF
a21616bd
KR
18369
18370 LIBS="-lkrb4 $LIBS"
18371
18372else
503d2be0 18373
c0d27fcc 18374echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
503d2be0
AS
18375echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6
18376if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
18377 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18378else
503d2be0 18379 ac_check_lib_save_LIBS=$LIBS
a21616bd 18380LIBS="-lkrb $LIBS"
503d2be0 18381cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18382/* confdefs.h. */
18383_ACEOF
18384cat confdefs.h >>conftest.$ac_ext
18385cat >>conftest.$ac_ext <<_ACEOF
18386/* end confdefs.h. */
503d2be0 18387
a21616bd 18388/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18389#ifdef __cplusplus
18390extern "C"
18391#endif
a21616bd 18392/* We use char because int might match the return type of a gcc2
503d2be0
AS
18393 builtin and then its argument prototype would still apply. */
18394char krb_get_cred ();
18395int
18396main ()
18397{
18398krb_get_cred ();
18399 ;
18400 return 0;
18401}
18402_ACEOF
18403rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18404if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18405 (eval $ac_link) 2>conftest.er1
503d2be0 18406 ac_status=$?
edfaf76d
LK
18407 grep -v '^ *+' conftest.er1 >conftest.err
18408 rm -f conftest.er1
18409 cat conftest.err >&5
c0d27fcc 18410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18411 (exit $ac_status); } &&
edfaf76d
LK
18412 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18414 (eval $ac_try) 2>&5
18415 ac_status=$?
18416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18417 (exit $ac_status); }; } &&
18418 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18420 (eval $ac_try) 2>&5
18421 ac_status=$?
c0d27fcc 18422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18423 (exit $ac_status); }; }; then
18424 ac_cv_lib_krb_krb_get_cred=yes
18425else
18426 echo "$as_me: failed program was:" >&5
19650fd6
AS
18427sed 's/^/| /' conftest.$ac_ext >&5
18428
503d2be0
AS
18429ac_cv_lib_krb_krb_get_cred=no
18430fi
edfaf76d
LK
18431rm -f conftest.err conftest.$ac_objext \
18432 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18433LIBS=$ac_check_lib_save_LIBS
18434fi
c0d27fcc 18435echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
503d2be0
AS
18436echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6
18437if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 18438 cat >>confdefs.h <<_ACEOF
503d2be0 18439#define HAVE_LIBKRB 1
c0d27fcc 18440_ACEOF
a21616bd
KR
18441
18442 LIBS="-lkrb $LIBS"
18443
a21616bd
KR
18444fi
18445
18446fi
18447
18448 fi
18449
18450 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
18451
18452for ac_header in krb5.h
a21616bd 18453do
503d2be0 18454as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18455if eval "test \"\${$as_ac_Header+set}\" = set"; then
18456 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18457echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18458if eval "test \"\${$as_ac_Header+set}\" = set"; then
18459 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18460fi
18461echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18462echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18463else
c0d27fcc
MR
18464 # Is the header compilable?
18465echo "$as_me:$LINENO: checking $ac_header usability" >&5
18466echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18467cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18468/* confdefs.h. */
18469_ACEOF
18470cat confdefs.h >>conftest.$ac_ext
18471cat >>conftest.$ac_ext <<_ACEOF
18472/* end confdefs.h. */
c0d27fcc
MR
18473$ac_includes_default
18474#include <$ac_header>
18475_ACEOF
18476rm -f conftest.$ac_objext
18477if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 18478 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18479 ac_status=$?
edfaf76d
LK
18480 grep -v '^ *+' conftest.er1 >conftest.err
18481 rm -f conftest.er1
18482 cat conftest.err >&5
c0d27fcc
MR
18483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18484 (exit $ac_status); } &&
edfaf76d
LK
18485 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18487 (eval $ac_try) 2>&5
18488 ac_status=$?
18489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18490 (exit $ac_status); }; } &&
18491 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18493 (eval $ac_try) 2>&5
18494 ac_status=$?
18495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18496 (exit $ac_status); }; }; then
18497 ac_header_compiler=yes
18498else
18499 echo "$as_me: failed program was:" >&5
19650fd6
AS
18500sed 's/^/| /' conftest.$ac_ext >&5
18501
c0d27fcc
MR
18502ac_header_compiler=no
18503fi
edfaf76d 18504rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18505echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18506echo "${ECHO_T}$ac_header_compiler" >&6
18507
18508# Is the header present?
18509echo "$as_me:$LINENO: checking $ac_header presence" >&5
18510echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18511cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18512/* confdefs.h. */
18513_ACEOF
18514cat confdefs.h >>conftest.$ac_ext
18515cat >>conftest.$ac_ext <<_ACEOF
18516/* end confdefs.h. */
503d2be0
AS
18517#include <$ac_header>
18518_ACEOF
c0d27fcc 18519if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18520 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18521 ac_status=$?
6bae0ccf 18522 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18523 rm -f conftest.er1
18524 cat conftest.err >&5
c0d27fcc 18525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18526 (exit $ac_status); } >/dev/null; then
18527 if test -s conftest.err; then
18528 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 18529 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18530 else
18531 ac_cpp_err=
18532 fi
18533else
18534 ac_cpp_err=yes
18535fi
18536if test -z "$ac_cpp_err"; then
c0d27fcc 18537 ac_header_preproc=yes
503d2be0
AS
18538else
18539 echo "$as_me: failed program was:" >&5
19650fd6
AS
18540sed 's/^/| /' conftest.$ac_ext >&5
18541
c0d27fcc 18542 ac_header_preproc=no
a21616bd 18543fi
503d2be0 18544rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18545echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18546echo "${ECHO_T}$ac_header_preproc" >&6
18547
18548# So? What about this header?
edfaf76d
LK
18549case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18550 yes:no: )
c0d27fcc
MR
18551 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18552echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18553 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18554echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18555 ac_header_preproc=yes
19650fd6 18556 ;;
edfaf76d 18557 no:yes:* )
c0d27fcc
MR
18558 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18559echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18560 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18561echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18562 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18563echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18564 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18565echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18566 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18567echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18568 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18569echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
18570 (
18571 cat <<\_ASBOX
edfaf76d
LK
18572## ------------------------------------------ ##
18573## Report this to the AC_PACKAGE_NAME lists. ##
18574## ------------------------------------------ ##
19650fd6
AS
18575_ASBOX
18576 ) |
18577 sed "s/^/$as_me: WARNING: /" >&2
18578 ;;
c0d27fcc
MR
18579esac
18580echo "$as_me:$LINENO: checking for $ac_header" >&5
18581echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18582if eval "test \"\${$as_ac_Header+set}\" = set"; then
18583 echo $ECHO_N "(cached) $ECHO_C" >&6
18584else
edfaf76d 18585 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 18586fi
c0d27fcc 18587echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 18588echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
18589
18590fi
503d2be0 18591if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18592 cat >>confdefs.h <<_ACEOF
503d2be0 18593#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18594_ACEOF
503d2be0 18595
a21616bd 18596fi
c0d27fcc 18597
a21616bd
KR
18598done
18599
18600 else
503d2be0
AS
18601
18602for ac_header in des.h
a21616bd 18603do
503d2be0 18604as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18605if eval "test \"\${$as_ac_Header+set}\" = set"; then
18606 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18607echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18608if eval "test \"\${$as_ac_Header+set}\" = set"; then
18609 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18610fi
18611echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18612echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18613else
c0d27fcc
MR
18614 # Is the header compilable?
18615echo "$as_me:$LINENO: checking $ac_header usability" >&5
18616echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18617cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18618/* confdefs.h. */
18619_ACEOF
18620cat confdefs.h >>conftest.$ac_ext
18621cat >>conftest.$ac_ext <<_ACEOF
18622/* end confdefs.h. */
c0d27fcc
MR
18623$ac_includes_default
18624#include <$ac_header>
18625_ACEOF
18626rm -f conftest.$ac_objext
18627if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 18628 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18629 ac_status=$?
edfaf76d
LK
18630 grep -v '^ *+' conftest.er1 >conftest.err
18631 rm -f conftest.er1
18632 cat conftest.err >&5
c0d27fcc
MR
18633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18634 (exit $ac_status); } &&
edfaf76d
LK
18635 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18637 (eval $ac_try) 2>&5
18638 ac_status=$?
18639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18640 (exit $ac_status); }; } &&
18641 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18643 (eval $ac_try) 2>&5
18644 ac_status=$?
18645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18646 (exit $ac_status); }; }; then
18647 ac_header_compiler=yes
18648else
18649 echo "$as_me: failed program was:" >&5
19650fd6
AS
18650sed 's/^/| /' conftest.$ac_ext >&5
18651
c0d27fcc
MR
18652ac_header_compiler=no
18653fi
edfaf76d 18654rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18655echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18656echo "${ECHO_T}$ac_header_compiler" >&6
18657
18658# Is the header present?
18659echo "$as_me:$LINENO: checking $ac_header presence" >&5
18660echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18661cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18662/* confdefs.h. */
18663_ACEOF
18664cat confdefs.h >>conftest.$ac_ext
18665cat >>conftest.$ac_ext <<_ACEOF
18666/* end confdefs.h. */
503d2be0
AS
18667#include <$ac_header>
18668_ACEOF
c0d27fcc 18669if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18670 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18671 ac_status=$?
6bae0ccf 18672 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18673 rm -f conftest.er1
18674 cat conftest.err >&5
c0d27fcc 18675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18676 (exit $ac_status); } >/dev/null; then
18677 if test -s conftest.err; then
18678 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 18679 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18680 else
18681 ac_cpp_err=
18682 fi
18683else
18684 ac_cpp_err=yes
18685fi
18686if test -z "$ac_cpp_err"; then
c0d27fcc 18687 ac_header_preproc=yes
503d2be0
AS
18688else
18689 echo "$as_me: failed program was:" >&5
19650fd6
AS
18690sed 's/^/| /' conftest.$ac_ext >&5
18691
c0d27fcc 18692 ac_header_preproc=no
a21616bd 18693fi
503d2be0 18694rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18695echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18696echo "${ECHO_T}$ac_header_preproc" >&6
18697
18698# So? What about this header?
edfaf76d
LK
18699case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18700 yes:no: )
c0d27fcc
MR
18701 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18702echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18703 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18704echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18705 ac_header_preproc=yes
19650fd6 18706 ;;
edfaf76d 18707 no:yes:* )
c0d27fcc
MR
18708 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18709echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18710 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18711echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18712 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18713echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18714 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18715echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18716 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18717echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18718 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18719echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
18720 (
18721 cat <<\_ASBOX
edfaf76d
LK
18722## ------------------------------------------ ##
18723## Report this to the AC_PACKAGE_NAME lists. ##
18724## ------------------------------------------ ##
19650fd6
AS
18725_ASBOX
18726 ) |
18727 sed "s/^/$as_me: WARNING: /" >&2
18728 ;;
c0d27fcc
MR
18729esac
18730echo "$as_me:$LINENO: checking for $ac_header" >&5
18731echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18732if eval "test \"\${$as_ac_Header+set}\" = set"; then
18733 echo $ECHO_N "(cached) $ECHO_C" >&6
18734else
edfaf76d 18735 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 18736fi
c0d27fcc 18737echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 18738echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
18739
18740fi
503d2be0 18741if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18742 cat >>confdefs.h <<_ACEOF
503d2be0 18743#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18744_ACEOF
503d2be0 18745
a21616bd 18746else
503d2be0
AS
18747
18748for ac_header in kerberosIV/des.h
a21616bd 18749do
503d2be0 18750as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18751if eval "test \"\${$as_ac_Header+set}\" = set"; then
18752 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18753echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18754if eval "test \"\${$as_ac_Header+set}\" = set"; then
18755 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18756fi
18757echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18758echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18759else
c0d27fcc
MR
18760 # Is the header compilable?
18761echo "$as_me:$LINENO: checking $ac_header usability" >&5
18762echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18763cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18764/* confdefs.h. */
18765_ACEOF
18766cat confdefs.h >>conftest.$ac_ext
18767cat >>conftest.$ac_ext <<_ACEOF
18768/* end confdefs.h. */
c0d27fcc
MR
18769$ac_includes_default
18770#include <$ac_header>
18771_ACEOF
18772rm -f conftest.$ac_objext
18773if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 18774 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18775 ac_status=$?
edfaf76d
LK
18776 grep -v '^ *+' conftest.er1 >conftest.err
18777 rm -f conftest.er1
18778 cat conftest.err >&5
c0d27fcc
MR
18779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18780 (exit $ac_status); } &&
edfaf76d
LK
18781 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18783 (eval $ac_try) 2>&5
18784 ac_status=$?
18785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18786 (exit $ac_status); }; } &&
18787 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18789 (eval $ac_try) 2>&5
18790 ac_status=$?
18791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18792 (exit $ac_status); }; }; then
18793 ac_header_compiler=yes
18794else
18795 echo "$as_me: failed program was:" >&5
19650fd6
AS
18796sed 's/^/| /' conftest.$ac_ext >&5
18797
c0d27fcc
MR
18798ac_header_compiler=no
18799fi
edfaf76d 18800rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18801echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18802echo "${ECHO_T}$ac_header_compiler" >&6
18803
18804# Is the header present?
18805echo "$as_me:$LINENO: checking $ac_header presence" >&5
18806echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18807cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18808/* confdefs.h. */
18809_ACEOF
18810cat confdefs.h >>conftest.$ac_ext
18811cat >>conftest.$ac_ext <<_ACEOF
18812/* end confdefs.h. */
503d2be0
AS
18813#include <$ac_header>
18814_ACEOF
c0d27fcc 18815if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18816 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18817 ac_status=$?
6bae0ccf 18818 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18819 rm -f conftest.er1
18820 cat conftest.err >&5
c0d27fcc 18821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18822 (exit $ac_status); } >/dev/null; then
18823 if test -s conftest.err; then
18824 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 18825 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18826 else
18827 ac_cpp_err=
18828 fi
18829else
18830 ac_cpp_err=yes
18831fi
18832if test -z "$ac_cpp_err"; then
c0d27fcc 18833 ac_header_preproc=yes
503d2be0
AS
18834else
18835 echo "$as_me: failed program was:" >&5
19650fd6
AS
18836sed 's/^/| /' conftest.$ac_ext >&5
18837
c0d27fcc 18838 ac_header_preproc=no
a21616bd 18839fi
503d2be0 18840rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18841echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18842echo "${ECHO_T}$ac_header_preproc" >&6
18843
18844# So? What about this header?
edfaf76d
LK
18845case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18846 yes:no: )
c0d27fcc
MR
18847 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18848echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18849 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18850echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18851 ac_header_preproc=yes
19650fd6 18852 ;;
edfaf76d 18853 no:yes:* )
c0d27fcc
MR
18854 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18855echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18856 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18857echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18858 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18859echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18860 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18861echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18862 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18863echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18864 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18865echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
18866 (
18867 cat <<\_ASBOX
edfaf76d
LK
18868## ------------------------------------------ ##
18869## Report this to the AC_PACKAGE_NAME lists. ##
18870## ------------------------------------------ ##
19650fd6
AS
18871_ASBOX
18872 ) |
18873 sed "s/^/$as_me: WARNING: /" >&2
18874 ;;
c0d27fcc
MR
18875esac
18876echo "$as_me:$LINENO: checking for $ac_header" >&5
18877echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18878if eval "test \"\${$as_ac_Header+set}\" = set"; then
18879 echo $ECHO_N "(cached) $ECHO_C" >&6
18880else
edfaf76d 18881 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 18882fi
c0d27fcc 18883echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 18884echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
18885
18886fi
503d2be0 18887if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18888 cat >>confdefs.h <<_ACEOF
503d2be0 18889#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18890_ACEOF
503d2be0 18891
a21616bd 18892else
503d2be0
AS
18893
18894for ac_header in kerberos/des.h
a21616bd 18895do
503d2be0 18896as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18897if eval "test \"\${$as_ac_Header+set}\" = set"; then
18898 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18899echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18900if eval "test \"\${$as_ac_Header+set}\" = set"; then
18901 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18902fi
18903echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18904echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18905else
c0d27fcc
MR
18906 # Is the header compilable?
18907echo "$as_me:$LINENO: checking $ac_header usability" >&5
18908echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18909cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18910/* confdefs.h. */
18911_ACEOF
18912cat confdefs.h >>conftest.$ac_ext
18913cat >>conftest.$ac_ext <<_ACEOF
18914/* end confdefs.h. */
c0d27fcc
MR
18915$ac_includes_default
18916#include <$ac_header>
18917_ACEOF
18918rm -f conftest.$ac_objext
18919if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 18920 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18921 ac_status=$?
edfaf76d
LK
18922 grep -v '^ *+' conftest.er1 >conftest.err
18923 rm -f conftest.er1
18924 cat conftest.err >&5
c0d27fcc
MR
18925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18926 (exit $ac_status); } &&
edfaf76d
LK
18927 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18929 (eval $ac_try) 2>&5
18930 ac_status=$?
18931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18932 (exit $ac_status); }; } &&
18933 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18935 (eval $ac_try) 2>&5
18936 ac_status=$?
18937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18938 (exit $ac_status); }; }; then
18939 ac_header_compiler=yes
18940else
18941 echo "$as_me: failed program was:" >&5
19650fd6
AS
18942sed 's/^/| /' conftest.$ac_ext >&5
18943
c0d27fcc
MR
18944ac_header_compiler=no
18945fi
edfaf76d 18946rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18947echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18948echo "${ECHO_T}$ac_header_compiler" >&6
18949
18950# Is the header present?
18951echo "$as_me:$LINENO: checking $ac_header presence" >&5
18952echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18953cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18954/* confdefs.h. */
18955_ACEOF
18956cat confdefs.h >>conftest.$ac_ext
18957cat >>conftest.$ac_ext <<_ACEOF
18958/* end confdefs.h. */
503d2be0
AS
18959#include <$ac_header>
18960_ACEOF
c0d27fcc 18961if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18962 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18963 ac_status=$?
6bae0ccf 18964 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18965 rm -f conftest.er1
18966 cat conftest.err >&5
c0d27fcc 18967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18968 (exit $ac_status); } >/dev/null; then
18969 if test -s conftest.err; then
18970 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 18971 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18972 else
18973 ac_cpp_err=
18974 fi
18975else
18976 ac_cpp_err=yes
18977fi
18978if test -z "$ac_cpp_err"; then
c0d27fcc 18979 ac_header_preproc=yes
503d2be0
AS
18980else
18981 echo "$as_me: failed program was:" >&5
19650fd6
AS
18982sed 's/^/| /' conftest.$ac_ext >&5
18983
c0d27fcc 18984 ac_header_preproc=no
a21616bd 18985fi
503d2be0 18986rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18987echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18988echo "${ECHO_T}$ac_header_preproc" >&6
18989
18990# So? What about this header?
edfaf76d
LK
18991case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18992 yes:no: )
c0d27fcc
MR
18993 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18994echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18995 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18996echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18997 ac_header_preproc=yes
19650fd6 18998 ;;
edfaf76d 18999 no:yes:* )
c0d27fcc
MR
19000 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19001echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19002 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19003echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19004 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19005echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19006 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19007echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19008 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19009echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19010 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19011echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19012 (
19013 cat <<\_ASBOX
edfaf76d
LK
19014## ------------------------------------------ ##
19015## Report this to the AC_PACKAGE_NAME lists. ##
19016## ------------------------------------------ ##
19650fd6
AS
19017_ASBOX
19018 ) |
19019 sed "s/^/$as_me: WARNING: /" >&2
19020 ;;
c0d27fcc
MR
19021esac
19022echo "$as_me:$LINENO: checking for $ac_header" >&5
19023echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19024if eval "test \"\${$as_ac_Header+set}\" = set"; then
19025 echo $ECHO_N "(cached) $ECHO_C" >&6
19026else
edfaf76d 19027 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19028fi
c0d27fcc 19029echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19030echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19031
19032fi
503d2be0 19033if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19034 cat >>confdefs.h <<_ACEOF
503d2be0 19035#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19036_ACEOF
a21616bd
KR
19037
19038fi
c0d27fcc 19039
a21616bd
KR
19040done
19041
98418dba 19042fi
c0d27fcc 19043
925c2f3f
EZ
19044done
19045
98418dba 19046fi
c0d27fcc 19047
925c2f3f 19048done
98418dba 19049
c0d27fcc 19050
925c2f3f
EZ
19051for ac_header in krb.h
19052do
19053as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19054if eval "test \"\${$as_ac_Header+set}\" = set"; then
19055 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
19056echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19057if eval "test \"\${$as_ac_Header+set}\" = set"; then
19058 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19059fi
19060echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19061echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19062else
19063 # Is the header compilable?
19064echo "$as_me:$LINENO: checking $ac_header usability" >&5
19065echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19066cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19067/* confdefs.h. */
19068_ACEOF
19069cat confdefs.h >>conftest.$ac_ext
19070cat >>conftest.$ac_ext <<_ACEOF
19071/* end confdefs.h. */
c0d27fcc
MR
19072$ac_includes_default
19073#include <$ac_header>
19074_ACEOF
19075rm -f conftest.$ac_objext
19076if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 19077 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19078 ac_status=$?
edfaf76d
LK
19079 grep -v '^ *+' conftest.er1 >conftest.err
19080 rm -f conftest.er1
19081 cat conftest.err >&5
c0d27fcc
MR
19082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19083 (exit $ac_status); } &&
edfaf76d
LK
19084 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19086 (eval $ac_try) 2>&5
19087 ac_status=$?
19088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19089 (exit $ac_status); }; } &&
19090 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19092 (eval $ac_try) 2>&5
19093 ac_status=$?
19094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19095 (exit $ac_status); }; }; then
19096 ac_header_compiler=yes
925c2f3f 19097else
c0d27fcc 19098 echo "$as_me: failed program was:" >&5
19650fd6
AS
19099sed 's/^/| /' conftest.$ac_ext >&5
19100
c0d27fcc
MR
19101ac_header_compiler=no
19102fi
edfaf76d 19103rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19104echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19105echo "${ECHO_T}$ac_header_compiler" >&6
19106
19107# Is the header present?
19108echo "$as_me:$LINENO: checking $ac_header presence" >&5
19109echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19110cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19111/* confdefs.h. */
19112_ACEOF
19113cat confdefs.h >>conftest.$ac_ext
19114cat >>conftest.$ac_ext <<_ACEOF
19115/* end confdefs.h. */
503d2be0
AS
19116#include <$ac_header>
19117_ACEOF
c0d27fcc 19118if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19119 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19120 ac_status=$?
6bae0ccf 19121 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19122 rm -f conftest.er1
19123 cat conftest.err >&5
c0d27fcc 19124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19125 (exit $ac_status); } >/dev/null; then
19126 if test -s conftest.err; then
19127 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19128 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19129 else
19130 ac_cpp_err=
19131 fi
19132else
19133 ac_cpp_err=yes
19134fi
19135if test -z "$ac_cpp_err"; then
c0d27fcc 19136 ac_header_preproc=yes
503d2be0
AS
19137else
19138 echo "$as_me: failed program was:" >&5
19650fd6
AS
19139sed 's/^/| /' conftest.$ac_ext >&5
19140
c0d27fcc 19141 ac_header_preproc=no
a21616bd 19142fi
503d2be0 19143rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19144echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19145echo "${ECHO_T}$ac_header_preproc" >&6
19146
19147# So? What about this header?
edfaf76d
LK
19148case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19149 yes:no: )
c0d27fcc
MR
19150 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19151echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19152 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19153echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19154 ac_header_preproc=yes
19650fd6 19155 ;;
edfaf76d 19156 no:yes:* )
c0d27fcc
MR
19157 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19158echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19159 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19160echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19161 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19162echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19163 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19164echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19165 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19166echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19167 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19168echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19169 (
19170 cat <<\_ASBOX
edfaf76d
LK
19171## ------------------------------------------ ##
19172## Report this to the AC_PACKAGE_NAME lists. ##
19173## ------------------------------------------ ##
19650fd6
AS
19174_ASBOX
19175 ) |
19176 sed "s/^/$as_me: WARNING: /" >&2
19177 ;;
c0d27fcc
MR
19178esac
19179echo "$as_me:$LINENO: checking for $ac_header" >&5
19180echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19181if eval "test \"\${$as_ac_Header+set}\" = set"; then
19182 echo $ECHO_N "(cached) $ECHO_C" >&6
19183else
edfaf76d 19184 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19185fi
c0d27fcc 19186echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19187echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19188
19189fi
503d2be0 19190if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19191 cat >>confdefs.h <<_ACEOF
503d2be0 19192#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19193_ACEOF
503d2be0 19194
a21616bd 19195else
503d2be0
AS
19196
19197for ac_header in kerberosIV/krb.h
a21616bd 19198do
503d2be0 19199as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19200if eval "test \"\${$as_ac_Header+set}\" = set"; then
19201 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19202echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19203if eval "test \"\${$as_ac_Header+set}\" = set"; then
19204 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19205fi
19206echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19207echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19208else
c0d27fcc
MR
19209 # Is the header compilable?
19210echo "$as_me:$LINENO: checking $ac_header usability" >&5
19211echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19212cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19213/* confdefs.h. */
19214_ACEOF
19215cat confdefs.h >>conftest.$ac_ext
19216cat >>conftest.$ac_ext <<_ACEOF
19217/* end confdefs.h. */
c0d27fcc
MR
19218$ac_includes_default
19219#include <$ac_header>
19220_ACEOF
19221rm -f conftest.$ac_objext
19222if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 19223 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19224 ac_status=$?
edfaf76d
LK
19225 grep -v '^ *+' conftest.er1 >conftest.err
19226 rm -f conftest.er1
19227 cat conftest.err >&5
c0d27fcc
MR
19228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19229 (exit $ac_status); } &&
edfaf76d
LK
19230 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19232 (eval $ac_try) 2>&5
19233 ac_status=$?
19234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19235 (exit $ac_status); }; } &&
19236 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19238 (eval $ac_try) 2>&5
19239 ac_status=$?
19240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19241 (exit $ac_status); }; }; then
19242 ac_header_compiler=yes
19243else
19244 echo "$as_me: failed program was:" >&5
19650fd6
AS
19245sed 's/^/| /' conftest.$ac_ext >&5
19246
c0d27fcc
MR
19247ac_header_compiler=no
19248fi
edfaf76d 19249rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19250echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19251echo "${ECHO_T}$ac_header_compiler" >&6
19252
19253# Is the header present?
19254echo "$as_me:$LINENO: checking $ac_header presence" >&5
19255echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19256cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19257/* confdefs.h. */
19258_ACEOF
19259cat confdefs.h >>conftest.$ac_ext
19260cat >>conftest.$ac_ext <<_ACEOF
19261/* end confdefs.h. */
503d2be0
AS
19262#include <$ac_header>
19263_ACEOF
c0d27fcc 19264if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19265 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19266 ac_status=$?
6bae0ccf 19267 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19268 rm -f conftest.er1
19269 cat conftest.err >&5
c0d27fcc 19270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19271 (exit $ac_status); } >/dev/null; then
19272 if test -s conftest.err; then
19273 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19274 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19275 else
19276 ac_cpp_err=
19277 fi
19278else
19279 ac_cpp_err=yes
19280fi
19281if test -z "$ac_cpp_err"; then
c0d27fcc 19282 ac_header_preproc=yes
503d2be0
AS
19283else
19284 echo "$as_me: failed program was:" >&5
19650fd6
AS
19285sed 's/^/| /' conftest.$ac_ext >&5
19286
c0d27fcc 19287 ac_header_preproc=no
a21616bd 19288fi
503d2be0 19289rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19290echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19291echo "${ECHO_T}$ac_header_preproc" >&6
19292
19293# So? What about this header?
edfaf76d
LK
19294case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19295 yes:no: )
c0d27fcc
MR
19296 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19297echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19298 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19299echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19300 ac_header_preproc=yes
19650fd6 19301 ;;
edfaf76d 19302 no:yes:* )
c0d27fcc
MR
19303 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19304echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19305 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19306echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19307 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19308echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19309 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19310echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19311 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19312echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19313 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19314echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19315 (
19316 cat <<\_ASBOX
edfaf76d
LK
19317## ------------------------------------------ ##
19318## Report this to the AC_PACKAGE_NAME lists. ##
19319## ------------------------------------------ ##
19650fd6
AS
19320_ASBOX
19321 ) |
19322 sed "s/^/$as_me: WARNING: /" >&2
19323 ;;
c0d27fcc
MR
19324esac
19325echo "$as_me:$LINENO: checking for $ac_header" >&5
19326echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19327if eval "test \"\${$as_ac_Header+set}\" = set"; then
19328 echo $ECHO_N "(cached) $ECHO_C" >&6
19329else
edfaf76d 19330 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19331fi
c0d27fcc 19332echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19333echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19334
19335fi
503d2be0 19336if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19337 cat >>confdefs.h <<_ACEOF
503d2be0 19338#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19339_ACEOF
503d2be0 19340
a21616bd 19341else
503d2be0
AS
19342
19343for ac_header in kerberos/krb.h
a21616bd 19344do
503d2be0 19345as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19346if eval "test \"\${$as_ac_Header+set}\" = set"; then
19347 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19348echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19349if eval "test \"\${$as_ac_Header+set}\" = set"; then
19350 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19351fi
19352echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19353echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19354else
c0d27fcc
MR
19355 # Is the header compilable?
19356echo "$as_me:$LINENO: checking $ac_header usability" >&5
19357echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19358cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19359/* confdefs.h. */
19360_ACEOF
19361cat confdefs.h >>conftest.$ac_ext
19362cat >>conftest.$ac_ext <<_ACEOF
19363/* end confdefs.h. */
c0d27fcc
MR
19364$ac_includes_default
19365#include <$ac_header>
19366_ACEOF
19367rm -f conftest.$ac_objext
19368if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 19369 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19370 ac_status=$?
edfaf76d
LK
19371 grep -v '^ *+' conftest.er1 >conftest.err
19372 rm -f conftest.er1
19373 cat conftest.err >&5
c0d27fcc
MR
19374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19375 (exit $ac_status); } &&
edfaf76d
LK
19376 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19378 (eval $ac_try) 2>&5
19379 ac_status=$?
19380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19381 (exit $ac_status); }; } &&
19382 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19384 (eval $ac_try) 2>&5
19385 ac_status=$?
19386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19387 (exit $ac_status); }; }; then
19388 ac_header_compiler=yes
19389else
19390 echo "$as_me: failed program was:" >&5
19650fd6
AS
19391sed 's/^/| /' conftest.$ac_ext >&5
19392
c0d27fcc
MR
19393ac_header_compiler=no
19394fi
edfaf76d 19395rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19396echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19397echo "${ECHO_T}$ac_header_compiler" >&6
19398
19399# Is the header present?
19400echo "$as_me:$LINENO: checking $ac_header presence" >&5
19401echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19402cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19403/* confdefs.h. */
19404_ACEOF
19405cat confdefs.h >>conftest.$ac_ext
19406cat >>conftest.$ac_ext <<_ACEOF
19407/* end confdefs.h. */
503d2be0
AS
19408#include <$ac_header>
19409_ACEOF
c0d27fcc 19410if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19411 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19412 ac_status=$?
6bae0ccf 19413 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19414 rm -f conftest.er1
19415 cat conftest.err >&5
c0d27fcc 19416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19417 (exit $ac_status); } >/dev/null; then
19418 if test -s conftest.err; then
19419 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19420 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19421 else
19422 ac_cpp_err=
19423 fi
19424else
19425 ac_cpp_err=yes
19426fi
19427if test -z "$ac_cpp_err"; then
c0d27fcc 19428 ac_header_preproc=yes
503d2be0
AS
19429else
19430 echo "$as_me: failed program was:" >&5
19650fd6
AS
19431sed 's/^/| /' conftest.$ac_ext >&5
19432
c0d27fcc 19433 ac_header_preproc=no
a21616bd 19434fi
503d2be0 19435rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19436echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19437echo "${ECHO_T}$ac_header_preproc" >&6
35996d22
AS
19438
19439# So? What about this header?
edfaf76d
LK
19440case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19441 yes:no: )
35996d22
AS
19442 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19443echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19444 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19445echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19446 ac_header_preproc=yes
19650fd6 19447 ;;
edfaf76d 19448 no:yes:* )
c0d27fcc
MR
19449 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19450echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19451 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19452echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19453 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19454echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19455 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19456echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19457 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19458echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19459 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19460echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19461 (
19462 cat <<\_ASBOX
edfaf76d
LK
19463## ------------------------------------------ ##
19464## Report this to the AC_PACKAGE_NAME lists. ##
19465## ------------------------------------------ ##
19650fd6
AS
19466_ASBOX
19467 ) |
19468 sed "s/^/$as_me: WARNING: /" >&2
19469 ;;
c0d27fcc
MR
19470esac
19471echo "$as_me:$LINENO: checking for $ac_header" >&5
19472echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19473if eval "test \"\${$as_ac_Header+set}\" = set"; then
19474 echo $ECHO_N "(cached) $ECHO_C" >&6
19475else
edfaf76d 19476 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19477fi
c0d27fcc 19478echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19479echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19480
19481fi
503d2be0 19482if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19483 cat >>confdefs.h <<_ACEOF
503d2be0 19484#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19485_ACEOF
503d2be0 19486
a21616bd 19487fi
c0d27fcc 19488
a21616bd
KR
19489done
19490
19491fi
c0d27fcc 19492
a21616bd
KR
19493done
19494
19495fi
c0d27fcc 19496
a21616bd
KR
19497done
19498
19499 fi
503d2be0
AS
19500
19501for ac_header in com_err.h
a21616bd 19502do
503d2be0 19503as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19504if eval "test \"\${$as_ac_Header+set}\" = set"; then
19505 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19506echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19507if eval "test \"\${$as_ac_Header+set}\" = set"; then
19508 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19509fi
19510echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19511echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19512else
c0d27fcc
MR
19513 # Is the header compilable?
19514echo "$as_me:$LINENO: checking $ac_header usability" >&5
19515echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19516cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19517/* confdefs.h. */
19518_ACEOF
19519cat confdefs.h >>conftest.$ac_ext
19520cat >>conftest.$ac_ext <<_ACEOF
19521/* end confdefs.h. */
c0d27fcc
MR
19522$ac_includes_default
19523#include <$ac_header>
19524_ACEOF
19525rm -f conftest.$ac_objext
19526if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d
LK
19527 (eval $ac_compile) 2>conftest.er1
19528 ac_status=$?
19529 grep -v '^ *+' conftest.er1 >conftest.err
19530 rm -f conftest.er1
19531 cat conftest.err >&5
19532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19533 (exit $ac_status); } &&
19534 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19536 (eval $ac_try) 2>&5
35996d22
AS
19537 ac_status=$?
19538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
19539 (exit $ac_status); }; } &&
19540 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19542 (eval $ac_try) 2>&5
19543 ac_status=$?
19544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19545 (exit $ac_status); }; }; then
19546 ac_header_compiler=yes
19547else
19548 echo "$as_me: failed program was:" >&5
19650fd6
AS
19549sed 's/^/| /' conftest.$ac_ext >&5
19550
c0d27fcc
MR
19551ac_header_compiler=no
19552fi
edfaf76d 19553rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19554echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19555echo "${ECHO_T}$ac_header_compiler" >&6
19556
19557# Is the header present?
19558echo "$as_me:$LINENO: checking $ac_header presence" >&5
19559echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19560cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19561/* confdefs.h. */
19562_ACEOF
19563cat confdefs.h >>conftest.$ac_ext
19564cat >>conftest.$ac_ext <<_ACEOF
19565/* end confdefs.h. */
503d2be0
AS
19566#include <$ac_header>
19567_ACEOF
c0d27fcc 19568if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19569 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19570 ac_status=$?
6bae0ccf 19571 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19572 rm -f conftest.er1
19573 cat conftest.err >&5
c0d27fcc 19574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19575 (exit $ac_status); } >/dev/null; then
19576 if test -s conftest.err; then
19577 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19578 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19579 else
19580 ac_cpp_err=
19581 fi
19582else
19583 ac_cpp_err=yes
19584fi
19585if test -z "$ac_cpp_err"; then
c0d27fcc 19586 ac_header_preproc=yes
503d2be0
AS
19587else
19588 echo "$as_me: failed program was:" >&5
19650fd6
AS
19589sed 's/^/| /' conftest.$ac_ext >&5
19590
c0d27fcc 19591 ac_header_preproc=no
a21616bd 19592fi
503d2be0 19593rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19594echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19595echo "${ECHO_T}$ac_header_preproc" >&6
19596
19597# So? What about this header?
edfaf76d
LK
19598case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19599 yes:no: )
c0d27fcc
MR
19600 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19601echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19602 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19603echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19604 ac_header_preproc=yes
19650fd6 19605 ;;
edfaf76d 19606 no:yes:* )
c0d27fcc
MR
19607 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19608echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19609 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19610echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19611 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19612echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19613 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19614echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19615 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19616echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19617 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19618echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19619 (
19620 cat <<\_ASBOX
edfaf76d
LK
19621## ------------------------------------------ ##
19622## Report this to the AC_PACKAGE_NAME lists. ##
19623## ------------------------------------------ ##
19650fd6
AS
19624_ASBOX
19625 ) |
19626 sed "s/^/$as_me: WARNING: /" >&2
19627 ;;
c0d27fcc
MR
19628esac
19629echo "$as_me:$LINENO: checking for $ac_header" >&5
19630echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19631if eval "test \"\${$as_ac_Header+set}\" = set"; then
19632 echo $ECHO_N "(cached) $ECHO_C" >&6
19633else
edfaf76d 19634 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19635fi
c0d27fcc 19636echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19637echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19638
19639fi
503d2be0 19640if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19641 cat >>confdefs.h <<_ACEOF
503d2be0 19642#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19643_ACEOF
503d2be0 19644
a21616bd 19645fi
c0d27fcc 19646
a21616bd
KR
19647done
19648
19649fi
19650
ba4481b5
DL
19651# Solaris requires -lintl if you want strerror (which calls dgettext)
19652# to return localized messages.
503d2be0 19653
c0d27fcc 19654echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
503d2be0
AS
19655echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
19656if test "${ac_cv_lib_intl_dgettext+set}" = set; then
19657 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19658else
503d2be0 19659 ac_check_lib_save_LIBS=$LIBS
ba4481b5 19660LIBS="-lintl $LIBS"
503d2be0 19661cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19662/* confdefs.h. */
19663_ACEOF
19664cat confdefs.h >>conftest.$ac_ext
19665cat >>conftest.$ac_ext <<_ACEOF
19666/* end confdefs.h. */
503d2be0 19667
ba4481b5 19668/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19669#ifdef __cplusplus
19670extern "C"
19671#endif
ba4481b5 19672/* We use char because int might match the return type of a gcc2
503d2be0
AS
19673 builtin and then its argument prototype would still apply. */
19674char dgettext ();
19675int
19676main ()
19677{
19678dgettext ();
19679 ;
19680 return 0;
19681}
19682_ACEOF
19683rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19684if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19685 (eval $ac_link) 2>conftest.er1
503d2be0 19686 ac_status=$?
edfaf76d
LK
19687 grep -v '^ *+' conftest.er1 >conftest.err
19688 rm -f conftest.er1
19689 cat conftest.err >&5
c0d27fcc 19690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19691 (exit $ac_status); } &&
edfaf76d
LK
19692 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19694 (eval $ac_try) 2>&5
19695 ac_status=$?
19696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19697 (exit $ac_status); }; } &&
19698 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19700 (eval $ac_try) 2>&5
19701 ac_status=$?
c0d27fcc 19702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19703 (exit $ac_status); }; }; then
19704 ac_cv_lib_intl_dgettext=yes
19705else
19706 echo "$as_me: failed program was:" >&5
19650fd6
AS
19707sed 's/^/| /' conftest.$ac_ext >&5
19708
503d2be0
AS
19709ac_cv_lib_intl_dgettext=no
19710fi
edfaf76d
LK
19711rm -f conftest.err conftest.$ac_objext \
19712 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19713LIBS=$ac_check_lib_save_LIBS
19714fi
c0d27fcc 19715echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
503d2be0
AS
19716echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
19717if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 19718 cat >>confdefs.h <<_ACEOF
503d2be0 19719#define HAVE_LIBINTL 1
c0d27fcc 19720_ACEOF
ba4481b5
DL
19721
19722 LIBS="-lintl $LIBS"
19723
ba4481b5
DL
19724fi
19725
c0d27fcc
MR
19726
19727echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
503d2be0
AS
19728echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6
19729if test "${emacs_cv_localtime_cache+set}" = set; then
19730 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
19731else
19732 if test x$ac_cv_func_tzset = xyes; then
19733if test "$cross_compiling" = yes; then
19734 # If we have tzset, assume the worst when cross-compiling.
19735emacs_cv_localtime_cache=yes
19736else
503d2be0 19737 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19738/* confdefs.h. */
19739_ACEOF
19740cat confdefs.h >>conftest.$ac_ext
19741cat >>conftest.$ac_ext <<_ACEOF
19742/* end confdefs.h. */
ba4481b5 19743#include <time.h>
ba4481b5
DL
19744extern char **environ;
19745unset_TZ ()
19746{
19747 char **from, **to;
19748 for (to = from = environ; (*to = *from); from++)
19749 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
19750 to++;
19751}
19752char TZ_GMT0[] = "TZ=GMT0";
19753char TZ_PST8[] = "TZ=PST8";
19754main()
19755{
19756 time_t now = time ((time_t *) 0);
19757 int hour_GMT0, hour_unset;
19758 if (putenv (TZ_GMT0) != 0)
19759 exit (1);
19760 hour_GMT0 = localtime (&now)->tm_hour;
19761 unset_TZ ();
19762 hour_unset = localtime (&now)->tm_hour;
19763 if (putenv (TZ_PST8) != 0)
19764 exit (1);
19765 if (localtime (&now)->tm_hour == hour_GMT0)
19766 exit (1);
19767 unset_TZ ();
19768 if (localtime (&now)->tm_hour != hour_unset)
19769 exit (1);
19770 exit (0);
19771}
503d2be0
AS
19772_ACEOF
19773rm -f conftest$ac_exeext
c0d27fcc 19774if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
19775 (eval $ac_link) 2>&5
19776 ac_status=$?
c0d27fcc 19777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19778 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 19779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19780 (eval $ac_try) 2>&5
19781 ac_status=$?
c0d27fcc 19782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19783 (exit $ac_status); }; }; then
ba4481b5
DL
19784 emacs_cv_localtime_cache=no
19785else
503d2be0
AS
19786 echo "$as_me: program exited with status $ac_status" >&5
19787echo "$as_me: failed program was:" >&5
19650fd6
AS
19788sed 's/^/| /' conftest.$ac_ext >&5
19789
c0d27fcc 19790( exit $ac_status )
503d2be0 19791emacs_cv_localtime_cache=yes
ba4481b5 19792fi
edfaf76d 19793rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 19794fi
ba4481b5
DL
19795else
19796 # If we lack tzset, report that localtime does not cache TZ,
19797 # since we can't invalidate the cache if we don't have tzset.
19798 emacs_cv_localtime_cache=no
19799fi
19800fi
c0d27fcc 19801echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
503d2be0 19802echo "${ECHO_T}$emacs_cv_localtime_cache" >&6
ba4481b5 19803if test $emacs_cv_localtime_cache = yes; then
b936fae4 19804
c0d27fcc 19805cat >>confdefs.h <<\_ACEOF
ba4481b5 19806#define LOCALTIME_CACHE 1
c0d27fcc 19807_ACEOF
ba4481b5
DL
19808
19809fi
19810
19811if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
19812
19813for ac_func in gettimeofday
48d4b120 19814do
503d2be0 19815as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 19816echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
19817echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19818if eval "test \"\${$as_ac_var+set}\" = set"; then
19819 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 19820else
503d2be0 19821 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19822/* confdefs.h. */
19823_ACEOF
19824cat confdefs.h >>conftest.$ac_ext
19825cat >>conftest.$ac_ext <<_ACEOF
19826/* end confdefs.h. */
edfaf76d
LK
19827/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19828 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19829#define $ac_func innocuous_$ac_func
19830
48d4b120 19831/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19832 which can conflict with char $ac_func (); below.
19833 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19834 <limits.h> exists even on freestanding compilers. */
edfaf76d 19835
19650fd6
AS
19836#ifdef __STDC__
19837# include <limits.h>
19838#else
19839# include <assert.h>
19840#endif
edfaf76d
LK
19841
19842#undef $ac_func
19843
48d4b120 19844/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19845#ifdef __cplusplus
19846extern "C"
19650fd6 19847{
503d2be0 19848#endif
48d4b120 19849/* We use char because int might match the return type of a gcc2
503d2be0
AS
19850 builtin and then its argument prototype would still apply. */
19851char $ac_func ();
48d4b120
DL
19852/* The GNU C library defines this for functions which it implements
19853 to always fail with ENOSYS. Some functions are actually named
19854 something starting with __ and the normal name is an alias. */
19855#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19856choke me
19857#else
19650fd6
AS
19858char (*f) () = $ac_func;
19859#endif
19860#ifdef __cplusplus
19861}
cd958eb3
MB
19862#endif
19863
19650fd6
AS
19864int
19865main ()
19866{
19867return f != $ac_func;
503d2be0
AS
19868 ;
19869 return 0;
19870}
19871_ACEOF
19872rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19873if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19874 (eval $ac_link) 2>conftest.er1
503d2be0 19875 ac_status=$?
edfaf76d
LK
19876 grep -v '^ *+' conftest.er1 >conftest.err
19877 rm -f conftest.er1
19878 cat conftest.err >&5
c0d27fcc 19879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19880 (exit $ac_status); } &&
edfaf76d
LK
19881 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19883 (eval $ac_try) 2>&5
19884 ac_status=$?
19885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19886 (exit $ac_status); }; } &&
19887 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19889 (eval $ac_try) 2>&5
19890 ac_status=$?
c0d27fcc 19891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19892 (exit $ac_status); }; }; then
19893 eval "$as_ac_var=yes"
19894else
19895 echo "$as_me: failed program was:" >&5
19650fd6
AS
19896sed 's/^/| /' conftest.$ac_ext >&5
19897
503d2be0
AS
19898eval "$as_ac_var=no"
19899fi
edfaf76d
LK
19900rm -f conftest.err conftest.$ac_objext \
19901 conftest$ac_exeext conftest.$ac_ext
503d2be0 19902fi
c0d27fcc 19903echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
19904echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19905if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19906 cat >>confdefs.h <<_ACEOF
503d2be0 19907#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19908_ACEOF
48d4b120 19909
48d4b120
DL
19910fi
19911done
19912
b936fae4 19913 if test $ac_cv_func_gettimeofday = yes; then
c0d27fcc 19914 echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
503d2be0
AS
19915echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6
19916if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
19917 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19918else
503d2be0 19919 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19920/* confdefs.h. */
19921_ACEOF
19922cat confdefs.h >>conftest.$ac_ext
19923cat >>conftest.$ac_ext <<_ACEOF
19924/* end confdefs.h. */
ba4481b5 19925
a3f08d9e
DL
19926#ifdef TIME_WITH_SYS_TIME
19927#include <sys/time.h>
19928#include <time.h>
19929#else
19930#ifdef HAVE_SYS_TIME_H
19931#include <sys/time.h>
19932#else
19933#include <time.h>
19934#endif
19935#endif
503d2be0
AS
19936int
19937main ()
19938{
a3f08d9e 19939struct timeval time;
b936fae4 19940 gettimeofday (&time, 0);
503d2be0
AS
19941 ;
19942 return 0;
19943}
19944_ACEOF
19945rm -f conftest.$ac_objext
c0d27fcc 19946if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 19947 (eval $ac_compile) 2>conftest.er1
503d2be0 19948 ac_status=$?
edfaf76d
LK
19949 grep -v '^ *+' conftest.er1 >conftest.err
19950 rm -f conftest.er1
19951 cat conftest.err >&5
c0d27fcc 19952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19953 (exit $ac_status); } &&
edfaf76d
LK
19954 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19956 (eval $ac_try) 2>&5
19957 ac_status=$?
19958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19959 (exit $ac_status); }; } &&
19960 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 19961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19962 (eval $ac_try) 2>&5
19963 ac_status=$?
c0d27fcc 19964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19965 (exit $ac_status); }; }; then
ba4481b5
DL
19966 emacs_cv_gettimeofday_two_arguments=yes
19967else
503d2be0 19968 echo "$as_me: failed program was:" >&5
19650fd6
AS
19969sed 's/^/| /' conftest.$ac_ext >&5
19970
503d2be0 19971emacs_cv_gettimeofday_two_arguments=no
ba4481b5 19972fi
edfaf76d 19973rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 19974fi
c0d27fcc 19975echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
503d2be0 19976echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6
b936fae4
AS
19977 if test $emacs_cv_gettimeofday_two_arguments = no; then
19978
c0d27fcc 19979cat >>confdefs.h <<\_ACEOF
ba4481b5 19980#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 19981_ACEOF
ba4481b5 19982
b936fae4 19983 fi
ba4481b5
DL
19984 fi
19985fi
19986
973a76b1
DL
19987# This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
19988echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19989echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
19990if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
19991 echo $ECHO_N "(cached) $ECHO_C" >&6
19992else
19993 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19994/* confdefs.h. */
19995_ACEOF
19996cat confdefs.h >>conftest.$ac_ext
19997cat >>conftest.$ac_ext <<_ACEOF
19998/* end confdefs.h. */
973a76b1
DL
19999#include <sys/types.h>
20000#include <$ac_cv_struct_tm>
20001
20002
20003int
20004main ()
20005{
20006static struct tm ac_aggr;
20007if (ac_aggr.tm_zone)
20008return 0;
20009 ;
20010 return 0;
20011}
20012_ACEOF
20013rm -f conftest.$ac_objext
20014if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20015 (eval $ac_compile) 2>conftest.er1
973a76b1 20016 ac_status=$?
edfaf76d
LK
20017 grep -v '^ *+' conftest.er1 >conftest.err
20018 rm -f conftest.er1
20019 cat conftest.err >&5
973a76b1
DL
20020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20021 (exit $ac_status); } &&
edfaf76d
LK
20022 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20024 (eval $ac_try) 2>&5
20025 ac_status=$?
20026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20027 (exit $ac_status); }; } &&
20028 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
20029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20030 (eval $ac_try) 2>&5
20031 ac_status=$?
20032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20033 (exit $ac_status); }; }; then
20034 ac_cv_member_struct_tm_tm_zone=yes
20035else
20036 echo "$as_me: failed program was:" >&5
19650fd6
AS
20037sed 's/^/| /' conftest.$ac_ext >&5
20038
973a76b1 20039cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20040/* confdefs.h. */
20041_ACEOF
20042cat confdefs.h >>conftest.$ac_ext
20043cat >>conftest.$ac_ext <<_ACEOF
20044/* end confdefs.h. */
973a76b1
DL
20045#include <sys/types.h>
20046#include <$ac_cv_struct_tm>
20047
20048
20049int
20050main ()
20051{
20052static struct tm ac_aggr;
20053if (sizeof ac_aggr.tm_zone)
20054return 0;
20055 ;
20056 return 0;
20057}
20058_ACEOF
20059rm -f conftest.$ac_objext
20060if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20061 (eval $ac_compile) 2>conftest.er1
973a76b1 20062 ac_status=$?
edfaf76d
LK
20063 grep -v '^ *+' conftest.er1 >conftest.err
20064 rm -f conftest.er1
20065 cat conftest.err >&5
973a76b1
DL
20066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20067 (exit $ac_status); } &&
edfaf76d
LK
20068 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20070 (eval $ac_try) 2>&5
20071 ac_status=$?
20072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20073 (exit $ac_status); }; } &&
20074 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
20075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20076 (eval $ac_try) 2>&5
20077 ac_status=$?
20078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20079 (exit $ac_status); }; }; then
20080 ac_cv_member_struct_tm_tm_zone=yes
20081else
20082 echo "$as_me: failed program was:" >&5
19650fd6
AS
20083sed 's/^/| /' conftest.$ac_ext >&5
20084
973a76b1
DL
20085ac_cv_member_struct_tm_tm_zone=no
20086fi
edfaf76d 20087rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 20088fi
edfaf76d 20089rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1
DL
20090fi
20091echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20092echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
20093if test $ac_cv_member_struct_tm_tm_zone = yes; then
20094
20095cat >>confdefs.h <<_ACEOF
20096#define HAVE_STRUCT_TM_TM_ZONE 1
20097_ACEOF
20098
20099
20100fi
20101
20102if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20103
20104cat >>confdefs.h <<\_ACEOF
20105#define HAVE_TM_ZONE 1
20106_ACEOF
20107
20108else
20109 echo "$as_me:$LINENO: checking for tzname" >&5
20110echo $ECHO_N "checking for tzname... $ECHO_C" >&6
20111if test "${ac_cv_var_tzname+set}" = set; then
20112 echo $ECHO_N "(cached) $ECHO_C" >&6
20113else
20114 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20115/* confdefs.h. */
20116_ACEOF
20117cat confdefs.h >>conftest.$ac_ext
20118cat >>conftest.$ac_ext <<_ACEOF
20119/* end confdefs.h. */
973a76b1
DL
20120#include <time.h>
20121#ifndef tzname /* For SGI. */
20122extern char *tzname[]; /* RS6000 and others reject char **tzname. */
20123#endif
20124
20125int
20126main ()
20127{
20128atoi(*tzname);
20129 ;
20130 return 0;
20131}
20132_ACEOF
20133rm -f conftest.$ac_objext conftest$ac_exeext
20134if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 20135 (eval $ac_link) 2>conftest.er1
973a76b1 20136 ac_status=$?
edfaf76d
LK
20137 grep -v '^ *+' conftest.er1 >conftest.err
20138 rm -f conftest.er1
20139 cat conftest.err >&5
973a76b1
DL
20140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20141 (exit $ac_status); } &&
edfaf76d
LK
20142 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20144 (eval $ac_try) 2>&5
20145 ac_status=$?
20146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20147 (exit $ac_status); }; } &&
20148 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
20149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20150 (eval $ac_try) 2>&5
20151 ac_status=$?
20152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20153 (exit $ac_status); }; }; then
20154 ac_cv_var_tzname=yes
20155else
20156 echo "$as_me: failed program was:" >&5
19650fd6
AS
20157sed 's/^/| /' conftest.$ac_ext >&5
20158
973a76b1
DL
20159ac_cv_var_tzname=no
20160fi
edfaf76d
LK
20161rm -f conftest.err conftest.$ac_objext \
20162 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
20163fi
20164echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20165echo "${ECHO_T}$ac_cv_var_tzname" >&6
20166 if test $ac_cv_var_tzname = yes; then
20167
20168cat >>confdefs.h <<\_ACEOF
20169#define HAVE_TZNAME 1
20170_ACEOF
20171
20172 fi
20173fi
20174
20175
48d4b120 20176if test "$ac_cv_func_gettimeofday" = yes; then
c0d27fcc 20177 echo "$as_me:$LINENO: checking for struct timezone" >&5
503d2be0
AS
20178echo $ECHO_N "checking for struct timezone... $ECHO_C" >&6
20179if test "${emacs_cv_struct_timezone+set}" = set; then
20180 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 20181else
503d2be0 20182 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20183/* confdefs.h. */
20184_ACEOF
20185cat confdefs.h >>conftest.$ac_ext
20186cat >>conftest.$ac_ext <<_ACEOF
20187/* end confdefs.h. */
48d4b120 20188#include <sys/time.h>
503d2be0
AS
20189int
20190main ()
20191{
48d4b120 20192struct timezone tz;
503d2be0
AS
20193 ;
20194 return 0;
20195}
20196_ACEOF
20197rm -f conftest.$ac_objext
c0d27fcc 20198if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20199 (eval $ac_compile) 2>conftest.er1
503d2be0 20200 ac_status=$?
edfaf76d
LK
20201 grep -v '^ *+' conftest.er1 >conftest.err
20202 rm -f conftest.er1
20203 cat conftest.err >&5
c0d27fcc 20204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20205 (exit $ac_status); } &&
edfaf76d
LK
20206 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20208 (eval $ac_try) 2>&5
20209 ac_status=$?
20210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20211 (exit $ac_status); }; } &&
20212 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 20213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20214 (eval $ac_try) 2>&5
20215 ac_status=$?
c0d27fcc 20216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20217 (exit $ac_status); }; }; then
48d4b120
DL
20218 if test "$cross_compiling" = yes; then
20219 emacs_cv_struct_timezone=yes
20220else
503d2be0 20221 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20222/* confdefs.h. */
20223_ACEOF
20224cat confdefs.h >>conftest.$ac_ext
20225cat >>conftest.$ac_ext <<_ACEOF
20226/* end confdefs.h. */
48d4b120
DL
20227
20228#ifdef TIME_WITH_SYS_TIME
20229#include <sys/time.h>
20230#include <time.h>
20231#else
20232#ifdef HAVE_SYS_TIME_H
20233#include <sys/time.h>
20234#else
20235#include <time.h>
20236#endif
20237#endif
20238main () {
20239 struct timeval time;
20240 struct timezone dummy;
20241 exit (gettimeofday (&time, &dummy));
20242}
503d2be0
AS
20243_ACEOF
20244rm -f conftest$ac_exeext
c0d27fcc 20245if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
20246 (eval $ac_link) 2>&5
20247 ac_status=$?
c0d27fcc 20248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20249 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 20250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20251 (eval $ac_try) 2>&5
20252 ac_status=$?
c0d27fcc 20253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20254 (exit $ac_status); }; }; then
48d4b120
DL
20255 emacs_cv_struct_timezone=yes
20256else
503d2be0
AS
20257 echo "$as_me: program exited with status $ac_status" >&5
20258echo "$as_me: failed program was:" >&5
19650fd6
AS
20259sed 's/^/| /' conftest.$ac_ext >&5
20260
c0d27fcc 20261( exit $ac_status )
503d2be0 20262emacs_cv_struct_timezone=no
48d4b120 20263fi
edfaf76d 20264rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
48d4b120 20265fi
48d4b120 20266else
503d2be0 20267 echo "$as_me: failed program was:" >&5
19650fd6
AS
20268sed 's/^/| /' conftest.$ac_ext >&5
20269
503d2be0 20270emacs_cv_struct_timezone=no
48d4b120 20271fi
edfaf76d 20272rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
48d4b120 20273fi
c0d27fcc 20274echo "$as_me:$LINENO: result: $emacs_cv_struct_timezone" >&5
503d2be0 20275echo "${ECHO_T}$emacs_cv_struct_timezone" >&6
48d4b120
DL
20276fi
20277
ba4481b5 20278ok_so_far=yes
c0d27fcc 20279echo "$as_me:$LINENO: checking for socket" >&5
503d2be0
AS
20280echo $ECHO_N "checking for socket... $ECHO_C" >&6
20281if test "${ac_cv_func_socket+set}" = set; then
20282 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 20283else
503d2be0 20284 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20285/* confdefs.h. */
20286_ACEOF
20287cat confdefs.h >>conftest.$ac_ext
20288cat >>conftest.$ac_ext <<_ACEOF
20289/* end confdefs.h. */
edfaf76d
LK
20290/* Define socket to an innocuous variant, in case <limits.h> declares socket.
20291 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20292#define socket innocuous_socket
20293
ba4481b5 20294/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20295 which can conflict with char socket (); below.
20296 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20297 <limits.h> exists even on freestanding compilers. */
edfaf76d 20298
19650fd6
AS
20299#ifdef __STDC__
20300# include <limits.h>
20301#else
20302# include <assert.h>
20303#endif
edfaf76d
LK
20304
20305#undef socket
20306
ba4481b5 20307/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
20308#ifdef __cplusplus
20309extern "C"
19650fd6 20310{
503d2be0 20311#endif
ba4481b5 20312/* We use char because int might match the return type of a gcc2
503d2be0
AS
20313 builtin and then its argument prototype would still apply. */
20314char socket ();
ba4481b5
DL
20315/* The GNU C library defines this for functions which it implements
20316 to always fail with ENOSYS. Some functions are actually named
20317 something starting with __ and the normal name is an alias. */
20318#if defined (__stub_socket) || defined (__stub___socket)
20319choke me
20320#else
19650fd6
AS
20321char (*f) () = socket;
20322#endif
20323#ifdef __cplusplus
20324}
cd958eb3
MB
20325#endif
20326
19650fd6
AS
20327int
20328main ()
20329{
20330return f != socket;
503d2be0
AS
20331 ;
20332 return 0;
20333}
20334_ACEOF
20335rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 20336if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 20337 (eval $ac_link) 2>conftest.er1
503d2be0 20338 ac_status=$?
edfaf76d
LK
20339 grep -v '^ *+' conftest.er1 >conftest.err
20340 rm -f conftest.er1
20341 cat conftest.err >&5
c0d27fcc 20342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20343 (exit $ac_status); } &&
edfaf76d
LK
20344 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20346 (eval $ac_try) 2>&5
20347 ac_status=$?
20348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20349 (exit $ac_status); }; } &&
20350 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 20351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20352 (eval $ac_try) 2>&5
20353 ac_status=$?
c0d27fcc 20354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20355 (exit $ac_status); }; }; then
20356 ac_cv_func_socket=yes
20357else
20358 echo "$as_me: failed program was:" >&5
19650fd6
AS
20359sed 's/^/| /' conftest.$ac_ext >&5
20360
503d2be0
AS
20361ac_cv_func_socket=no
20362fi
edfaf76d
LK
20363rm -f conftest.err conftest.$ac_objext \
20364 conftest$ac_exeext conftest.$ac_ext
503d2be0 20365fi
c0d27fcc 20366echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
503d2be0
AS
20367echo "${ECHO_T}$ac_cv_func_socket" >&6
20368if test $ac_cv_func_socket = yes; then
ba4481b5
DL
20369 :
20370else
503d2be0 20371 ok_so_far=no
ba4481b5
DL
20372fi
20373
20374if test $ok_so_far = yes; then
c0d27fcc
MR
20375 if test "${ac_cv_header_netinet_in_h+set}" = set; then
20376 echo "$as_me:$LINENO: checking for netinet/in.h" >&5
503d2be0
AS
20377echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
20378if test "${ac_cv_header_netinet_in_h+set}" = set; then
20379 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20380fi
20381echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
20382echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
98418dba 20383else
c0d27fcc
MR
20384 # Is the header compilable?
20385echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
20386echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6
20387cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20388/* confdefs.h. */
20389_ACEOF
20390cat confdefs.h >>conftest.$ac_ext
20391cat >>conftest.$ac_ext <<_ACEOF
20392/* end confdefs.h. */
c0d27fcc
MR
20393$ac_includes_default
20394#include <netinet/in.h>
20395_ACEOF
20396rm -f conftest.$ac_objext
20397if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20398 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20399 ac_status=$?
edfaf76d
LK
20400 grep -v '^ *+' conftest.er1 >conftest.err
20401 rm -f conftest.er1
20402 cat conftest.err >&5
c0d27fcc
MR
20403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20404 (exit $ac_status); } &&
edfaf76d
LK
20405 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20407 (eval $ac_try) 2>&5
20408 ac_status=$?
20409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20410 (exit $ac_status); }; } &&
20411 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20413 (eval $ac_try) 2>&5
20414 ac_status=$?
20415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20416 (exit $ac_status); }; }; then
20417 ac_header_compiler=yes
20418else
20419 echo "$as_me: failed program was:" >&5
19650fd6
AS
20420sed 's/^/| /' conftest.$ac_ext >&5
20421
c0d27fcc
MR
20422ac_header_compiler=no
20423fi
edfaf76d 20424rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20425echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20426echo "${ECHO_T}$ac_header_compiler" >&6
20427
20428# Is the header present?
20429echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
20430echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6
20431cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20432/* confdefs.h. */
20433_ACEOF
20434cat confdefs.h >>conftest.$ac_ext
20435cat >>conftest.$ac_ext <<_ACEOF
20436/* end confdefs.h. */
ba4481b5 20437#include <netinet/in.h>
503d2be0 20438_ACEOF
c0d27fcc 20439if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20440 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20441 ac_status=$?
6bae0ccf 20442 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20443 rm -f conftest.er1
20444 cat conftest.err >&5
c0d27fcc 20445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20446 (exit $ac_status); } >/dev/null; then
20447 if test -s conftest.err; then
20448 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 20449 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20450 else
20451 ac_cpp_err=
20452 fi
20453else
20454 ac_cpp_err=yes
20455fi
20456if test -z "$ac_cpp_err"; then
c0d27fcc 20457 ac_header_preproc=yes
ba4481b5 20458else
503d2be0 20459 echo "$as_me: failed program was:" >&5
19650fd6
AS
20460sed 's/^/| /' conftest.$ac_ext >&5
20461
c0d27fcc 20462 ac_header_preproc=no
ba4481b5 20463fi
503d2be0 20464rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20465echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20466echo "${ECHO_T}$ac_header_preproc" >&6
20467
20468# So? What about this header?
edfaf76d
LK
20469case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20470 yes:no: )
c0d27fcc
MR
20471 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
20472echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20473 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
20474echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
20475 ac_header_preproc=yes
19650fd6 20476 ;;
edfaf76d 20477 no:yes:* )
c0d27fcc
MR
20478 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
20479echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
edfaf76d
LK
20480 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
20481echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
20482 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
20483echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
20484 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
20485echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20486 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 20487echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20488 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
20489echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20490 (
20491 cat <<\_ASBOX
edfaf76d
LK
20492## ------------------------------------------ ##
20493## Report this to the AC_PACKAGE_NAME lists. ##
20494## ------------------------------------------ ##
19650fd6
AS
20495_ASBOX
20496 ) |
20497 sed "s/^/$as_me: WARNING: /" >&2
20498 ;;
c0d27fcc
MR
20499esac
20500echo "$as_me:$LINENO: checking for netinet/in.h" >&5
20501echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
20502if test "${ac_cv_header_netinet_in_h+set}" = set; then
20503 echo $ECHO_N "(cached) $ECHO_C" >&6
20504else
20505 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 20506fi
c0d27fcc 20507echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
503d2be0 20508echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
c0d27fcc
MR
20509
20510fi
503d2be0 20511if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
20512 :
20513else
503d2be0 20514 ok_so_far=no
ba4481b5
DL
20515fi
20516
c0d27fcc 20517
ba4481b5
DL
20518fi
20519if test $ok_so_far = yes; then
c0d27fcc
MR
20520 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
20521 echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
503d2be0
AS
20522echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
20523if test "${ac_cv_header_arpa_inet_h+set}" = set; then
20524 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20525fi
20526echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
20527echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
98418dba 20528else
c0d27fcc
MR
20529 # Is the header compilable?
20530echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
20531echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6
20532cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20533/* confdefs.h. */
20534_ACEOF
20535cat confdefs.h >>conftest.$ac_ext
20536cat >>conftest.$ac_ext <<_ACEOF
20537/* end confdefs.h. */
c0d27fcc
MR
20538$ac_includes_default
20539#include <arpa/inet.h>
20540_ACEOF
20541rm -f conftest.$ac_objext
20542if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20543 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20544 ac_status=$?
edfaf76d
LK
20545 grep -v '^ *+' conftest.er1 >conftest.err
20546 rm -f conftest.er1
20547 cat conftest.err >&5
c0d27fcc
MR
20548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20549 (exit $ac_status); } &&
edfaf76d
LK
20550 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20552 (eval $ac_try) 2>&5
20553 ac_status=$?
20554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20555 (exit $ac_status); }; } &&
20556 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20558 (eval $ac_try) 2>&5
20559 ac_status=$?
20560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20561 (exit $ac_status); }; }; then
20562 ac_header_compiler=yes
20563else
20564 echo "$as_me: failed program was:" >&5
19650fd6
AS
20565sed 's/^/| /' conftest.$ac_ext >&5
20566
c0d27fcc
MR
20567ac_header_compiler=no
20568fi
edfaf76d 20569rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20570echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20571echo "${ECHO_T}$ac_header_compiler" >&6
20572
20573# Is the header present?
20574echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
20575echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6
20576cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20577/* confdefs.h. */
20578_ACEOF
20579cat confdefs.h >>conftest.$ac_ext
20580cat >>conftest.$ac_ext <<_ACEOF
20581/* end confdefs.h. */
ba4481b5 20582#include <arpa/inet.h>
503d2be0 20583_ACEOF
c0d27fcc 20584if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20585 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20586 ac_status=$?
6bae0ccf 20587 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20588 rm -f conftest.er1
20589 cat conftest.err >&5
c0d27fcc 20590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20591 (exit $ac_status); } >/dev/null; then
20592 if test -s conftest.err; then
20593 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 20594 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20595 else
20596 ac_cpp_err=
20597 fi
20598else
20599 ac_cpp_err=yes
20600fi
20601if test -z "$ac_cpp_err"; then
c0d27fcc 20602 ac_header_preproc=yes
ba4481b5 20603else
503d2be0 20604 echo "$as_me: failed program was:" >&5
19650fd6
AS
20605sed 's/^/| /' conftest.$ac_ext >&5
20606
c0d27fcc 20607 ac_header_preproc=no
ba4481b5 20608fi
503d2be0 20609rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20610echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20611echo "${ECHO_T}$ac_header_preproc" >&6
20612
20613# So? What about this header?
edfaf76d
LK
20614case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20615 yes:no: )
c0d27fcc
MR
20616 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
20617echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20618 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
20619echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
20620 ac_header_preproc=yes
19650fd6 20621 ;;
edfaf76d 20622 no:yes:* )
c0d27fcc
MR
20623 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
20624echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
edfaf76d
LK
20625 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
20626echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
20627 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
20628echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
20629 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
20630echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20631 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 20632echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20633 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
20634echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20635 (
20636 cat <<\_ASBOX
edfaf76d
LK
20637## ------------------------------------------ ##
20638## Report this to the AC_PACKAGE_NAME lists. ##
20639## ------------------------------------------ ##
19650fd6
AS
20640_ASBOX
20641 ) |
20642 sed "s/^/$as_me: WARNING: /" >&2
20643 ;;
c0d27fcc
MR
20644esac
20645echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
20646echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
20647if test "${ac_cv_header_arpa_inet_h+set}" = set; then
20648 echo $ECHO_N "(cached) $ECHO_C" >&6
20649else
20650 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 20651fi
c0d27fcc 20652echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
503d2be0 20653echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
c0d27fcc
MR
20654
20655fi
503d2be0 20656if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
20657 :
20658else
503d2be0 20659 ok_so_far=no
ba4481b5
DL
20660fi
20661
c0d27fcc 20662
ba4481b5
DL
20663fi
20664if test $ok_so_far = yes; then
b936fae4 20665
c0d27fcc 20666cat >>confdefs.h <<\_ACEOF
ba4481b5 20667#define HAVE_INET_SOCKETS 1
c0d27fcc 20668_ACEOF
ba4481b5
DL
20669
20670fi
20671
2d2b6695 20672
7862d3a8 20673for ac_header in sys/ioctl.h
2d2b6695
KS
20674do
20675as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20676if eval "test \"\${$as_ac_Header+set}\" = set"; then
20677 echo "$as_me:$LINENO: checking for $ac_header" >&5
20678echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20679if eval "test \"\${$as_ac_Header+set}\" = set"; then
20680 echo $ECHO_N "(cached) $ECHO_C" >&6
20681fi
20682echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20683echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20684else
20685 # Is the header compilable?
20686echo "$as_me:$LINENO: checking $ac_header usability" >&5
20687echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20688cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
20689/* confdefs.h. */
20690_ACEOF
20691cat confdefs.h >>conftest.$ac_ext
20692cat >>conftest.$ac_ext <<_ACEOF
20693/* end confdefs.h. */
20694$ac_includes_default
20695#include <$ac_header>
20696_ACEOF
20697rm -f conftest.$ac_objext
20698if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20699 (eval $ac_compile) 2>conftest.er1
2d2b6695 20700 ac_status=$?
edfaf76d
LK
20701 grep -v '^ *+' conftest.er1 >conftest.err
20702 rm -f conftest.er1
20703 cat conftest.err >&5
2d2b6695
KS
20704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20705 (exit $ac_status); } &&
edfaf76d
LK
20706 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20708 (eval $ac_try) 2>&5
20709 ac_status=$?
20710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20711 (exit $ac_status); }; } &&
20712 { ac_try='test -s conftest.$ac_objext'
2d2b6695
KS
20713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20714 (eval $ac_try) 2>&5
20715 ac_status=$?
20716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20717 (exit $ac_status); }; }; then
20718 ac_header_compiler=yes
20719else
20720 echo "$as_me: failed program was:" >&5
20721sed 's/^/| /' conftest.$ac_ext >&5
20722
20723ac_header_compiler=no
20724fi
edfaf76d 20725rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2d2b6695
KS
20726echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20727echo "${ECHO_T}$ac_header_compiler" >&6
20728
20729# Is the header present?
20730echo "$as_me:$LINENO: checking $ac_header presence" >&5
20731echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20732cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
20733/* confdefs.h. */
20734_ACEOF
20735cat confdefs.h >>conftest.$ac_ext
20736cat >>conftest.$ac_ext <<_ACEOF
20737/* end confdefs.h. */
20738#include <$ac_header>
20739_ACEOF
20740if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20741 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20742 ac_status=$?
20743 grep -v '^ *+' conftest.er1 >conftest.err
20744 rm -f conftest.er1
20745 cat conftest.err >&5
20746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20747 (exit $ac_status); } >/dev/null; then
20748 if test -s conftest.err; then
20749 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 20750 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2d2b6695
KS
20751 else
20752 ac_cpp_err=
20753 fi
20754else
20755 ac_cpp_err=yes
20756fi
20757if test -z "$ac_cpp_err"; then
20758 ac_header_preproc=yes
20759else
20760 echo "$as_me: failed program was:" >&5
20761sed 's/^/| /' conftest.$ac_ext >&5
20762
20763 ac_header_preproc=no
20764fi
20765rm -f conftest.err conftest.$ac_ext
20766echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20767echo "${ECHO_T}$ac_header_preproc" >&6
20768
20769# So? What about this header?
edfaf76d
LK
20770case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20771 yes:no: )
2d2b6695
KS
20772 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20773echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20774 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20775echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20776 ac_header_preproc=yes
2d2b6695 20777 ;;
edfaf76d 20778 no:yes:* )
2d2b6695
KS
20779 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20780echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20781 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20782echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20783 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20784echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20785 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20786echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
20787 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
20788echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20789 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20790echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
2d2b6695
KS
20791 (
20792 cat <<\_ASBOX
edfaf76d
LK
20793## ------------------------------------------ ##
20794## Report this to the AC_PACKAGE_NAME lists. ##
20795## ------------------------------------------ ##
2d2b6695
KS
20796_ASBOX
20797 ) |
20798 sed "s/^/$as_me: WARNING: /" >&2
20799 ;;
20800esac
20801echo "$as_me:$LINENO: checking for $ac_header" >&5
20802echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20803if eval "test \"\${$as_ac_Header+set}\" = set"; then
20804 echo $ECHO_N "(cached) $ECHO_C" >&6
20805else
edfaf76d 20806 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695
KS
20807fi
20808echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20809echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20810
20811fi
20812if test `eval echo '${'$as_ac_Header'}'` = yes; then
20813 cat >>confdefs.h <<_ACEOF
20814#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20815_ACEOF
20816
20817fi
20818
20819done
20820
20821
ba4481b5 20822if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 20823
c0d27fcc 20824cat >>confdefs.h <<\_ACEOF
ba4481b5 20825#define HAVE_AIX_SMT_EXP 1
c0d27fcc 20826_ACEOF
ba4481b5
DL
20827
20828fi
20829
c0d27fcc 20830echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
503d2be0 20831echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6
3d9fec71 20832if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
c0d27fcc 20833 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 20834echo "${ECHO_T}yes" >&6
b936fae4 20835
c0d27fcc 20836cat >>confdefs.h <<\_ACEOF
3d9fec71 20837#define HAVE_DEV_PTMX 1
c0d27fcc 20838_ACEOF
3d9fec71
DL
20839
20840else
c0d27fcc 20841 echo "$as_me:$LINENO: result: no" >&5
503d2be0 20842echo "${ECHO_T}no" >&6
3d9fec71
DL
20843fi
20844
c0d27fcc 20845echo "$as_me:$LINENO: checking for pid_t" >&5
503d2be0
AS
20846echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
20847if test "${ac_cv_type_pid_t+set}" = set; then
20848 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 20849else
503d2be0 20850 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20851/* confdefs.h. */
20852_ACEOF
20853cat confdefs.h >>conftest.$ac_ext
20854cat >>conftest.$ac_ext <<_ACEOF
20855/* end confdefs.h. */
503d2be0
AS
20856$ac_includes_default
20857int
20858main ()
20859{
20860if ((pid_t *) 0)
20861 return 0;
20862if (sizeof (pid_t))
20863 return 0;
20864 ;
20865 return 0;
20866}
20867_ACEOF
20868rm -f conftest.$ac_objext
c0d27fcc 20869if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20870 (eval $ac_compile) 2>conftest.er1
503d2be0 20871 ac_status=$?
edfaf76d
LK
20872 grep -v '^ *+' conftest.er1 >conftest.err
20873 rm -f conftest.er1
20874 cat conftest.err >&5
c0d27fcc 20875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20876 (exit $ac_status); } &&
edfaf76d
LK
20877 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20879 (eval $ac_try) 2>&5
20880 ac_status=$?
20881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20882 (exit $ac_status); }; } &&
20883 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 20884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20885 (eval $ac_try) 2>&5
20886 ac_status=$?
c0d27fcc 20887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20888 (exit $ac_status); }; }; then
647847ea
DL
20889 ac_cv_type_pid_t=yes
20890else
503d2be0 20891 echo "$as_me: failed program was:" >&5
19650fd6
AS
20892sed 's/^/| /' conftest.$ac_ext >&5
20893
503d2be0 20894ac_cv_type_pid_t=no
647847ea 20895fi
edfaf76d 20896rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 20897fi
c0d27fcc 20898echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
503d2be0
AS
20899echo "${ECHO_T}$ac_cv_type_pid_t" >&6
20900if test $ac_cv_type_pid_t = yes; then
20901 :
20902else
20903
c0d27fcc 20904cat >>confdefs.h <<_ACEOF
647847ea 20905#define pid_t int
c0d27fcc 20906_ACEOF
647847ea
DL
20907
20908fi
20909
c0d27fcc
MR
20910
20911
503d2be0
AS
20912for ac_header in unistd.h vfork.h
20913do
20914as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20915if eval "test \"\${$as_ac_Header+set}\" = set"; then
20916 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
20917echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20918if eval "test \"\${$as_ac_Header+set}\" = set"; then
20919 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20920fi
20921echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20922echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 20923else
c0d27fcc
MR
20924 # Is the header compilable?
20925echo "$as_me:$LINENO: checking $ac_header usability" >&5
20926echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20927cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20928/* confdefs.h. */
20929_ACEOF
20930cat confdefs.h >>conftest.$ac_ext
20931cat >>conftest.$ac_ext <<_ACEOF
20932/* end confdefs.h. */
c0d27fcc
MR
20933$ac_includes_default
20934#include <$ac_header>
20935_ACEOF
20936rm -f conftest.$ac_objext
20937if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20938 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20939 ac_status=$?
edfaf76d
LK
20940 grep -v '^ *+' conftest.er1 >conftest.err
20941 rm -f conftest.er1
20942 cat conftest.err >&5
c0d27fcc
MR
20943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20944 (exit $ac_status); } &&
edfaf76d
LK
20945 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20947 (eval $ac_try) 2>&5
20948 ac_status=$?
20949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20950 (exit $ac_status); }; } &&
20951 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20953 (eval $ac_try) 2>&5
20954 ac_status=$?
20955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20956 (exit $ac_status); }; }; then
20957 ac_header_compiler=yes
20958else
20959 echo "$as_me: failed program was:" >&5
19650fd6
AS
20960sed 's/^/| /' conftest.$ac_ext >&5
20961
c0d27fcc
MR
20962ac_header_compiler=no
20963fi
edfaf76d 20964rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20965echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20966echo "${ECHO_T}$ac_header_compiler" >&6
20967
20968# Is the header present?
20969echo "$as_me:$LINENO: checking $ac_header presence" >&5
20970echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20971cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20972/* confdefs.h. */
20973_ACEOF
20974cat confdefs.h >>conftest.$ac_ext
20975cat >>conftest.$ac_ext <<_ACEOF
20976/* end confdefs.h. */
503d2be0
AS
20977#include <$ac_header>
20978_ACEOF
c0d27fcc 20979if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20980 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20981 ac_status=$?
6bae0ccf 20982 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20983 rm -f conftest.er1
20984 cat conftest.err >&5
c0d27fcc 20985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20986 (exit $ac_status); } >/dev/null; then
20987 if test -s conftest.err; then
20988 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 20989 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20990 else
20991 ac_cpp_err=
20992 fi
647847ea 20993else
503d2be0
AS
20994 ac_cpp_err=yes
20995fi
20996if test -z "$ac_cpp_err"; then
c0d27fcc 20997 ac_header_preproc=yes
647847ea 20998else
503d2be0 20999 echo "$as_me: failed program was:" >&5
19650fd6
AS
21000sed 's/^/| /' conftest.$ac_ext >&5
21001
c0d27fcc 21002 ac_header_preproc=no
647847ea 21003fi
503d2be0 21004rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
21005echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21006echo "${ECHO_T}$ac_header_preproc" >&6
21007
21008# So? What about this header?
edfaf76d
LK
21009case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21010 yes:no: )
c0d27fcc
MR
21011 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21012echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21013 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21014echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21015 ac_header_preproc=yes
19650fd6 21016 ;;
edfaf76d 21017 no:yes:* )
c0d27fcc
MR
21018 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21019echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21020 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21021echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21022 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21023echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21024 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21025echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21026 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21027echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21028 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21029echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
21030 (
21031 cat <<\_ASBOX
edfaf76d
LK
21032## ------------------------------------------ ##
21033## Report this to the AC_PACKAGE_NAME lists. ##
21034## ------------------------------------------ ##
19650fd6
AS
21035_ASBOX
21036 ) |
21037 sed "s/^/$as_me: WARNING: /" >&2
21038 ;;
c0d27fcc
MR
21039esac
21040echo "$as_me:$LINENO: checking for $ac_header" >&5
21041echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21042if eval "test \"\${$as_ac_Header+set}\" = set"; then
21043 echo $ECHO_N "(cached) $ECHO_C" >&6
21044else
edfaf76d 21045 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 21046fi
c0d27fcc 21047echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 21048echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
21049
21050fi
503d2be0 21051if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21052 cat >>confdefs.h <<_ACEOF
503d2be0 21053#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21054_ACEOF
647847ea 21055
73b77ee5 21056fi
c0d27fcc 21057
503d2be0 21058done
73b77ee5 21059
c0d27fcc
MR
21060
21061
503d2be0
AS
21062for ac_func in fork vfork
21063do
21064as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 21065echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
21066echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21067if eval "test \"\${$as_ac_var+set}\" = set"; then
21068 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 21069else
503d2be0 21070 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21071/* confdefs.h. */
21072_ACEOF
21073cat confdefs.h >>conftest.$ac_ext
21074cat >>conftest.$ac_ext <<_ACEOF
21075/* end confdefs.h. */
edfaf76d
LK
21076/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21077 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21078#define $ac_func innocuous_$ac_func
21079
fa0b693c 21080/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21081 which can conflict with char $ac_func (); below.
21082 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21083 <limits.h> exists even on freestanding compilers. */
edfaf76d 21084
19650fd6
AS
21085#ifdef __STDC__
21086# include <limits.h>
21087#else
21088# include <assert.h>
21089#endif
edfaf76d
LK
21090
21091#undef $ac_func
21092
fa0b693c 21093/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
21094#ifdef __cplusplus
21095extern "C"
19650fd6 21096{
503d2be0 21097#endif
fa0b693c 21098/* We use char because int might match the return type of a gcc2
503d2be0
AS
21099 builtin and then its argument prototype would still apply. */
21100char $ac_func ();
fa0b693c
GM
21101/* The GNU C library defines this for functions which it implements
21102 to always fail with ENOSYS. Some functions are actually named
21103 something starting with __ and the normal name is an alias. */
503d2be0 21104#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
fa0b693c
GM
21105choke me
21106#else
19650fd6
AS
21107char (*f) () = $ac_func;
21108#endif
21109#ifdef __cplusplus
21110}
fa0b693c
GM
21111#endif
21112
19650fd6
AS
21113int
21114main ()
21115{
21116return f != $ac_func;
503d2be0
AS
21117 ;
21118 return 0;
21119}
21120_ACEOF
21121rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 21122if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 21123 (eval $ac_link) 2>conftest.er1
503d2be0 21124 ac_status=$?
edfaf76d
LK
21125 grep -v '^ *+' conftest.er1 >conftest.err
21126 rm -f conftest.er1
21127 cat conftest.err >&5
c0d27fcc 21128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21129 (exit $ac_status); } &&
edfaf76d
LK
21130 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21132 (eval $ac_try) 2>&5
21133 ac_status=$?
21134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21135 (exit $ac_status); }; } &&
21136 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 21137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21138 (eval $ac_try) 2>&5
21139 ac_status=$?
c0d27fcc 21140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21141 (exit $ac_status); }; }; then
21142 eval "$as_ac_var=yes"
21143else
21144 echo "$as_me: failed program was:" >&5
19650fd6
AS
21145sed 's/^/| /' conftest.$ac_ext >&5
21146
503d2be0
AS
21147eval "$as_ac_var=no"
21148fi
edfaf76d
LK
21149rm -f conftest.err conftest.$ac_objext \
21150 conftest$ac_exeext conftest.$ac_ext
503d2be0 21151fi
c0d27fcc 21152echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
21153echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21154if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 21155 cat >>confdefs.h <<_ACEOF
503d2be0 21156#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 21157_ACEOF
503d2be0 21158
fa0b693c 21159fi
503d2be0 21160done
fa0b693c 21161
503d2be0 21162if test "x$ac_cv_func_fork" = xyes; then
c0d27fcc 21163 echo "$as_me:$LINENO: checking for working fork" >&5
503d2be0
AS
21164echo $ECHO_N "checking for working fork... $ECHO_C" >&6
21165if test "${ac_cv_func_fork_works+set}" = set; then
21166 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 21167else
503d2be0
AS
21168 if test "$cross_compiling" = yes; then
21169 ac_cv_func_fork_works=cross
21170else
21171 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 21172/* By Ruediger Kuhlmann. */
503d2be0
AS
21173 #include <sys/types.h>
21174 #if HAVE_UNISTD_H
21175 # include <unistd.h>
21176 #endif
21177 /* Some systems only have a dummy stub for fork() */
21178 int main ()
21179 {
edfaf76d
LK
21180 if (fork() < 0)
21181 exit (1);
21182 exit (0);
503d2be0
AS
21183 }
21184_ACEOF
21185rm -f conftest$ac_exeext
c0d27fcc 21186if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
21187 (eval $ac_link) 2>&5
21188 ac_status=$?
c0d27fcc 21189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21190 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 21191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21192 (eval $ac_try) 2>&5
21193 ac_status=$?
c0d27fcc 21194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21195 (exit $ac_status); }; }; then
21196 ac_cv_func_fork_works=yes
21197else
21198 echo "$as_me: program exited with status $ac_status" >&5
21199echo "$as_me: failed program was:" >&5
19650fd6
AS
21200sed 's/^/| /' conftest.$ac_ext >&5
21201
c0d27fcc 21202( exit $ac_status )
503d2be0
AS
21203ac_cv_func_fork_works=no
21204fi
edfaf76d 21205rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
21206fi
21207fi
c0d27fcc 21208echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
503d2be0
AS
21209echo "${ECHO_T}$ac_cv_func_fork_works" >&6
21210
6bae0ccf
DL
21211else
21212 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
21213fi
21214if test "x$ac_cv_func_fork_works" = xcross; then
21215 case $host in
21216 *-*-amigaos* | *-*-msdosdjgpp*)
21217 # Override, as these systems have only a dummy fork() stub
21218 ac_cv_func_fork_works=no
21219 ;;
21220 *)
21221 ac_cv_func_fork_works=yes
21222 ;;
21223 esac
c0d27fcc
MR
21224 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
21225echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 21226fi
73b77ee5 21227ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 21228if test "x$ac_cv_func_vfork" = xyes; then
c0d27fcc 21229 echo "$as_me:$LINENO: checking for working vfork" >&5
503d2be0
AS
21230echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
21231if test "${ac_cv_func_vfork_works+set}" = set; then
21232 echo $ECHO_N "(cached) $ECHO_C" >&6
21233else
21234 if test "$cross_compiling" = yes; then
21235 ac_cv_func_vfork_works=cross
fa0b693c 21236else
503d2be0 21237 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21238/* confdefs.h. */
21239_ACEOF
21240cat confdefs.h >>conftest.$ac_ext
21241cat >>conftest.$ac_ext <<_ACEOF
21242/* end confdefs.h. */
73b77ee5
GM
21243/* Thanks to Paul Eggert for this test. */
21244#include <stdio.h>
19650fd6 21245#include <stdlib.h>
fa0b693c 21246#include <sys/types.h>
73b77ee5 21247#include <sys/stat.h>
19650fd6 21248#include <sys/wait.h>
503d2be0
AS
21249#if HAVE_UNISTD_H
21250# include <unistd.h>
73b77ee5 21251#endif
503d2be0
AS
21252#if HAVE_VFORK_H
21253# include <vfork.h>
73b77ee5
GM
21254#endif
21255/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
21256 argument registers are propagated back to the parent. The compiler
21257 is told about this with #include <vfork.h>, but some compilers
21258 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
21259 static variable whose address is put into a register that is
21260 clobbered by the vfork. */
19650fd6 21261static void
fa0b693c 21262#ifdef __cplusplus
73b77ee5 21263sparc_address_test (int arg)
503d2be0 21264# else
73b77ee5 21265sparc_address_test (arg) int arg;
fa0b693c 21266#endif
fa0b693c 21267{
73b77ee5
GM
21268 static pid_t child;
21269 if (!child) {
21270 child = vfork ();
21271 if (child < 0) {
21272 perror ("vfork");
21273 _exit(2);
21274 }
21275 if (!child) {
21276 arg = getpid();
21277 write(-1, "", 0);
21278 _exit (arg);
21279 }
21280 }
21281}
503d2be0
AS
21282
21283int
21284main ()
21285{
73b77ee5
GM
21286 pid_t parent = getpid ();
21287 pid_t child;
fa0b693c 21288
19650fd6 21289 sparc_address_test (0);
fa0b693c 21290
73b77ee5 21291 child = vfork ();
fa0b693c 21292
73b77ee5 21293 if (child == 0) {
503d2be0
AS
21294 /* Here is another test for sparc vfork register problems. This
21295 test uses lots of local variables, at least as many local
21296 variables as main has allocated so far including compiler
21297 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
21298 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
21299 reuse the register of parent for one of the local variables,
21300 since it will think that parent can't possibly be used any more
21301 in this routine. Assigning to the local variable will thus
21302 munge parent in the parent process. */
73b77ee5
GM
21303 pid_t
21304 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
21305 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
21306 /* Convince the compiler that p..p7 are live; otherwise, it might
21307 use the same hardware register for all 8 local variables. */
21308 if (p != p1 || p != p2 || p != p3 || p != p4
21309 || p != p5 || p != p6 || p != p7)
21310 _exit(1);
fa0b693c 21311
503d2be0
AS
21312 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
21313 from child file descriptors. If the child closes a descriptor
21314 before it execs or exits, this munges the parent's descriptor
21315 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
21316 _exit(close(fileno(stdout)) != 0);
21317 } else {
21318 int status;
21319 struct stat st;
21320
21321 while (wait(&status) != child)
21322 ;
21323 exit(
21324 /* Was there some problem with vforking? */
21325 child < 0
21326
21327 /* Did the child fail? (This shouldn't happen.) */
21328 || status
21329
21330 /* Did the vfork/compiler bug occur? */
21331 || parent != getpid()
fa0b693c 21332
73b77ee5
GM
21333 /* Did the file descriptor bug occur? */
21334 || fstat(fileno(stdout), &st) != 0
21335 );
21336 }
21337}
503d2be0
AS
21338_ACEOF
21339rm -f conftest$ac_exeext
c0d27fcc 21340if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
21341 (eval $ac_link) 2>&5
21342 ac_status=$?
c0d27fcc 21343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21344 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 21345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21346 (eval $ac_try) 2>&5
21347 ac_status=$?
c0d27fcc 21348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21349 (exit $ac_status); }; }; then
73b77ee5 21350 ac_cv_func_vfork_works=yes
fa0b693c 21351else
503d2be0
AS
21352 echo "$as_me: program exited with status $ac_status" >&5
21353echo "$as_me: failed program was:" >&5
19650fd6
AS
21354sed 's/^/| /' conftest.$ac_ext >&5
21355
c0d27fcc 21356( exit $ac_status )
503d2be0
AS
21357ac_cv_func_vfork_works=no
21358fi
edfaf76d 21359rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 21360fi
fa0b693c 21361fi
c0d27fcc 21362echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
503d2be0 21363echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
fa0b693c 21364
503d2be0
AS
21365fi;
21366if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 21367 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
21368 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
21369echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
21370fi
21371
503d2be0
AS
21372if test "x$ac_cv_func_vfork_works" = xyes; then
21373
c0d27fcc 21374cat >>confdefs.h <<\_ACEOF
503d2be0 21375#define HAVE_WORKING_VFORK 1
c0d27fcc 21376_ACEOF
503d2be0
AS
21377
21378else
21379
c0d27fcc 21380cat >>confdefs.h <<\_ACEOF
73b77ee5 21381#define vfork fork
c0d27fcc 21382_ACEOF
fa0b693c
GM
21383
21384fi
503d2be0
AS
21385if test "x$ac_cv_func_fork_works" = xyes; then
21386
c0d27fcc 21387cat >>confdefs.h <<\_ACEOF
503d2be0 21388#define HAVE_WORKING_FORK 1
c0d27fcc 21389_ACEOF
fa0b693c 21390
503d2be0 21391fi
647847ea 21392
c0d27fcc 21393
6a3a24fa
JD
21394echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
21395echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
21396if test "${emacs_cv_langinfo_codeset+set}" = set; then
21397 echo $ECHO_N "(cached) $ECHO_C" >&6
21398else
21399 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21400/* confdefs.h. */
21401_ACEOF
21402cat confdefs.h >>conftest.$ac_ext
21403cat >>conftest.$ac_ext <<_ACEOF
21404/* end confdefs.h. */
6a3a24fa
JD
21405#include <langinfo.h>
21406int
21407main ()
21408{
21409char* cs = nl_langinfo(CODESET);
21410 ;
21411 return 0;
21412}
21413_ACEOF
21414rm -f conftest.$ac_objext conftest$ac_exeext
21415if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 21416 (eval $ac_link) 2>conftest.er1
6a3a24fa 21417 ac_status=$?
edfaf76d
LK
21418 grep -v '^ *+' conftest.er1 >conftest.err
21419 rm -f conftest.er1
21420 cat conftest.err >&5
6a3a24fa
JD
21421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21422 (exit $ac_status); } &&
edfaf76d
LK
21423 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
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); }; } &&
21429 { ac_try='test -s conftest$ac_exeext'
6a3a24fa
JD
21430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21431 (eval $ac_try) 2>&5
21432 ac_status=$?
21433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21434 (exit $ac_status); }; }; then
21435 emacs_cv_langinfo_codeset=yes
21436else
21437 echo "$as_me: failed program was:" >&5
19650fd6
AS
21438sed 's/^/| /' conftest.$ac_ext >&5
21439
6a3a24fa
JD
21440emacs_cv_langinfo_codeset=no
21441fi
edfaf76d
LK
21442rm -f conftest.err conftest.$ac_objext \
21443 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
21444
21445fi
21446echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
21447echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6
21448if test $emacs_cv_langinfo_codeset = yes; then
21449
21450cat >>confdefs.h <<\_ACEOF
21451#define HAVE_LANGINFO_CODESET 1
21452_ACEOF
21453
21454fi
21455
c0d27fcc 21456echo "$as_me:$LINENO: checking for size_t" >&5
503d2be0
AS
21457echo $ECHO_N "checking for size_t... $ECHO_C" >&6
21458if test "${ac_cv_type_size_t+set}" = set; then
21459 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 21460else
503d2be0 21461 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21462/* confdefs.h. */
21463_ACEOF
21464cat confdefs.h >>conftest.$ac_ext
21465cat >>conftest.$ac_ext <<_ACEOF
21466/* end confdefs.h. */
503d2be0
AS
21467$ac_includes_default
21468int
21469main ()
21470{
21471if ((size_t *) 0)
21472 return 0;
21473if (sizeof (size_t))
21474 return 0;
21475 ;
21476 return 0;
21477}
21478_ACEOF
21479rm -f conftest.$ac_objext
c0d27fcc 21480if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21481 (eval $ac_compile) 2>conftest.er1
503d2be0 21482 ac_status=$?
edfaf76d
LK
21483 grep -v '^ *+' conftest.er1 >conftest.err
21484 rm -f conftest.er1
21485 cat conftest.err >&5
c0d27fcc 21486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21487 (exit $ac_status); } &&
edfaf76d
LK
21488 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21489 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21490 (eval $ac_try) 2>&5
21491 ac_status=$?
21492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21493 (exit $ac_status); }; } &&
21494 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 21495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21496 (eval $ac_try) 2>&5
21497 ac_status=$?
c0d27fcc 21498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21499 (exit $ac_status); }; }; then
8730a8da
DL
21500 ac_cv_type_size_t=yes
21501else
503d2be0 21502 echo "$as_me: failed program was:" >&5
19650fd6
AS
21503sed 's/^/| /' conftest.$ac_ext >&5
21504
503d2be0 21505ac_cv_type_size_t=no
8730a8da 21506fi
edfaf76d 21507rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 21508fi
c0d27fcc 21509echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
503d2be0
AS
21510echo "${ECHO_T}$ac_cv_type_size_t" >&6
21511if test $ac_cv_type_size_t = yes; then
503d2be0 21512
c0d27fcc
MR
21513cat >>confdefs.h <<_ACEOF
21514#define HAVE_SIZE_T 1
21515_ACEOF
21516
8730a8da
DL
21517
21518fi
21519
c0d27fcc 21520
973a76b1
DL
21521echo "$as_me:$LINENO: checking for mbstate_t" >&5
21522echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
21523if test "${ac_cv_type_mbstate_t+set}" = set; then
21524 echo $ECHO_N "(cached) $ECHO_C" >&6
21525else
21526 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21527/* confdefs.h. */
21528_ACEOF
21529cat confdefs.h >>conftest.$ac_ext
21530cat >>conftest.$ac_ext <<_ACEOF
21531/* end confdefs.h. */
973a76b1
DL
21532$ac_includes_default
21533# include <wchar.h>
21534int
21535main ()
21536{
21537mbstate_t x; return sizeof x;
21538 ;
21539 return 0;
21540}
21541_ACEOF
21542rm -f conftest.$ac_objext
21543if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21544 (eval $ac_compile) 2>conftest.er1
973a76b1 21545 ac_status=$?
edfaf76d
LK
21546 grep -v '^ *+' conftest.er1 >conftest.err
21547 rm -f conftest.er1
21548 cat conftest.err >&5
973a76b1
DL
21549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21550 (exit $ac_status); } &&
edfaf76d
LK
21551 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21553 (eval $ac_try) 2>&5
21554 ac_status=$?
21555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21556 (exit $ac_status); }; } &&
21557 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
21558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21559 (eval $ac_try) 2>&5
21560 ac_status=$?
21561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21562 (exit $ac_status); }; }; then
21563 ac_cv_type_mbstate_t=yes
21564else
21565 echo "$as_me: failed program was:" >&5
19650fd6
AS
21566sed 's/^/| /' conftest.$ac_ext >&5
21567
973a76b1
DL
21568ac_cv_type_mbstate_t=no
21569fi
edfaf76d 21570rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1
DL
21571fi
21572echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
21573echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6
21574 if test $ac_cv_type_mbstate_t = yes; then
21575
21576cat >>confdefs.h <<\_ACEOF
21577#define HAVE_MBSTATE_T 1
21578_ACEOF
21579
21580 else
21581
21582cat >>confdefs.h <<\_ACEOF
21583#define mbstate_t int
21584_ACEOF
21585
21586 fi
21587
22044edf
DL
21588echo "$as_me:$LINENO: checking for C restrict keyword" >&5
21589echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6
21590if test "${emacs_cv_c_restrict+set}" = set; then
21591 echo $ECHO_N "(cached) $ECHO_C" >&6
21592else
21593 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21594/* confdefs.h. */
21595_ACEOF
21596cat confdefs.h >>conftest.$ac_ext
21597cat >>conftest.$ac_ext <<_ACEOF
21598/* end confdefs.h. */
22044edf
DL
21599void fred (int *restrict x);
21600int
21601main ()
21602{
b936fae4 21603
22044edf
DL
21604 ;
21605 return 0;
21606}
c0d27fcc 21607_ACEOF
22044edf
DL
21608rm -f conftest.$ac_objext
21609if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21610 (eval $ac_compile) 2>conftest.er1
22044edf 21611 ac_status=$?
edfaf76d
LK
21612 grep -v '^ *+' conftest.er1 >conftest.err
21613 rm -f conftest.er1
21614 cat conftest.err >&5
22044edf
DL
21615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21616 (exit $ac_status); } &&
edfaf76d
LK
21617 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21619 (eval $ac_try) 2>&5
21620 ac_status=$?
21621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21622 (exit $ac_status); }; } &&
21623 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
21624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21625 (eval $ac_try) 2>&5
21626 ac_status=$?
21627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21628 (exit $ac_status); }; }; then
21629 emacs_cv_c_restrict=yes
21630else
21631 echo "$as_me: failed program was:" >&5
19650fd6
AS
21632sed 's/^/| /' conftest.$ac_ext >&5
21633
22044edf 21634cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21635/* confdefs.h. */
21636_ACEOF
21637cat confdefs.h >>conftest.$ac_ext
21638cat >>conftest.$ac_ext <<_ACEOF
21639/* end confdefs.h. */
22044edf
DL
21640void fred (int *__restrict x);
21641int
21642main ()
21643{
c0d27fcc 21644
22044edf
DL
21645 ;
21646 return 0;
21647}
c0d27fcc 21648_ACEOF
22044edf
DL
21649rm -f conftest.$ac_objext
21650if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21651 (eval $ac_compile) 2>conftest.er1
22044edf 21652 ac_status=$?
edfaf76d
LK
21653 grep -v '^ *+' conftest.er1 >conftest.err
21654 rm -f conftest.er1
21655 cat conftest.err >&5
22044edf
DL
21656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21657 (exit $ac_status); } &&
edfaf76d
LK
21658 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21660 (eval $ac_try) 2>&5
21661 ac_status=$?
21662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21663 (exit $ac_status); }; } &&
21664 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
21665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21666 (eval $ac_try) 2>&5
21667 ac_status=$?
21668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21669 (exit $ac_status); }; }; then
21670 emacs_cv_c_restrict=__restrict
21671else
21672 echo "$as_me: failed program was:" >&5
19650fd6
AS
21673sed 's/^/| /' conftest.$ac_ext >&5
21674
22044edf 21675emacs_cv_c_restrict=no
ba4481b5 21676fi
edfaf76d 21677rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 21678fi
edfaf76d 21679rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 21680fi
22044edf
DL
21681echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
21682echo "${ECHO_T}$emacs_cv_c_restrict" >&6
21683case "$emacs_cv_c_restrict" in
21684 yes) emacs_restrict=restrict;;
21685 no) emacs_restrict="";;
21686 *) emacs_restrict="$emacs_cv_c_restrict";;
21687esac
21688if test "$emacs_restrict" != __restrict; then
b936fae4 21689
22044edf
DL
21690cat >>confdefs.h <<_ACEOF
21691#define __restrict $emacs_restrict
c0d27fcc 21692_ACEOF
ba4481b5
DL
21693
21694fi
ba4481b5 21695
22044edf
DL
21696echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
21697echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6
21698if test "${emacs_cv_c_restrict_arr+set}" = set; then
21699 echo $ECHO_N "(cached) $ECHO_C" >&6
21700else
21701 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21702/* confdefs.h. */
21703_ACEOF
21704cat confdefs.h >>conftest.$ac_ext
21705cat >>conftest.$ac_ext <<_ACEOF
21706/* end confdefs.h. */
22044edf
DL
21707void fred (int x[__restrict]);
21708int
21709main ()
21710{
b936fae4 21711
22044edf
DL
21712 ;
21713 return 0;
21714}
c0d27fcc 21715_ACEOF
22044edf
DL
21716rm -f conftest.$ac_objext
21717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21718 (eval $ac_compile) 2>conftest.er1
22044edf 21719 ac_status=$?
edfaf76d
LK
21720 grep -v '^ *+' conftest.er1 >conftest.err
21721 rm -f conftest.er1
21722 cat conftest.err >&5
22044edf
DL
21723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21724 (exit $ac_status); } &&
edfaf76d
LK
21725 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21727 (eval $ac_try) 2>&5
21728 ac_status=$?
21729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21730 (exit $ac_status); }; } &&
21731 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
21732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21733 (eval $ac_try) 2>&5
21734 ac_status=$?
21735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21736 (exit $ac_status); }; }; then
21737 emacs_cv_c_restrict_arr=yes
21738else
21739 echo "$as_me: failed program was:" >&5
19650fd6
AS
21740sed 's/^/| /' conftest.$ac_ext >&5
21741
22044edf 21742emacs_cv_c_restrict_arr=no
ba4481b5 21743fi
edfaf76d 21744rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf
DL
21745fi
21746echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
21747echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6
21748if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 21749
c0d27fcc 21750cat >>confdefs.h <<\_ACEOF
22044edf 21751#define __restrict_arr __restrict
c0d27fcc 21752_ACEOF
ba4481b5 21753
ba4481b5
DL
21754fi
21755
c0d27fcc 21756
c0d27fcc 21757
22044edf
DL
21758# Set up the CFLAGS for real compilation, so we can substitute it.
21759CFLAGS="$REAL_CFLAGS"
21760CPPFLAGS="$REAL_CPPFLAGS"
21761
21762#### Find out which version of Emacs this is.
21763version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
21764 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
21765if test x"${version}" = x; then
21766 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
21767echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
21768 { (exit 1); exit 1; }; }
21769fi
21770
21771### Specify what sort of things we'll be editing into Makefile and config.h.
21772### Use configuration here uncanonicalized to avoid exceeding size limits.
21773
21774
21775
21776
21777
21778
21779
21780
21781
21782
21783
21784
21785
21786
21787
21788
21789
21790
21791
21792
21793
21794
21795
21796
21797
21798
21799
21800
21801
21802
21803
21804
6a3a24fa 21805
22044edf
DL
21806
21807
21808cat >>confdefs.h <<_ACEOF
21809#define EMACS_CONFIGURATION "${canonical}"
21810_ACEOF
21811
21812
21813cat >>confdefs.h <<_ACEOF
21814#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
21815_ACEOF
21816
21817
21818cat >>confdefs.h <<_ACEOF
21819#define config_machfile "${machfile}"
21820_ACEOF
21821
21822
21823cat >>confdefs.h <<_ACEOF
21824#define config_opsysfile "${opsysfile}"
21825_ACEOF
21826
21827
21828cat >>confdefs.h <<_ACEOF
21829#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
21830_ACEOF
21831
21832
21833cat >>confdefs.h <<_ACEOF
21834#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
21835_ACEOF
21836
21837
21838cat >>confdefs.h <<_ACEOF
21839#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
21840_ACEOF
21841
21842
21843cat >>confdefs.h <<_ACEOF
21844#define UNEXEC_SRC ${UNEXEC_SRC}
21845_ACEOF
21846
21847
21848if test "${HAVE_X_WINDOWS}" = "yes" ; then
21849
21850cat >>confdefs.h <<\_ACEOF
21851#define HAVE_X_WINDOWS 1
21852_ACEOF
21853
21854fi
21855if test "${USE_X_TOOLKIT}" != "none" ; then
21856
21857cat >>confdefs.h <<\_ACEOF
21858#define USE_X_TOOLKIT 1
21859_ACEOF
21860
21861fi
21862if test "${HAVE_X11}" = "yes" ; then
21863
21864cat >>confdefs.h <<\_ACEOF
21865#define HAVE_X11 1
21866_ACEOF
21867
21868fi
21869if test "${HAVE_XFREE386}" = "yes" ; then
21870
21871cat >>confdefs.h <<\_ACEOF
21872#define HAVE_XFREE386 1
21873_ACEOF
21874
21875fi
21876if test "${HAVE_MENUS}" = "yes" ; then
21877
21878cat >>confdefs.h <<\_ACEOF
21879#define HAVE_MENUS 1
21880_ACEOF
21881
21882fi
21883if test "${GNU_MALLOC}" = "yes" ; then
21884
21885cat >>confdefs.h <<\_ACEOF
21886#define GNU_MALLOC 1
21887_ACEOF
21888
21889fi
21890if test "${REL_ALLOC}" = "yes" ; then
21891
21892cat >>confdefs.h <<\_ACEOF
21893#define REL_ALLOC 1
21894_ACEOF
21895
21896fi
21897
21898
21899
c0d27fcc
MR
21900
21901
ba4481b5 21902#### Report on what we decided to do.
488dd4c4
JD
21903#### Report GTK as a toolkit, even if it doesn't use Xt.
21904#### It makes printing result more understandable as using GTK sets
21905#### toolkit_scroll_bars to yes by default.
21906if test "${HAVE_GTK}" = "yes"; then
21907 USE_X_TOOLKIT=GTK
21908fi
21909
ba4481b5
DL
21910echo "
21911Configured for \`${canonical}'.
21912
21913 Where should the build process find the source code? ${srcdir}
21914 What operating system and machine description files should Emacs use?
21915 \`${opsysfile}' and \`${machfile}'
21916 What compiler should emacs be built with? ${CC} ${CFLAGS}
21917 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 21918 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 21919 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 21920 What window system should Emacs use? ${window_system}
8e967cf7 21921 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
21922
21923if test -n "${x_includes}"; then
21924echo " Where do we find X Windows header files? ${x_includes}"
21925else
21926echo " Where do we find X Windows header files? Standard dirs"
21927fi
21928if test -n "${x_libraries}"; then
21929echo " Where do we find X Windows libraries? ${x_libraries}"
21930else
21931echo " Where do we find X Windows libraries? Standard dirs"
21932fi
21933
21934echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
21935echo " Does Emacs use -lXpm? ${HAVE_XPM}"
21936echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
21937echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
21938echo " Does Emacs use -lungif? ${HAVE_GIF}"
21939echo " Does Emacs use -lpng? ${HAVE_PNG}"
21940echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
21941echo
21942
d0098f13
JD
21943if test $USE_XASSERTS = yes; then
21944 echo " Compiling with asserts turned on."
d0098f13
JD
21945 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
21946 echo
21947fi
05cf15c6 21948
05cf15c6 21949
05cf15c6 21950
ba4481b5
DL
21951# Remove any trailing slashes in these variables.
21952test "${prefix}" != NONE &&
21953 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
21954test "${exec_prefix}" != NONE &&
21955 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
21956
d0e9bfd2
GM
21957## Check if the C preprocessor will convert `..' to `. .'. If so, set
21958## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
21959## from Makefile.c can correctly provide the arg `-traditional' to the
21960## C preprocessor.
21961
503d2be0 21962cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21963/* confdefs.h. */
21964_ACEOF
21965cat confdefs.h >>conftest.$ac_ext
21966cat >>conftest.$ac_ext <<_ACEOF
21967/* end confdefs.h. */
d0e9bfd2 21968yes..yes
503d2be0 21969_ACEOF
d0e9bfd2 21970if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 21971 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
21972 CPP_NEED_TRADITIONAL=no
21973else
d0e9bfd2
GM
21974 CPP_NEED_TRADITIONAL=yes
21975fi
21976rm -f conftest*
21977
c0d27fcc 21978
6bae0ccf
DL
21979 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"
21980 ac_config_commands="$ac_config_commands default"
503d2be0 21981cat >confcache <<\_ACEOF
ba4481b5
DL
21982# This file is a shell script that caches the results of configure
21983# tests run on this system so they can be shared between configure
503d2be0
AS
21984# scripts and configure runs, see configure's option --config-cache.
21985# It is not useful on other systems. If it contains results you don't
21986# want to keep, you may remove or edit it.
ba4481b5 21987#
503d2be0
AS
21988# config.status only pays attention to the cache file if you give it
21989# the --recheck option to rerun configure.
ba4481b5 21990#
6bae0ccf 21991# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
21992# loading this file, other *unset* `ac_cv_foo' will be assigned the
21993# following values.
21994
21995_ACEOF
21996
ba4481b5
DL
21997# The following way of writing the cache mishandles newlines in values,
21998# but we know of no workaround that is simple, portable, and efficient.
21999# So, don't put newlines in cache variables' values.
22000# Ultrix sh set writes to stderr and can't be redirected directly,
22001# and sets the high bit in the cache file unless we assign to the vars.
503d2be0
AS
22002{
22003 (set) 2>&1 |
22004 case `(ac_space=' '; set | grep ac_space) 2>&1` in
22005 *ac_space=\ *)
22006 # `set' does not quote correctly, so add quotes (double-quote
22007 # substitution turns \\\\ into \\, and sed turns \\ into \).
22008 sed -n \
edfaf76d
LK
22009 "s/'/'\\\\''/g;
22010 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
503d2be0
AS
22011 ;;
22012 *)
22013 # `set' quotes correctly as required by POSIX, so do not add quotes.
22014 sed -n \
edfaf76d 22015 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
503d2be0
AS
22016 ;;
22017 esac;
22018} |
22019 sed '
22020 t clear
22021 : clear
22022 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22023 t end
22024 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22025 : end' >>confcache
19650fd6 22026if diff $cache_file confcache >/dev/null 2>&1; then :; else
ba4481b5 22027 if test -w $cache_file; then
503d2be0
AS
22028 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22029 cat confcache >$cache_file
ba4481b5
DL
22030 else
22031 echo "not updating unwritable cache $cache_file"
22032 fi
22033fi
22034rm -f confcache
22035
ba4481b5
DL
22036test "x$prefix" = xNONE && prefix=$ac_default_prefix
22037# Let make expand exec_prefix.
22038test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22039
503d2be0
AS
22040# VPATH may cause trouble with some makes, so we remove $(srcdir),
22041# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22042# trailing colons and then remove the whole line if VPATH becomes empty
22043# (actually we leave an empty line to preserve line numbers).
ba4481b5 22044if test "x$srcdir" = x.; then
edfaf76d 22045 ac_vpsub='/^[ ]*VPATH[ ]*=/{
503d2be0
AS
22046s/:*\$(srcdir):*/:/;
22047s/:*\${srcdir}:*/:/;
22048s/:*@srcdir@:*/:/;
edfaf76d 22049s/^\([^=]*=[ ]*\):*/\1/;
503d2be0 22050s/:*$//;
edfaf76d 22051s/^[^=]*=[ ]*$//;
503d2be0 22052}'
ba4481b5
DL
22053fi
22054
ba4481b5
DL
22055DEFS=-DHAVE_CONFIG_H
22056
6bae0ccf
DL
22057ac_libobjs=
22058ac_ltlibobjs=
22059for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
22060 # 1. Remove the extension, and $U if already installed.
22061 ac_i=`echo "$ac_i" |
edfaf76d 22062 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
6bae0ccf
DL
22063 # 2. Add them.
22064 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
22065 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
22066done
22067LIBOBJS=$ac_libobjs
22068
22069LTLIBOBJS=$ac_ltlibobjs
22070
22071
c0d27fcc 22072
ba4481b5 22073: ${CONFIG_STATUS=./config.status}
503d2be0
AS
22074ac_clean_files_save=$ac_clean_files
22075ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 22076{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
22077echo "$as_me: creating $CONFIG_STATUS" >&6;}
22078cat >$CONFIG_STATUS <<_ACEOF
22079#! $SHELL
c0d27fcc 22080# Generated by $as_me.
ba4481b5 22081# Run this file to recreate the current configuration.
ba4481b5 22082# Compiler output produced by configure, useful for debugging
503d2be0 22083# configure, is in config.log if it exists.
ba4481b5 22084
503d2be0 22085debug=false
19650fd6
AS
22086ac_cs_recheck=false
22087ac_cs_silent=false
503d2be0 22088SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
22089_ACEOF
22090
22091cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
22092## --------------------- ##
22093## M4sh Initialization. ##
22094## --------------------- ##
22095
503d2be0
AS
22096# Be Bourne compatible
22097if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22098 emulate sh
22099 NULLCMD=:
6bae0ccf
DL
22100 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22101 # is contrary to our usage. Disable this feature.
22102 alias -g '${1+"$@"}'='"$@"'
503d2be0
AS
22103elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22104 set -o posix
22105fi
edfaf76d 22106DUALCASE=1; export DUALCASE # for MKS sh
503d2be0 22107
c0d27fcc 22108# Support unset when possible.
edfaf76d 22109if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
22110 as_unset=unset
22111else
22112 as_unset=false
22113fi
22114
6bae0ccf
DL
22115
22116# Work around bugs in pre-3.0 UWIN ksh.
22117$as_unset ENV MAIL MAILPATH
22118PS1='$ '
22119PS2='> '
22120PS4='+ '
22121
22122# NLS nuisances.
19650fd6
AS
22123for as_var in \
22124 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
22125 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
22126 LC_TELEPHONE LC_TIME
6bae0ccf 22127do
edfaf76d 22128 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
22129 eval $as_var=C; export $as_var
22130 else
22131 $as_unset $as_var
22132 fi
22133done
22134
22135# Required to use basename.
22136if expr a : '\(a\)' >/dev/null 2>&1; then
22137 as_expr=expr
22138else
22139 as_expr=false
22140fi
22141
22142if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
22143 as_basename=basename
22144else
22145 as_basename=false
22146fi
c0d27fcc
MR
22147
22148
503d2be0 22149# Name of the executable.
6bae0ccf 22150as_me=`$as_basename "$0" ||
c0d27fcc
MR
22151$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22152 X"$0" : 'X\(//\)$' \| \
22153 X"$0" : 'X\(/\)$' \| \
22154 . : '\(.\)' 2>/dev/null ||
22155echo X/"$0" |
22156 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
22157 /^X\/\(\/\/\)$/{ s//\1/; q; }
22158 /^X\/\(\/\).*/{ s//\1/; q; }
22159 s/.*/./; q'`
22160
6bae0ccf 22161
c0d27fcc
MR
22162# PATH needs CR, and LINENO needs CR and PATH.
22163# Avoid depending upon Character Ranges.
22164as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22165as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22166as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22167as_cr_digits='0123456789'
22168as_cr_alnum=$as_cr_Letters$as_cr_digits
22169
22170# The user is always right.
22171if test "${PATH_SEPARATOR+set}" != set; then
19650fd6
AS
22172 echo "#! /bin/sh" >conf$$.sh
22173 echo "exit 0" >>conf$$.sh
22174 chmod +x conf$$.sh
22175 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
c0d27fcc
MR
22176 PATH_SEPARATOR=';'
22177 else
22178 PATH_SEPARATOR=:
22179 fi
19650fd6 22180 rm -f conf$$.sh
c0d27fcc
MR
22181fi
22182
22183
22184 as_lineno_1=$LINENO
22185 as_lineno_2=$LINENO
22186 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22187 test "x$as_lineno_1" != "x$as_lineno_2" &&
22188 test "x$as_lineno_3" = "x$as_lineno_2" || {
22189 # Find who we are. Look in the path if we contain no path at all
22190 # relative or not.
22191 case $0 in
22192 *[\\/]* ) as_myself=$0 ;;
22193 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22194for as_dir in $PATH
22195do
22196 IFS=$as_save_IFS
22197 test -z "$as_dir" && as_dir=.
22198 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22199done
22200
22201 ;;
22202 esac
22203 # We did not find ourselves, most probably we were run as `sh COMMAND'
22204 # in which case we are not to be found in the path.
22205 if test "x$as_myself" = x; then
22206 as_myself=$0
22207 fi
22208 if test ! -f "$as_myself"; then
22209 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
22210echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
22211 { (exit 1); exit 1; }; }
22212 fi
22213 case $CONFIG_SHELL in
22214 '')
22215 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22216for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
22217do
22218 IFS=$as_save_IFS
22219 test -z "$as_dir" && as_dir=.
22220 for as_base in sh bash ksh sh5; do
22221 case $as_dir in
22222 /*)
22223 if ("$as_dir/$as_base" -c '
22224 as_lineno_1=$LINENO
22225 as_lineno_2=$LINENO
22226 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22227 test "x$as_lineno_1" != "x$as_lineno_2" &&
22228 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
6bae0ccf
DL
22229 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
22230 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
c0d27fcc
MR
22231 CONFIG_SHELL=$as_dir/$as_base
22232 export CONFIG_SHELL
22233 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
22234 fi;;
22235 esac
22236 done
22237done
22238;;
22239 esac
22240
22241 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
22242 # uniformly replaced by the line number. The first 'sed' inserts a
22243 # line-number line before each line; the second 'sed' does the real
22244 # work. The second script uses 'N' to pair each line-number line
22245 # with the numbered line, and appends trailing '-' during
22246 # substitution so that $LINENO is not a special case at line end.
22247 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
22248 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
22249 sed '=' <$as_myself |
22250 sed '
22251 N
22252 s,$,-,
22253 : loop
22254 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
22255 t loop
22256 s,-$,,
22257 s,^['$as_cr_digits']*\n,,
22258 ' >$as_me.lineno &&
22259 chmod +x $as_me.lineno ||
22260 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
22261echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
22262 { (exit 1); exit 1; }; }
22263
22264 # Don't try to exec as it changes $[0], causing all sort of problems
22265 # (the dirname of $[0] is not the place where we might find the
22266 # original and so on. Autoconf is especially sensible to this).
22267 . ./$as_me.lineno
22268 # Exit status is that of the last command.
22269 exit
22270}
22271
22272
22273case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
22274 *c*,-n*) ECHO_N= ECHO_C='
22275' ECHO_T=' ' ;;
22276 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
22277 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
22278esac
503d2be0
AS
22279
22280if expr a : '\(a\)' >/dev/null 2>&1; then
22281 as_expr=expr
22282else
22283 as_expr=false
22284fi
22285
22286rm -f conf$$ conf$$.exe conf$$.file
22287echo >conf$$.file
22288if ln -s conf$$.file conf$$ 2>/dev/null; then
22289 # We could just check for DJGPP; but this test a) works b) is more generic
22290 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22291 if test -f conf$$.exe; then
22292 # Don't use ln at all; we don't have any links
22293 as_ln_s='cp -p'
22294 else
22295 as_ln_s='ln -s'
22296 fi
22297elif ln conf$$.file conf$$ 2>/dev/null; then
22298 as_ln_s=ln
22299else
22300 as_ln_s='cp -p'
22301fi
22302rm -f conf$$ conf$$.exe conf$$.file
22303
6bae0ccf
DL
22304if mkdir -p . 2>/dev/null; then
22305 as_mkdir_p=:
22306else
edfaf76d 22307 test -d ./-p && rmdir ./-p
6bae0ccf
DL
22308 as_mkdir_p=false
22309fi
22310
503d2be0
AS
22311as_executable_p="test -f"
22312
c0d27fcc 22313# Sed expression to map a string onto a valid CPP name.
edfaf76d 22314as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
22315
22316# Sed expression to map a string onto a valid variable name.
edfaf76d 22317as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 22318
503d2be0
AS
22319
22320# IFS
22321# We need space, tab and new line, in precisely that order.
22322as_nl='
22323'
22324IFS=" $as_nl"
22325
22326# CDPATH.
6bae0ccf 22327$as_unset CDPATH
503d2be0
AS
22328
22329exec 6>&1
22330
c0d27fcc
MR
22331# Open the log real soon, to keep \$[0] and so on meaningful, and to
22332# report actual input values of CONFIG_FILES etc. instead of their
22333# values after options handling. Logging --version etc. is OK.
22334exec 5>>config.log
22335{
22336 echo
22337 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22338## Running $as_me. ##
22339_ASBOX
22340} >&5
22341cat >&5 <<_CSEOF
22342
22343This file was extended by $as_me, which was
edfaf76d 22344generated by GNU Autoconf 2.59. Invocation command line was
c0d27fcc
MR
22345
22346 CONFIG_FILES = $CONFIG_FILES
22347 CONFIG_HEADERS = $CONFIG_HEADERS
22348 CONFIG_LINKS = $CONFIG_LINKS
22349 CONFIG_COMMANDS = $CONFIG_COMMANDS
22350 $ $0 $@
22351
22352_CSEOF
22353echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
22354echo >&5
503d2be0
AS
22355_ACEOF
22356
22357# Files that config.status was made for.
22358if test -n "$ac_config_files"; then
22359 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22360fi
22361
22362if test -n "$ac_config_headers"; then
22363 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22364fi
22365
22366if test -n "$ac_config_links"; then
22367 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22368fi
22369
22370if test -n "$ac_config_commands"; then
22371 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22372fi
22373
c0d27fcc 22374cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22375
22376ac_cs_usage="\
22377\`$as_me' instantiates files from templates according to the
22378current configuration.
22379
22380Usage: $0 [OPTIONS] [FILE]...
22381
22382 -h, --help print this help, then exit
22383 -V, --version print version number, then exit
19650fd6 22384 -q, --quiet do not print progress messages
503d2be0
AS
22385 -d, --debug don't remove temporary files
22386 --recheck update $as_me by reconfiguring in the same conditions
22387 --file=FILE[:TEMPLATE]
edfaf76d 22388 instantiate the configuration file FILE
503d2be0 22389 --header=FILE[:TEMPLATE]
edfaf76d 22390 instantiate the configuration header FILE
503d2be0
AS
22391
22392Configuration files:
22393$config_files
22394
22395Configuration headers:
22396$config_headers
22397
22398Configuration commands:
22399$config_commands
22400
22401Report bugs to <bug-autoconf@gnu.org>."
c0d27fcc 22402_ACEOF
503d2be0 22403
c0d27fcc 22404cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22405ac_cs_version="\\
22406config.status
edfaf76d 22407configured by $0, generated by GNU Autoconf 2.59,
503d2be0
AS
22408 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22409
edfaf76d 22410Copyright (C) 2003 Free Software Foundation, Inc.
503d2be0
AS
22411This config.status script is free software; the Free Software Foundation
22412gives unlimited permission to copy, distribute and modify it."
22413srcdir=$srcdir
22414INSTALL="$INSTALL"
c0d27fcc 22415_ACEOF
503d2be0 22416
c0d27fcc 22417cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22418# If no file are specified by the user, then we need to provide default
22419# value. By we need to know if files were specified by the user.
22420ac_need_defaults=:
22421while test $# != 0
ba4481b5 22422do
503d2be0
AS
22423 case $1 in
22424 --*=*)
22425 ac_option=`expr "x$1" : 'x\([^=]*\)='`
22426 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
6bae0ccf
DL
22427 ac_shift=:
22428 ;;
22429 -*)
22430 ac_option=$1
22431 ac_optarg=$2
22432 ac_shift=shift
503d2be0 22433 ;;
503d2be0
AS
22434 *) # This is not an option, so the user has probably given explicit
22435 # arguments.
6bae0ccf 22436 ac_option=$1
503d2be0
AS
22437 ac_need_defaults=false;;
22438 esac
22439
6bae0ccf 22440 case $ac_option in
503d2be0 22441 # Handling of the options.
c0d27fcc 22442_ACEOF
f57bd967 22443cat >>$CONFIG_STATUS <<\_ACEOF
19650fd6
AS
22444 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22445 ac_cs_recheck=: ;;
503d2be0
AS
22446 --version | --vers* | -V )
22447 echo "$ac_cs_version"; exit 0 ;;
22448 --he | --h)
22449 # Conflict between --help and --header
c0d27fcc 22450 { { echo "$as_me:$LINENO: error: ambiguous option: $1
503d2be0
AS
22451Try \`$0 --help' for more information." >&5
22452echo "$as_me: error: ambiguous option: $1
22453Try \`$0 --help' for more information." >&2;}
22454 { (exit 1); exit 1; }; };;
22455 --help | --hel | -h )
22456 echo "$ac_cs_usage"; exit 0 ;;
22457 --debug | --d* | -d )
22458 debug=: ;;
22459 --file | --fil | --fi | --f )
6bae0ccf
DL
22460 $ac_shift
22461 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
22462 ac_need_defaults=false;;
22463 --header | --heade | --head | --hea )
6bae0ccf
DL
22464 $ac_shift
22465 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 22466 ac_need_defaults=false;;
19650fd6
AS
22467 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
22468 | -silent | --silent | --silen | --sile | --sil | --si | --s)
22469 ac_cs_silent=: ;;
503d2be0
AS
22470
22471 # This is an error.
c0d27fcc 22472 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
503d2be0
AS
22473Try \`$0 --help' for more information." >&5
22474echo "$as_me: error: unrecognized option: $1
22475Try \`$0 --help' for more information." >&2;}
22476 { (exit 1); exit 1; }; } ;;
22477
22478 *) ac_config_targets="$ac_config_targets $1" ;;
22479
ba4481b5 22480 esac
503d2be0 22481 shift
ba4481b5
DL
22482done
22483
19650fd6
AS
22484ac_configure_extra_args=
22485
22486if $ac_cs_silent; then
22487 exec 6>/dev/null
22488 ac_configure_extra_args="$ac_configure_extra_args --silent"
22489fi
22490
22491_ACEOF
22492cat >>$CONFIG_STATUS <<_ACEOF
22493if \$ac_cs_recheck; then
22494 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
22495 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
22496fi
22497
503d2be0 22498_ACEOF
ba4481b5 22499
c0d27fcc 22500cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22501#
22502# INIT-COMMANDS section.
22503#
ba4481b5 22504
503d2be0
AS
22505GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
22506
c0d27fcc
MR
22507_ACEOF
22508
503d2be0 22509
c0d27fcc
MR
22510
22511cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22512for ac_config_target in $ac_config_targets
22513do
22514 case "$ac_config_target" in
22515 # Handling of arguments.
22516 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22517 "lib-src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
22518 "oldXMenu/Makefile" ) CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
22519 "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
22520 "lwlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
22521 "src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
22522 "lisp/Makefile" ) CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
23b24859 22523 "lispref/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispref/Makefile" ;;
981626b7 22524 "lispintro/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispintro/Makefile" ;;
503d2be0
AS
22525 "leim/Makefile" ) CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
22526 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22527 "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
c0d27fcc 22528 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
22529echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22530 { (exit 1); exit 1; }; };;
22531 esac
ba4481b5 22532done
503d2be0
AS
22533
22534# If the user did not use the arguments to specify the items to instantiate,
22535# then the envvar interface is used. Set only those that are not.
22536# We use the long form for the default assignment because of an extremely
22537# bizarre bug on SunOS 4.1.3.
22538if $ac_need_defaults; then
22539 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22540 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22541 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 22542fi
503d2be0 22543
19650fd6
AS
22544# Have a temporary directory for convenience. Make it in the build tree
22545# simply because there is no reason to put it here, and in addition,
22546# creating and moving files from /tmp can sometimes cause problems.
503d2be0
AS
22547# Create a temporary directory, and hook for its removal unless debugging.
22548$debug ||
22549{
22550 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22551 trap '{ (exit 1); exit 1; }' 1 2 13 15
22552}
22553
22554# Create a (secure) tmp directory for tmp files.
19650fd6 22555
503d2be0 22556{
19650fd6 22557 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
503d2be0
AS
22558 test -n "$tmp" && test -d "$tmp"
22559} ||
22560{
19650fd6 22561 tmp=./confstat$$-$RANDOM
503d2be0
AS
22562 (umask 077 && mkdir $tmp)
22563} ||
22564{
19650fd6 22565 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
22566 { (exit 1); exit 1; }
22567}
22568
c0d27fcc 22569_ACEOF
503d2be0 22570
c0d27fcc 22571cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22572
22573#
22574# CONFIG_FILES section.
22575#
22576
22577# No need to generate the scripts if there are no CONFIG_FILES.
22578# This happens for instance when ./config.status config.h
22579if test -n "\$CONFIG_FILES"; then
22580 # Protect against being on the right side of a sed subst in config.status.
22581 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22582 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22583s,@SHELL@,$SHELL,;t t
c0d27fcc
MR
22584s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22585s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22586s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22587s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22588s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22589s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
503d2be0
AS
22590s,@exec_prefix@,$exec_prefix,;t t
22591s,@prefix@,$prefix,;t t
22592s,@program_transform_name@,$program_transform_name,;t t
22593s,@bindir@,$bindir,;t t
22594s,@sbindir@,$sbindir,;t t
22595s,@libexecdir@,$libexecdir,;t t
22596s,@datadir@,$datadir,;t t
22597s,@sysconfdir@,$sysconfdir,;t t
22598s,@sharedstatedir@,$sharedstatedir,;t t
22599s,@localstatedir@,$localstatedir,;t t
22600s,@libdir@,$libdir,;t t
22601s,@includedir@,$includedir,;t t
22602s,@oldincludedir@,$oldincludedir,;t t
22603s,@infodir@,$infodir,;t t
22604s,@mandir@,$mandir,;t t
503d2be0
AS
22605s,@build_alias@,$build_alias,;t t
22606s,@host_alias@,$host_alias,;t t
22607s,@target_alias@,$target_alias,;t t
c0d27fcc 22608s,@DEFS@,$DEFS,;t t
503d2be0
AS
22609s,@ECHO_C@,$ECHO_C,;t t
22610s,@ECHO_N@,$ECHO_N,;t t
22611s,@ECHO_T@,$ECHO_T,;t t
503d2be0 22612s,@LIBS@,$LIBS,;t t
19650fd6 22613s,@MAINT@,$MAINT,;t t
503d2be0
AS
22614s,@build@,$build,;t t
22615s,@build_cpu@,$build_cpu,;t t
22616s,@build_vendor@,$build_vendor,;t t
22617s,@build_os@,$build_os,;t t
22618s,@host@,$host,;t t
22619s,@host_cpu@,$host_cpu,;t t
22620s,@host_vendor@,$host_vendor,;t t
22621s,@host_os@,$host_os,;t t
22622s,@CC@,$CC,;t t
22623s,@CFLAGS@,$CFLAGS,;t t
22624s,@LDFLAGS@,$LDFLAGS,;t t
22625s,@CPPFLAGS@,$CPPFLAGS,;t t
22626s,@ac_ct_CC@,$ac_ct_CC,;t t
22627s,@EXEEXT@,$EXEEXT,;t t
22628s,@OBJEXT@,$OBJEXT,;t t
22629s,@LN_S@,$LN_S,;t t
22630s,@CPP@,$CPP,;t t
22631s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22632s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22633s,@INSTALL_DATA@,$INSTALL_DATA,;t t
503d2be0
AS
22634s,@RANLIB@,$RANLIB,;t t
22635s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
9e71690e 22636s,@INSTALL_INFO@,$INSTALL_INFO,;t t
6bae0ccf 22637s,@EGREP@,$EGREP,;t t
503d2be0
AS
22638s,@LIBSOUND@,$LIBSOUND,;t t
22639s,@SET_MAKE@,$SET_MAKE,;t t
488dd4c4
JD
22640s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22641s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t
22642s,@GTK_LIBS@,$GTK_LIBS,;t t
503d2be0
AS
22643s,@ALLOCA@,$ALLOCA,;t t
22644s,@liblockfile@,$liblockfile,;t t
22645s,@LIBOBJS@,$LIBOBJS,;t t
22646s,@NEED_SETGID@,$NEED_SETGID,;t t
22647s,@KMEM_GROUP@,$KMEM_GROUP,;t t
22648s,@GETLOADAVG_LIBS@,$GETLOADAVG_LIBS,;t t
22649s,@version@,$version,;t t
22650s,@configuration@,$configuration,;t t
22651s,@canonical@,$canonical,;t t
22652s,@srcdir@,$srcdir,;t t
22653s,@lispdir@,$lispdir,;t t
22654s,@locallisppath@,$locallisppath,;t t
22655s,@lisppath@,$lisppath,;t t
22656s,@x_default_search_path@,$x_default_search_path,;t t
22657s,@etcdir@,$etcdir,;t t
22658s,@archlibdir@,$archlibdir,;t t
22659s,@docdir@,$docdir,;t t
22660s,@bitmapdir@,$bitmapdir,;t t
98418dba
CW
22661s,@gamedir@,$gamedir,;t t
22662s,@gameuser@,$gameuser,;t t
503d2be0
AS
22663s,@c_switch_system@,$c_switch_system,;t t
22664s,@c_switch_machine@,$c_switch_machine,;t t
22665s,@LD_SWITCH_X_SITE@,$LD_SWITCH_X_SITE,;t t
22666s,@LD_SWITCH_X_SITE_AUX@,$LD_SWITCH_X_SITE_AUX,;t t
22667s,@C_SWITCH_X_SITE@,$C_SWITCH_X_SITE,;t t
22668s,@X_TOOLKIT_TYPE@,$X_TOOLKIT_TYPE,;t t
22669s,@machfile@,$machfile,;t t
22670s,@opsysfile@,$opsysfile,;t t
6a3a24fa 22671s,@carbon_appdir@,$carbon_appdir,;t t
6bae0ccf 22672s,@LTLIBOBJS@,$LTLIBOBJS,;t t
503d2be0
AS
22673CEOF
22674
c0d27fcc 22675_ACEOF
ba4481b5 22676
c0d27fcc 22677 cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22678 # Split the substitutions into bite-sized pieces for seds with
22679 # small command number limits, like on Digital OSF/1 and HP-UX.
22680 ac_max_sed_lines=48
22681 ac_sed_frag=1 # Number of current file.
22682 ac_beg=1 # First line for current file.
22683 ac_end=$ac_max_sed_lines # Line after last line for current file.
22684 ac_more_lines=:
22685 ac_sed_cmds=
22686 while $ac_more_lines; do
22687 if test $ac_beg -gt 1; then
22688 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22689 else
22690 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22691 fi
22692 if test ! -s $tmp/subs.frag; then
22693 ac_more_lines=false
22694 else
22695 # The purpose of the label and of the branching condition is to
22696 # speed up the sed processing (if there are no `@' at all, there
22697 # is no need to browse any of the substitutions).
22698 # These are the two extra sed commands mentioned above.
22699 (echo ':t
22700 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22701 if test -z "$ac_sed_cmds"; then
edfaf76d 22702 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
503d2be0 22703 else
edfaf76d 22704 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
503d2be0
AS
22705 fi
22706 ac_sed_frag=`expr $ac_sed_frag + 1`
22707 ac_beg=$ac_end
22708 ac_end=`expr $ac_end + $ac_max_sed_lines`
22709 fi
22710 done
22711 if test -z "$ac_sed_cmds"; then
22712 ac_sed_cmds=cat
22713 fi
22714fi # test -n "$CONFIG_FILES"
ba4481b5 22715
c0d27fcc
MR
22716_ACEOF
22717cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 22718for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
ba4481b5 22719 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
22720 case $ac_file in
22721 - | *:- | *:-:* ) # input from stdin
edfaf76d
LK
22722 cat >$tmp/stdin
22723 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22724 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22725 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
edfaf76d 22726 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22727 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
22728 esac
22729
503d2be0 22730 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
c0d27fcc
MR
22731 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22732$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
22733 X"$ac_file" : 'X\(//\)[^/]' \| \
22734 X"$ac_file" : 'X\(//\)$' \| \
22735 X"$ac_file" : 'X\(/\)' \| \
22736 . : '\(.\)' 2>/dev/null ||
503d2be0
AS
22737echo X"$ac_file" |
22738 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22739 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22740 /^X\(\/\/\)$/{ s//\1/; q; }
22741 /^X\(\/\).*/{ s//\1/; q; }
22742 s/.*/./; q'`
6bae0ccf
DL
22743 { if $as_mkdir_p; then
22744 mkdir -p "$ac_dir"
22745 else
22746 as_dir="$ac_dir"
22747 as_dirs=
22748 while test ! -d "$as_dir"; do
22749 as_dirs="$as_dir $as_dirs"
22750 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22751$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
22752 X"$as_dir" : 'X\(//\)[^/]' \| \
22753 X"$as_dir" : 'X\(//\)$' \| \
22754 X"$as_dir" : 'X\(/\)' \| \
22755 . : '\(.\)' 2>/dev/null ||
6bae0ccf
DL
22756echo X"$as_dir" |
22757 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22758 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22759 /^X\(\/\/\)$/{ s//\1/; q; }
22760 /^X\(\/\).*/{ s//\1/; q; }
22761 s/.*/./; q'`
22762 done
22763 test ! -n "$as_dirs" || mkdir $as_dirs
22764 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22765echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22766 { (exit 1); exit 1; }; }; }
503d2be0 22767
c0d27fcc 22768 ac_builddir=.
98418dba 22769
c0d27fcc
MR
22770if test "$ac_dir" != .; then
22771 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
22772 # A "../" for each directory in $ac_dir_suffix.
22773 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22774else
22775 ac_dir_suffix= ac_top_builddir=
22776fi
22777
22778case $srcdir in
22779 .) # No --srcdir option. We are building in place.
22780 ac_srcdir=.
22781 if test -z "$ac_top_builddir"; then
22782 ac_top_srcdir=.
22783 else
22784 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22785 fi ;;
22786 [\\/]* | ?:[\\/]* ) # Absolute path.
22787 ac_srcdir=$srcdir$ac_dir_suffix;
22788 ac_top_srcdir=$srcdir ;;
ba4481b5 22789 *) # Relative path.
c0d27fcc
MR
22790 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22791 ac_top_srcdir=$ac_top_builddir$srcdir ;;
22792esac
edfaf76d
LK
22793
22794# Do not use `cd foo && pwd` to compute absolute paths, because
22795# the directories may not exist.
22796case `pwd` in
22797.) ac_abs_builddir="$ac_dir";;
22798*)
22799 case "$ac_dir" in
22800 .) ac_abs_builddir=`pwd`;;
22801 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22802 *) ac_abs_builddir=`pwd`/"$ac_dir";;
22803 esac;;
22804esac
22805case $ac_abs_builddir in
22806.) ac_abs_top_builddir=${ac_top_builddir}.;;
22807*)
22808 case ${ac_top_builddir}. in
22809 .) ac_abs_top_builddir=$ac_abs_builddir;;
22810 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22811 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22812 esac;;
22813esac
22814case $ac_abs_builddir in
22815.) ac_abs_srcdir=$ac_srcdir;;
22816*)
22817 case $ac_srcdir in
22818 .) ac_abs_srcdir=$ac_abs_builddir;;
22819 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22820 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22821 esac;;
22822esac
22823case $ac_abs_builddir in
22824.) ac_abs_top_srcdir=$ac_top_srcdir;;
22825*)
22826 case $ac_top_srcdir in
22827 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22828 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22829 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22830 esac;;
22831esac
c0d27fcc 22832
ba4481b5 22833
503d2be0
AS
22834 case $INSTALL in
22835 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
c0d27fcc 22836 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
ba4481b5
DL
22837 esac
22838
503d2be0
AS
22839 # Let's still pretend it is `configure' which instantiates (i.e., don't
22840 # use $as_me), people would be surprised to read:
c0d27fcc
MR
22841 # /* config.h. Generated by config.status. */
22842 if test x"$ac_file" = x-; then
22843 configure_input=
22844 else
22845 configure_input="$ac_file. "
22846 fi
22847 configure_input=$configure_input"Generated from `echo $ac_file_in |
edfaf76d 22848 sed 's,.*/,,'` by configure."
503d2be0
AS
22849
22850 # First look for the input files in the build tree, otherwise in the
22851 # src tree.
22852 ac_file_inputs=`IFS=:
22853 for f in $ac_file_in; do
22854 case $f in
22855 -) echo $tmp/stdin ;;
22856 [\\/$]*)
edfaf76d
LK
22857 # Absolute (can't be DOS-style, as IFS=:)
22858 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
22859echo "$as_me: error: cannot find input file: $f" >&2;}
22860 { (exit 1); exit 1; }; }
edfaf76d 22861 echo "$f";;
503d2be0 22862 *) # Relative
edfaf76d
LK
22863 if test -f "$f"; then
22864 # Build tree
22865 echo "$f"
22866 elif test -f "$srcdir/$f"; then
22867 # Source tree
22868 echo "$srcdir/$f"
22869 else
22870 # /dev/null tree
22871 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
22872echo "$as_me: error: cannot find input file: $f" >&2;}
22873 { (exit 1); exit 1; }; }
edfaf76d 22874 fi;;
503d2be0
AS
22875 esac
22876 done` || { (exit 1); exit 1; }
edfaf76d
LK
22877
22878 if test x"$ac_file" != x-; then
22879 { echo "$as_me:$LINENO: creating $ac_file" >&5
22880echo "$as_me: creating $ac_file" >&6;}
22881 rm -f "$ac_file"
22882 fi
c0d27fcc
MR
22883_ACEOF
22884cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22885 sed "$ac_vpsub
22886$extrasub
c0d27fcc
MR
22887_ACEOF
22888cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22889:t
22890/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22891s,@configure_input@,$configure_input,;t t
22892s,@srcdir@,$ac_srcdir,;t t
c0d27fcc 22893s,@abs_srcdir@,$ac_abs_srcdir,;t t
503d2be0 22894s,@top_srcdir@,$ac_top_srcdir,;t t
c0d27fcc
MR
22895s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
22896s,@builddir@,$ac_builddir,;t t
22897s,@abs_builddir@,$ac_abs_builddir,;t t
22898s,@top_builddir@,$ac_top_builddir,;t t
22899s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
503d2be0
AS
22900s,@INSTALL@,$ac_INSTALL,;t t
22901" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22902 rm -f $tmp/stdin
22903 if test x"$ac_file" != x-; then
22904 mv $tmp/out $ac_file
22905 else
22906 cat $tmp/out
22907 rm -f $tmp/out
22908 fi
22909
22910done
c0d27fcc
MR
22911_ACEOF
22912cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 22913
503d2be0
AS
22914#
22915# CONFIG_HEADER section.
22916#
ba4481b5
DL
22917
22918# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22919# NAME is the cpp macro being defined and VALUE is the value it is being given.
22920#
22921# ac_d sets the value in "#define NAME VALUE" lines.
edfaf76d
LK
22922ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
22923ac_dB='[ ].*$,\1#\2'
503d2be0
AS
22924ac_dC=' '
22925ac_dD=',;t'
22926# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
edfaf76d 22927ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
503d2be0 22928ac_uB='$,\1#\2define\3'
ba4481b5 22929ac_uC=' '
503d2be0 22930ac_uD=',;t'
ba4481b5 22931
503d2be0 22932for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
ba4481b5 22933 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
22934 case $ac_file in
22935 - | *:- | *:-:* ) # input from stdin
edfaf76d
LK
22936 cat >$tmp/stdin
22937 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22938 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22939 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
edfaf76d 22940 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22941 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
22942 esac
22943
c0d27fcc 22944 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
503d2be0
AS
22945echo "$as_me: creating $ac_file" >&6;}
22946
22947 # First look for the input files in the build tree, otherwise in the
22948 # src tree.
22949 ac_file_inputs=`IFS=:
22950 for f in $ac_file_in; do
22951 case $f in
22952 -) echo $tmp/stdin ;;
22953 [\\/$]*)
edfaf76d
LK
22954 # Absolute (can't be DOS-style, as IFS=:)
22955 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
22956echo "$as_me: error: cannot find input file: $f" >&2;}
22957 { (exit 1); exit 1; }; }
edfaf76d
LK
22958 # Do quote $f, to prevent DOS paths from being IFS'd.
22959 echo "$f";;
503d2be0 22960 *) # Relative
edfaf76d
LK
22961 if test -f "$f"; then
22962 # Build tree
22963 echo "$f"
22964 elif test -f "$srcdir/$f"; then
22965 # Source tree
22966 echo "$srcdir/$f"
22967 else
22968 # /dev/null tree
22969 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
22970echo "$as_me: error: cannot find input file: $f" >&2;}
22971 { (exit 1); exit 1; }; }
edfaf76d 22972 fi;;
503d2be0
AS
22973 esac
22974 done` || { (exit 1); exit 1; }
22975 # Remove the trailing spaces.
edfaf76d 22976 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
503d2be0 22977
c0d27fcc 22978_ACEOF
503d2be0
AS
22979
22980# Transform confdefs.h into two sed scripts, `conftest.defines' and
22981# `conftest.undefs', that substitutes the proper values into
22982# config.h.in to produce config.h. The first handles `#define'
22983# templates, and the second `#undef' templates.
22984# And first: Protect against being on the right side of a sed subst in
22985# config.status. Protect against being in an unquoted here document
22986# in config.status.
22987rm -f conftest.defines conftest.undefs
22988# Using a here document instead of a string reduces the quoting nightmare.
22989# Putting comments in sed scripts is not portable.
22990#
22991# `end' is used to avoid that the second main sed command (meant for
22992# 0-ary CPP macros) applies to n-ary macro definitions.
22993# See the Autoconf documentation for `clear'.
c0d27fcc 22994cat >confdef2sed.sed <<\_ACEOF
503d2be0
AS
22995s/[\\&,]/\\&/g
22996s,[\\$`],\\&,g
22997t clear
22998: clear
edfaf76d 22999s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
503d2be0 23000t end
edfaf76d 23001s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
503d2be0 23002: end
c0d27fcc 23003_ACEOF
503d2be0
AS
23004# If some macros were called several times there might be several times
23005# the same #defines, which is useless. Nevertheless, we may not want to
23006# sort them, since we want the *last* AC-DEFINE to be honored.
23007uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
23008sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
23009rm -f confdef2sed.sed
ba4481b5
DL
23010
23011# This sed command replaces #undef with comments. This is necessary, for
23012# example, in the case of _POSIX_SOURCE, which is predefined and required
23013# on some systems where configure will not decide to define it.
c0d27fcc 23014cat >>conftest.undefs <<\_ACEOF
edfaf76d 23015s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
c0d27fcc 23016_ACEOF
ba4481b5 23017
503d2be0
AS
23018# Break up conftest.defines because some shells have a limit on the size
23019# of here documents, and old seds have small limits too (100 cmds).
23020echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
edfaf76d 23021echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
503d2be0
AS
23022echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
23023echo ' :' >>$CONFIG_STATUS
23024rm -f conftest.tail
23025while grep . conftest.defines >/dev/null
23026do
23027 # Write a limited-size here document to $tmp/defines.sed.
23028 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
23029 # Speed up: don't consider the non `#define' lines.
edfaf76d 23030 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
503d2be0
AS
23031 # Work around the forget-to-reset-the-flag bug.
23032 echo 't clr' >>$CONFIG_STATUS
23033 echo ': clr' >>$CONFIG_STATUS
23034 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
23035 echo 'CEOF
23036 sed -f $tmp/defines.sed $tmp/in >$tmp/out
23037 rm -f $tmp/in
23038 mv $tmp/out $tmp/in
23039' >>$CONFIG_STATUS
23040 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
23041 rm -f conftest.defines
23042 mv conftest.tail conftest.defines
23043done
23044rm -f conftest.defines
6bae0ccf 23045echo ' fi # grep' >>$CONFIG_STATUS
503d2be0 23046echo >>$CONFIG_STATUS
ba4481b5 23047
503d2be0
AS
23048# Break up conftest.undefs because some shells have a limit on the size
23049# of here documents, and old seds have small limits too (100 cmds).
23050echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
ba4481b5 23051rm -f conftest.tail
503d2be0 23052while grep . conftest.undefs >/dev/null
ba4481b5 23053do
503d2be0
AS
23054 # Write a limited-size here document to $tmp/undefs.sed.
23055 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
23056 # Speed up: don't consider the non `#undef'
edfaf76d 23057 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
503d2be0
AS
23058 # Work around the forget-to-reset-the-flag bug.
23059 echo 't clr' >>$CONFIG_STATUS
23060 echo ': clr' >>$CONFIG_STATUS
23061 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
ba4481b5 23062 echo 'CEOF
503d2be0
AS
23063 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
23064 rm -f $tmp/in
23065 mv $tmp/out $tmp/in
23066' >>$CONFIG_STATUS
23067 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
23068 rm -f conftest.undefs
23069 mv conftest.tail conftest.undefs
ba4481b5 23070done
503d2be0
AS
23071rm -f conftest.undefs
23072
c0d27fcc 23073cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23074 # Let's still pretend it is `configure' which instantiates (i.e., don't
23075 # use $as_me), people would be surprised to read:
c0d27fcc 23076 # /* config.h. Generated by config.status. */
503d2be0 23077 if test x"$ac_file" = x-; then
c0d27fcc 23078 echo "/* Generated by configure. */" >$tmp/config.h
ba4481b5 23079 else
c0d27fcc 23080 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
503d2be0
AS
23081 fi
23082 cat $tmp/in >>$tmp/config.h
23083 rm -f $tmp/in
23084 if test x"$ac_file" != x-; then
19650fd6 23085 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
c0d27fcc 23086 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
23087echo "$as_me: $ac_file is unchanged" >&6;}
23088 else
c0d27fcc
MR
23089 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23090$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
23091 X"$ac_file" : 'X\(//\)[^/]' \| \
23092 X"$ac_file" : 'X\(//\)$' \| \
23093 X"$ac_file" : 'X\(/\)' \| \
23094 . : '\(.\)' 2>/dev/null ||
503d2be0
AS
23095echo X"$ac_file" |
23096 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23097 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23098 /^X\(\/\/\)$/{ s//\1/; q; }
23099 /^X\(\/\).*/{ s//\1/; q; }
23100 s/.*/./; q'`
6bae0ccf
DL
23101 { if $as_mkdir_p; then
23102 mkdir -p "$ac_dir"
23103 else
23104 as_dir="$ac_dir"
23105 as_dirs=
23106 while test ! -d "$as_dir"; do
23107 as_dirs="$as_dir $as_dirs"
23108 as_dir=`(dirname "$as_dir") 2>/dev/null ||
23109$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
23110 X"$as_dir" : 'X\(//\)[^/]' \| \
23111 X"$as_dir" : 'X\(//\)$' \| \
23112 X"$as_dir" : 'X\(/\)' \| \
23113 . : '\(.\)' 2>/dev/null ||
6bae0ccf
DL
23114echo X"$as_dir" |
23115 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23116 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23117 /^X\(\/\/\)$/{ s//\1/; q; }
23118 /^X\(\/\).*/{ s//\1/; q; }
23119 s/.*/./; q'`
23120 done
23121 test ! -n "$as_dirs" || mkdir $as_dirs
23122 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23123echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23124 { (exit 1); exit 1; }; }; }
503d2be0 23125
503d2be0
AS
23126 rm -f $ac_file
23127 mv $tmp/config.h $ac_file
ba4481b5 23128 fi
503d2be0
AS
23129 else
23130 cat $tmp/config.h
23131 rm -f $tmp/config.h
ba4481b5 23132 fi
503d2be0 23133done
c0d27fcc
MR
23134_ACEOF
23135cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23136
23137#
23138# CONFIG_COMMANDS section.
23139#
23140for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23141 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23142 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
c0d27fcc
MR
23143 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
23144$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
23145 X"$ac_dest" : 'X\(//\)[^/]' \| \
23146 X"$ac_dest" : 'X\(//\)$' \| \
23147 X"$ac_dest" : 'X\(/\)' \| \
23148 . : '\(.\)' 2>/dev/null ||
c0d27fcc
MR
23149echo X"$ac_dest" |
23150 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23151 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23152 /^X\(\/\/\)$/{ s//\1/; q; }
23153 /^X\(\/\).*/{ s//\1/; q; }
23154 s/.*/./; q'`
edfaf76d
LK
23155 { if $as_mkdir_p; then
23156 mkdir -p "$ac_dir"
23157 else
23158 as_dir="$ac_dir"
23159 as_dirs=
23160 while test ! -d "$as_dir"; do
23161 as_dirs="$as_dir $as_dirs"
23162 as_dir=`(dirname "$as_dir") 2>/dev/null ||
23163$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23164 X"$as_dir" : 'X\(//\)[^/]' \| \
23165 X"$as_dir" : 'X\(//\)$' \| \
23166 X"$as_dir" : 'X\(/\)' \| \
23167 . : '\(.\)' 2>/dev/null ||
23168echo X"$as_dir" |
23169 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23170 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23171 /^X\(\/\/\)$/{ s//\1/; q; }
23172 /^X\(\/\).*/{ s//\1/; q; }
23173 s/.*/./; q'`
23174 done
23175 test ! -n "$as_dirs" || mkdir $as_dirs
23176 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23177echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23178 { (exit 1); exit 1; }; }; }
23179
c0d27fcc
MR
23180 ac_builddir=.
23181
23182if test "$ac_dir" != .; then
23183 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23184 # A "../" for each directory in $ac_dir_suffix.
23185 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23186else
23187 ac_dir_suffix= ac_top_builddir=
23188fi
23189
23190case $srcdir in
23191 .) # No --srcdir option. We are building in place.
23192 ac_srcdir=.
23193 if test -z "$ac_top_builddir"; then
23194 ac_top_srcdir=.
23195 else
23196 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23197 fi ;;
23198 [\\/]* | ?:[\\/]* ) # Absolute path.
23199 ac_srcdir=$srcdir$ac_dir_suffix;
23200 ac_top_srcdir=$srcdir ;;
23201 *) # Relative path.
23202 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23203 ac_top_srcdir=$ac_top_builddir$srcdir ;;
23204esac
edfaf76d
LK
23205
23206# Do not use `cd foo && pwd` to compute absolute paths, because
23207# the directories may not exist.
23208case `pwd` in
23209.) ac_abs_builddir="$ac_dir";;
23210*)
23211 case "$ac_dir" in
23212 .) ac_abs_builddir=`pwd`;;
23213 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23214 *) ac_abs_builddir=`pwd`/"$ac_dir";;
23215 esac;;
23216esac
23217case $ac_abs_builddir in
23218.) ac_abs_top_builddir=${ac_top_builddir}.;;
23219*)
23220 case ${ac_top_builddir}. in
23221 .) ac_abs_top_builddir=$ac_abs_builddir;;
23222 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23223 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23224 esac;;
23225esac
23226case $ac_abs_builddir in
23227.) ac_abs_srcdir=$ac_srcdir;;
23228*)
23229 case $ac_srcdir in
23230 .) ac_abs_srcdir=$ac_abs_builddir;;
23231 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23232 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23233 esac;;
23234esac
23235case $ac_abs_builddir in
23236.) ac_abs_top_srcdir=$ac_top_srcdir;;
23237*)
23238 case $ac_top_srcdir in
23239 .) ac_abs_top_srcdir=$ac_abs_builddir;;
23240 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23241 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23242 esac;;
23243esac
ba4481b5 23244
c0d27fcc
MR
23245
23246 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
23247echo "$as_me: executing $ac_dest commands" >&6;}
503d2be0
AS
23248 case $ac_dest in
23249 default )
ba4481b5
DL
23250
23251### Make the necessary directories, if they don't exist.
23252for dir in etc lisp ; do
23253 test -d ${dir} || mkdir ${dir}
23254done
23255
23256# Build src/Makefile from ${srcdir}/src/Makefile.c
23257# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
23258# This must be done after src/config.h is built, since we rely on that file.
23259
23260# Now get this: Some word that is part of the ${srcdir} directory name
23261# or the ${configuration} value might, just might, happen to be an
23262# identifier like `sun4' or `i386' or something, and be predefined by
23263# the C preprocessor to some helpful value like 1, or maybe the empty
23264# string. Needless to say consequent macro substitutions are less
23265# than conducive to the makefile finding the correct directory.
23266undefs="`echo $top_srcdir $configuration $canonical |
23267sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
23268 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
23269`"
23270
23271echo creating src/epaths.h
4aa6b955 23272${MAKE-make} epaths-force
ba4481b5 23273
1c203d4c
DL
23274# As of 2000-11-19, newest development versions of GNU cpp preprocess
23275# `..' to `. .' unless invoked with -traditional
23276
d0e9bfd2 23277if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
23278 CPPFLAGS="$CPPFLAGS -traditional"
23279fi
23280
ba4481b5
DL
23281echo creating lib-src/Makefile
23282( cd lib-src
23283 rm -f junk.c junk1.c junk2.c
23284 sed -e '/start of cpp stuff/q' \
23285 < Makefile.c > junk1.c
23286 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 23287 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 23288 < Makefile.c > junk.c
503d2be0 23289 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
23290 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
23291 cat junk1.c junk2.c > Makefile.new
23292 rm -f junk.c junk1.c junk2.c
23293 chmod 444 Makefile.new
23294 mv -f Makefile.new Makefile
23295)
23296
23297echo creating src/Makefile
23298( cd src
23299 rm -f junk.c junk1.c junk2.c
23300 sed -e '/start of cpp stuff/q' \
23301 < Makefile.c > junk1.c
23302 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 23303 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 23304 < Makefile.c > junk.c
503d2be0 23305 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
23306 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
23307 cat junk1.c junk2.c > Makefile.new
23308 rm -f junk.c junk1.c junk2.c
23309 chmod 444 Makefile.new
23310 mv -f Makefile.new Makefile
23311)
23312
503d2be0 23313if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 23314 echo creating src/.gdbinit
503d2be0 23315 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
23316fi
23317
23318# This is how we know whether to re-run configure in certain cases.
23319touch src/config.stamp
23320
503d2be0
AS
23321 ;;
23322 esac
23323done
c0d27fcc 23324_ACEOF
503d2be0 23325
c0d27fcc 23326cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 23327
503d2be0 23328{ (exit 0); exit 0; }
c0d27fcc 23329_ACEOF
ba4481b5 23330chmod +x $CONFIG_STATUS
503d2be0
AS
23331ac_clean_files=$ac_clean_files_save
23332
c0d27fcc 23333
503d2be0
AS
23334# configure is writing to config.log, and then calls config.status.
23335# config.status does its own redirection, appending to config.log.
23336# Unfortunately, on DOS this fails, as config.log is still kept open
23337# by configure, so config.status won't be able to write to it; its
23338# output is simply discarded. So we exec the FD to /dev/null,
23339# effectively closing config.log, so it can be properly (re)opened and
23340# appended to by config.status. When coming back to configure, we
23341# need to make the FD available again.
23342if test "$no_create" != yes; then
23343 ac_cs_success=:
19650fd6
AS
23344 ac_config_status_args=
23345 test "$silent" = yes &&
23346 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 23347 exec 5>/dev/null
19650fd6 23348 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
23349 exec 5>>config.log
23350 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23351 # would make configure fail if this is the last instruction.
23352 $ac_cs_success || { (exit 1); exit 1; }
23353fi
f5f47add 23354
c0d27fcc 23355